CHAPTER 08.05: HIGHER ORDER AND COUPLED DIFF EQ: Background      In this segment we are going to talk about how we use numerical methods to solve higher order or coupled ordinary differential equations because if you recall, the methods we have been taking about so far, such as Euler's Method and Runge Katta Second Order Method and Runge Katta Fourth Order Method, they all solve the differential equation of this particular form. So you are given a first order differential equation which can be written in this particular form and you are given some intial condition at some point and that's the equation, differential equation which you can solve by using the Runge Katta Second Order Method or Runge Katta Fourth Order Method or Euler's Method. So what this may make you believe is that all these methods are only good for first order ordinary differential equations. How do we go about solving higher order differential equations or coupled ordinary differential equations. Is there a way to get around it because all the methods we have talked about so far can only solve a first order ordinary differential equation. So, what we will do we will take you through an example and that's the best thing to do. So let's suppose somebody give us a differential equation, a second order differential equation like this, says hey you got 3 times the second derivative of y plus 2 times the first derivative with respect to y plus 5y is equal to 7e^-x and now here you will need two inital conditions, y(0) is equal to, let's suppose, equal to 11 and dy/dx(0) is equal to 13, let's suppose. So we are given here a second order differential equation. It is no longer a first order differential equation like we had been solving by using the numerical methods way I've done so far but here we have a second order ordinary differential equation. Doesn't, it cannot be written in this form directly so we got to figure out how can we solve a differential equation which is second order or higher or which is coupled. So let's talk about coupled ordinary differential equations a little bit later. Now the way to solve this particular problem, is a second order differential equation, what we have to figure out is that we need to somehow reduce it to a first order differential equation so we can use the methods which we have learned so far such as Euler's Method and Runge Katta Methods. And one of the ways to do that is as follows. What we will do is we will take, we will assume dy/dx=z. So we say let dy/dx=z. As soon as we assume dy/dx=z what we can do now is that we can substitute, for anywhere there is a dy/dx we will substitute z or anywhere there is the second derivative of y with respect to x squared I will call it the first derivative with respect to z. So for dy/dx, any sign of dy/dx I will, or any instance of dy/dx I will substitute by z and the second derivative of y with respect to x, by first derivative of z. So if I do that, see what will happen to this particular equation here. This will become, I'll have the second order, this second order differential equation will become 3(dz/dx), this one, then instead of dy/dx I will put z, plus 2z plus 5y is equal to 7e^-x. So that's what I get as the reduction of this differential equation once I make these substitutions there. And now I can really see that hey, this is not, nothing but a first order differential equation in terms of z. That's what you have. This is a first order ordinary differential equation with z as a dependent variable and x as the independent variable. So we have some how been able to reduce a second order differential equation to a first order differential equation but it does not happen alone. It also happens by taking this into combination because y is our orginal independent variable so we cannot just simple solve this for z and y because there is only one differential equation here and so we need to couple it with this particular ordinary differential equation and solve both of them simultaneously to be able to use the methods we have learned so far for solving first order ordinary differential equations such as by Euler's Method and Runge Katta Method. So what I am going to do is I am going to rewrite these two differential equations so we have, this is number 1 and this is number 2 differential equation. Let's also see that in order to be able to solve a first order ordinary differential equation which is coupled now, this one is coupled with this one, we do need a corresponding intial condition. So here are the initial condition we go to for y, so y(0)=11 so that means that this will be corresponding to y(0)=11. That's what I will be using there. Now, here is a dz/dx so I need an intial condition on the variable, dependent variable z, so I will use this one because I will have a dy/dx(0)=13 which simply inplies that z(0)=13 because that's how z has been defined. So that's how these things are going to get coupled together. So I am going to rewrite these that, what these 2 couple ordinary differential equations are in addition to the intial conditions which are required to solve that. So if I rewrite that I'll get the first order, the first equation of the two coupled coupled equations which I have to write. dy/dx=z and that the initial value of y, which I need corresponding to this, y(0)=11 and the second one will be that I have dz/dx. I am going to simplify it, that would be ((7e^-x)-2z-5y)/3 by rewriting the equation just in terms of dz/dx, and the initial condition corresponding to this would be z(0)=13. So that's the second first order ordinary differential equation. Now, both of these need to be solved simultaneously because you have y here and z here and a z here and y there, so both of these need to be solved simultaneously to be able to find out what the value of y is at a particular point which you are interested in. So that's how you reduce your higher order differential equations to a set of first order differential equations which are coupled and then to be able to solve it.