How to tell if a differential equation is homogeneous, or inhomogeneous?

For a linear differential equation $$a_n(x)\frac{d^ny}{dx^n}+a_{n-1}(x)\frac{d^{n-1}y}{dx^{n-1}}+\cdots+a_1(x)\frac{dy}{dx}+a_0(x)y=g(x),$$ we say that it is homogenous if and only if $g(x)\equiv 0$. You can write down many examples of linear differential equations to check if they are homogenous or not. For example, $y''\sin x+y\cos x=y'$ is homogenous, but $y''\sin x+y\tan x+x=0$ is not and so on. As long as you can write the linear differential equation in the above form, you can tell what $g(x)$ is, and you will be able to tell whether it is homogenous or not.


The simplest test of homogeneity, and definition at the same time, not only for differential equations, is the following:

An equation is homogeneous if whenever $\varphi$ is a solution and $\lambda$ scalar, then $\lambda\varphi$ is a solution as well.