TransWikia.com

Problem solving coupled second order differential equations using DSolve

Mathematica Asked by Nawin on March 15, 2021

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

One Answer

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.

Answered by halirutan on March 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP