Example of cyclic vectors in linear differential equations Suppose $f(x)$ obeys the first-order differential equation $f'(x) = P(x) f(x)$, and $g(x)$ obeys the first order differential equation $g'(x) = Q(x)g(x)$.
Is there a second-order differential equation that is obeyed by both $f$ and $g$?  What is it?
I think the question is equivalent to asking for a "cyclic vector" of the 2x2 diagonal system.  I don't understand how to find cyclic vectors and this is the simplest example I can think of.
 A: I have recently been working with cyclic vectors and differential modules and I think this question provides a good example. Firstly, let's write the equations as a system:
$$
\left(\begin{matrix} f'\\g'  \end{matrix}\right)=\left(\begin{matrix} Pf \\ Qg \end{matrix}\right)
$$
If we set a differential field say $\mathbb{C}(x)$ with $d=d/dx$ (so $P,Q\in \mathbb{C}(x)$ then the cyclic vector theorem gives us a way of constructing a cyclic vector. In general, however, guessing a cyclic vector is often an easy option (there are usually lots of cyclic vectors). In our case we will let $D$ be the differential operator that acts via:
$$
Dv=\left(\begin{matrix} P&0 \\0&Q  \end{matrix}\right)v+d(v)
$$
If we start with the vector $(1,1)$ (over $\mathbb{C}(x)^2$) we find that:
$$
\begin{split} D\left(\begin{matrix} 1\\1 \end{matrix}\right)&=\left(\begin{matrix} P&0\\0&Q\end{matrix}\right)\left(\begin{matrix} 1\\1\end{matrix}\right)+\left(\begin{matrix}0\\0\end{matrix}\right) \\ &=\left(\begin{matrix} P\\Q  \end{matrix}\right) \end{split}
$$
So $(1,1)$ will be a cyclic vector provided that $(1,1)$ and $(P,Q)$ are linearly independent, i.e. provided $P\ne Q$ (which would be uninteresting as both $f$ and $g$ would satisfy the same equation). The vector $(1,1)$ is cyclic because $(1,1)$ and $D(1,1)$ now form a basis of $\mathbb{C}(x)^2$ and so we can write $D^2(1,1)$ in terms of $(1,1)$ and $D(1,1)$. This will then give us the differential equation that both $f$ and $g$ satisfy. We have:
$$
\begin{split} D^2\left(\begin{matrix} 1\\1 \end{matrix}\right)= D\left(\begin{matrix} P\\Q \end{matrix}\right) &= \left(\begin{matrix} P&0\\ 0&Q  \end{matrix}\right) \left(\begin{matrix} P\\ Q  \end{matrix}\right) +d\left(\begin{matrix} P\\Q \end{matrix}\right) \\ &=\left(\begin{matrix} P^2+P'\\Q^2+Q' \end{matrix}\right)\end{split}
$$
Since $(1,1)$ and $D(1,1)=(P,Q)$ form a basis of $\mathbb{C}(x)^2$ we can write this as a linear combination of $(1,1)$ and $D(1,1)$:
$$
\left(\begin{matrix} P^2+P'\\Q^2+Q' \end{matrix}\right)=\alpha\left(\begin{matrix}1\\1 \end{matrix}\right)+\beta\left(\begin{matrix}P\\Q\end{matrix}\right)
$$
where $\alpha,\beta\in\mathbb{C}(x)$. This gives us two equations and two unknowns. From the 'bottom' equation we get $\alpha=Q^2+Q'-\beta Q$ and substituting this into the 'top' equation gives:
$$
\begin{split} \beta&=\frac{P^2+P'-Q^2-Q'}{P-Q} \text{ , so} \\ \alpha&=\frac{Q^2P+Q'P-P'Q-P^2Q}{P-Q}=-QP+\frac{Q'P-P'Q}{P-Q} \end{split}
$$
So we have $D^2(1,1)=\alpha (1,1)+\beta D(1,1)$ and hence $f$ and $g$ both satisfy the second order differential equation:
$$
y''=\left[-Q(x)P(x)+\frac{Q'(x)P(x)-P'(x)Q(x)}{P(x)-Q(x)}\right]y+\frac{P^2(x)+P'(x)-Q^2(x)-Q'(x)}{P(x)-Q(x)}y'
$$
It can be easily verified that $f$ and $g$ both satisfy this equation. Note for example $f'=Pf$ and $f''=P'f+Pf'=P'f+P^2f$. There may be other choices of cyclic vector that result in a simpler differential equation.
