Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Picard's Method (Ch.

1, Pro ject B)

PICARD'S METHOD (Ch. 1, Project B)


> restart
> with( plots ):
> with( DEtools ):

Objectives:

to introduce Picard's method in a manner accessible to students


to develop a Maple implementation of Picard's method, picard
to use picard to motivate discussion of the existence theory for IVPs

New Maple Commands:


unapply { converts a Maple expression into a Maple function with se-
lected arguments

Background
First-order initial value problems of the form ( ) = ( y
0
x ( )), ( 0) =
f x y x y x y0 can be
rewritten as an integral equation
Z x
( )=
y x y0 + ( ( ))
f t y t dt:
x0

This integral formulation can be used to construct a sequence of approximate solutions to


the IVP. The basic idea is that given an initial guess of the approximate solution to the
IVP, say 0( ), an in nite sequence of functions, f n( )g, is constructed according to the
 x  x

rule Zx
n+1 ( ) = 0 +
x y ( n( )) f t  t dt:
x0

That is, the th approximation is inserted into the right-hand side of the integral equation
n

in place of the exact solution ( ) and used to compute the ( + 1)st element of the
y x n

sequence. This process is called Picard's Method.


One of the main applications of Picard's Method is in the proof of the existence and
uniqueness results for rst-order initial value problems. This proof will not be considered
in this report { hey, we have to leave something for next year's students to do. This report
focuses on gaining an understanding of Picard's Method through the consideration of a
few examples.
2
Example 1: Use Picard's Method with 0( ) = 1 to obtain the next four successive
 x

approximations of the solution to ( ) = ( ), (0) = 1.


y
0
x y x y

We start with the given initial approximation to the solution.


> phi0] := 1
:= 1 0

and compute the next approximation according to the integral formula


> phi1] := 1 + int( phi0](x), t=0..x )
:= 1 + 1 x

The same process is used to compute all subsequent approximations. However, in order
to keep the same syntax in the integral, it's necessary to ensure that each n is a Maple 

function. For this the unapply function is needed. Thus, the rst approximation is
> phi1] := unapply( phi1], x )
:= ! 1 + 1 x x

and the second approximation to the solution can be obtained by repeating this process
> phi2] := 1 + int( phi1](t), t=0..x ):
> phi2] := unapply( phi2], x )

:= ! 1 + + 12 2
2 x x x

For each of the last two approximate solutions, the two commands will be combined into
a single Maple command
> phi3] := unapply( 1 + int( phi2](t), t=0..x ), x )

:= ! 1+x+
1 3
+ 21 2
3 x
6 x x

> phi4] := unapply( 1 + int( phi3](t), t=0..x ), x )

:= ! 1 + + 24 1 4+ 1 2+ 1 3
4 x
2x
6 x x x

The pattern to the sequence of approximate solutions is obvious. Each iterate adds one
new term. The new term for n ( ) is n!1 n. Thus, for each  0,
 x x n

X
n n
n x ( )= x

n ! :

k=0

These functions are the partial sums of the Maclaurin series for x . e

From our knowledge of power series, we know that these partial sums converge to
the exponential function for all real numbers . This convergence can be demonstrated
x

graphically
3
> plot( { exp, phii] $ i=0..4 }, 0..3,
> title=`Picard Iterates and Limit for y'=y, y(0)=1` )

Picard Iterates and Limit for y’=y, y(0)=1

20

18

16

14

12

10

0 0.5 1 1.5 2 2.5 3

To conclude this example, we note that the exponential function is a solution to the
initial value problem.

Example 2: Use Picard's Method with 0( ) = 0 to obtain the next three successive
 x

approximations of the solution to the nonlinear problem ( ) = 2 ; ( ( ))2, (0) = 0.


y
0
x x y x y

These approximations could be obtained exactly as in Example 1. However, it will


ultimately be more ecient to create a Maple implementation of Picard's Method. The
basic ingredients for Picard's Method are the function, , on the right-hand side of the
f

ODE, the initial condition, and the initial/previous approximate solution. Here is our
version of the method
> picard := proc(f, init, phi)
> local x0, y0
> x0 := init1]
> y0 := init2]
> unapply( y0 + int( f(t,phi(t)), t=x0..x ), x )
> end:

Note that the initial condition, init, is expected to be the ordered pair  0 0] and f x y

and phi are assumed to be Maple functions. The output from picard is the next approxi-
mate solution, as a Maple function (so that, e.g., the output is suitable for immediate use
in another call to picard.
To use picard to provide the requested information in this example, let
> phi0] := 0
0 := 0
> f := (x,y) -> 2*x-y^2
f := ( x y )!2 x ; y2

> phi1] := picard( f, 0,0], phi0] )


4

:= ( ! )2 1 x x

(This is simply a fancy way of saying that 2 ( ) = 2.)  x x

> phi2] := picard( f, 0,0], phi1] )

:= ! x2 ;
1 5
2 x
5 x

> phi3] := picard( f, 0,0], phi2] )

:= ! 2 ; 15 5 + 20
3 x x
1 8 ; 1 11
275
x x x

The problem simply asks for a plot of these approximate solutions on the interval 0   x

1. The picture is a little nicer if a few more iterates are included. The computation of the
next two iterates can be done in a simple for ... do ... od command. For example,
> for n from 0 to 4 do
> phin+1] := picard( f, 0,0], phin] )
> od
> n := 'n':
1 x ! x
2
:= (
)
1 5
2 := !
2
;

5 x x x

1 1 1 11
3 := ! +
2 5 8
; ;
 x
5 x
20 x
275 x x

3 87 1 1 7 11 ; 1 5 + 1 8
4 := ! + 1540 14 ; 374000 17 + 55000 20 ; 1739375 23 ; 550
2
 x x x x x
5 20x x x x

236231 6915599 194877


5 := ! + 5298832000000 +
2 32 35 38
;
 x x
1734042772000000
x
692159930000000 x x

7781 1 1
533431525000000 + 2104643750000 ; 142194993359375
41 44 47
; x x x

659 20 ; 1 5 + 1 14 ; 1769 17 + 1 8 ; 7 11
+ 5236000 x
5 308
x
2618000
x
20 550 x x x

1363623 8751 384503


3361446550000 ; 413971250 + 123008600000
29 23 26
; x x x

The convergence of these polynomials is not as obvious as the rst example. Even from
the graph it's dicult to determine the interval on which this integral exists. Including the
direction eld in the plot shows precisely how these approximate solutions must behave.
Here is the graph that provides the most information. (The plots on 0 1] do not show 

too much dierence between the successive approximations. Doubling the interval to 0 2] 

shows a little more of the interesting features of these solutions.


> P1 := plot( { phii] $ i=0..6 }, 0..2, color=GREEN, thickness=3 ):
> P2 := DEplot( diff( y(x),x ) = f(x,y(x)), x,y], x=0..2, { 0,0] },
> arrows=THIN ):
5
> display( { P1, P2 },
> title=`Picard Iterates and Direction Field: y'=2x-y^2, y(0)=0` )

Picard Iterates and Direction Field: y’=2x-y^2, y(0)=0

1.8

1.6

1.4

1.2

1
y

0.8

0.6

0.4

0.2

00 0.5 1 1.5 2
x

Example 3: In previous work it has been demonstrated that ( ) = 3( ( ))2=3, (2) =


y
0
x y x y

0 does not have a unique solution. Show that Picard's Method, starting with 0( ) = 0  x

converges to ( ) = 0, whereas Picard's method beginning with 0( ) = ; 2 converges


y x  x x

to the second solution ( ) = ( ; 2)3 .


y x x

Each of these can be easily computed using picard. But, the rst part is so simple,
it's really a waste of time and energy to use picard or Maple. The claim is that n ( ) = 0  x

for all and for all integers . Thus, these approximate solutions converge to the zero
x n

solution.
The successive approximations generated when the initial approximation to the solu-
tion is
> phi0] := x -> x-2
:= ! ; 2
0 x x

can be computed using a slight variant of picard.


The modi cation is needed because of the rational powers that are involved in the
right-hand side of the ODE
> f := (x,y) -> 3*y^(2/3)
:= ( ) ! 3 2=3
f x y y

and Maple's inability to choose the branch that leads to the real-valued result. The
combine function can be used to force some of the simpli cations that Maple does not
want to make automatically. The modi ed version of picard is
> picard2 := proc(f, init, phi)
> local x0, y0
> x0 := init1]
> y0 := init2]
> unapply( y0 + int( combine( f(t,phi(t) ), power ), t=x0..x ), x )
> end:

The rst two approximates are


6
> phi1] := picard2( f, 2,0], phi0] )

:= 9
1 x !
5( x ; 2 )5=3

> phi2] := picard2( f, 2,0], phi1] )

:= !
27 ( ; 2 )19=9 92=3 51=3
2 x
95 x

> phi3] := picard2( f, 2,0], phi2] )


Zx
:= x !
3 27 95 ( 2 )19=9 92=3 51=32=3
2=3 1=3

t;
3
2 95 dt

So, even the modi ed version of picard does not work for all cases. However, it is obvious
that the rst three approximates all have the form
n x ( ) = n( c x ; 2)rn

for some constants n and n . Explicit formulae for n and n are not apparent from the
c r c r

rst three approximate solutions. An alternate approach to the problem of nding these
sequences and, hopefully, limn n , is to obtain a recurrence relation between successive
!1 

terms in each sequence. To determine the appropriate recurrence relations, suppose the
n
th iterate is
> phin] := x -> c*(x-2)^r
n := x ! c ( x ; 2 )r
Then, the next iterate will be
> phin+1] := picard2( f, 2,0], phin] )

:= x !
2=3 t ;
lim 9
c (t; 2 ) ((
r 2=3 2) ) +9 c
2=3 ( x ; 2)(( x ; 2 )r )2=3
n+1
t!2+ r 3+2 3+2 r

> PHIn+1] := combine( phin+1](x), power )

:= lim 9 ( 3 +22) + 9 ( 3;+2 2)


2=3 x ; ( 1+2=3 r ) 2=3 ( 1+2=3 r )
PHIn+1
t!2+
c

r
c t

r
Maple is hesitant about evaluating the limit because  0 has not been excluded. r

However, examination of the rst three iterates together with the above result indicates
that the exponents will always be positive.
> assume( rr>0 )

Then, the ( + 1)st Picard is


n

> eval( subs( r=rr, PHIn+1] ) )

9 ( 3 +22)rr ~
c
2=3 x ; ( 1+2=3 rr ~ )

This provides a recurrence equation for n: r

> REr := r(n+1) = 1+2/3*r(n)

REr := r( + 1 ) = 1 + 32 r( )
n n

The solution to this recurrence equation, with initial condition r0 = 1, is found to be


7
> SOLNr := rsolve( { REr, r(0)=1 },
 { r(n) } )
 n 
SOLNr := r( ) = ;2 23 n +3
Thus, it is now clear that limn !1 r n = 3. The recurrence equation for the coecients cn

> REc := c(n+1) = 9/(3+2*r(n))*c(n)^(2/3)

REc := c( + 1 ) = 9 3 c(+ 2 )r( ) n


2=3
n
n

with initial condition 0 = 1, is not so easily solved (by hand or by Maple). It is,
c

nonetheless, still possible to determine the limiting behavior of n. Note that c

n+1
2=3
= 3 +92 ! 1
c

n c n r

as ! 1. Assuming that n converges to, say , then 1=3 = 1 and so = 1, since


n c c

c

c


these coecients are real-valued.


This completes the proof that this sequence of Picard iterates converges, with a limit
of ( ) = limn
y t !1 n ( ) = ( ; 2) . It is a simple matter to verify that this function
 t
3t

is a solution to the IVP. As a result, this IVP does not have a unique solution. (Note
that this conclusion is consistent with the existence and uniqueness theory y ( ) is not f x y

continuous at = 0.
y

Example 4: Use Picard's method with 0( ) = 1 to compute the next six successive
 x

approximations of the solution to the nonlinear problem ( ) = 1 + ( )2, (0) = 1 2. y


0
x y x y =

Create plots of the each Picard iterate superimposed on the direction eld. What can you
say about the existence of a solution to this IVP?
The data required by picard is given as in the previous examples.
> f := (x,y) -> 1+y^2
f := ( x y )! 1+ y
2

> phi0] := 1
:= 1 0

The computation of the Picard iterates is straightforward. Only the rst four iterates are
displayed, for the sake of saving a few pages of output.
> for n from 0 to 5 do
> phin+1] := picard( f, 0,1/2], phin] )
> od:
> phi1](t)
1 +2
2 t

> phi2](t)
1 +5 + 2+4 3
2 4 3 t t t
8
> phi3](t)
1 41 3 5 5 2 16 7 13 5 23 4 4
2 + 48 + 4 + 8 + 63 + 15 + 24 + 9
6
t t t t t t t

> phi4](t)

1 + 24121 9 + 5 + 5 2 + 1808 13 + 35 3 + 10349 10 + 29 4 + 10457 7 + 256 15


2 60480 t
4 8 t
36855
t
48 37800
t
48 16128
t
59535 t t t t

223 4157 3208 64 5491 11


+ 320 5 + 5760 6 + 17325 11 + 3969 14 + 10752 8 + 105 12
t t t t t t

The convergence of the constant, linear, and quadratic terms are apparent from these
results. One additional term seems to be correct after each Picard iterate, but the total
number of terms doubles with each iteration.
> P1 := DEplot( diff( y(x), x ) = f(x,y(x)), x,y], x=0..2, {0,1/2]},
> y=0..10, arrows=THIN ):
> P2 := plot( { phii] $ i=0..6 }, 0..2, y=0..10 ):
> display( { P1, P2 },
> title=`Direction Field and Picard Iterates: y'=1+y^2, y(0)=1/2` )

Direction Field and Picard Iterates: y’=1+y^2, y(0)=1/2

10

00 0.5 1 1.5 2
x

While it is not practical to print an animation, the convergence of the PIcard iterates
to the solution of this IVP is quite clear.
> for i from 0 to 6 do
> p.i := display( { P1, plot( phii], 0..2, y=0..10 ) } )
> od:
> i := 'i':
> display(  seq( p.i, i=0..6 ) ], insequence=true,
> title=`Direction Field and Picard Iterates: y'=1+y^2, y(0)=1/2` )

The graphical information also suggests that the solution does not exist for all 0. x >

The solution seems to have a vertical asymptote, = , for some slightly larger than
x x

x


1. In fact, this problem is easy to solve by hand. The exact solution is


( ) = tan( + arctan(1 2))
y x x =

which has a vertical asymptote at = x x



where
9
> xSTAR := Pi/2-arctan(1/2)
 
xSTAR := 12  ; arctan
1
2
> evalf( xSTAR )
1 107148718
:

CONCLUSION
In this project we have developed a Maple implementation of Picard's method and
illustrated the use of this procedure for three dierent initial value problems. These ex-
amples have demonstrated the convergence of Picard iterates to solutions of the IVP. The
third example is most interesting in that even though the individual successive approxima-
tions could not be determined explicitly, the limit of the sequence could still be resolved.
The fourth example is an additional problem that is selected to illustrate the convergence
of the Picard iterates when the solution exists on only a nite interval.

You might also like