Here's the question you clicked on:
MathSofiya
Use Euler's method with step size 0.2 to estimate y(1.4), where y(x) is the solution of the initial-value problem y'=x-xy, y(1)=0 \[y_1=0.2\] \[y_2=0.392\] \[y_3=0.56224\] \[y_4=0.70232\]
Do I continue until the numbers stop changing or can I stop at y(1.4)?
It's only asking you to approximate y(1.4) so you don't need to go any further.
What x value did you begin at? 1. At a step size of .2, that means I'll need to do two steps to get to 1.4
Correct. My x0=1. I don't know why I added a 4th line. Sry
You actually don't even need the third line.
Yes I do. \[0+0.2(1-0)=0.2\] \[0.2+0.2(1.2-(0.2)(1.2))=0.392\] \[0.392+0.2(1.4-(1.4)(0.392))=0.56224\]
I'm pretty confident that you don't. You KNOW the y value when x is 1. That's given. Your step size is .2, and each time you do your fancy-pants calculation, it gives you an approximation for what y is when x is .2 higher than before. |dw:1343082671327:dw|
I was thinking about going into some simple explanation of how this approximation actually works.
If you want to, I'd love to hear it.
Like, if you want to understand it instead of just plugging things in, it's simple enough that you would be able to get what you are actually doing.
I posted this question earlier and asked what the bigger picture was. He simply gave a link to a wikipedia page.
So the idea is that you have a function that looks like y' = suchandsuch For a given starting point, you can use that function to find out what the first derivative is at that point. The first derivative gives us slope, or rate of change. So sweet, we know what the slope of the function is at that point. Sure, the slope of the function is CHANGING, but maybe it's not changing that fast. That's where the approximation business comes in. We figure out what the slope is, assume that the slope is constant, at least for a little bit, and we see where the function would end up.
|dw:1343083148521:dw| So here's a simple example. The top line is the actual curve where the slope is steadily increasing. The bottom line is our rough approximation where we assume that the slope stays the same.
Understood. Now on to the steps I guess...
The smaller the steps the greater the accuracy ;) Yes?
Okay, yeah. So a SUPER simple approximation would be to say "Let's assume that the slope doesn't change at all." And I get something like this where the slope might actually change quite a lot and I get way off: |dw:1343083474058:dw|
Or, I could add in some steps. Basically the idea is that I occasionally stop and account for the slope changing. So instead of going the whole distance under the assumption of no slope change, I stop a little bit in and go "What's a good approximation for the slope at this point" I use the same y' = function that I used before|dw:1343083628908:dw|
And you can see how adding in more steps, adjusting the slope more often, results in a better approximation.
Yep. Makes sense. Thank you Smoothie, I really appreciate it.