In this segment, we will talk about how we can write higher-order ordinary differential
equations in the state variable form. We will do this through an example. What we mean by
writing the state variable form is as follows: since all the numerical methods, which we
have talked about so far as solving ordinary differential equations are concerned, they
are based on solving first-order ordinary differential equations. If that is the case,
as we have done by Euler's method, or Runge-Kutta second-order method, or Runge-Kutta fourth-order
method, we now want to be able to see that if somebody gives us higher-order ordinary
differential equations, which is, let’s supposed, second-order differential equation,
how can we rewrite it as a coupled first-order ordinary differential equation so that we
can continue to use the methods which we have learned for solving initial value problems
through methods such as Euler’s method. So, here is a problem statement somebody is
giving you this third-order ordinary differential equation, and what they want you to do is
to write it in state variable form. So, how do we go about writing this differential equation
statement? First thing we want to do to do is we want to rewrite this a different symbol
where we're going to use dots to show derivatives. So, for example, first derivative is y dots,
second derivative is y double dot, and third it is y triple dot. The reason why we are
doing this is because this is the general way of writing these equations when we are
trying to put them in the state variable form. So, I'm basically following what is the convention,
which is generally used most of the books so that when you go to other courses just
vibrations and controls you'll be familiar with this particular symbol, I suppose. So,
once we have seen it but this third derivative term, this is a second derivative term, so
we know these are not first derivative terms, so we have some have to do some transformation
so that we can write it as a bunch of first-order ordinary differential equations. So, let's
do it the simple way. What we can do is, we can call Y to be X1 so I'm renaming Y to be
X1, which is the dependent variable by another dependent variable call X1, for example. Then,
I'm going to say X2 is equal to Y dot. First derivative of Y is X2 but what is Y dot? Y
dot is nothing but X1 dot, right from here. Then, I'm going to write X3 as Y double dot,
and then Y double dot is nothing but X2 dot. So, because we want to be able to do is we
want to be able to write it in just in terms of the first derivative terms, so X1 is Y,
so X2 is X1 dot, and X3 is X2 dot. And now we don't need to go any further because we
have this ordinary differential equation which we are going to use to be able to write down
our next equation. So, if you look original equation which is given to us I can write
it as 17Y triple-dot will be X3 dot. Because Y double dot is X3 so Y triple-dot will be
X3 dot. 3Y double dot is nothing but X3 and Y dot X2. And then we have 5Y which is X1.
And that's equal to 11 e to the power minus T. So, we are basically written in terms of
these three new variables which we introduced as X1, X2, and X3 these are the dependent
variables we have introduced. But now we can see that hey this particular differential
equation has only the first derivative term. So, basically what happens is that this becomes
your first ordinary differential equation, this becomes your second ordinary differential
equation, your third order differential equation. All of these three ordinary differential equations
are in the first-order form. So, let's go ahead and rewrite this these two these, three
equations. We will say that X1 dot is equal to X2, that's my first equation, and what
I'll do is I'll write it as like this slide where 0 X1, plus 1 X2, plus 0 X3. The reason
why I'm doing this is because I want to be able to, later on, write this in the matrix
form, so you will know where your zeros and ones should be in place. The next one will
be X2 dot, and X2 dot will be equal to X3. And I get right is 0 times X1 plus 0 times
X2, plus 1 times X3, while as now the third equation is going to come from here, and X3
dot will be equal to 11 e to power minus T, minus 3 X3, minus 7 X2, minus 5 X1 divided
by 17. So, see this what? What we've done, we are basically written our first three we
have written our three ordinary differential equations. All we have on the left side is
the first derivative of the three dependent variables, which we introduced to solve this
particular problem. Now it's going to be very easy to write this in the state variable form.
So, what I'm going to do is, we're going to simplify this equation a little bit further.
So, this is our first equation, this is our second equation, and this is our third equation.
Let's simplify this third equation. So, what we have is that we have X3 dot is equal to
minus 5 divided 17 X1, minus 7 divided by 17 X2, minus 3 by 17 X3, plus 11 e to the
power minus T divided by 17. Now, you can see that hey we can write down these equations
in the state variable form. So, what does that mean? This is extremely important that
there is a one-to-one correspondence in order to be able to write this in the state variable
form. So, our state variables are X1, X2, and X3. Those go right here. So here will
mean the 3 by 3 matrix in order to be able to populate that, and here will be a 3 by
1 matrix, of course, because 3 by 1 matrix here. So, what here will be the corresponding
derivative terms will be X1 dot, X2 dot, X3 dot, and we'll get 0 1 0, 0 0 1 and then here
we'll have minus 5 divided 17 because that is the X1 coefficient, minus 7 by 17 here,
and minus 3 divided 17 here. What goes here are the forcing terms. We have no forcing
term in the first equation, no forcing term in the second equation, but we do have 11
e to the power minus T divided by 17, which is this term right here as our forcing term,
and that goes in a separate place. And that's what your state variable form is for these
differential equations. But, it would be complete without rewriting what the initial conditions
are. So, if you look at the initial conditions which were given to us, those need to be,
again, given in the same order as our state variable form. So, if we have X1, X2, X3 here
the initial conditions have to be given on X1, X2, and X3 at some starting point. This
we know is nothing but Y of 0, Y dot of 0, Y double dot of 0, and this one here will
turn out to be 13 because that's the initial value Y, the initial value of Y dot is 19,
the initial value of Y double dot is 23. And that's how we write it in the state variable
form. And if you have a program such as MATLAB, what you'll be doing is that you will be giving
it the state variable matrix right here, this one right here to it, you will be providing
it the forcing matrix, and also you'll be providing the initial conditions. So, once
you have those three in place, you'll be able to find the solution. And that is the end
of this segment.