0
$\begingroup$

The Problem Given a mass m=1 moves in potential V(x)=|x|^3; and x(0)=1,x'(0)=0;

So I set up

eq1 = Derivative[2][x][t] + 3 RealAbs[x[t]] x[t] == 0;
eq2 = x[0] == 1;
eq3 = Derivative[1][x][0] == 0;
condls = {eq1, eq2, eq3};
DSolve[condls, x[t], t]

It returns "DSolve::bvimp: General solution contains implicit solutions. In the boundary value problem, these solutions will be ignored, so some of the solutions will be lost."

I also tried to use alternative method like below

n = 3;
energy = 1/2 x'[t]^2 + RealAbs[x[t]]^n;
xSolution[t_]=x[t]/.Simplify@First[DSolve[energy==1^n&&x[0]==1&&x'[0]==0,x[t],t]]]

Also Would not return a solution.

I wonder what my mistake is.

$\endgroup$
2
  • 1
    $\begingroup$ You should try to find the general solution DSolve[eq1, x, t] and see if it's clear how to solve C[1] and C[2] for an initial condition. (That's what the message suggests to me.) $\endgroup$ – Michael E2 Nov 30 '20 at 4:12
  • $\begingroup$ yes I tried and It returned a piecewise function with Hypergeometric2F1. I used NDSolve to obtain a plot and It looks like a Cos function. I changed the Power of |X| to 2 and it has a real solution at x(t) =Cos[Sqrt[2] t]. I would imagine there is a solution exist as such form. $\endgroup$ – Hank Yang Nov 30 '20 at 4:49
1
$\begingroup$

DSolve does not solve the IVP, but it can solve the general equation. We can then get an implicit solution. The solution has an extraneous branch. I think I can probably get rid of it, but I'm out of time for the moment.

eq1 = Derivative[2][x][t] + 3 RealAbs[x[t]] x[t] == 0;
eq2 = x[0] == 1;
eq3 = Derivative[1][x][0] == 0;
condls = {eq1, eq2, eq3};
dsol = DSolve[eq1, x, t];
{xside, tside} = 
  Replace[dsol, 
   Verbatim[Solve][xs_ == ts_, _] :> {Simplify[xs /. x[t] -> x], ts}];
Reduce[Last@xside \[Element] Reals && C[1] > 0, x, Reals];
xmax = Simplify[MaxValue[{x, %}, x], %];
const = Solve[
   Simplify[{x0 == xmax, xside == tside /. {x -> x0, t -> t0}}, 
    x0 > 0 && C[1] > 0], {C[1], C[2]}];
(* solution for x[t0] == x0, x'[t0] == 0 *)
icsol = 
 Block[{Solve}, MapAt[Simplify, dsol /. First@const, {1, 1}]]

Solve::incnst: Inconsistent or redundant transcendental equation. After reduction, the bad equation is 1-InverseFunction[Hypergeometric2F1,4,4][1/3,1/2,4/3,Hypergeometric2F1[1/3,1/2,4/3,(2 x0^3)/Subscript[[ConstantC], 1]]] == 0.

Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.

Solve::nsmet: This system cannot be solved with the methods available to Solve.

Mathematica graphics

iceqn = Replace[
  Quiet@dsol,
  Verbatim[Solve][iceq_, ___] :> (
    iceq /. {
       x[t] -> x,
       t -> 
        Mod[t + C[2], 
          2 FullSimplify[Sqrt@Last@xside /. x -> xmax], -FullSimplify[
            Sqrt@Last@xside /. x -> xmax]] - C[2]
       } /. First@const)
  ]

Mathematica graphics

ContourPlot[
 iceqn /. {
    t0 -> 0,
    x0 -> 1
    } // Evaluate,
 {t, -3, 3}, {x, -2, 2}, FrameLabel -> {t, x}, 
 AspectRatio -> Automatic, PlotPoints -> {25, 13}
 ]
StreamPlot[{v[t], -3 RealAbs[x[t]] x[t]},
 {x[t], -1, 1}, {v[t], -1, 1},
 FrameLabel -> {x, v}]
$\endgroup$

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.