# DSolve taking a very long time with my ODE and not giving a useful answer

Evaluating with DSolve has taken ~50 minutes to complete when given this ODE:

DSolve[y''[t] == Sqrt[1 + y[t]^2], y[t], t]


{}

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 am not sure if it is a problem with my input.

The computation takes even longer with boundary values.

DSolve[{y''[t] == Sqrt[1+y[t]^2, y[0] == 0}, y[t], t]


The output fro this is the same as shown above.

Is there a problem with the way I am expressing the problem?

In version 11.2 I obtain

DSolve[y''[t] == Sqrt[1 + y[t]^2], y[t], t]


$$\text{Solve}\left[\left(\int_1^{y(t)} \frac{1}{\sqrt{K[1] \sqrt{K[1]^2+1}+\sinh ^{-1}(K[1])+c_1}} \, dK[1]\right){}^2=\left(c_2+t\right){}^2,y(t)\right]$$

in moderate time. Maple performs a similar result.

• I have received the same without boundary values in 11.2. Out of curiosity, have you tried the problem with the initial condition y[0] == 0? – Popoman218 Jan 17 '18 at 20:24
• @Popoman218 : 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. – user64494 Jan 17 '18 at 21:05
DSolve[y''[t] == Sqrt[1 + y'[t]^2], y[t], t]
(*{y[t] -> C[2] + Cosh[t] Cosh[C[1]] + Sinh[t] Sinh[C[1]]} *)


evaluates the solution quite fast!

Using the correct ode y''[t] == Sqrt[1 + y[t]^2] the substitution y'[t]->z[ y[t]] separation of variables gives the equation

z[y] z'[y] == Sqrt[1 + y^2]


which can be solved

DSolve[z[y] z'[y] == Sqrt[1 + y^2], z, y]
(* {
{z -> Function[{y}, -Sqrt[y Sqrt[1 + y^2] + ArcSinh[y] + 2 C[1]]]},
{z ->Function[{y}, Sqrt[y Sqrt[1 + y^2] + ArcSinh[y] + 2 C[1]]]}}
*)


The antiderivative function of z is the solution y[t]!

• Sorry, what is the MMA code? – Popoman218 Jan 17 '18 at 20:13
• Also, the Sqrt[1 + y'[t]^2] should just be Sqrt[1 + y[t]^2]. The long computation time still exists. – Popoman218 Jan 17 '18 at 20:16
• That's some pretty quick downvoting. I usually let folks have a chance to correct a mistake first. (And in the rare case I downvote, they can reply to my comment when they've addressed the problem; or explain why I'm all wrong.) – Michael E2 Jan 17 '18 at 20:56
• Looks like with one more step (solving for y in terms of t), you'll get the result @user64494 got, but without both sides being squared. – Michael E2 Jan 17 '18 at 20:58
• @ Michael E2: Thanks for your comment concerning the pretty quick feedback... – Ulrich Neumann Jan 17 '18 at 21:07

From Why Can't DSolve Find a Solution for this ODE?, which might be considered a duplicate:

ClearAll[withTimedIntegrate];
SetAttributes[withTimedIntegrate, HoldFirst];
withTimedIntegrate[code_, tc_] :=
Module[{$in}, InternalInheritedBlock[{Integrate}, Unprotect[Integrate]; i : Integrate[___] /; ! TrueQ[$in] :=
Block[{\$in = True}, TimeConstrained[i, tc, Inactivate[i, Integrate]]];
Protect[Integrate];
code]];

withTimedIntegrate[DSolve[y''[t] == Sqrt[1 + y[t]^2], y[t], t], 1]

(*
Solve[
Inactive[Integrate][1/Sqrt[ArcSinh[K[1]] + C[1] + K[1] Sqrt[1 + K[1]^2]],
{K[1], 1, y[t]}]^2 == (t + C[2])^2,
y[t]]
*)
`