solve the differential equation by variation of parameters. (y - y=cosh(x))

solve the differential equation by variation of parameters. (y - y=cosh(x))
Answer
Explanation:
Step1: Find complementary function
The homogeneous equation is $y'' - y=0$. The characteristic equation is $r^{2}-1 = 0$, which factors to $(r - 1)(r + 1)=0$. So the roots are $r_1=1$ and $r_2=-1$. The complementary function $y_c = C_1e^{x}+C_2e^{-x}$.
Step2: Assume particular solution form
We use the method of variation of parameters. Assume a particular solution $y_p=u_1(x)e^{x}+u_2(x)e^{-x}$.
Step3: Set up system of equations
We have the following system based on the method of variation of parameters: $u_1'e^{x}+u_2'e^{-x}=0$ and $u_1'e^{x}-u_2'e^{-x}=\cosh(x)$. Adding these two equations gives $2u_1'e^{x}=\cosh(x)=\frac{e^{x}+e^{-x}}{2}$, so $u_1'=\frac{1 + e^{-2x}}{4}$. Integrating, $u_1=\frac{x}{4}-\frac{e^{-2x}}{8}$. Subtracting the first from the second gives $2u_2'e^{-x}=-\cosh(x)=-\frac{e^{x}+e^{-x}}{2}$, so $u_2'=-\frac{e^{2x}+1}{4}$. Integrating, $u_2=-\frac{e^{2x}}{8}-\frac{x}{4}$.
Step4: Calculate particular solution
$y_p=u_1(x)e^{x}+u_2(x)e^{-x}=\left(\frac{x}{4}-\frac{e^{-2x}}{8}\right)e^{x}+\left(-\frac{e^{2x}}{8}-\frac{x}{4}\right)e^{-x}=\frac{x}{4}(e^{x}-e^{-x})-\frac{1}{4}\left(\frac{e^{-x}+e^{x}}{2}\right)=\frac{x}{2}\sinh(x)-\frac{1}{4}\cosh(x)$.
Step5: Find general solution
The general solution of the non - homogeneous equation is $y = y_c + y_p=C_1e^{x}+C_2e^{-x}+\frac{x}{2}\sinh(x)-\frac{1}{4}\cosh(x)$.
Answer:
$y = C_1e^{x}+C_2e^{-x}+\frac{x}{2}\sinh(x)-\frac{1}{4}\cosh(x)$