# Any workarounds to help DSolve solve this first order standard d’Alembert differential equation? (no initial conditions)

Update June 25, 2023. The problem is still present in V 13.3

I am baffled why DSolve in V 13.1 unable to solve this standard first order ode. DSolve has improved a lot in recent version, so I was expecting it to be to solve this first order ode.

I am looking for suggestion what happend here, or a workaround.

I will show my hand solution. Mathematica verifies the solutions. Then show an attempt for workaround. DSolve seems to hang. Well, I waited 10 minutes and gave up. May be if I wait much more it will solve it. But from my experience with DSolve, if it takes more than few minutes, most likly it is stuck somewhere and no point waiting any more.

I do not understand why it needs that much time. Maple also solves this ode instantly. So I think something went wrong here with DSolve code path somewhere.

The ode is

ClearAll[y, x]
ode = y[x] == x + y'[x]^2*(1 - 2/3*y'[x])
DSolve[ode, y[x], x]


Waiting and waiting....but why?

Here is my hand solution, you can see there is nothing that should cause long time delay.

## hand Solution

\begin{align*} y & =x+\left( y^{\prime}\right) ^{2}\left( 1-\frac{2}{3}y^{\prime}\right)\\ & =\phi\left( x,y^{\prime}\right) \end{align*} Let $$y^{\prime}=p$$ \begin{align} y & =x+\left( p^{2}-\frac{2}{3}p^{3}\right) \tag{1}\\ & =\phi\left( x,p\right) \nonumber \end{align} Differentiating w.r.t. $$x$$ gives \begin{align} y^{\prime} & =\frac{\partial\phi}{\partial x}+\frac{\partial\phi}{\partial p}\frac{dp}{dx}\nonumber\\ p & =1+\left( 2p-2p^{2}\right) \frac{dp}{dx}\nonumber\\ \frac{dp}{dx} & =\frac{p-1}{2\left( p-p^{2}\right) }\tag{2} \end{align} The singular solution is when $$\frac{dp}{dx}=0$$ which results in $$p=1$$. Substituting this in (1) gives \begin{align*} y & =x-\left( 1-\frac{2}{3}\right) \\ & =x+\frac{1}{3} \end{align*} The general solution is when $$\frac{dp}{dx}\neq0$$. Then (2) is now separable. Solving for $$p$$ gives \begin{align*} p & =-\sqrt{c_{1}-x}\\ p & =\sqrt{c_{1}-x} \end{align*} Substituting each one of the above solutions of $$p$$ in (1) gives \begin{align*} y_{1} & =x+\left( p^{2}-\frac{2}{3}p^{3}\right) \\ & =x+\left( \left( -\sqrt{c_{1}-x}\right) ^{2}-\frac{2}{3}\left( -\sqrt{c_{1}-x}\right) ^{3}\right) \\ & =x+\left( c_{1}-x+\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}}\right) \\ & =c_{1}+\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}}% \end{align*} And \begin{align*} y_{2} & =x+\left( p^{2}-\frac{2}{3}p^{3}\right) \\ & =x+\left( \left( \sqrt{c_{1}-x}\right) ^{2}-\frac{2}{3}\left( \sqrt{c_{1}-x}\right) ^{3}\right) \\ & =x+\left( c_{1}-x-\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}}\right) \\ & =c_{1}-\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}}% \end{align*} Therefore the solutions are \begin{align*} y & =x+\frac{1}{3}\\ y & =c_{1}+\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}}\\ y & =c_{1}-\frac{2}{3}\left( c_{1}-x\right) ^{\frac{3}{2}} \end{align*}

## Verification of hand solutions by Mathematica

ClearAll[y, x]
ode = y[x] == x + y'[x]^2*(1 - 2/3*y'[x])
ode /. y -> Function[{x}, x + 1/3]


ode /. y -> Function[{x}, C[1] + 2/3 (C[1] - x)^(3/2)] // Simplify


ode /. y -> Function[{x}, C[1] - 2/3 (C[1] - x)^(3/2)] // Simplify


## Attempts for workaround

I tried to see if solving for $$y'$$ first and solving each separate ode will help (even though this is the wrong approach to solving d'Alembert) and solve each generated ode (which is now of degree one), but this did not work. It also hanged

ClearAll[y, x]
ode = y[x] == x + y'[x]^2*(1 - 2/3*y'[x])
sol = y'[x] /. Solve[ode, y'[x]];
DSolve[y'[x] == First@sol, y[x], x]


Based on the above, my guess is that, this is what DSolve did internally? And that is why it hanged? Since the integrals generated are way too complicated to be solved as a quadrature ode.

Is it possible this is what DSolve did?

And finally, this is Maple's result

ode:=y(x)=x+ diff(y(x),x)^2*(1-2/3*diff(y(x),x));
s := time[real]():
dsolve(ode);
time[real]()-s;


Any hints why DSolve can't solve this, or a workaround are welcome.

V 13.1 on windows 10.

D'Alembert and Clairaut as trivial examples of first order ODE are not even mentioned by Arnold. With $$y'=p$$ make it explicit
  Solve[y == p^2 *(1 - 2/3) p, p]

$$\text{DSolve}\left[y'(x)=\pm (-1)^{2/3} \sqrt[3]{3} \sqrt[3]{y(x)},y(x),x\right]$$ $$\left\{y(x)\to \pm \frac{2}{3} \sqrt{\frac{2}{3}} \left((-1)^{2/3} \sqrt[3]{3} x+c_1\right){}^{3/2}\right\}$$