10.4 (a)
For the logistic equation
ENGR20005
Numerical Methods in Engineering
Workshop 10 Solutions
The partial derivatives are given by
2 ∂t ∂N (b),(c) See Q10 4euler sol.m and Q10 4taylor sol.m
10.5 (a)
For the Landau equation
The partial derivatives are
(b),(c) See Q10 5euler sol.m and Q10 5taylor sol.m 1
dN =f(t,N)=rN1−N (1) dt K
∂f = 0 (2a) ∂t
∂f =r−2rN (2b) ∂N K
Applying the explicit Euler method to solve the logistic equation, we have
Nn+1 =Nn +∆tf(t,N) (3)
And similarly with Taylor’s method of order two
Nn+1 = Nn + ∆tf(t, N) + (∆t)2 ∂f + ∂f f(t, N) (4)
dA =f(t,A)= 1εA−gA3 (5) dt τ
∂f = 0 (6a) ∂t
∂f =ε−3gA2 (6b) ∂A
10.6 (a)
Separating variables gives
Hence
Applying the initial condition, we have
10.7 (a)
log 1 = C = 0 x = e−t
x(1) = e−1
As f is linear
Hence the maximum time step for both methods is given by
∆t= 2 = 2 =0.2 |λ| 10
Thus, the solution is given by Thus, at t = 1, we have
(b),(c),(d) See Q10 6 sol.m.
(b) Since the differential equation is linear with a forcing term λ = −4
Hence the maximum time step is given by
∆t= 2 =2=0.5
(c) Since f is nonlinear
|λ| 4
λ = df = −2x dx
dx x=− dt
log x = −t + C
λ = −10
Since x(0) = 1, then we can approximate the growth rate using the initial value λ = −2(1)
Hence the maximum time step is given by
∆t= 2 = 2 =0.2
|λ| 10
2
(d) The derivative is given by
Using the initial condition as an estimate, we have λ = −3(1)|1| = −3
So the method is stable if the time step is given by ∆t= 2 =0.66
before the instability grows unbounded. (e) The derivative is given by
λ = df = −1 − exp (x) dx
Using the initial condition as an estimate, we have λ = −1 − e
So the method is stable if the time step is given by
λ = df = −3x|x| dx
|−3|
However, using the explicit Euler method, you can push the time step to ∆t ≈ 1
∆t = 2 |−1−e|
= 0.5379
Using the explicit Euler method, the method becomes unstable at approximately ∆t ≈ 1.2.
3