Beruflich Dokumente
Kultur Dokumente
f x
f x
is a polynomial in x.
f x a0 x n a1 x n 1 ............ a n 1 x an
a0 0 , the co-efficients a0 , a1...........an are real constants and n is a
Non-negative integer.
2)
called a
Transcendental (or) non-algebraic function.
Eg:
f x c1e x c2 e x
f x e5 x
3)
x3
3
2
.
f x 0
Root of an equation: A number is called a root of an equation
if
f 0
Note: The roots of an equation are the abscissas of the points where the
graph
y f x
Direct method:
We know the solution of the polynomial equations such as linear equation
ax b 0 and quadratic equation ax 2 bx c 0 ,using direct methods or
analytical methods, Analytical methods for the solution of cubic and
quadratic equations are also available.
2)
f x0
and
f x1
x0 , x1
f x 0
x2
is a root.
If
f x1
and
f x2
x2
x0 , x1
x0 x1
2 . if f x2 0 then
x0 and x .
2
x0 , x2
x2 , x1 .
The
interval is taken as
Examples:3
1). Find a root of the equation x 5 x 1 0 using the bisection method
in 5 stages
f x x 5x 1
f 0 0
Sol
Let
we note that
f 1 0
Consider
x0 0 and x1 1
x0 x1 1
0 1 0.5
2
2
f x2 f 0 : 5 1.375 0 and f 0 0
x2
x3
Now
We find
Since
0 0.5
0.25
2
f x3 0.234375 0 and
f 0 0
f 0 0
x4
x0 x3 1
0 0.25
4
2
0.125
We have
Since
f x4 0.37495 0
f x4 0 and f x3 0
x5
x3 x4 1
0.125 0.25 0.1875
2
2
x0 and x3
f x5 0.06910 0
since
f x5 0 and f x3 0
the
root
must
lie
x5 0.18758
between
x3 0.25
Here the fifth approximation of the root is
1
x5 x3
2
1
0.1875 0.25
2
0.21875
x6
four stages
Sol
let
f x x3 4 x 9
We note that
f 2 0
and
f 3 0
Consider
x0 2 and x1 3
x0 x1 1
0 1 0.5
2
2
f x2 f 0,5 1.375 0 and f 0 0
x2
x3
Now
We find
Since
0 0.5
0.25
2
f x3 0.234375 0 and f 0 0
f 0 0
x0 x3 1
0 0.25 0.125
4
2
x4
We have
Since
f x4 0.37495 0
f x4 0
and
f x3 0
x5
x3 x4 1
0.125 0.25 0.1875
2
2
By bisection method
Calculating
x2
x0 x1
2.5
2
f x2 f 2.5 3.375 0
x3
2.5 3
2.75
2
f x3 f 2.75 0.7969 0
The root lies between x2 and x3
x0 and x3
x4
Again
1
x2 x3 2.625
2
f x4 f 2.625 1.421 0
Fourth approximation is
x5
1
x3 x4 2.6875
2
f x0 and f x1
f x 0
x0 and x1 . The curve f x crosses x- axis only once at the point x2 lying between
the points
x0 and x1
A x0 , f x0
and
B x1 , f x1
on the
graph and suppose they are connected by a straight line, Suppose this line cuts
x-axis at
x0 and x2
and value
x1
is replaced by
x0
is replaced by
x2
Other wise the root lies between
x2
and
x1
x2
Another line is drawn by connecting the newly obtained pair of values. Again
the point here the line cuts the x-axis is a closer approximation to the root. This
process is repeated as many times as required to obtain the desired accuracy. It
x2 , x3 , x4
y f x
A x0 , f x0 and B x1 , f x1
y f x----------------1
f x1 f x0
0
1
y f x
x x0
x x0
Then the equation to the chord AB is
f x 0
At the point C where the line AB crosses the x axis, where y 0
x x0
From (1), we get
x1 x0
f x0 ----------------2
2
f x1 f x0
x is given by (2) serves as an approximated value of the root, when the interval in
which it lies is small. If the new values of x is taken as
x2
x1 x0 f x
0
f x1 f x0
x f x1 x1 f x0
0
----------------1
3
f x1 f x0
x2 x0
x0 and x2 or x2 and x1
We name that interval as
x3 is given by
x3
x1 , x2
x1 f x2 x2 f x1
f x2 f x1
x1 , y1 x2 , y2
meets x axis at
This will in general, be nearest to the exact root we continue this procedure
till the root is found to the desired accuracy
The iteration process based on (3) is known as the method of false position
The succesive intervals where the root lies, in the above procedure are
named as
x0 , x1 , x1 , x2 , x2 , x3
Where
xi 1
Also
etc
xi 1 f xi xi f xi 1
f xi f xi 1
Examples:1. By using regula - falsi method, find an approximate root of the equation
f x x 4 x 10
Then
f x0 f 1.8 1.3 0
Since
f x0
and
The equation
f x1
f x 0
and
and
x0 1.8, x1 2
f x1 f 2 4 0
x0 and x1
x2 x0
x1 x0
f x0
f x1 f x0
1.8
1.849
2 1.8
1.3
4 1.3
We find that
f x2 0.161
so that
f x2 and f x1
x1 x2
. f x2
f
x
f
x
1
2
2 1.849
1.8490
0.159
0.159
1.8548
x3 x2
We find that
f x3 f 1.8548
0.019
So that
f x3 and f x2
f x3 and f x1
between
x2 and x3
between
But
lie
x1 x3
f x3
f
x
f
x
1
3
2 1.8548
1.8548
0.019
4 0.019
1.8555
x4 x3
method
A Let
f x x3 x 4 0
f 0 4, f 1 4, f 2 2
Since
f 1 and f 2
x2
By false position method
x2
x0 f x1 x1 f x0
f x1 f x0
1 2 2 4
2 4
2 8 10
1.666
6
6
1.042
Now, the root lies between 1.666 and 2
x3
1.666 2 2 1.042
1.780
2 1.042
0.1402
Now, the root lies between 1.780 and 2
x4
1.780 2 2 0.1402
1.794
2 0.1402
0.0201
Now, the root lies between 1.794 and 2
x5
1.794 2 2 0.0201
1.796
2 0.0201
x6
1.796 2 2 0.0027
1.796
2 0.0027
f x 0
----------------1
x x 1
(i)
a x b
For two real numbers a and b, a x b implies
and
(ii)
For
all
x1 , x11
lying
x1 x11 m x1 x11
in
the
interval
a, b
we
have
Then, it can be proved that the equation (1) has a unique root in the
interval (a,b). To find the approximate value of this root, we start with an initial
approximation
We put
x0
x1 x0
Next, we put
and take
x2 x1
x0
and take
x2
xn xn 1 , n 1 2
, an
xn xn 1 , n 1
Convergence of An Iteration:-
x1 , x2
xn is called the
Since
x1 , x2 , x3 ........xn
xn
xn
below a theorem with out proof giving a sufficient condition for the convergence of
the iteration given by
xn xn 1 , n 1
x 1
Note:- Let I be an interval containing a root of the equation (1). If
for all
x in I, then for any value of
x0
Examples:1)
Sol.
In latin the word iterate means to repeat. Iterative methods use a process
of obtaining better and better estimates of solution with each iteration (or)
repetitive computation. This process continues until an acceptable solution is
found
The steps involved in an iterative method are
1. Develop an algorithm to solve a problem step-by-step
2. Make an initial guess or estimate for the variables (or) variables of the
solution. The initial estimates should be reasonable. Success in the solution is
dependent of the selections of proper initial values of variables
3. Better and better estimates are obtained in the progressive iterations by
using the algorithm developed
4. Stop the iteration process after reaching an acceptable solution, based on a
reasonable criteria being met
1. Explain the classification of iterative method based on the number of guesses
Sol.
Iterative methods can be classified into two categories based on the number
of guesses
1. Interpolation methods also called as bracketing methods
2. Entrapolation methods also called as open end methods
Two estimates are made for the root in the interpolation methods. One
f x
f x
two values
By proper selection, the gap between the two estimates can be
reduced further to arrive at a very small gap. Two popular methods of this
type are
a) Bi-section method
b) False position method
A single value, which is called as initial estimate is chosen in the
extrapolation methods. The new value of the root is successively computed in each
step, depending on the algorithm. This process is continued until the difference
between the values of two successive
iteration process. Some methods of this type are Newton Raphson method
3.
decimal places, of
The equation x cos x near x / 4
Sol
x cos x
x x
xn xn 1
Since the root is near / 4 , we take the initial approximation of the root as
x0 / 4 0.785398
Then, by iteration formula
xn xn 1
x1 x0 cos / 4 0.7071068
x2 x1 cos x1 0.7602446
x3 x2 cos x2 0.7246675
Similarly we get,
x4 0.7487199
x5 0.7325608,
x6 0.7434642.......
By observing these iterations, we conclude the approximation as 0.739 for
the required root correct to three decimal places
4.
Sol
1
Solve x 1 tan x by iteration method
Here
x tan 1 x, 1 x
1
1
1 x2
1
Hence the process converges and we take xi 1 1 tan xi
x0 1, x1 1.7854, x2 2.0602
When
x3 2.1189, x4 2.1318
Let
x0
be an approximate root of
f x1 0
f x 0
and let
x1 x0 h
be the correct
f x1 f x0 h 0
f x0 hf 1 x0 0
h
f x0
f 1 x0
Substituting this in
x1
we get
x1 x0 h
x0
x1
f x0
f 1 x0
x0
x2 , x3 ........xn 1
where xi 1 xi
f xi
f 1 xi
Examples:1.
Sol
Here
f x x 3 3x 5 0 and f 1 x 3 x 2 1
xi 1 xi
xi 3 3 xi 5
2 xi 3 5
, i 0,1, 2.... 1
3 xi 2 1
3 xi 2 1
x 2
To find the root near x 2 , we take 0
then (1) gives
2 x03 5
16 5
21
x1
2.3333
2
3 x0 1 3 4 1 9
2 2.3333 5
2 x13 5
x2
2.2806
2
3 x1 1 3 2.3333 2 1
2 2.2806 5
2 x23 5
x3
2.2790
2
2
3 x2 1
3 2.2806 1
3
2 2.2790 5
3
x4
3 2.2790 1
Since
2.2790
Sol.
a) Square root:Let
f x x2 N 0
f x
is then x
f ' x 2x
By Newton-Raphson technique
xi 1 xi
xi 1
f xi
xi 2 N
i
f 1 xi
2 xi
1
N
xi
2
xi
Using the above iteration formula the square root of any number N can be
found to any desired accuracy, for example, you will find the square root of
N 24 .
x1
x0 4.8
1
24
47.04
1 23.04 24
4.9
4.8
2
4.8
4.8
9.6
2
1
24
48.01
1 24.01 24
x2 4.9
4.898
2
4.9
4.9
9.8
2
1
24
47.9904
1 23.9904 24
x3 4.898
4.898
2
4.898
4.898
9.796
2
Since
x2 x3
f x x 2 24 0
is 4.898 . That
means
the square root of 24 is
4.898
b) Reciprocal:-
Let
f x
1
N 0
x
where N is the number whose reciprocal is to be
found
The solution to
f x 0
f x
is then
1
1
f 1 x 2
N also,
x , To find the solution for
x
x 2 x N
xi 1 xi i
i
i
2
1/ xi
For example, the calculation of reciprocal of 22 is as follows
Assume the initial approximation be
x0 0.045
x1 0.045 2 0.045 22
0.045 2 0.99
x2 0.0454 2 0.0454 22
0.0454 2 0.9988
x3 0.04545 2 0.04545 22
3.
x
Find by Newtons method, the real root of the equation xe 2 0 .
Let
f x xe x 2 1
Then
f 0 2
So root of
f x
and
f 1 e 2 0.7183
It is near to 1. so we take
x0 1
and
f 1 x xe x e x and f 1 1 e e 5.4366
By Newtons Rule
x1 x0
First approximation
f x1 0.0672
f x0
f 1 x0
0.7183
0.8679
5.4366
f 1 x1 4.4491
x2 x1
The second approximation
f x1
f 1 x1
0.8679
0.0672
4.4491
0.8528
Required root is 0.853 correct to 3 decimal places
Iterative Methods
Defintion:
An nxn matrix A is strictly diagonally dominant if the absolute value of each leading
diagonal element is greater than or equal to the sum of the absolute values of the
remaining elements in that row
aii
i.e.
j 1, j i
ij
The process of iteration in solving the system of equations AX=B will converge
quickly if the coefficient matrix A is diagonally dominant.
If the diagonal elements are non-zero, each equation is rewritten for the
corresponding unknown, that is, the first equation is rewritten with x1 on the left
hand side, the second equation is rewritten with x 2 on the left hand side and so on
as follows
x1
x2
c2 a21 x1 a23 x3 K K a2 n xn
a22
M
M
xn
cn an1 x1 an 2 x2 K K an ,n 1 xn1
ann
c1 a1 j x j
j 1
j 1
x1
a11
n
c2 a2 j x j
j 1
j 2
x2
a 22
.
.
.
c n 1
x n 1
j 1
j n 1
n 1, j
xj
a n 1,n 1
n
c n a nj x j
xn
j 1
j n
a nn
ci aij x j
xi
j 1
j i
aii
, i 1,2, , n.
(1)
(0)
(0)
(0)
We start with initial values for the variables x1 , x2 ,......., xn to be x1 , x2 ,......., xn .
(1)
(1)
(1)
Substituting these values in the equations of (1), respectively, we get x1 , x2 ,......., xn .
(1)
(1)
(1)
Putting x1 x1 , x2 x2 ,......., xn xn in the respective equations of (1), we get next
(2)
(2)
(2)
approximations as x1 , x2 ,......., xn .
(r )
(r )
(r)
In general, if the values of x1 , x2 ,......., xn in the rth iteration are x1 , x2 ,......., xn then (r +
1)th iteration values are
x1( r 1)
x2( r 1)
M
M
xn( r 1)
If the diagonal elements are non-zero, each equation is rewritten for the
corresponding unknown, that is, the first equation is rewritten with x1 on the left
hand side, the second equation is rewritten with x 2 on the left hand side and so on
as follows
x1
x2
c2 a21 x1 a23 x3 K K a2 n xn
a22
M
M
xn
cn an1 x1 an 2 x2 K K an ,n 1 xn1
ann
(1)
(0)
(0)
We start with initial values for the variables x2 ,......., xn to be x2 ,......., xn . Substituting
(1)
these values in the first equation of (1), we get x1 as
x1(1)
(1)
(1)
(0)
(0)
In the second equation of (1), we use x1 for x1 = x1 , x3 = x3 ,........, xn = xn . Thus we get
x2(1)
(1)
(1)
(1)
Proceeding as above we obtain the first iteration values as x1 , x2 ......., xn .
(r )
(r )
(r)
In general, if the values of x1 , x2 ,......., xn in the rth iteration are x1 , x2 ,......., xn then (r +
1)th iteration values are given by
x1( r 1)
x2( r 1)
M
M
( r 1)
n
Assignment Questions
1. Find a positive root of the following equation by bisection method
x3 x 2 1 0
3
2. Find the positive root of x 2 x 5 by false position method
x
3. Find an approximate root of x log10 1.2 0 by regular false method
x
4. Find a real root of e sin x 1 by regulafalsi method.
x
7. Find a real root of x log10 2 0 using Newton Raphson method.
and 2 then
x2
is
a) 1.25
2.
b) 2.0
c) 1.75
d) 1.5
3y5
a)
y6 3 y5 3 y4 y3
b)
y5 3 y4 3 y3 y2
c)
y6 3 y5 3 y4 y3
d)
y5 3 y4 3 y3 y2
x1 x
x1
a)
b)
x x1
x1
x x1
x
c)
x x1
x
d)
error is
a)
x x1
100
x
1
b)
x x1
x x1
100
c) x
x1
100
d) x
a)
x0
x2
b)
x1
c)
x1 should be replaced by x0
d)
should be replaced by
(1,2)
b)
(3,5)
should be replaced by
f x x3 2 x 5 0
c)
(5,1)
x2
is
d)
(2,3)
d)
2,3
3
7. The two initial values for the root of x x 4 0 are
a)
0,1
b)
1,0
c)
1,2
2
x and x1 are 1 and
8. If x x 1 0 by bisection method first tow approximations 0
2 then
a)
x2 is
1.5
b)
1.75
c)
2.0
d)
1.25
9. If
x0 and x1
3
the first two approximations for the roots at x x 4 0 are 1 and
1.5
b)
x3 is
1.25
c)
1.75
d)
1.33
3
x and x1
x
10.If x 5 x 1 0 , the first approximations 0
are 0 and -1 3 by bisection
method is
a)
-.5
b)
xn 1 xn
a)
xn 1 xn
c)
12.If
x0
-.33
n 1
c)
d)
th
approximation of root of
f x
f xn 1
b)
f xn
f 1 xn
-0.25
f x 0
by Newton
f 1 xn
xn 1 xn
f xn
xn1 xn
d)
f xn
f 1 xn
3
x
the first intervation of the root of the equation x 5 x 3 0 is 0 then 1
0.51
b)
x2
a) 0.6724
0.25
c)
0.6
d)
0.75
is
b) 0.6565
c) 0.721
d) 0.825
b)2.73
c) 2.751
d) 2.82
2
x 2
x
15.If first approximation of roots x x 4 0 is 0
then 1 by Newton Raphson
method is
a) 1.82
b) 1.796
c) 1.896
d) 0.796
b)
f x x 4 4 x 10, x1
c)
d)
f x 0
1
=1.858 then
x2
b) 1.872
c) 1.855
d) 1.92
18.under the conditions that f(a) and f(b) have apposite signs and a<b, the first
approximation of one of the roots f(x)=0 by regula-falsi method is given by
x1
a)
x1
af a bf b
f a f b
x1
f a f b
d)
af b bf a
f b f a
af b bf a
f b f a
x0 and x1 are 1.4 and 1.5 by false position method x2 root x 2 1 sin x 0
a) 1.0009
20.
b)
af a bf b
c)
19.If
x1
b) 1.2097
x0 and x1
c) 1.1940
d) 1.4091
3
2
of root of x x 2 0 are 1.5 and 2 then
b) 1.724
c) 1.892
d) 1.928
x
x
If first two approximations of root of xe 3 0 are 1 and 1.5 then 2 by
b) 1.425
x2
c) 1.035
d) 1.312
a) -2.521
23.
b) -2.34
c) -2.171
d) -2.79
3
2
r 1
If rth iteration of the root of x 2 x 4 0 is 2.5877 then
th
iteration by
b) 2.59
c) 2.69
d) 2.89
24.
3
If 4th iteration of root of x x 1 0 is 0.729 then 5th iteration by successive
approximation method is
a) 0.712
25.
b) 0.653
c) 0.734
d) 0.821
3
If 2nd approximation of root x x 1 0 by successive approximation method
is 0.8 then
x3
a) 0.75
b) 0.61
c) 0.58
d) 0.79
NUMERICAL DIFFERENTIATION:
The process of obtaining the derivative of a function y=f(x) using a numerical
technique is known as Numerical Differentiation. It is the process of calculating the
value of the derivate of a function at some assigned value of x from the given set
of data points which corresponds to the values of the unknown function y=f (x).
Numerical Differentiation using forward differences formula:
Consider
( x i, y i )
the function y=f(x) which is passing through the points
that are at equally
spaced intervals. The formula to find the derivate of the function for some value of
given x lying in the beginning of the table is
1
1 3
dy
1
= -y 0 2+y 0
-y.....................
0
2
3
dx x = x 0 h
y n 2 y n 3 y n .....................
dx
h
2
3
x xn
y -1
1 3
1 5
5
+ y -1 + 3 y -2
+ y -2 - .....................
y -3
12
60
problem:
The following table of values of x and y is given by
X
6.9897
7.4036
7.7815
8.1291
8.4510
8.7506
9.0309
dy
find dx when x = 1,3,6.
X
Y
y
2 y
0
3 y
4 y
5 y
6 y
6.9897
0.4139
7.4036
- 0.036
0.3779
7.7815
0.0057
- 0.0303
0.3476
3
8.1291
0.0046
-0.257
0.3219
4
8.4510
-0.0012
-0.0223
8.7506
0.003
-0.0193
9.0309
using Newtons forward difference formula
-0.0007
-0.0008
-0.0004
0.2803
6
-0.0001
0.0034
0.2996
5
- 0.0011
1
1 3
dy
1
= -y 0 2+y0
-y....................
0
dx
h
2
3
x =1
0.43658
1 6
y
6 0
y -1
1 3
+ y -1 +3 y -2 601 + 5 y -2
12
y -3
0.33408.
Numerical Integration
I. Trepezoidal Rule
xn
ydx 2 y
yn 2 y1 y2 yn1
x0
ydx 3 y
yn 4 y1 y3 yn1 2 y2 y4 yn2
x0
3h
ydx 8 y
yn 3 y1 y2 y4 y5 yn1 2 y3 y6 yn3
x0
1.
1 x
0
dx
, taking 5 sub internals & by using
1
, n 5, a 0, b 1
1 x2
b a 1 0
h
0.2
n
5
f x
Ans.
xi & yi f xi
as follows
xi
0.0
0.2
0.4
0.6
0.8
1.0
yi
1.00
0.961
538
0.832
069
0.735
294
0.609
755
0.50
1
0.2
dx
1.0 0.50 2 0.961538 0.832069 0.735294 0.609759
2
1 x
2
0
0.783734
2.
f x y
Ans.
1.93
1.95
1.98
y f x
2.01
7.51
7.52
2.03
2.06
Here h = 0.01
and x axis from x 7.47 to x 7.52 is
7.52
Area
f x dx
7.47
Area
h
f x dx 2 y
7.47
y5 2 y1 y2 y3 y4
0.01
1.93 2.06 2 1.95 1.98 2.01 2.03
2
0.0996
x dx
3
3.
Evaluate
Ans.
Here
a 0, b 1, n 5 & y f x x 3
b a 1 0
0.2
n
5
0.2
0.4
0.6
0.8
0.008
0.064
0.216
0.512
By Trapezoidal rule
1
x dx 2 y
3
y4 2 y1 y2 y3
0.2
0.008 1 2 0.064 0.216 0.512
2
0.2592
4.
Evaluate
t sin tdt
0
0,
Divide the internal
Ans.
The values of
f t y
f t t sin t
/6
2 / 6
3 / 6
4 / 6
5 / 6
0.261
8
0.906
9
1.570
8
1.813
8
1.309
y5
y6
y1
y2
y3
y4
y0
By Trapezoidal rule
t sin tdt 2 y
y6 2 y1 y2 y3 y4 y5
11.7246
12
3.0695
2
5.
dx
find the value of 1 x by simpsons 1/3 rule. Hence obtain approximate
log e
value of
Ans.
1
x
1.125
1.25
1.375
1.5
1.625
1.75
1.875
0.888
8
0.8
0.727
2
0.666
6
0.615
3
0.571
4
0.533
3
0.5
y3
y4
y5
y6
y7
y0
y2
y1
y8
h
y0 y8 4 y1 y3 y5 y7 2 y2 y4 y6
3
0.125
1 0.5 4 0.8888 0.7272 0.6153 0.5333 2 0.8 0.6666 0.5714
3
0.125
1.5 11.0584 4.076
3
0.125
16.6344
3
0.6931
By actual integration,
dx
2
log x 1 log 2 log1 log 2
x
f cm / sec2
Ans.
10
20
30
40
50
60
70
80
30
31.6
3
33.3
4
35.4
7
37.7
5
40.3
3
43.2
5
46.6
9
50.6
7
v
t
80
fdt
0
10
30 50.67 4 31.63 35.47 40.33 46.63 2 33.34 37.75 43.25
3
10
80.67 616.48 228.68
3
10
925.83
3
30.86 m / sec
7.
Here
ydx
0
h
y0 y8 4 y1 y3 y5 y7 2 y2 y4 y6
Area = 3
10
0 3 4 4 9 15 8 2 7 12 14
3
10
3 144 66
3
710 sq. ft
8.
sin x dx
evaluate 0
by dividing the interval
using simpsons 1/3 rule
Ans.
a 0, b , n 8 & f x sin x
Given
0,
ba 0
/8
n
8
/8
/4
3 / 8
5 / 8
6 / 8
7 / 8
0.3
8
0.7
1
0.92
1.00
0.92
0.71
0
xi
sin xi
I f x dx
a
h
y0 y8 4 y1 y3 y5 y7 2 y2 y4 y6
3
1.99
1
9.
Ans.
1 x
dx
evaluate
using simpsons 3/8 rule
Divide the interval into 6 sub intervals & tabulate the values of
0
f xi
1
1 x 2 as
follows
xi
f xi 1
1/6
2/6
3/6
4/6
5/6
6/6
0.97
29
0.8
0
0.90
0.692
31
0.590
16
0.5
Here h 1/ 6
Using simpsons rule
1
1
3h
dx
y0 y6 3 y1 y2 y4 y5 2 y3
2
1
x
8
0
3
1.0 0.50 3 0.9729 0.30 0.6931 0.59016 2 0.80
8.6
0.785395
10.
x
find the area bounded by the curve y e
/2
, x axis between
Ans.
0,3
in to 6 sub intervals
30
0.5
6
x
The values of yi e
xi
0.
0
0.5
/2
1.0
1.5
2.0
2.5
3.0
y xi
1.
0
1.3
3
1.6
49
3.08
0
7.38
9
22.7
60
90.0
17
I e x /2 dx
2
3h
y0 y6 3 y1 y2 y4 y5 2 y3
8
3 0.5
1.00 90.017 3 1.133 1.649 7.389 22.760 2 3.080
8
Objective questions
1. for the data
ydx
2
a) 18
b) 16
c) 25
d) 32
f t
12
-1
3
12
b) 10
f (t )dt
3
d) 5
3.
xi, yi , I 1, 2....n
are n points,
y f x
dy
x & y given by them. Then the value of dx at x x0 using Newtons forward
differences is ____________
dy
x xn is ________
4. Newtons backward formula for dx at
7. if
f x
I f x dx
0
-2
12
8. The value of
9. The value of
x dx
1
10.The value of
x dx
1 x dx
0
11.The value of
12.The value of
1 x 2 dx
1 x dx
0
13.The value of
1 x 2 dx
using Simpsons 1/ 3 rule is ___________
14.The value of
1 x
dx
15.The value of
using trapezoidal rule _____________
sin x
0 x
16.The value of
by using weedles rule taking n = 6 is ______________
5
dx
0 4 x 5
17.The value of
by usinf Simpsons 1/3 rule taking n = 10 is __________
0
1 dx
18.The value of
using Simpsons 3/8 rule , dividing the range into
three equal parts is ____________
1
/2
sin d
19.The value of
intervals is _______
/2
1/2
21.The value of
22.The value of
dx
dx
1 x
0
6
24.The value of
23.The value of
sin d
dx
1 x
0
e dx
x
/2
26.The value of
using Simpsons
cos d
dividing the range in six equal parts is ___________
27.The value of
dx
1 x
0
6
30.The value of
31.For the data
dx
1 x
6
29.The value of
0
6
28.The value of
dx
1 x
dx
1 x
0
-1
12
20
If
y a0 a1 x
a)
a0 1.1381, a1 2.8966
b)
a0 1, a1 2
c)
a0 2.8966, a1 1.1381
d)
a0 1.1381, a1 2.8966
, the values of
a0 & a1
are
ASSIGNMENT QUESTIONS
dx
1 x
0
correct to 4 decimal
(Jntu 2007,08)
2.
dx
1 x
Evaluate
and compare the result in each case with its actual value
3.
Given
Time t
Temp
f t
81
75
70
83
78
70
60
Evaluate
f t dt
1
(Jntu 2006)
2.0
4.
Evaluate
y dx
0.6
(Jntu 2007)
0.6
0.8
1.0
1.2
1.4
1.6
1.8
2.0
1.2
3
1.5
8
2.0
3
4.3
2
6.2
5
8.3
8
10.2
3
12.4
5
5. Given that
x
4.0
4.2
4.4
4.6
4.8
5.0
5.2
log x
1.386
3
1.435
1
1.481
6
1.526
1
1.568
6
1.609
4
1.648
7
5.2
Evaluate
log x dx
4.0
picards method
2)
Elers method
3)
4)
5)
6)
dy/dx=f(x,y)-------(1)
initial condition is that
y=y0 at x=x0----(2)
the eqn is dy=f(x,y)dx
integrating the eqn between the limits x 0 and x1 we get
x x0
dy
y
i.e
f ( x, y ) dx
x0
x
x x0
y(x)-y(x0)=
f ( x, y )dx
x0
f ( x, y )dx
x0
or y(x)=y +
0
x0
f ( x, y )dx
----(3)
x0
f ( x, y0 )dx
------------(4)
y y
y 2 x y0 f ( x, y 1 ( x ))dx 5
x0
2
y 3 y0 f x, y
y
rd
x0
Similarly, a 3 approximation of
for y is
yn x y0 f x, y
x0
n 1
dx 7
or
yn y0 f
x0
y n x
dx 6
for y as
dy
f ( x, y )
dx
(1)
With the initial condition
y ( x0 ) y0
(2)
y ( x) y ( x0 )
In equ3,
( x x0 )
( x x0 ) 2
( x x0 ) n n
y ( x0 )
y ( x0 ) ............
y ( x0 )
1
2!
n!
(3)
When
x0 0
y ( x ) y (0) x. y(0)
x2
xn n
y (0) ......
y (0) ........
2!
n!
(4)
x
1. Using Taylors expansion evaluate the integral of y 2 y 3e , y (0) 0 , at
a) x 0.2
x
Given equation can be written as 2 y 3e y, y (0) 0
x 0
The Taylors series expansion of y ( x) about 0
is
y ( x ) y (0) xy (0)
x2
x3
x4
x5
y (0) y (0)
y (0) y (0) ....
2!
3!
4!
5!
y ( x) 0 3 x
y ( x) 3x
9 2 21 3 45 4 93 5
x x
x
x ........
2
6
24
120
9 2 7 3 15 4 31 5
x x x
x ........
2
2
8
40
equ1
9
7
15
31
y (0.1) 3(0.1) (0.1) 2 (0.1) 3 (0.1) 4 (0.1) 5
0.34869
2
2
8
40
Now put x 0.2 in equ1
9
7
15
31
y (0.2) 3(0.2) (0.2) 2 (0.2) 3 (0.2) 4 (0.2) 5
0.811244
2
2
8
40
9
7
15
31
y (0.3) 3(0.3) (0.3) 2 (0.3)3 (0.3) 4 (0.3) 5
1.41657075
2
2
8
40
Analytical Solution:
dy
2 y 3e x
dx
The exact solution of the equ
with y (0) 0 can be found as
follows
dy
2 y 3e x
dx
Which is a linear in y.
x
Here P 2, Q 3e
I.F =
pdx
2 dx
e 24
General solution is
y.e 2 x 3e x .e 2 x dx c 3e x c
y 3e x ce 2 x where x 0, y 0
0 3 c c 3
2x
x
2x
x
The particular solution is y 3e 3e or y ( x) 3e 3e
dy
x2 y2
dx
2. Using Taylors series method, solve the equation
for x 0.4
given that y 0 when x 0
Sol:
dy
x2 y 2
dx
Given that
and y 0 when x 0 i.e. y (0) 0
Here
y0 0 , x0 0
y( x) x 2 y 2 , y(0) 0 y 2 (0) 0 0 0
y( x) 2 x y.2 y, y(0) 2(0) y(0)2. y 0
y( x) 2 2 yy 2 y. y, y(0) 2 2. y (0). y(0) 2. y(0) 2 2
y( x) 2. y. y 2. y. y 4. y. y, y(0) 0
The Taylors series for f(x) about
y ( x ) y (0) xy (0)
x0 0
is
x2
x3
x4
y (0) y (0)
y (0) ...
2!
3!
4!
y ( x) 0 x(0) 0
y (0.4)
2 x3
x3
0 ........
3!
3 (Higher order terms are neglected)
(0.4)3 0.064
0.02133
3
3
2
3. Solve y x y , y (0) 1 using Taylors series method and compute
y(0.1),y(0.2)
Sol:
2
Given that y x y , y (0) 1
Here
y0 1 x0 0
,
y( x) x y 2 , y(0) 0 y (0) 2 0 1 1
y( x) 1 2 y. y, y(0) 1 2. y (0) y(0) 1 2( 1) 3
y( x) 1 2 yy 2( y) 2 , y(0) 2. y(0). y(0) 2.( y(0)) 2 6 2 8
y( x) 2. y. y 2. y. y 4. y. y, y(0) 2. y(0). y(0) 6. y(0). y(0) 16 18 34
The Taylors series for f(x) about x0 = 0 is
x2
x3
x
y(x) = y(0) + 1! y1(0) + 2! y11(0) + 3! y111(0) + ..
Substituting the value of y(0), y1(0), y11(0),..
3
8
34
2
3
y(x) = 1 x + 2 x - 6 x + 24 x4 +..
3
4
17
2
3
y(x) = 1 x + 2 x - 3 x + 12 x4 +..
(1)
3
4
17
y(0.1) = 1 0.1 + 2 (0.1)2 + 3 (0.1)3 + 12 (0.1)4 + ..
= 0.91380333 ~ 0.91381
Similarly put x = 0.2 in (1)
3
4
17
y(0.2) = 1 0.2 + 2 (0.2)2 - 3 (0.2)3 + 12 (0.2)4 + ..
= 0.8516.
4. Solve y1 = x2 y, y(0) = 1, using Taylors series method and compute
y(0.1), y(0.2), y(0.3) and y(0.4) (correct to 4 decimal places).
Sol. Given that yI = x2 y and y(0) = 1
Here x0 = 0, y0 = 1 or y =1 when x=0
Differentiating repeatedly w.r.t x and evaluating at x = 0.
YI(x) = x2 y,
yI(0) = 0 1 = -1
yII(x) = 2x yI,
yIII(x) = 2 yII,
yIII(0) = 2 yII(0) = 2 1 = 1,
yIV(x) = - yIII ,
x2
x3
x4
x
y(x) = y(0) + 1! yI(0) + 2! yII(0) + 3! yIII(0) + 4! yIV(0) +
substituting the values of y(0) , y1(0) , y11(0) , y111(0) ,
x2
x3
x4
y(x) = 1 + x (-1) + 2 (1) + 6 (1) + 24 (-1) +
x2
x3
x4
y(x) = 1 x + 2 + 6 - 24 +
(1)
0.1
y(0.1) = 1 0.1 +
0.1
0.1
24
+ .
0.2
y(0.2) = 1 0.2 +
0.2
0.2
64
dy
5. Solve dx -1 = xy and y(0) = 1 using Taylors series method and compute
y(0.1).
dy
Sol. Given that dx - 1 = xy and y(0) = 1
dy
Here dx = 1 + xy and y0 = 1, x0 = 0.
Differentiating repeatedly w.r.t x and evaluating at x 0 = 0
yI(x) = 1 + xy,
yI(0) = 1+0(1) = 1 .
yII(x) = x.y + y,
yII(0) = 0+1=1
yV(0) = 0 + 2 + 2(3) = 8
x2
x3
x4
x5
y(x) = y(0) + x.yI(0) + 2! yII (0) + 3! yIII(0) + 4! yIV(0) + 5! yV(0)+..
Substituting the values of y(0) , y I(0) , yII(0) , .
x2
x3
x4
x5
y(x) = 1 + x + 2 + 6 (2) + 24 (3) + 120 (8) + .
x2
x3
x4
x5
y(x) = 1 + x + 2 + 3 + 8 + 15 + .
(1)
(0.1) 2
(0.1)3
(0.1) 4
(0.1)5
2 + 3 + 8 + 15 + ..
y(0.1) = 1 + 0.1 +
= 1 + 0.1 +0.005 + 0.000333 + 0.0000125 + 0.0000006
= 1.1053461
H.W
6. Given the differential equ y1 = x2 + y2, y(0) = 1.Obtain y(0.25), and y(0.5)
by Taylors
Series method.
Ans: 1.3333, 1.81667
7. Solve y1 = xy2 + y, y(0) =1 using Taylors series method and compute
y(0.1) and y(0.2).
Ans: 1.111, 1.248.
Note:
We know that the Taylors expansion of y(x) about the point x 0 in a power of
(x x0)is.
( x x0 ) 2
( x x0 )3
( x x0 )
1! yI(x0) +
2! yII(x0) +
3! yIII(x0) + (1)
y(x) = y(x0) +
Or
( x x0 ) 2
( x x0 )3
( x x0 )
y0I
y0II
y0III
1!
2!
3!
y(x) = y0 +
+
+
+ ..
If we let x x0 = h. (i.e. x = x0 + h = x1) we can write the Taylors series as
h2
h3
h4
h
I
II
III
IV
y(x) = y(x1) = y0 + 1! y0 + 2! y0 + 3! y0 + 4! y0 + .
h2
h3
h IV IV
h
y0
I
II
III
i.e. y1 = y0 + 1! y0 + 2! y0 + 3! y0 + 4!
+ ..
(2)
Similarly expanding y(x) in a Taylors series about x = x 1. We will get.
h I
y1
y2 = y1 + 1!
h 2 II
y1
2!
h3 III
y1
3!
h 4 IV
y1
4!
+ .
(3)
Similarly expanding y(x) in a Taylors series about x = x 2 We will get.
h I
h 2 II
h3 III
h 4 IV
y2
y2
y2
y2
y3 = y2 + 1!
+ 2!
+ 3!
+ 4!
+ ...
(4)
In general, Taylors expansion of y(x) at a point x= x n is
h I
h 2 II
h3 III
h 4 IV
yn
yn
yn
yn
yn+1 = yn + 1!
+ 2!
+ 3!
+ 4!
+ ..
(5)
4. Solve y1 = x-y2, y(0) = 1 using Taylors series method and evaluate y(0.1),
y(0.2).
(1)
Given y1 = x y2
Sol:
(2)
and y(0) = 1
Here
x0 = 0, y0 = 1.
(3)
(4)
= 0-1 = -1,
Take h=0.1
Step1: By Taylors series, we have
h 2 II
h3 III
h 4 IV
h I
y0
y0
y0
y0
y1 = y0 + 1!
+ 2!
+ 3!
+ 4!
+ ..
(6)
I
II
on substituting the values of y0, y0 , y0 , etc in equ (6) we get
(0.1) 2
(0.1)3
(0.1) 4
0.1
2 (3) + 6 (-8) + 24 (34) + .
y(0.1) = y1 = 1 + 1 (-1) +
= 1 0.1 + 0.015 0.00133 + 0.00014 +
= 0.91381
Step2: Let us find y(0.2), we start with (x1,y1) as the starting value.
Here x1 = x0 + h = 0+0.1 = 0.1 and y1 = 0.91381
Put these values of x1 and y1 in (1),(3),(4) and (5),we get
y1I = x - y12 = 0.1 (0.91381)2 = 0.1 0.8350487 = -0.735
1
y1II
-5.363112
y1IV
I
II
III
= - 2[3. y1 y1 + y1 y1 ] = - 2[3.(-0.735) (2.3433) + (0.91381) (-
5.363112)]
= -2[(-5.16697) 4.9] = 20.133953
By Taylors series expansion,
h 2 II
h3 III
h 4 IV
h I
y1
y1
y1
y1
y2 = y1 + 1!
+ 2!
+ 3!
+ 4!
+ .
(0.1) 2
2 (2.3433) +
y(0.2) = y2 = 0.91381 + (0.1) (-0.735) +
(0.1)3
(0.1) 4
6 (-5.363112) + 24 (20.133953) + .
y(0.2) = 0.91381 0.0735 + 0.0117 0.00089 + 0.00008
= 0.8512
5. Tabulate y(0.1), y(0.2) and y(0.3) using Taylors series method given that
y1 = y2 + x
and y(0) = 1
Sol:
Given y1 = y2 + x
and y(0) = 1
(1)
(2)
Here x0 = 0, y0 = 1.
Differentiating (1) w.r.t x, we get
y II = 2y yI + 1
y III = 2[y y II + (yI)2]
(3)
(4)
y IV = 2[y y III + yI y II + 2 yI y II ]
= 2[y y
III
II
+ 3 yI y ]
(5)
= (1)2 + 0 = 1
= 34
Take h = 0.1.
Step1: By Taylors series expansion, we have
h 2 II
h3 III
h 4 IV
h I
y
y0
y
y0
0
0
y(x1) = y1 = y0 + 1!
+ 2!
+ 3!
+ 4!
+ .
(6)
I
II
on substituting the values of yo, y0 , y0 etc in (6),we get
(0.1) 2
(0.1)3
(0.1) 4
2 (3) + 6 (8) + 24 (34) + .
y(0.1) = y1 = 1 + (0.1)(1) +
= 1 + 0.1 + 0.015 + 0.001333 + 0.000416
y1 = 1.116749
Step2: Let us find y(0.2),we start with (x1,y1) as the starting values
Here x1 = x0 + h = 0 + 0.1 = 0.1 and y1 = 1.116749
Putting these values in (1),(3),(4) and (5), we get
y1I = y12 +x = (1.116749)2 + 0.1 = 1.3471283
1
y1II
III
I
II
= 2y1 y1 + 6 y1 y1 = 2(1.116749) (12.5831) + 6(1.3471283) (4.0088) =
60.50653
By Taylors expansion
h 2 II
h3 III
h 4 IV
h I
y1
y1
y1
y1
y(x2) = y2 = y1 + 1!
+ 2!
+ 3!
+ 4!
+ .
(0.1) 2
(0.1)3
2 (4.0088) + 6
y(0.2) = y2 = 1.116749 + (0.1) (1.3471283) +
(12.5831)
(0.1)4
+ 24 (60.50653)
y2 = 1.116749 + 0.13471283 + 0.020044 + 0.002097 + 0.000252
= 1.27385
y(0.2) = 1.27385
Step3: Let us find y(0.3),we start with (x2,y2) as the starting value.
Here x2 = x1 + h = 0.1 + 0.1 =0.2 and y2 = 1.27385
Putting these values of x2 and y2 in eq (1), (3), (4) and (5), we get
y2I
2
= y2 + x2 = (1.27385)2 + 0.2 = 1.82269
II
I
= 2[y2 y2 + ( y2 )2 ] = 2[(1.27385) (5.64366) + (1.82269)2]
h 2 II
h3 III
h 4 IV
h I
y2
y2
y2
y2
y(x3) = y3 = y2 + 1!
+ 2!
+ 3!
+ 4!
+ ..
(0.1) 2
(0.1)3
2 (5.64366) + 6 (21.02274)
y(0.3) = y3 = 1.27385 + (0.1) (1.82269) +
(0.1) 4
+ 24 (115.27949)
= 1.27385 + 0.182269 + 0.02821 + 0.0035037 + 0.00048033
= 1.48831
y(0.3) = 1.48831
6. Solve y1 = x2 y, y(0) = 1 using Taylors series method and evaluate
y(0.1),y(0.2),y(0.3) and y(0.4) (correct to 4 decimal places)
Sol:
Given y1 = x2 y
and y(0) = 1
(1)
(2)
Here x0 = 0, y0 = 1
Differentiating (1) w.r.t x, we get
yII = 2x y1
(3)
yIII = 2- yII
(4)
yIV = -yIII
(5)
2
= x0 - y0 = 0-1 = -1,
II
= 2- y0 = 2-1 = 1,
y0IV = - y0III = -1
Take h = 0.1
h2
h3 III
h 4 IV
h
y0
y0
I
II
y(x1) = y1= y0 + 1! y0 + 2! y0 + 3!
+ 4!
+ .
(6)
I
II
On substituting the values of y0, y0 , y0 etc in (6), we get
(0.1) 2
(0.1)3
(0.1) 4
2 (1) + 6 (1) + 24 (-1)+.
y(0.1) = y1 = 1+ (0.1) (-1) +
= 1-0.1 + 0.005 + 0.01666 0.0000416
= 0.905125 ~ 0.9051 (4 decimal place).
Step2: Let us find y(0.2) we start with (x1,y1) as the starting values
Here x = x0 + h = 0 + 0.1 = 0.1 and y1 = 0.905125,
Putting these values of x1 and y1 in (1), (3), (4) and (5), we get
y11 = x12 - y = (0.1)2 0.905125 = -0.895125
1
y1II
1
= 2x1 - y1 = 2(0.1) (-0.895125) = 1.095125,
III
= - y1 = -0.904875,
h2
h3 III
h 4 IV
h
y1
y1
I
II
y(x2) = y2 = y1 + 1! y1 + 2! y1 + 3!
+ 4!
+.
(0.1) 2
(0.1)3
2 (1.09125) + 6
y(0.2) = y2 = 0.905125 + (0.1)(-0.895125) + +
(0.1) 4
(1.095125) + 24 (-0.904875)+.
y(0.2) = y2 = 0.905125 0.0895125 + 0.00547562 + 0.000150812
0.0000377
= 0.8212351 ~ 0.8212 (4 decimal places)
Step3: Let us find y(0.3), we start with (x2,y2) as the starting value
Here x2 = x1 + h = 0.1+ 0.1 = 0.2 and y2 = 0.8212351
Putting these values of x2 and y2 in (1),(3),(4), and (5) we get
y12
x22
II
= 2 - y2 = 2 1. 1812351 = 0.818765,
h2
h3 III
h 4 IV
h
y2
y2
I
II
y(x3) = y3 = y2 + 1! y2 + 2! y2 + 3!
+ 4!
+.
(0.1) 2
2 (1.1812351) +
y(0.3) = y3 = 0. 8212351 + (0.1)(-0.7812351) +
(0.1)3
6
(0.1) 4
(0.818765) + 24 (-0.818765)+.
y(0.3) = y3 = 0. 8212351 0.07812351+ 0.005906 + 0.000136 0.0000034
= 0.749150 ~ 0.7492 (4 decimal places)
Step4: Let us find y(0.4), we start with (x3,y3) as the starting value
Here x3 = x2 + h = 0.2+ 0.1 = 0.3 and y3 = 0.749150
Putting these values of x3 and y3 in (1),(3),(4), and (5) we get
y31 = x32 - y = (0.3)2 0.749150= -0.65915,
3
y3II
1
= 2x3 - y3 = 2(0.3) + (0.65915) = 1.25915,
y3III
II
= 2 - y3 = 2 1. 25915 = 0.74085,
h2
h3 III
h 4 IV
h
y3
y3
I
II
y(x4) = y4 = y3 + 1! y3 + 2! y3 + 3!
+ 4!
+.
(0.1) 2
2 (1.25915) +
y(0.4) = y4 = 0. 749150 + (0.1)(-0.65915) +
(0.1)3
6
(0.1) 4
(0.74085) + 24 (-0.74085)+.
y(0.4) = y4 = 0. 749150 0.065915+ 0.0062926+ 0.000123475 0.0000030
= 0.6896514 ~ 0.6896 (4 decimal places)
EULERS METHOD
It is the simplest one-step method and it is less accurate. Hence it has a limited
application.
dy
Consider the differential equation dx = f(x,y)
(1)
(2)
With y(x0) = y0
(3)
where h = x1 x0
Similarly at x = x2 , y2 = y1 + h f(x1,y1),
Proceeding as above, yn+1 = yn + h f(xn,yn)
This is known as Eulers Method
6. Solve y1 = x2 y, y(0) = 1using T.S.M and evaluate y(0.1),y(0.2),y(0.3) and y(0.4)
(correct to 4 decimal place ) 0.9051, 0.8212, 07492, 0.6896
7. Given the differentiating equation y 1 = x1 + y2, y(0) = 1. Obtain y(0.25) and y(0.5) by
T.S.M.
Ans:
1.3333, 1.81667
1
8. Solve y = xy2 + y, y(0) = 1 using Taylors series method and evaluate y(0.1) and
y(0.2)
Ans:
1.111, 1.248.
dy
1. Using Eulers method solve for x = 2 from dx = 3x2 + 1,y(1) =
2,taking step size
(1)
x1 = x0 + h = 1+0.5 = 1.5
h = 0.5
x 2 = x1 + h = 1.5 + 0.5 = 2
y1 = y0 + h f(x0,y0)
i.e.
(II)
h = 0.25
Taking n = 0 in (1), we have
y1 = y0 + h f(x0,y0)
i.e.
= 4.42188
Here x2 = x1 + h = 1.25 + 0.25 = 1.5
y(1.5) = 5.42188
y(x3) = y3 = h f(x2,y2)
= 5.42188 + (0.25) f(1.5,2)
= 5.42188 + (0.25) [3(1.5) 2 + 1]
= 6.35938
y(2) = y2 = 10
y1 = 1.1 = y(0.1),
y2 = y(0.2) = 1.22
y3 = y(0.3) = 1.362
X
Euler y
0.1
0.2
0.3
1.1
1.22
1.362
1
Euler y
1.11034
.3428
1.3997
The
value of y deviate from the execute value as x increases. This indicate that the
method is not accurate
3. Solve by Eulers method y1 + y = 0 given y(0) = 1 and find y(0.04)
taking step size
h = 0.01
Ans:
0.9606
4. Using Eulers method, solve y at x = 0.1 from y1 = x+ y +xy, y()) = 1
taking step size
h = 0.025.
dy
5. Given that dx = xy ,y(0) = 1 determine y(0.1),using Eulers method.
b=0.1
dy
Sol: The given differentiating equation is dx = xy, y(0) = 1
a=0
Here f(x,y) = xy , x0 = 0 and y0 = 1
Since h is not given much better accuracy is obtained by breaking up the interval
(0,0.1) in to five steps.
ba
0.1
i.e. h = 5 = 5 = 0.02
Eulers algorithm is yn+1 = yn + h f(xn,yn)
From (1) form = 0, we have
y1 = y0 + h f(x0,y0)
= 1 + (0.02) f(0,1)
= 1 + (0.02) (0)
(1)
=1
Next we have x1 = x0 + h = 0 + 0.02 = 0.02
From (1), form = 1,we have
y2 = y1 + h f(x1,y1)
= 1 + (0.02) f(0.02,1)
= 1 + (0.02) (0.02)
= 1.0004
Next we have x2 = x1 + h = 0.02 + 0.02 =0.04
From (1), form = 2,we have
y3 = y2 + h f(x2,y2)
= 1.004 + (0.02) (0.04) (1.0004)
= 1.0012
Next we have x3 = x2 + h = 0.04 + 0.02 =0.06
From (1), form = 3,we have
y4 = y3 + h f(x3,y3)
= 1.0012 + (0.02) (0.06) (1.00012)
= 1.0024.
Next we have x4 = x3 + h = 0.06 + 0.02 =0.08
From (1), form = 4,we have
y5 = y4 + h f(x4,y4)
= 1.0024 + (0.02) (0.08) (1.00024)
= 1.0040.
Next we have x5 = x4 + h = 0.08 + 0.02 =0.1
When x = x5, y~y5
y = 1.0040 when x = 0.1
2y
6. Solve by Eulers method y1 = x given y(1) = 2 and find y(2).
dy
7. Given that dx = 3x2 + y, y(0) = 4.Find y(0.25) and y(0.5) using
Eulers method
dy
Sol: given dx = 3x2 + y and y(1) = 2.
Here f(x,y) = 3x2 + y , x0 = (1), y0 = 4
Consider h = 0.25
Eulers algorithm is yn+1 = yn + h f(xn,yn)
(1)
y1 = y0 + h f(x0,y0)
= 2 + (0.25)[0 + 4]
=2+1
=3
Next we have x1 = x0 + h = 0 + 0.25 = 0.25
When x = x1, y1 ~ y
y = 3 when x = 0.25
From (1), for n = 1, we have
y2 = y1 + h f(x1,y1)
= 3 + (0.25)[3.(0.25)2 + 3]
= 3.7968
Next we have x2 = x1 + h = 0.25 + 0.25 = 0.5
When x = x2, y ~ y2
y = 3.7968 when x = 0.5.
yx
dy
8. Solve first order diff equation dx = y x , y(0) = 1 and estimate
y(0.1) using Eulers method (5 steps)
Ans:
1.0928
dy
9. Use Eulers method to find approximate value of solution of dx = yx + 5 at x = 2-1 and 2-2with initial contention y(0.2) = 1
It is given by
Working rule :
i)Modified Eulers method
k 1
i 1
yk h / 2 f xk , yk f xk 1 ,1 k 1 , i 1, 2....., ki 0,1.....
0
ii) When i 1 y k 1 can be calculated from Eulers method
y1 y0 h / 2 f x0 , y0 f x1 , y1
We get
1
i 1
(3)
y1 0 y0 h / 2 f x0 , y0
y1 1 y0 h / 2 f x0 , y0 f x1 , y1 0
y1 2 y0 h / 2 f x0 , y0 f x1 , y1 1
------------------------
y1 k 1 y0 h / 2 f x0 , y0 f x1 , y1 k
y2 y x2 y x1 h
dy / dx x y and y 0 1
Given
Here
dy / dx x y and y 0 1
f x, y x y, x0 0, and y0 1
yk 1 i yk h / 2 f xk yk f xk 1 , yk 1 i 1 1
yk 1 y0 h / 2 f x0 y0 f x1 , y1
when
i 1
y0 h f x0 , y0
= 1+(0.1)f(0.1)
= 1+(0.1)
= 1.10
y1 1 y0 0.1/ 2 f x0 , y0 f x1 , y1 0
= 1+0.1/2[f(0,1) + f(0.1,1.10)
= 1+0.1/2[(0+1)+(0.1+1.10)]
= 1.11
When i=2 in eqn (2)
y1 2 y0 h / 2 f x0 , y0 f x1 , y1 1
= 1+0.1/2[f(0.1)+f(0.1,1.11)]
= 1 + 0.1/2[(0+1)+(0.1+1.11)]
= 1.1105
y1 3 y0 h / 2 f x0 , y0 f x1 , y1 2
= 1+0.1/2[f(0,1)+f(0.1 , 1.1105)]
= 1+0.1/2[(0+1)+(0.1+1.1105)]
= 1.1105
Since
y1 2 y1 3
y1 = 1.1105
Step:2
i = 1 in eqn (2)
y1 i y0 h / 2 f x0 , y0 f x1 , y1 0
y1
(0)
1
= y1
y2 y1 h / 2 f x1 , y1 f x2 , y2
i 1
I = 1,2,3,4,..
For i = 1
y2 1 y1 h / 2 f x1 , y1 f x2 , y2 0
y2 0
y2 0 y1 h f x1 , y1
= 1.1105 + (0.1) f(0.1 , 1.1105)
= 1.1105+(0.1)[0.1+1.1105]
= 1.2316
(1)
2
= 1.1105 +0.1/2[0.1+1.1105+0.2+1.2316]
= 1.2426
y2 2 y1 h / 2 f x1 , y1 f x2 y2 1
y2 3 y1 h / 2 f x1 , y1 f x2 y2 2
= 1.1105+0.1/2[f(0.1,1.1105)+f(0.2 , 1.2432)]
= 1.1105+0.1/2[1.2105+1.4432)]
= 1.1105 + 0.1(1.3268)
= 1.2432
Since
y 2 3 y 2 3
Hence y2 = 1.2432
Step:3
To find y3 = y(x3) = y y(0.3)
Taking k =2 in eqn (1) we get
y3 1 y2 h / 2 f x2 , y2 f x3 , y3 i 1 4
For i = 1 ,
y3 1 y2 h / 2 f x2 , y2 f x3 , y3 0
y2 h f x2 , y2
= 1.2432 +(0.1) f(0.2 , 1.2432)
= 1.2432+(0.1)(1.4432)
= 1.3875
y3
2
1
y3 y2 h / 2 f x2 , y2 f x3 , y3
= 1.2432+0.1/2[1.4432+(0.3+1.3997)]
= 1.2432+ (0.1) (1.575)
= 1.4003
3
2
y3 y2 h / 2 f x2 , y2 f x3 , y3
y3 4 y2 h / 2 f x2 , y2 f x3 , y3 3
= 1.2432 + 0.1/2[1.4432+1.7004]
= 1.2432+(0.1)(1.5718)
= 1.4004
y3 3 y3 4
Since
Hence
y3 1.4004
dy
2 . Find the solution of dx = x-y , y(0)=1 at x =0.1 , 0.2 ,0.3 , 0.4 and 0.5 .
Using modified
Eulers method
dy
Sol . Given dx = x-y and y(0) = 1
Here f(x,y) = x-y , x0 = 0 and y0 = 1
Consider
h = 0.1 so that
yk 1 yk h / 2 f xk , yk fxk 1 , yk 1
i
i = 1, 2, 3,..
f xk , yk xk yk 1 f x , y f x , y i 1
k
k
k 1
k 1
2
i 1
yk 1 i yk h / 2 f xk , yk f xk 1 , yk 1 i 1
K=
0
0.0
0-1=-1
1+(0.1)(-1)=0.9 =
y1 0
0.1(i=1)
0-1=-1
0.1(i=2)
0-1=-1
(-1-0.81)= -0.905
1+(0.1)(-0.905)=0.9095
0.1(i=3)
0-1=-1
(-1-0.80.95)=
-0.90475
1+(0.1)(0.90475)=0.9095
0.1
0.1-0.9095=
-0.8095
0.9095+(0.1)(0.8095)=0.82855
0.2(i=1)
-0.8095
0.2(i=2)
-0.8095
(-0.8095-0.6376)
0.9095+(0.1)(0.72355)=0.8371
0.2(i=3)
-0.8095
(-0.8095-0.6371)
0.9095+(0.1)(0.7233)=0.8372
(-1-0.8) = -0.9
1+(0.1)(-0.9)=0.91
K=1
0.2(i=4)
(-0.8095-0.62855)
0.9095+(0.1)(0.719025)=0.8376
-0.8095
(-0.8095-0.6372)
0.9095+(0.1)(0.72355)=0.8371
0.2
0.2-0.8371=0.6371
0.8371+(0.1)(0.6371)=0.7734
0.3(i=1)
= -0.6371
(-0.6371-0.4734)
0.8371+(0.1)(0.555)=0.7816
0.3(i=2)
= -0.6371
(-0.6371-0.4816)
0.83710.056=0.7811
0.3(i=3)
= -0.6371
(-0.6371-0.4811)
0.83710.05591=0.7812
0.3(i=4)
= -0.6371
(-0.6371-0.4812)
0.8371-0.055915
= 0.7812
K=2
K =3
0.3(i=1)
0.3-0.7812
0.7812+(0.1)(0.4812) = 0.7331
0.4(i=1)
-0.4812
(-0.4812-0.4311)
0.7812-0.0457 =
0.7355
0.4(i=2)
-0.4812
(-0.4812-0.4355)
0.7812-0.0458 =
0.7354
0.4(i=3)
-0.4812
(-0.4812-0.4354)
0.7812-0.0458 =
0.7354
0.4
-0.3354
0.7354-0.03354 =
0.70186
0.5
-0.3354
(-0.33540.301816)
0.7354-0.03186 =
0.7035
0.5
-0.3354
(-0.33540.30354)
0.7354-0.0319 =
0.7035
K=4
K2 = h (xi+h/2, y0+k1/2)
K3 = h (xi+h, yi+2k2-k1)
For i= 0,1,2-------
dy / dx xy 2 , y 0 2
Sol: Given
dy
dx =
x y
x , y(2) = 2 .
y 2.5
dy
x y
from dx = x , y(2)=2 ,
x y
Here f(x, y) = x , x0 = 0 , y0=2 and h = 0.25
x1 = x0+h = 2+0.25 = 2.25 , x2 = x1+h =2.25+0.25 = 2.5
yi 1 yi 1/ 2 k1 k 2 , k1 hf xi h, yi k1 , i 0,1.... 1
Step -1:To find y(x1)i.e y(2.25) by second order R - K method taking i=0 in eqn(i)
We have
y1 y0
1
k1 k2
2
=2.514
Step2:
To find y(x2) i.e., y(2.5)
i=1 in (1)
x1=2.25,y1=2.514,and h=0.25
y2=y1+1/2(k1+k2)
where k1=h f((x1,y1 )=(0.25)f(2.25,2.514)
=(0.25)[2.25+2.514/2.25]=0.5293
=(0.25)[2.5+2.514+0.5293/2.5]
=0.55433
y2 y
(2.5)=2.514+1/2(0.5293+0.55433)
=3.0558
y =3.0558 when x = 2.5
x2 = x1+h = 0.2
Second order:
step1: To find y(x1) i.e y(0.1) or y1
by second-order R-K method,we have
y1 = y0+1/2(k1+k2)
where k1=hf(x0,y0)=(0.1) f(0,1) = (0.1)(-1)= - 0.1
k2= hf (x0+h, y0+k1)= (0.1) f (0.1, 1-0.1) = (0.1)(-0.9) = -0.09
y1=y(0.1)=1+1/2(-0.1-0.09)=1-0.095=0.905
y =0.905 when x=0.1
Step2:
To find y2 i.e y(x2) i.e y(0.2)
Here x1 = 0.1, y1 = 0.905 and h=0.1
By second-order R-K method, we have
y2 = y(x2)= y1+1/2(k1+k2)
Where
k1 h f x1 , y1
=(0.1)f(0.1,0.905)=(0.1)(-0.905)=-0.0905
y1 y0 1/ 6 k1 4k 2 k3
where k1 = h f(x0, y0) = (0.1) f (0.1) = (0.1) (-1) = -0.1
and k3 = h f((x0+h,y0+2k2-k1)
(0.1) f (0.1,1+2(-0.095)+0.1)= -0.905
Hence y1 = 1+1/6(-0.1+4(-0.095)-0.09) = 1+1/6 (-0.57) = 0.905
y1=0.905 i.e y(0.1)= 0.905
Step2:
To find y2,i.e y(x2)= y(0.2)
Here x1=0.1,y1=0.905 and h = 0.1
Again by 2nd order R-K method
y2 = y1+1/6(k1+4k2+k3)
3. Apply the 4th order R-K method to find an approximate value of y when x=1.2 in
steps
of 0.1,given that
y1 = x2+y2,y (1)=1.5
sol.
=0.39698
k4=hf(x0+h,y0+k3)=(0.1)f(1.0,1.89698)
=0.48085
Hence
1
y1 1.5 0.325 2 0.3866 2 0.39698 0.48085
6
1.8955
Step2:
To find y2, i.e.,
y x2 y 1.2
4. using R-K method, find y(0.2) for the eqn dy/dx=y-x,y(0)=1,take h=0.2
Ans:1.15607
5.Given that y1=y-x,y(0)=2 find y(0.2) using R- K method take h=0.1
Ans: 2.4214
10
dy
x2 y 2 , y 0 1
dx
take h = 0.1
Step1
To find y1 i.e y(x1)=y(0.1)
By R-K method,we have
y1=y0+1/6 (k1+2k2+2k3+k4)
Where k1=hf(x0,y0)=(0.1)f(0,1)=(0.1) (1)=0.1
k2= hf (x0+h/2,y0+k1/2)=(0.1)f(0.05,1.05)=0.11
and k3=hf((x0+h/2,y0+k2/2)=(0.1)f(0.05,1+0. 11/2)=(0.1)[(0.05) +(4.0.11/2)]
=0.1105
k4=h f (x0+h,y0+k3)=(0.1)f(0.1,1.1105)=(0.1)[0.1+1.1105]
=0.12105
Hence
y1 y 0.1 1
1
0.1 0.22 0.240 0.12105
6
y = 1.11034
Step2:
To find y2 i.e y(x2) = y(0.2)
Here x1=0-1, y1=1.11034 and h=0.1
Again By R-K method,we have
y2=y1+1/6(k1+2k2+2k3+k4)
k1=h f(x1,y1)=(0.1)f(0.1,1.11034)=(0.1) [1.21034]=0.121034
k2= h f (x1+h/2, y1+k1/2)=(0.1)f(0.1+0.1/2,1.11034+0.121034/2)
=0.1320857
and k3=h f((x1+h/2,y1+k2/2)=(0.1)f(0.15,1.11034+0.1320857/2)
=0.1326382
k4=h f(x1+h,y1+k3)=(0.1)f(0.2,1.11034+0.1326382)
(0.1)(0.2+1.2429783)=0.1442978
Hence y2=1.11034+1/6(0.121034+0.2641714+0.2652764+0.1442978
=1.11034+0.1324631 =1.242803
y =1.242803 when x=0.2
ynp1 yn
h
[55 f n 59 f n 1 37 f n 2 9 f n 3 ]
24
p
The subscript p indicates that yn 1 is predicted value.
ync1 yn
h
[9 f np1 19 f n 5 f n 1 f n 2 ]
24
c
The subscript c indicates that yn 1 is a corrected value.
information about
previous four points, to predict the fifth value. If in any problem these values are not
given we can find them by using Taylors series or Eulers method or R-k method
1.
dy 1
xy
dx 2
Given
and
Sol:
Here
f ( x, y )
1
xy
2
To find
y4
i.e.
y ( x4 ) y (0.4)
ynp1 yn
h
[55 f n 59 f n 1 37 f n 2 9 f n 3 ]
24
equ1
y4p y3
h
[55 f3 59 f 2 37 f1 9 f 0 ]
24
1
f 0 f ( x0 , y0 ) f (0,1) (0) 0
2
1
f1 f ( x1 , y1 ) f (0.1,1.0025) (0.1)(1.0025) 0.0501
2
1
f 2 f ( x2 , y2 ) f (0.2,1.0101) 0.1 1.0101 0.1010
2
1
f 3 f ( x3 , y3 ) f (0.3,1.0228) (0.3)(1.0228) 0.1534
2
Hence
y4p
1.0228
0.1
[55(0.1534) 59(0.1010) 37(0.0501) 9(0)] 1.0408
24
f 4p f ( x4 , y4p ) f (0.4,1.0408)
1
(0.4)(1.0408) 0.20816
2
ync1 yn
h
[9 f np1 19 f n 5 f n 1 f n 2 ]
24
equ2
y4c y3
h
[9 f 4p 19 f 3 5 f 2 f1 ]
24
1.0228
0.1
[9(0.20816) 19(0.1534) 5(0.1010) 0.0501]
1.0408
24
y (0.2) 0.82127, y (0.3) 0.74918 . Find y (0.4) using Adam bashforth Moulton
method.
p
c
Ans: y4 0.68967 and y4 0.6897 (correct to four decimal places)
dy
x y2
3. Given dx
and y (0) 0, y (0.2) 0.02, y (0.4) 0.0795, y (0.6) 0.1762
estimate y (0.8) using Adams-Moulton method.
Ans: 0.2416 {by Milnes method 0.3046]
dy
2e x . y, y (0) 2
dx
4. If
find y (0.4) using Adams predictor corrector formula by
calculating y (0.1), y (0.2) and y (0.3) using Eulers modified formula.
2
5. Given y 1 y , y (0) 0 . Find the initial values y (0.2), y (0.4) and y (0.6) using
2
Here f ( x, y ) 1 y
and
y0 0
y1 y ( x1 ) y (0.2)
y1 0.2027
Step2:To find
y2 y ( x2 ) y (0.4)
y2 0.4228
Step3:To find
y3 y ( x3 ) y (0.8)
y3 0.6841
y1 0.2027 , y2 0.4228 , y3 0.6841
To find
y4 y ( x4 ) y (0.8)
ynp1 yn
h
[55 f n 59 f n 1 37 f n 2 9 f n 3 ]
24
equ1
y4p y3
h
[55 f3 59 f 2 37 f1 9 f 0 ]
24
f 0 f ( x0 , y0 ) f (0, 0) 1
f1 f ( x1 , y1 ) f (0.2, 0.2027) 1 (0.2027) 2 1.0411
f 2 f ( x2 , y2 ) f (0.4, 0.4228) 1 (0.4228) 2 1.1787
f 3 f ( x3 , y3 ) f (0.6, 0.6841) 1 (0.6841) 2 1.4680
Hence
y4p 0.6841
0.2
[55(1.4680) 59(1.1787) 37(1.0411) 9(1)] 1.0234
24
ync1 yn
h
[9 f np1 19 f n 5 f n 1 f n 2 ]
24
equ2
y4c y3
h
[9 f 4p 19 f 3 5 f 2 f1 ]
24
Hence
y4c 0.6841
(0.2)
[9(2.0473) 19(1.4680) 5(1.1787) 1.0411] 1.0296
24
y4 y (0.8) is 1.0296
y (0.8) 1.0296
6. Compute y (0.1), y (0.2), y (0.3) from the initial value problem
dy
xy y 2 , y (0) 1
dx
using R-K method and evaluate y (0.4) by AdamsBashforth-Moulton method.
Ans: 1.8389
dy
x y
7. Find the solution of dx
at x 0.5 subject to condition y 1 at x 0
and h 0.1 using Adams-bashforth-Moulton method. Use Eulers method
initially.
Sol:
Here f ( x, y ) x y
and
y0 1
To find
and
y4 0.7122
y5 y ( x5 ) y (0.5) :
Adams-Bashforth-Moulton formula is
ynp1 yn
h
[55 f n 59 f n 1 37 f n 2 9 f n 3 ]
24
equ1
y5p y4
h
[55 f 4 59 f 3 37 f 2 9 f1 ]
24
y5p
(0.1)
= 0.7122 + 24 [55(-0.3122) + 59 (0.458) -37 (0.62) + 9 (0.8)]
=0.6877
Adams- Moulton corrector formula is
ync1
yn
h
p
+ 24 [9 f n 1 +19 f n -5 f n 1 + f n 2 ]
equ2
y4
h
p
f
f
+ 24 (9 f 5 +19 f 4 -5 3 + 2 )
(0.1)
c
Hence y5 =0.7122+ 24 [9(-0.1877)-19(0.3122)+5(0.458)-0.62] =0.6874
y(0.5) = 0.6874.
8. Use Adams method to find y(0.4) from y1=xy+y2, y(0)=1 Find the initial
values y(0.1), y(0.2) and y(0.3) from the Taylors series method.
Sol:
y ( x ) y (0) x. y (0)
x2
x3
y (0) y(0)
2!
3!
equ1
2
2
Here y xy y , y (0) x0 y0 y0 1
y x. y y 2 yy, y(0) x0 y0 y0 2 y0 y0 3
y x. y y y 2. y. y 2( y ) 2 , y(0) 2 6 2 10
3 2 5 3
x x
3
y(x)=1+x+ 2
3
5
y1 y (0.1) 1 0.1 (0.1) 2 (0.1)3 ...
2
3
=1+0.1+0.015+0.0016667=1.1166
3
5
y2 y (0.2) 1 0.2 (0.2) 2 (0.2) 3
1 0.2 0.06 0.0133333 1.2733
2
3
3
5
y3 y (0.3) 1 0.3 (0.3) 2 (0.3)3
1 0.3 0.135 0.045 1.480
2
3
To find
y4 y ( x4 ) y (0.4)
ynp1 yn
h
[55 f n 59 f n 1 37 f n 2 9 f n 3 ]
24
equ1
y4p y3
h
[55 f3 59 f 2 37 f1 9 f 0 ]
24
f 0 f ( x0 , y0 ) f (0,1) 0 1 1
f1 f ( x1 , y1 ) f (0.1,1.1166) (0.1)(1.1166) (1.1166) 2 1.3584
f 2 f ( x2 , y2 ) f (0.2,1.2733) (0.2)(1.2733) (1.2733) 2 1.8759
f3 f ( x3 , y3 ) f (0.3,1.480) (0.3)(1.480) (1.480) 2 2.6344
Hence
y4p 1.480
(0.1)
[55(2.6344) 59(1.8759) 37(1.3584) 9(1)]
1.7944
24
ync1 yn
h
[9 f np1 19 f n 5 f n 1 f n 2 ]
24
equ2
y4c y3
h
[9 f 4p 19 f 3 5 f 2 f1 ]
24
Hence,
y4c 1.48
0.1
[9(3.9376) 19(2.6344) 5(1.8759) 1.3584]
24
y4c 1.80279
Equ 7 gives the general iterative formula for y iterations are repeated until the two
successive approximations y(i) and y(i-1) are sufficiently close.
Equ 7 is known as picards iteration formula.
This method is not convenient for computer based solutions
y (n) y 0 f ( x, y ( n 1) ) dx
x0
(n )
1 f ( x, y ( n 1) ) dx 1
0
x2
x2
x]0x 1 x
2
2
Second approximation:
x
1 [ x (1 x
0
1
0
x2
) dx
2
x2
)]dx
2
x2
x3
2
(2 x 1 )]dx 1 x x
2
6
Third approximation:
(3)
1 f ( x, y )dx 1 f ( x y (2) ) dx
(2)
1
0
x3
( x 1 x x )dx
6
1 x2 x
x3 x 4
3 24
Fourth approximation:
x
(4)
1 f x, y
(3)
dx 1 f x y dx
(3)
1 ( x 1 x2 x
0
x3 x 4
)dx
3 24
x2
x3 x 2 x 4 x5
x
2
3 2 12 120
x3 x 4 x5
1 x x2
3 12 120
1
Fifth approximation:
x
(5)
1 ( x 1 x x2
0
x
1 (2 x 1 x 2
0
1 x x2
x3 x 4 x5
) dx
3 12 120
x3 x 4 x5
) dx
3 12 120
x 3 x 4 x5
x6
3 12 60 720
dy
x y
Find an approximate value of y for x=0.1, x=0.2, if dx
and y=1 at x=0 using
picards method.
Check your answer with the exact particular solution.
Sol:
dy
f ( x, y )
Consider dx
where y=y0 at x=x0.
Here f(x,y)=x+y, x0=0 and y0=1.
By picards method, a sequence of successive approximations
are given by.
x
y ( n ) ( x) y0 f ( x, y ( n 1) ( x ))dx
x0
(or)
x
y ( n ) y0 f ( x, y ( n 1) )dx
x0
For n=1,2,3,----
y ( n ) 1 f ( x, y ( n 1) )dx
0
For n=1,2,3,---
when x=0.1
1.1 0.01
(0.1)3 (0.1) 4
3
24
(0.001) 0.0001
3
24
=1.1+0.01+0.0003+0.0000041
= 1.1103041 ~ 1.1103
X=0.2
(0.2)3 (0.2) 4
3
24
=1.2+0.04+0.00266+0.0000666
=1.2427
Y=1.1103 at x=0.1
and y=1.2427 at x=0.2
Analytical solution:
dy
x y
The exact solution of dx
, y(0)=1 can be found as follows.
dy
yx
The equation can be written as dx
dy
p. y Q
This is a linear equation in y [i.e, dx
]
pdx
x.e
( 1) dx
e x
QXI .Fdx c
dx c
y.e-x=-e-x(x+x)+c. or y=-(x+1)+ce+x
when x=0, y=1 i.e, i=-(0+1)+c or c=2
Hence the particular solution of the equation is
Y=-(x+1)+2ex=2ex-x-1.
For x=0.1, y = e0.1-0.1-1=2(1.1052)-0.1-1
=1.1104
For x=0.2, y=2e0.2-0.2-1=2(1.2214)-0.2-1
=1.2428.
3. Find the value of y for x=0.4 by picards method, given that
dy
x2 y 2
dx
, y(0)=0.
Sol:
dy
f ( x, y )
Consider dx
and y=y0 at x=x0i.e y(x0)=y0
2
2
Here f ( x, y ) x y and x0=0, y0=0.
y ( n ) ( x) y0 f ( x, y ( n 1) )dx
x0
, n=1,2,3,---
y ( n ) ( x) 0 f ( x, y ( n 1) )dx
0
y ( n ) ( x) f ( x, y ( n 1) )dx
0
, n=1,2,3-----
y ( x) f ( x, y ) dx f ( x, 0) dx x 2dx
(1)
(0)
x3
3
y ( x)
(2)
x3 2
x3 x7
f ( x, y ) dx f [ x ( ) ]dx
3
3 54
0
(1)
(0.4)3
For x=0.4, y(1)= 3 =0.02133
(0.4)3 (0.4) 7
54 =0.0213333+0.0000303.
y(2)= 3
=0.0213636 ~ 0.0214(correct to 4 decimal places)
Y=0.0214 at x=0.4.
dy
1 xy
4. Given that dx
and y(0)=1, compute y(0.1) and y(0.2) using picards
method.
Sol:
dy
1 xy
dx
and y(0)=1
dy
f ( x, y )
Consider dx
and y(x0)=y0.
Here f(x,y)=1+xy and y0=1, x0=0.
By picards method, the successive approximations are given by
x
y ( x) y0 f ( x, y ( n 1) )dx
(n)
x0
, n=1,2,3,---
y ( n ) ( x) 1 f ( x, y ( n 1) )dx
0
, n=1,2,3---
x2
2
x 2
dx 1 1 x 1 x dx
0
2
x 2 x3 x 4
1 x
2 3 8
x
x 1 0
f x, y
1 x
x2 x3 x4
)]dx
2 3 8
x 2 x3 x 4 x5 x 6
2 3 8 15 48
y (3) 1 (0.1)
2
3
8
15
48
=1+0.1+0.005+0.000333+0.0000125+0.000000666+0.00000002
=1.105346 1.10535
Y(0.1)=1.10534.
For x=0.2,
y (3) 1 (0.2)
2
3
8
15
48
=1.2+0.02+0.0026666+0.0002+0.00002133+0.000001333
=1.222889 ~ 1.22289
y(0.2)=1.22289.
dy
x y2
5.Using picards method, obtain the solution of dx
, y(0)=1 and compute
y(0.1) correct to four decimal places.
Sol:
dy
f ( x, y )
Consider dx
and y(x0)=y0.
Here f(x,y)=x-y2, y0=1 and x0=0.
By picards method, a sequence of successive approximation to y are given by
y ( x) y0 f ( x, y ( n 1) )dx
(n)
x0
, n=1,2,3,---
y ( n ) ( x) 1 f ( x, y ( n 1) )dx
0
, n=1,2,3,---
x2
x
2
x2
y ( x) 1 f ( x, y )dx 1 x 1 x dx
2
0
0
(2)
x4
1 ( x (1 x 2 x 2 2 x x3 ) dx
4
0
=
1 (3 x 1
0
x4
2 x 2 x 3 ) dx
4
3x 2
x5 2 x3 x 4
x
2
20
3
4
3
2
1
(0.1)5
1 0.1 (0.1) 2 (0.1)3 (0.1) 4
2
3
4
20
y2) =
=1-0.1+0.015-0.0006666+0.000025-0.0000005
=1.015025-0.1006671
=0.9143579 ~ 0.9143 (correct to four decimal places) y = 0.9143 at x=0.1.
dy
x2 y 2
6. Given the differential equation dx
, y(0)=0. Obtain y(0.2) and y(1)
by picards method.
Sol:
dy
f ( x, y )
Consider dx
and y(x0)=y0.
Here f(x,y)=x2+y2, y0=0 and x0=0.
y ( n ) ( x ) y0 f ( x, y ( n 1) )dx
x0
, n=1,2,3,---
y ( x ) f ( x, y ( n 1) )dx
(n)
, n=1,2,3,--
y (1) ( x ) f ( x, y 0 )dx x 2 dx
x3
3
y (2) ( x) f ( x, y )dx ( x 2
1
x6
x3 x 7
)dx
9
3 63
x3 x7
2
y (3) ( x) f ( x, y ) dx x 2 ( )2 dx
3 63
0
0
2
(x
=0
x6
x14
2 10
x )dx
2
9 (63) 189
x3 x 7
x15
2
x11
2
3 63 15.(63) 11. 189
3
Calculation of y4) is tedious and hence approximative value for y is y
For x 0.2
Y(3)=
(0.2)11
2
3
63
15.(63) 11. 189
=0.0026666+0.000000203+
=0.0026668
1 1
1
2
3 63 59535 11 189
=0.3333333+0.0158730+0.000016796+0.000962
=0.350185.
dy
x2 y
dx
7. Solve the differential equation
, y(0)=1 by picards method to
get the value of y at x=1. Use terms through x5,
y4 1 x
Ans:
x 2 x 3 x 4 x5
x6
2 6 24 60 360
y4 ( x 1) 0.638888
8. Find the value of y for x=0.25, 0.5, 1 by picards method, given that
dy
x2
2
dx y 1 and x0=0,
y0 = 0.
Sol:
dy
f ( x, y )
Consider dx
and y(x0)=y0 or y=y0 at x=x0
f ( x, y )
Here
x2
y 2 1 and x0=0, y0=0
y ( n ) ( x ) y0 f ( x, y ( n 1) )dx
x0
, n=1,2,3,---
y ( x ) 0 f ( x, y ( n 1) )dx
(n)
, n=1,2,3---
x2
x3
dx
02 1
3
0
y (1) ( x ) 0 f ( x, y 0 ) dx 0 f ( x,1) dx 0
Second approximation, we have
x
x2
x2
dx
0 x3 2 dx
( y (1) )2 1
0
( ) 1
3
y (2) ( x) 0 f ( x, y )dx
tan 1 (
x3
x3
)0
3
[by putting 3 =t]
tan 1 (
x3
)
3
y ( x)
(3)
x2
f ( x, y )dx
dx
3
1 x
2
0
[tan ( )] 1
3
2
The integration is difficult, this is the drawback of the method. Hence the
approximation value of y is y(2)(x).
y (2) ( x ) tan 1 (
x3
x3
x3 1 x3 1
) ( )3 ( ) 5
3
3
3 3
3 5
x3 x9
x15
= 3 81 1215
x3 x5
tan (2) x
3 5
[
]
1
For x=0.25,
y (2) ( x )
0.0052082
3
81
1215
at x=0.5,
0.0416425
3
81
1215
(2)
At x=1,
y (2) ( x)
1 1
1
0.32180699
3 81 1215
Y=0.0052082 at x=0.25
Y=0.0416425 at x=0.5
Y=0.32180699 at x=1
dy
xe y
9. Given dx
, y(0)=0, determine y(0.1), y(0.2) and y(1) using picards
method.
Sol:
dy
f ( x, y )
Consider dx
and y(x0)=y0
y
y ( n ) ( x ) y0 f ( x, y ( n 1) )dx
x0
, n=1,2,3,---
y ( x ) f ( x, y ( n 1) )dx
(n)
x2
2
x2
2
y ( x) f ( x, y )dx x.e dx e
(2)
x2
2
y ( x) f ( x, y )dx x.e
(3)
x2
( x) 2
dx
( 2)
The integration is difficult, Hence the approximate value of y is y ( x) .
y ( x) e
(2)
x2
2
for x=0.1, y
(2)
for x=0.2, y
(2)
for x=1, y
(2)
( x) e
( x) e
(0.1)2
2
(0.2) 2
2
1 0.005012
1 0.02020
1
2
( x ) e 1 0.648721
dy
1. If dx = x - y and y(0) = 1 using Picard method, the value of y I(1) = _________
a) 1.0905
b) 0.9157
c) 0.905
d) None
yx
dy
2. If dx = y x , y(0) = 1 and h = 0.02, using Eulers method the value of y 1 =
_________
a) 1.02
b) 1.04
c) 1.03
d) none
dy
3. If dx = x2+y2, y(0) = 0 using Taylors series method, the value of y(0.4)=___________
a) 0.2133
4.
b) 0.02133
c) 0.002133 d) None
x2
x 4 x3
a) 1 + x + 2 - 12 3
x2
x3 x 4
b) 1 + x + 2 + 3 12
x2
x3 x 4
c) 1 + x - 2 + 3 12
d) None
dy
5. If dx = -y, y(0) = 1, h = 0.01 then by Eulers method, the value of y 1 = __________
a) 0.099
b) 0.0981
c) 0.99
d) None
dy
6. If dx = x2+y2, y(1) = 1.5, h = 0.1 then the value of k 1 in fourth order Runge Kutta
method is __________
a) 0.0325
7.
b) 0.325
c) 0.235
d) None
The value of y at x= 0.1 using Runge Kutta method of fourth order for the
dy
differential equation dx = x 2y, y(0) = 1 taking h = 0.1 is __________
a) 0.825
b) 0.0825
c) 0.813
d) None
dy
for dx = x y, y(0) = 1 is _________
a) 0.909
b) 0.0909
c) 0.809
d) None
dy
9. If dx = 1 + y2, f(x0,y0) =1,h 0.2,K1 = 0.2,K2 = 0.202,K3 = 0.20204,K4 =
0.20216,then the value of y1 by fourth order Runge Kutta method is ________
a) 0.0202
b) 0.202
c) 0.102
d) None
dy
10.Using Runge Kutta method, the approximate value of y(0.1) if dx = x + y2,y
= 1 where x =0 and f(x0,y0) = 1 K1 = 0.1, K2 = 0.115, K3 = 0.116, K4 = 0.134 is
a) 1.116
b) 1.001
c) 1.211
d) None
dy
11. If dx = f(x,y),y(x0) = y0 then the Taylors series for solution of the differential
equation is __________
dy
12. Using Taylors series, solution for dx = y2 x,y(0) = 1 the value y(0.1) is __________
dy
13. Using Taylors series method from dx = x + y,y(1) = 0 the value of y(1.1) is
__________
dy
14. The value of y(0.1) using Taylors series method given that dx = 1 y, y(0) = 2 is
_____
dy
15. The Picards method of solving the differential equation dx = f(x,y),y(x0) = y0 using
the integral equation _________
dy
16. The second approximate solution of dx = 1 + xy using Picards method is _______
17. Using Picards method to third approximate of y when x = 0.2 given that y = 1
dy
x 2, y0 0
when 0
x= 0, dx = x y is ______
dy
x 2, y0 0
18. The solution of dx = 1 + xy with 0
using Picards method is_______
dy
19. If dx = x2 + y2,y(0) = 0 then by Picard method the value of y 1(x) is __________
dy
20. The value of y for x = 0.4 by Picards method given that dx = x2 + y2,y(0) = 0 is
______
dy
21. Using the Picards method the solution of dx = x + y2,y(0) = 1 is ________
dy
22. If dx = -xy2, y(0) = 2,using Eulers method the first approximate value of y(0.1)
is_____
dy
23. Given dx = 4 + x2 + y, y(0) = 1, using Eulers modified method the value of
y(0.02) is_________
dy
24. If dx = x + y2,f(0) = 1 using Runge Kutta method , the approximate value of
y(0.1) is_________
dy
25. If dx = f(x,y),y(x0) = y0,the
_______
26. Using Taylors method the first approximate value of y(1.1) for the differential
equation y1 = xy1/3,y(1) = 1 is ____________
dy
27. The value of y(0.1) using Eulers method for the differential equation dx = x- y2,
y(0) = 1 is ________
2x
dy
28. Using Eulers modified method, find y(0.1) given dx = y y ,y(0) = 1 is __________
dy
29. In fourth order Runge Kutta method for dx = x + y2,y(0) = 1,h = 0.1 the value of
K2 is __________
yx
dy
30. IF dx = y x ,y(0) = 1 then by Picards method the value of y (1)(x) is _________
Assignment Questions
1. Tabulate y(0.1),y(0.2) & y(0.3) using Taylors series method given that y 1 = y2
+ x & y(0) = 1
(JNTU 2006)
dy
2. Given that dx = 1 + xy, y(0) = 1 compute y(0.1) & y(0.2) using Picards
method
(JNTU 2006)
3. Solve y1 = y x2, y(0) = 1 by Picards method up to the fourth
approximations. Hence find the value of y(0.1) & y(0.2)
(JNTU
2006)
dy
4. Find the solution of dx = x y,y(0) = 1 at x=0.1,0.2,0.3,0.4 & 0.5 using
modified Eulers method
(JNTU
2006)
dy
5. Find y(0.1) & y(0.2) using Eulers modified formula given that dx = x2 y,y(0)
=1
(JNTU 2006)
6. Given y1 = x + sin y, y(0) = 1 compute y(0.2),y(0.4) with h = 0.2 using
Eulers modified method
(JNTU 2006)
7. Use Runge Kutta method to evaluate y(0.1) & y(0.2) given that y 1 = x +
y,y(0) = 1
(JNTU 2006)
8. Find y(0.1) & y(0.2) using Runge Kutta 4 th order formula given that y 1 = x2
y&
y(0) =1
(JNTU 2006)
dy
9. If dx = 2yex,y(0)=2 find y(0.4) using Adams Predictor corrector formula by
calculating y(0.1),y(0.2) and y(0.3) using Eulers modified formula.
(JNTU 2006)
dy
10.Using 4th order Runge Kutta method find y(0.1),y(0.2) and y(0.3) given dx =
y2 2x
y 2 2 x ,y(0) = 1
dy
11.Given dx = y x, y(0) = 2.Using 4th order Runge Kutta method. Find
y(0.2),y(0.4) & y(0.6)
yx
dy
12. Given dx = y x ,y(0) = 1.using 4th order Runge Kutta method, find y(0.1)
and y(0.2)
dy
1
13. Given dx = 2 (1 + x)y2,y(0) = 1 using 2nd order Runge Kutta method find
y(0.3) taking h = 0.1
dy
dx = x 2y, y(0) = 1.Taking h = 0.1, determine y(0.1) and y(0.2)
14. Given
using 3rd order Runge Kutta method.
dy
15. Using Runge Kutta of 4th order find y(0.1) and y(0.2),given dx = x + y,y(0)
= 1.
dy
16. Given dx = y2 + 1,y(0) = 0,find y(0.2) using Taylors series method.
dy
y
17. Given dx = 3x + x and y(0) = 1.Using Taylors series method. Find y(0.1)
and y(0.2).
dy
18. Solve dx = x y2 by Taylors series method for x = 0.2 to 0.6 with h =
0.2,given
y(0) = 1
dy
19. Using Picards method, compute y(0.2) from dx = 1 2xy,y(0) = 0
dy
20. Using Picards method obtain the solution of dx = x + x4y,y(0) = 3.Find the
value of y for x = 0.1 and x = 0.2