The degree of a differential equation is the power of the highest order derivative in the equation. . So basically to be able to get the degree of a differential equation, we need only the derivatives and their exponents to be part of the differential equation, that is like a polynomial in derivatives. The degree will not be defined if the highest order derivative is not raised to an exponent but is part of some other function for example:
log(y'') + y' +y = sin x . Here y'' is part of log function so no degree can be assigned to it.