# Solving $yy'-2y+A=0$

I checked a bunch of other posts on here first to see if I could glean info from them but they came up short. Is it possible to solve the following differential equation in closed form? $$yy'-2y+A=0$$ where $A$ is a constant and $y$ is a function of $t$. It looks simple, but the constant terms throws the whole thing into another category of difficulty because it can no longer be separated.

The only method I can think of that might work is by finding and using the Green's function, but I would like to avoid this if it is possible to find a analytic form instead of a integral form of the solution.

EDIT:

Okay so from the answer, I tried to get it myself and this is what I got:

$$\frac{dy/dt}{2-A/y}=1\rightarrow \int\frac{1}{2-A/y}dy=t+B$$

Just focusing on the integral: Let $U = 2-A/y$, then $dU = (A/y^2)dy$ and $y=A/(2-U)$. This gives: $$A\int\frac{1}{U(2-U)}dU=\frac{A}{2}\int\left(\frac{1}{U}+\frac{1}{2-U}\right)dU = \frac{A}{2}\left(\ln|U|+\ln|2-U|\right)=\frac{A}{2}\ln|U(2-U)|$$ So all together, the equation becomes: $$\ln\left|2-\frac{A}{y}\right|+\ln\left|\frac{A}{y}\right|=\frac{2(t+B)}{A}$$ I don't have terms of $y$ and $\ln(y+C)$ as you said and I am unsure on how to connect to the Lambert W function (I have never heard of that before today so please excuse my ignorance!)

• Have you tried isolating y'? May 15, 2017 at 16:01

$$y'=2-\frac Ay$$ $$\frac{y'}{2-A/y}=1$$ $$\int\frac{y'}{2-A/y}\,dx=x+B$$
• Integrating the left-hand side gives terms in $y$ and $\log(y + C)$ for some constant $C$. So, writing $y$ in terms of $x$ requires something tantamount to the Lambert W function, which most people do not consider usable in "closed form" expressions. May 15, 2017 at 16:06