Due: Thurs 5/10
[20 pts] This problem concerns solving the logistic equation
\[ y^\prime = 10y(1-y),\quad y_0 = 0.1. \]The exact solution to this IVP is given by
\[ y(t) = \frac{e^{10 t}}{9+e^{10 t}} \]We would like to approximate this IVP on $[0,1]$ using using $n=10$ time steps using the forward Euler scheme, the backward Euler scheme and the trapezoidal scheme.
Solve this problem using the forward Euler method. Plot your solution against the exact solution. Comment on the behavior.
Solve this problem using the backward Euler method. Plot your solution against the exact solution. Comment on the behavior.
Solve this problem using the Trapezoidal method. Plot your solution against the exact solution. Comment on the behavior.
Solve this problem using MATLAB's ode45
method. Plot your solution against the exact solution. Comment on the behavior.
Plot the first three approximations on the same plot with the exact solution. Which performs the best?
Be sure to plot all 4 approximations on the same graph and compare them to the exact solution. Which one performs the best? Which one performs the worst?
[10 pts] Is Improved Euler's method \[ y_{i+1} = y_i + \frac{h}{2}(k_1 + k_2), \quad k_1 = f(t_k, y_k), \quad k_2 = f(t_k + h, y_k + hk_1) \]
stable for the equation, $y^\prime = -20y$ with $h = .1$?[10 pts] Consider the trapezoidal method \[ y_{i+1} = y_{i} + \frac{h}{2}(f(t_i,y_i) + f(t_{i+1},y_{i+1})). \] Suppose that $|\partial_y f(t,y)| \leq r$ for all $t\in [0,T]$ and $y\in\mathbb{R}$. Show that the amplification factor $\alpha_i$ for the error $e_i = y_i - y(t_i)$, defined by \[ e_{i+1} = \alpha_i e_i + \tau_i, \quad \tau_i = \mathcal{O}(h^4) \] is given by \[ \alpha_i = \frac{1+ \frac{h}{2}\partial_y f(t_i, \xi_i)}{1-\frac{h}{2}\partial_yf(t_{i+1},\xi_{i+1})} \] for some $\xi_i$ between $y_{i}$ and $y(t_i)$, $i = 1, 2, \ldots$. How small must $h$ be for this scheme to be stable?
[10 pts] In deriving the trapezoidal method for solving the differential equation $y^\prime = f(t, y)$ we integrated the equation over the interval $t_i \leq t \leq t_{i+1}$. In this problem you are to integrate the equation over the interval $t_{j−1} \leq t \leq t_{j+1}$.
What numerical method is obtained if Simpson’s rule is used on the resulting integral? What is the truncation error for this rule?
What numerical method is obtained if the midpoint rule is used on the resulting integral? What is the truncation error for this rule?