TITLE: How to find the area of a region bounded by a simple closed curve?
QUESTION [7 upvotes]: I have the following equation:
$$
\frac{p}{(a-x)^2+y^2}+\frac{1-p}{(b-x)^2+y^2}=1 \text{ where } 0\leq p\leq 1
$$
Which represent a simple close curve. Obviously, when $p=0,p=1$ or $a=b$ we recover a unit circle. However the shape of the curve is more interesting in the other cases. Here is an example for $p=0.2$, $a=1$ and $b=0$:

The area inside the curve is supposed to represent an uniform distribution, thus I suspect the area to be equal to one (unless I did a mistake!). However I don't know how to compute it. My attempt was to shift to polar coordinates and compute a double integral. However I have trouble determining the boundaries of these integrals.
Any hints or general advice are appreciated !

REPLY [4 votes]: By clearing denominators, we see that our curve is a quartic $p(x, y) = 0$. For generic values of $p, a, b$, it is elliptic and so does not admit a rational parameterization. Probably the areas can be computed in terms of elliptic functions.
In the special case $p = \frac{1}{2}$, the curve is symmetric not only about the $x$-axis but also the line $x = \frac{1}{2}(a + b)$, and by translating our coordinate system we may as well assume $b = -a$, $a > 0$. The curve then can be written in the simple form
$$x^4 + 2 x^2 y^2 + y^4 - (2 a^2 + 1) x^2 + (2 a^2 - 1) y^2 + a^2 (a^2 - 1) = 0 .$$
This is a biquadratic in, say, $y$, so we can solve for $y$ in terms of $x$ using two square root extractions:
$$y = \pm F(x), \qquad F(x) := \frac{1}{2} \sqrt{2 - 4 (a^2 + x^2) + 2 \sqrt{16 a^2 x^2 + 1}} ,$$
and using the fourfold symmetry of the curve we find that the area it encloses is
$$4 \int_{x_0}^{x_1} F(x) \,dx .$$
If $b > 1$ then $F$ has two positive roots, and we set $x_0$ to be the smaller root and $x_1$ the larger. If $0 \leq b \leq 1$ then $F$ has one positive root, and we take $x_1$ to be that root and take $x_0 = 0$.
Substituting $x = \frac{t}{2 a (1 - t^2)}$ gives an integrand without a nested radical:
$$\int_{t_0}^{t_1} \frac{(t^2 + 1) \sqrt{-4 a^4 t^4 + (8 a^4 - 4 a^2 - 1) t^2 + 4 a^2 (1 - a^2)} \, dt}{(1 - t^2)^3} .$$
(NB if $x_0 = 0$ then $t_0 = 0$.) Generically the occurrence of the square root of quartic polynomial in an algebraic expression means that, at best, explicitly writing its antiderivative generically requires the use of elliptic functions, and trying a few parameter values for $a$ confirms this.
If the quartic has a multiple root, however, we can pull an even number of factors out of the radical, leaving at worst the square root of quadratic polynomial, and such integrals can often be evaluated using elementary techniques. The discriminant of the quartic is a constant multiple of $(8 a^2 + 1)^2 a^6 (a^2 - 1)$, so the only positive value of $a$ for which it has a multiple root is $a = 1$. For this parameter value the curve has genus $0$ and has a self-intersection at the origin, and the integral simplifies to
$$\int_0^{\sqrt{3} / 2} \frac{(t^2 + 1) t \sqrt{3 - 4 t^2} \,dt}{(1 - t^2)^3} = \frac{2}{3} \pi + \sqrt{3} .$$
To illustrate how complicated the explicit expressions can be even for the case $p = \frac{1}{2}, b = -a$ for nonspecial values of $a$, Maple returns for $a = 2$ that the area is
$${\frac {\left[6 \sqrt {2} \left( (136 + 8 \sqrt {
3}\sqrt {11} )\,\Pi \left( 1,2\,{\frac {
\sqrt {3}\sqrt {11}}{111+\sqrt {3}\sqrt {11}}}, \omega \right) - (135 + 9\,\sqrt {3}\sqrt {11})K \left( \omega
 \right) +32\,\Pi \left( 1,2\,{\frac {\sqrt {3}\sqrt {11}
}{\sqrt {3}\sqrt {11}+15}}, \omega \right) \right) \right] }
{\sqrt {111+\sqrt {3}\sqrt {11}} \left( \sqrt {3}\sqrt {11}+15
 \right) }},$$
where $K$ is the complete elliptic integral of the first kind, $\Pi$ is the incomplete elliptic integral of the third kind (but NB Maple's convention for these functions is different from Wikipedia's), and $\omega := {\frac {\sqrt {2}\sqrt [4]{3}\sqrt [4]{11}}{\sqrt {111+\sqrt {3}\sqrt {11}}}}$.
Numerically integrating, by the way, we find that the area of the interior of the example curve with parameters $a = 1, b = 0, p = \frac{1}{5}$ is $3.56910\ldots$, not $1$ as intended.