Tip:
Highlight text to annotate it
X
Hello and welcome to module 7 of the computational techniques course. In module 7, we are going
to discuss ordinary differential equations - the initial value problems. what I am going
to do in the next few minutes is, just give an overview of what we mean by ordinary differential
equations and specifically what we mean by initial value problem and then go through
the outline of the things that we are going to cover in this particular module.
So, the background is given that, we have an equation - a differential equation - of
the type d y by d t equal to sum function f of y and t, keep in mind that, this function
f in general, we let it be function of both the dependent variable y that we are interested
in finding out and the independent variable t that varies and for which we are interested
in finding the particular value of y. In addition to this particular differential
equation, we also need to be given an initial condition an, initial condition would be of
the form y at time t 0 is given as certain value y 0; and the objective of solving this
ODE problem is to obtain y at any time t. So, this is an example that I am showing graphically,
where I have plotted the function y against the time t and this is some arbitrary function
y against t. So, let us consider any time t i, at that point t i the slope of this curve
is going to be the f of t.
So, the objective of the ODE all over is given the function f (y, t), that is the slope of
the particular curve; we are interested in then finding out the entire curve as a function
of y of t; that is the overall background for this particular problem; this problem
is, if you, if you can see this kind of related to the problem of integration; in some ways,
it is related to the problem of integration, is in some other ways, that is actually very
different from the problem of integration; in case of integration, what we had is d y
by d t as a function of t only, we did not have d y by d t as a function of y and t;
under that condition we can have y equal to integral f of t d t and that is what we had
done; in the previous - module - module 6, we are considered integration of a function
f of t d t between the values a and b; and in that case, when we plot the function f
of t against t, the integral signifies the area under this particular arbitrarily drawn
curve and the shaded area over here becomes the integral going from a to b f of t d t.
Now, in case of an integration problem, the problem is a little bit different, in the
sense that, we are now plotting or we are interested in plotting or finding the function
y of t given any function f. So, in that sense, this problem are different; in this case,
we are interested in finding out this particular curve given this starting point y at some
time t 0 equal to y 0; whereas, whereas, in the integration problem we are interested
in finding out this particular f of t curve, the area under that curve between the two
limits of integration; so that is the comparison with integration.
Now, let us take an example of a plug flow reactor, what we have done in the previous
module was to determine the volume of the plug flow reactor, that will give a certain
conversion x; and in that particular case, we had plotted the function negative of 1
by r x as a function of x; so, what we did was, inverse of the rate of conversion we
plotted it all as the y axis and the conversion we plotted it as the x axis, the area under
the curve multiplied by the - inlet - inlet flow rate of the reactant a in terms of moles
per unit time, that product actually give us gave us the volume of this c s t r.
Now, this particular design equation sorry, the volume of a PFR, this particular design
equation of a PFR is obtain from this overall model of the PFR, where the model is initially
written based on the mass balance; and based on the mass balance, we will get a model of
this form; and then expressing the concentration in terms of conversion variables, we will,
we will be able to convert that particular model in this form.
So, what we are going to do in case of an ODE solving is, we are going to solve this
particular equation, given that the volume at the, given that the conversion at 0 volume
at or conversion at the starting of the reactor is 0; so, with, with that condition we are
going to start our ODE solvent. So, there are some parallels between integration
and solving of the ODE, but in general, ODE solutions for chemical engineering problems
or in general for engineering problems, go well beyond the - limits a - limitations of
an integration method of solving.
Now, let me motivate the means that we are going to use in order to solve numerically
the ODE - subject to the initial conditions, we are given the ODE d y by d t equal to f
(y, t); let us say at the current instant, let the say the current instant is given by
t equal to t i - and at t i - and at t i we know all the value y i t i and everything
else that we need to know about the system. So, tau, d y by d t is nothing but limit has
delta t tends to 0 y i plus 1 minus y i divided by delta t, now that is going to be equal
to f(y i, t i); when we write this particular expression and let delta t be very small,
in that particular case, what we will get this as the solution is a means of numerically
solving the ODE; and that particular, by a simple rearrangement of this particular equation
what we will get is, y i plus 1 equal to y i plus delta t multiplied by f (y i, t i).
Now, what i have done over here is, replaced f (y i, t i) with another function s (y i,
t i); recall based on our geometric discussion, s is nothing but the slope of the curve y
against t; so, we will go back a couple of slides earlier, this act a point t i, s is
nothing but the slope.
Now, that is slope can be computed at the point (y i, t i) or it can be computed using
the various different means; and the means that we are going to use in order to compute
this particular slope is again going to give us different methods of solving the ODE problem.
Some methods are going to be more accurate then certain other methods; some other methods
have certain stability properties of interest to us, all these are something that we are
going to consider in this particular module; so, the numerical methods are going to focus
on using appropriate means to obtain the slope s in order to improve the accuracy of the
solution y i, that we get as a function of time t; so, that is what we are going to use
that is, how rather we are going to use a numerical method to obtain the ODE solution.
So, we start with certain value y 0 and we use a certain small enough delta t and we
keep using the numerical method recursively in order to get y at t 1 t 2 t 3 t 4 and for
the entire range of t of our interest; that is the recursive method of solving ODE; it
is under cursive numerical method for solving the ODE and we will actually be able to get
y at discrete times t 0 t 1 t 2 t 3 t 4 and so on.
Now, we can choose our delta t either to be a constant value or we can change the value
of delta t depending on how the slope s changes; if the slope s is very steep, we will take
small delta t values; or if the slope s is not very steep, we can perhaps take larger
delta t values; that is the basis behind what is known as adaptive step size; delta t is
the step size of the independent variable and this step size is something for us to
choose; and we will see how the choice of step sizes as going to affect the overall
quality of the solution, how to choose this particular step size, how the accuracy of
the solution depends on the various numerical methods, so on and so forth, or something
that what we are going to cover in this particular module.
The next important question that we are going to cover in this module is the question of
explicit versus implicit method. In the previous slide, we will go back to the previous slide,
what we had done is, the differential d y d t we had represented it as y i plus 1 minus
y i divided by delta t; the other way to represent this particular differential is also to represented
as y i minus y i minus 1 divided by delta t; and these two different methods are going
to lead us to different ways of solving - this - this particular problem.
This method that I have shown over here is what is known as an implicit method; whereas,
if we had represented d y d t as y i minus y i minus 1 divided by delta t, that would
be what is known as an implicit method. Now, we can just rearranged the implicit method
in a little bit different way and those ways I have shown it over here; this is the explicit
method that we have talked about; and this is the implicit method.
Let us go to the explicit method first, y i plus 1 is y i plus delta t multiplied by
the slope; the slope depends explicitly on y i and t i, y i and t i are quantities that
are already known at the time t i. So, y i plus one is computed directly from
known quantities, from already known quantity; so, this particular equation is not used as
an algebraic equation, but instead its use as an expression, that means, we solve the
right hand side, whatever value we get at the right hand side, we just use that value
as y i plus 1 and keep proceeding into the future; that is the explicit method. The implicit
method with slight rearrangement, we can write implicit method as, y i plus 1 equal to y
i plus delta t multiplied by the slope computed based on y i plus 1.
So, what is happening over here is, at time i the value y i plus 1 is not yet known, so
the slope y i plus 1 is computed at a point, which we are, which is currently not known;
so, it depends implicitly on the unknown quantities; so, y i plus 1 that can be computed using
the above non-linear equation. So, in this particular case, this particular
form of equation is used as an explicit expression, that means, we calculate the right hand side
and just assigned it to y i plus 1, whereas this is used as an algebraic equation, which
we can perhaps solve using techniques such as newton-raphson's techniques, or fixed-point
iteration techniques, so on and so forth; so, y i plus 1 implicitly depends on itself
- y i plus 1 - that is the implicit method of solving the equation; and we are going
to cover implicit methods and explicit method and what it means from the stability view
point of any algebraic equation solver; these are the things that we going to cover in this
particular module.
So, finally, to give an overview of this particular module, we will cover what is known as the
Euler's methods; Euler's methods are the implicit and the explicit method that we just spoke
about couple of slides earlier; those are actually known as the Euler's methods; then
will in general talk about implicit methods versus explicit methods, what what, what do
implicit versus explicit actually means, then we will talk about the Runge-Kutta family
of methods. We look at the error analysis as usual; we
will, we will talk about how the error propagates as the i changes as we go from y 0 to y 1,
y 1 to y 2, y 2 to y 3, so on and so forth. How is our numerical solution going to compare
- with - with our analytical solution; we will also talk about stability, which basically
means that, given y 0 when we are going to compute y 1 y 2 y 3 y 4 so on and so forth,
as i tends to infinity does our for the solution thus our numerical solution remains stable
or does the numerical solution go to plus or minus infinity; that is the problem that
we are going to tackle with respect to the stability - of our - of these methods.
So, all these become one class of methods, where we are going to use sum means in order
to compute the slope s; then another class of methods are what is known as predictor-corrector
methods; in predictor-corrector methods what we are going to do is, we are going to use
a method to compute the slope s, that is called a predictor method; and then we are going
to use certain set of equations known as corrector equations in order to improve the accuracy
of the approximation.
What that means is that, there will be an equation written in this particular form which
will be a predictor equation that will help us to compute y i plus 1. Now, we have the
value of y i and an approximate solution not y i plus 1, recursively this value y i and
the approximate solution y i plus 1, we will be used to correct the value of y i plus 1
in order to - give - get the higher order accurate formula.
The next set of methods is known as the Adam-Moulton's family of methods; and finally, we will cover
two slightly advanced topics in - in in - this particular module; first is the adaptive step
sizing had I mentioned a few couple of first slides earlier, that this delta t need not
be constant, the value of delta t we can change based on how the value of slope changes in
order to get higher order accuracy formulae.
So, we will try to talk about how to change the step size adaptively based on the current
solution of the ODE that we are trying to solve; and finally we will come to what is
known as stiff ODE is, I will motivate what we mean by stiff ODE is, and look at the solvers
that solve this stiff ODE problem; and while talking about stiff ODE then adaptive step
sizing I will take up a couple of examples that are of interest to chemical engineers
and try to motivate what the stiff ODE is actually mean; in - additions - addition to
that, all these methods we are going to cover only from the point of view of a single variable
problem, we will stick to single variable for most of this module; for a simple reason
that single variable problems are relatively easier to tackle, but I will also cover, I
will perhaps spend - half to - half to one lecture on extension of these methods to multivariable
problems.
So, that is the overview of ODE solving techniques; what I am going to do in this particular lecture
is, go over the geometric interpretation once more, go over the comparison with integration
and then talks specifically about the two methods; the two methods that I will - going
- going to talk about are the Euler's method and improved Euler's method, that will lead
us into the Runge-Kutta family of methods.
So, what I will - first - first do is, take up the geometrical interpretation once again
and try to again distinguish between what we were we were trying to do in the numerical
integration versus what we are trying to do in the ODE solving; the specific problem that
we are going to solve in the ODE solving techniques is, d y d t equal to f (y, t) with y given
at time t 0 equal to y 0. So, what we are interested in doing in case
of ODE solving is, we want to find out the value y as a function of t starting with some
value of y 0 given at time t 0. So, we start with this particular value y 0 and then try
to get the overall curve y of t as a function of t; and this is, let us say that, if we
have an analytical solution for this particular problem, let us say that, that analytical
solution that means looks - like - like this particular curve.
So, what we are going to do is, the function f (y, t) at time at time t 0 and at the value
of y 0 is going to be nothing but this particular slope that we have; this slope is going to
be f (y 0, t 0); so, what we are going to do in an ODE solving is, use this particular
value of slope in order to predict or in order to move on to the next point, which is going
to be (y1, t1). Now, this particular next point - can either
be - can either lie exactly on the actual curve, but usually there are errors that are
associated with any numerical technique; so, what is going to happen is that, the next
point is not going to be the white point that I have shown and I am you going to use white
curves in order to show the actual curves and I am going to use yellow dots in order
to show the numerical solution; so, what will happen in the ODE solver, based on the ODE
solver is, we will reach the point which is shown by the yellow x over here; so, over
here then the function value f (y 1, t 1) is going to then represent the slope of the
numerically computed curve; and based on the slope that we compute over here - from - from
time t 1, we will then move on to time t 2 and - we might - the slope - might - might
be like this and then we might end up at this particular yellow point; and we will keep
continuing this over and over again and perhaps finally, the curve that will get essentially
is perhaps for argument sake looks something like this.
So, this is in the numerical solution; and this is the actual solution to the problem;
so, what we are interested in doing when we try to solve an ODE problem is, we are interested
in getting the curve y as a function of t. Now, when we are actually solving the integration
problem, we are not interested in getting - this - this curve y as a function of t,
but instead what we are actually plotting is, we are plotting the function f of t against
t. So, what this function f of t represents is
nothing but the slope of this particular curve at various points; and let us say that particular
curve there are the slope f of t represents something like this; in that case, the integral
from a to b or integral from y 0 to integral from t 0 to t 1, or rather than same t 1,
le we call it t n, that integral is going to be the area under this particular curve.
Now, the first difference that we find is that, for the ODE solver we have this function
f which can be a function of both y and t; in case of an integration, it is going to
be just a function of t; that is going to be one difference; the second difference is
that, the integral is an area under the curve, whereas in solving the ODE we are actually
trying to trace the curve y of t rather than looking at the curve f of t; that is the other
difference between ODE and higher integration; the third difference is that, because this
function d y d t is in general going to be a function of both y and t, the ODE solving
method is going to be a more general way of solving these problems, rather than an integration
method; that is going to be a third difference between this.
Now, let us look at the PFR problem, now what we physically mean by the plug flow reactor
problem is, let us consider that we have a tube of this sort, let a b the area of tube
at the inlet, what we have is, we have the system flowing in..., we have solution of
any particular compound, let us call that compound a and the reaction, let us say, we
have the reaction going from a to b and A c s, let us say, is the area of cross section
of the tube. So, the volume is going to be nothing but
A c s multiplied by x, where x is any distance from the inlet. So, what happens is that,
the a where, the species a keeps getting converted to species b, because of any reaction that
takes place within this this particular system; and the overall equation for this system can
be represented in the form of d x by d v equal to the rate of reaction r, which is as given
as a function of x divided by divided by f, so this is what we get as d x d x by d v.
So, now, in the ODE solver, what we are going to do is, we are going to find the conversion,
so we are going to find the conversion as a function of the volume of the PFR; if some
of you have covered or who have already gone through reaction engineering courses will
perhaps recognized, what, what I mean by this, if you are not gone through a reaction engineering
course, basically I will just give you an overview of what happens as the species a
enters into the reactor - into the reactor - into the plug flow reactor, it gets converted
because of the reaction to the species b; and this particular equation represents how
this species a or how quickly this particular species a is going to get converted within
the reactor. So, x represents conversion, that means, how
many how much percentage of species a has been converted to species b. So, what we get
if we are going to plot conversion against volume; initially, when the concentration
of a is high, that means, closer to the inlet, where the concentration of the species a is
high the rate of reaction is faster; so, a gets converted very quickly as we move towards
the end of the reactor; so, at the inlet, the volume of the reactor is 0, we are starting
right at this; as we keep going towards the right, the volume keeps increasing, that is
what is happening, that is what this represent.
Now, as the volume in increases, the amount of a that is converted increases; the rate
of conversion of a is going to be very fast right in the beginning that is, because there
is a lot of a that is available for reactions to take place; as we go towards the other
end of the reactor, as the amount of a depletes, the rate of reaction reduces; as a result
of this, the conversion curve that we are going to get as a function of volume is perhaps
going to look somewhat like this; the rate of reaction is high in the beginning and then
it is starts to taper off. Maximum conversion is going to be hundred
percent; the conversion cannot exceed hundred percent at any given time. So, in an ODE solving,
in ODE solving for a plug flow reactor, the question that we are trying to ask is, how
does the conversion of a change as we increase the volume of the reactor. So, this is the question that an ODE solver
or while ODE solving we are trying to ask. Now, the same equation, the same equation
we will rewrite it in a different form; what we will do is, we will take d v on this side
and f by r will take on to the left hand side and we will write this in the form d x divided
by r of x multiplied by f i - actually I missed f a 0 over here - to keep it consistent with
the notation that we have used in the previous lecture, f a 0 multiplied by d x divided by
r of x is going to be equal to d v. Now, if we are going to plot the 1 by r as
a function of x, in that case the volume that is required to meet a certain conversion is
going to be the area under the curve. So, what we are plotting, so what we are plotting
is f a 0 divided by r x, let us, let us not worry about the negative signs over here as
a function of x; so, what we plot is how the value f a 0 divided by r x changes as the
conversion changes and let us say that particular value changes like this.
So, now, the question is, what is the volume of the PFR that is required in order to meet
a certain conversion; in the, in the previous module, what we said is, we wanted to get
ninety percent conversion, that means, x equal to zero point nine. So, what is the volume
that gives you ninety percent conversion; so, the volume that gave us ninety percent
conversion was the area under the curve. So, integration for solving design equation; so, in this case ODE is for
solving the PFR equation; integration is also use can be used for solving the design equation
of the PFR, but the question that we are going to ask is going to put in a slightly different
context; and the question that we are going to ask in case of solving the design equation
is what volume of PFR required to achieve a specific conversion value. So, we have now recast the same question in
a slightly different way and in that we are asking, what is the volume of PFR that is
required to achieve a certain conversion. Now, the question is, how can we use an ODE
solver in order to answer the same question; the way we can use the ODE solver in order
to answer the same question is, let us look at the point at which conversion is ninety
percent.
So, the point at which conversion is ninety percent and draw the horizontal line over
here; the value of the volume that you get over here is the volume of PFR, that gives
you ninety percent conversion and I will call this multi-variable ODE; and if we have the equation of the form d by d
t equal to y 1 y 2 and so on up to y n equal to f 1 of y 1 y n, t f 2 of y 1 y n and t
and so on up to f n of y 1 y n, t. So, when we have n equations of ODE - of the
- of that n differential equations and we want to solve them given n initial conditions
y 1 0 y 2 0 up to y n 0 at time t equal to t 0; and that particular case, we can easily
extend the ODE solving techniques in order to obtain the values of y 1 y 2 up to y 1
as a function of time t; so, let this - white - white curve represents the true curve y
against t; and the problem that we are trying to solve is, d y by d t equal to sum function
f; let t i be the current time; and y i is the current value of y.
Now, the slope at this particular point is nothing but the tangent to this curve; so,
I am just going to draw the slope over here, so this is the point t i, let this be the
point t i plus 1 qc. Now, if we are going to use the slope computed at (y i, t i) in
order to obtain the solution of a at the point t i plus 1, that is going to give us the Euler's
explicit method. So, the Euler's explicit method is going to lead us to the point represented
by this Red Cross over - over - here. So, what Euler's explicit method does is,
we will write d y by d t as nothing but y i plus 1 minus y i divided by delta t equal
to f, I will just write it at this short hand notation f I, which means, f computed at (y
i, t i); and therefore, from this, we will have y i plus 1 equal to y i plus delta t
multiplied by f i, where f i is the slope of the curve computed at (y i, t i).
Now, this leads us to an explicit Euler's method; the next method that we can talk about
is an implicit Euler's method; and the implicit Euler's method, we will write it as, y i plus
1 equal to y i plus delta t multiplied by f of y i plus 1, t i plus 1.
So, what we are we are doing is, we are trying to find the solution y i plus 1, such that,
the slope that is computed at y i plus 1 is going to be actually the slope that was going
to be used over here in order to get the projection. So, what i will do is, I will just guess a
particular slope over at this particular point, let us say, I am going to quick guess the
slope at over here and see where this particular slope leads me.
Now, this particular slope is going to lead me to a different point over here. So, that
is not a solution, so i will then use, let us say, a Newton-Raphson's method in order
to again try to solve this particular implicit expression and go on; so, let us say, I will
try a slope now, because this point is much higher than this particular point. So, i am
going to try a slope which is slightly higher with a slope with of this particular form
i perhaps I am going to reach this point. Now, the slope at this point is, let us say
is, going to point in again in this particular direction, so the slope that I have used is
this one, where as the slope that is pointing over here is in this particular directions.
So, what i am going to into do is, I am going to tend try to project this point over here
and I will keep doing the recursively perhaps using a fix point iteration method perhaps
using a newton-raphson's method until I get the final solution; at that final solution,
let us assume that, final solution is shown by a yellow cross, let us say, this becomes
the final solution. Now, this final solution is, such that, the
slope at that point is f of y i plus 1, t i plus 1 is the slope that we have used in
order to reach that point itself; so, what we are seeing over here is, this particular
slope is actually the slope that will be computed at this particular point right over here.
So, this yellow cross is the cross that we get using the Euler's implicit method; the
red cross is the cross that we are going to get using the Euler's explicit method. Now,
what we can perhaps think of is, we can think of a method which is a semi-implicit method.
Now, the semi-implicit method in this particular case is going to be y i plus 1 equal to y
i plus delta t multiplied by f (y i, t i) plus f of y i plus 1, t i plus 1 divided by
2; so you see what i have done over here, what i have done essentially is, taken the
slope at the initial time (y i, t i) taken, the slope at the solution point y i plus 1,
t i plus 1 taken an average of these slopes; this average is the slope that I am going
to use in order to compute the next value y i plus 1.
So, again if we go back over here, slope at (y i, t i) is already known to us; this particular
quantity is already known to us, this quantities something that is unknown to us currently.
So, what we are going to do is, we are going to solve this particular non-linear equation
together in order to get the value of y i plus 1; and let us say the that, we will use
a purple chalk in order and a purple x in order to represent this particular solution;
and this particular solution is reached by this purple dotted line now; this purple dotted
line if you if you see over here, if that one should be the average of the slope, that
is computed at this - excuse me - the slope that is computed over here and the slope that
is computed at this point. Now, the slope computed at this point might
be - might - look in this particular way; so, we have, we have the slope computed at
y i plus 1 as thus this purple color slope, the slope the slope computed at y i as this
white color slope and the average of the two is the slope, that is shown by the dotted
line by by this particular line.
So, what we do in implicit or semi implicit method is, use this particular equation that
I have written over here is as us non-linear equation; and we will solve the non-linear
equation using an appropriate means such as the newton-raphson's method, whereas in the explicit method, for
example, an explicit method of this type, the right hand side term is use as an expression
and y i plus 1 gets that value, that is computed using the right hand side expression.
So, I will write y i plus 1 given by y i plus delta t multiplied by f (y i, t i); so, this
is the Euler's explicit method; and instead of Euler's explicit method, we will use instead
of f (y i, t i); we will use a certain improved slope s (y i, t i); and this improved slope
s(y i, t i) can be computed in various ways; one set of ways will give us what is known
as Runge-Kutta family of methods and that is what we are going to cover essentially
in the next lecture of this particular module. So, if this particular slope is computed explicitly
based on the value of y i and certain other computation and does not depend on the final
value y i plus 1, then what we get are explicit methods; if it depends on the final value,
y i plus 1 as well as the initial value, y i then we get semi implicit method; and if
it depends only on the final value y i plus 1, then we get implicit method; in both implicit
and the semi implicit methods, we are going we are going to use non-linear equation solver
such as a newton-raphson's method. The name for this particular semi implicit
method is crank-nicholson method; and what we are going to do in either crank-nicholson
method or in the implicit Euler's method is to solve the non-linear equation. So, the
question is, where does crank-nicholson hide us crank-nicholson method is better than the
implicit Euler's method; the reason why crank-nicholson method is better is, it has a greater accuracy
than the implicit Euler's method; in the next lecture, we will see that both the explicit
Euler's method as well as the implicit Euler's method have an accuracy of delta t to the
power 2, whereas the crank-nicholson method, we will see has an accuracy of delta t to
the power 3, we will look at various different Runge-Kutta methods; the Runge-Kutta method,
that the second order Runge-Kutta method has an accuracy delta t to the power three fourth
order; Runge-Kutta method, which is perhaps the most popular Runge-Kutta method has an
accuracy of delta t to the power 5; all these things we are going to cover - in the next
- in the next lecture. Now, what is common in the Runge-Kutta family
of methods is, something that I will just talk about for a couple of minutes before
ending this particular lecture; so, what we did in the - explicit - Euler's explicit method
is just computed the slope at y i and use that as the slope s.
That is not the best that we can do in crank-nicholson method; what we did is, we found out to the
slope of y I, we found out the slope at the final point y i plus 1 and then took an average
of the slope; now, this was an implicit method, because we needed to know this, the point
y i plus 1 in order to get the slope - slope - at y i.
Instead of that, we have Runge-Kutta family of methods
and I will again draw the curves that I had earlier
and this is our slope that is f i, so what we do in the Runge-Kutta family of methods
is that, we choose various different points in this particular interval t i to t i plus
1. In that particular interval, we project the
various points based on the slope f of i; at the projected points not at the final solution,
but at the projected points we calculate the new slope and the final s (y i, t i) is going
to be sum average of the slopes that are computed at this projected points. So, for example,
what we will do is based on this particular x, this particular cross f of i computed at
this cross we will project the point, let say at the midpoint let us call this as t
i plus half. So, based on this particular curve, we have
computed, we have reached, let say this point which I have shown with a circle and an x
now, keep in mind that, this particular point with a circle and an x is not the solution
y i plus half. This is just a projected point at y i plus half, now what we do is, compute
the slope at this particular projected point and let us say that particular slope is shown
by the - yellow - yellow line over here. So, this is the slope computed at the projected
point not at the real point; so instead of using this particular white slope, if we were
to use this particular yellow slope over here and then go on to point y i plus 1, we will
reach this yellow x; this particular method is what is known as midpoint method; and this
particular technique of finding the slope s as some kind of a weighted average of the
initial slope; and the slope at the projected points is known as a Runge-Kutta family of
methods; this midpoint methods uses two points in order to - calculate - calculate the slope,
the first point is this point (y i, t i). The second point is the projected value at
the time t i plus half; so, we are using these two slopes in order to compute the value of
s (y i, t i) and that is the reason why the midpoint method is a falls under Runge-Kutta
second order method. So, what we have covered so far is an overview
of a numerical method to solve an ODE initial value problem; we gave geometric interpretation
of the Euler's implicit method and Euler's explicit method and then the specifically
covered two second order methods. One is an explicit second order method, which is the
Runge-Kutta method, specifically we covered the midpoint method and we covered a semi
implicit second order method, which is known as the crank-nicholson the methods.