solving symbolic system diff equation using dsolve error (five diff equations)

I try to solve system equations which consist of five first order differential equations as follow using dsolve,
x'(t)=m*u - 2*l*x(t),y'(t)=2*c*l*x(t)-B*y(t),z'(t)=x(t)*(2*l-c*l)-A*z(t), m'(t)=A*z(t)-m(t)*(l + u) + B*y(t) + n(t)*u, n'(t)= l*m(t) - n(t)*u.
with initial condition x(t)=1, y(t)=z(t)=m(t)=n(t)=0, other variables are constants.
however i got the error shown ??? Error using ==> mupadmex Error in MuPAD command: cannot compute the explicit representation of the eigenvalues; use 'numeric::eigenvectors' [linalg::eigenvectors]
Error in ==> sym.sym>sym.mupadmexnout at 2018
out = mupadmex(fcn,args{:});
Error in ==> dsolve>mupadDsolve at 190
[var_list,R] = mupadmexnout('symobj::dsolve',sys,x,ignoreConstraints);
Error in ==> dsolve at 97
[R,vars] = mupadDsolve(ignoreConstraints,varargin{1:narg});"
Please help / recommend.

 Accepted Answer

Your system is invalid. Your initial conditions cannot be specified in terms of the variable t: they must be specified in terms of a specific point such as x(0). (More generally, initial conditions have to have at least one constant amongst all of the arguments to the function.)
I rewrote the system as
[diff(x(t),t)=m(t)*u-2*l*x(t), diff(y(t),t)=2*c*l*x(t)-B*y(t), diff(z(t),t)=x(t)*(2*l-c*l)-A*z(t), diff(m(t),t)=A*z(t)-m(t)*(l+u)+B*y(t)+n(t)*u, diff(n(t),t)=l*m(t)-n(t)*u];
and submitted that to Maple without any initial conditions. Maple was able to create the general answer fairly readily, but the general answer is pretty icky.
I am processing now with the initial conditions x(0)=1, y(0)=0, z(0)=0, m(0)=0, n(0)=0; it is taking time to work out the proper form.

6 Comments

Odd, my Maple ran out of Java heap space (at 6 Gb) in trying to do this. I was running it in command line mode, so at the moment I do not know why Java would have been involved.
Are there any constraints that can be put on the constants? e.g., real valued? Or do you have specific values for the constants?
This time, Maple was able to solve the system with the complete initial conditions listed above and without running out of Java heap.
However, the result Maple came up with was exactly the same as for solving the system without any initial conditions, and the Maple result was left in terms of 5 undefined constants of integration instead of being able to resolve the constants to specific values. This is probably because the resolution would involve trying to find the roots of some expressions where the expressions already involve two components that have to do with the roots of a quintic in A, B, c, l, and u. There not being any general solution for quintics, Maple is not able to deduce the solution.
Upon further examination, it turned out that the constants of integration appear linearly if one considers the roots of the quintic to be known quantities. This lead to a method of finding the solution in Maple:
1. use dsolve() to solve the system I listed above. This gives you m(t) and so on defined in terms of the constants of integration and the roots of a quintic.
2. evaluate each of the derived functions with t=0 to get m(0), n(0) etc in symbolic form
3. construct the relation of m(0) = 0, n(0) = 0, etc, x(0)=1
4. solve() that system of equations requesting the solution for the five constants of integration
5. substitute the five constants of integration back in to the definitions of m(t), n(t) etc to get the fully-defined functions
6. simplify as desired.
In practice in Maple you would probably need to feval() to expand the roots of the quintic before Maple was able to solve() the system.
The resulting system will be somewhat messy. The earlier you can substitute in specific values for A, B, c, l, and u, the faster the calculation will go and the cleaner the result will be -- but it is possible to create the generalized symbolic solution, if you don't mind that that general solution holds indeterminate the roots of a quintic.
Note: after sufficient simplification, Maple decided that m(t) = 0, n(t) = 0, y(t) = 0, z(t) = 0, and that x(t) is a long complicated expression.
Actually i mistype my initial condition it should be at t=0 as you do x(0)=1,y(0)=z(0)=m(0)=n(0)=0. However i do not have Maple installed. Why can't Matlab solve this? Is there anyway I can solve this with Matlab?
To Walter Roberson...Many thanks for your help and recommend
Unfortunately I do not have the symbolic toolbox, so I cannot test to see what happens with it.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!