# How to Solve this Particular Euler Differential Equation?

I was asked to solve an Euler ODE:

Here's my work so far:

I'm asked to solve the following Euler DE using the method of variation of parameters: $$x^2y''-y=(x^2+1)\sin{x}$$ I already determined the homogeneous solution which resulted in: $$y_h=c_1 x^{\frac{\sqrt{5}+1}{2}}+c_2 x^{\frac{-\sqrt{5}+1}{2}}$$ I'm having trouble finding the particular solution though... $$y_p=u_1 y_1+u_2 y_2$$ $$u_1=-\int \frac{R(x)\cdot y_2}{W}~dx \qquad \qquad W=\text{wronskian}=-\sqrt{5}$$ $$u_1=\frac{1}{\sqrt{5}}\int (x^2+1)\sin{x}\cdot x^{\frac{-\sqrt{5}+1}{2}}~dx$$ But this integral is too complicated for me to solve. I computed it and found that it gives a gamma function and a really long answer. Is there anything I missed that could simplify this problem?

$$x^2y''-y=(x^2+1)\sin(x)$$ Since $\quad \left(\sin(x)\right)''=-\sin(x)\quad$ obviously $\quad y=-\sin(x)\quad$ is a particular solution. Hence : $$y(x)=c_1 x^{\frac{1+\sqrt{5}}{2}}+c_2 x^{\frac{1-\sqrt{5}}{2}}-\sin(x)$$
Here is the mistake you made: You forgot to divide the differential equation by $x^2$ to obtain: $$\frac{d^2 y}{dx^2}-\frac{y}{x^2}=\frac{(x^2+1)\cdot \sin{x}}{x^2}$$ Therefore, your $R(x)\neq (x^2+1)\sin{x}$, but in fact: $$R(x)=\frac{(x^2+1)\cdot \sin{x}}{x^2}$$
Hence, you should have: $$u_1=-\int \frac{R(x)\cdot y_2}{W}~dx=\int \frac{\left(\frac{(x^2+1)\cdot \sin{x}}{x^2}\right)\cdot x^{\frac{-\sqrt{5}+1}{2}}}{\sqrt{5}}~dx$$ $$u_1=\int \frac{(x^2+1)\cdot \sin{x}\cdot x^{\frac{-\sqrt{5}-3}{2}}}{\sqrt{5}}~dx=\frac{1}{\sqrt{5}} \int (x^2+1)\cdot \sin{x}\cdot x^{\frac{-\sqrt{5}-3}{2}}~dx$$ Evaluating this integral should not give gamma functions (Should be in terms of elementary functions). As you correctly mentioned, the solution to the indefinite integral you incorrectly derived contains the incomplete gamma function.
Putting everything together (Don't forget to evaluate $u_2$) and cancelling everything should eventually gives a nice particular solution: $$y_p=-\sin(x)$$