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 figure out how a formula I am looking at was derived. Given a 2-D function $f(x,y)$ that has a constant value of $\rho$ within an ellipse given by

$$ \frac {x^2} {A^2} + \frac {y^2} {B^2} = 1,$$

and is zero outside of this ellipse, the projection of $f(x,y)$ along the line defined by $\delta ( x \cos \theta + y \sin \theta - t )$ is such and such.

Can someone help me set this up? I can find plenty of material on the web about integrating along line segments; however, when I go to calculate the endpoints of of the line segment, the results are way too messy and complicated to be the "correct" way.

Apparently, the answer is

$$\frac {2 \rho A B} {a^2 (\theta) } \sqrt { a^2 (\theta) - t^2 }$$


$$a^2 (\theta) = A^2 \cos^2 \theta + B^2 \sin^2 \theta$$

for $|t| \leq a(\theta)$.

share|cite|improve this question

I'm assuming that by "the projection of $f(x,y)$ along the line", you mean

$$\iint \delta(x\cos\theta+y\sin\theta-t)f(x,y)\mathrm{d}x\mathrm{d}y\;.$$

The trick is to transform to coordinates where the ellipse becomes a circle. Any circle would do, but the calculation is easiest and most symmetric using the unit circle, i.e. $x=Ax'$ and $y=By'$:

$$ \begin{eqnarray} && \iint \delta(x\cos\theta+y\sin\theta-t)f(x,y)\mathrm{d}x\mathrm{d}y\\ &=& AB \iint \delta(x'A\cos\theta+y'B\sin\theta-t)f(x,y)\mathrm{d}x'\mathrm{d}y' \\ &=& \frac{AB}{a(\theta)} \iint \delta\left(\frac{x'A\cos\theta}{a(\theta)}+\frac{y'B\sin\theta}{a(\theta)}-\frac{t}{a(\theta)}\right)f(x,y)\mathrm{d}x'\mathrm{d}y'\;, \end{eqnarray} $$

where I've used $a(\theta)$ as you defined it and the identity $\delta(x)=\lambda\delta(\lambda x)$.

Now this transformed integral describes exactly the same kind of problem, but with a line through the unit circle, since the coefficients of $x$ and $y$ are normalized such that their squares add to $1$, so that we can regard them as the cosine and sine, respectively, of some angle. We don't need to know that angle, though, since the length of the chord of a line intersecting the circle is independent of that angle and is determined entirely by its distance from the origin, which in this case is $t/a(\theta)$. By Pythagoras, the length of the chord at distance $s$ from the origin in the unit circle is $2\sqrt{1-s^2}$ for $\lvert s\rvert \le1$, so, taking into account that $f=\rho$ along the line, we get

$$\rho\frac{AB}{a(\theta)}2\sqrt{1-\left(\frac{t}{a(\theta)}\right)^2}=\frac {2 \rho A B} {a^2 (\theta) } \sqrt { a^2 (\theta) - t^2 } \;\;\mathrm{for}\;\; \lvert t \rvert \le a(\theta)\;,$$

as expected.

share|cite|improve this answer

Your Answer


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