De-rationalisation of a surd expression $\sqrt p - \sqrt {pq} + q$ Consider two dissimilar surds $\sqrt p$ and $\sqrt q$. Then the problem asks to find rational numbers $a,b,c$ and $d$ such that for $x=\sqrt p + \sqrt q$ we can write,
$$
\sqrt p - \sqrt {pq} + q = \frac {ax+b}{cx+d}
$$
Initially, my attempt was straightforward rationalisation:
$$
\frac {ax+b}{cx+d}=\frac {a(\sqrt p + \sqrt q)+b}{c(\sqrt p + \sqrt q)+d}
$$
$$
=\frac {(ad-bc)\sqrt p + (ad+bc)\sqrt q + \{ac(q-p)+bd\}}{2cd\sqrt q + \{c^2(q-p)+d^2\}}
$$
$$
=\frac {A\sqrt p +B\sqrt q + C}{D\sqrt q +E}
$$
$$
=\frac {-AE\sqrt p-BE\sqrt q+AD\sqrt {pq}+(BDq-CE)}{D^2q-E^2}
$$
Now it appears quite easy to equate the coefficients of surds in the LHS and the RHS, put in the values of the reduced constants $A,B,C,D$ and $E$ so as to get 4 equations in 4 variables $a,b,c$ and $d$ and finally solve them. Trust me, this is an absolutely ridiculous idea. Is there any other way to solve this problem, perhaps a simpler shortcut? Any help would be appreciated.
 A: I may have made a mistake, because I find that it is generally not possible. But I'll write what I have, and then hopefully someone can correct it.
Since $\sqrt p$ and $\sqrt q$ are dissimilar, any number of the form $k_1 + k_2\sqrt p + k_3 \sqrt q + k_4\sqrt{pq}$, where $k_i\in\mathbb Q$, is uniquely determined by the coefficients $k_i$. Using this we see that $c=0$ is impossible, so we can assume without loss of generality that $c=1$ (by dividing through). 
Going on Berci's suggestion in the comment, we get:
$$
a\sqrt p + a\sqrt q + b
= (\sqrt p -\sqrt {pq} + q)(\sqrt p + \sqrt q + d)
$$
$$
= d\sqrt p + (q-p)\sqrt q + (1-d)\sqrt{pq} + (p+qd)
$$
We get that $1-d=0$, so $d=1$. But then we get $q-p=a=d=1$, so we only have a solution in the special case $q=p+1$. In this case the solution is
$$
\frac{x+(p+q)}{x+1} = \frac{x+(2p+1)}{x+1}
$$
So, what do you guys think? I hope I haven't simply made an arithmetic error. But since we get four equations in three variables, it seems reasonable that we don't get a solution in general. 
