Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given differential eqn of,

$y'' + 16y = \cos(4x) - 8e^{3x}$

Initial conditions $y=0$ and $dy/dx = 0$ when $x = 0$

So therefor,

$r^2 + 16 = 0$

where $r$ will be $4i$

so, $Y = C\cos(4x) + D\sin(4x)$

The RHS is the part I have problem with...

This is what I've done so far

$Y_p = Ae^{3x} + B\cos(4x)$

$Y_p' = 3Ae^{3x} - 4B\sin(4x)$

$Y_p'' = 9Ae^{3x} - 16B\cos(4x)$

Sub into eqn...

$9Ae^{3x} - 16B\cos(4x) + 16(Ae^{3x} + B\cos(4x)) = \cos(4x) - 8e^{3x}$

$9Ae^{3x} - 16B\cos(4x) + 16Ae^{3x} + 16B\cos(4x) = \cos(4x) - 8e^{3x}$

$25Ae^{3x} = \cos(4x) - 8e^{3x}$

Taking coeff of $e^{3x}$,

$25A = -8$

$A = -8/25$

From here on Im stuck, not to sure how to find $B$.

share|cite|improve this question
You have written sometimes e^3x and sometimes e^-3x in $Y_p$ and its derivatives. Did you mean $e^{3x}$ everywhere? – Martin Sleziak May 19 '12 at 7:04
BTW including $\cos 4x$ into $Y_p$ does not seem to be very good, since $\cos 4x$ is a solution of homogeneous equation. – Martin Sleziak May 19 '12 at 7:07
@MartinSleziak oh yes, my mistake. I meant to type e^3x for all – JamesK May 19 '12 at 7:13

The right side of your differential equation is a sum of three terms of "frequencies" $3$, $4i$ and $-4i$.

The frequency $3$ is not a solution of the characteristic equation, whence there is a function of the form $x\mapsto C e^{3x}$ satisfying $y''+16 y=-8e^{3x}$.

Both frequencies $4i$ and $-4i$ are (simple) solutions of the characteristic equation; therefore there is no function $x\mapsto C e^{4ix}$ solving $$y''+16 y= {1\over2}e^{4ix}\ ,\qquad (1)$$ and similarly for $-4i$. There is, however, a function of the form $x\mapsto C xe^{4ix}$ solving $(1)$, and similarly for $-4i$.

Since your equation has real coefficients it is possible to combine the found complex solutions to real solutions. In fact you don't have to wander into the complex domain at all. The recipe reads as follows: The given equation will have a "particular" solution of the form $$y(x)= x\bigl(A\cos(4x)+ B\sin(4x)\bigr) + Ce^{3x}\ ,$$ and it remains to determine the coefficients $A$, $B$, $C$. (Note that you cannot expect $B=0$.)

share|cite|improve this answer

The problem is that you have a partially repeated solution. The complementary solution $Y = C\cos (4x) + D \sin(4x)$ and the particular solution $Y_p = Ae^{-3x} + B\cos (4x)$. However $B \cos(4x)$ in $Y_p$ and $C \cos(4x)$ in $Y$ are the same (as B and C are both just constants). To account for this you need to multiply $Y_p$ by $x$. This makes $y_p= Axe^{-3x} + Bx \cos(4x)$. Now you can go ahead and differentiate $y_p$ and solve for the coefficients.

share|cite|improve this answer
Since $e^{-3x}$ is not a solution of the homogeneous equation, it does not need to be multiplied by $x$. – Mark Bennet May 19 '12 at 8:28

Your Answer


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.