solve the differential equation by variation of parameters. (y + y=sin^{2}(x)) (y(x)=)

solve the differential equation by variation of parameters. (y + y=sin^{2}(x)) (y(x)=)

solve the differential equation by variation of parameters. (y + y=sin^{2}(x)) (y(x)=)

Answer

Explanation:

Step1: Find the complementary - function

The homogeneous equation is $y'' + y=0$. The characteristic equation is $r^{2}+1 = 0$, which gives $r=\pm i$. So the complementary - function $y_c = C_1\cos x+C_2\sin x$.

Step2: Rewrite the non - homogeneous term

We know that $\sin^{2}x=\frac{1 - \cos(2x)}{2}$.

Step3: Assume a particular solution

We assume a particular solution of the form $y_p = A + B\cos(2x)+C\sin(2x)$. Then $y_p'=-2B\sin(2x)+2C\cos(2x)$ and $y_p''=-4B\cos(2x)-4C\sin(2x)$. Substitute $y_p$, $y_p'$ and $y_p''$ into the non - homogeneous equation $y'' + y=\sin^{2}x=\frac{1 - \cos(2x)}{2}$: [ \begin{align*} -4B\cos(2x)-4C\sin(2x)+A + B\cos(2x)+C\sin(2x)&=\frac{1 - \cos(2x)}{2}\ A+( - 3B)\cos(2x)+( - 3C)\sin(2x)&=\frac{1}{2}-\frac{1}{2}\cos(2x) \end{align*} ] Equating the coefficients: For the constant term: $A=\frac{1}{2}$. For the $\cos(2x)$ term: $-3B=-\frac{1}{2}$, so $B=\frac{1}{6}$. For the $\sin(2x)$ term: $-3C = 0$, so $C = 0$. So $y_p=\frac{1}{2}+\frac{1}{6}\cos(2x)$.

Step4: General solution

The general solution of the non - homogeneous equation is $y(x)=y_c + y_p=C_1\cos x+C_2\sin x+\frac{1}{2}+\frac{1}{6}\cos(2x)$.

Answer:

$y(x)=C_1\cos x+C_2\sin x+\frac{1}{2}+\frac{1}{6}\cos(2x)$