1. Linear Differential Equation:

Solve this Differential Equation:

$x\frac{d^2y}{dx^2}+(2-x)\frac{dy}{dx}-y=2cosx$

2. First solve the homogeneous equation:

$xy''+(2-x)y'-y=0$

by power series. Try and obtain the expression $\sum_{n=0}^{\infty} a_n\left(n(n-1)+2n\right) x^{n-1}-\sum_{n=1}^{\infty} n a_{n-1} x^{n-1}$ which reduces to $a_0\left(\frac{e^x}{x}-\frac{1}{x}\right)$. Suppose $y_1$ is a solution of the homogeneous equation. Then can you use reduction of order by letting $y=v y_1$ to obtain the solution of the non-homogeneous equation?

If I use $y=\frac{1}{x}v$ and go through the steps, I get:

$v''-v'=2\cos(x)$

Try and get to that part, then let $w=v'$, integrate twice to obtain v. Do the same with $\frac{e^x}{x}$.