1
$\begingroup$

In DIFFERENTIAL EQUATION SOLVING WITH DSOLVE by D. Kapadia, there is a Chini differential equation :

sol = DSolve[x'[t] == 5 x[t]^4 + 3 x[t]^(-4/3), x[t], t]

The answer implies RootSum. The question is how to use and plot the solution. I have tried

Plot[x[t] /. sol /. {C[1] -> 2}, {t, 0, 10}]

which doesn't works and used Evaluate and/or Normal and/or ToRadical@Normal both on x[t] and on sol. But nothing works. Moreover, this case is not documented in the documentation "Plotting the Solution".

Need help; Thanks

$\endgroup$
  • 1
    $\begingroup$ Hold up… if you try N[x[10] /. sol /. {C[1] -> 2}], what do you get? $\endgroup$ – J. M. will be back soon Jun 26 '16 at 6:31
  • $\begingroup$ If I do that I have that the sol is neither a list of replacement rule... $\endgroup$ – cyrille.piatecki Jun 26 '16 at 6:42
  • 1
    $\begingroup$ …and now you know why it doesn't work within Plot[]. $\endgroup$ – J. M. will be back soon Jun 26 '16 at 7:09
  • $\begingroup$ Ok but that does not resolve my problem. I allready have found this but I do not know how to proceed. It's strange to find a solution in a manual of how to and not to be able to apply it. $\endgroup$ – cyrille.piatecki Jun 26 '16 at 7:29
  • $\begingroup$ I don't have Mathematica on hand at the moment. Can you paste in the result sol in InputForm? $\endgroup$ – J. M. will be back soon Jun 26 '16 at 8:24
2
$\begingroup$

An alternative approach is to solve for t[x] instead of x[t].

t[x] /. First@DSolve[t'[x] == 1/(5 x^4 + 3 x^(-4/3)), t[x], x] /. C[1] -> 0;
ParametricPlot[{Chop@%, x}, {x, 0, 3}, AxesLabel -> {t + C[1], x}, 
    AspectRatio -> GoldenRatio]

enter image description here

Because the ODE determines t[x] only up to an arbitrary constant, the curve above can be shifted by an arbitrary amount to the left or right.

$\endgroup$
  • $\begingroup$ I wonder why Chop@% work and not Chop@t $\endgroup$ – cyrille.piatecki Jun 29 '16 at 10:21
  • $\begingroup$ @cyrille.piatecki t actually is not defined by my two lines of code. To define it, use t = s[x] /. First@DSolve[s'[x] == 1/(5 x^4 + 3 x^(-4/3)), s[x], x] /. C[1] -> 0; ParametricPlot[{Chop@t, x}, {x, 0, 3}, AxesLabel -> {"t+C[1]", x}, AspectRatio -> GoldenRatio]. Note that I use s[x] as the dummy variable in the first equation here to avoid possible issues. $\endgroup$ – bbgodfrey Jun 29 '16 at 16:52
2
$\begingroup$

Maybe like this:

sol = DSolve[x'[t] == 5 x[t]^4 + 3 x[t]^(-4/3), x[t], t]
eq = sol[[1, 1, 2, 0, 1]][x] == (sol[[1, 1, 2, 1]] /. C[1] -> 2)
ContourPlot[sol[[1, 1, 2, 0, 1]][x] == (sol[[1, 1, 2, 1]] /. C[1] -> 2),
{t, -3, 3}, {x, -3, 3}, Axes -> True, Frame -> False, AxesLabel -> {t, x[t]}]

enter image description here

EDITED:

If You exectue this code:

 Internal`InheritedBlock[{Solve}, Unprotect[Solve];
 Solve[x___] := 
 Block[{$guard = True}, Print["Solve called : ", HoldForm[Solve[x]]];
 Solve[x]] /; ! TrueQ[$guard];
 DSolve[{x'[t] == 5 x[t]^4 + 3 x[t]^(-4/3)}, x[t], t]];

enter image description here

You can see DSolve cant find solution.Then solution of Solve convert to InverseFuntion. I'm only extract this solution using Part function.

$\endgroup$
  • $\begingroup$ Thank you Mariusz it works perfectly even if I do not understand the philosophy behind. The mainchange is from x to x[t], in Dsolve and it change all. $\endgroup$ – cyrille.piatecki Jun 26 '16 at 10:47
  • $\begingroup$ I,m only using Part function.That all. $\endgroup$ – Mariusz Iwaniuk Jun 26 '16 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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