Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I'm trying to use the method of undetermined coefficients, but I'm not sure what I should guess for $\cos^2(x)$. I know that you generally want to take the first few derivatives, so:

$f(x) = \cos^2(x)$

$f'(x) = -2\cos(x)\sin(x)$

$f''(x) = -2\cos(2x)$

$f^{(3)}(x) = 4\sin(2x)$

(now repeats between cosine and sine)

Solving the characteristic equation $5r^2+8r+8 = 0$ gives complementary solution $y_g = c_1e^{-4x/5}\sin(\frac{2\sqrt{6}x}{5})+c_2e^{-4x/5}\cos(\frac{2\sqrt{6}x}{5})$. So a reasonable guess may be:

$y_p = A\cos^2(x)+B\cos(x)\sin(x)+C\cos(2x)+D\sin(2x)$

Is this correct? If not, what am I doing wrong?

share|improve this question
    
add comment

1 Answer

up vote 4 down vote accepted

Convert to the exponential form

$$ \cos^{2}(x) = \frac{1}{4} + \frac{1}{4}e^{i2x} + \frac{1}{4}e^{-i2x}\implies y_p=A + Be^{i2x} + Ce^{-i2x}\,.$$

Note that the functions in $y_p$ do not coincide with those in the solution of the homogenous equation

$$ y_h ={\it c_1}\,{{\rm e}^{\frac{1}{5}\, \left( -4+\sqrt {11} \right) x}}+{\it c_2}\,{{\rm e}^{-\frac{1}{5}\, \left( 4+\sqrt {11} \right) x}}.$$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.