Numerical Solution of Ordinary Differential Equations (Part - 1)
Numerical Solution of Ordinary Differential Equations (Part - 1)
P. Sam Johnson
May 3, 2020
The methods of Picard and Taylor series belong to the former class of
solutions. In these methods, y in (1) is approximated by a truncated
series, each term of which is a function of x.
The information about the curve at one point is utilized and the solution is
not iterated.
In these methods, the next point on the curve is evaluated in short steps
ahead, by performing iterations till sufficient accuracy is achieved. As
such, these methods are called step-by-step methods.
Euler and Runge-Kutta methods are used for computing y over a limited
range of x-values whereas Milne and Adams methods may be applied for
finding y over a wider range of x-values.
Therefore Milne and Adams methods require starting values which are
found by Picard, Taylor series or Runge-Kutta method.
dy d 2 y d ny
F x, y , , , ..., = 0.
dx dx 2 dx n
φ(x, y , c1 , c2 , . . . , cn ) = 0.
If these conditions are prescribed at one point only (say, x0 ), then the
differential equation together with the conditions constitute an initial
value problem of the nth order.
If the conditions are prescribed at two or more points, then the problem is
termed as boundary value problem.
dy
= y2 + x
dx
where y (0) = 0.
4. Use Picard’s method to approximate the value of y when x = 0.1
given that y (0) = 1 and dy 2
dx = 3x + y .
5. Find the solution of
dy
= 1 + xy
dx
which passes through (0, 1) in the interval (0, 0.5) such that the value
of y is correct to 3 decimal places. Use the whole interval as one
interval only and take h = 0.1.
dy x2
= 2
dx y +1
with the initial condition y = 0 when x = 0. Use Picard’s method to
obtain y for 0.25, 0.5 and 1.0 correct to 3 decimal places.
The first approximate solution of the equations (3) and (4) are given by
Z x
y1 = y0 + f (x, y0 , z0 )dx
x0
Z x
z1 = z0 + g (x, y0 , z0 )dx.
x0
Sam Johnson NIT Karnataka Mangaluru
Numerical
India
Solution of Ordinary Differential Equations (Part - 1) May 3, 2020 16/51
Solving Simultaneous First Order Differential Equations :
Picard’s Method
and so on.
d 2y
dy
= f x, y , .
dx 2 dx
Let z = dy
dx . Hence the given equation can be reduced to 2 first order
simultaneous differential equations
dy
= z
dx
and
dz
= f (x, y , z).
dx
y 00 = y + xy 0 .
d 2y dy
2
= x3 + x 3y
dx dx
with y (0) = 1, y 0 (0) = 1/2.
d 2y ∂f ∂f dy
2
= + . ⇒ y 00 = fx + fy f .
dx ∂x ∂y dx
(x − x0 )2 00
y = y0 + (x − x0 )(y 0 )x=x0 + (y )x=x0 + · · · (6)
2!
gives the values of y for every value of x for which (6) converges.
In this way, the solution can be extended beyond the range of convergence
of series (6).
This is a single step method and works well so long as the successive
derivatives can be calculated easily.
15. Solve
dy
= x + y , y (0) = 1
dx
by Taylor’s series method. Hence find the values of y at x = 0.1 and
x = 0.2.
Compare the final result with the value of the explicit solution.
16. Find by Taylor’s series method, the values of y at x = 0.1 and
x = 0.2 to five places of decimals from
dy
= x 2 y − 1, y (0) = 1.
dx
17. Using Taylor’s series method, find y at x = 1.1 and 0.2 by solving
dy
= x 2 + y 2, y (1) = 2.3.
dx
18. Evaluate the solution of the following problem by the first four terms
of its Maclaurin series for x = 0.1,
dy 1
= (1 + x)y 2 , y (0) = 1.
dx 2
Compare the value with the exact solution.
dy x 3 + xy 2
=
dx ex
y (0) = 1 for y at x = 0.1, 0.2 and x = 0.3.
y1 = y (x0 + h) and z1 = z0 + h.
h2 00 h3 000
y1 = y0 + hy00 + y + y0 + · · · (9)
2! 0 3!
h 2 h 3
z1 = z0 + hz00 + z000 + z0000 + · · · . (10)
2! 3!
Differentiating (7) and (8) successively, we get y 00 , z 00 etc. Hence, the
values of y00 , y000 , y0000 , . . . , and z00 , z000 , z0000 , . . . can be found.
Substituting these values in (9) and (10) we get the first approximation y1
and z1 . Similarly for the second approximation, the Taylor’s algorithms are
h2 00 h3 000
y2 = y1 + hy10 + y + y1 + · · · (11)
2! 1 3!
h 2 h3
z2 = z1 + hz10 + z100 + z1000 + · · · . (12)
2! 3!
Using the first approximate values y1 and z1 , we can calculate y10 , y100 etc.
and z10 , z100 etc.
25. Solve the initial value problem involve two independent functions x(t)
and y (t) using Taylor series method,
dx dy
= ty + 1, = −tx
dt dt
x = 0, y = 1 when t = 0. Evaluate x and y at t = 0.1.
26. Find an approximate series solution of the simultaneous equations
dx dy
= xy + 2t, = 2ty + x
dt dt
subject to the initial conditions x = 1, y = −1 when t = 0.
d 2y
dy
= f x, y , .
dx 2 dx
Let z = dy
dx . Hence the given equation can be reduced to 2 first order
simultaneous differential equations
dy
= z
dx
and
dz
= f (x, y , z).
dx
d 2y
= −xy
dx 2
dy
given that dx = 0.5 and y = 1 when x = 0.
28. Find the first 6 terms of the power series method solution of
y 00 + xy 0 − 2y = 0
if y (1) = 0, y 0 (1) = 1.
y 00 + y 2 y 0 = x 3 0
d 2y
= xy
dx 2
dy
given that y = 1 and dx = 1 at x = 0.
y 00 − xy 0 − y = 0
dx d 2y
= x + y + t, =x −t
dt dt 2
For a given point P(x0 , y0 ) in the (unknown) solution curve, we are going
to find the ordinate of x, possibly near to the solution curve.
y1 = L1 P1 = LP + R1 P1
= y0 + PR1 tan θ
dy
= y0 + h
dx P
= y0 + hf (x0 , y0 ).
Let P1 Q1 be the solution curve of the given initial value problem through
P1 and let its tangent at P1 meet the ordinate through L2 in
P2 (x0 + 2h, y2 ).
Then
y2 = y1 + hf (x0 + h, y1 ).
Repeating this process n times, we finally reach on an approximation MPn
of MQ given by
An another drawback lies in the fact that if dydx changes rapidly over an
interval, then its value at the beginning of the interval may give a poor
approximation as compared to its average value over the interval and thus
the value of y calculated from Euler’s method may be in much error from
its true value.
y1 = y0 + hf (x0 , y0 ).
That is,
(1) h
y1 = y0 + f (x0 , y0 ) + f (x0 + h, y1 ) .
2
We repeat this step, till two consecutive values of y agree. This is then
taken as the starting point for the next interval L1 L2 .
dy
= y + ex y (0) = 0.
dx
42. Solve the following differential equation by Euler’s modified method,
dy
= log(x + y ) y (0) = 2.
dx
dy 2x
=y− , y (0) = 1.
dx y
45. Solve by modified Euler’s method,
dy
= x + y 2, y (0) = 1.
dx
y 0 = −y y (0) = 1