Here's an overview of Euler's method
for solving differential equations of this form.
The derivative of some unknown function X is just a function of X,
and we assume that we know the starting value of this function X,
- so this could be temperature, this could be position, could be anything.
So, we start - we need to choose a step size,
- that's a choice that we get to make, and we'll start at time t equal 0,
where we know the X value.
So, then using the current value of X,
the equation - the differential equation - this function,
tells us the rate of change.
So, we know how fast X is changing.
We then use this rate of change
to determine the next value for X,
This is the current value for X,
this is how much X changes, in the time interval delta t.
This is a little bit of make-believe
- we're pretending that the rate of change is constant
for this time interval delta t, and we can use that
to figure out the next value of X,
then, we increased t by delta t
and we go back to this step, and we figure out the derivative again.
The derivative tells us how to go forward a little bit in time
to figure out the next X, then we update time, figure out the derivative again,
move forward to figure out X.
So 2 and 3 - these are the key steps here,
- wer'e constantly shuffling back and forth,
the function - the differential equation - tells us the derivative,
- here we use the derivative to figure out the value of X,
and then we go back, X gives us the derivative from the differential equation,
- we use a derivative to figure out X, and so on.
So, one repeats through these processes
until you have enough of a solution.
So, in practice, one would choose smaller and smaller delta t
until the solution curve stops changing.
So, if you chose a delta t of 2, and then 1, and then .01, and .001,
doing this on a computer, or a spreadsheet,
and eventually one would see that your table of values, if you plotted them,
your X's would stop changing, and that would be an indication
that you're delta t was small enough.
So, this is Euler's method in a nutshell.
It gets at the heart of what the differential equation means,
- the rate of change is given by the quantity X,
we use that rate of change to figure out X,
so, again we're thinking of this as a dynamical system,
- it's a rule that specifies how X changes,
the rule is written in terms of the derivative,
- the rate of change of X, rather than X directly,
but, not a problem, Euler's method, or things like it,
let us convert from rates of change in to the function itself.