I am not able to find a proper solution of the following differential equation: $$y''(x) + \frac{b}{y(x)} = a$$ where a, b are constants

I need to have $y(x)$ as a function of $x$. Any help regarding this is greatly appreciated. Thank you very much.

Sudhanya Banerjee

Multiply by $y'$

$$y'y''+\frac{by'}{y}=ay'$$

Integrate (you need to be careful about $\pm$ for the squareroot and $||$ for log)

$$\frac{(y')^2}{2}+b\log(y)=ay+c_1$$

$$y'=\sqrt{ay-b\log(y)+c_1}$$

This is a separable equation

$$\int \frac{dy}{\sqrt{ay-b\log(y)+c_1}}=x+c_2$$

Good luck integrating that