If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: AP®︎/College Calculus BC>Unit 7

Lesson 5: Approximating solutions using Euler’s method

# Euler's method

Euler's method is a numerical tool for approximating values for solutions of differential equations. See how (and why) it works.

## Want to join the conversation?

• How X=1 be Y = 2? because y = e^x, if X = 1, then Y should be e^1
• You are right, the correct point is `y(1) = e ≅ 2.72`; Euler's method is used when you cannot get an exact algebraic result, and thus it only gives you an approximation of the correct values. In this case Sal used a `Δx = 1`, which is very, very big, and so the approximation is way off, if we had used a smaller `Δx` then Euler's method would have given us a closer approximation.

With `Δx = 0.5` we get that `y(1) = 2.25`
With `Δx = 0.25` we get that `y(1) ≅ 2.44`
With `Δx = 0.125` we get that `y(1) ≅ 2.57`
With `Δx = 0.01` we get that `y(1) ≅ 2.7`
With `Δx = 0.001` we get that `y(1) ≅ 2.72`
• I understand the concept behind Euler's method and it is quite interesting , but I don't get how sal got his values for y ?
• for the first table:
Δx=1
Δy/Δx=y
Δy=y (how much we add to get a new y)
we can write it like: Δy=y(old)
y(new)=y(old)+Δy=2y(old)
-if y=1 then y(new)=2y(old)=2(1)=2
-then y=2 then y(new)=2y(old)=2(2)=4
-then y=4 then y(new)=2(4)=8
for the second table:
Δx=0.5
Δy/Δx=y
Δy/0.5=y
Δy=y/2
Δy=y(old)/2
y(new)=y(old)+Δy=3/2 y(old)
-if y=1 then y(new)=3/2 y(old)=3/2(1)=1.5
-then y=1.5 then y(new)=3/2 y(old)=3/2(1.5)=2.25
-then y=2.25 then y(new)=3/2 y(old)=3/2(2.25)=3.375
...and so on
hope this helps.
• Why does the y-values increment by half of the slope?
• I assume you are talking about the second case. The slope `dy/dx` tells us that for a given number of steps on the x axis, we must take a certain number of steps on the y axis. So you should read `dy/dx = 1.5` as `dy/dx = 1.5/1`, which means that for one step on the x axis, we go one step and a half on the y axis. We can also say `dy/dx = 1.5/1 = 3/2`, for every two steps on the x axis, we take three steps on the y axis, this is equivalent.
Lastly we also have `dy/dx = 1.5/1 = 0.75/0.5`. So when we take half a step on the x axis, we must take 0.75 (three quarters) steps on the y axis.
• For all Euler type problems, is the slope always equal to y?
• No, the slope is always equal to `dy/dx` (that is, after all, the definition of slope). In this example, `dy/dx = y`, but that is not general at all.
• At when x=1, why is that y is incremented by 'half' of dy/dx( 1.5 ) and not 1.5 itself?
• Because our `Δx = 0.5`, so we only advance half a unit. `dy/dx = 1.5` means that an increment of 1 in x would carry an increment of 1.5 in y, but since we are only incrementing x by 0.5, we only increment y by 0.75.
• Isn't this reminiscent of Riemann sums, but like for an arc length rather than an area?
• I was thinking the same thing. As the x intervals get smaller and smaller they approach what is essentially dx, then evaluate it infinitely many times just as you do in an integral. That could be demonstrated using this example, but it may not work with more complicated differential equations that can't be integrated as easily.
• Nice method! Is it based on the linear approximation principle y(x + Δx) ≈ y(x) + y'(x)*Δx ?
• If 1.5 is increased by 0.5, how come It turns out to be 2.25 and not 2?
• Sal's wording is a bit confusing here, but here's how it works.

So, you have the x coordinate as 0.5 and the slope as 1.5. Now, 1.5 can be written as 1.5/1. This implies (from the definition of a slope) that for every 1 unit you go in the x direction, you go 1.5 units in the y direction. But, we are only going 0.5 units in the x direction (as we're going from 0.5 to 1). So, we'll be going 1.5/2 = 0.75 units in the y direction, which puts us as 1.5 + 0.75 = 2.25

Hope this made sense now. It's the same method for all the other entries he made. So, give it a check to feel comfortable with the idea!