I tried to solve for an non-Hookean spring's motion, but the output from Mathematica is weird. It seems that there is inverse functions involved.
DSolve[{x''[t] + x[t]^3 == 0}, x[t], t]
Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>
Out[1] = {{x[t] -> -I 2^(1/4) Sqrt[-(1/Sqrt[C[1]])] Sqrt[C[1]]
JacobiSN[Sqrt[
Sqrt[2] t^2 Sqrt[C[1]] + 2 Sqrt[2] t Sqrt[C[1]] C[2] +
Sqrt[2] Sqrt[C[1]] C[2]^2]/Sqrt[2], -1]}, {x[t] -> I 2^(1/4) Sqrt[-(1/Sqrt[C[1]])] Sqrt[C[1]] JacobiSN[Sqrt[Sqrt[2] t^2 Sqrt[C[1]] + 2 Sqrt[2] t Sqrt[C[1]] C[2] +
Sqrt[2] Sqrt[C[1]] C[2]^2]/Sqrt[2], -1]}}
If you try Reduce
, Mathematica will then give you no output at all, which makes sense because the output is not an equality or inequality.
Also, I added initial values into DSolve
, but I'm unable to obtain the answer.
In[1]:= DSolve[{x''[t] + x[t]^3 == 0, x[0] == d, x'[0] == 0}, x[t], t]
Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information. >>
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions. >>
DSolve::bvfail: For some branches of the general solution, unable to solve the conditions. >>
Out[1]= {}
Answer
Well, that was easy:
Block[{Simplify = FullSimplify},
DSolve[{x''[t] + x[t]^3 == 0, x'[0] == 0, x[0] == x0}, x[t], t]
] // FullSimplify
(*
{{x[t] -> x0 JacobiCD[(t x0)/Sqrt[2], -1]}}
*)
DSolve
uses Simplify
to check the solution, and Simplify
is not up to the task. So I used Block
to replace it with FullSimplify
, which will reduce the DE to True
after DSolve
substitutes the solution. Perhaps the Method
option could be used, but there are no clues to how to use it.
Comments
Post a Comment