Anda di halaman 1dari 2

Numerical Methods for Differential Equations

and Applications
Camile Fraga Delfino Kunz
22th November 2018
Exercises - Matlab
1) The Initial Value Problem using the Logistic equation for population dynam-
ics can be written as
(
u0 (t) = rx(1 − x)
u(0) = η

and it has the exact solution given by


1
u(t) =  
1
1+ η − 1 e−rt

Using the numerical methods from the last class,


• Forward Euler;
• Backward Euler;

• Trapezoidal (Crank-Nicolson);
• Leapfrog;
• BDF;
• 2-stage Runge-Kutta;

make a study for the error behavior on the approximation on t = 10 for the time
steps k = [0.5, 0.2, 0.1, 0.05, 0.01]. Use as parameters r = 1 and η = 0.1. Re-
member that, considering that it is a nonlinear model, for the implicit methods
we would have to use Newton Method so solve for U n+1 . And for the multistep
methods, how obtain the initial values, since we have only U 0 = η?

1
2) Consider the test IVP:
(
u0 (t) = λu
u(0) = η

Using the Forward Euler and Backward Euler obtain an approximation on the
interval [0, 10] for λ = −5, number of subintervals N = 40, and initial condition
η = 0.1. What do you observe? Which method is better on this case? And if
we take λ = 5 instead? For understanding what is going on, study the stability
of the difference equation associated to each method:
• Forward Euler: U n+1 = (1 + kλ)U n
1
• Backward Euler: U n+1 = (1−kλ) U
n

Remember that the stability condition is that the absolute value of the associ-
ated eigenvalues is less than 1. What is the stability interval for the parameters
λ and k?

References
1 Leveque, R. J. Finite Difference Methods for Ordinary and Partial Differ-
ential Equations. SIAM, 2007.

Anda mungkin juga menyukai