# Math Help - Why complimentary Function ?

1. ## Why complimentary Function ?

Why do we find Complementary Function for 2nd order differential equations. Why do we consider the homogeneous equation to find it and why is it a part of the solution ?
Individually it does not even satisfy the main differential equation.

2. ## Re: Why complimentary Function ?

For any *linear* ODE, you find the complementary function (solution to the homogeneous problem) for at least two reasons. (Note that all the examples will be 1st order ODEs to keep things clear and simple, but the same reasoning applies to any degree linear ODE).

First (and foremost):
It *is* part of the final solution. Much like an indefinite integral has a +C added to it, the complementary function ("the"? - it actually will incorporate one unknown constant for each degree of the ODE) is the "generic thing" you can add to any particular solution to get another particular solution. Without including all possible solutions, you actually haven't solved the problem - and it's the homogeneous solution that you must know in order to have determined *all* the possible particular solutions. Without that +C in the indefinite integral, you actually haven't found the indefinite integral, as you won't have yet discovered all the function's possible anti-derivatives. Likewise for linear ODEs, you get the full set of solutions only when you incorporate the homogeneous solutions.

That ("like +C for indefinite integrals") simile is actually literal. Example:

Observe that $\int x^3 dx = \frac{1}{4} x^4 + C$ means exactly that $f(x) = \frac{1}{4} x^4 + C$ are the solutions to $\frac{dy}{dx} = x^3$.

Now look at $\frac{dy}{dx} = x^3$ in terms of homogenous and particular solutions, $y_h$ and $y_p$.

Have $\frac{dy_h}{dx} = 0$ and $\frac{dy_p}{dx} = x^3$.

Solve those, choosing just one of the many possible $y_p$. Solve it as $y_p(x) = \frac{1}{4} x^4$.

When you solve for $y_h$, you get $y_h(x) = C$, where $C$ is some real constant.

Thus the general solution to the 1st order linear ODE $\frac{dy}{dx} = x^3$ is $y_p(x) + y_h(x) = (\frac{1}{4} x^4) + (C)$.

In the general case:

If, given $f$, you find a particular $F$ such that $F' = f$, then saying $F(x) + C = \int f(x)dx$ is just another way of saying that

the ODE $\frac{dy}{dx} = f(x)$ has a particular solution $y_p(x) = F(x)$ and homogeneous solutions $y_h(x) = C$.

Second:
The method of variation of parameters is very useful, and requires first solving the (much easier) homogenous equation.

Ex: Solve $y' - y = x$

First, solve $y_h' - y_h = 0$, giving $y_h(x) = Ae^x$.

Now, try to find a particular solution. We need only find ONE, and we'll have then found them all, since we already know $y_h(x)$.

Try $y(x) = A(x)e^x$. (That changes the constant A in the complementary function into a function A in a guess at a partiuclar solution. It "varies the parameter".)

Then $y'(x) = A'(x)e^x + A(x)e^x$, so $y'-y = x$ becomes $(A'(x)e^x + A(x)e^x) - (A(x)e^x) = x$, so

$A'(x) = xe^{-x}$, so $A(x) = \int xe^{-x} dx = -(x+1)e^{-x} + C$.

Now, at this point you could carry that +C around in the calculations, but why bother? We need only find ONE particular solution. So make life easy, and try it with C = 0.

Thus we'll see if $A(x) = -(x+1)e^{-x}$ gives a particular solution, so try $y(x) = A(x)e^x = (-(x+1)e^{-x})e^x = - x - 1$.

Get $y'(x) = - 1$, so $y'(x) - y(x) = (- 1) - (- x - 1) = x$. Voila - a particular solution!

Thus the general solution to $y' - y = x$ is $y = y_p + y_h$, so $y(x) = Ae^x - x - 1$.

Cheers !