Picard's Method:
Now we can use above MatLab functions to compute
approximations of the solution of a initial value problem
y'=f(x,y), y(x0)=y0
by Picard's Method. Recall that the Picard Method generates
a sequence of approximations: y1(x), y2(x),
.... Review your class notes on Picard's Method if it is necessary.
Consider the initial value problem: y'=x+y, y(1)=2. The
solution of this problem is: y=-(x+1)+4ex-1. The
following MatLab scripts compute the approximations
y1, y2, y3 and y4 of
y using Picard's Method and then plot the graphs of
y1, y2, y3, y4
and y for x in [1,5].
syms x t;
y0=2;
x0=1;
f=t+y0;
y1=int(f,t,x0,x)+y0;
f=t+subs(y1,x,t);
y2=int(f,t,x0,x)+y0;
f=t+subs(y2,x,t);
y3=int(f,t,x0,x)+y0;
f=t+subs(y3,x,t);
y4=int(f,t,x0,x)+y0;
ysol=-(x+1)+4*exp(x-1);
ezplot(y1,1,5)
hold
ezplot(y2,1,5)
ezplot(y3,1,5)
ezplot(y4,1,5)
ezplot(ysol,1,5)
hold off
title('dy/dx=x+y, y(1)=2, Picard Method')
text(1.5, 200,'solution y=-(x+1)+4e^{(x-1)}')
text(1.5, 150,'y_1,y_2,y_3,y_4 -> solution')
text(4.5,150,'y')
text(4.5,110,'y_4')
text(4.5,80,'y_3')
text(4.5,50,'y_2')
text(4.5,25,'y_1')
Here is the graph: