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 have calculated solutions to homogenous equations but is the complementary solution mentioned here the same as the homogenous solution?

Let's take example $y''-3y'+2y=\cos(wx)$ and now the homogenous solution is

$$y_{hom}=C_{1}e^{2x}+C_{2}e^{x}_{|\text{Characteristic eq. =}(r-1)(r-2)}$$

which can be showed with Wronk's determinant to be valid (cannot yet understand it but go on). Now to find out the general solution there are multiple ways apparently:

  1. Method of Undetermined Coefficient
  2. Variation of constant

I have not practised them yet enough (because cannot understand the terms yet) so cannot ask much about them but I am trying to, could someone help me with the terminology here about the complementary solution?

share|improve this question
There must be a typo, neither $e^x$ nor $e^{2x}$ is a solution of the DE. Did you mean $y''-3y'+2y$? –  André Nicolas Feb 23 '12 at 20:48
@AndréNicolas It seems like it. –  Pedro Tamaroff Feb 23 '12 at 20:51
@AndréNicolas: sorry I was too uncareful, fixed that. Thanks, now back to terms. –  hhh Feb 23 '12 at 20:55
The usual term is "particular solution." Once you find a particular solution $f_p(x)$, the general solution is $f_p(x)$ plus the general solution of the homogeneous equation. –  André Nicolas Feb 23 '12 at 21:01
As remarked, that is the complementary solution or a particular solution. It is best not to call it a "homogeneous solution" since in fact it is not homogeneous. –  GEdgar Feb 24 '12 at 1:22

1 Answer 1

up vote 3 down vote accepted

As Andre mentioned in his comment, the more common terminology is "particular solution".

Your homogeneous solution $y_{hom} = C_1e^{2x} + C_2e^x$ a solution, not to the original equation, but to the homogeneous equation $y'' - 3y' + 2y = 0$, regardless of the constant parameters $C_1$ and $C_2$.

To find the particular (complementary) solution, we must consider solutions of the form $$y_p=A\cos(wx) + B\sin(wx)\tag{1}$$ After finding $$y_p'=wB\cos(wx) - wA\sin(wx)$$ and $$y_p''=-w^2A\cos(wx) - w^2B\sin(wx)$$ we substitute them into the original equation to get:

$-w^2A\cos(wx) - w^2Bsin(wx) - 3wB \cos(wx) + 3wA\sin(wx) + 2A\cos(wx) + 2Bs\in(wx) = \cos(wx)$

Because $\sin(wx)$ and $\cos(wx)$ are linearly independent, we know that the coefficients of $\cos(wx)$ on the LHS must equal the coefficient of $\cos(wx)$ on the RHS, and similarly for $\sin(wx)$ which gives us the system of equations:

$$\begin {cases} (-w^2 + 2)A + (-3w)B = 1 \\ (3w)A + (-w^2 + 2)B = 0 \end{cases}$$

Solving this system of equations gives us specific values for the coefficients $A$ and $B$:

$$A = \frac{2-w^2}{w^4+5w^2+4}, B = \frac{-3w}{w^4+5 w^2+4}$$

(provided that the denominator of those fractions is non-zero of course - also notice that that is equivalent to the condition that the determinant of the coefficient matrix for $A$ and $B$, in the system of equations given above, is non-zero.)

which now provides us with a particular (complimentary) solution to the original differential equation:

$$y_p=\frac{2-w^2}{w^4+5w^2+4}cos(wx) + \frac{-3w}{w^4+5 w^2+4}sin(wx)$$

And because, in general, (f + g)' = f' + g', we can see that

$$ (y_{hom} + y_p)'' - 3(y_{hom} + y_p)' + 2(y_{hom} + y_p) = (y_{hom}'' - 3y_{hom}' + 2y_{hom}) + (y_p'' -3y_p' +2y_p)$$ and then $$(y_{hom}'' - 3y_{hom}' + 2y_{hom}) + (y_p'' -3y_p' +2y_p) = 0 + cos(wx) = cos(wx)$$ thus the general solution will be $$y=y_{hom}+y_p=C_1e^{2x} + C_2e^x + \frac{2-w^2}{w^4+5w^2+4}\cos(wx) + \frac{-3w}{w^4+5 w^2+4}\sin(wx)$$

share|improve this answer
With the tagged equation by (1), is it always so that the particular solution is of that form or just with trigonometric RHS? –  hhh Feb 24 '12 at 0:45
Good question. (1) comes from the fact that our non-homogeneous function, $cos(wx)$, has a finite set of linearly independent derivatives - consisting of just $cos(wx)$ and $sin(wx)$. Caveat: Special steps must be taken when the set of linearly independent derivatives intersect with the homogeneous solution. –  Andrew Parker Feb 24 '12 at 1:34
@Peter - if it's worth an edit, it's worth an upvote? –  Andrew Parker Feb 25 '12 at 6:43
@AndrewParker Hmm, most probably. I just added the slashes. –  Pedro Tamaroff Feb 25 '12 at 14:21
@Peter I always forget about that with the trig functions... thanks. –  Andrew Parker Feb 25 '12 at 16:17

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.