Find the general solution of (2x-x^2) y'' + (x^2-2) y' +…
Find the general solution of $(2x-x^2)\,y'' + (x^2-2)\,y' + 2(1-x)\,y = 0$, given that $y_1 = x^2$ is a particular solution.
Explanation of Method
Given $y_1=x^2$, the same integrating-factor technique produces $v'\propto (2-x)e^x/x^3$.
Step 1: Verify $y_1$
With $y_1=x^2$: $y_1'=2x$, $y_1''=2$. Substituting: $(2x-x^2)(2) + (x^2-2)(2x) + 2(1-x)x^2 = 4x-2x^2+2x^3-4x+2x^2-2x^3 = 0.$ $\checkmark$
Step 2: Substitution $y=x^2v$
\[ y' = 2xv+x^2v', \qquad y'' = 2v+4xv'+x^2v''. \]
Step 3: Reduce the order
Substituting into the equation, all terms in $v$ alone cancel (they reproduce Step 1's identity), leaving: \[x^3(2-x)\,v'' + x^2(x^2-4x+6)\,v' = 0 \implies x(2-x)\,v'' + (x^2-4x+6)\,v' = 0.\]
Step 4: Solve for $w=v'$
\[ x(2-x)w' + (x^2-4x+6)w = 0 \implies \frac{dw}{w} = -\frac{x^2-4x+6}{x(2-x)}\,dx. \]
Polynomial division and partial fractions give: \[\frac{x^2-4x+6}{x(2-x)} = -1+\frac3x+\frac1{2-x}.\] So: \[\ln|w| = x - 3\ln|x| + \ln|2-x| + \mathrm{const} \implies w = \frac{A(2-x)e^x}{x^3}.\]
Step 5: Integrate for $v$
Write $v' = Ae^x\!\left(\dfrac2{x^3}-\dfrac1{x^2}\right)$. Since $\displaystyle\frac{d}{dx}\!\left(-\frac{e^x}{x^2}\right) = -\frac{e^x}{x^2}+\frac{2e^x}{x^3} = e^x\!\left(\frac2{x^3}-\frac1{x^2}\right)$:
\[ v = -\frac{Ae^x}{x^2} + B. \]
Step 6: General solution
Then $y = x^2\!\left(-\dfrac{Ae^x}{x^2}+B\right) = -Ae^x+Bx^2$. Renaming $B=C_1$, $-A=C_2$:
Step 7: Verify $y_2=e^x$
\[ (2x-x^2)e^x+(x^2-2)e^x+2(1-x)e^x = e^x\bigl[2x-x^2+x^2-2+2-2x\bigr] = 0.\ \checkmark \]
Step 8: Linear independence
\[ W(y_1,y_2) = \begin{vmatrix} x^2 & e^x \\ 2x & e^x \end{vmatrix} = xe^x(x-2) \neq 0 \quad (x\neq 0,2). \]
Result
Final answer:
\[\boxed{\,y = C_1\,x^2 + C_2\,e^x\,}\]