Professional Documents
Culture Documents
http://numericalmethods.eng.usf.edu
Transforming Numerical Methods Education for STEM
Undergraduates
3/1/2020 http://numericalmethods.eng.usf.edu 1
Shooting Method
http://numericalmethods.eng.usf.edu
Shooting Method
The shooting method uses the methods used in solving initial value problems.
This is done by assuming initial values that would have been given if the
ordinary differential equation were a initial value problem. The boundary
value obtained is compared with the actual boundary value. Using trial and
error or some scientific approach, one tries to get as close to the boundary
value as possible.
3 http://numericalmethods.eng.usf.edu
Example
d 2u 1 du u
2
2 0,
dr r dr r r
u 5 0.0038731,
u 8 0.0030770
b
a
Let
du
w Where a=5
dr and b=8
Then
dw 1 u
w 2 0
dr r r
4 http://numericalmethods.eng.usf.edu
Solution
Two first order differential equations are given as
w, u 5 0.0038371
du
dr
w5
du
5 u 8 u 5 0.00026538
dr 85
To set up initial value problem
w f1 r , u, w, u 5 0.0038371
du
dr
ui 1 ui f1ri , ui , wi h
wi 1 wi f 2 ri , ui , wi h
85
h 0.75
4
6 http://numericalmethods.eng.usf.edu
Solution Cont
For i 0, r0 5, u0 0.0038371, w0 0.00026538
u1 u0 f1 r0 , u0 , w0 h
0.0038371 f1 5,0.0038371,0.000265380.75
0.0038371 0.000265380.75
0.0036741
w1 w0 f 2 r0 , u0 , w0 h
0.00026538 f 2 (5,0.0038371,0.00026538)0.75
0.00026538 0.0038371
0.00026538 0.75
2
5 5
0.00010938
7 http://numericalmethods.eng.usf.edu
Solution Cont
For i 1, r1 r0 h 5 0.75 5.75, u1 0.0036741, w1 0.00010940
u2 u1 f1 r1 , u1 , w1 h
0.0036741 f1 5.75,0.0036741,0.000109380.75
0.0036741 0.000109380.75
0.0035920
w2 w1 f 2 r1 , u1 , w1 h
0.00010938 f 2 5.75,0.0036741,0.000109380.75
0.00010938 0.000130150.75
0.000011769
8 http://numericalmethods.eng.usf.edu
Solution Cont
For i 2, r2 r1 h 5.75 0.75 6.5 u2 0.0035920, w2 0.000011785
u3 u2 f1 r2 , u2 , w2 h
0.0035920 f1 6.5,0.0035920,0.0000117690.75
0.0035920 0.0000117690.75
0.0035832
w3 w2 f 2 r2 , u2 , w2 h
0.000011769 f 2 6.5,0.0035920,0.0000117690.75
0.000011769 0.0000868290.75
0.000053352
9 http://numericalmethods.eng.usf.edu
Solution Cont
For i 3, r3 r2 h 6.50 0.75 7.25 u3 0.0035832, w3 0.000053332
u4 u3 f1 r3 , u3 , w3 h
0.0035832 f1 7.25,0.0035832,0.0000533520.75
0.0035832 0.0000533520.75
0.0036232
w4 w3 f 2 r3 , u3 , w3 h
0.000011785 f 2 5.75,0.0035832,0.0000533520.75
0.000053352 0.0000608110.75
0.000098961
So at r r4 r3 h 7.25 0.75 8
u8 u4 0.0036232
10 http://numericalmethods.eng.usf.edu
Solution Cont
Let us assume a new value for
du
5
dr
w5 2
du
5 2 u 8 u 5 2 0.00026538 0.00053076
dr 85
u8 u4 0.0029665"
u8 u4 0.0030770
11 http://numericalmethods.eng.usf.edu
Solution Cont
Using linear interpolation on the obtained data for the two assumed values of
du
5 we get
dr
u8 0.00030770
du
5 0.00053076 0.00026538 0.0030770 0.0036232 0.00026538
dr 0.0029645 0.0036232
0.00048611
Using h 0.75 and repeating the Euler’s method with w(5) 0.00048611
u8 u4 0.0030769
12 http://numericalmethods.eng.usf.edu
Solution Cont
till one gets close to the actual value of u8 which gives you,
u1 u5 0.0038731
u5.75 u2 0.0035085
u6.50 u3 0.0032858
u7.25 u4 0.0031518
u8.00 u5 0.0030770
13 http://numericalmethods.eng.usf.edu
Comparisons of different initial
guesses
4.0E-03
du/dr = -0.00026538
3.8E-03
Radial Displacement, u (in)
3.6E-03
Exact
3.4E-03
du/d r= -0.00048611
3.2E-03
du/dr = -0.00053076
3.0E-03
5 6 7 8
Radial Location, r (in)
14 http://numericalmethods.eng.usf.edu
Comparison of Euler and Runge-
Kutta Results with exact results
Table 1 Comparison of Euler and Runge-Kutta results with exact results.
Runge-Kutta
r (in) Exact (in) Euler (in) t % (in)
t %
5 3.8731×10−3 3.8731×10−3 0.0000 3.8731×10−3 0.0000
5.75 3.5567×10−3 3.5085×10−3 1.3731 3.5554×10−3 3.5824×10−2
6.5 3.3366×10−3 3.2858×10−3 1.5482 3.3341×10−3 7.4037×10−2
7.25 3.1829×10−3 3.1518×10−3 9.8967×10−1 3.1792×10−3 1.1612×10−1
8 3.0770×10−3 3.0770×10−3 1.9500×10−3 3.0723×10−3 1.5168×10−1
15 http://numericalmethods.eng.usf.edu
Additional Resources
For all resources on this topic such as digital audiovisual
lectures, primers, textbook chapters, multiple-choice
tests, worksheets in MATLAB, MATHEMATICA, MathCad
and MAPLE, blogs, related physical problems, please
visit
http://numericalmethods.eng.usf.edu/topics/shooting_
method.html
THE END
http://numericalmethods.eng.usf.edu