Find the particular solution using variation of parameters

ordinary differential equations

The given equation is

$$y^{''}-y=xe^x$$
The characteristic equation is $$
y_c=C_1e^x+C_2e^{-x}$$

$$y_1=e^x$$
$$y_2=e^{-x}$$

Using a matrix we find $m,m_1,m_2$ to be
$$m=-2$$
$$m_1=-x$$
$$m_2=xe^{2x}$$
Then finding $u_n^{'}$ is as simple as $$\frac{m_n}{m}$$
$$u_1^{'}=\frac{x}{2}$$
$$u_2^{'}=-\frac{1}{2} xe^{2x}$$
Then taking the integrals of both the $u$ terms gives
$$u_1=\frac{1}{4}x^2$$
$$u_2=e^{2x}$$
Then multiplying the newly integrated terms by $y_1$ and $y_2$ gives us $$y_1(u_1)=\frac{1}{4}x^2e^x$$

$$y_2(u_2)=e^x$$
The particular solution is then $$y=C_1e^x+C_2e^{-x}+\frac{1}{4}x^2e^x+e^x$$
Did I complete the problem correctly?
Also my professor had this at the top of the page, I assumed I had done it during the problem but I could be wrong.enter image description here

Best Answer

It seems to me that you made a mistake somewhere. The wronskian is: $$W=\begin {vmatrix}e^x & e^{-x} \\ e^x & -e^{-x} \end{vmatrix}=-2$$ Then the first integral is $$A(x)=e^x\int \dfrac {-xdx}{-2}=\frac 1 4e^xx^2$$ $$B(x)=e^{-x}\int \dfrac {xe^{2x}dx}{-2}=-e^{-x}\frac 1 2(\dfrac {xe^{2x}}2-\dfrac {e^{2x}}{4})$$ $$B(x)=-\frac 1 2(\dfrac {xe^x}2-\dfrac {e^{x}}{4})$$ The solution is therefore: $$y=c_1e^x+c_2e^{-x}+A(x)+B(x)$$ $$y=c_1e^x+c_2e^{-x}-\dfrac {xe^x}4+ \dfrac {x^2e^x}4$$

Related Question