 Welcome friends, in this lecture we will make the transition from our module of numerical analysis to the module of ordinary differential equation general theory. In the last lecture we were discussing the merits of implicit method in comparison to explicit method. Now, the particular advantage of implicit method comes in the context of stiff differential equation. Today, we will first see that with the help of an example. Consider this initial value problem of a mass spring damper system. Here, c is the damping coefficient and k is the stiffness and mass is unity, unit mass and these are the initial conditions. Initial position is 0, initial speed is 1. Now, this system we will consider for 3 cases of the coefficient c and k. First we take c equal to 3 and k equal to 2. So far as expressing this differential equation in state space etcetera is concerned that is fairly trivial. So, we quickly go through it. We take the state variables as z 1 and z 2 which will give us z 1 dot as x dot which is z 2 and z 2 dot which will be x double dot and that we will get from this equation that is minus k x minus c x dot that means minus k x minus c x dot. These two equations together will give us the state space equations of the system. So, this z 1 z 2 with coefficients of that we will get from here 0 1 minus k c and this is nothing but z. So, z dot is this matrix into z and this matrix turns out to be the Jacobian of this entire function. The slope function f of t z that you get. So, the Jacobian of that the derivative matrix of that will be this j which entered into our discussion with respect to which we carried out an Eigen value analysis. So, now with the value of c as 3 and the value of k as 2 if we put in this matrix sorry this is minus. So, if we put these two values of t and k in this matrix and try to find the Eigen values we get the Eigen values as minus 1 and minus 2 and accordingly the solution turns out to be this. Now, we will make note that both this minus 1 and minus 2 these two Eigen values of this matrix are of reasonable magnitude and they fall here I mean with sufficiently small h which is not too small the two values h lambda h lambda 1 h lambda 2 will fall in this circle and therefore, the or within this it will certainly fall within the r k 4 boundary stability boundary. So, then r k 4 will be stable for this particular situation. So, we find that with the help of Runge-Butta force order method as we try to solve this then we will find that we get the solution these stars give out the solution points with adaptive r k 4. So, in this particular case you will find that there was no requirement of adaptation below 0.4. So, 0.4 is the step size here from 0 to 0.4 then 0.8 then 1.2 and so on the integration of the differential equation went on smoothly without any troubles. You see here the solution x equal to e to the power minus t minus e to the power minus 2 t that you will find as the solution satisfying these initial conditions also and e to the power minus t is this part and e to the power minus 2 t is this part. According to the two Eigen values of the matrix J here you will find two component solutions one is e to the power minus t the other is minus e to the power minus 2 t. So, they are these two solutions and the sum of these two solutions is this which is the complete solution. Now, if we consider this pair 49 and 600 for c and k and put here and carry out the Eigen value analysis then we will find that two Eigen values are minus 25 and minus 24 these are the minus 24 and minus 25 are the two Eigen values and accordingly the two solutions will have exponential with that kind of exponent values exponent coefficient and you will find that the solution is e to the power minus 24 t minus e to the power minus 25 t. Here the two component solutions are one is this and one is this dash one is this dotted curve and the other is this dash curve and the resulting total solution this x is this made up of the solid line with starts. Starts are the point where the adaptive long distance method gave the output. Now, you see here adaptation was not required much that is 0.1 within a step of 0.1 you have got points appearing here, but here the error was going high and therefore, the adaptation subdivided the intervals and you have here you have got so close point. Now, here so far as stiffness is concerned it has become stiff the system in the mass spring damper system the spring has got become much much stiffer, but at the same time the damping coefficient has increased sufficiently well. So, that the resulting result of this increase in stiffness does not lead to what is called the stiffness of the differential equation. What has happened is that here minus 1 and minus 2 1 and 2 were comparable in order here also the both the Eigen values are comparable in order one is 24 the other is 25 minus 24 minus 25. So, their magnitudes are comparable. So, you do not see the real damage that the stiffness of the differential equation may cause that we will see in the third case where we take c as 302 and k as 600. In this case the two Eigen values are minus 2 and minus 300 and with the r k 4 the actual solution is this solid line the solution shoots up fast and then decays like this this is the solution. Now, here you will notice that if you try to work out the component solution e to the power minus 2 t by 298 that is this slowly decaying component that is it starts from here and goes down. On the other hand this term minus 300 minus e to the power minus 300 t by 298 that starts from here immediately dies down to 0 and then goes 0. So, that means after a very little time after a very small amount of time say this is 0.1. So, this will be 0.03 after 0.03 units of time it is actually this part which will have a non-zero component and this part is has gone down to 0. But, then the part which goes down to 0 that has such a large negative Eigen value that this part of the solution will require further and further subdivision of the interval in the adaptive Runge-Kutta method. And therefore, in order to predict this solution the subdivision of intervals goes on and all these points in half a third manner are generated in the Runge-Kutta 4th order method see how much is the error huge error because the Runge-Kutta adaptive method does not have a an inbuilt mechanism to check the error when it is building up. After the error has built up quite a bit then it tries to subdivide the interval and then the cure is no longer possible. On the other hand first order implicit method implicit Euler's method that gives you these solutions. The implicitness of the method gives you this nice solutions here of course there is no statement made about accuracy. Accuracy has suffered a little bit the stars the points are a little away from the actual solution curve. But, the method is stable the errors never shoot out too much like this. So, this is the first order implicit Euler's method giving this result. So, therefore, when you try to solve ODE systems which are stiff in nature that means in which in the solution if you have components of hugely different scales then you must use a an implicit method of differential equation solution and in that you will require the Jacobian of this function. In this case this is constant, but in other cases where this is variable you may need to find the Jacobian of that. In this case Jacobian is this constant value. So, sometimes you these functions will be so complicated that it is Jacobian will not be constant you may have to evaluate those Jacobians. Now, when you need to evaluate the Jacobian of this function.