Finding the General Solution
Although finding any solution to a differential equation is important, we often want to find all solutions to a differential equation. We call this the general solution.
An important difference between first-order and second-order equations is that, with second-order equations, we typically need to find two different solutions to the equation to find the general solution. If we find two solutions, then any linear combination of these solutions is also a solution. We state this fact in the following theorem.
superposition principle
If [latex]y_1(x)[/latex] and [latex]y_2(x)[/latex] are solutions to a linear homogeneous differential equation, then the function
[latex]y(x)=c_1y_1(x)+c_2y_2(x)[/latex],
where [latex]c_1[/latex] and [latex]c_2[/latex] are constants, is also a solution.
Consider the differential equation
[latex]\large{y^{\prime\prime}-4y^\prime-5y=0}[/latex].
Given that [latex]e^{-x}[/latex] and [latex]e^{5x}[/latex] are solutions to this differential equation, show that [latex]4e^{-x}+e^{5x}[/latex] is a solution.
Unfortunately, to find the general solution to a second-order differential equation, it is not enough to find any two solutions and then combine them. Consider the differential equation:
[latex]x''+7x'+12x=0[/latex].
Both [latex]e^{-3t}[/latex] and [latex]2e^{-3t}[/latex] are solutions (check this). However, [latex]x(t)=c_1e^{-3y}+c_2\left(2e^{-3t}\right)[/latex] is not the general solution. This expression does not account for all solutions to the differential equation. In particular, it fails to account for the function [latex]e^{-4t}[/latex], which is also a solution to the differential equation.
To find the general solution to a second-order differential equation, we must find two linearly independent solutions.
linearly independent
A set of functions [latex]f_1(x),f_2(x),\ldots,f_n(x)[/latex] is said to be linearly dependent if there are constants [latex]c_1,c_2,\ldots c_n[/latex], not all zero, such that [latex]c_1f_1(x)+c_2f_2(x)+\cdots c_nf_n(x)=0[/latex] for all [latex]x[/latex] over the interval of interest.
A set of functions that is not linearly dependent is said to be linearly independent.
You will usually test sets of only two functions for linear independence, which allows us to simplify this definition. From a practical perspective, two functions are linearly dependent if either one of them is identically zero or if they are constant multiples of each other.
If the functions meet these conditions, then they are linearly dependent. If one of the functions is identically zero—say, [latex]f_2(x)\equiv0[/latex]—then choose [latex]c_1=0[/latex] and [latex]c_2=1[/latex], and the condition for linear dependence is satisfied. If, on the other hand, neither [latex]f_1(x)[/latex] nor [latex]f_2(x)[/latex] is identically zero, but [latex]f_1(x)=Cf_2(x)[/latex] for some constant [latex]C[/latex], then choose [latex]c_1=\frac{1}{C}[/latex] and [latex]c_2=-1[/latex], and again, the condition is satisfied.
Conversely, if two functions are linearly dependent, then either one is identically zero or they are constant multiples of one another. Assume [latex]f_1(x)[/latex] and [latex]f_2(x)[/latex] are linearly dependent. Then, there are constants, [latex]c_1[/latex] and [latex]c_2[/latex], not both zero, such that:
[latex]c_1f_1(x)+c_2f_2(x)=0[/latex]
for all [latex]x[/latex] over the interval of interest. Then,
[latex]c_1f_1(x)=-c_2f_2(x)[/latex].
Now, since we stated that [latex]c_1[/latex] and [latex]c_2[/latex] can’t both be zero, assume [latex]c_2\ne0[/latex]. Then, there are two cases: either [latex]c_1=0[/latex] or [latex]c_1\ne0[/latex]. If [latex]c_1=0[/latex], then:
[latex]\begin{aligned} 0&=-c_2f_2(x) \\ 0&=f_2(x) \end{aligned}[/latex],
so one of the functions is identically zero. Now suppose [latex]c_1\ne0[/latex]. Then,
[latex]f_1(x)=\left(-\frac{c_2}{c_1}\right)f_2(x)[/latex]
and we see that the functions are constant multiples of one another.
linear dependence of two functions
Two functions, [latex]f_1(x)[/latex] and [latex]f_2(x)[/latex], are said to be linearly dependent if either one of them is identically zero or if [latex]f_1(x)=Cf_2(x)[/latex] for some constant [latex]C[/latex] and for all [latex]x[/latex] over the interval of interest.
Functions that are not linearly dependent are said to be linearly independent.
Determine whether the following pairs of functions are linearly dependent or linearly independent.
- [latex]f_1(x)=x^{2}[/latex], [latex]f_2(x)=5x^{2}[/latex]
- [latex]f_1(x)=\sin x[/latex], [latex]f_2(x)=\cos x[/latex]
- [latex]f_1(x)=e^{3x}[/latex], [latex]f_2(x)=e^{-3x}[/latex]
- [latex]f_1(x)=3x[/latex], [latex]f_2(x)=3x+1[/latex]
If we are able to find two linearly independent solutions to a second-order differential equation, then we can combine them to find the general solution.
general solution to a homogeneous equation
If [latex]y_1(x)[/latex] and [latex]y_2(x)[/latex] are linearly independent solutions to a second-order, linear, homogeneous differential equation, then the general solution is given by:
[latex]y(x)=c_1y_1(x)+c_2y_2(x)[/latex],
where[latex]c_1[/latex] and [latex]c_2[/latex] are constants.
When we say a family of functions is the general solution to a differential equation, we mean that (1) every expression of that form is a solution and (2) every solution to the differential equation can be written in that form. This makes this theorem extremely powerful. If we can find two linearly independent solutions to a differential equation, we have effectively found all solutions to the differential equation.