Problem with polynomials Let $p,q \in \mathbb R$ and $m,n \in \mathbb N$.
Assume that 
$$
(x+1)^p(x-1)^q=(x+1)^m (x-1)^n \textrm{ for each } x >1.
$$
Is then $p=m$ and $q=n$?
 A: I don't understand the solutions using gcd, since these are not necessarily polynomials.
Here is the approach I would take: note that$(x+1)^{p-m}=(x-1)^{n-q}$, so we may assume that $m=n=0$.  Then the question is: if $(x+1)^p (x-1)^q = 1$ for $x>1$, must we have $p=q=0$?
We can rewrite this as $(\frac{x+1}{x-1})^p (x-1)^{p+q}=1$.  By letting $x$ approach $\infty$, the first term approaches $1$.  If $p+q<0$, the second term approaches $0$.  If $p+q>0$, the second term approaches $\infty$.  It follows that $p+q=0$.
So we have $(\frac{x+1}{x-1})^p=1$.  Plugging in, say, $x=2$, this can only hold if $p=0$.  We conclude that $p=q=0$.
A: Let us make this simple.
First set $x=2\gt 1$ so equality holds. This gives us $$3^p\cdot1=3^m\cdot 1$$ from which we deduce immediately that $p=m$.
Now cancel the $(x+1)$ term from each side, noting that it cannot be zero (the powers are the same), to give $$(x-1)^q=(x-1)^n$$
It follows easily that $q=n$, for example by taking $x=3$.
A: Suppose $q < n$ and $x \notin \{-1,1\}$. Divide both sides by $(x-1)^q$ to get
$(x+1)^p = (x+1)^m (x-1)^{n-q}$. Now take limits $x\to 1$ which gives a contradiction. Hence $q=n$. Similarly for $p$ and $m$.
