Euler’s Method

14
Euler’s Method

description

Euler’s Method. Leonhard Euler. Pronounced like Leon- ard Oiler Swiss mathematician and physicist Introduced the idea of a function f(x) Wrote the work Optics which became the preeminent theory on light until quantum light theory Nine point circle. What is Euler’s Method?. - PowerPoint PPT Presentation

Transcript of Euler’s Method

Page 1: Euler’s Method

Euler’s Method

Page 2: Euler’s Method

Leonhard Euler

• Pronounced like Leon-ard Oiler• Swiss mathematician and physicist• Introduced the idea of a function f(x)• Wrote the work Optics which became

the preeminent theory on light until quantum light theory• Nine point circle

Page 3: Euler’s Method

What is Euler’s Method?

Equation using slopes and values at various points of an equation to approximate the next value of said equation.

Used when the given slope or can not be integrated dx

dy

Page 4: Euler’s Method

How It Works• ynew = yold + f’(x)*Δx

• A new y value can be approximated by taking the old value and adding the slope multiplied by the step size, which is the difference between two x values.

Page 5: Euler’s Method

First Example!

Given a point (1,2) and = x+y, approximate f(2) with two equal step sizes of .5

1. Write down equation: ynew = yold + f’(x)*Δxf(1.5) = f(1) + f’(1)(0.5)

dxdy

Page 6: Euler’s Method

First Example, Cont’d.

2. Plug in relative values: f(1.5) = 2 + (1+2)(.5)

3. Solve: f(1.5) = 3.5 or 7/24. Plug in for new values:

f(2) = 3.5 + f’(1.5)(.5)f(2) = 3.5 + 5(0.5) = 6

Page 7: Euler’s Method

Second Example

• Using two equal step sizes of .1, approximate f(.8) given =

and f(1)=2dxdy

22yy

Page 8: Euler’s Method

How to Do it

1. Write down the equation ynew=yold+(m)Δx2. Plug in values for f(.9)

1. ynew=2-(.1)(.5)(3)1. f(.9)= 1.85

3. Plug in values for f(.8) 1. ynew=1.85-(.1)(.925)(3.85)

1. f(.8)=1.493875

Page 9: Euler’s Method

Be Careful!

• Using Euler’s method gives an approximation, not an actual solution.

• Depending on whether or not the equation is concave up or down, the Euler’s solution could be higher or lower than the actual one.

Oh no! So what about that last example?

Page 10: Euler’s Method

Concavity

• In the last example, f’(x) = x + y. f”(x), therefore, is equal to 1.• The concavity is always going to

be positive, which means that the approximate value given by Euler’s method will be lower than the real value.

Page 11: Euler’s Method

Now it’s Your Turn!

• f’(x) =

• Find f(3) given point (1,3)• Two equal step sizes

yxx22

Page 12: Euler’s Method

Did You Get it Right?

• f(2) = f(1) + f’(1) * (1)– f’(1) = 1 + 2 = 0.5 2(1)(3)

• f(2) = 3 + 0.5 = 3.5• f(3) = f(2) + f’(2) * (1)– f’(2) = 3.5 + 2 = 11

2(2)(3.5) 28

• f(3) = 3.5 + 11/28 = 109/28

Page 13: Euler’s Method

YAYYYYYY!!

Page 14: Euler’s Method