Find the area between the following curves and their asymptotes. The curve is given by the polar equation  $ r = a( \sec \theta + \cos \theta) $
At $\theta = \pi /2, r$ goes to infinity, so asymptotes should be at $\theta = \pi /2$
To find the area I integrated $2$ $ \frac{a^{2}(\sec \theta + \cos \theta)^{2}}{2} $ ($= r^{2}/2  \times 2$, since curve is symmetric about $x$ axis) with respect to $\theta$ from $0$ to infinity and got infinity.  
But answer is given $5 \pi a^{2}/2$
Where did I go wrong$?$
 A: We are given the curve
$$ r = a( \sec \theta + \cos \theta) \tag{1}$$
but we are not given the asymptote. 
It is clearly a vertical asymptote of the form $x=$constant, but what is the constant?
So what is happening to $x=r\cos\theta$ as $\theta\to\frac{\pi}{2}$?
We can find this out by multiplying equation (1) by $\cos\theta$ to obtain
$$ r\cos\theta = a( 1 + \cos^2 \theta) $$
Since $\cos(\pi/2)=0$ we see that as $\theta\to\frac{\pi}{2}$, $r\cos\theta\to a$.
So the vertical asymptote of the curve is $x=a$.
In polar coordinates this is $r\cos\theta=a$
So $r=a\sec\theta$ is the polar equation of the asymptote of the function.
So the area between the function and its asymptote can be found by the following:
$$ \int_0^{\pi/2} a^2(\sec\theta+\cos\theta)^2-a^2\sec^2\theta\,d\theta $$
We shall see that $\dfrac{5\pi a^2}{2}$ is not the correct answer.

\begin{eqnarray}
  \int_0^{\pi/2} a^2(\sec\theta+\cos\theta)^2-a^2\sec^2\theta\,d\theta&=&
  a^2\int_0^{\pi/2}2+\cos^2\theta\,d\theta\\
  &=&a^2\int_0^{\pi/2}2+\frac{1+\cos2\theta}{2}\,d\theta\\
  &=&a^2\left[\frac{5}{2}\theta+\frac{1}{4}\sin(2\theta)\right]_0^{\pi/2}\\
  &=&\frac{5\pi a^2}{4}
  \end{eqnarray}

A: (1) calculating areas made by polar plots in polar coordinates is done with the help of a special integration formula.
(2) polar coordinates transformation (moving to another origin) is needed, because the area is not exactly measured from the origin like it's usually calculated as in the explanations. See this and this also.
Transform the polar equation ($-\frac{\pi}{2}<\theta < \frac{\pi}{2}$) $$r = a \cdot (\sec(\theta)+\cos(\theta)) $$ to the following equivalent parametric equation using $x=r \cdot \cos(\theta)$ and $y=r \cdot\sin(\theta)$ $$\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} r \cdot \cos(\theta) \\ r \cdot \sin(\theta) \end{bmatrix} = \begin{bmatrix} (a\cdot (\sec(\theta)+\cos(\theta)) ) \cdot \cos(\theta) \\ (a\cdot (\sec(\theta)+\cos(\theta))) \cdot \sin(\theta) \end{bmatrix} = a \cdot \begin{bmatrix} 1+\cos^2(\theta) \\ \tan(\theta)+\cos(\theta)\sin(\theta) \end{bmatrix}$$
Now move the $x$-koordinates of the points on the curve by an amount of $a$ to the left. When $\theta = 0$ or when you're on the $x$-axis, you want that point on the curve lying on the $x$-axis to be at $x = a$ and not at $x = 2a$. So, you subract an $a$ from all the $x$-koordinates or you take $x-a$. The shifted curve by $a$ to the left is:
$$\begin{bmatrix} x \\ y \end{bmatrix} = a \cdot \begin{bmatrix} \cos^2(\theta) \\ \tan(\theta)+\cos(\theta)\sin(\theta) \end{bmatrix}$$
We could directly calculate the area for this parametric curve (Notice the change of the variables $x$ and $y$ for our purposes. This is like rotating the coordinate system or exchanging the roles of $x$ and $y$, because this given formula in these notes calculates the area between the parametric curve and the $x$-axis and we want to calculate the are between the parametric curve and the $y$-axis):
$$   
\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} x(\theta)\frac{d y(\theta)}{d \theta} d\theta 
= 
a^2 \cdot \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\cos^2(\theta) \cos( 2 \theta)+\cos^2(\theta)\sec^2(\theta)  d\theta 
=
\frac{5a^2\pi}{4} 
$$
