How to tell if a differential equation is homogeneous, or inhomogeneous? Sometimes it arrives to me that I try to solve a linear differential equation for a long time and in the end it turn out that it is not homogeneous in the first place. 

Is there a way to see directly that a differential equation is not homogeneous? 

Please, do tell me.
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&#39;&#39;\sin x+y\cos x=y&#39;$ is homogenous, but $y&#39;&#39;\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.
Any function like y and its derivatives are found in the DE then this equation is homgenous 

ex.  y"+5y´+6y=0 is a homgenous DE equation 

But   y"+xy+x´=0 is a non homogenous equation becouse of the X funtion is not a function in Y or in its derivatives