Escolar Documentos
Profissional Documentos
Cultura Documentos
3, Issue 1, 2014
2014 by the authors Licensee IJASER- Under Creative Commons License 3.0
Research article
www.ijaser.com
editorial@ijaser.com
ISSN 2277 9442
1. Introduction
The Homotopy analysis method (HAM) introduced by Liao (1992) is the powerful method which
determine the approximate analytical solution of a non-linear equations in terms of an infinite series
usually converging to the exact solution. This method have been used in obtaining analytic and
approximate solutions to a wide class of linear and non-linear differential and integral equations. HAM is
a non-perturbative analytical method for obtaining series solutions to nonlinear equations and has been
successfully applied to numerous problems in science and engineering (Liao, 1995, 1999, 2003, 2004,
2007, 2010 and 2012, Domairry et.al, 2008, Tan et.al, 2007, Abbasbandy et. al, 2008, Cheng et. al, 2008,
Hayat et. al, 2008 and 2010, Jafari et. al, 2009). In comparison with other perturbative and
non-perturbative analytical methods, HAM offers the ability to adjust and control the convergence of a
solution via the so-called convergence-control parameter. Because of this, HAM has proved to be the most
effective method for obtaining analytical solutions to highly non-linear differential equations. Previous
applications of HAM have mainly focused on non-linear differential equations in which the non-linearity is
a polynomial in terms of the unknown function and its derivatives. Liao (1992, 1995, 1999, 2003, 2004,
2007, 2010 and 2012) proposed a powerful analytical method for non-linear problems, namely the
Homotopy analysis method. This method provides an analytical solution in terms of an infinite power
series. However, there is a practical need to evaluate this solution and to obtain numerical values from the
infinite power series. In order to investigate the accuracy of the Homotopy analysis method (HAM)
solution with a finite number of terms, the system of differential equations were solved. The Homotopy
analysis method is a good technique comparing to another perturbation method.
Homotopy perturbation method (Chowdhury et. al, 2007, Ghori et. al, 2007, Coyle, 1986, Ozis et. al, 2007,
Madden et. al, 2003, Ananthaswamy et. al, 2012 and 2013) is a special case of Homotopy analysis method.
Different from all reported perturbation and non-perturbative techniques, the Homotopy analysis method
itself provides us with a convenient way to control and adjust the convergence region and rate of
approximation series, when necessary. Briefly speaking, this method has the following advantages: It is
valid even if a given non-linear problem does not contain any small/large parameter at all; it can be
employed to efficiently approximate a non-linear problem by choosing different sets of base functions. The
Homotopy analysis method contains the auxiliary parameter h , which provides us with a simple way to
adjust and control the convergence region of solution series. Here we have solved some non-linear
differential equations using new approach on Homotopy analysis method.
(2.1)
(2.2)
H (t ) 0 is an
is an initial guess of u (t ) , (t : p ) is an
unknown function. It is important, that one has great freedom to choose auxiliary unknowns in HAM.
Obviously, when p = 0 and p = 1 , it holds:
(t;0) = u 0 (t ) and
(t ;1) = u (t )
(2.3)
respectively. Thus, as p increases from 0 to 1, the solution (t ; p ) varies from the initial guess u 0 (t ) to
the solution u (t ) . Expanding (t ; p ) in Taylor series with respect to p , we have:
+
u m (t ) p m
(t ; p) = u 0 (t ) +
(2.4)
m =1
where
u m (t ) =
1 m (t ; p)
m! p m
(2.5)
p =0
If the auxiliary linear operator, the initial guess, the auxiliary parameter h, and the auxiliary function are so
properly chosen, the series eqn.(2.4) converges at p = 1 then we have:
+
u (t ) = u 0 (t ) +
u m (t ) .
(2.6)
m =1
Differentiating (2.2) for m times with respect to the embedding parameter p , and then setting p = 0 and
finally dividing them by m !, we will have the so-called m th order deformation equation as:
L[u m m u m 1 ] = hH (t ) m ( u m 1 )
(2.7)
where
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
178
m ( u m 1 ) =
m1 N [ (t ; p)]
1
(m 1)!
p m1
(2.8)
and
0, m 1,
1, m > 1.
m =
(2.9)
u m (t ) = m u m 1 (t ) + hL1 [ H (t ) m (u m 1 )]
(2.10)
u (t ) =
u m (t )
(2.11)
m =0
When M + , we get an accurate approximation of the original equation (2.1). For the convergence of
the above method we refer the reader to Liao (2003). If equation (2.1) admits unique solution, then this
method will produce the unique solution.
(3.1)
u
) = 0,
n
(3.2)
is the boundary of the domain . In general, the operator Do can be divided into a
linear part L and a non-linear part N . Eqn. (B. 1) can therefore be written as
L (u ) + N (u ) f ( r ) = 0
By the Homotopy technique, we construct a Homotopy v(r , p) : [0,1] that satisfies
(3.3)
(3.4)
(3.5)
is an initial approximation of Eq. (3. 1) that satisfies
the boundary conditions. From eqn. (3.4) and eqn. (B.5), we have
H (v,0) = L(v) L(u 0 ) = 0
(3.6)
H (v,1) = Do (v) f (r ) = 0
(3.7)
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
179
When p=0, eqn.(3.4) and eqn.(3.5) become linear equations. When p =1, they become non-linear equations.
The process of changing p from zero to unity is that of L(v) L(u 0 ) = 0 to Do (v) f ( r ) = 0 . We first
use the embedding parameter p as a small parameter and assume that the solutions of eqn. (3.4) and
eqn. (3.5) can be written as a power series in p .
v = v 0 + pv1 + p 2 v 2 + ...
Setting p = 1
(3.8)
u = lim v = v0 + v1 + v 2 + ...
(3.9)
p 1
(4.2)
H (t ) 0 is an
is an initial guess of u (t ) , (t : p ) is an
unknown function. It is important, that one has great freedom to choose auxiliary unknowns in HAM.
Obviously, when p = 0 and p = 1 , it holds:
(t;0) = u 0 (t ) and
(t ;1) = u (t )
(4.3)
respectively. Thus, as p increases from 0 to 1, the solution (t ; p ) varies from the initial guess u 0 (t ) to
the solution u (t ) . Expanding (t ; p ) in Taylor series with respect to p , we have:
+
(t ; p ) = u 0 (t ) +
u m (t ) p m
(4.4)
m =1
(4.5)
Now substituting the eqn.(4.5) in eqn.(4.2) and equating the coefficients of p we get p 0 , p1 , p 2 , p 3 .....
and solving these equations we get the solutions u 0 (t ), u1 (t ), u 2 (t ), u 3 (t )...... respectively. Substituting
theses values in eqn.(4.4) we get the solution of eqn.(4.1) is as follows:
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
180
u m (t ) = u 0 (t ) + u1 (t ) + u 2 (t ) + u 3 (t ) + ...... .
u (t ) =
(4.6)
m =0
When M + , we get an accurate approximation of the original eqn. (4.1). In the same way, when
h = 1, the Homotopy analysis method becomes the Homotopy perturbation method.
(5.1)
(5.2)
The approximate analytical solution of eqns. (5.1) and (5.2) using new approach on Homotopy analysis
method is
u ( x) = x +
h x 3 5 h (h + 1) x 3 + 2 h 2 x 5
+
3
15
(5.3)
Example 2
As the second example, consider the Riccati differential equation
u ' ( x) = u ( x) 2 u 2 ( x), 0 x 1
(5.4)
(5.5)
Using new approach on Homotopy analysis method, the approximate analytical solution of eqns. (5.4) and
(5.5) is as follows:
u ( x) = e x + 2h e x (h 2) + 2 h e 2 x (h + 2) + 4 h 2 (e 3 x 2 e 2 x )
(5.6)
Example 3
As the third example, consider the Riccati differential equation
u ' ( x) = 1 + 2 u ( x) u 2 ( x), 0 x 1
(5.7)
(5.8)
u ( x) =
e 2 x (3 h 2 1) h (h + 1) (e 4 x 1)
(e 2 x 1) h (e 4 x 1)
+
+
2 x e2 x +
2 x e2 x
2
4
2
16
4
2
(5.9)
h2 6x
1
4x
2x
4x
2x 2
+
(e 2 e 4 x e 2) e ( x ) + e x
16
2
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
181
evident that when time increases, the steady state concentration also increases. Figures 2 (a) and (b) is the
steady state concentration u (x) versus the time x . From these figures, it is noted that when the time
increases, the steady state concentration decreases. Figures 3(a), (b), (c) and (d) is the steady state
concentration u (x) versus the time x . From these figures, it is clear that when the time increases, the
steady state concentration also increases.
Figure 1: Steady state concentration u (x) versus the time x . The concentration u (x) were computed using
the eqn. (5.3), when (a) x = 0 0.5 , (b) x = 0 1 (c) x = 0 1.4 and h = 0.69. Here ( ____ ) denote the
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
182
Figure 2: Steady state concentration u (x) versus the time x . The concentration u (x) were computed
using the eqn.(5.6), when (a) x = 0 0.1 , (b) x = 0 0.3 and h = 0.64. Here ( ____ ) denote the
analytical solution and ( ) denote the numerical solution.
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
183
Figure 3: Steady state concentration u (x) versus the time x . The concentration u (x ) were computed using
the eqn.(5.9) , when (a) x = 0 0.1 , (b) x = 0 0.5 , (c) x = 0 0.8 , (d) x = 0 1 and h = 0.69. Here
( ____ ) denote the analytical solution and ( ) denote the numerical solution.
Figure 4: The h curve to indicate the convergence region for u (0.85) using eqn. (5.3) in example (1).
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
184
Figure 5: The h curve to indicate the convergence region for u ' (0.85) using eqn. (5.3) in example (1).
5. Conclusions
The system of time dependent reaction-diffusion equation coupled through the non-linear reaction terms
has been solved analytically and numerically. Analytical expressions of the steady state concentrations of
species are derived by using the new approach on Homotopy analysis method for new approach. The
primary result of this work is simple and approximate expressions of the concentrations in this new
approach. This method is an extremely simple and it is also a promising method to solve other non-linear
equations. This method can be easily extended to find the solution of all other non-linear equations.
Acknowledgement
This work is supported by the University Grant Commission (UGC) Minor project No: F. MRP-4122/12
(MRP/UGC-SERO), Hyderabad, Government of India. The authors are thankful to Shri. S. Natanagopal,
Secretary, The Madura College Board and Dr. R. Murali, Principal, The Madura College (Autonomous),
Madurai, Tamil Nadu, India for their constant encouragement.
6. References
1. Abbasbandy S. 2008. Soliton solutions for the Fitzhugh Nagumo equation with the Homotopy
analysis method. Applied Mathematical Modeling, 32, pp.27062714.
2. Ananthaswamy, V., and Rajendran, L. 2012. Approximate analytical solution of non-linear kinetic
equation in a porous pellet. Global Journal of Pure and Applied Mathematics, 8 (2), pp.101-111.
3. Ananthaswamy, V., and Rajendran, L. 2012. Analytical solution some two-point non-linear elliptic
value problems. Applied Mathematics, 3, pp.1044-1058.
4. Ananthaswamy, V., and Rajendran, L. 2013. Analytical solution of non-isothermal diffusionreaction processes and effectiveness factors. ISRN Physical Chemistry, 2013, Article ID 487240,
pp.1-14.
5. Cheng J, Liao S.J, Mohapatra R.N and Vajravelu K. 2008. Series solutions of nano boundary layer
flows by means of the Homotopy analysis method, Journal of Mathematical Analysis and
Applications 343, pp.233245.
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
185
10. Hayat, T., and Abbas, Z. 2008. Heat transfer analysis on MHD flow of a second grade fluid in a
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
Subha M et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
186
Int. Journal of Applied Sciences and Engineering Research, Vol. 3, Issue 1, 2014
2014 by the authors Licensee IJASER- Under Creative Commons License 3.0
Research article
www.ijaser.com
editorial@ijaser.com
ISSN 2277 9442
(A.1)
(1 p)
1 = h p
1 + u 2 ( x)
dx
dx
(A.2)
(A.3)
we get
d (u 0 + p u1 + p 2 u 2 + .......)
(1 p )
1
dx
d (u 0 + p u1 + p 2 u 2 + .......)
=h p
1 + (u 0 + p u1 + p 2 u 2 + .......) 2
dx
(A.4)
p0 :
du 0
1 = 0
dx
(A.5)
2
d
d (u 0 + p u1 + p u 2 + .......)
1
(1 p) (u1 + 2 p u 2 + 3 p 2 u 3 + ....
dx
dx
d (u 0 + p u1 + p 2 u 2 + .......)
= h
1 + (u 0 + p u1 + p 2 u 2 + .......) 2
dx
(A.6)
d ( u1 + 2 p u 2 + 3 p 2 u 3 + .......)
+ h p
+ 2 (u 0 + p u1 + p 2 u 2 + ....) (u1 + 2 pu 2 + 3 p 2 u 3 + ...
dx
p1 :
du1
= h u 02
dx
(A.7)
we get
d
d ( u1 + 2 p u 2 + .......) d (u1 + 2 p u 2 + .......)
(1 p ) (2 u 2 + 6 p u 3 + ....
dx
dx
dx
d (u1 + 2 p u 2 + .......)
= h
+ 2 (u 0 + p u1 + p 2 u 2 + .......) 2 (u1 + 2 p u 2 + ..............)
dx
d ( u1 + 2 p u 2 + .......)
+h
+ 2 (u 0 + p u1 + p 2 u 2 + ....) (u1 + 2 pu 2 + 3 p 2 u 3 + ...)
dx
(A.8)
d (2u 2 + 6 pu 3 + ...)
+ hp
+ 2 (u 0 + p u1 + ....) (2u 2 + 6 pu 3 + .......) + 2(u1 + 2 pu 2 + ....) 2
dx
du1
= h ( h + 1) u 02 + 2 h u 0 u1
dx
The initial approximations are as follows:
p2 :
(A.9)
(A.10)
(A.9) using the initial approximations eqn.(A.10), we obtain the
(1 p)
1 = h p
1 + u 2 ( x)
dx
dx
(a.1)
(a.2)
(a.3)
d (u0 + p u1 + p 2 u2 + .......)
1
(1 p )
dx
d (u0 + p u1 + p 2 u2 + .......)
=h p
1 + (u0 + p u1 + p 2 u2 + .......)2
dx
(a.4)
du 0
1 = 0
dx
du
p1 : 1 = h u 02
dx
du
p 2 : 1 = h ( h + 1) u 02 + 2 h u 0 u1
dx
The initial approximations are as follows:
p0 :
(a.5)
(a.6)
(a.7)
(a.8)
Solving the eqns. (a.5)-(a.7) and using the initial approximations eqn.(a.8), we obtain the solution in the
text eqn.(5.3).
(B.1)
du ( x)
(1 p )
u ( x) = h p
u ( x) + 2 u 2 ( x)
dx
dx
(B.2)
eqn.(B.1) is
u = u 0 + p u1 + p 2 u 2 + ...........
(B.3)
we get
d (u 0 + p u1 + p 2 u 2 + .......)
( u 0 + p u1 + p 2 u 2 + .......)
(1 p)
dx
d (u 0 + p u1 + p 2 u 2 + .......)
(u 0 + p u1 + p 2 u 2 + .......)
=h p
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......)
(B.4)
p0 :
du 0
u0 = 0
dx
(B.5)
(1 p)
( u1 + 2 p u 2 + 3 p 2 u 3 + ....)
dx
d (u 0 + p u1 + p 2 u 2 + .......)
( u 0 + p u1 + p 2 u 2 + .......)
dx
d (u 0 + p u1 + p 2 u 2 + .......)
(u 0 + p u1 + p 2 u 2 + .......)
=+ h
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......)
d ( u1 + 2 p u 2 + 3 p 2 u 3 + .......)
(u1 + 2 p u 2 + 3 p 2 u 3 + .......)
+ h p
dx
2
2
+ 4 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u 3 + .......)
Put
p1 :
p = 0 in eqn. (B.6)
(B.6)
du1
u1 = 2 h u 02
dt
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011
(B.7)
Differentiating
d ( 2 u 2 + 6 p u 3 + ....)
(1 p )
( 2 u 2 + 6 p u 3 + ....)
dx
d ( u1 + 2 p u 2 + .......)
d ( u1 + 2 p u 2 + .......)
( u1 + 2 p u 2 + .......)
dx
dx
( u + 2 p u + .......)
1
2
d ( u1 + 2 p u 2 + 3 p 2 u 3 + .......)
(u1 + 2 p u 2 + 3 p 2 u 3 + .......)
=h
dx
2
2
+ 4 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u 3 + .......)
(B.8)
d ( u1 + 2 p u 2 + 3 p 2 u 3 + .......)
(u1 + 2 p u 2 + 3 p 2 u 3 + .......)
+h
dx
2
2
+ 4 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u 3 + .......)
d (2u 2 + 6 p u 3 + ....)
(2u 2 + 6 p u 3 + ....)
dx
+ h p
du1
u 2 = 2 h (h + 1) u 02 + 4 h u 0 u1
dt
The initial approximations are as follows:
p2 :
(B.9)
(B.10)
Solving the eqns. (B.5), (B.7) and (B.9) and using the initial approximations eqn.(B.10), we obtain the
solution in the text eqn. (5.6).
(b.1)
du ( x)
(1 p )
u ( x) = h p
u ( x) + 2 u 2 ( x)
dx
dx
(b.2)
(b.3)
we get
d (u 0 + p u1 + p 2 u 2 + .......)
(1 p)
( u 0 + p u1 + p 2 u 2 + .......)
dx
d (u 0 + p u1 + p 2 u 2 + .......)
(u 0 + p u1 + p 2 u 2 + .......)
=h p
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......)
Equating the coefficients on both sides of the eqn.(b.4) we get
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011
(b.4)
du 0
u0 = 0
dt
du
p1 : 1 u1 = 2 h u 02
dt
du
p 2 : 1 u 2 = 2 h (h + 1) u 02 + 4 h u 0 u1
dt
The initial approximations are as follows:
p0 :
(b.5)
(b.6)
(b.7)
(b.8)
Solving the eqns. (b.5)-(b.7) and using the initial approximations eqn.(b.8), we obtain the solution in the
text eqn. (5.6).
du ( x)
(1 p )
2 u ( x) 1 = h p
2u ( x) 1 + u 2 ( x)
dx
dx
(C.1)
(C.2)
eqn.(C.1) is
u = u 0 + p u1 + p 2 u 2 + ...........
(C.3)
d (u 0 + p u1 + p 2 u 2 + .......)
(1 p)
2( u 0 + p u1 + p 2 u 2 + .......) 1
dx
(C.4)
d (u 0 + p u1 + p 2 u 2 + .......)
2(u 0 + p u1 + p 2 u 2 + .......) 1
=h p
dx
2
2
+ (u 0 + p u1 + p u 2 + .......)
Put p = 0 in eqn.(C.4) we get
du 0
2u 0 1 = 0
dt
Differentiating eqn. (C.4) with respect to p on both sides we get
p0 :
(C.5)
d ( u1 + 2 p u 2 + 3 p 2 u 3 + ....)
2( u1 + 2 p u 2 + 3 p 2 u 3 + ....)
(1 p )
dx
d (u 0 + p u1 + p 2 u 2 + .......)
2( u 0 + p u1 + p 2 u 2 + .......) 1
dx
2
d (u 0 + p u1 + p u 2 + .......)
2(u 0 + p u1 + p 2 u 2 + .......) 1
= h
dx
2
2
+ (u 0 + p u1 + p u 2 + .......)
2
d ( u1 + 2 p u 2 + 3 p u 3 + .......)
2(u1 + 2 p u 2 + 3 p 2 u 3 + .......)
+ h p
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u 3 + .......)
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011
(C.6)
du1
2u1 = h u 02
dt
Differentiating eqn. (C.6) with respect to p on both sides we get
p1 :
(C.7)
d ( 2 u 2 + 6 p u 3 + ....)
(1 p)
2( 2 u 2 + 6 p u3 + ....)
dx
d ( u1 + 2 p u 2 + .......)
d ( u1 + 2 p u 2 + .......)
2( u1 + 2 p u 2 + .......)
dx
dx
2( u + 2 p u + .......)
1
2
d ( u1 + 2 p u 2 + 3 p u 3 + .......)
2(u1 + 2 p u 2 + 3 p 2 u3 + .......)
=h
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u3 + .......)
2
d ( u1 + 2 p u 2 + 3 p u 3 + .......)
2(u1 + 2 p u 2 + 3 p 2 u 3 + .......)
+h
dx
2
2
+ 2 (u 0 + p u1 + p u 2 + .......) ( u1 + 2 p u 2 + 3 p u3 + .......)
d (2u 2 + 6 p u 3 + ....)
2(2u 2 + 6 p u 3 + ....)
dx
+ h p
du1
u 2 = h (h + 1) u 02 + 2 h u 0 u1
dt
The initial approximations are as follows:
p2 :
(C.8)
(C.9)
(C.10)
Solving the eqns. (C.5), (C.7) and (C.9), and using the initial approximations eqn. (C.10), we obtain the
solution in the text eqn. (5.9).
(c.1)
du ( x)
(1 p )
2 u ( x ) 1 = h p
2u ( x) 1 + u 2 ( x)
dx
dx
we get
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011
(c.2)
(c.3)
d (u 0 + p u1 + p 2 u 2 + .......)
(1 p )
2( u 0 + p u1 + p 2 u 2 + .......) 1
dx
d (u 0 + p u1 + p 2 u 2 + .......)
2(u 0 + p u1 + p 2 u 2 + .......) 1
=h p
dx
+ (u + p u + p 2 u + .......) 2
0
1
2
(c.4)
du 0
2u 0 1 = 0
dx
du
p1 : 1 2u1 = h u 02
dx
du
p 2 : 2 2u 2 = h (h + 1) u 02 + 2 h u 0 u1
dx
The initial approximations are as follows:
p0 :
(c.5)
(c.6)
(c.7)
(c.8)
Solving the eqns. (c.5) - (c.7) and using the initial approximations eqn.(c.8), we obtain the solution in the
text eqn. (5.9).
h curves are plotted. The region where the fluid velocities u (x) and u ' ( x) versus h is
a horizontal line known as the convergence region for the corresponding function. The common region
among u (x) and its derivatives are known as the overall convergence region. To study the influence of
h on the convergence of solution, h -curves of u (0.85) and u ' (0.85) are plotted in Fig. (4) and (5)
respectively. These figures clearly indicate that the valid region of h is about (-0.74 to -0.64). Similarly we
can find the value of the convergence control parameter h for different values of the constant parameters.
Appendix E
Matlab/Scilab program to find the numerical solution of non-linear equations (5.1) and (5.2), (5.4)
and (5.5) and (5.7) and (5.8)
function
options= odeset('RelTol',1e-6,'Stats','on');
%initial conditions
x0 = [0];
tspan = [0,1];
tic
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011
[t,x] = ode45(@TestFunction,tspan,x0,options);
toc
figure
hold on
plot(t, x(:,1))
legend('x')
ylabel('x')
xlabel('t')
return
function [dx_dt]= TestFunction(t,x)
dx_dt(1)=1 - x(1)^2;
dx_dt = dx_dt';
return
M. Subha et al.,
Int. Journal of Applied Sciences and Engineering Research, Vol. 1, No. 1, 2011