# Problem with Mathematica

5 vues (au cours des 30 derniers jours)
Lazaros Moysis le 13 Juin 2012
OK guys, here's the thing, mathematica does not return a solution for this system of dif.equations
DSolve[{p11'[t] == 2*p12[t] - (1/r)*p12[t]^2,
p12'[t] ==
p22[t] - (w^2)*p11[t] - 2*z*w*p12[t] - (1/r)*p12[t]*p22[t],
p22'[t] == -2*(w^2)*p12[t] -
4*z*w*p22[t] - (1/r)*p22[t]^2 + (w^4)*q, p11[0] == 0, p12[0] == 0,
p22[0] == 0}, {p11[t], p12[t], p22[t]}, t]
Can anyone please try it on your system and tell me if u have the same problem?
i Also tried with the NDSolve function
NDSolve[{p11'[t] == 2*p12[t] - (1/r)*p12[t]^2,
p12'[t] ==
p22[t] - (w^2)*p11[t] - 2*z*w*p12[t] - (1/r)*p12[t]*p22[t],
p22'[t] == -2*(w^2)*p12[t] -
4*z*w*p22[t] - (1/r)*p22[t]^2 + (w^4)*q, p11[0] == 0, p12[0] == 0,
p22[0] == 0}, {p11[t], p12[t], p22[t]}, {t, 0, 10}]
but i get the error message:NDSolve::ndnum: Encountered non-numerical value for a derivative at t == 0.`
Laz.
(i use mathematica 8.0)
I know this is mostly about matlab questions, but i hope that should be no problem
##### 2 commentairesAfficher AucuneMasquer Aucune
Walter Roberson le 13 Juin 2012
This resource is _entirely_ about MATLAB . Maple is sometimes discussed here because Maple was previously used for the MATLAB Symbolic toolbox.
I will try your system out in Maple later tonight when I get home, but it will be several hours.
Andreas Goser le 14 Juin 2012
As an anecdote: I remember when I was doing technical and installation support myself, customers called us for other products sometimes and when we suggested to call the vendor, the customers (who also used MATLAB for some applications) said: "Yes, I know, but your service is much better" :-)

Connectez-vous pour commenter.

### Réponses (1)

Walter Roberson le 14 Juin 2012
In Maple, the expression would be
dsolve([diff(p11(t), t) = 2*p12(t)-p12(t)^2/r, diff(p12(t), t) = p22(t)-w^2*p11(t)-2*z*w*p12(t)-p12(t)*p22(t)/r, diff(p22(t), t) = -2*w^2*p12(t)-4*z*w*p22(t)-p22(t)^2/r+w^4*q, p12(0) = 0, p11(0)=0, p22(0)=0])
Maple says this has no solution.
If you reduce the initial conditions to p12(0)=0 and leave p11(0) and p22(0) undetermined, then the system has two solutions,
p11(t) = (-2*z*r+(4*r^2*z^2+w^2*q*r)^(1/2))/w
p12(t) = 0
p22(t) = w*(-2*z*r+(4*r^2*z^2+w^2*q*r)^(1/2))
and
p11(t) = -(2*z*r+(4*r^2*z^2+w^2*q*r)^(1/2))/w
p12(t) = 0
p22(t) = -w*(2*z*r+(4*r^2*z^2+w^2*q*r)^(1/2))}
(The two are similar but have some sign changes.)
If one examines these solutions then one would note that these are independent of t, so if one imposes that p11(0)=0 then that implies that p11(t) and p22(t) must all be 0 (not impossible given the formula but it requires r=0 or requires some peculiar w and q relationships)
There is also a solution for the equations without the initial value conditions if p12(t) = 2*r.
There is a third solution for the equations without the initial value conditions that is fairly complex and appears to be defined recursively. I do not understand what Maple is trying to say in its output. In any case it is clear from what I do understand that the combination {p11(0)=0, p12(0)=0, p22(0)=0} as initial conditions has no solution for the set of equations.
##### 2 commentairesAfficher AucuneMasquer Aucune
Lazaros Moysis le 14 Juin 2012
well i tried these initial conditions cause i got the problem from a book that supposedly solved this for these starting values.
I tried though to keep just p12[t]==0 but my mathematica still does not come up with a solution.. What edition are you using?
Thanks for the help anyway ;)
Walter Roberson le 14 Juin 2012
I used Maple, not Mathematica. (I think back when I was using Mathematica, it was Mathematica 2 !)

Connectez-vous pour commenter.

### Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by