How to prove that the equation is not possible I came across another very complex equation (calculating the Gaussian curvature of a surface):
\begin{align*}\frac{-m}{2}=&(2A^2+A)(Du+k)^3u^{(3+6A+4B)}\\
&+AD(Du+k)^2u^{(6A+4B+4)}\\ &+(2ABD+4DB)u^{(6A+4B+6)}(Du+k)^{(2B+3)}\\ &+(2B^2D^2+BD^2)u^{(6A+4B+7)}(Du+k)^{(2B+2)}\end{align*}
where $A$, $B$, $D$, $k$ and $m$ are constants, the only variable is $u$.
Note that $D$ can not be zero and can not be $-1$, $A$, $B$, $m$ and $k$ can not be zero.
How can I prove that equality is not valid? i.e. that the right term cannot be a constant?
My question is related at this
How to calculate this Differential Form
 A: Original answer:
Note that the rhs is a polynomial, assuming $A$ and $B$ are nonnegative integers, which I suppose is unspecified. If we wanted to show that this equality cannot hold for functions of $u$, it suffices to show that the leading coefficient of $u$ on the right hand side is nonzero. 
Thus let's compute the leading coefficient. The degree of the highest power of $u$ is $6A+6B+9$, so we'll consider the coefficients of these terms.
It comes out to be $(2ABD+4DB)D^{2B+3}+(2B^2D^2+BD^2)D^{2B+2}$.
Since $D$ is nonzero, we can divide this by $D^{2B+4}$ without affecting whether or not this is zero, to get the simpler expression
$$2AB+4B+2B^2+B=(2A+2B+5)B,$$
and since $B$ is nonzero, this is nonzero if and only if $2A+2B+5$ is.
Since I've assumed $A$ and $B$ are nonnegative anyway, $2A+2B+5 \ge 5 > 0$, so the leading coefficient is nonzero, so the equality fails to hold.
Addressing the comments
The OP has clarified that $A$ and $B$ are not necessarily either integers or positive. That said, a similar approach remains valid, but we must do casework on the signs of $A$ and $B$. Actually, note that the sign of $A$ is irrelevant, since we can factor a $u^{6A}$ out of the entire rhs and what remains doesn't have exponents that depend on $A$.
If $B\ge 0$, and $2A+2B+3\ne 0$ then since the highest exponent on $u$ is $6A+6B+9\ne 0$, we can divide both sides of the equation by $u^{6A+6B+9}$ and take the limit as $u$ goes to infinity to get that if the equality held, we must have
$$\lim_{u\to\infty} \frac{-mu^{6A+6B+9}}{2}=(2ABD+4DB)D^{2B+3}+(2B^2D^2+BD^2)D^{2B+2},$$ as before.
If $2A+2B+3 < 0$, the left hand limit is $\infty$, so the equation is never satisfied.
On the other hand, if $2A+2B+3 > 0$, the left hand limit is $0$, so we get
$2A+2B+5=0$ again, but $2A+2B+5 > 2A+2B+3 > 0$, so this is never satisfied either.
For this case it remains to address what happens when $2A+2B+3=0$, but I'll neglect this more specific case for now.
Incomplete I'll have to think about the other case, when $B\le 0$ later.
