Maia Pace
2022-08-12
Answered

How does the Velocity Verlet method differ from the standard Euler method? Why do we need to add Acceleration / 2 to calculate position?

You can still ask an expert for help

Brogan Navarro

Answered 2022-08-13
Author has **24** answers

The main difference is that it's "symplectic", which is to say it preserves the area of the system. The way you solve these equations you can easily lose elements of the system as a whole while rather accurately simulating the system at the small scale. It's like losing the forest through the trees. If you use Euler's method to simulate a planet traveling around a star, the planet will drift away into outer-space. Because the error in the system will propagate and lose a bit of curve each time causing it to drift away.

This problem is fixed by making sure the equations you use are symplectic in that they preserve the overall area of the space. In different domains this means it keeps the angular momentum of the system better. It ends up being more accurate accordingly. It's used a lot for example Newton's solution to the Kepler's 2nd law wherein he did a straight line to adjust the momentum then simulated the change in velocity to show that both of those operations could not change the area during the same period of time. So at infinite precision nothing could change the area of the sweep (it's sometimes called the Newton–Størmer–Verlet method).

Generally most these methods have reasons behind them but they often lag velocity to after the the change in position, so that you end up properly preserving the energy of the system. Euler's method will start flinging the stuff that should be curving in a circle, a bit too far away as all the error will move further from where it would have curved if we had infinite precision. Using the method we perform the result of the velocity then kick the velocity to where it should be during the half iterations. We still have error on the order dT, but we preserve the much about the rest of the system.

There's a bunch of different ways to do this sort of stuff, so you don't need to use that exact method but if you want to do a bunch of stuff curving around stuff, you should avoid having it all fall apart because you didn't maintain properties of the overall system.

The Verlet velocity method itself uses a special trick to skip the velocity stage. So if it's the method you're using, you need to use half the acceleration because that's what you need to do.

This problem is fixed by making sure the equations you use are symplectic in that they preserve the overall area of the space. In different domains this means it keeps the angular momentum of the system better. It ends up being more accurate accordingly. It's used a lot for example Newton's solution to the Kepler's 2nd law wherein he did a straight line to adjust the momentum then simulated the change in velocity to show that both of those operations could not change the area during the same period of time. So at infinite precision nothing could change the area of the sweep (it's sometimes called the Newton–Størmer–Verlet method).

Generally most these methods have reasons behind them but they often lag velocity to after the the change in position, so that you end up properly preserving the energy of the system. Euler's method will start flinging the stuff that should be curving in a circle, a bit too far away as all the error will move further from where it would have curved if we had infinite precision. Using the method we perform the result of the velocity then kick the velocity to where it should be during the half iterations. We still have error on the order dT, but we preserve the much about the rest of the system.

There's a bunch of different ways to do this sort of stuff, so you don't need to use that exact method but if you want to do a bunch of stuff curving around stuff, you should avoid having it all fall apart because you didn't maintain properties of the overall system.

The Verlet velocity method itself uses a special trick to skip the velocity stage. So if it's the method you're using, you need to use half the acceleration because that's what you need to do.

asked 2022-08-07

One method consists in computing the numerical solution for an arbitrary $h$ and then $2h$. The Richardson extrapolation gives an estimate of $e=\underset{t}{max}|y(t,2h)-y(t,h)|$ of the error. When the error is smaller than the tolerance, we keep the result and start from $2y(t,h)-y(t,h)$. If the error is larger we restart with $h/2$ until we reach the tolerance.

( $y(t,2h)$ means approximation with $2h$)

I don't understand why the Richardson extrapolation is mentioned. For what do I have to use it? Can I not just calculate $y(t,2h)$ and $y(t,h)$ and see the error?

( $y(t,2h)$ means approximation with $2h$)

I don't understand why the Richardson extrapolation is mentioned. For what do I have to use it? Can I not just calculate $y(t,2h)$ and $y(t,h)$ and see the error?

asked 2022-07-16

Suppose I am given a Cauchy-Euler form second order differential equation

${x}^{2}\frac{{d}^{2}y}{d{x}^{2}}+x\frac{dy}{dx}+y=f(x).$

The usual textbook method for solving the Cauchy Euler equation is to blackuce it to a linear differential equation with constant coefficients by the transformation $x={e}^{t}$. But I have a fundamental doubt here, we know that ${e}^{t}>0$ $\mathrm{\forall}t\in \mathbb{R}$. But when we are using the above transformation we are subconsciously assuming $x>0$. How does this make sense?

Substituting $t=\mathrm{ln}(x)$ also makes no difference as ln is defined on ${\mathbb{R}}_{>0}$. So I now doubt the validity of the method followed to solve the Cauchy-Euler equation.

Can someone give me a proper explanation of what exactly going on here and why the process is valid?

${x}^{2}\frac{{d}^{2}y}{d{x}^{2}}+x\frac{dy}{dx}+y=f(x).$

The usual textbook method for solving the Cauchy Euler equation is to blackuce it to a linear differential equation with constant coefficients by the transformation $x={e}^{t}$. But I have a fundamental doubt here, we know that ${e}^{t}>0$ $\mathrm{\forall}t\in \mathbb{R}$. But when we are using the above transformation we are subconsciously assuming $x>0$. How does this make sense?

Substituting $t=\mathrm{ln}(x)$ also makes no difference as ln is defined on ${\mathbb{R}}_{>0}$. So I now doubt the validity of the method followed to solve the Cauchy-Euler equation.

Can someone give me a proper explanation of what exactly going on here and why the process is valid?

asked 2022-05-09

I just wanted to see if I went about solving this correctly. The problem didn't provide a step so I'm using .1:

${x}^{\prime}(t)=1+t\phantom{\rule{thickmathspace}{0ex}}\mathrm{sin}(tx)$

Where $x(0)=0$ at $t=1$

So using the idea that:

${y}_{1}={y}_{0}+h\bullet F({x}_{0},{y}_{0})$

I did the following:

${y}_{1}=0+.1[1+(.1)\mathrm{sin}(1(0))]=.1$

${y}_{2}=.1+.1[1+(.1)\mathrm{sin}(1(.1))]=.2$

I repeated this same formula 6 more times. Did I apply Euler's method correctly?

${x}^{\prime}(t)=1+t\phantom{\rule{thickmathspace}{0ex}}\mathrm{sin}(tx)$

Where $x(0)=0$ at $t=1$

So using the idea that:

${y}_{1}={y}_{0}+h\bullet F({x}_{0},{y}_{0})$

I did the following:

${y}_{1}=0+.1[1+(.1)\mathrm{sin}(1(0))]=.1$

${y}_{2}=.1+.1[1+(.1)\mathrm{sin}(1(.1))]=.2$

I repeated this same formula 6 more times. Did I apply Euler's method correctly?

asked 2022-07-16

I need to solve the equation below with Euler's method:

${y}^{\u2033}+\pi y{e}^{x/3}(2{y}^{\prime}\mathrm{sin}(\pi x)+\pi y\mathrm{cos}(\pi x))=\frac{y}{9}$

for the initial conditions $y(0)=1$, ${y}^{\prime}(0)=-1/3$

So I know I need to turn the problem into a system of two first order differential equations.

Therefore ${u}_{1}={y}^{\prime}$ and ${u}_{2}={y}^{\u2033}$ I can now write the system as:

${u}_{1}={y}^{\prime}\phantom{\rule{0ex}{0ex}}{u}_{2}={\displaystyle \frac{y}{9}}-\pi y{e}^{x/3}(2{u}_{1}\mathrm{sin}(\pi x)-\pi y\mathrm{cos}(\pi x))$

How do I proceed from here?

${y}^{\u2033}+\pi y{e}^{x/3}(2{y}^{\prime}\mathrm{sin}(\pi x)+\pi y\mathrm{cos}(\pi x))=\frac{y}{9}$

for the initial conditions $y(0)=1$, ${y}^{\prime}(0)=-1/3$

So I know I need to turn the problem into a system of two first order differential equations.

Therefore ${u}_{1}={y}^{\prime}$ and ${u}_{2}={y}^{\u2033}$ I can now write the system as:

${u}_{1}={y}^{\prime}\phantom{\rule{0ex}{0ex}}{u}_{2}={\displaystyle \frac{y}{9}}-\pi y{e}^{x/3}(2{u}_{1}\mathrm{sin}(\pi x)-\pi y\mathrm{cos}(\pi x))$

How do I proceed from here?

asked 2022-08-18

I want to understand the explicit and the implicit Euler method better. Assume I have the initial value problem ${y}^{\u2033}+y=0$, $y(0)=0$, ${y}^{\prime}(0)=1$, which is of course solved by $y=\mathrm{sin}(x)$, and I convert this into a system of first-degree linear equations

$\left(\begin{array}{c}{y}^{\prime}\\ {z}^{\prime}\end{array}\right)=\left(\begin{array}{cc}0& 1\\ -1& 0\end{array}\right)\left(\begin{array}{c}y\\ z\end{array}\right)\text{.}$

When I apply the explicit and the implicit Euler methods to the differential equation ${y}^{\u2033}+y=0$, with stepwidth $h>0$, I get approximation points that satisfy:

$\begin{array}{rcll}{y}_{k}& =& \frac{ih}{2}((1-ih{)}^{k}-(1+ih{)}^{k})& \text{for the explicit Euler method}\\ {\stackrel{~}{y}}_{k}& =& \frac{ih}{2(1+{h}^{2}{)}^{k}}((1-ih{)}^{k}-(1+ih{)}^{k})& \text{for the implicit Euler method}\end{array}$

I am interested in seeing how fast these sequences grow with k. My guess is that the first sequence is unbounded, whereas the second converges to zero. At least that is what I get for , but I have no idea how to prove this. Any suggestions?

$\left(\begin{array}{c}{y}^{\prime}\\ {z}^{\prime}\end{array}\right)=\left(\begin{array}{cc}0& 1\\ -1& 0\end{array}\right)\left(\begin{array}{c}y\\ z\end{array}\right)\text{.}$

When I apply the explicit and the implicit Euler methods to the differential equation ${y}^{\u2033}+y=0$, with stepwidth $h>0$, I get approximation points that satisfy:

$\begin{array}{rcll}{y}_{k}& =& \frac{ih}{2}((1-ih{)}^{k}-(1+ih{)}^{k})& \text{for the explicit Euler method}\\ {\stackrel{~}{y}}_{k}& =& \frac{ih}{2(1+{h}^{2}{)}^{k}}((1-ih{)}^{k}-(1+ih{)}^{k})& \text{for the implicit Euler method}\end{array}$

I am interested in seeing how fast these sequences grow with k. My guess is that the first sequence is unbounded, whereas the second converges to zero. At least that is what I get for , but I have no idea how to prove this. Any suggestions?

asked 2022-06-13

I am revising the modified euler method and would appreciate some help with this question:

The equation is

${y}^{\prime}=\frac{2}{x}y+{x}^{2}{e}^{x},y(1)=0$

Use modified euler method to calculate $y(1.1)$ taking $h=0.1$ (working to 4 decimal places)

Where do i start?

asked 2022-07-18

Finding solution of differential equation using euler numerical method $\frac{dy}{dx}=0.3y-10$ and $0\le x\le 3$ and $x=0,y=40.$

What i have tried

${y}_{n}={y}_{n-1}+h\cdot f({x}_{n-1},{y}_{n-1})$

Where $f(x,y)=0.3y-10.$

I have a doubt that what should i take width interval $h$ in above question.(which is not mention here)

Can anyone please explain me what i take value of $h$. Thanks

What i have tried

${y}_{n}={y}_{n-1}+h\cdot f({x}_{n-1},{y}_{n-1})$

Where $f(x,y)=0.3y-10.$

I have a doubt that what should i take width interval $h$ in above question.(which is not mention here)

Can anyone please explain me what i take value of $h$. Thanks