# Thread: Differential Equations, etc. - Know em?

1. ## Differential Equations, etc. - Know em?

Two problems...

P1. Logistic differential equation:

dx/dt = 5x - 0.1(x^2)

a) Describe dynamics as t goes to infinity?

b) Write the finite difference approximation to the equation used in the Euler method?

c) For what step size values does the diff. approximation approach a fixed point as n goes to infinity? What is the fixed point?

d) For what step size values does the diff. approximation exhibit oscillations as n goes to infinity?

tyvm

2. Originally Posted by 12_bladez
Two problems...

P1. Logistic differential equation:

dx/dt = 5x - 0.1(x^2)

a) Describe dynamics as t goes to infinity?
If x(0)<0 x(t) -> -infty as t -> infty

If x(0)>0 x(t) is increasing if x(t)<50, and decreasing if x(t)>50, and if fact
x(t) -> 50 as t -> infty, though a bit more work is needed to prove this.

b) Write the finite difference approximation to the equation used in the Euler method?
approximate dx/dt by [x(t+h)-x(t)]/h, so our finite difference approximation
is:

x(t+h) = x(t) + h*[5*x(t) - 0.1(x^2(t))]

c) For what step size values does the diff. approximation approach a fixed point as n goes to infinity? What is the fixed point?

d) For what step size values does the diff. approximation exhibit oscillations as n goes to infinity?

P2. Derive the following two formulas for approximating the third derivative and find their error terms; which of the two is more accurate?

a) f'''(x) = [1/(h^3)][f(x+3h) - 3f(x+2h) + 3f(x+h) - f(x)]

b) f'''(x) = [1/(2h^3)][f(x+2h) - 2f(x+h) + 2f(x-h) - f(x-2h)]

tyvm

3. ty CaptainBlack

Would you could you elaborate a bit more on 1a? Don't get 1c or 1d either huh? Thanks again.

P.S. Isn't 1b suppose to be:

x(t+h) = x(t) + h(5x(t) - 0.1((x(t))^2))

???

4. Originally Posted by 12_bladez

P.S. Isn't 1b suppose to be:

x(t+h) = x(t) + h(5x(t) - 0.1((x(t))^2))

???
Yes, clumsy editing on my part!

RonL

5. Originally Posted by 12_bladez
ty CaptainBlack

Would you could you elaborate a bit more on 1a? Don't get 1c or 1d either huh? Thanks again.
???
Originally Posted by 12_bladez
Two problems...

P1. Logistic differential equation:

dx/dt = 5x - 0.1(x^2)

a) Describe dynamics as t goes to infinity?
If x(0)<0 x(t) -> -infty as t -> infty

If x(0)>0 x(t) is increasing if x(t)<50, and decreasing if x(t)>50, and if fact
x(t) -> 50 as t -> infty, though a bit more work is needed to prove this.
Clearly if x is ever negative the derivative is negative, and gets more
negative the more negative x becomes, so there is run away growth
in the absolute value of x, and the growth is in the direction of increasingly
more negative x. So as time goes to infty x goes to -infty.

If x is ever positive but <50 dx/dt is positive so x is growing, but it must
level off where dx/dt=0, which is at x=50. So if x starts with a value in
the interval (0,50) it grows closer and closer to 50, so as t->infty
x->infty.

If x is ever positive but >50 dx/dt is negative so x is declining, but it must
level off where dx/dt=0, which is at x=50. So if x starts with a value in
the >50 it grows closer and closer to 50, so as t->infty
x->infty.

If x(0)=50, then dx/dt=0, so x remains at a value of 50. However any small
disturbance away from x=50 will decay back towards x=50, so x=50 is a
stable equilibrium.

If x(0)=0, then dx/dt=0, so x remains at a value of 0. However any small
disturbance away from x=0 will grow away from x=0, so x=0 is an
unstable equilibrium.

RonL

6. Originally Posted by CaptainBlack
Clearly if x is ever negative the derivative is negative, and gets more
negative the more negative x becomes, so there is run away growth
in the absolute value of x, and the growth is in the direction of increasingly
more negative x. So as time goes to infty x goes to -infty.

If x is ever positive but <50 dx/dt is positive so x is growing, but it must
level off where dx/dt=0, which is at x=50. So if x starts with a value in
the interval (0,50) it grows closer and closer to 50, so as t->infty
x->infty.

If x is ever positive but >50 dx/dt is negative so x is declining, but it must
level off where dx/dt=0, which is at x=50. So if x starts with a value in
the >50 it grows closer and closer to 50, so as t->infty
x->infty.

If x(0)=50, then dx/dt=0, so x remains at a value of 50. However any small
disturbance away from x=50 will decay back towards x=50, so x=50 is a
stable equilibrium.

If x(0)=0, then dx/dt=0, so x remains at a value of 0. However any small
disturbance away from x=0 will grow away from x=0, so x=0 is an
unstable equilibrium.

RonL
Whenever you say "x" , do you mean x(0), x(t) or just plain x?

7. approximate dx/dt by [x(t+h)-x(t)]/h, so our finite difference approximation
is:

x(t+h) = x(t) + h*[5*x(t) - 0.1(x^2(t))]

c) For what step size values does the diff. approximation approach a fixed point as n goes to infinity? What is the fixed point?
If this approaches a fixed point as t->infty, then [5*x(t) - 0.1(x^2(t))] ->0
so the fixed point is either 0, or 50.

Consider the case where x is close to 0.

x(t+h) = x(t) (1+5h) - 0.1x^2(t)

but as x is small:

x(t+h) ~= x(t) (1+5h),

so:

|x(t+h)| ~= |x(t)| (1+5h)

but 1+5h>1, so 0 is not a fixed point of the finite difference equation.

Now let x(t)=50+epsilon, then

x(t+epsilon) = (50 + epsilon) + h[5*(50 + epsilon) - 0.1*(50 + epsilon)^2]

................ = [- epsilon*h*(epsilon + 50)/10] + epsilon + 50

................ ~= epsilon*(1-5 h) +50.

so this goes to 50 if |1-5h|<1, or h<0.4 (assuming h>0).

RonL

8. Did u get 1d too by any chance CaptainBlack? Thanks again for a, b and c.

9. Originally Posted by 12_bladez
Two problems...

P1. Logistic differential equation:

dx/dt = 5x - 0.1(x^2)

a) Describe dynamics as t goes to infinity?

b) Write the finite difference approximation to the equation used in the Euler method?

c) For what step size values does the diff. approximation approach a fixed point as n goes to infinity? What is the fixed point?

d) For what step size values does the diff. approximation exhibit oscillations as n goes to infinity?

tyvm
Originally Posted by CaptainBlack
Now let x(t)=50+epsilon, then

x(t+h) = (50 + epsilon) + h[5*(50 + epsilon) - 0.1*(50 + epsilon)^2]

................ = [- epsilon*h*(epsilon + 50)/10] + epsilon + 50

................ ~= epsilon*(1-5 h) +50.

so this goes to 50 if |1-5h|<1, or h<0.4 (assuming h>0).

RonL
With x=50+epsilon with epsilon small we have:

x(t+h) ~= epsilon*(1-5 h) +50.

So x(t+h) ~= 50 - epsilon, when h=0.4, so the solution is oscillitary.

For larger h the sequence of x's alternates in sign but grown is magintute.

(note correction to the last line of the previous post)

RonL

10. So that's not the answer to 1d then? You're just correcting your 1c?

11. Originally Posted by 12_bladez
So that's not the answer to 1d then? You're just correcting your 1c?
No that last post was the answer to 1d.

I was just pointing out that I had corrected 1c, as if you are like me you
don't necessarily reread the earlier posts.

What I did was: changed the smileys back to what they should be
and corrected the solution of:

|1-5h|<1

from h<0.2 to h<0.4, for h>0