# How to solve this first-order nonlinear differential equation?

1) I'm wondering how one might solve this differential equation: (here $c$ is a real constant)

$$c = y - \frac{x}{2} \left( y' - \frac{1}{y'}\right).$$

WolframAlpha says it is $y = \frac{1}{2}\left( 2c \pm e^{-k}x^2 \mp e^{k}\right)$, and I expected to find an $x^2$ in there based off of where the equation comes from, but I'm not super experienced with nonlinear DE's. (For those that are curious: lets say that a ray comes from above $x_0$ parallel to the $y$-axis, hits the graph of $y = f(x)$, and the angle between the ray and the tangent line at $x_0$ was equal to the angle between the reflected line and the tangent line---as if the ray were a pool ball and the tangent line were the side of the table. Then the reflected line has a $y$-intercept of $c$.)

2) I'm curious if anyone might have some advice for solving differential equations of this form?

$$g(x) = y - \frac{x}{2} \left( y' - \frac{1}{y'}\right).$$

Thank you!

• This is quite a difficult question to do without a computer. I looked, and couldn’t really find much theory on questions of this form. I guess that’s kind of what you start to expect when dealing with non linear DE’s as opposed to all the theory there is on linear DEs. – Colin Hicks Jul 6 '18 at 23:38

Multiply through by $y'$ and rearrange to obtain a quadratic in $y'$

$$y'^2 - 2\frac{y-c}{x}y' - 1 = 0$$

Then, complete the square

$$\left(y' - \frac{y-c}{x} \right)^2 = 1 + \left(\frac{y-c}{x}\right)^2$$

The substitution $u = \frac{y-c}{x}$ is useful here. Then

$$y = c + xu \implies y' =u + xu'$$

$$\implies (xu')^2 = 1 + u^2$$

You can solve for $u'$ here and separate the equation

$$\frac{u'}{\sqrt{1+u^2}} = \pm\frac{1}{x}$$

The solution to this is

$$u(x) = \sinh\big(\ln(\pm ax)\big) = \pm\frac{1}{2}\left(ax - \frac{1}{ax}\right)$$

Hence

$$y(x) = c \pm \frac{1}{2}\left(ax^2 -\frac{1}{a}\right)$$

Hint.

Try to solve for $y'$ giving

$$y' = \frac{y-c\pm\sqrt{(y-c)^2+x^2}}{x}$$

with solution

$$y = \frac 12\left(2c\pm C_1\mp\frac{x^2}{C_1}\right)$$