Professional Documents
Culture Documents
Research Article
Analysis of Reliable Solutions to the Boundary Value Problems by
Using Shooting Method
Received 28 January 2022; Revised 1 July 2022; Accepted 4 July 2022; Published 10 August 2022
Copyright © 2022 Mohammad Asif Arefin et al. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is
properly cited.
This research aims to use the shooting method (SM) to find numerical solutions to the boundary value problems of ordinary
differential equations (ODEs). Applied mathematics, theoretical physics, engineering, control, and optimization theory all have
two-point boundary value problems. If the two-point boundary value problem cannot be solved analytically, numerical ap-
proaches must be used. The scenario in the two-point boundary value issue for a single second-order differential equation with
prescribed initial and final values of the solution gives rise to shooting method. Firstly, the method is discussed, and some
boundary value problems of ODEs are solved by using the proposed method. Obtained results are compared with the exact
solution for the validation of the proposed method and represented both in graphical and tabular form. It has been found that the
convergence rate of the shooting method to the exact solution is so high. As a finding of this research, it has been determined that
the shooting method produces the best-fit numerical results of boundary value problems.
shooting method for extreme nonlinear optics. The authors (1) The provided BVPs is split into two initial value
have discussed some numerical methods for solving the problems (IVPs)
initial value problems in [12–14]. Ahmad and Charan [15] (2) Taylor’s series, Runge–Kutta method, or any other
make an attempt to compare the finite difference approach approach may be used to solve these two IVPs
to the shooting method. In [16], the authors described the
(3) The required solution of the given BVP is a com-
sequential implementation of the linear shooting approach.
bination of these two solutions
Lijun Zhang et al. [17] also use the shooting method for
solving their proposed governing equations. Al-Mdallal Reduction to two IVPs [2]: Consider the function f of
et al. [18] describe the collocation-shooting method for the boundary value problem
solving fractional boundary value problems. Sung N. [19] y″ � f x, y, y′ , for a ≤ x ≤ b,
describes the nonlinear shooting method for two-point
boundary value problems. The coupled nonlinear dimen- with y(a) � α, (1)
sionless ordinary differential equations have been solved y(b) � β,
numerically with the help of the shooting method [20]. It
has been observed that many contemporary problems are is continuous on the set, D � (x, y, y′ ) : for a ≤ x ≤ b, with −
effectively solved by this proposed method. As a conse- ∞ ≤ y ≤ + ∞}, −∞ ≤ y′ ≤ + ∞ and that partial derivatives
quence, Binfeng et al. [21] solve the hypersensitive optimal fy and fy′ are also continuous on D. If
control problems by using a high-precision single shooting
method. Ali Ümit Keskin [22] discusses the shooting (1) fy (x, y, y′ ) > 0 for all (x, y, y′ ) ∈ D, and
method for the solution of one-dimensional BVPs. S (2) A constant M exists, with |fy′(x, y, y′ )| ≤ M, for all
Abbasbandy and M. Hajiketabi [23] introduce a new Lie- (x, y, y′ ) ∈ D
group shooting method for solving nonlinear boundary
Then, the BVP has a unique solution. The differential
value problems.
equation f″ (x, y, y′ ) is linear when the functions
As a consequence, the foremost objective of this research
p(x), q(x), and r(x) exist with
is to solve two-point boundary value problems using a
f (x, y, y′ ) � p(x)y′ + q(x)y + r(x) [24].
simple and proficient shooting method. In this article three ′ This type of problems occurs frequently, and in this
BVPs of the ordinary differential equation are considered,
stage, it can be simplified. Let linear BVP be
find out the solution of these BVPs by the shooting method
y″ � p(x)y′ + q(x)y + r(x) for a ≤ x ≤ b, with y(a) �
and finally compare them with the exact solution.
α, y(b) � β, satisfies.
The remaining part of the paper will be structured as, in
Section 2, we have described the proposed method. Nu- (1) p(x), q(x), and r(x) are continuous on [a, b]
merical analysis and graphical representation of the pro- (2) q(x) > 0 is continuous on [a, b]
posed method are presented in Section 3. In Section 4,
physical interpretation and result discussions are given. The Then, the BVP has a unique solution.
conclusion is presented in the last section. To estimate the unique solution to this linear problem,
we first investigate initial value problems.
y″ � p(x)y′ + q(x)y + r(x),
2. Description of the Method
for a ≤ x ≤ b, (2)
The shooting approach reduces the boundary value issue to
identifying the starting conditions that yield a root by with y(a) � α, y′ (a) � 0,
viewing boundary conditions as a multivariate function of
initial conditions at some point. The name of the shooting
technique comes from a comparison to target shooting. We y″ � p(x)y′ + q(x)y + r(x),
shoot the target and examine where it hits the target; based
on the inaccuracies, we can modify our aim and shoot again y(a) � 0, (3)
in the hopes of hitting the target near to the mark. The
y′ (a) � 1.
shooting methods are designed to convert ODE boundary
value issues into similar initial value problems, which may
then be solved using appropriate methods. The shooting Two problems, have a solution, which is unique. Suppose
method is an iterative method that is well suited to solving y1 (x) stands for the solution of (2). and suppose y2 (x)
any kind of BVPs of ODEs, regardless of the boundary stands for the solution of equation (3).
conditions form. The shooting method is a computational Consider that y2 (b) ≠ 0
method for solving two points boundary value problems of
linear ODEs where the problem must be reduced as a system β − y1 (b)
Define, y(x) � y1 (x) + y (x). (4)
of an initial value problem [11]. We shoot trajectories in y2 (b) 2
different directions before we find one, that has the desired
boundary value. Then, y(x) will be the solution to the linear boundary
There are three stages to the linear shooting method: value problem of equation (4).
Mathematical Problems in Engineering 3
Table 1: Results of consecutive four iterations along with exact solution and error estimation for numerical problem-1.
Approximate solution
Xi Exact value Error
Iteration 1 Iteration 2 Iteration 3 Iteration 4
0.1 −0.2844973 −0.3081503 −0.3081503 −0.3081503 −0.3084846 0.0003343
0.2 −0.2628842 −0.3131762 −0.3131762 −0.3131762 −0.3138869 0.0007107
0.3 −0.2342192 −0.3150113 −0.3150113 −0.3150113 −0.3161530 0.0011417
0.4 −0.1974160 −0.3136180 −0.3136180 −0.3136180 −0.3152601 0.0016421
0.5 −0.1512034 −0.3089876 −0.3089876 −0.3089876 −0.3112173 0.0022297
0.6 −0.0940749 −0.3011389 −0.3011389 −0.3011389 −0.3040649 0.0029260
0.7 −0.0242281 −0.2901171 −0.2901171 −0.2901171 −0.2938744 0.0037572
0.8 0.0605100 −0.2759925 −0.2759925 −0.2759925 −0.2807476 0.0047551
0.9 0.1627746 −0.2588576 −0.2588576 −0.2588576 −0.2648157 0.0059580
1.0 0.2857734 −0.2388248 −0.2388248 −0.2388248 −0.2462378 0.0074130
1.1 0.4334233 −0.2160224 −0.2160224 −0.2160224 −0.2251996 0.0091772
1.2 0.6105155 0.1905909 −0.1905909 −0.1905909 −0.2019112 0.0113203
1.3 0.8229173 −0.1626782 −0.1626782 −0.1626782 −0.1766055 0.0139273
1.4 1.0778193 −0.1324332 −0.1324332 −0.1324332 −0.1495351 0.0171019
1.5 1.3840353 −0.1000000 −0.1000000 −0.1000000 −0.1209707 0.0209707
Table 2: Results of consecutive four iterations along with exact solution and error estimation for numerical problem-2.
Approximate solution
Xi Exact value Error
Iteration 1 Iteration 2 Iteration 3 Iteration 4
0.111 −0.0123213 0.084223 0.084223 0.084223 0.0933995 0.0091764
0.222 −0.0492967 0.1449828 0.1449828 0.1449828 0.1548878 0.0099051
0.333 −0.1109842 0.1834265 0.1834265 0.1834265 0.1889143 0.0054877
0.444 −0.1975294 0.2006438 0.2006438 0.2006438 0.1993452 0.0012985
0.555 −0.3092021 0.1976444 0.1976444 0.1976444 0.1895378 0.0081066
0.666 −0.4464295 0.1753415 0.1753415 0.1753415 0.1624043 0.0129372
0.777 −0.6098276 0.1345367 0.1345367 0.1345367 0.1204683 0.0140684
0.888 −0.8002302 0.0759082 0.0759082 0.0759082 0.0659145 0.0099937
0.999 −1.0187183 0.0000000 0.0000000 0.0000000 0.0006318 0.0006318
First and foremost, keep in mind that, y′ (x) � y1′(x) + used to estimate the solution to the BVPs once these ap-
(( β − y1 (b)))/(y2 (b))y2′(x) and y″ (x) � y1″(x) + ((β− proximations are ready to use.
y1 (b)))/y2 (b))y2″(x), putting y1″(x) and y2″(x) in this
equation, which produces, 3. Numerical Analysis and Graphical
β − y1 (b) Representation of the Proposed Method
y″ � p(x)y1′ + q(x)y1 + r(x) +
y2 (b) In this section, we have considered three boundary value
problems of ODEs that we solved numerically using the
p(x)y2′ + q(x)y2 , shooting method and then compare the result with the exact
solution. All the approximate results of different iterations,
β − y1 (b) exact solutions, and error estimation of three problems are
� p(x) y1′ y ′(x) (5)
y2 (b) 2 represented in tabular form (i.e., Table 1, 2, and 3). Ap-
proximate and exact solutions are also graphically described
β − y1 (b) (i.e., Figure 1(a)–1(c), Figure 2(a)–2(c), and Figure 3(a)–
+ q(x) y1′ y ′(x) + r(x)
y2 (b) 2 3(c)) for better comprehension. Error analysis is also in-
troduced graphically (i.e., Figure 1(d) and 1(e), Figure 2(d)
� p(x)y′ (x) + q(x)y(x) + r(x). and 2(e), and Figure 3(d) and 3(e)) were MATLAB and MS
Excel are used. we use a bar diagram for the easy visuali-
zation of the error estimation. It has been found that after a
Moreover, y(a) � y1 (a) + ((β − y1 (b)))/y2 (b))y2 certain number of iterations, we achieve the highest degree
(a) � α + ((β − y1 (b)))/y2 (b)).0 � α., and y(b) � y1 (b) of accuracy, and then all subsequent iterations produce the
+((β− y1 (b)))/(y2 (b)y2 (a) � β. same result. So, results of the first four iterations are rep-
The shooting technique for linear equation depends on resented here for better understanding. Programming
the replacement of the linear BVPs by the initial-value software MATLAB is used for obtaining the results and
problems (2) and (3). There exist various methods for ap- graphs. Error analysis is also shown graphically using
proximating the solutions of y1 (x) and y2 (x), equation(4)is MATLAB and Microsoft Excel.
4 Mathematical Problems in Engineering
Table 3: Results of consecutive four iterations along with exact solution and error estimation for numerical problem-3.
Approximate solution
Xi Exact value Error
Iteration 1 Iteration 2 Iteration 3 Iteration 4
0.1 0.0998333 0.1186415 0.1186415 0.1186415 0.1186415 2.752E-08
0.2 0.1986692 0.2360976 0.2360976 0.2360976 0.2360977 5.445E-08
0.3 0.29552 0.3511947 0.3511947 0.3511947 0.3511948 7.852E-08
0.4 0.389418 0.4627828 0.4627828 0.4627828 0.4627829 9.756E-08
0.5 0.4794252 0.5697469 0.5697469 0.5697469 0.569747 1.095E-07
0.6 0.564642 0.6710182 0.6710182 0.6710182 0.6710184 1.123E-07
0.7 0.6442172 0.765585 0.765585 0.765585 0.7655851 1.042E-07
0.8 0.7173556 0.8525024 0.8525024 0.8525024 0.8525025 8.365E-08
0.9 0.7833264 0.9309018 0.9309018 0.9309018 0.9309019 4.928E-08
1.0 0.8414705 1.0000000 1.0000000 1.0000000 1.0000000 1E-16
Approximate value
–0.2 –0.2
–0.22 –0.22
–0.24 –0.24
–0.26 –0.26
–0.28 –0.28
–0.3 –0.3
–0.32 –0.32
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Subdivision Subdivision
(a) (b)
Graphical Solution of Shooting Method with Exact solution
–0.12
–0.14
–0.16
–0.18
Approximate value
–0.24 0.02
–0.26 0.015
Error
–0.28 0.01
–0.3 0.005
–0.32 0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5
Subdivision Domain
Shooting
Exact solution
(c) (d)
Figure 1: Continued.
Mathematical Problems in Engineering 5
Error estimation
0.025
0.02
Approximate Error
0.015
0.01
0.005
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
Subdivision
Error
(e)
Figure 1: Graphical illustration of exact and shooting method with error estimations for example 1. (a) Diagrammatic depiction of exact
value. (b) Diagrammatic depiction of shooting method. (c) Diagrammatic depiction of shooting method with exact solution. (d) Error
estimation bar diagram using MS Excel. (e) Error estimation curve using MATLAB.
0.2 0.2
0.18 0.18
0.16 0.16
Approximate value
Approximate value
0.14 0.14
0.12 0.12
0.1 0.1
0.08 0.08
0.06 0.06
0.04 0.04
0.02 0.02
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Subdivision Subdivision
(a) (b)
Graphical Solution of Shooting Method with Exact Solution
0.2
Error Estimation
0.18
0.016
0.16
0.014
Approximate value
0.14
0.012
0.12
0.01
0.1
Error
0.08 0.008
0.06 0.006
0.04 0.004
0.02 0.002
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Subdivision Domain
Shooting
Exact solution
(c) (d)
Figure 2: Continued.
6 Mathematical Problems in Engineering
Error estimation
0.016
0.014
0.012
Approximate error
0.01
0.008
0.006
0.004
0.002
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Subdivision
Error
(e)
Figure 2: Graphical illustration of exact and shooting method with error estimations for example 2. (a) Diagrammatic depiction of exact
value. (b) Diagrammatic depiction of shooting method. (c) Diagrammatic depiction of shooting method with exact solution. (d) Error
estimation bar diagram using MS Excel. (e) Error estimation curve using MATLAB.
0.9 0.9
0.8 0.8
0.7 0.7
Approximate value
Approximate value
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Subdivision Subdivision
(a) (b)
Figure 3: Continued.
Mathematical Problems in Engineering 7
0.9
0.8
1.2E-07
0.6
0.0000001
0.5
8E-08
0.4
Error
6E-08
0.3
0.2 4E-08
0.1 2E-08
0 0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0 0.2 0.4 0.6 0.8 1
Subdivision
Domain
Shooting
Exact solution
(c) (d)
× 10–7 Error estimation
1.2
0.8
Approximate error
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Subdivision
Error
(e)
Figure 3: Graphical illustration of exact and shooting method with error estimations for example 3. (a) Diagrammatic depiction of exact
value. (b) Diagrammatic depiction of shooting method. (c) Diagrammatic depiction of shooting method with exact solution. (d) Error
estimation bar diagram using MS Excel. (e) Error estimation curve using MATLAB.
3.1. Numerical Example 1. Considering the boundary value Approximate solutions, exact solution, and errors are
problem d2 y/dx2 � dy/dx + 2y + cos(x), 0 ≤ x ≤ π/2, and represented in Table 2 and approximate solution curve and
y(0) � −0.3, y(π/2) � −0.1, where the exact solution is exact solution curve are exhibited in Figures 2(a)–2(c). Error
y(x) � −1/10(sin(x) + 3cos(x)). [24]. estimations are represented using MS Excel (Figure 2(d))
Approximate solutions, exact solution, and errors are and using MATLAB (Figure 2(e)).
represented in Table 1 and approximate solution curve and
exact solution curve are exhibited in Figures 1(a)–1(c). Error
estimations are represented using MS Excel (Figure 1(d)) 3.3. Numerical Example 3. Considering the boundary value
and using MATLAB (Figure 1(e)). problem (d2 y)/(dx2 ) + y � 0, y(0) � 0, y(1) � 1, use
h � 0.1, where exact solution of the problem is
y(x) � sin(x)/sin(1) [24].
Approximate solutions, exact solution, and errors are
3.2. Numerical Example 2. Considering the boundary value represented in Table 3 and approximate solution curve and
problem d/dx(ex y′ ) + ex y � x + (2 − x)ex , 0 ≤ x ≤ 1, y(0) � exact solution curve are exhibited in Figures 3(a)–3(c). Error
y(1) � 0, use h � 0.1, where the exact solution of the estimations are represented using MS Excel (Figure 3(d))
problem is y(x) � (x − 1)(e− x − 1). [24]. and using MATLAB (Figure 3(e)).
8 Mathematical Problems in Engineering