How is $y' = x^2$ a differential equation if it doesn't contain a function $y$?

Yes. A differential equation is an expression involving a function (typically denoted $y(x)$) of a variable $x$, together with one or more of the derivatives of $y$. The coefficient of $y$ (or any derivative of $y$) can be zero in such an equation, so $$ y' = 0\\ y' = 3x y \\ y'' + y = 0 \\ y'' + x^2 = 9 $$ are all differential equations. Typically one requires that the coefficient of at least one of the derivatives of $y$ is nonzero, so you could say "It's an equation that specifies a function $y$ by saying something about some derivative of $y$."

Equations that don't involve anything except $y'$ are generally easy to solve: you isolate $y'$, getting something like $$ y' = x^2 $$ and then integrate both sides with respec to $x$, getting $$ y(x) + C = \frac{x^3}{3} + K $$ and then combine the two constants of integration into one to get $$ y(x) = \frac{x^3}{3} + A. $$

Of course, you can still have things like $$ (y')^5 + y' + 1 = 0, $$ where the "isolating $y'$" step may be effectively impossible. The "isolate $y'$ " strategy works best when $y'$ appears only to the first power. For other situations...you need other ideas, which is why we have whole books about ODEs. :)


Linear first order differential equations are of the form $y'=fy + h$.

What this means is that $f$ and $h$ are fixed functions in terms of $t$ and we have to find a function $y$ also in terms of $t$ that solves that system.

Your equation is the particular example in which $f$ is the constant $1$ function and $h$ is the constant $0$ function.

So your equation is not only a differential equation but it also fits into the nice family of linear differential equations.