I am trying to find the area of a circle which is given by the polar parameterization $$r(\phi) = \cos\phi + \sin\phi.$$ I can evaluate it in 2 ways and don't know why I get different answers.
First way. Using geometry. This circle circumscribes a square with a side of length 1. So the diagonal of the square, due to Pifagor's theorem , equals to $\sqrt{2}$. Which means that the radius of the circle is $\frac{\text{diagonal}}{2}=\frac{\sqrt{2}}{2}$. So the area of the circle should be equal to $\pi/2$.
Second way. I use definite integral to find the area. As I was taught the area equals to $$\frac{1}{2}\int _0 ^{2\pi} r(\phi)^2 d\phi.$$ Using this formula I get that area equals $\pi$.
Please tell me where am I wrong. I am sure that the integral is solved correctly (checked it in wolfram).
P.S. I also attached the graph from Wolfram:
The issue is that your parameterization traces around the circle twice as $\phi$ varies over the interval $[0, 2 \pi]$ of integration. To see that it does so more than once, just observe that your integrand $$r(\phi)^2 = (\cos \phi + \sin \phi)^2$$ satisfies $$r(\phi + \pi) = r(\phi).$$ By that symmetry, (1) to compute the the area it's enough to integrate over any interval of length $\pi$, and (2) using your computation gives $$A = \int_0^{\pi} r(\phi)^2 d\phi = \frac{1}{2}\int_0^{\pi} r(\phi)^2 d\phi = \frac{\pi}{2},$$ which coincides with the result from your geometric argument.