# Problem solving coupled second order differential equations using DSolve

I have three coupled second order ODE's given as below

$$x''[t] = -c_1*y'[t]-c_2*z[t]-c_3$$
$$y''[t] = -c_4*x'[t]$$
$$z''[t] = \frac{c_5}{c_6}*x[t]-c_6$$

where $$c_i$$'s are know constants. The boundary conditions are

$$x[-1]=x=y[-1]=y=z'[-1]=z'=0$$.

I followed the example given here How do I solve coupled ordinary differential equations?

{x, y, z} = {x, y, z} /.
Dsolve[{x''[t] == -c1*y'[t] - c2*z[t] - c3, y''[t] == -c4*x'[t],
z''[t] == -c5 + c5*x[t]/c6, x[-1] == 0, x == 0, y[-1] == 0,
y == 0, z'[-1] == 0, z' == 0}, {x, y, z}, t] //
FullySimplify // First


I get the following output

ReplaceAll::reps: {Dsolve[{x''[t] == -c3 - c2 z[t] - c1 y'[t], <<8>>}, {x, y, z}, t]} is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing.

Set::shape: Lists {x, y, z} and {x, y, z} /. Dsolve[{x''[t] == -c3 - c2 z[t] - c1 y'[t], <<8>>}, {x, y, z}, t] are not the same shape.


Could someone please tell me what is wrong with my approach and please suggest me how to solve this system.

• You have a typo in there. Try DSolve instead of Dsolve. Nov 12 '12 at 23:15
• And FullSimplify instead of FullySimplify. Nov 12 '12 at 23:21
• I just noticed another problem: the equation implemented for z''[t] is not the same as the equation listed at the beginning of the question. Nov 13 '12 at 0:50
• I think {x, y, z} should be {x[t], y[t], z[t]} and I'd be inclined to apply First before FullSimplify. Nov 13 '12 at 1:55

As already pointed out the functions you use are misspelled. It's DSolve and FullSimplify. But even if your input is correct, it seems Mathematica cannot solve your problem without knowing your constants.

Choosing your constants to be 1, Mathematica is able to compute an analytic solution after a while

deq = {x''[t] == -c1*y'[t] - c2*z[t] - c3, y''[t] == -c4*x'[t],
z''[t] == -c5 + c5*x[t]/c6, x[-1] == 0, x == 0, y[-1] == 0,
y == 0, z'[-1] == 0, z' == 0} /.
Thread[Rule[{c1, c2, c3, c4, c5, c6}, ConstantArray[1, 6]]];

DSolve[deq, {x, y, z}, t]


The computation of the general solution is running now for some minutes but I'm pessimistic that it will one.

• I would think that c6, in particular, would pose a serious problem for DSolve. At a minimum, the OP might want to specify that c6 != 0. Nov 13 '12 at 0:47
• Thank you for all the replies, I really appreciate your help. I corrected the mistakes and also made all the constants to be 1. I tried several times solving it and mathematica exited after some time. I trying one more time now. With the knowledge I have I don't see any anomalies with the equations and boundary conditions. Nov 13 '12 at 0:57
• I can confirm that Mathematica will yield a solution when c1, ..., c6 are exactly 1 (and with the code for z''[t] consistent with the equation at the top of the question), but the result is extremely large and not particularly useful. If you replace c1, ..., c6 with 1., you will quickly get a result which shows the structure of the solution and it ain't pretty (46th order polynomials in t). Nov 13 '12 at 1:31
• You should also be careful with FullSimplify. From the documentation: "For fairly small expressions, FullSimplify will often succeed in making some remarkable simplifications. But for larger expressions, it can become unmanageably slow. The reason for this is that to do its job, FullSimplify effectively has to try combining every part of an expression with every other, and for large expressions the number of cases that it has to consider can be astronomically large." Nov 13 '12 at 1:35
• Ooops 46th order polynomial :). So looks like there is no simple solution to this problem. Now I am not sure even if I solve this system numerically whether I get a better solution or not. Nov 13 '12 at 2:05