Harmonic oscillator and symplectic Euler method

In summary: Using the fact that $y_n^2 + z_n^2 = 1$ (since it is a point on the circle), we can simplify this to:$ab = \sqrt{2 + 2h^2(z_n^2 + y_n^2) + O(h^3)} = \sqrt{2 + O(h^2)} = \sqrt{2} + O(h)$Similarly, we can show that $r^2 = 1 + O(h)$. Thus, to order $h^2$, we have $ab = r^2$, which means that the areas of the ellipse and circle are equal.
  • #1
ra_forever8
129
0
Given the equations for the harmonic oscillator
$\frac{dy}{dz}=z, \frac{dz}{dt}= -y$if the system is approximated by the symplectic Euler method, then it gives$z_{n+1}= z_{n}-hy_{n}, \\ y_{n+1}= y_{n}+hz_{n+1}$which shows that the circle $y^2_{n} + z^2_{n} = 1$ is mapped into an ellipse.
Deduce that to order $h^2$ the ellipse has the same enclosed area as the circle.=> my attempt so far
in this case, area of ellipse = area of circle.Truncation error from the symplectic euler method gives$hT_{z}= h(z'+y) +O(h^2)$$hT_{z}= O(h^2)$ since, $h(z'+y)$ goes to zero$T_{z}= O(h)$Similarly,$hT_{y}= h(y'-z) +O(h^2)$$hT_{y}= O(h^2)$ since, $h(y'-z)$ goes to zero$T_{y}= O(h)$Both have first order
did my answer satisfy the question?
 
Physics news on Phys.org
  • #2


Your attempt is on the right track, but there are a few things that need to be clarified. First, the truncation error is not equal to $hT_z$, it is equal to $z_{n+1}-z(t_{n+1})$. Similarly, the truncation error for $y$ would be $y_{n+1}-y(t_{n+1})$. Also, when you say $h(z'+y)$ goes to zero, it should be $h(z_n + y_n)$ since this is the actual value of $z$ and $y$ at the next time step. Additionally, it is not correct to say that the truncation errors are $O(h^2)$, they are actually $O(h)$ as you correctly deduced later. Finally, you need to show that the area of the ellipse is equal to the area of the circle to order $h^2$, not just that it is equal. This means you need to show that the difference in areas is of order $h^2$. Here is a possible solution:

We know that the area of a circle is given by $A = \pi r^2$, where $r$ is the radius. The area of an ellipse is given by $A = \pi ab$, where $a$ and $b$ are the semi-major and semi-minor axes, respectively. We want to show that $ab = r^2$ to order $h^2$, which would mean that the areas are equal.

Using the equations for the harmonic oscillator, we can write $y_{n+1} = y_n + hz_n + O(h^2)$ and $z_{n+1} = z_n - hy_n + O(h^2)$. Substituting these into the equation for the ellipse, we get:

$ab = \sqrt{(y_{n+1})^2 + (z_{n+1})^2} = \sqrt{(y_n + hz_n + O(h^2))^2 + (z_n - hy_n + O(h^2))^2} = \sqrt{(y_n^2 + z_n^2 + h^2(z_n^2 + y_n^2) + O(h^3)) + (z_n^2 + y_n^2 - h^2(z_n^2 + y_n^2) + O(h^3
 

Related to Harmonic oscillator and symplectic Euler method

1. What is a harmonic oscillator?

A harmonic oscillator is a physical system that exhibits periodic motion, where the restoring force is directly proportional to the displacement from the equilibrium position. It can be found in various systems such as a mass-spring system or a pendulum.

2. What is the symplectic Euler method?

The symplectic Euler method is a numerical method used to solve ordinary differential equations, particularly for systems that exhibit Hamiltonian dynamics. It involves approximating the solution at discrete time intervals using a combination of forward Euler and backward Euler methods, resulting in a more accurate and energy-conserving solution compared to other numerical methods.

3. How is the symplectic Euler method different from other numerical methods?

The symplectic Euler method differs from other numerical methods, such as the Runge-Kutta method, in that it preserves the symplectic structure of the Hamiltonian system. This means that the method accurately captures the underlying physical behavior and conserves important physical quantities, such as energy, over long periods of time.

4. What are some advantages of using the symplectic Euler method?

One major advantage of using the symplectic Euler method is its ability to accurately simulate and preserve the dynamics of Hamiltonian systems, making it a valuable tool for studying physical systems in fields such as physics, engineering, and astronomy. It also has a simple implementation and is computationally efficient, making it a popular choice for numerical simulations.

5. Are there any limitations to the symplectic Euler method?

While the symplectic Euler method has many advantages, it does have some limitations. One limitation is that it can only be used for systems with Hamiltonian dynamics, which may not be applicable to all physical systems. Additionally, the method may not provide accurate results for highly nonlinear systems or systems with large energy variations. In these cases, other numerical methods may be more suitable.

Similar threads

Replies
7
Views
2K
  • Differential Equations
Replies
5
Views
1K
Replies
61
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
5
Views
2K
  • Differential Equations
Replies
1
Views
1K
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
9
Views
2K
  • Differential Equations
Replies
5
Views
4K
Back
Top