Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find the magnetic field due to an elliptic loop of wire. How to do integrals of the type $$\int_0^{2\pi} \frac{d\theta}{(a^2 \cos^2 \theta +b^2\sin^2\theta)^{3/2}}$$ Where a and b are the axes of the ellipse. From dimensional considerations in the problem, I have deduced that the value of the integral must be must reduced to $$\frac{ L}{(ab)^2}$$ where $L$ is the circumference of the ellipse. How do I show it.

OK. So now I know from wikipedia that the circumference of ellipse involves something called elliptic integrals, so thankfully, I wouldnt have to be looking for a closed form. But does this reduce to the elliptic integral? Or have I done something wrong?

share|cite|improve this question
It seems that you conjectured appropriately, though I also have no idea how to prove it... It's fairly interesting. – Sangchul Lee Apr 22 '11 at 16:19
added an answer how I came about conjecturing – samanwita Apr 30 '11 at 22:52
up vote 10 down vote accepted

Wow, this really worked out incredibly nicely!

The elliptic integral which gives $L$ is $$ \frac{L}{4} = J(a,b) := \int_0^{\pi/2} \sqrt{a^2 \cos^2 \theta + b^2 \sin^2 \theta} \, d\theta $$ and it is clearly symmetric, $J(a,b)=J(b,a)$. The change of variables $t=b \tan\theta$ gives $$ \sqrt{a^2 \cos^2 \theta + b^2 \sin^2 \theta} = \cos \theta \, \sqrt{a^2 + t^2}, \qquad \cos \theta = \frac{b}{\sqrt{b^2 + t^2}}, \qquad d\theta = \frac{b}{b^2 + t^2} \, dt;$$ thus $$ J(a,b) = \int_0^\infty \frac{b^2 \, \sqrt{a^2 + t^2}}{(b^2 + t^2)^{3/2}} \, dt. $$ Applying the same change of variables to $1/4$ of your integral (that is, with integration from $0$ to $\pi/2$ instead of to $2\pi$) results in $$ \frac{1}{b^2} \int_0^\infty \frac{\sqrt{b^2 + t^2}}{(a^2 + t^2)^{3/2}} \, dt, $$ which, from comparison with the above, clearly equals $J(b,a)/(ab)^2$. Using the symmetry of $J$, and multiplying by 4, we conclude that your integral indeed equals $L/(ab)^2$.

share|cite|improve this answer

(I assume that $a > b$ in this answer.)

Hans's answer covers the OP's needs, but I'll try out the pedestrian approach here.

First, a trivial simplification:

$$\int_0^{2\pi} \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}=\int_0^\pi \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}+\int_\pi^{2\pi} \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}$$

$$=\int_0^\pi \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}+\int_0^{\pi} \frac{\mathrm d\theta}{(a^2 \cos^2(\theta+\pi)+b^2\sin^2(\theta+\pi))^{3/2}}$$

$$=2\int_0^\pi \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}$$

Another simplification can be done as follows:

$$=2\int_{-\pi/2}^{\pi/2} \frac{\mathrm d\theta}{(a^2 \cos^2(\theta+\pi/2)+b^2\sin^2(\theta+\pi/2))^{3/2}}$$

$$=2\int_{-\pi/2}^{\pi/2} \frac{\mathrm d\theta}{(a^2 \sin^2\theta +b^2\cos^2\theta)^{3/2}}$$

or, since the integrand is an even function,

$$=4\int_{-\pi/2}^0 \frac{\mathrm d\theta}{(a^2 \sin^2\theta +b^2\cos^2\theta)^{3/2}}$$

$$=4\int_0^{\pi/2} \frac{\mathrm d\theta}{(a^2 \cos^2\theta +b^2\sin^2\theta)^{3/2}}$$

Now, to get the integral into something recognizable, we use the Pythagorean identity and then try to factor out constants, like so:

$$=4\int_0^{\pi/2} \frac{\mathrm d\theta}{(a^2(1-\sin^2\theta)+b^2\sin^2\theta)^{3/2}}$$

$$=4\int_0^{\pi/2} \frac{\mathrm d\theta}{(a^2-(a^2-b^2)\sin^2\theta)^{3/2}}$$

$$=\frac4{a^3}\int_0^{\pi/2} \frac{\mathrm d\theta}{(1-m\sin^2\theta)^{3/2}}$$

where we let $m=1-\frac{b^2}{a^2}$, and then introduce the substitution $\theta=\mathrm{am}(u|m)$, $\mathrm d\theta=\mathrm{dn}(u|m)\mathrm du$ (where $\mathrm{am}(u|m)$ is the Jacobian amplitude and $\mathrm{dn}(u|m)$ is a Jacobian elliptic function):

$$=\frac4{a^3}\int_0^{K(m)} \frac{\mathrm{dn}(u|m)\mathrm du}{(1-m\mathrm{sn}^2(u|m))^{3/2}}$$

(since $\sin(\mathrm{am}(u|m))=\mathrm{sn}(u|m)$). Using the identity $\mathrm{dn}^2(u|m)+m\mathrm{sn}^2(u|m)=1$, the integral turns into

$$=\frac4{a^3}\int_0^{K(m)} \frac{\mathrm du}{\mathrm{dn}^2(u|m)}=\frac4{a^3}\int_0^{K(m)} \mathrm{nd}^2(u|m)\mathrm du$$

Using formula 22.16.20 in the DLMF, the integral evaluates to


where $E(m)$ is the complete elliptic integral of the second kind, and since $L=4aE\left(1-\frac{b^2}{a^2}\right)$, your supposition is correct.

share|cite|improve this answer

As a last post before leaving, I think I should add some comment on how I guessed the correct form of the integral. Basically, my motivation was to find the Magnetic field at the center of an elliptic loop, so I use physics notation and apologies for all the non-rigorous trivialities.

Using polar coordinates for the ellipse: $$r(\theta) = \frac{ab}{\sqrt{a^2\sin^2\theta+b^2\cos^2\theta}}$$ The actual integral I needed to evaluate was $$\frac{\mu_0 I }{4\pi}\oint \frac{\vec{dl}\times\hat{r}}{r^2}$$ (Notation:$\vec{dl}$ is a "small" vector following the elliptic loop. $r,\hat{r},\vec{r}$ are magnitude, direction, and vectors from the origin to $\vec{dl}$)

Using the fact that $$d\theta = \frac{|\vec{dl}\times\hat{r}|}{r}$$ I get $$\frac{\mu_0 I\hat{k} }{4\pi ab}\int_0^{2\pi}\sqrt{a^2\sin^2\theta+b^2\cos^2\theta}d\theta$$ (EDIT: A look at the integrand immediately tells you that this is the circumference of an ellipse with semidiameters $a$ and $b$. What follows is formal.)

Now let $$1-\frac{b^2}{a^2} = k^2$$ we have $$\frac{\mu_0I\hat{k}}{\pi b}\int_0^{\pi/2}\sqrt{1-k^2 \sin^2\theta}d\theta$$ $$=\frac{\mu_0 I L}{4A}$$ L is circumference and A is area.

So it is clear that its much simple in polar form, but I had tried to do it in the cartesian form initially so I was struggling to show how the two were equivalent. In a larger context, there might be something connecting the two integrals, but I'll leave that to others.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.