Calculus/Area

Introduction
Finding the area between two curves, usually given by two explicit functions, is often useful in calculus.

In general the rule for finding the area between two curves is

$$A=A_{\rm top}-A_{\rm bottom}$$ or

If f(x) is the upper function and g(x) is the lower function

$$A=\int\limits_a^b \bigl(f(x)-g(x)\bigr)dx$$

This is true whether the functions are in the first quadrant or not.

Area between two curves
Suppose we are given two functions $$y_1=f(x)$$ and $$y_2=g(x)$$ and we want to find the area between them on the interval $$[a,b]$$. Also assume that $$f(x)\ge g(x)$$ for all $$x$$ on the interval $$[a,b]$$. Begin by partitioning the interval $$[a,b]$$ into $$n$$ equal subintervals each having a length of $$\Delta x=\frac{b-a}{n}$$. Next choose any point in each subinterval, $$x_i^*$$. Now we can 'create' rectangles on each interval. At the point $$x_i*$$, the height of each rectangle is $$f(x_i^*)-g(x_i^*)$$ and the width is $$\Delta x$$. Thus the area of each rectangle is $$\bigl[f(x_i^*)-g(x_i^*)\bigr]\Delta x$$. An approximation of the area, $$A$$, between the two curves is
 * $$A:=\sum_{i=1}^n \Big[f(x_i^*)-g(x_i^*)\Big]\Delta x$$.

Now we take the limit as $$n$$ approaches infinity and get
 * $$A=\lim_{n\to\infty}\sum_{i=1}^n \Big[f(x_i^*)-g(x_i^*)\Big]\Delta x$$

which gives the exact area. Recalling the definition of the definite integral we notice that
 * $$A=\int\limits_a^b \bigl(f(x)-g(x)\bigr)dx$$.

This formula of finding the area between two curves is sometimes known as applying integration with respect to the x-axis since the rectangles used to approximate the area have their bases lying parallel to the x-axis. It will be most useful when the two functions are of the form $$y_1=f(x)$$ and $$y_2=g(x)$$. Sometimes however, one may find it simpler to integrate with respect to the y-axis. This occurs when integrating with respect to the x-axis would result in more than one integral to be evaluated. These functions take the form $$x_1=f(y)$$ and $$x_2=g(y)$$ on the interval $$[c,d]$$. Note that $$[c,d]$$ are values of $$y$$. The derivation of this case is completely identical. Similar to before, we will assume that $$f(y)\ge g(y)$$ for all $$y$$ on $$[c,d]$$. Now, as before we can divide the interval into $$n$$ subintervals and create rectangles to approximate the area between $$f(y)$$ and $$g(y)$$. It may be useful to picture each rectangle having their 'width', $$\Delta y$$, parallel to the y-axis and 'height', $$f(y_i^*)-g(y_i^*)$$ at the point $$y_i^*$$, parallel to the x-axis. Following from the work above we may reason that an approximation of the area, $$A$$, between the two curves is
 * $$A:=\sum_{i=1}^n \Big[f(y_i^*)-g(y_i^*)\Big]\Delta y$$.

As before, we take the limit as $$n$$ approaches infinity to arrive at
 * $$A=\lim_{n\to\infty}\sum_{i=1}^n \Big[f(y_i^*)-g(y_i^*)\Big]\Delta y$$ ,

which is nothing more than a definite integral, so
 * $$A=\int\limits_c^d \bigl(f(y)-g(y)\bigr)dy$$.

Regardless of the form of the functions, we basically use the same formula.