Solution of the differential equation $\,f(x)f'(x)+f'(x) = g(x)$? [closed]

How do we solve a differential equation of the form $$f(x)f'(x)+f'(x) = g(x)?$$

The coefficient $f(x)$ of $f'(x)$ post a difficulty that integrating factors doesn't work.


Solution 1:

$$ g(x)=f(x)f'(x)+f'(x)=\left(\frac{f^2(x)}{2}+f(x)\right)' $$ and hence, if $G(x)=\int g(x)\,dx$, then $$ \frac{f^2(x)}{2}+f(x)=G(x)+c $$ and thus $$ \big(f(x)+1\big)^2=f^2(x)+2f(x)+1=2G(x)+2c+1 $$ Thus $$ f(x)=\pm\sqrt{2G(x)+\tilde c}-1 $$

Solution 2:

Hint: $ff'+f'=(f+1)f'.$ This equation is separable.