# Solve for x the equation (x - p)^(1/2) + (x - q)^(1/2) = p/(x - p)^(1/2) + q/(x - q)^(1/2) ?

Sep 12, 2016

$x = \frac{2}{3} \left(p + q \pm \sqrt{{p}^{2} - p q + {q}^{2}}\right)$

#### Explanation:

${\left(x - p\right)}^{\frac{1}{2}} + {\left(x - q\right)}^{\frac{1}{2}} = \frac{p}{x - p} ^ \left(\frac{1}{2}\right) + \frac{q}{x - q} ^ \left(\frac{1}{2}\right) =$
$p {\left(x - p\right)}^{\frac{1}{2}} / \left(x - p\right) + q {\left(x - q\right)}^{\frac{1}{2}} / \left(x - q\right)$ then

${\left(x - p\right)}^{\frac{1}{2}} \left(1 - \frac{p}{x - p}\right) = - {\left(x - q\right)}^{\frac{1}{2}} \left(1 - \frac{q}{x - q}\right)$ or

${\left(\frac{x - p}{x - q}\right)}^{\frac{1}{2}} = - \frac{1 - \frac{q}{x - q}}{1 - \frac{p}{x - p}} = - \frac{\left(x - p\right) \left(x - 2 q\right)}{\left(x - q\right) \left(x - 2 p\right)}$

squaring both sides

$\frac{x - p}{x - q} = \frac{{\left(x - p\right)}^{2} {\left(x - 2 q\right)}^{2}}{{\left(x - q\right)}^{2} {\left(x - 2 p\right)}^{2}}$

and finally

$\frac{x - q}{x - p} = {\left(x - 2 q\right)}^{2} / {\left(x - 2 p\right)}^{2}$

resulting in

$3 \left(q - p\right) {x}^{2} + 4 \left({p}^{2} - {q}^{2}\right) x + 4 \left(p {q}^{2} - {p}^{2} q\right) = 0$

Solving for $x$ we obtain

$x = \frac{2}{3} \left(p + q \pm \sqrt{{p}^{2} - p q + {q}^{2}}\right)$