Area of ellipse using double integral I am trying to find the area of a quadrant of an ellipse by double integrating polar coordinates but the answer I'm getting is incorrect. 
ellipse : $ x^2/a^2 + y^2/b^2 =1 $
Any point on ellipse : $ ( a\cos(\theta), b\sin(\theta)) $
At $ \theta$, taking $ d\theta $ segment, Thus $ r^2 = a^2\cos^2(\theta) + b^2\sin^2(\theta) $ [Using pythagoras theorem] 
$$ Area = \int_{0}^{\pi/2} \int_{0}^{\sqrt{a^2\cos^2(\theta) + b^2\sin^2(\theta)}} rdrd\theta $$
$$ = 1/2 \int_{0}^{\pi/2}  r^2  \Big|_{0}^{\sqrt{a^2\cos^2(\theta)+b^2\sin^2(\theta)}}  d\theta $$
$$ = 1/2 \int_{0}^{\pi/2} (a^2\cos^2(\theta)+b^2\sin^2(\theta))  d\theta $$
$$ = 1/2 \int_{0}^{\pi/2} ((a^2 - b^2)\cos^2(\theta)+b^2)  d\theta $$
$$ = 1/4 \int_{0}^{\pi/2} (a^2 - b^2)(1+ \cos(2\theta))  d\theta  +2b^2  d\theta $$
I am getting $$ \pi/8 (a^2 + b^2).$$ But the correct answer is $ \pi ab/4 $

The given ellipse is $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$.To transform it into polar coordinates,substitute $(x,y)=(r\cos\theta,r\sin\theta)$ to get $r=\dfrac{ab}{\sqrt{b^2\cos^2\theta + a^2\sin^2\theta}}$.
Take an elementary area $rdrd\theta$ inside the ellipse.
Then the area of the ellipse in the first quadrant is the sum of all such elementary areas 
$\displaystyle\int_{\theta=0}^{\frac{\pi}{2}}\int_{r=0}^{\dfrac{ab}{\sqrt{b^2\cos^2\theta + a^2\sin^2\theta}}}  r \,dr \, d\theta$
$=\dfrac12\displaystyle\int_{\theta=0}^{\frac{\pi}{2}}\dfrac{a^2b^2}{b^2\cos^2\theta + a^2\sin^2\theta} d\theta$
$=\dfrac12\displaystyle\int_{\theta=0}^{\frac{\pi}{2}}\dfrac{a^2b^2\sec^2\theta}{b^2+ a^2\tan^2\theta} d\theta$
$=\dfrac{b^2}{2}\displaystyle\int_{\theta=0}^{\frac{\pi}{2}}\dfrac{\sec^2\theta}{\dfrac{b^2}{a^2}+ \tan^2\theta} d\theta$
$=\left.\dfrac{b^2}{2}\dfrac{a}{b}\tan^{-1}\left(\dfrac{a\tan\theta}{b}\right)\right|_{0}^{\frac{\pi}{2}}$
$=\boxed{\boxed{\dfrac{\pi ab}{4}}}$
