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 required to prove that $\displaystyle \int_0^{2\pi} |x \cos(\theta)+y \sin(\theta)|\, d\theta= 4\sqrt{x^2+y^2}$, $\ x$ and $y$ are real.

I let $\sin\theta = \frac yz$, $\cos\theta=\frac xz$, where $z$ is supposedly complex. Then i managed to show that $x\cos\theta + y\sin\theta = z$, so i am left with integrating $|z|$ (which is the area of a circle?)

I am stuck here since the RHS of what i am supposed to prove, doesn't have pi inside.

Please advise, thanks!!

share|cite|improve this question
0 = theta! thanks! – PongYoPongYo Aug 20 '12 at 9:32
I edited in Latex and replaced $x$ by $z$ in the denominator of your $\cos\theta$ expression, is this right ? ($x/x$ looked suspicious...) – Raymond Manzoni Aug 20 '12 at 9:43
Hi Raymond, yes it is. Thank you so much! – PongYoPongYo Aug 20 '12 at 10:18
you are Welcome ! – Raymond Manzoni Aug 20 '12 at 11:11
Satisfied with an answer below? – Did Sep 19 '12 at 17:29

Since $x=r\cos\alpha$ and $y=r\sin\alpha$ for some $\alpha$ with $r=\sqrt{x^2+y^2}$, the integral is $$ r\int_0^{2\pi}|\cos(\theta-\alpha)|\mathrm d\theta=r\int_0^{2\pi}|\cos(\theta)|\mathrm d\theta=4r\int_0^{\pi/2}\cos(\theta)\mathrm d\theta=4r\,\left[\sin(\theta)\right]_0^{\pi/2}=4r. $$

share|cite|improve this answer

Note that $x$ and $y$ are fixed real numbers.

The way to do this is to set $x=r\sin\phi$, $y=r\cos\phi$ so that $x^2+y^2=r^2$ and $\phi = \arctan {\frac x y}$.

Then the integrand becomes $\left|r\sin (\theta + \phi)\right|$. The factor $r$ can be extracted, and since the integral is around the unit circle, you need double the integral for the interval over which $sin (\theta + \phi) \geq 0$.

share|cite|improve this answer

Put $x=r\cos t$ and $y=r\sin t=>r=\sqrt{x^2+y^2}$ and $t=tan^{-1}\frac{y}{x}$

$\displaystyle \int_0^{2\pi} |x \cos(\theta)+y \sin(\theta)|\, d\theta$

$=\sqrt{x^2+y^2}\displaystyle \int_0^{2\pi} | \cos(\theta -t)|\, d\theta$ assuming x,y are independent of $\theta$

Now $\cos x<0$ for $\frac{\pi}{2}<x<\frac{3\pi}{2}$ and $\cos x≥0$, elsewhere

As the given range is 0 to $2\pi$ and $\cos(2\pi s+x)=\cos x$ for integral s, we can safely break the definite integral into the 4 quadrants i.e.,

$\displaystyle \int_0^{2\pi} | \cos(\theta -t)|\, d\theta$

$=\displaystyle \int_t^{\frac{\pi}{2}+t} \cos(\theta -t)\, d\theta$

$+\displaystyle \int_{\frac{\pi}{2}+t}^{\pi+t} (-\cos(\theta -t))\, d\theta$

$+\displaystyle \int_{\pi+t}^{\frac{3\pi}{2}+t}(-\cos(\theta -t))\, d\theta$

$+\displaystyle \int_{\frac{3\pi}{2}+t}^{2\pi+t} \cos(\theta -t)\, d\theta$






$\displaystyle \int_0^{2\pi} |x \cos(\theta)+y \sin(\theta)|\, d\theta=4\sqrt{x^2+y^2}$

share|cite|improve this answer
Nice solution lab bhattacharjee....... – juantheron Dec 15 '13 at 7:12

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.