

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


The idea of this worksheet is to program forward and backward Euler. By some of the examples, we want to highlight the numerical instability of forward methods. For the following exercises, we set the following notation. We consider a curve X : [0, โ) โ Rn,
which is a solution to the ODE equation { (^) dX(t) dt =^ F^ (t, X(t))^ for^ t >^0 X(0) = X 0 ,
where X 0 โ Rn^ and F : [0, โ) ร Rn^ โ Rn.
F (t, x, y) =
ax โ bxy โ cx^2 dy + exy โ jy^2
with parameters
F = @(t, x, y) [2 โ x โ 2 โ x โ y, โy + 4 โ x โ y]
This function you can then feed into your implementation of forward or backward matlab. I have added the time variable, even if we are not using it.
X(t) = X 0 eโ^100 t.
We can feed this into a vector, by doing the following steps