Applications of integration: area under a curve

Example: Find the area underneath $f(x)=x+e^{-2x}$ between $x=-1$ and $x=2$.

\[{}\]

Example: Find the area underneath $f(x)=x+e^{-2x}$ between $x=-1$ and $x=2$.

Area of rectangles: Riemann sum \[{}\]

As $n \to \infty$, Riemann sum $\to$ integral: $$\int_{-1}^2 f(x) dx = \int_{-1}^2 (x+e^{-2x})dx$$

$\int(x+e^{-2x})dx$$= \int x\,dx - \frac{1}{2} \int (-2)e^{-2x}dx$
$= \frac{1}{2}x^2 - \frac{1}{2}e^{-2x}$ $=F(x)$
Area$\displaystyle= \int_{-1}^2 (x+e^{-2x})dx = F(x)\big|_{-1}^2$ $=\frac{1}{2}((2)^2 - e^{-2(2)})-\frac{1}{2}((-1)^2 - e^{-2(-1)})$
$= 5.185$

Example: calculate the area between $1/x$ and the $x$-axis for $x$ between $-2$ and $-1$.

$\displaystyle \int_{-2}^{-1} \frac{1}{x} dx$$\displaystyle= \ln(|x|)\big|_{-2}^{-1} = \ln(1)-\ln(2)$
$= 0 - 0.693 = -0.693$
Area $\displaystyle =\int_{-2}^{-1} \left|\frac{1}{x}\right| dx$ $\displaystyle= \int_{-2}^1 \frac{-1}{x} dx$
$= (-1)(-0.693)= 0.693$

Area between graph of $f(x)$ and $x$-axis for $x$ between $a$ and $b$ is: $$\int_a^b \left|f(x)\right| dx.$$

$\displaystyle \int_a^b f(x)dx$: “signed area” between $f(x)$ and $x$-axis.

Area above $x$-axis
minus area below $x$-axis.

What area does $\displaystyle\int_{-2}^1 (4x^3-16x) dx$ represent?

$\displaystyle\int_{-2}^1 (4x^3-16x) dx$$= \left[x^4 - 8x^2\right]_{-2}^1$
$= (1-8) - (16-32) = 9$
$\int_{-2}^0 (4x^3-16x) dx $$= \left[x^4 - 8x^2\right]_{-2}^0= 16$
$\int_{0}^1 (4x^3-16x) dx$$ = \left[x^4 - 8x^2\right]_{0}^1= -7$

Signed area:
$\displaystyle\int_{-2}^1 (4x^3-16x)dx = 16-7=9$

Actual area:
$\displaystyle\int_{-2}^1 |4x^3-16x| \,dx = 16+7=23$