As I mentioned last week, I’ve recently become interested in trying to fill in some gaps in my mathematical education, beginning with the theory of differential equations. To that end, I began by recalling a (very mildly careful) definition of the word “equation”. Now, let’s try out my definitions on Coddington’s exercise §1.6.1(c).

To begin, let

- \(\mathbb{N}\) be the non-negative integers,
- \(\mathbb{C}\) be the complex numbers,
- \(I = [p, q] \subset \mathbb{R}\) be a closed real interval,
- \((A, B)\) be the space of all functions from \(A\) to \(B\),
- \(C^1\!\!(A, B)\) be the space of continuously differentiable functions from \(A\) to \(B\),
- \(L(A, B)\) be the space of linear transformations from \(A\) to \(B\),
- \(D : C^1\!\!(A, B) \to (A, L(A,B))\) be the total derivative operator.

Exercise §1.6.1(c) asks us to find all the solutions of the equation

\[y' - 2y = x^2 + x\]

This means that we’re looking for a parameterization of the subset \(K \subset C^1\!\!(I, \mathbb{C})\) satisfying the identity, for all \(k \in K\) and \(x \in I\):

\[(Dk)(x) - 2k(x) - x^2 - x = 0\]

We are also given, via Theorem §1.6.2 that for all \(a \in \mathbb{C}\) and \(b \in C^0\!\!(I, \mathbb{C})\) continuous on \(I\), the sets of solutions \(V\) of differential equations of the form:

\[y' + ay = b(x)\]

all have, for some \(x_0 \in I\) and for all \(c \in \mathbb{C}\), the form

\[V = \left\{\phi : \phi(x) = e^{-ax} \int_{x_0}^{x} e^{at} b(t) \mathrm{d}t + ce^{-ax}\right\}\]

Unifying the signature of Theorem §1.6.2 with the equation of Exercise §1.6.1(c), we find that \(a = -2\) and \(b(x) = x^2 + x\) and that

\[K = \left\{\lambda x. e^{2x} \int_{x_0}^{x} e^{-2t}(t^2 + t) \mathrm{d}t + ce^{2x}\right\}_{c \in \mathbb{C}}\]

Our remaining task is to simplify \(K\) by simplifying

\[\int e^{-2t}(t^2 + t) \mathrm{d}t\]

To that end, we start off knowing that, for all \(a, b, c \in \mathbb{C}\) and for all \(n \in N\), \[\int e^{c t} = \frac{1}{c} e^{c t}, \int t^n = \frac{1}{n+1} t^{n+1}, \mbox{ and } \int \left(af + bg\right) = a \int f + b \int g\] Next, via the product rule for differentiation, we know that \[D(e^{ct} t^n) = D(e^{ct}) t^n + e^{ct} D(t^n) = c e^{ct} t^{n} + n e^{ct} t^{n-1}\] Next, while we don’t yet know how to compute \(\int e^{-2t}(t^2 + t)\), we might hope to find an appropriate antiderivative by solving \[e^{-2t}(t^2 + t) = D\left(aF + bG + cH\right)\] for some \(a, b, c \in \mathbb{C}\) and for \(F = e^{-2t} t^2\), \(G = e^{-2t} t^1\), and \(H = e^{-2t} t^0\).

Fortunately indeed, this question reduces to solving the following system of three linear equations in the Euclidean vector space generated by the basis \(\left\{x^a e^{-2bx}\right\}_{a, b \in \mathbb{N}, a < 3}\) with coefficients in \(\mathbb{C}\):

\[ \begin{align*} \left[F + G\right] &= \left[\begin{array}{c}DF \\ DG \\ DH\end{array}\right]^T \left[\begin{array}{c}a \\ b \\ c\end{array}\right] \\ \\ \left[F + G\right] &= \left[\begin{array}{c}-2F + 2G \\ -2G + H \\ -2H \end{array}\right]^T \left[\begin{array}{c}a \\ b \\ c\end{array}\right] \\ \\ \left[\begin{array}{c}F \\ G \\ H\end{array}\right]^T \left[\begin{array}{c}1 \\ 1 \\ 0\end{array}\right] &= \left[\begin{array}{c}F \\ G \\ H\end{array}\right]^T \left[\begin{array}{ccc}-2 & 0 & 0 \\ 2 & -2 & 0 \\ 0 & 1 & -2 \end{array}\right] \left[\begin{array}{c}a \\ b \\ c\end{array}\right] \\ \\ \left[\begin{array}{c}1 \\ 1 \\ 0\end{array}\right] &= \left[\begin{array}{ccc}-2 & 0 & 0 \\ 2 & -2 & 0 \\ 0 & 1 & -2 \end{array}\right] \left[\begin{array}{c}a \\ b \\ c\end{array}\right] \end{align*} \]

From here, a quick trip through Octave yields:

```
octave:1> A = [-2, 0, 0; 2, -2, 0; 0, 1, -2]
A =
-2 0 0
2 -2 0
0 1 -2
octave:2> inv(A)
ans =
-0.50000 0.00000 0.00000
-0.50000 -0.50000 0.00000
-0.25000 -0.25000 -0.50000
octave:3> inv(A) * [1; 1; 0]
ans =
-0.50000
-1.00000
-0.50000
```

Thus we have \[\left[\begin{array}{c}a \\ b \\ c\end{array}\right] = \frac{-1}{2} \left[\begin{array}{c} 1 \\ 2 \\ 1 \end{array}\right]\] and \[\int e^{-2t}(t^2 + t) \mathrm{d}t = \int D\left(aF + bG + cH\right) = aF + bG + cH\] and, finally, \[K = \left\{\lambda x. \frac{-1}{2} (x^2 + 2x + 1) + ce^{2x}\right\}_{c \in \mathbb{C}}\]