Q:

Question about a rational expression that I'd like to be zero

I have the following equation, where the $c_i$ are constants:
$$\left(c_0+c_1x+c_2\frac{af+g}{h}+c_3a\right)\left(c_4+c_5\frac{af+g}{h}+c_6a\right)=0$$
I'd hope to prove that either the coefficients must all equal zero, or, alternatively, $f$ is a constant times $h$. Here $x$ is a variable, $a$ is a variable and $f,g,h$ are polynomials in $x$ and a bunch of unknown variables, but NOT $a$.
What I've done... This can be written as a second degree polynomial in $a$. Since the polynomial must be constant valued, we know that all the coefficients must equal zero. In particular, this means that the coefficient of $a^2$, gives
$$\frac{c_3c_7h^2+c_2c_5f^2+c_3c_5fh+c_2c_6fh}{h^2}=0\Rightarrow c_3c_7h^2+c_2c_5f^2+c_3c_5fh+c_2c_6fh=0.$$
I'm not sure what I can do to say anything about this expression. The problem is that both $f$ and $h$ are polynomials in the same set of variables that I don't know about. Therefore, I can't really use the coefficient extraction trick.

A:

I suppose that your base field is $\mathbb{R}$ and that your independant  variables are $x,a, y_1,\cdots,y_m$. Now your equality is equivalent to :
$$(h(c_0+c_1x)+c_2(af+g)+c_3ah)(c_4h+c_5(af+g)+c_6ah)=0$$
This is an equality of the form $P(x,a,y_1,\cdots, y_m)Q(x,a,y_1,\cdots, y_m)=0$, with $P,Q$ polynomials in $x,a,y_k$. But the ring $\mathbb{R}[x,a,y_1,\cdots,y_m]$ is an integral domain; hence we have $P=0$ or $Q=0$. If $P=0$ (same procedure for the case $Q=0$), we get $h(c_0+c_1x)+c_2g+(c_2f+c_3h)a=0$. As $f,g,h$ are not polynomials in $a$, this imply $h(c_0+c_1x)+c_2g=c_2f+c_3h=0$. If $c_2\not =0$, we get that $f$ is a constant times $h$. If $c_2=0$ (and as $h\not =0$), we get $c_3=0$, and $c_0+c_1x=0$, hence $c_0=c_1=0$. 

