Why can a linear "ordinary" differential equation have non-linear coefficients of independent variable?

The "linear" here means that if $u$ and $v$ are solutions of the (homogeneous) ODE, so is $\alpha u + \beta v$. That the coefficients of the derivatives aren't linear doesn't matter.


You're confused about what the independent variable is. A differential equation is a statement about functions, not about numbers.

In this case, the equation $y' = x^2 + x + 1$ is a statement about two functions:

  • $y$
  • $(x^2 + x + 1)$.

Neither of them need be linear in $x$. However it is linear in $y$. To see why (hah) first let's call $g(x) = (x^2 + x + 1)$ so we don't get distracted by $x$'s: $$ y' = g $$ This is linear in the same way that the equation $3x = 7$ is a linear equation: on the left side we have a linear function, and on the right side we have a constant.

Let's look at a more complicated example just to be sure we understand. $$3xy' - 2y' + 7y/x + 3x = -x^2 + 2y$$ Rearrange so all the terms with "$y$" are on the left side and everything is on the right, and factor out so it looks like a polynomial in $y$. $$ \big(3x - 2\big)y' + \bigg(-2 + \frac{7}{x}\bigg)y = -x^2 - 3x $$ This is a differential equation, so it's a statement about functions, not numbers. Let's call $a(x) = 3x-2$, $b(x) = -2 + 7/x$, and $c(x) = -x^2 - 3x$ just so the $x$'s don't get in the way: $$ay' + by = c$$ Again on the left side we have a linear function of $y$, and on the right side we have a constant.


Why is the left side a linear function of $y$? Let's call $Ly = ay' + by$. You should work this out: $$L(y_1 + y_2) = Ly_1 + Ly_2$$ and $$L(\lambda y) = \lambda Ly.$$ This problem lives in the realm of linear algebra: $L$ is a linear operator, and we're solving the inhomogeneous equation $$ Ly = c $$