I was just doing some practice questions for a test, but have been stumped by the following for the past couple of hours. I'm given a system such that: du/dt=v & dv/dt=−f(u) with Hamiltonian H=1/2(du/dt)^2+int fdu. I have to show that using the forward Euler method leads to a global error for H that grows like nh^2 for step size h and number of steps n.

Nashorn0o

Nashorn0o

Open question

2022-08-20

I was just doing some practice questions for a test, but have been stumped by the following for the past couple of hours.
I'm given a system such that:
d u d t = v     &     d v d t = f ( u )
with Hamiltonian
H = 1 2 ( d u d t ) 2 + f d u .
I have to show that using the forward Euler method leads to a global error for H that grows like n h 2 for step size h and number of steps n.
I know that the global error can be calculated via ϵ = | U n U ( T ) | but I'm not sure how to apply it in this case.
Thanks for any help!
EDIT: So if I understand correct, I have to calculate | H n + 1 H n |

Answer & Explanation

Skylar French

Skylar French

Beginner2022-08-21Added 7 answers

If you take the example f ( u ) = u, then you can interpret the Hamilton system in the complex plane as
z ˙ = u ˙ + i v ˙ = i ( u + i v ) = i z .
The Euler forward iteration thus produces elements
z k + 1 = z k + h ( i z k ) = ( 1 i h ) z k z n = ( 1 i h ) n z 0 .
The Hamilton function is H = 1 2 ( v 2 + u 2 ) = 1 2 | z | 2 , which gives on the Euler solution
H n = 1 2 | z n | 2 = 1 2 ( 1 + h 2 ) n | z 0 | 2 = e n h 2 + O ( n h 4 ) H 0
so that indeed H n H 0 = n h 2 e 1 2 n h 2 + O ( n h 4 ) H 0
Under more general conditions one gets
H k + 1 = 1 2 ( v k h f ( u k ) ) 2 + F ( u k + h v k ) = H k h v k f ( u k ) + 1 2 h 2 f ( u k ) 2   +   f ( u k ) ( h v k ) + 1 2 f ( u k ) ( h v k ) 2 + O ( h 3 ) = H k + 1 2 h 2 [ f ( u k ) 2 + f ( u k ) v k 2 ] + O ( h 3 )
Now you have to argue that the coefficient of the h 2 term remains bounded and the claim of the task follows.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?