Q:

Observe that x and e^x are solutions to the homogeneous equation associated with:(1-x)y'' + xy' - y = 2(x - 1)^2 e^-xUse this fact to solve the nonhomogeneous equation.Please explain step by step and show your work, thank you. From left to right it's y double prime .... + xy prime....

Accepted Solution

A:
To take advantage of the characteristic solutions [tex]y_1(x)=x[/tex] and [tex]y_2(x)=e^x[/tex], you can try the method of variation of parameters, where we look for a solution of the form[tex]y=y_1u_1+y_2u_2[/tex]with the condition that[tex]{u_1}'y_1+{u_2}'y_2=0[/tex] [tex]\implies{u_1}'x+{u_2}'e^x=0[/tex] [tex](\mathbf 1)[/tex]Then[tex]y'={y_1}'u_1+y_1{u_1}'+{y_2}'u_2+y_2{u_2}'[/tex][tex]\implies y'={y_1}'u_1+{y_2}'u_2[/tex][tex]y''={y_1}''u_1+{y_1}'{u_1}'+{y_2}''u_2+{y_2}'{u_2}'[/tex]Substituting into the ODE gives[tex](1-x)({y_1}''u_1+{y_1}'{u_1}'+{y_2}''u_2+{y_2}'{u_2}')+x({y_1}'u_1+{y_2}'u_2)-y_1u_1+y_2u_2=2(x-1)^2e^{-x}[/tex]Since[tex]y_1=x\implies{y_1}'=1\implies{y_1}''=0[/tex][tex]y_2=e^x\implies{y_2}'=e^x\implies{y_2}''=e^x[/tex]the above reduces to[tex](1-x)({u_1}'+e^x{u_2}')=2(x-1)^2e^{-x}[/tex][tex]{u_1}'+e^x{u_2}'=2(1-x)e^{-x}[/tex] [tex](\mathbf 2)[/tex][tex](\mathbf 1)[/tex] and [tex](\mathbf 2)[/tex] form a linear system that we can solve for [tex]{u_1}',{u_2}'[/tex] using Cramer's rule:[tex]{u_1}'=\dfrac{W_1(x)}{W(x)},{u_2}'=\dfrac{W_2(x)}{W(x)}[/tex]where [tex]W(x)[/tex] is the Wronskian determinant of the fundamental system and [tex]W_i(x)[/tex] is the same determinant, but with the [tex]i[/tex]-th column replaced with [tex](0,2(x-1)^2e^{-x})[/tex].[tex]W(x)=\begin{vmatrix}x&e^x\\1&e^x\end{vmatrix}=e^x(x-1)[/tex][tex]W_1(x)=\begin{vmatrix}0&e^x\\2(x-1)^2e^{-x}&e^x\end{vmatrix}=-2(x-1)^2[/tex][tex]W_2(x)=\begin{vmatrix}x&0\\e^x&2(x-1)^2e^{-x}\end{vmatrix}=2xe^{-x}(x-1)^2[/tex]So we have[tex]{u_1}'=\dfrac{-2(x-1)^2}{e^x(x-1)}\implies u_1=2xe^{-x}[/tex][tex]{u_2}'=\dfrac{2xe^{-x}(x-1)^2}{e^x(x-1)}\implies u_2=-x^2e^{-2x}[/tex]Then the particular solution is[tex]y_p=2x^2e^{-x}-x^2e^{-x}=x^2e^{-x}[/tex]giving the general solution to the ODE,[tex]\boxed{y(x)=C_1x+C_2e^x+x^2e^{-x}}[/tex]