forked from APEXCalculus/APEXCalculus_Source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07_Area_Between_Curves.tex
366 lines (340 loc) · 22.7 KB
/
07_Area_Between_Curves.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
\section{Area Between Curves}\label{sec:ABC}
We are often interested in knowing the area of a region. Forget momentarily that we addressed this already in \autoref{sec:FTC} and approach it instead using the technique described in \autoref{idea:app_of_defint}.
\bgroup % leaving newcommand in the mtable causes errors
\newcommand{\f}[1]{.25*sin(deg(2*#1))+1.25}
\newcommand{\g}[1]{.25*(#1-2)^2+.2}
\mtable[-3in]{Subdividing a region into vertical slices and approximating the areas with rectangles.}{fig:abcintro}{\small%
\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick=\empty,
extra x ticks={.5,3},extra x tick labels={$a$,$b$},ytick=\empty,
ymin=-.2,ymax=2,xmin=-.5,xmax=3.5]
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=.5:3]
{.25*sin(deg(2*x))+1.25}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=.5:3]
{.25*(x-2)^2+.2}\closedcycle;
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {.25*sin(deg(2*x))+1.25} node [shift={(5pt,7pt)} ,black] {\scriptsize $f(x)$};
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {.25*(x-2)^2+.2}node [shift={(5pt,7pt)} ,black] {\scriptsize $g(x)$};
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}
\\ (a)
\\
\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick=\empty,
extra x ticks={.5,3},extra x tick labels={$a$,$b$},ytick=\empty,
ymin=-.2,ymax=2,xmin=-.5,xmax=3.5]
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=.5:3]
{.25*sin(deg(2*x))+1.25}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=.5:3]
{.25*(x-2)^2+.2}\closedcycle;
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {.25*sin(deg(2*x))+1.25} node [shift={(5pt,7pt)} ,black] {\scriptsize $f(x)$};
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {.25*(x-2)^2+.2}node [shift={(5pt,7pt)} ,black] {\scriptsize $g(x)$};
\foreach\x in{.5,.75,...,3} {
\edef\temp{\noexpand\draw[thick]
(axis cs:\x,{.25*(\x-2)^2+.2})--(axis cs:\x,{.25*sin(deg(2*\x))+1.25});}\temp
}
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}
\\(b)
\\
\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick=\empty,
extra x ticks={.5,3},extra x tick labels={$a$,$b$},ytick=\empty,
ymin=-.2,ymax=2,xmin=-.5,xmax=3.5]
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=.5:3]
{\f{x}}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=.5:3]
{\g{x}}\closedcycle;
% {.25*(x-2)^2+.2}\closedcycle;
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {\f{x}} node [shift={(5pt,7pt)} ,black] {\scriptsize $f(x)$};
\addplot [smooth,thick, draw={\colorone},domain=-.25:3.25] {\g{x}}node [shift={(5pt,7pt)} ,black] {\scriptsize $g(x)$};
\foreach\x in{.5,.75,...,2.75} {
\edef\c{(\x+.25*(1+sin(deg(3*\x)))/2)}
\edef\temp{
\noexpand\draw[thick](axis cs:\x,{\f{\c}})rectangle(axis cs:{\x+.25},{\g{\c}});
\noexpand\filldraw(axis cs:{\c},{\f{\c}})circle(1.3pt);
\noexpand\filldraw(axis cs:{\c},{\g{\c}})circle(1.3pt);
}\temp
}
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}
\\ (c)
}
\egroup
Let $Q$ be the area of a region bounded by continuous functions $f$ and $g$. If we break the region into many subregions, we have an obvious equation:
\begin{center}
Total Area = sum of the areas of the subregions.
\end{center}
The issue to address next is how to systematically break a region into subregions. A graph will help. Consider \autoref{fig:abcintro} (a) where a region between two curves is shaded. While there are many ways to break this into subregions, one particularly efficient way is to ``slice'' it vertically, as shown in \autoref{fig:abcintro} (b), into $n$ equally spaced slices.
We now approximate the area of a slice. Again, we have many options, but using a rectangle seems simplest. Picking any $x$-value $c_i$ in the $i^\text{ th}$ slice, we set the height of the rectangle to be $f(c_i)-g(c_i)$, the difference of the corresponding $y$-values. The width of the rectangle is a small difference in $x$-values, which we represent with $\Delta x$. \autoref{fig:abcintro} (c) shows sample points $c_i$ chosen in each subinterval and appropriate rectangles drawn.
%(Each of these rectangles represents a differential element.)
Each slice has an area approximately equal to $\bigl(f(c_i)-g(c_i)\bigr)\Delta x$; hence, the total area is approximately the Riemann Sum\vspace{-.5\baselineskip}
\[Q \approx \sum_{i=1}^n \bigl(f(c_i)-g(c_i)\bigr)\Delta x.\]
Taking the limit as $n\to \infty$ gives the exact area as $\int_a^b \bigl(f(x)-g(x)\bigr)\dd x.$
\begin{theorem}[Area Between Curves]\label{thm:areabetweencurves}
Let $f(x)$ and $g(x)$ be continuous functions defined on $[a,b]$ where $f(x)\geq g(x)$ for all $x$ in $[a,b]$. The area of the region bounded by the curves $y=f(x)$, $y=g(x)$ and the lines $x=a$ and $x=b$ is \index{integration!area between curves}
\[\int_a^b \bigl(f(x)-g(x)\bigr)\dd x.\]
\end{theorem}
Often, we do not know which function is greater (or they switch within the domain of integration). If so, we can say that the area is $\int_a^b\abs{f(x)-g(x)}\dd x$, which may involve dividing the domain of integration into pieces.
\youtubeVideo{DRFyNHdVgUA}{Finding Areas Between Curves}
\begin{example}[Finding area enclosed by curves]\label{ex_abc1}
Find the area of the region bounded by $f(x) = \sin x+2$, $g(x) = \frac12\cos (2x)-1$, $x=0$ and $x=4\pi$, as shown in \autoref{fig:abc1}.
\solution
\mtable{Graphing an enclosed region in \autoref{ex_abc1}.}{fig:abc1}{\begin{tikzpicture}
\begin{axis}[width=\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,extra x ticks={12.57},
extra x tick labels={$4\pi$},ymin=-2,ymax=3.5,xmin=-.5,xmax=13.5]
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=0:4*pi]
{.5*cos(deg(2*x))-1.2}\closedcycle;
\addplot [smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=0:4*pi]
{sin(deg(x))+2} \closedcycle;
\addplot [smooth,thick, draw={\colorone},domain=0:4*pi,samples=40]
{sin(deg(x))+2} node [shift={(-15pt,7pt)} ,black] {\scriptsize $f(x)$};
\addplot [smooth,thick, draw={\colorone},domain=0:4*pi,samples=40]
{.5*cos(deg(2*x))-1.2}node [shift={(-25pt,-16pt)} ,black] {\scriptsize $g(x)$};
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
%
The graph verifies that the upper boundary of the region is given by $f$ and the lower bound is given by $g$. Therefore the area of the region is the value of the integral
\begin{align*}
\int_0^{4\pi} \bigl(f(x)- g(x)\bigr)\dd x
& = \int_0^{4\pi} \Bigl(\sin x+2 - \bigl(\frac12\cos (2x)-1\bigr)\Bigr)\dd x \\
&= -\cos x -\frac14\sin(2x)+3x\Big|_0^{4\pi}\\
&= 12\pi %\approx 37.7
\ \text{units}^2.
\end{align*}
\end{example}
% originally in FTC section
\begin{example}[Finding area between curves]\label{ex_ftc6}
Find the area of the region enclosed by $y=x^2+x-5$ and $y=3x-2$.
\solution
It will help to sketch these two functions, as done in \autoref{fig:ftc6}.
\mtable{Sketching the region enclosed by $y=x^2+x-5$ and $y=3x-2$ in \autoref{ex_ftc6}.}{fig:ftc6}{\begin{tikzpicture}
\begin{axis}[width=\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick={-2,-1,1,2,3,4},
ytick={5,10,15},ymin=-10,ymax=16,xmin=-2.5,xmax=4.5]
\addplot [smooth,thick, draw={\colorone},domain=-2:4] {x^2+x-5};
\draw (axis cs: 2.5,15) node [black] {\scriptsize $y=x^2+x-5$};
\addplot [smooth,thick, draw={\colorone},domain=-2:4] {3*x-2};
\draw (axis cs: -1.5,-9) node [black] {\scriptsize $y=3x-2$};
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
The region whose area we seek is completely bounded by these two functions; they seem to intersect at $x=-1$ and $x=3$. To check, set $x^2+x-5=3x-2$ and solve for $x$:\vspace{-.5\baselineskip}
\begin{align*}
x^2+x-5 &= 3x-2 \\
(x^2+x-5) - (3x-2) &= 0\\
x^2-2x-3 &= 0\\
(x-3)(x+1) &= 0\\
x&=-1,\ 3.
\end{align*}
Following \autoref{thm:areabetweencurves}, the area is
\begin{align*}
\int_{-1}^3\bigl(3x-2 -(x^2+x-5)\bigr)\dd x &= \int_{-1}^3 (-x^2+2x+3)\dd x \\
&=\left.\left(-\frac13x^3+x^2+3x\right)\right|_{-1}^3 \\
&=-\frac13(27)+9+9-\left(\frac13+1-3\right)\\
&= 10\frac23 = 10.\overline{6}
\end{align*}
\end{example}
\mtable{Graphing a region enclosed by two functions in \autoref{ex_abc2}.}{fig:abc2}{\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick={1,2,3,4},
ymin=-5,ymax=3.5,xmin=-.5,xmax=4.7]
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=1:2]
{x^3-7*x^2+12*x-3}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=1:2]
{5-2*x}\closedcycle;
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=2:2.5]
{5-2*x}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=2:2.2391]
{x^3-7*x^2+12*x-3}\closedcycle;
\addplot[smooth,draw={\coloronefill},fill={\coloronefill},area style,domain=2.2391:4]
{x^3-7*x^2+12*x-3}\closedcycle;
\addplot[smooth,draw=white,fill=white,area style,domain=2.5:4]
{5-2*x}\closedcycle;
\addplot [smooth,thick, draw={\colorone},domain=-.2:4.5,samples=30] {x^3-7*x^2+12*x-3};
\addplot [smooth,thick, draw={\colorone},domain=0:4.5] {5-2*x};
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
\begin{example}[Finding total area enclosed by curves]\label{ex_abc2}
Find the total area of the region enclosed by the functions $f(x) = -2x+5$ and $g(x) = x^3-7x^2+12x-3$ as shown in \autoref{fig:abc2}.
\solution
A quick calculation shows that $f=g$ at $x=1, 2$ and 4. One can proceed thoughtlessly by computing $\ds \int_1^4\bigl(f(x)-g(x)\bigr)\dd x$, but this ignores the fact that on $[1,2]$, $g(x)>f(x)$. (In fact, the thoughtless integration returns $-9/4$, hardly the expected value of an \emph{area}.) Thus we compute the total area by breaking the interval $[1,4]$ into two subintervals, $[1,2]$ and $[2,4]$ and using the proper integrand in each.
\begin{align*}
\text{Total Area}
&= \int_1^2 \bigl(g(x)-f(x)\bigr)\dd x + \int_2^4\bigl(f(x)-g(x)\bigr)\dd x\\
&= \int_1^2 \bigl(x^3-7x^2+14x-8\bigr) \dd x
+ \int_2^4\bigl(-x^3+7x^2-14x+8\bigr)\dd x\\
&= \frac5{12} + \frac83
%\\&
= \frac{37}{12} % \approx 3.083
\ \text{units}^2.
\end{align*}
\end{example}
The previous example makes note that we are expecting area to be \emph{positive}. When first learning about the definite integral, we interpreted it as ``signed area under the curve,'' allowing for ``negative area.'' That doesn't apply here; area is to be positive.
The previous example also demonstrates that we often have to break a given region into subregions before applying \autoref{thm:areabetweencurves}. The following example shows another situation where this is applicable, along with an alternate view of applying the Theorem.
\mtable{Graphing a region for \autoref{ex_abc3}.}{fig:abc3}{\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick={1,2},
ymin=-.1,ymax=3.5,xmin=-.1,xmax=2.5]
\addplot[draw={\coloronefill},fill={\coloronefill},area style,domain=0:1]{sqrt(x)+2}\closedcycle;
\addplot[draw={\coloronefill},fill={\coloronefill},area style,domain=1:2]{3-(x-1)^2}\closedcycle;
\draw[fill=white,draw=white](axis cs:0,0)rectangle(axis cs:2,2);
\addplot[draw={\colorone},domain=0:1]{sqrt(x)+2};
\addplot[draw={\colorone},domain=1:2]{3-(x-1)^2};
\draw[draw={\colorone}](axis cs:0,2)--(axis cs:2,2);
\draw (axis cs:.5,3.1) node {\scriptsize $y=\sqrt{x}+2$} (axis cs:1.8,3.2) node {\scriptsize $y=-(x-1)^2+3$};
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
\begin{example}[Finding area: integrating with respect to $y$]\label{ex_abc3}
Find the area of the region enclosed by the functions $y=\sqrt{x}+2$, $y=-(x-1)^2+3$ and $y=2$, as shown in \autoref{fig:abc3}.
\solution
We give two approaches to this problem. In the first approach, we notice that the region's ``top'' is defined by two different curves. On $[0,1]$, the top function is $y=\sqrt{x}+2$; on $[1,2]$, the top function is $y=-(x-1)^2+3$. Thus we compute the area as the sum of two integrals:
\begin{align*}
\text{Total Area}
&= \int_0^1 \Bigl(\bigl(\sqrt{x}+2\bigr)-2\Bigr)\dd x + \int_1^2 \Bigl(\bigl(-(x-1)^2+3\bigr)-2\Bigr)\dd x \\
&= 2/3 + 2/3
%\\&
=4/3.
\end{align*}
The second approach is clever and very useful in certain situations. We are used to viewing curves as functions of $x$; we input an $x$-value and a $y$-value is returned. Some curves can also be described as functions of $y$: input a $y$-value and an $x$-value is returned. We can rewrite the equations describing the boundary by solving for $x$:\vspace{-.3\baselineskip}
\begin{align*}
y=\sqrt{x}+2 & \quad\Rightarrow\quad x=(y-2)^2 \\
y=-(x-1)^2+3 & \quad\Rightarrow\quad x=\sqrt{3-y}+1.
\end{align*}
\mtable{The region used in \autoref{ex_abc3} with boundaries relabeled as functions of $y$.}{fig:abc3b}{\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
axis y line=middle,axis x line=middle,name=myplot,axis on top,xtick={1,2},
ymin=-.1,ymax=3.5,xmin=-.1,xmax=2.5]
\addplot[draw={\coloronefill},fill={\coloronefill},area style,domain=0:1]{sqrt(x)+2}\closedcycle;
\addplot[draw={\coloronefill},fill={\coloronefill},area style,domain=1:2]{3-(x-1)^2}\closedcycle;
\draw[fill=white,draw=white](axis cs:0,0)rectangle(axis cs:2,2);
\addplot[draw={\colorone},domain=0:1]{sqrt(x)+2};
\addplot[draw={\colorone},domain=1:2]{3-(x-1)^2};
\draw[draw={\colorone}](axis cs:0,2)--(axis cs:2,2);
\draw (axis cs:.5,3.1) node {\scriptsize $x=(y-2)^2$} (axis cs:1.8,3.2) node {\scriptsize $x=\sqrt{3-y}+1$};
\filldraw [draw={\colortwo},fill={\colortwofill},thick] (axis cs: 0.0625,2.2) rectangle (axis cs:1.867,2.3);
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
\autoref{fig:abc3b} shows the region with the boundaries relabeled. A
% differential element, a
horizontal rectangle is also pictured. The width of the rectangle is a small change in $y$: $\Delta y$. The height of the rectangle is a difference in $x$-values. The ``top'' $x$-value is the largest value, i.e., the rightmost. The ``bottom'' $x$-value is the smaller, i.e., the leftmost. Therefore the height of the rectangle is
\[\bigl(\sqrt{3-y}+1\bigr) - (y-2)^2.\]
The area is found by integrating the above function with respect to $y$ with the appropriate bounds. We determine these by considering the $y$-values the region occupies. It is bounded below by $y=2$, and bounded above by $y=3$. That is, both the ``top'' and ``bottom'' functions exist on the $y$ interval $[2,3]$. Thus
\begin{align*}
\text{Total Area}
&= \int_2^3 \bigl(\sqrt{3-y}+1 - (y-2)^2\bigr)\dd y \\
&= \Bigl(-\frac23(3-y)^{3/2}+y-\frac13(y-2)^3\Bigr)\Big|_2^3 \\
&= 4/3.
\end{align*}
The important thing to notice is that by integrating with respect to $y$ instead of $x$, we only had to do one integral and did not need to find the point at which to switch from one integration to another.
\end{example}
This calculus-based technique of finding area can be useful even with shapes that we normally think of as ``easy.'' \autoref{ex_abc4} computes the area of a triangle. While the formula ``$\frac12\times\text{base}\times\text{height}$'' is well known, in arbitrary triangles it can be nontrivial to compute the height. Calculus makes the problem simple.
\begin{example}[Finding the area of a triangle]\label{ex_abc4}
Compute the area of the regions bounded by the lines
\mtable{Graphing a triangular region in \autoref{ex_abc4}.}{fig:abc4}{\begin{tikzpicture}
\begin{axis}[width=1.16\marginparwidth,axis equal,
tick label style={font=\scriptsize},axis y line=middle,axis x line=middle,
name=myplot,axis on top,%xtick={1,2,3},
ymin=-.1,ymax=5.5,xmin=-.1,xmax=5.5]
\draw [draw={\colorone},thick,fill={\coloronefill}]
(axis cs:3,0)
-- node[below left,color=black] {$y=3-x$} (axis cs:1,2)
-- node[above left,color=black] {$y=x+1$} (axis cs:4,5)
-- node[pos=.7,below right,color=black] {$y=5x-15$} cycle;
\end{axis}
\node [right] at (myplot.right of origin) {\scriptsize $x$};
\node [above] at (myplot.above origin) {\scriptsize $y$};
\end{tikzpicture}}
$y=3-x$, $y=x+1$ and $y=5x-15$, as shown in \autoref{fig:abc4}.
\solution
Recognize that there are two ``bottom'' functions to this region, causing us to use two definite integrals.
\begin{align*}
\text{Total Area}
&= \int_1^3\bigl((x+1)-(3-x)\bigr)\dd x + \int_3^4\bigl((x+1)-(5x-15)\bigr)\dd x \\
% &= \int_1^3 2x-2\dd x + \int_3^4 16-4x\dd x \\
% &= \left.x^2-2x\right|_1^3 + \left.16x-2x^2\right|_3^4 \\
% &= (3- -1) + (32-30) \\
&= 4+2
%\\&
= 6.
\end{align*}
We can also approach this by converting each function into a function of $y$. This also requires 2 integrals, so there isn't really any advantage to doing so. We do it here for demonstration purposes.
The ``top'' function is always $x=\frac y5+3$ while there are two ``bottom'' functions: $x=3-y$ and $x=y-1$. Being mindful of the proper integration bounds, we have
\begin{align*}
\text{Total Area}
&= \int_0^2\left(\left(\frac y5+3\right) - (3-y)\right)\dd y
+ \int_2^5\left(\left(\frac y5+3\right) - (y-1)\right)\dd y \\
% &= \int_0^2\left(\frac{6y}5\right)\dd y+ \int_2^5\left(-\frac{4y}5+4\right)\dd y \\
% &= \left.\frac{3y^2}5\right|_0^2 + \left[-\frac{2y^2}5+4y\right]_2^5 \\
% &= \frac{12}5 + \left[10-\frac{32}5\right] \\
&= \frac{12}5 + \frac{18}5
% \\
% &= \frac{30}5 \\
%&
= 6.
\end{align*}
Of course, the final answer is the same (and we see that integrating with respect to $x$ was probably easier, since it avoided fractions).
\end{example}
% move this to numerical integration?
%While we have focused on producing exact answers, we are also able to make approximations using the principle of \autoref{thm:areabetweencurves}. The integrand in the theorem is a distance (``top minus bottom''); integrating this distance function gives an area. By taking discrete measurements of distance, we can approximate an area using numerical integration techniques developed in \autoref{sec:numerical_integration}. The following example demonstrates this.
%
%\begin{example}[Numerically approximating area]\label{ex_abc5}
%To approximate the area of a lake, shown in \autoref{fig:abc5}(a), the ``length'' of the lake is measured at 200-foot increments as shown in \autoref{fig:abc5}(b), where the lengths are given in hundreds of feet. Approximate the area of the lake.
%\solution
%The measurements of length can be viewed as measuring ``top minus bottom'' of two functions. The exact answer is found by integrating $\ds \int_0^{12} \bigl(f(x)-g(x)\bigr)\dd x$, but of course we don't know the functions $f$ and $g$. Our discrete measurements instead allow us to approximate.
%
%\mtable{(a) A sketch of a lake, and (b) the lake with length measurements.}{fig:abc5}{\begin{tikzpicture}[scale=.4]%[width=1.16\marginparwidth]
%\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
%axis y line=middle,axis x line=middle,name=myplot,axis on top,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12},ymin=-.1,ymax=8.5,xmin=-.1,xmax=12.5]
%\draw [draw={\colorone},thick,fill={\coloronefill},smooth] plot coordinates {(0,3.2)(0.5,3.417)(1.,3.637)(1.5,4.041)(2.,4.505)(2.5,5.)(3.,5.495)(3.5,5.959)(4.,6.363)(4.5,6.683)(5.,6.898)(5.5,6.995)(6.,6.968)(6.5,6.819)(7.,6.556)(7.5,6.197)(8.,5.763)(8.5,5.282)(9.,4.784)(9.5,4.298)(10.,3.857)(10.5,3.486)(11.,3.21)(11.5,2.8)(11.5,2)(11.,1.545)(10.5,1.314)(10.,1.102)(9.5,0.9154)(9.,0.7585)(8.5,0.6361)(8.,0.5514)(7.5,0.5069)(7.,0.5038)(6.5,0.5421)(6.,0.6208)(5.5,0.7378)(5.,0.8897)(4.5,1.072)(4.,1.281)(3.5,1.509)(3.,1.751)(2.5,2.)(2.,2.249)(1.5,2.491)(1.,2.719)(0.5,2.9102)(0,3.15)(0,3.2)};
%\end{tikzpicture}
%\\(a)\\
%\begin{tikzpicture}
%\begin{axis}[width=1.16\marginparwidth,tick label style={font=\scriptsize},
%axis y line=middle,axis x line=middle,name=myplot,axis on top,
%xtick={1,2,3,4,5,6,7,8,9,10,11,12},ytick={1,2,3,4,5,6,7,8},
%ymin=-.1,ymax=8.5,xmin=-.1,xmax=12.5]
%\addplot [draw={\colorone},thick,fill={\coloronefill},smooth] coordinates {(0,3.2)(0.5,3.417)(1.,3.637)(1.5,4.041)(2.,4.505)(2.5,5.)(3.,5.495)(3.5,5.959)(4.,6.363)(4.5,6.683)(5.,6.898)(5.5,6.995)(6.,6.968)(6.5,6.819)(7.,6.556)(7.5,6.197)(8.,5.763)(8.5,5.282)(9.,4.784)(9.5,4.298)(10.,3.857)(10.5,3.486)(11.,3.21)(11.5,2.8)(11.5,2)(11.,1.545)(10.5,1.314)(10.,1.102)(9.5,0.9154)(9.,0.7585)(8.5,0.6361)(8.,0.5514)(7.5,0.5069)(7.,0.5038)(6.5,0.5421)(6.,0.6208)(5.5,0.7378)(5.,0.8897)(4.5,1.072)(4.,1.281)(3.5,1.509)(3.,1.751)(2.5,2.)(2.,2.249)(1.5,2.491)(1.,2.719)(0.5,2.9102)(0,3.15)(0,3.2)};
%\draw (axis cs:2,4.5) -- (axis cs:2,2.249) node [shift={(-3pt,0pt)},rotate=90,pos=.5] {\scriptsize 2.25}
%(axis cs:4,6.36) -- (axis cs:4,1.28) node [shift={(-3pt,0pt)},rotate=90,pos=.5] {\scriptsize 5.08}
%(axis cs:6,6.97) -- (axis cs:6,0.62) node [shift={(-3pt,0pt)},rotate=90,pos=.5] {\scriptsize 6.35}
%(axis cs:8,5.76) -- (axis cs:8,.55) node [shift={(-3pt,0pt)},rotate=90,pos=.5] {\scriptsize 5.21}
%(axis cs:10,3.86) -- (axis cs:10,1.1) node [shift={(-3pt,0pt)},rotate=90,pos=.5] {\scriptsize 2.76};
%\end{axis}
%\node [right] at (myplot.right of origin) {\scriptsize $x$};
%\node [above] at (myplot.above origin) {\scriptsize $y$};
%\end{tikzpicture}
%\\ (b)}
%We have the following data points:
%\[(0,0),\ (2,2.25),\ (4,5.08),\ (6,6.35),\ (8,5.21),\ (10,2.76),\ (12,0).\]
%We also have that $\Delta x=\frac{b-a}{n} = 2$, so Simpson's Rule gives
%\begin{align*}
% \text{Area}
% &\approx \frac{2}{3}
%\Bigl(1\cdot0+4\cdot2.25+2\cdot5.08+4\cdot6.35+2\cdot5.21+4\cdot2.76+1\cdot0\Bigr)\\
% &= 44.01\overline{3} \ \text{units}^2.
%\end{align*}
%
%Since the measurements are in hundreds of feet, units${}^2 = (100\ \text{ft})^2 = 10,000\ \text{ft}^2$, giving a total area of $440,133\ \text{ft}^2$. (Since we are approximating, we'd likely say the area was about $440,000\ \text{ft}^2$, which is a little more than 10 acres.)
%\end{example}
In the next section we apply \autoref{idea:app_of_defint} to finding the volumes of certain solids.
\printexercises{exercises/07-01-exercises}