Download presentation
Presentation is loading. Please wait.
1
Euler’s mehod.
2
Leonard Euler (1707 – 1783) Leonhard Euler was a Swiss mathematician, physicist, astronomer, logician and engineer who made important and influential discoveries in many branches of mathematics like calculus and differential equations. Numerical solution of using Euler’s method. where h is a constant (step length) The above formulas are given in the formulae booklet so no need to memorise.
3
Euler’s Method. Allows to find an approximate solution to a differential equation This is done by finding a sequence of points which lie on the solution curve of the given differential equation with a boundary condition. We need to approximate numerically the value of yn at xn. Graphically we start at the point and find the gradient at this point. The step h is usually given in the question. The smaller the step, the more accurate the approximation. We move to the point by using the gradient calculated in step 1. We repeat the process until we reach the point 𝑥 0 , 𝑦 0 𝑥 1 , 𝑦 1 𝑥 𝑛 , 𝑦 𝑛 As numerical calculations are quite time consuming when performed manually, the spreadsheet or computer programs are helpful to do all the calculations much quicker.
4
Iterations, how it works:
and so on…
5
Example 1: Use Euler’s method of numerical integration with a step size of 0.1 to find y(1) if y’=y-x and y(0)=2. Identify the information given: Now multiply by h Repeat the process with the point (x1,y1) First calculate f(0,2) Add to y0 To obtain the point (x2,y2)
6
Repeating the process eight more times and tabulating the results gives the following:
xn yn f(x,y)h yn+1 = yn +f(x, y) h 2 0.2 2.2 1 0.1 0.21 2.41 0.221 2.631 3 0.3 0.2331 2.864 4 0.4 0.2464 3.111 5 0.5 0.2611 3.372 6 0.6 0.2772 3.649 7 0.7 0.2949 3.944 8 0.8 0.3144 4.258 9 0.3358 10 1.0
7
How accurate is this result?
When solving the above DE we obtain y=ex+x+1 So we have an underestimation here – = and the absolute percentage error of around 2.64%, so not a bad approximation. This value can be also obtained using your TI Nspire, sketch the slope field in the Diff Eq mode, enter the initial condition. Use Trace, Graph trace and left-right arrows to move along the curve in steps of 0.1 (default) Edit parameters to change the step. Make sure Euler is selected.
8
Using a spreadsheet on TI Nspire (Lists & Spreadsheet).
Steps: Name the columns. Fill in the values for x from 0 to 1 every 0.1. Enter the initial value for y as 2. In cell c1=0.1(b1-a1) In cell d1=b1+c1 In cell b2=d1 And copy down one by one.
9
Using a Calculator RHS of DE initial x, final x variables y-value from initial condition step answer
10
Your turn! Use Euler’s method to find y(0.5) for the DE with y(0)=1 and h=0.1
11
What to expect on the examination?
Consider the differential equation and Use Euler’s method with steps of 0.2 to estimate f(2) to 5 decimal places. f(2)= Note that the step is 0.2 now and required accuracy is 5 d.p.
12
Change the float in 9: Settings
Display Digits Float to display 5 d.p.
13
Question: For the differential equation with y(0)=3, use the Euler’s method with step h=0.5 to find y(7) to 4 decimal places. Sketch the slope field for the above differential equation for x values from 0 to 7 and y values from -4 to 4. Plot the pairs of x and y-values from your spreadsheet on the slope field graph. For which values of x does the numerical solution by Euler’s method seem to follow the slope field? For which values of x is the numerical method clearly wrong? Solve the differential equation algebraically. Plot the particular solution which contains (0,3). Explain why Euler’s method gives meaningless answers for larger values of x. Answers: f(7)=2.0634 (d) Euler’s method seems to produce reasonable answers for x<5 (f) 0.5x2+y2=9 (h) The solution curve is an ellipse with semi-major axis = 4.24 (x-direction) and semi-minor axis =3 (y-direction). When the curve approaches the x-axis, the slope becomes nearly infinite. Furthermore, after crossing the x-axis the curve should go in the negative x-direction, but the method does not account for this.
15
Summary: Describe Euler’s method for solving the initial value problem y’=f(x,y), y(x0)=y0. Comment on the method’s accuracy. Why might you want to solve an initial value problem numerically? What is the slope field of a differential equation y’=f(x,y)? What can we learn from such fields?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.