ODE $y''+ 9y = 6 \cos 3x$

3.4k Views Asked by At

I have this equation: $y''+ 9y = 6 \cos 3x$

$$ m^2 + 9m = 0\\ m(m + 9) = 0\\ m_1 = 0;\\ m_2 = -9;\\ y_h = c_1 + c_2 e^{-9x}\\ r(x) = 6\cos3x\\ y_p = K\cos3x + M\sin3x\\ y'_p = -3K\sin3x + 3M\cos3x\\ y''_p = -9K\cos3x - 9M\sin3x $$
Here is my problem

$$ -9K\cos3x - 9M\sin3x + 9(K\cos3x + M\sin3x) = 6\cos3x $$

as you can see it is obvious that both cos and sin will cancel out, and i don't think i can multiply $y_p$ with $x$ just like i did with my other problem to change the equation.

so what am i doing wrong here?

Thank you :)

1

There are 1 best solutions below

1
On BEST ANSWER

Once the characteristic equation $m^2+9=0$ has been solved, yielding the roots $m=\pm3\mathrm i$ and the solutions of the linear equation as linear combinations of the functions $x\mapsto\cos(3x)$ and $x\mapsto\sin(3x)$, the method of variation of the parameters recommends to look for the general solution of the full equation as $$ y(x)=a(x)\cos(3x)+b(x)\sin(3x), $$ for some functions $a$ and $b$ solving the system $$ \left\{\begin{array}{lcl}a'(x)\cos(3x)+b'(x)\sin(3x)&=&0\\ -3a'(x)\sin(3x)+3b'(x)\cos(3x)&=&6\cos(3x)\end{array}\right. $$ This is a Cramer system, solved by $$ \left\{\begin{array}{lclcl}a'(x)&=&-2\cos(3x)\sin(3x)&=&-\sin(6x)\\ b'(x)&=&2\cos^2(3x)&=&\cos(6x)+1\end{array}\right. $$ hence there exists some constants $(\alpha,\beta)$ such that $$ \left\{\begin{array}{lcl}a(x)&=&\tfrac16\cos(6x)+\alpha\\ b(x)&=&\tfrac16\sin(6x)+x+\beta\end{array}\right. $$ Plugging this in $y(x)$ and using the identity $$\cos(6x)\cos(3x)+\sin(6x)\sin(3x)=\cos(3x),$$ one sees finally (with no sweat...) that the general solution is $$ y(x)=\tfrac16\cos(3x)+x\sin(3x)+\alpha\cos(3x)+\beta\sin(3x). $$ Thus, $\alpha=y(0)-\frac16$ and $\beta=\frac13y'(0)$. An alternative formulation is $$ y(x)=\tfrac16\cos(3x)+x\sin(3x)+\varrho\cos(3x+\omega). $$