# Differential equation $y' ^2+(y-1)y'-y=0$

I am puzzled over the following differential equation: $$y' ^2+(y-1)y'-y=0$$ I tried solving for $$y$$ and got $$y=\frac{y'(y'-1)}{1-y'}$$ But I am not sure where that takes me or if that was even the right approach. Grateful for any tips!

The given equation can be written as $$(y'+y)(y'-1)=0$$, so either $$y'=-y$$ or $$y'=1$$, so $$y=Ce^{-x}$$ and $$y=x+C$$ are solutions.

Another solution is a piecewise combination of the above. At any point where we switch between the two forms, we have $$-y = y' = 1$$, so $$Ce^{-x}=-1$$. This can only occur if $$C<0$$, at $$x=\log(-C)=c$$, giving the following additional solutions:

$$y(x) = \begin{cases} -e^{c-x} & x \le c \\ x-c-1 & x \ge c \end{cases}$$ and $$y(x) = \begin{cases} x-c-1 & x \le c \\ -e^{c-x} & x \ge c \end{cases}$$

• Thank you. Got it now!
– Iris
Commented Jul 3, 2019 at 0:18

$$y=\frac{y'(y'-1)}{-(y'-1)}=-y'$$ Thus $$y=c e^{-x}$$ for some $$c\in \mathbb R$$.

• This misses the $y' = 1$ solution Commented Jul 3, 2019 at 0:08