We will solve the differential equation $$ay^{\prime \prime}+by^\prime+cy=f(t).$$ A solution to this differential equation is of the form $$y=y_h+y_p$$ where $y_h$ is a general solution to the homogeneous differential equations $$ay^{\prime \prime}+by^\prime+cy=0,$$ and $y_p$ is any particular solution to the non-homogeneous differential equation.

Finding $y_h$

To solve the homogeneous differential equation, "guess" the solution $y_h=e^{rt}$. When you plug this in and simplify you'll obtain the characteristic equation: $$ar^2+br^2+cr=0.$$ This quadratic equation either has 2 real sollutions, 1 real solution, or 2 complex congujate solutions. In each case, the form of the solution to the differential equation is different:

  1. If $b^2-4ac>0$ there are two real solutions to the characteristic equation: $r=r_1$ and $r=r_2$. (You can find them either by factoring the characteristic equation or by using the quadratic formula.) The solution to the DE is then a linear combination of the two solutions, $y_1=e^{r_1t}$ and $y_2=e^{r_2t}$: $$y_h=c_1e^{r_1t}+c_2e^{r_2t}.$$ For an example, see Trench example 5.2.1.
  1. If $b^2-4ac=0$ there is only one real solution to the characteristic equation: $r=r_1$. One solution is then $y_1=e^{r_1t}$. We need two linearly independent solutions to be able to write a general solution. Check that $y_2=te^{r_1t}$ is also a solution to the DE. (plug it in and make sure it works). Then a general is a linear combination of these two solutions: $$y_h=c_1e^{r_1t}+c_2te^{r_1t}.$$ For an example, see Trench example 5.2.2. (You can also find a discussion of why $y_2=te^{r_1t}$ is the "right" thing to guess for a second solution in Trench section 5.2)
  1. If $b^2-4ac<0$ the solutions to the characteristic equations are complex: $r=\lambda \pm i\omega$ where $\omega>0$. So, $y=e^{rt}$ is a complex solution to the DE. If $y$ is a solution to the DE, then so are its real and imaginary parts. We only need to consider one of the roots to the characteristic equation, say $r=\lambda + i \omega$. We have \begin{align*} y&=e^{rt}\\ &=e^{(\lambda+i\omega)t}\\ &=e^{\lambda t}e^{i\omega t}\\ &=e^{\lambda t} \cdot \left(\cos(\omega t)+i\sin(\omega t) \right)\\ &=\underbrace{e^{\lambda t}\cos(\omega t)}_{\text{real part}}+i\underbrace{e^{\lambda t}\sin(\omega t)}_{\text{imaginary part}}.\\ \end{align*} The solution to the DE is a linear combination of the real and imaginary parts: $$y_h=c_1e^{\lambda t}\cos(\omega t)+c_2e^{\lambda t}\sin(\omega t).$$ For an example, see Trench example 5.2.3.

See Trench section 5.1 for a more detailed discussion of why we build our general solution from two linearly independent solutions. Also this section includes a discussion of how to determine whether two solutions are, in fact, linearly indepedent.

Finding $y_p$

To find a particular solution to $$ay^{\prime \prime}+by^\prime+cy=f(t)$$ we will "guess" a solution that looks like $f(t)$ and see if it works. We'll illustrate what looks like means with an example.

Example 1

$$y^{\prime \prime}-4y^\prime-5y=-6xe^{-x}$$

Let's guess $y_p=(Ax+B)e^{-x}$. Then \begin{align*} y_p&=(Ax+B)e^{-x}\\ y_p^\prime&=(A-B-Ax)e^{-x}\\ y_p^{\prime \prime}&=(B-2A+Ax)e^{-x}.\\ \end{align*}

Plug these in to the DE: \begin{align*} y^{\prime \prime}-4y^\prime-5y&=-6xe^{-x}\\ ((B-2A+Ax)e^{-x})-4((A-B-Ax)e^{-x})-5((Ax+B)e^{-x})&=-6xe^{-x}\\ e^{-x}(B-2A-4A+4B-5B)+xe^{-x}(A+4A-5A)&=-6xe^{-x}\\ -6Ae^{-x}&=-6xe^{-x}.\\ \end{align*}

But, $A$ was meant to be a constant. So, this first guess doesn't work. Let's try again with $y_p=(Ax^2+Bx+C)e^{-x}$. This time we have

\begin{align*} y_p&=(Ax^2+Bx+C)e^{-x}\\ y_p^\prime&=(B-C+(2A-B)x-Ax^2)e^{-x}\\ y_p^{\prime \prime}&=(2A-2B+C+(B-4A)x+Ax^2)e^{-x}.\\ \end{align*}

Plug these into the DE: \begin{align*} y^{\prime \prime}-4y^\prime-5y&=-6xe^{-x}\\ ((2A-2B+C+(B-4A)x+Ax^2)e^{-x})-4((B-C+(2A-B)x-Ax^2)e^{-x})-5((Ax^2+Bx+C)e^{-x})&=-6xe^{-x}\\ ((2A-2B+C-4B+4C-5C)+(B-4A-8A+4B-5B)x+(A+4A-5A)x^2)e^{-x}&=-6xe^{-x}\\ ((2A-6B)+(-12A)x)e^{-x}&=-6xe^{-x}.\\ \end{align*}

So we need $-12A=-6$ and $2A-6B=0$. Solving we find $A=\frac{1}{2}$ and $B=\frac{1}{6}$. A particular solution to the DE is $$y_p=\left(\frac{1}{2}x^2+\frac{1}{6}x\right)e^{-x}.$$

The general solution to the DE is then \begin{align*} y&=y_h+y_p\\ &=c_1e^{-5x}+c_2e^{-x}+\left(\frac{1}{2}x^2+\frac{1}{6}x\right)e^{-x}.\\ \end{align*}

Finding the homogeneous solution was not illustrated here. If you like, there are criteria for "guessing" a particular solution at the end of section 5.4 in Trench. Section 5.5 discusses the case where the forcing function includes trigonometric functions.

In [ ]:

In [ ]:

In [ ]: