Shooting Method: Boundary Value Problems (BVPS)
Shooting Method: Boundary Value Problems (BVPS)
Shooting Method: Boundary Value Problems (BVPS)
IVP BVP
The auxiliary conditions are at one point of the The auxiliary conditions are not at one
independent variable. point of the independent variable.
x 2 x x e 2 t More difficult to solve than IVP.
x o 1, x o 2.5 x 2 x x e 2t
x o 1, x 2 1.5
Same
Different
Shooting Method
d2 y
−2 y =8 x( 9−x )
Using Shooting method, solve the equation dx 2 ; y(0 )=0 and
'
; y(9 )=0 . To solve the problem, we need initial condition y ( 0)=??
d2 y
−2 y =8 x( 9−x )
dx 2 '
; y (0)=0 and y(0)=0.............................................................(1)
dy
=z=f 1 ( x, y ,z )........... ..... .................(2)
Let, dx
Then from (1), we have
dz
=2 y+8 x(9−x ).................................(2 )
dx
y 1 = y 0 +f 0 ( x 0 , y 0 , z 0 )h
= 12
z 1=z 0 +f 2 ( x 0 , y 0 , z0 )h
= 4 +0
=4
i.e. , at
x 1=x 0 + h=0+3=3
For i=1
y 2 = y 1 +f 1 ( x 1 , y1 , z 1 )h
=12+f 1 (3 , 12 , 4 )×3
= 24
z 2=z 1 + f 2 (x 1 , y 1 , z 1 )h
= 508
. , at
x2 x1 h 3 3 6
i.e
y2 ( x2 ) 24 and z2 ( x2 ) 508
Now
For i=2
y 3 = y 2 +f 1 ( x 2 , y 2 , z2 )h
=24 +f 1 (6 , 24 , 508)×3
= 1548
i.e. , at
x 3 =9 , y 3 =1548 , which is not match with the condition y(9 )=0
.
Now we have to choose one kind of hit and trial method to choose a different value.
dy
=z=f 1 ( x , y , z )
dx and
dz
=2 y +8 x (9−x )
dx
y1 y0 f1 ( x0 , y0 , z0 )h
= −72
z 1=z 0 + f 2 ( x 0 , y 0 , z0 )h
= −24+0
= -24
i.e., at
x1 x0 h 0 3 3 , y1 ( x1 ) 72 , z1 ( x1 ) 24
For i=1
y 2 = y 1 +f 1 ( x 1 , y1 , z 1 )h
= -144
z 2=z 1 + f 2 (x 1 , y 1 , z 1 )h
= -24
For i=2
y 3 = y 2 +f 1 ( x 2 , y 2 , z2 )h
=−144 +f 1 (6 ,−144 ,−24 )×3
= -216
i xi yi zi
0 0 0 -24
1 3 -72 -24
2 6 -144 -24
5 9 -216
i.e. , at 3
x =9
, y 3 (9 )=−216 , which is more near to the given condition y(9 )=0 than the
previous assumption but not very much near value. So we have to choose different value for
y ' (0) and continue the process.
Let
q=q 0 +q 1 where
q1 =−24 , q 0=4
And
p= p0 + p1 where ,
p0 =1548 , p1 =−216
−24−4
4+ ( p−1548 )
= −216−1548
−28
4+ (0−1548 )
= −1764
= -20.57
Consider y ' (0)=−20 .57 and go through the steps of Euler method as before
Now
dy
=z=f 1 ( x , y , z )
dx and
dz
=2 y +8 x (9−x )
dx
y1 y0 f1 ( x0 , y0 , z0 )h
= -61.71
z 1=z 0 +f 2 ( x 0 , y 0 , z0 )h
= −20 .57+0
= −20 .57
For i=1
y 2 = y 1 +f 1 ( x 1 , y1 , z 1 )h
= -123.42
z 2=z 1 + f 2 (x 1 , y 1 , z 1 )h
= 41.71
For i=2
y 3 = y 2 +f 1 ( x 2 , y 2 , z2 )h
= 0.09
i xi yi zi
0 0 0 -20.57
1 3 -61.71 -20.57
2 6 -123.42 41.17
3 9 0.09
Here,
y3 (9) 0.09 y (9)
dy
ẏ= =z=f 1 ( x , y , z )
Let, dx
(2)
Then from (1) we have,
dz
= ż =4 y −4 x=f 1 ( x , y , z )
dx
(3)
Now we will solve the problem by the following Euler method with h=0.5.Euler method for (2)
and (3)
y i+1 = y i +f 1 ( x i , y i , z i ) . h
z i+1 =z i+f 2 ( xi , y i , z i ) . h
y 1 = y 0 +f 1 ( x 0 , y 0 , z 0 ) . h
y 1 =0+f 1 ( 0 ,0 , 3 ) . 5
=0+3∗. 5=1. 5
z 1=z 0 +f 2 ( x 0 , y 0 , z 0 ) . h
z 1=0+f 2 ( 0 , 0 , 3 ) . 5
=3+0=3
at
x 1=x 0 +h=0+0 .5=.5
y 1 ( x 1 ) =1. 5 and z 1 ( x 1 )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z 0 +f 2 ( x 0 , y 0 , z 0 ) h
¿ 3+ f 2 ( 1,0,3 ) .5
¿ 2.667
x 1=x 0+ h
¿ 1+.5
¿ 1.5
y 2= y 1 + f 1 ( x 1 , y 1 , z1 ) h
¿ 2.8 ≈ 2
z 2=z 1+ f 2 ( x 1 , y 1 , z 1 ) h
¿ 2.4
i xi yi zi
0 1 0 3
1 1.5 1.5 2.6
2 2.1 2.8 2.4
Problem-3 y y 0
y 0 0, y 1 1
Solution:
y 0 3
Let us assume
Now our problem becomes,
y y 0; y 0 0, y 1 1
……………………(1)
dy
y z f1 x, y , z
Let, dx ……………………..(2)
Then from (1), we have
dz
z y f 2 x, y , z
dx ………………………………(3)
Now we will solve the problem by Euler method with h=0.5
Euler method for (2) & (3);
yi 1 yi f1 xi , yi , zi h
zi 1 zi f 2 xi , yi , zi h
For i 0
y1 y0 f1 x0 , y0 , z0 h
0 f1 0, 0,3 0.5
1.5
z1 z0 f 2 x0 , y0 , z0 h
3 f 2 0, 0,3 0.5
3
i.e
x1 x0 h 0 0.5 0.5
y1 x1 1.5, z1 x1 3
For i 1
y2 y1 f1 x1 , y1 , z1 h
1.5 3 0.5
3
z2 z1 f 2 x1 , y1 , z1 h
3 f 2 0.5,1.5,3 0.5
3 1.5 0.5
3.75
i.e
x2 x1 h 0.5 0.5 1
y2 x2 3, z2 x2 3.75
Now we have to choose one kind of hit and trial method to choose a different value.
y1 y0 f1 ( x0 , y0 , z0 )h
0 f1 (0,0, 2) 0.5
0.5 2 1
=
z 1=z 0 + f 2 ( x 0 , y 0 , z0 )h
= 20
=2
i.e., at
x1 x0 h 0.5 , y1 ( x1 ) 1 , z1 ( x1 ) 2
For i=1
y 2 = y 1 +f 1 ( x 1 , y1 , z 1 )h
1 f1 (0.5,1, 2) 0.5
= 1 0.5 2
=2
z 2=z 1 + f 2 (x 1 , y 1 , z 1 )h
2 f 2 (0.5,1, 2) 0.5
2 0.5 2.5
x2 1 , y2 (1) 2 , which is more near to the given condition y (1) 1 than the previous
i.e. , at
'
assumption. So we have to choose different value for y (0) and continue the process.
Now we can use iterative method
q1 2 , q0 3
And
p= p0 + p1 where ,
p0 3 p1 2
,
Now the straight line can be expressed as ;
q 1−q0
q=q 0 + ( p− p0 )
p 1− p 0
23
3 (1 3)
= 23
=1
dy
=z=f 1 ( x , y , z )
dx and
dz
z y f 2 x, y , z
dx
y1 y0 f1 ( x0 , y0 , z0 )h
0 f1 (0,0,1) 0.5
= 0.5
z 1=z 0 + f 2 ( x 0 , y 0 , z0 )h
= 1 0
=1
For i=1
y 2 = y 1 +f 1 ( x 1 , y1 , z 1 )h
0.5 f1 (0.5, 0.5,1) 0.5
=1
z 2=z 1 + f 2 (x 1 , y 1 , z 1 )h
= 1.25
So the solution Table is :
x y
0 0
0.5 0.5
1 1