Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Ma2002 1.20 rm
1. Numerical solution of ordinary and
partial dierential Equations
Module 20: Shooting methods
Dr.rer.nat. Narni Nageswara Rao
£
1 Examples
Example: Using shooting method solve the BVP
yHH = y + 1; 0 t 1
y(0) = 0; y(1) = e 1
use the Euler-Cauchy method with h = 0:25 to solve the resulting system of
2. rst order IVPs.
Solution: The above problem can be transfered into two IVPs by Linear
shooting method
yHH
1 = y1 + 1
y1(0) = 0
yH
1(0) = 0
yHH
2 = 1
y2(0) = 0
yH
2(0) = 1
we will solve these IVP by using Cauchy-Euler scheme.
£nnrao maths@yahoo.co.in
1
3. Consider
Y H
1 = Y2
Y HH
1 = Y H
2
Y H
1 = Y2
Y H
2 = Y1 + 1
IVP's are
Y (0) = 0;Y2(0) = Y H
1(0) = 0
Y1
Y2
=
Y2
Y1 + 1
;
Y10
Y20
0
0
Here
f1 = Y2; f2 = Y1 + 1
Yj+1 = Yj +
1
2
(K1 + K2)
K1 = hf(tj;yj); K2 = hf(tj + h;yj + k1)
)
Y1j+1
Y2j+1
=
Yij
Y2j
+
h
2
f1j
f2j
+
h
2
Y2j + hf2j
Y1j + hf1j
)
Y1j+1
Y2j+1
=
Yij
Y2j
+
h
2
Y2j
Y1j+1
+
h
2
Y2j + h(Y1j + 1)
Y1j + 1 + h(Y2j)
=
1 + h2
2 h
h 1 + h2
2
Yij
Y2j
+
h2
2
h
using h = 0:25
Y1j+1
Y2j+1
=
1:03125 0:25
0:25 1:03125
Yij
Y2j
+
0:03125
0:25
) with Y10 = 0;Y20 = 0 For j = 0;1;2;3 we get
y1(0:25) = Y11 = 0:03125;Y21 = 0:25
y1(0:5) = Y12 = 0:12598;Y22 = 0:51563
y1(0:75) = Y13 = 0:29007;Y23 = 0:81324
y1(1:0) = Y14 = 0:53369;Y24 = 1:16117
Let us consider the second system
yHH
2 = y2; y2(0) = 0; yH
2(0) = 1
2
4. y2 = c1et + c2e t; y2(0) = 0 A c1 + c2 = 0
yH
2(0) = c1 c2 = 1 A c1 =
1
2
;c2 = 1
2
) y2(t) =
1
2
(et e t)
) y2(0:25) = 0:252612; y2(0:5) = 0:521095305; y2(0:75) = 0:822316731;
y2(1) = 1:184591828.
) y(t) = y1(t) +
2 y1(b)
y2(b)
y2(t)
y(0:25) = y1(0:25) +
e 1 0:53369
1:175201
0:252612
= 0:03125 + 0:254630578
= 0:285880578
y(0:5) = y1(0:5) +
(e 1 0:53369)
1:175201
0:521095305
= 0:12598 + (1:007990827)0:521095305
= 0:651239287
y(0:75) = 0:29007 + (1:007990827)0:822316731
= 1:118957723
y(1) = 0:53369 + (1:184591828)1
= 1:7182818
More accurate results can be obtained by using smaller step length h.
tj Exact: y(tj) Numerical: yj
0.25 0.28403 0.28588
0.5 0.64872 0.65123
0.75 1.11700 1.11895
1.0 1.71828 1.71828
Table 1: Solution of the Example
3
5. 2 The shooting method for Nonlinear prob-
lems
The shooting technique for the nonlinear second-order boundary-value prob-
lem
yHH = f(t;y;yH); a t b;y(a) =
1;y(b) =
2 (1)
is similar to the linear technique, except that the solution to a nonlinear
problem can not be expressed as a linear combination of the solutions to two
initial-value problems. Insted, we approximate the solution to the boundary-
value problem by using the solutions to a sequence of initial-value problems
involving a parameter . These problems have the form
yHH = f(t;y;yH); a t b;y(a) =
1;yH(a) = (2)
we do this by choosing the parameters = k in a manner to ensure that
lim
k3I
y(b;k) = y(b) =
2
where y(t;k) denotes the solution to the IVP (2) with = k, and y(t)
denotes the solution to the B.V.P (1).
This technique is called a shooting method, by analogy to the procedure
of
6. ring objects at a stationary target (see Figure 1).
We start with a parameter 0 that determines the initial elevation at
which the object is
7. red from the point (a;
1) and along the curve described
by the solution to the IVP:
yHH = f(t;y;yH); a t b;y(a) =
1;yH(a) = 0
If y(b;0) is not suciently close to
2, we correct our approximation by
choosing elevations 1, 2 and so on, until y(b;k) is suciently close to
hitting
2.(see Figure 2).
To determine the parameters k, suppose a BVP of the form (1) satis
8. es
the hypothesis of theorem (1)(module 19). If y(t;) denotes the solution to
the IVP (2), we next determine with
y(b;)
2 = 0 (3)
This is a nonlinear equation, so a number of methods are available.
4
9. y
a b t
y(t;0)
(b;y(b;0))
Slope 0
y(b;0)
2
1
(a;
1)
Figure 1: Nonlinear shooting method.
To use the secant method to solve the poroblem, we need to choose initial
approximations 0 and 1, and then generate the remainig terms of the
sequence by
k = k 1 (y(b;k 1)
2)(k 1 k 2)
y(b;k 1) y(b;k 2)
; k = 1;2;¡¡¡
To use the more powerful Newton's method to generate the sequence fkg,
only one initial approximation 0 is needed. However the iteration has the
form
k = k 1 y(b;k 1)
2
dy
d(b;k 1)
(4)
and it requires the knowledge of dy
d(b;k 1). This presents a diculty since
an explicit representation for y(b;) is not known, we know only the values
y(b;0), y(b;1);¡¡¡ ;y(b;k 1).
Suppose we rewrite the initial value problem (2), emphasizing that the
solution depends on both t and the parameter .
yHH(t;) = f(t;y(t;);yH(t;)); a t b
y(a;) =
1;yH(a;) = (5)
5
11. rst take the partial
derivative of (5) w.r.t. . This implies that
@yHH
@
(t;) =
@f
@
(t;y(t;);yH(t;))
=
@f
@t
(t;y(t;);yH(t;))
@t
@
+
@f
@y
(t;y(t;);yH(t;))
@y
@
(t;)
+
@f
@yH(t;y(t;);yH(t;))
@yH
@
(t;)
Since t and are independent @t
@ = 0 and
@yHH
@
(t;) =
@f
@y
(t;y(t;);yH(t;))
@y
@
(t;)
+
@f
@yH(t;y(t;);yH(t;))
@yH
@
(t;) (6)
for a t b. The initial conditions give
@y
@
(a;) = 0 and
@yH
@
(a;) = 1
6
12. If we simplify the notation by using z(t;) to denote @y
@(t;) and assuming
that the order of dierentiation of t and can be reversed, (6) with the initial
conditions becomes the initial-value problem
zHH(t;) =
@f
@y
(t;y;yH)z(t;) +
@f
@yH(t;y;yH)zH(t;) a t b;
z(a;) = 0; zH(a;) = 1 (7)
) Newton's method requires that two IVPs be solved for each iteration, (5)
and (7). Then from Equation(4)
k = k 1 y(b;k 1)
2
z(b;k 1)
(8)
Example: Consider the boundary value problem
yHH =
1
8
(32 + 2t3 yyH);1 t 3;y(1) = 17;y(3) =
43
3
which has exact solution y(t) = t2 + 16=t
Solution:
yHH =
1
8
(32 + 2t3 yyH); 1 t 3;y(1) = 17;yH(1) = k
and
zHH =
@f
@y
z +
@f
@yHzH = 1
8
(yHz + yzH) 1 t 3
z(1) = 0;zH(1) = 1
Take initial guess as
0 =
2
1
b a
=
43
3 17
3 1
=
43 51
3:2
= 8
6
= 4
3
at each step in the iteration. If the stopping technique requires
jy(k) y(3)j 10 5
Then we need four iterations and 4 = 14:000203. The results obtained for
this value of are in the Table 2.
7