# Decoupling system of differential equations

Here I have one task and it is preparation for small exam. I solved it by hand for first case 1), but I need to check it in $Mathematica$ and to try to implement it for both cases 1) and 2) automatically. After decoupling I am looking for solutions of the decoupled system and how to get them and come back to the source variables because I need solutions of them?

System of two differential equations of 4th order and I need to transform them in 1) equivalent system of 4 equations of second order with appropriate substitutions and 2) 8 equations of first order. How to do that in Mathematica automatically, in one case 4 equations second order maximum and in another case 8 equations of first order maximum? Example is with known constants a and b. I know that I must use some substitutions to reduce the system.

Firstly can be helpful homogenous solution when g1[x] and g2[x] are equal to zero.

first eq

  g1[x]==a1*X1[x] + a2*X2[x] + a3*Derivative[2][X1][x] -
a4*Derivative[2][X2][x] + a5*Derivative[4][X1][x]


second eq

  g2[x]==b2*X1[x] + b1*X2[x] - b4*Derivative[2][X1][x] +
b3*Derivative[2][X2][x] + b5*Derivative[4][X2][x]


1) 4 equations with adopted substitutions of second order differential equations.

2) 8 equations of first order

I did a) by hand in the form

$(\text{x1}=\text{X1}(x)) (\text{x3}=\text{X2}(x)) \left(\text{x2}=\text{X1}''(x)\right) \left(\text{x4}=\text{X2}''(x)\right)$

$X(x)=\left( \begin{array}{c} \text{x1}(x) \\ \text{x2}(x) \\ \text{x3}(x) \\ \text{x4}(x) \\ \end{array} \right)$ $, A=\left( \begin{array}{cccc} 0 & 1 & 0 & 0 \\ -\frac{\text{a3}}{\text{a1}} & -\frac{\text{a2}}{\text{a1}} & -\frac{\text{a5}}{\text{a1}} & -\frac{\text{a4}}{\text{a1}} \\ 0 & 0 & 0 & 1 \\ -\frac{\text{b5}}{\text{b1}} & -\frac{\text{b4}}{\text{b1}} & -\frac{\text{b3}}{\text{b1}} & -\frac{\text{b2}}{\text{b1}} \\ \end{array} \right)$ $, B=\left( \begin{array}{c} 0 \\ \frac{\text{g1}(x)}{\text{a1}} \\ 0 \\ \frac{\text{g2}(x)}{\text{b1}} \\ \end{array} \right)$ $$X''(x)=A X(x)+B$$

• @Nasser thank you, it is corrected now. It is not partial, just of one variable – Pipe Jan 26 '13 at 6:33
• @Naser it can e helpful also homogenous solution firstly when the functions g1 and g2 are equal to zero – Pipe Jan 26 '13 at 6:44
• @I didn't speak about standard state space formulation. I need solutions of system of differential equations and how to transform it in 4 second order – Pipe Jan 26 '13 at 14:42

## 1 Answer

I am a little confused by your terms and what you have shown. But in case it helps, one way to obtain the state space matrix is to use StateSpaceModel as follows

eq1 = g1[x] ==
a1*X1[x] + a2*X2[x] + a3*Derivative[2][X1][x] -
a4*Derivative[2][X2][x] + a5*Derivative[4][X1][x];

eq2 = g2[x] ==
b2*X1[x] + b1*X2[x] - b4*Derivative[2][X1][x] +
b3*Derivative[2][X2][x] + b5*Derivative[4][X2][x];

StateSpaceModel[{eq1,
eq2}, {{X1'[x], 0}, {X1[x], 0}, {X2'[x], 0}, {X2[x], 0}}, {{g1[x],
0}, {g2[x], 0}}, {X1[x], X2[x]}, x]


Which gives

We see there are 8 state variables as expected.

You find more information on the above command here http://reference.wolfram.com/mathematica/ref/StateSpaceModel.html

• I need 4 second order and solutions. – Pipe Jan 26 '13 at 14:43
• what I can do with this? – Pipe Jan 26 '13 at 14:44
• vote down sorry, you didnt understand – Pipe Jan 26 '13 at 17:03
• @naser what does two separated columns and rows represent? what is a solution of this matrix of differential equations, how to reform now the system in 8 diff equations – Pipe Jan 26 '13 at 23:32
• my full description of the problem is here, maybe you can understand what actually I need. Thank you for your attention and try. math.stackexchange.com/questions/287762/… – Pipe Jan 27 '13 at 2:35