So before we get started with solving our first example of a differential equation, let me tell you
a bit about the background.
So the first method that we will discuss here and that we will program ourself is called the Arla Method.
And it's basically the most simple approach on numerically solving a first order differential equation.
So what's the first order differential equation?
Well, we have a function Y, for example, which depends on T, and the derivative of this function
is equal to another function, which has terms depending on T and terms, depending on the function
itself.
So basically, we have T, we have Y, and we have a first derivative of Y and no ion derivatives.
This characterizes the first or that differential equation.
And what's the idea behind it to solve it numerically?
Well, we can just think about how would we express the derivative of Y with respect to T.
So of course, there are different possibilities that we can write down now.
But one of them is that we take the value of Y at the position T and add a small value h, then subtract
the value at the position T and divide by H.
So this is if if H is small, if so, basically here we would have to write the limit of h goes to zero,
then this would also be equal to y of T minus y of T minus H or also y of T plus minus y of T minus
h divided by two h and the limit of h to zero.
This all gives the same value.
So here this is only approximately true.
However, if we say OK, we consider that h a small and we say this is true, then we can solve this
equation for this term here y at the time, T plus h.
So we write times h and then plus y of T.
So we get this expression here, which means when we know the value of Y at the time T, we also know
the value of Y at the time T plus h because we can just calculate the derivative at the time T and then
multiply with h and added to the initial value.
And this is the whole idea.
We will repeat this step here over and over again to propagate in time zero two, we can repetitively
iterate this propagation process.
So if we want to write this down a bit more in terms of programming, then we should write this down
with indices and not with time arguments here.
So we know that at the end plus one time step, which basically corresponds to the value Y and plus
one and at time T plus h, we can express this value as the value before, which is why n at this step
and corresponding to a time T and then plus the derivative, which is actually the function here.
So you see from this expression and times h.
So this is the whole idea.
We will repeat this step over and over again.
So maybe you see, now that this is not so difficult, it's difficult at all because this is just the
function that we have provided that we will program.
And then we just have to iterate this process where we will add to the initial value, the value of
the function times, some small step size.
And then we repeat this and we will look at then y and plus one y and plus two and so on.
So in the next lecture, we are going to solve a first example, which will be the radioactive decay.
And you see, this is the differential equation and we will use this method and programme it ourselves.