Rewrite the differential equation you have been given at the start of this document in the correct form for applying the Euler and Euler-Cauchy numerical schemes. Write down an appropriate 1 Euler method recursive scheme to solve this differential equation for the following values of the parameters and initial conditions: dx/dt=omegasqrt(A−x^2), where A,omega>0 and x=x0 at t=0. It is to be solved from t=0 to t=50.0. It has analytical solution x(t)=sqrt(A)sin(omega t+varphi), where sin(varphi)=x_0/sqrt(A) if x_0<=sqrt(A)

Kenna Stanton

Kenna Stanton

Answered question

2022-11-06

d x d t = ω A x 2 ,
where A , ω > 0 and x = x 0 at t = 0.
It is to be solved from t = 0 to t = 50.0. It has analytical solution
x ( t ) = A sin ( ω t + φ ) ,
where sin ( φ ) = x 0 A if x 0 A .

The question I am trying to solve is the following
Rewrite the differential equation you have been given at the start of this document in the correct form for applying the Euler and Euler-Cauchy numerical schemes. Write down an appropriate 1 Euler method recursive scheme to solve this differential equation for the following values of the parameters and initial conditions:
ω = 3.1, A = 10.0, x 0 = 2.0.

Answer & Explanation

mainzollbtt

mainzollbtt

Beginner2022-11-07Added 13 answers

The right side of the ODE is always positive, so that the given function is only a solution as long as it is growing. After reaching the maximum it will stay constant at this maximum value A .

The Euler method computes
Δ x = f ( t , x ) Δ t x n + 1 = x n + f ( t n , x n ) Δ t
Note that this formula does not detect and handle domain boundaries. However, the domain of the given equation is bounded by | x | A . Just applying the method without further preparations will run into errors in computing square roots of negative numbers.

There are some natural continuations of the square root that remove this domain limitation, like
x ˙ = ω max ( 0 , A x 2 )      or      x ˙ = ω s i g n ( A x 2 ) | A x 2 | .
The numerical solutions by the Euler method will reach this fixed point x = A and step over it. In the first variant the solution will then stay constant, in the second variant it will oscillate around the fixed point, possibly quite chaotically due to the vertical tangent at x = A .

This can be repaiblack to some degree by replacing the vertical tangent by a segment with a steep but finite slope,
x ˙ = ω A x 2 max ( ε , | A x 2 | ) .

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?