Skip to main content

Section 1.2 Some Basic Examples

Subsection 1.2.1 Solve xβ€³(t)βˆ’4x(t)=et

First, we solve the homogeneous version xβ€³βˆ’4x=0. It turns out that the general solution of this ODE is

x(t)=c1e2t+c2eβˆ’2t.

For 2nd order linear ODEs (basically ODEs of the form \(a x'' + bx' + cx = 0\) for constants \(a,b,c\)), remember that we always start off by plugging in \(x = e^{rt}\text{.}\)

If \(x = e^{rt}\text{,}\) then \(x' = re^{rt}\) and \(x'' = r^2e^{rt}\text{.}\) Substituting these into \(x'' - 4x = 0\) shows that

\begin{gather*} r^2e^{rt} - 4e^{rt} = 0. \end{gather*}

Dividing out by \(e^{rt} > 0\) gives us the characteristic polynomial \(r^2 - 4 = 0\text{.}\) Solving this has solutions \(r = \pm 2\text{.}\) This means that \(e^{2t}\) and \(e^{-2t}\) are solutions of \(x'' - 4x = 0\text{.}\)

So, we get that \(x(t) = c_1 e^{2t} + c_2 e^{-2t}\) is the general solution of \(x'' - 4x = 0\text{.}\)

This makes it clear that we should take y1(t)=e2t and y2(t)=eβˆ’2t. The Wronskian W[y1,y2](t)=βˆ’4, so these are fundamental solutions.

All we need to find is a particular solution of xβ€³+4x=et. This is quite easy if we've memorized the solution variation of parameters gives us.

Great! Then, this should be a simple task of plugging in stuff (although the simplification might be a little messy).

In this exercise, we have \(g(t) = e^t\) and \(p(t) = 1\text{.}\) Let's also take \(t_0 = 0\text{,}\) just to hopefully make the integration a little easier. So, directly from the formula, the particular solution \(Y(t)\) that we want is

\begin{align*} Y(t) \amp = \int_{t_0}^t \frac{y_1(s) y_2(t) - y_1(t) y_2(s)}{W[y_1,y_2](s)} \cdot \frac{g(s)}{p(s)} \ ds, \\ \amp = \int_0^t \frac{e^{2s} \cdot e^{-2t} - e^{2t} \cdot e^{-2s}}{e^{2s} \cdot (-2 e^{-2s}) - (2 e^{2s}) \cdot e^{-2s} } \cdot e^s \ ds. \end{align*}

Simplifying this will be a bit of a hassle, but the integration shouldn't be too bad:

\begin{align*} Y(t) \amp = \int_0^t \frac{e^{2s - 2t} - e^{2t - 2s}}{(-4)} \cdot e^s \ ds, \\ \amp = -\frac{1}{4} \int_0^t \Big[ e^{3s - 2t} - e^{2t - s} \Big] \ ds, \\ \amp = -\frac{1}{4} \Big[ \frac{1}{3} e^{3s - 2t} + e^{2t - s} \Big]_{s=0}^{s=t}, \\ \amp = -\frac{1}{3}e^t + \frac{1}{12} e^{-2t} + \frac{1}{4} e^{2t}. \end{align*}

Although not necessary, with a little careful observation, one may note that \(e^{-2t}/12 + e^{2t}/4\) solves \(x'' - 4x = 0\text{,}\) so we may instead take \(Y(t) = -e^t/3\) to be our particular solution of choice.

This is okay! The solution that variation of parameters gives is long, and misremembering one small detail could waste a lot of time. A lot of the work to find this solution the β€œlong way” is slightly tedious, so I'll skip over some more of the computational details.

Remember that the basic principle of variation of parameters is that we set \(x = Y(t) = u_1(t) y_1(t) + u_2(t) y_2(t)\text{.}\) In this case, we set \(Y(t) = u_1(t) e^{2t} + u_2(t) e^{-2t}\text{.}\) We want to solve for \(u_1\) and \(u_2\text{.}\)

Now, calculate \(Y'(t)\text{.}\)

\begin{gather*} Y'(t) = u_1'(t)e^{2t} + u_2'(t) e^{-2t} + 2 u_1(t) e^{2t} - 2 u_2(t) e^{-2t}. \end{gather*}

We set \(u_1'(t)e^{2t} + u_2'(t) e^{-2t} = 0\text{,}\) and keep this in the back of our heads. Next up, calculate \(Y''(t)\text{:}\)

\begin{gather*} Y''(t) = 2u_1'(t) e^{2t} - 2u_2'(t) e^{-2t} + 4u_1(t) e^{2t} + 4u_2(t) e^{-2t}. \end{gather*}

Substitute \(x = Y(t)\) into \(x'' - 4x = e^t\) to get

\begin{align*} e^t \amp = \Big( 2u_1'(t) e^{2t} - 2u_2'(t) e^{-2t} + 4u_1(t) e^{2t} + 4u_2(t) e^{-2t} \Big) - \Big( 4u_1(t) e^{2t} + 4u_2(t) e^{-2t} \Big), \\ \amp = 2u_1'(t) e^{2t} - 2u_2'(t) e^{-2t} \end{align*}

So in all, we get a system of equations (which is what we should expect).

\begin{align*} 0 \amp = u_1'(t) e^{2t} + u_2'(t) e^{-2t} \\ e^t \amp = 2u_1'(t) e^{2t} - 2u_2'(t) e^{-2t} \end{align*}

Turn this into a matrix equation to get

\begin{align*} \begin{bmatrix} u_1' \\ u_2' \end{bmatrix} \amp = \begin{bmatrix} e^{2t} \amp e^{-2t} \\ 2e^{2t} \amp -2e^{-2t} \end{bmatrix} \begin{bmatrix} 0 \\ e^t \end{bmatrix}\\ \amp = \frac{1}{4} \begin{bmatrix} e^{-t} \\ -e^{3t} \end{bmatrix} \end{align*}

Now, we have \(u_1'(t) = e^{-t}/4\) and \(u_2'(t) = -e^{3t}/4\text{.}\) We can choose any \(u_1, u_2\) with these derivatives, so for sake of simplicity, choose \(u_1(t) = -e^{-t}/4\) and \(u_2(t) = -e^{3t}/12\text{.}\)

Substitute these into \(Y(t) = u_1(t) e^{2t} + u_2(t) e^{-2t}\text{:}\)

\begin{gather*} Y(t) = -\frac{1}{4} e^{-t} e^{2t} - \frac{1}{12} e^{3t} e^{-2t} = -\frac{1}{3} e^t. \end{gather*}

In both cases, we found that Y(t)=βˆ’et/3 is a particular solution to xβ€³βˆ’4x=et. So, the general solution to xβ€³βˆ’4x=et is

x(t)=c1e2t+c2eβˆ’2tβˆ’13et.

Subsection 1.2.2 Solve xβ€³βˆ’3xβ€²+2x=1

Try it yourself! First, solve xβ€³βˆ’3xβ€²+2x=0.

Set \(x = e^{rt}\text{.}\) Substituting this into \(x'' - 3x' + 2x = 0\) shows that

\begin{gather*} r^2 - 3r + 2 = 0. \end{gather*}

This occurs when \(r = 1,2\text{,}\) so the general solution to \(x'' - 3x' + 2x = 0\) is

\begin{gather*} x(t) = c_1e^t + c_2e^{2t}. \end{gather*}

Next, we need a particular solution. Use variation of parameters to find some particular solution Y(t) of xβ€³βˆ’3xβ€²+2x=1.

Set \(Y(t) = u_1(t) y_1(t) + u_2(t) y_2(t)\text{.}\) Then, find \(Y'\) and \(Y''\text{,}\) using the special condition that we've set before (it's to avoid terms like \(u_1''\) and \(u_2''\))

Substituting these into \(x'' - 3x' + 2x = 1\text{,}\) along with the special condition, gives us a system of equations that we can solve!

Hint

Alternatively, one might remember that \(Y(t)\) takes the form

\begin{gather*} Y(t) = \int_{t_0}^t \frac{y_1(s) y_2(t) - y_1(t) y_2(s)}{W[y_1,y_2](s)} \cdot \frac{g(s)}{p(s)} \ ds. \end{gather*}

What's \(g(t)\) and \(p(t)\) in the ODE \(x'' - 3x' + 2x = 1\text{?}\)

Finally, the general solution to xβ€³βˆ’3xβ€²+2x=1 is of the form

x(t)=c1y1(t)+c2y2(t)+Y(t).
Answer

Here's one possible general solution (there are multiple, based on the \(Y(t)\) chosen)

\begin{gather*} \boxed{x(t) = c_1 e^t + c_2 e^{2t} + \frac{1}{2}.} \end{gather*}