# Different solutions with Mathematica and WolframAlpha

I tried to resolve this in a notebook of Mathematica:

 DSolve[x[t]^2 (1 + x'[t]^2 - x[t] x''[t])/(2 (x[t]^2 (1 + x'[t]^2))^(3/2)) == 0, x[t], t]


And the results are:

    {{x[t] -> -((E^-C Tanh[E^C (t + C)])/
Sqrt[-1 + Tanh[E^C (t + C)]^2])},
{x[t] -> (E^-C Tanh[E^C (t + C)])/
Sqrt[-1 + Tanh[E^C (t + C)]^2]}}


But if I run it on WolframAlpha the result is:

{{x[t]->1/2 e^(-e^(C) t - 2 C - e^(C) C) (e^(2 C) + e^(2 e^(C) (t + C)))},
{x[t]->1/2 (e^(-e^(C) t - 2 C - e^(C) C) + e^(e^(C) t + e^(C) C))}}


And the 2nd ones are the correct results, I needed a real function meanwhile the 1st ones are complex functions. Why this happens? What assumptions make WolframAlpha in its input?

• Don't understand the question: Mma produces a true solution. For example, x[t]^2 (1 + x'[t]^2 - x[t] x''[t])/(2 (x[t]^2 (1 + x'[t]^2))^(3/2)) == 0 /. {x[t] -> -((E^-C Tanh[E^C (t + C)])/ Sqrt[-1 + Tanh[E^C (t + C)]^2]), x'[t] -> D[-((E^-C Tanh[E^C (t + C)])/ Sqrt[-1 + Tanh[E^C (t + C)]^2]), t], x''[t] -> D[-((E^-C Tanh[E^C (t + C)])/ Sqrt[-1 + Tanh[E^C (t + C)]^2]), {t, 2}]} // FullSimplify produces True. – user64494 Jun 8 at 18:51
• Yeah but I need real functions not complex functions and I've tried to tell Mathematica that t is Real etc but same result (I just don't know how to get the result of Wolfram Alpha) – Mike Jun 8 at 19:09
• They look to be the same result with a different choice of C. See ExpToTrig and TrigToExp for converting the exponentials to hyperbolic trig functions. If you can supply a real initial condition, I expect they'd match. Interestingly, MMA version 10.1 gets the solution you ascribed to Wolfram|Alpha. – eyorble Jun 8 at 20:53

Re: "Yeah but I need real functions not complex functions"--- Here's how to get the result of W|A:

sol = WolframAlpha[
"DSolve[x[t]^2 (1+x'[t]^2-x[t] x''[t])/(2 (x[t]^2 (1+x'[t]^2))^(3/2))==0,x[t],t]",
{{"Result", 1}, "Content"}];


Then either of these converts the formatted output to StandardForm:

sol // MakeBoxes[#, StandardForm] & // ToExpression
sol // First // MakeExpression[#, StandardForm] & // ReleaseHold
(*
{{x[t] -> 1/2 E^(-E^C t - 2 C - E^C C) (E^(2 C) + E^(2 E^C (t + C)))},
{x[t] -> 1/2 (E^(-E^C t - 2 C - E^C C) + E^(E^C t + E^C C))}}
*)


Update: Mathematical Notes

(1.) By the way, the ODE is invariant under scalings $$S(t,x)=(c_1t,c_1x)$$ and translations $$T(t,x)=(t+c_2,x)$$. If you have a particular solution that is not itself invariant under them, such as $$x_p = \cosh t$$, you can use the transformations $$S$$ and $$T$$ to construct a general solution: $$x(t) = {1 \over c_1} \cosh(c_1 t + c_2)$$ (There is a form of the solution $$x(t) = {i \over c_1} \sinh(c_1 t + c_2)$$ that is complex-valued for real parameters, too, that passes through the singular locus $$x = 0$$ but cannot satisfy an IC with $$\dot x = 0$$; otherwise it overlaps the $$\cosh$$ solution.)

(2.) There are extraneous factors in the equation, x[t]^2 in the numerator and the entire denominator, that may be omitted, or dealt with separately.