$y''+16y=-\frac{2}{\sin(4x)}$

$y''+16y=-\frac{2}{\sin(4x)}$

I try to solve this ode using the variation of parameters theorem.

The characteristic polynomial of the homogenous equation is $r^2+16=0. $

Then $u_1(x)=\sin(4x),u_2(x)=\cos(4x)$

$y(x)=c_1(x)\sin(4x)+c_2(x)\cos(4x)$

I $c'_1(x)\sin(4x)+c'_2\cos(4x)=0$

II $c'_1(x)\cos(4x)-c'_2\sin(4x)=-\frac{2}{\sin(4x)}$

Multiply I by $\cos(4x)$ and II by $\sin(4x)$ and subtract.

$c'_1(\sin(4x)\cos(4x)-\cos(4x)\sin(4x))+c'_2(\cos^2(4x)+\sin^2(4x))=2 $

We get $c'_2=2 \implies c_2=2x$, $c'_1=-\frac{2\cos(4x)}{\sin(4x)}=-2\cot \left(4x\right) \implies c_1=-\frac{1}{2}\ln \left|\sin \left(4x\right)\right|.$

I don't get why it incorrect , where am I wrong?

Thanks!


Hint: Your $y(x)$ should be $$ y(x)=c_1(x)\cos(4x)+c_2(x)\sin(4x). $$ Using this, you will get two equations which are different from yours. So your second equation is wrong.

Update: First $$ y'(x)=c_1'(x)\cos(4x)+c_2'(x)\sin(4x)-4c_1(x)\sin(4x)+4c_2(x)\cos(4x). $$ Let $$ c_1'(x)\cos(4x)+c_2'(x)\sin(4x)=0$$ and then $$ y'(x)=-4c_1(x)\sin(4x)+4c_2(x)\cos(4x). $$ Now you can get $y''(x)$.


It seems like you are not paying enough attention to your differentiation. If you have $u_1, u_2$ as your homogeneous solution and look for $$y(x) = c_1(x)u_1(x) + c_2(x)u_2(x),$$ then just taking one derivative gives: $$y' = (c_1u_1)'+(c_2u_2)' = c_1'u_1+c_1u_1'+c_2'u_2+c_2u_2'.$$ The usual assumption (your equation I) makes is it so that $$y' = c_1u_1'+c_2u_2'.$$ The way you have written this right now, it reads like $$y' = \dfrac{-2}{\sin 4x}$$ which is your equation II and this is wrong. You take another derivative of $y'$ to find $y''$ and while you are doing so, you are going to use equation I again to obtain a simple expression. Then, you plug $y$ and $y''$ to your original DE to obtain two sets of equations for $c_1$ and $c_2.$