0% found this document useful (0 votes)
71 views

Modified Euler's Method

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Modified Euler's Method

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Type 2: Modified Euler’s Method

Consider the initial value problem,


dy
dx = f (x , y ) : y (x0 ) = y0

We need to find y at x1 = x0 + h.

We first obtain y (x1 ) = y1 by applying Euler’s formula and this value is


(0)
regarded as the initial approximation for y1 usually denoted by y1 also
called as the predicted value of y1 .

Euler’s formula is given by


(0)
y1 =y0 + hf (x0 , y0 )

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 1 / 11


Modified Euler’s Method

Since the accuracy is poor in this formula this value y1 is successively


improved (corrected) to the desired degree of accuracy by the following
Modified Euler’s formula, where the successive approximation are
(1) (2)
denoted by y1 , y1 , y13 , ...etc.
(1) (0)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(2) (1)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(3) (2)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]

Each of the succeeding approximation is better than the preceeding ones.


They are called corrected values. Euler’s formula jointly are also called
Euler’s predictor and corrector formulae.

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 2 / 11


Solved Problems
dy
1. Use modified Eulers method to solve dx = x + y , y (0) = 1 at x = 0.1
for three iterations taking h = 0.1

Solution
Given ,
x0 = 0 , y0 = 1 , h = 0.1 , f (x , y ) = x + y
x1 = x0 + h =⇒ x1 = 0.1

Euler’s formula,
(0)
y1 = y0 + hf (x0 , y0 )
(0)
y1 = 1 + (0.1)(0 + 1)
(0)
y1 = 1.1

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 3 / 11


Solved Problems

Modified Euler’s formula,


(1) (0)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(1) 0.1
y1 =1 + 2 [1 + (0.1 + 1.1)]
(1)
y1 (0.1) = 1.11
(2) (1)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(2) 0.1
y1 =1+ 2 [1 + (0.1 + 1.11)]
(2)
y1 (0.1) = 1.1105
(3) (2)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(3) 0.1
y1 (0.1) = 1 + 2 [1 + (0.1 + 1.1105)] = 1.111

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 4 / 11


Solved Problems
dy
2. Use modified Eulers method to solve dx = x 2 + y , y (0) = 1 at
x = 0.05 taking h = 0.05

Solution
Given ,
x0 = 0 , y0 = 1 , h = 0.05 , f (x , y ) = x 2 + y
x1 = x0 + h =⇒ x1 = 0.05

Euler’s formula,
(0)
y1 = y0 + hf (x0 , y0 )
(0)
y1 = 1 + (0.05)(0 + 1)
(0)
y1 = 1.05

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 5 / 11


Solved Problems

Modified Euler’s formula,


(1) (0)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(1) 0.05
y1 =1 + 2 [1 + (0.05)2 + 1.05]
(1)
y1 (0.05) = 1.0513

(2) (1)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(2) 0.05
y1 =1+ 2 [1 + (0.05)2 + 1.05]
(2)
y1 (0.05) = 1.0513

y (0.05) = 1.0513

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 6 / 11


Solved Problems
3. Use modified Eulers method to solve y 0 = x + siny , y (0) = 1 at
x = 0.2 taking h = 0.2. Carryout two modifications

Solution
Given ,
x0 = 0 , y0 = 1 , h = 0.2 , f (x , y ) = x + siny

x1 = x0 + h =⇒ x1 = 0.2

Euler’s formula,
(0)
y1 = y0 + hf (x0 , y0 )
(0)
y1 = 1 + 0.2(sin1)
(0)
y1 = 1.1683
Dept Of Mathematics , AIT Numerical Methods October 22, 2020 7 / 11
Solved Problems

Modified Euler’s formula,


(1) (0)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(1) 0.2
y1 =1 + 2 [sin1 + 1.1201] since,
(0)
f (x1 , y1 ) = x1 + siny1 = 0.2 + sin1.1683 = 1.1201
(1)
y1 (0.2) = 1.19615

(2) (1)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(2) 0.2
y1 =1+ 2 [sin1 + (0.2 + sin1.19615)]
(2)
y1 (0.2) = 1.19721

∴ y(0.2)=1.19721
Dept Of Mathematics , AIT Numerical Methods October 22, 2020 8 / 11
Solved Problems
4. Use modified Eulers method to solve the initial value problem
y 0 = log10 (x + y ) , y (1) = 2 at x = 1.2 taking h = 0.2. Carryout two
modifications

Solution
Given ,
x0 = 1 , y0 = 2 , h = 0.2 , f (x , y ) = log10 (x + y )
x1 = x0 + h =⇒ x1 = 1.2
Euler’s formula,
(0)
y1 = y0 + hf (x0 , y0 )
(0)
y1 = 2 + 0.2(log10 (1 + 2))
(0)
y1 = 2.0954
Dept Of Mathematics , AIT Numerical Methods October 22, 2020 9 / 11
Solved Problems

Modified Euler’s formula,


(1) (0)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(1) 0.2
y1 =2 + 2 [log10 (1 + 2) + log10 (1.2 + 2.0954)]
(1)
y1 (1.2) = 2.0995

(2) (1)
y1 =y0 + h2 [f (x0 , y0 ) + f (x1 , y1 )]
(2) 0.2
y1 =2+ 2 [log10 (1 + 2) + log10 (1.2 + 2.0995)]
(2)
y1 (1.2) = 2.0996

∴ y(1.2)=2.0996
Dept Of Mathematics , AIT Numerical Methods October 22, 2020 10 / 11
Practice Problems

Sove the following IVP using Modified Euler’s Method

1 y 0 = −xy 2 , y (0) = 2 at x = 0.1 taking h = 0.1.

2 y 0 = y + e x , y (0) = 0 at x = 0.2 .

3 y 0 = x + y + xy , y (0) = 1 at x = 0.1.

Dept Of Mathematics , AIT Numerical Methods October 22, 2020 11 / 11

You might also like