= Solution
For $y_1=e^x/x$, on an <interval> avoiding zero,
$$
y_1'=e^x\left(\frac1x-\frac1{x^2}\right),\qquad y_1''=e^x\left(\frac1x-\frac2{x^2}+\frac2{x^3}\right).
$$
Substitution into the <ordinary differential equation> gives
$$
xy_1''+2y_1'-xy_1=e^x\left(1-\frac2x+\frac2{x^2}+\frac2x-\frac2{x^2}-1\right)=0.
$$
To find an independent solution, put $v=xy$. The <product rule> gives $v''=xy''+2y'$, so the <ordinary differential equation> becomes $v''-v=0$. Its independent solutions are $e^x$ and $e^{-x}$. Hence
$$
\boxed{y_2(x)=\frac{e^{-x}}x,\qquad y(x)=\frac{Ae^x+Be^{-x}}x\quad(x\ne0).}
$$
The two displayed solutions are <linearly independent>, since their ratio $e^{2x}$ is nonconstant on any open <interval>. Constants can be chosen separately on the two sides of the singular point $x=0$.
Back to article page