MatLab Assignment 3
-- Turn in on March 12
-- MatLab Functions:
int, subs, syms, ezplot, ode23,
ode45
--- Picard's Method and the Runge-Kutta Method
If you have any question or problem with MatLab, please
send me an email at:
chenm or
call me at: 953-7896.
- Take a few minutes to read the MatLab
handout (2) to learn how to
use MatLab functions
int, subs, syms, ezplot
to approximate the solution of a given initial value problem
by Picard's Method; and use MatLab functions ode23
and ode45 to solve a given initial value problem
numerically by Runge Kutta methods. You may down load
the MatLab scripts for the example given at the end of the
handout into a file by Copy and Paste from the web page.
Then use it for your assignment by modifying it for each of
the following given problems.
- Consider the initial value problem:
y'=xy+2x-x3, y(0)=0.
- Use Picard's Method to
compute y1(x),
y2(x), and y3(x), and then sketch
graphs of
y1(x), y2(x), y3(x),
and the true solution y(x)=x2 for x in [0,2].
Use the 4th & 5th order Runge-Kutta method to compute
y1,...,yn for x in [0,2] and plot {yi}.
- In your judgment,
are y1(x), y2(x) and y3(x) good
approximations for x in [0,1]?
- In your judgment, are y1(x), y2(x) and
y3(x) good approximations for x in [0,2]?
- Would you recommend to use y3(x) to approximate
the solution for x in [0,3]? Provide a brief explanation.
- Consider the initial value problem:
y'=x2+y2, y(0)=1.
- Use Picard's Method to
compute y1(x),
..., y6(x), and then sketch
graphs of
y1(x), ..., y6(x)
for x in [0,1].
Use the 4th & 5th order Runge-Kutta method to compute
y1,...,yn for x in [0,1] and plot {yi}.
- In your judgment,
are y1(x), ..., y6(x) good
approximations for x in [0,1]?
- Would you recommend to use y6(x) to approximate
the solution for x in [0,2]? Provide a brief explanation.