2
$\begingroup$

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[1]=y[-1]=y[1]=z'[-1]=z'[1]=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[1] == 0, y[-1] == 0, 
          y[1] == 0, z'[-1] == 0, z'[1] == 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.
Thank you for your time

$\endgroup$
4
  • 1
    $\begingroup$ You have a typo in there. Try DSolve instead of Dsolve. $\endgroup$ Commented Nov 12, 2012 at 23:15
  • $\begingroup$ And FullSimplify instead of FullySimplify. $\endgroup$
    – Cassini
    Commented Nov 12, 2012 at 23:21
  • $\begingroup$ 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. $\endgroup$
    – Cassini
    Commented Nov 13, 2012 at 0:50
  • $\begingroup$ I think {x, y, z} should be {x[t], y[t], z[t]} and I'd be inclined to apply First before FullSimplify. $\endgroup$
    – m_goldberg
    Commented Nov 13, 2012 at 1:55

1 Answer 1

1
$\begingroup$

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[1] == 0, y[-1] == 0, 
   y[1] == 0, z'[-1] == 0, z'[1] == 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.

$\endgroup$
5
  • $\begingroup$ 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. $\endgroup$
    – Cassini
    Commented Nov 13, 2012 at 0:47
  • $\begingroup$ 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. $\endgroup$
    – Nawin
    Commented Nov 13, 2012 at 0:57
  • $\begingroup$ 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). $\endgroup$
    – Cassini
    Commented Nov 13, 2012 at 1:31
  • $\begingroup$ 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." $\endgroup$
    – Cassini
    Commented Nov 13, 2012 at 1:35
  • $\begingroup$ 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. $\endgroup$
    – Nawin
    Commented Nov 13, 2012 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.