0% found this document useful (0 votes)
92 views2 pages

Euler Worksheet

University of Birmingham

Uploaded by

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

Euler Worksheet

University of Birmingham

Uploaded by

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

Numerical Analysis Euler Worksheet 1

Euler’s general method

yr + 1 = yr + hf(xr , yr)

and

xr + 1 = xr + h

Use Eulers’ method to solve the following

dy
1. Solve = 2xy. Solve for x = 0(0.2)0.6 given that x0 = 0, y0 = 1 and h = 0.2
dx

dy
2. Solve = x  y. Solve for x = 0(0.1)0.2 given that x0 = 0, y0 = 0 and h = 0.1
dx

dy
3. Solve = x 3  xy. Solve for x = 1.0(0.1)1.2 given that x0 = 1, y0 = 1 and h = 0.1
dx

dy
4. Solve = 2(1 + x)  y. Solve for x = 2(0.2)2.4 given that x0 = 2, y0 = 5 and h = 0.2
dx

dy
5. Solve = x 2 + 3y. Solve for x = 0(0.3)0.3 given that x0 = 0, y0 = 1 and h = 0.3
dx

dy
6. Solve = x 2 + 3y. Solve for x = 0(0.1)0.3 given that x0 = 0, y0 = 1 and h = 0.1
dx
Compare your answer with your answer to question 5. Which is the more accurate?

dy
7. Solve = 2x + y 2 . Solve for x = 0(0.1)0.3 given that x0 = 0, y0 = 1.4 and h = 0.1
dx
Improved Euler Method

y1* = y0 + hf(x0 , y0)

The gradient at the end of the interval can then be estimated by evaluating f(x1 , y1* ). The average
value of the two gradients replaces f(x0 , y0) in the Euler formula, so that;

 f(x , y )  f(x 1 , y1* ) 


y1 = y0 + h   0 0  or y1 = y0 + h  0.5{ f(x0 , y0) + f(x1 , y1 )}
*

 2 

Worksheet 2

dy
1. Solve = x 2  2x + y using the modified Euler method
dx
Find y1 y2 and y3 given that x0 = 0, y0 = 0.5 and h = 0.1

dy
2. Solve = 2(1 + x)  y using the modified Euler method.
dx
Find y1 up to y5 given that x0 = 2, y0 = 5 and h = 0.2

Answers

Worksheet 1

Questio x0 , y0 x1 , y1 x2 , y2 x3 , y3
n
1 0 1 0.2 1 0.4 1.08 0.6 1.2528
2 0 0 0.1 0 0.2 0.01
3 1 1 1.1 1 1.2 1.0231
4 2 5 2.2 5.2 2.4 5.44
5 0 1 0.3 1.9
6 0 1 0.1 1.3 0.2 1.691 0.3 2.2023
7 0 1.4 0.1 1.596 0.2 1.8707 0.3 2.2607

Worksheet 2

Qu No x0 , y0 x1 , y1 x2 , y2 x3 , y3
1 0 0.5 0.1 0.543 0.2 0.5716 0.3 0.5863

2 2.0 5 2.2 5.22 2.4 5.4724 2.6 5.751368


x4 , y4 x5 , y5
2.8 6.052122 3.0 6.370730
y*1 5.2 y*2= 5.456 y*3= 5.73792 y*4= 6.0410944
y*5= 6.3616974080

Mjbs/NumericalAnalysis/EulerWorksheet 2/2

You might also like