-
Notifications
You must be signed in to change notification settings - Fork 3
/
functions.tex
3345 lines (3169 loc) · 123 KB
/
functions.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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%*** 111,112document.tex
%===================================
%
% Last edited: Jordan
% 3/4/13 (v10)
%
%===================================
\chapter{Functions}
\minitoc
\section{The Basics of Function Vocabulary}
\begin{outcomes}
\begin{outcomelist}
\item You will have an understanding of the definition of a function.
\item You will be able to use standard notation concerning functions
correctly, and recognize when notation has been used incorrectly.
\item You will recognize some real examples of functions in your life.
\end{outcomelist}
\end{outcomes}
%
Most of us are familiar with the $\sqrt{\phantom{x}}$ symbol.
This symbols is used to turn numbers into their square roots. Sometimes it's
simple to do this on paper or in our heads, and sometimes it helps a lot to
have a calculator. We can see some calculations in \cref{fun:tab:squareroots}.
%
\begin{margintable}
\centering
\captionof{table}{Values of $\sqrt{x}$} \label{fun:tab:squareroots}
\begin{tabular}{r@{}c@{}l}
\beforeheading
\afterheading
$\sqrt{\num{9}}$ & ${}={}$ & $\num{3}$ \\\normalline
$\sqrt{\num{1/4}}$ & ${}={}$ & $\num{1/2}$ \\\normalline
$\sqrt{\num{2}}$ & ${}\approx{}$ & $\num{1.41}$ \\\lastline
\end{tabular}
\end{margintable}
%
The $\sqrt{\phantom{x}}$ symbol signifies a \emph{process}; it's a way for us to
turn numbers into other numbers. This idea of having a process for turning numbers into other
numbers is fundamental to the science and mathematics that uses college-level algebra.
%
\begin{pccdefinition}[Function]
A function is a process for turning numbers into (potentially) different numbers.
\end{pccdefinition}
%
This definition is so broad that you probably use functions all the time.
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Think about each of these examples, where some process is used for turning one number into another.
\begin{itemize}
\item If you use a person's birth year to determine how old they are, you are using a function.
\item If you look up the Kelly Blue Book value of a Mazda Proteg\'{e} based on how old it is, you are using a function.
\item If you use the the amount of money that you have available to determine how much
you wish to spend on a birthday gift for your friend, you are using a function.
\end{itemize}
\end{pccexample}
The process of using $\sqrt{\phantom{x}}$ to change numbers might feel more ``mathematical''
than these examples. Let's continue thinking about $\sqrt{\phantom{x}}$ for now, since
it's a formula-like symbol that we are familiar with. One concern with $\sqrt{\phantom{x}}$
is that although we live in the modern age of computers, this symbol is not found on most
keyboards. And yet computers still tend to be capable of producing square roots. Computer
technicians write $\sq[(]$ when they want to compute a square root, as we see in \cref{fun:tab:sqrts}.
%
\begin{margintable}
\centering
\captionof{table}{Values of $\sqrt{x}$} \label{fun:tab:sqrts}
\begin{tabular}{r@{}c@{}l}
\beforeheading
\afterheading
$\sq[\num{9}]$ & ${}={}$ & $\num{3}$ \\\normalline
$\sq\left(\num{1/4}\right)$ & ${}={}$ & $\num{1/2}$ \\\normalline
$\sq[\num{2}]$ & ${}\approx{}$ & $\num{1.41}$ \\\lastline
\end{tabular}\end{margintable}
%
The parentheses in $\sq[(]$ are very important. To see why, try to put yourself in the
``mind'' of a computer, and look closely at
\[
\sq\num{16}
\]
The computer will recognize $\sq$ and know that it needs to compute a square root.
But sometimes computers have myopic vision and they might not see the entire number \num{16}. A
computer might think that it needs to compute $\sq\num{1}$ and then append a ``6'' to the end, which
would produce a final result of \num{16}. This is probably not what was intended. And so
the purpose of the parentheses in $\sq[\num{16}]$ is to denote exactly what number needs to be operated on.
This use of $\sq[(]$ serves as a model for the standard notation that is used worldwide to
write down most functions. By having a standard notation for communicating about functions,
people in China, Venezuela, Senegal, and the United States can all communicate mathematics
with each other more easily.
Functions have their own names. We've seen a function named $\sq$, but any name you can
imagine is allowable. In the sciences, it is common to name functions with whole words,
like $\operatorname{weight}$ or $\operatorname{health\_index}$. In mathematics, we often
abbreviate such function names to $w$ or $h$. And of course, since the word ``function''
itself starts with ``f'', we will often name a function $f$.
It's crucial to continue reminding ourselves that functions are \emph{processes} for
changing numbers; they are not numbers themselves. And that means that we have a potential
for confusion that we need to stay aware of. In some contexts, the symbol $t$ might
represent a variable - a number that is represented by a letter. But in other contexts, $t$
might represent a function - a process for changing numbers into other numbers. By
staying conscious of the context of an investigation, we avoid confusion.
Next we need to discuss how we go about using a function's name.
%
\begin{pccspecialcomment}[Function notation]
The standard notation for referring to functions involves giving the function itself a name, and then writing
\[
\begin{array}{cc}
\text{name}\\
\text{of}\\
\text{function}
\end{array}
\left(
\begin{array}{cc}
\\
\text{input}\\
\\
\end{array}\right)
\]
\end{pccspecialcomment}
%
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
$f(\num{13})$ is pronounced ``f of 13''. The word ``of'' is very important,
because it reminds us that $f$ is a process and we are about to apply that
process to the input value \num{13}. So $f$ is the function, \num{13} is the
input, and $f(\num{13})$ is the output we'd get from using \num{13} as input.
$f(x)$ is pronounced ``f of x''. This is just like the previous example,
except that the input is not any specific number. The value of $x$ could be
\num{13} or any other number. Whatever $x$'s value, $f(x)$ means the corresponding
output from the function $f$.
$\operatorname{BudgetDeficit}(2009)$ is pronounced ``BudgetDeficit of 2009''.
This is probably about a function that takes a year as input, and gives that
year's federal budget deficit as output. The process here of changing a year
into a dollar amount might not involve any mathematical formula, but rather
looking up information from the Congressional Budget Office's website.
$\operatorname{Celsius}(F)$ is pronounced ``Celsius of F''. This is probably
about a function that takes a Fahrenheit temperature as input and gives the
corresponding Celsius temperature as output. Maybe a formula is used to do this;
maybe a chart or some other tool is used to do this. Here, $\operatorname{Celsius}$
is the function, $F$ is the input variable, and $\operatorname{Celsius}(F)$ is the output from the function.
\end{pccexample}
%
\begin{pccspecialcomment}[Function Notation (continued)]
While a function has a name like $f$, and the input to that function often
has a variable name like $x$, the expression $f(x)$ represents the output of
the function. To be clear, $f(x)$ is \emph{not} a function. Rather, $f$ is a
function, and $f(x)$ its output when the number $x$ was used as input.
\end{pccspecialcomment}
%
As mentioned earlier, we need to remain conscious of the context of any symbol we
are using. It's possible for $f$ to represent a function (a process), but it's also
possible for $f$ to represent a variable (a number). Similarly, parentheses might
indicate the input of a function, or they might indicate that two numbers need to
be multiplied. It's up to our judgment to interpret mathematical expressions in the
right context. Consider the expression $a(b)$. This could easily mean the output of
a function $a$ with input $b$. It could also mean that two numbers $a$ and $b$ need
to be multiplied. It all depends on the context in which these symbols are being used.
%
\begin{doyouunderstand}
\begin{problem}
Describe your own example of a function that has real context to it. You will
need some kind of input variable, like ``number of years since 2000'' or
``weight of the passengers in my car''. You will need a process for using that
number to bring about a different kind of number. The process does not need to
involve a formula; a verbal description would be great, as would a formula.
Give your function a name. Write the symbol(s) that you would use to represent
input. Write the symbol(s) that you would use to represent output.
\begin{shortsolution}
Answers will vary.
\end{shortsolution}
\end{problem}
\end{doyouunderstand}
%
Sometimes it's helpful to think of a function as a machine.
\fixthis{Fancy tikz picture of an input-output machine}
This illustrates how complicated functions are. A number is just that - a number.
But a function has the capacity to take in all kinds of different numbers into
it's hopper (feeding tray) and do different things to each of them.
\subsection{Tables and Graphs}
Since functions are potentially so complicated, we seek out new ways to understand
them better. Two basic tools for understanding a function better are tables and graphs.
%
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample} \label{fun:ex:BudgetDeficit}
Consider the function $\operatorname{BudgetDeficit}$, that takes in a year as
its input and outputs the US federal budget deficit for that year. For example,
the Congressional Budget Office's website tells us that
$\operatorname{BudgetDeficit}(2009)$ is $\SI{1.41}[\$]{\trillion}$. If we'd like
to understand this function better, we might make a table of all the inputs and
outputs we can find. Using the CBO's website\footnote{\href{http://data.bls.gov/timeseries/LNS14000000}{Congressional Budget Office}}, we put together \cref{fun:tab:BudgetDeficit}.
\begin{table}[!htb]
\centering
\caption{}
\label{fun:tab:BudgetDeficit}
\begin{tabular}{S[table-format=4.0]S[table-format=1.2]}
\beforeheading
\heading{input} & \heading{output} \\
\heading{$x$ (year)} & \heading{$\operatorname{BudgetDeficit}(x)$ (\si{\$\trillion})} \\
\afterheading
2007 & 0.16 \\\normalline
2008 & 0.46 \\\normalline
2009 & 1.41 \\\normalline
2010 & 1.29 \\\normalline
2011 & 1.30 \\\lastline
\end{tabular}
\end{table}
How is this table helpful? There are things about the function that we can see now by looking at the numbers in this table.
\begin{itemize}
\item We can see that the budget deficit has grown by quite a bit over the entire five-year period.
\item We can see that there was a particularly large jump in 2008.
\item We can see that the deficit reduced by a little bit between 2009 and 2010, and then remained stable.
\end{itemize}
These observations serve to help us understand the function $\operatorname{BudgetDeficit}$ a little better.
\end{pccexample}
%
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample} \label{fun:ex:sqrttable}
Let's return to our example of the function $\sq$. Tabulating some inputs and outputs reveals \cref{fun:tab:sqrtexample}.
\begin{table}[!htb]
\centering
\caption{}
\label{fun:tab:sqrtexample}
\begin{tabular}{S[table-format=1.0]c}
\beforeheading
\heading{input} & \heading{output} \\
\heading{$x$} & \heading{$\sq[x]$} \\
\afterheading
0 & \num{0} \\\normalline
1 & \num{1} \\\normalline
2 & $\approx\num{1.41}$ \\\normalline
3 & $\approx\num{1.73}$ \\\normalline
4 & \num{2} \\\lastline
\end{tabular}
\end{table}
How is this table helpful? Here are some observations that we can make now.
\begin{itemize}
\item We can see that when input numbers increase, so do output numbers.
\item We can see even though outputs are increasing, they increase by less and less with each step forward in $x$.
\end{itemize}
These observations help us understand $\sq$ a little better. For instance,
based on these observations which do you think is larger: the difference
between $\sq[23]$ and $\sq[24]$, or the difference between $\sq[85]$ and $\sq[86]$?
\end{pccexample}
%
Another powerful tool for understanding functions better is a graph.
Given a function $f$, one way to make its graph is to take a table of input and
output values, and read each row as the coordinates of a point in the $xy$-plane.
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Returning to the function $\operatorname{BudgetDeficit}$ that we
studied in \cref{fun:ex:BudgetDeficit}, in order to make a graph of this function
we view \cref{fun:tab:BudgetDeficit} as a list of points with $x$ and $y$ coordinates,
as in \cref{fun:tab:BudgetDeficitCoords}. We then plot these points on a set of
coordinate axes, as in \cref{fun:fig:BudgetDeficit}. The points have been connected
with a curve so that we can see the overall pattern given by the progression of points.
Since there was not any actual data for inputs in between any two years, the curve is
dashed. That is, this curve is dashed because it just represents someone's best guess
as to how to connect the plotted points. Only the plotted points themselves are precise.
\begin{table}[!htb]
\begin{minipage}{.4\textwidth}
\centering
\captionof{table}{}
\label{fun:tab:BudgetDeficitCoords}
\begin{tabular}{c}
\beforeheading
\heading{(input, output)}\\
\heading{$(x,\operatorname{BudgetDeficit}(x))$} \\
\afterheading
$(2007, 0.16)$ \\ \normalline
$(2008, 0.46)$ \\ \normalline
$(2009, 1.41)$ \\ \normalline
$(2010, 1.30)$ \\ \normalline
$(2011, 1.29)$ \\ \lastline
\end{tabular}
\end{minipage}%
\begin{minipage}{.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
xmin=2006,xmax=2012,
ymin=0,ymax=2,
xlabel={$x$ (year)},
ylabel={$y$ (\$ trillion)},
height=0.5\textwidth,
grid=major,
xtick={2007,2008,...,2012},
xticklabels={2007,2008,...,2011},
minor ytick={0,0.2,...,2},
ytick={0,1,...,2},
axis x discontinuity=crunch,
nodes near coords,
]
\addplot+[soldot,smooth,dashed,-] coordinates {
(2007,0.16)
(2008,0.46)
(2009,1.41)
(2010,1.30)
(2011,1.29)};
\end{axis}
\end{tikzpicture}
\captionof{figure}{$y=\operatorname{BudgetDeficit}(x)$}
\label{fun:fig:BudgetDeficit}
\end{minipage}%
\end{table}
How has this graph helped us to understand the function better? All of the
observations that we made in \cref{fun:ex:BudgetDeficit} are perhaps even
more clear now. For instance, the spike in the deficit between 2008 and 2009
is now visually apparent. Seeking an explanation for this spike, we recall
that there was a financial crisis in late 2008. Revenue from income taxes
dropped at the same time that federal money was spent to prevent further losses.
\end{pccexample}
%
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Let's now construct a graph for $\sq$. Tabulating inputs and outputs gives the
points in \cref{fun:tab:sqrtCoords}, which in turn gives us the graph in \cref{fun:fig:sqrt}.
\begin{table}[!htb]
\begin{minipage}{.4\textwidth}
\centering
\captionof{table}{}
\label{fun:tab:sqrtCoords}
\begin{tabular}{c}
\beforeheading
\heading{(input, output)}\\
\heading{$(x,\sq(x))$} \\
\afterheading
$(0, 0)$ \\ \normalline
$(1, 1)$ \\ \normalline
$\approx(2, 1.41)$ \\ \normalline
$\approx(3, 1.73)$ \\ \normalline
$(4, 2)$ \\ \lastline
\end{tabular}
\end{minipage}%
\begin{minipage}{.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
xmin=-1,xmax=5,
ymin=0,ymax=3,
height=0.5\textwidth,
grid=major,
xtick={-1,0,...,5},
xticklabels={-1,0,...,5},
ytick={0,1,...,3},
]
\addplot+[->,dashed]expression[domain=0:4.5,samples=50] {sqrt(x)};
\addplot[soldot]coordinates{ (0,0) (1,1) (2,1.414) (3,1.732) (4,2)};
\end{axis}
\end{tikzpicture}
\captionof{figure}{$y=\operatorname{BudgetDeficit}(x)$}
\label{fun:fig:sqrt}
\end{minipage}%
\end{table}
Just as in the previous example, we've plotted points where we have concrete
coordinates, and then we have made our best attempt to connect those points
with a curve. Unlike the previous example, here we believe that points could
continue to be computed and plotted indefinitely to the right, and so we
have added an arrowhead to the graph.
What has this graph done to improve our understanding of $\sq$? As inputs
($x$-values) increase, the outputs ($y$-values) increase too, although not at
the same rate. In fact we can see that our graph is steep on its left, and less
steep as we move to the right. This confirms our earlier observation in
\cref{fun:ex:sqrttable} that outputs increase by smaller and smaller amounts
as the input increases.
\end{pccexample}
%
\begin{pccspecialcomment}[The graph of a function]
Given a function $f$, when we refer to a \emph{graph of $f$} we are \emph{not}
referring to an entire picture, like \cref{fun:fig:sqrt}. A graph of $f$ is only
\emph{part} of that picture - the curve and the points that it connects.
Everything else: axes, tick marks, the grid, labels, and the surrounding white
space is just useful decoration, so that we can read the graph more easily.
It is also common to refer to the graph of $f$ as the graph of the \emph{equation}
$y=f(x)$. However we should never refer to ``the graph of $f(x)$''. That would
indicate a fundamental misunderstanding of our notation. We have decided that $f(x)$
is the output for a certain input $x$. That means that $f(x)$ is just a number; a
relatively uninteresting thing compared to $f$ the function, and not worthy of
any two-dimensional picture.
\end{pccspecialcomment}
While it is important to be able to make a graph of a function $f$, we also need to be capable of looking at a graph and reading it well. A graph of $f$ provides us with helpful specific information about $f$; it tells us what $f$ does to its input values. When we were making graphs, we plotted points of the form
\[
(\text{input},\text{output})
\]
Now given a graph of $f$, we interpret coordinates in the same way.
\begin{figure}[!htb]
\centering
\begin{tikzpicture}
\begin{axis}[
framed,
xmin=-1,xmax=5,
ymin=-1,ymax=4,
width=0.3\textwidth,
grid=major,
xtick={1,...,4},
ytick={1,...,3},
]
\addplot+[smooth] coordinates{ (-1,0.5) (0,0.5) (1,2) (2,3) (3,3) (4,2) (5,1.5)};
\addplot+[dashed,->] coordinates{ (-2,0) (1,0) (1,2) };
\end{axis}
\end{tikzpicture}
\caption{$y=f(x)$}
\label{fun:fig:readgraph}
\end{figure}%
In \cref{fun:fig:readgraph} we have a graph of a function $f$. If we wish to find $f(1)$, we recognize that \num{1} is being used as an input. So we would want to find a point of the form $(1,\phantom{y})$. Seeking out $x$-coordinate \num{1} in \cref{fun:fig:readgraph}, we find that the only such point is $(1,2)$. Therefore the output for \num{1} is \num{2}; in other words $f(1)=2$.
\begin{doyouunderstand}
\begin{problem}
Use the graph of $f$ in \cref{fun:fig:readgraph} to find $f(0)$, $f(3)$, and $f(4)$.
\begin{shortsolution}
$f(0)=0.5$, $f(3)=3$, and $f(4)=2$
\end{shortsolution}
\end{problem}
\end{doyouunderstand}
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}\label{fun:ex:unemployment}
Suppose that $u$ is the unemployment function of time. That is, $u(t)$ is the unemployment rate in the United States in year $t$. The graph of the equation $y=u(t)$ is given in \cref{fun:fig:unemployment}\footnote{\href{http://data.bls.gov/timeseries/LNS14000000}{US Bureau of Labor Statistics} }.
\begin{figure}[!htb]
\centering
\begin{tikzpicture}
\begin{axis}[
xmin=2001,xmax=2012,
ymin=0,ymax=10,
xlabel={$t$},
ylabel={$y$ (\si{\percent})},
width=0.8\textwidth,
height=0.25\textwidth,
grid=major,
axis line style=->,
xtick={2002,2003,...,2012},
ytick={0,2,...,10},
axis x discontinuity=crunch,
x tick label style={/pgf/number format/1000 sep=},
]
\addplot+[smooth] coordinates{ (2002,5.78) (2003,5.99) (2004,5.54) (2005,5.08) (2006,4.61) (2007,4.62)
(2008,5.80) (2009,9.28) (2010,9.63) (2011,8.95) (2012,8.17)};
\end{axis}
\end{tikzpicture}
\caption{Unemployment in the United States}
\label{fun:fig:unemployment}
\end{figure}%
What was the unemployment in 2002? It is a straightforward matter to use \cref{fun:fig:unemployment} to find that unemployment was about \SI{6}{\percent} in 2002. Asking this question is exactly the same thing as asking to find $u(2002)$. That is, we have one question that can either be asked in a everyday-English way or which can be asked in a terse, mathematical notation-heavy way:
\begin{align*}
\text{``What was unemployment in 2002?''} & & \text{``Find $u(2002)$.''}
\end{align*}
If we use the table to establish that $u(2009)\approx9.25$, then we should be prepared to translate that into everyday-English using the context of the function: In 2009, unemployment in the U.S.\ was about \SI{9.25}{\percent}.
If we ask the question ``when was unemployment at \SI{5}{\percent}'', we can read the graph and see that there were two such times: early 2005 and mid-2007. But there is again a more mathematical notation-heavy way to ask this question. Namely, since we are being told that the output of $u$ is \num{5}, we are being asked to solve the equation $u(t)=5$. So the following communicate the same thing:
\begin{align*}
\text{``When was unemployment at \SI{5}{\percent}?''} & & \text{``Solve the equation $u(t)=5$.''}
\end{align*}
And our answer to this question is:
\begin{align*}
\text{``Unemployment was at \SI{5}{\percent} in early 2005 and mid-2007''} & & \text{``$t\approx2005$ or $t\approx2007.5$''}
\end{align*}
\end{pccexample}
\begin{doyouunderstand}
Use the graph of $u$ in \cref{fun:fig:unemployment} to respond to the following.
\begin{problem}
Find $u(2011)$ and interpret it.
\begin{shortsolution}
$u(2011)\approx9$; In 2011 the US unemployment rate was about \SI{9}{\percent}.
\end{shortsolution}
\end{problem}
\begin{problem}
Solve the equation $u(t)=6$ and interpret your solution(s).
\begin{shortsolution}
$t\approx2003$ or $t\approx2008$; The points at which unemployment was \SI{6}{\percent} were in early 2003 and early 2008.
\end{shortsolution}
\end{problem}
\end{doyouunderstand}
\subsection{Translating Between Four Descriptions of the Same Function}
We have noted that functions are complicated, and that we are seeking out ways to make them easier to understand. It's common to encounter a problem involving a function and not know how to proceed toward a solution to that problem. As it happens, most functions have at least four standard ways to think about them. If we become capable of translating between these four perspectives, perhaps we will find that one of them makes a given problem easy to solve.
\begin{figure}[!htb]
\centering
\begin{tikzpicture}[function/.style={draw, fill=blue!20, text width=5em,
text centered, minimum height=2.5em,drop shadow},
functionname/.style={draw, fill=blue!20, circle,text width=6em,
text centered, minimum height=2.5em,drop shadow}]
% Draw diagram elements
\node (f) [functionname] {A function, $f$};
\node (verbal) [function,above=of f] {Verbal Description};
\node (tabular) [function,left=of f] {Table of Inputs and Outputs};
\node (graphical)[function,right=of f] {Graph};
\node (formular)[function,below=of f] {Formula};
% Draw arrows between elements
\draw[<->] (f) -- (formular) ;
\draw[<->] (f) -- (verbal);
\draw[<->] (f) -- (graphical);
\draw[<->] (f) -- (tabular);
\draw[<->] (verbal.west) to[out=180,in=90](tabular.north) ;
\draw[<->] (verbal.east) to[out=0,in=90](graphical.north) ;
\draw[<->] (tabular.south) to[out=-90,in=180](formular.west) ;
\draw[<->] (graphical.south)to[out=-90,in=0](formular.east);
% Draw background
\begin{pgfonlayer}{background}
% Left-top corner of the background rectangle
\path (tabular.west |- verbal.north)+(-0.5,0.5) node (a) {};
% Right-bottom corner of the background rectanle
\path (graphical.east |- formular.south)+(+0.5,-0.5) node (c) {};
% Draw the background
\path[fill=yellow!20,rounded corners, draw=black!50, dashed]
(a) rectangle (c);
\end{pgfonlayer}
\end{tikzpicture}
\caption{Translating Between Perspectives}
\label{fun:fig:ruleoffour}
\end{figure}
The four modes for working with a given function are:
\begin{multicols}{2}
\begin{itemize}
\item a verbal description
\item a table of inputs and outputs
\item a graph of the function
\item a formula for the function
\end{itemize}
\end{multicols}
This has been visualized in \cref{fun:fig:ruleoffour}.
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Consider a function $f$ that squares its input and then adds \num{1}. Translate this verbal description of $f$ into a table, a graph, and a formula.
\begin{pccsolution}
To make a table for $f$, we'll have to select some input $x$-values. These choices are left entirely up to us, so we might as well choose small, easy-to-work-with values. However we shouldn't shy away from negative input values. Given the verbal description, we should be able to compute a column of output values.
\Cref{fun:tab:ruleoffourexample} is one possible table that we might end up with.
Once we have a table for $f$, it's a simple matter to make a graph for $f$ as in \cref{fun:fig:ruleoffourexample}, using the table to plot points.
\begin{table}[!htb]
\begin{minipage}{.4\textwidth}
\centering
\captionof{table}{}
\label{fun:tab:ruleoffourexample}
\begin{tabular}{S[table-format=1.0]r}
\beforeheading
\heading{$x$} & \heading{$f(x)$} \\
\afterheading
-2 & $(\num{-2})^2+\num{1}=\num{5}$ \\\normalline
-1 & $(\num{-1})^2+\num{1}=\num{2}$ \\\normalline
0 & $\num{0}^2+\num{1}=\num{1}$ \\\normalline
1 & $\num{1}^2+\num{1}=\num{2}$ \\\normalline
2 & \num{5} \\\normalline
3 & \num{10} \\\normalline
4 & \num{17} \\\lastline
\end{tabular}
\end{minipage}%
\begin{minipage}{.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
framed,
xmin=-3,xmax=5,
ymin=-5,ymax=20,
height=0.618\textwidth,
grid=major,
xtick={-2,...,4},
ytick={5,10,...,15},
minor ytick={0,1,...,20},
]
\addplot+[dashed]expression[domain=-2.3:4.3,samples=50] {x^2+1};
\addplot[soldot]coordinates{ (-2,5) (-1,2) (0,1) (1,2) (2,5) (3,10) (4,17)};
\end{axis}
\end{tikzpicture}
\captionof{figure}{$y=f(x)$}
\label{fun:fig:ruleoffourexample}
\end{minipage}%
\end{table}
Lastly, we must find a formula for $f$. This means we need to write a mathematical expression that says the same thing about $f$ as the verbal description, the table, and the graph. For this example, we can focus on the verbal description. Since $f$ takes its input, squares it, and adds \num{1}, then we have that
\[
f(x)=x^2+1
\]
\end{pccsolution}
\end{pccexample}
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Let $F$ be the function that takes a Celsius temperature as input and outputs the corresponding Fahrenheit temperature. Translate this verbal description of $F$ into a table, a graph, and a formula.
\begin{pccsolution}
To make a table for $F$, we will need to rely on what we know about Celsius and Fahrenheit temperatures. It is a fact that the freezing temperature of water at sea level is \SI{0}{\celsius}, which equals \SI{32}{\Fahrenheit}. Also, boiling temperature of water at sea level is \SI{100}{\celsius}, which is the same as \SI{212}{\Fahrenheit}. One more piece of information we might have is that standard human body temperature is \SI{37}{\celsius}, or \SI{98.6}{\Fahrenheit}. All of this is compiled in \cref{fun:tab:fahrenheit}. Note that we tabulated inputs and outputs by working with the context of the function, not with any computations.
Once a table is established, making a graph by plotting points is a simple matter, as in \cref{fun:fig:fahrenheit}. The three plotted points seem to be in a straight line, so we think it is reasonable to connect them in that way.
\begin{table}[!htb]
\begin{minipage}{.4\textwidth}
\centering
\captionof{table}{}
\label{fun:tab:fahrenheit}
\begin{tabular}{S[table-format=3.0]S[table-format=3.1]}
\beforeheading
\heading{$C$} & \heading{$F(C)$} \\
\afterheading
0 & 32 \\\normalline
37 & 98.6 \\\normalline
100 & 212 \\\lastline
\end{tabular}
\end{minipage}%
\begin{minipage}{.6\textwidth}
\centering
\begin{tikzpicture}
\begin{axis}[
framed,
xmin=-20,xmax=120,
ymin=-50,ymax=250,
height=0.618\textwidth,
xtick={20,40,...,100},
ytick={50,100,...,200},
grid=major,
]
\addplot+[dashed]expression[domain=-10:110,samples=50] {9/5*x+32};
\addplot[soldot, nodes near coords]coordinates{ (0,32) (37,98.6) (100,212)};
\end{axis}
\end{tikzpicture} \captionof{figure}{$y=F(x)$}
\label{fun:fig:fahrenheit}
\end{minipage}%
\end{table}
To find a formula for $F$, the verbal definition is not of much direct help. But $F$'s graph does seem to be a straight line. And linear equations are familiar to us. This line has a $y$-intercept at $(0,32)$ and a slope we can calculate: $\frac{212-32}{100-0}=\frac{180}{100}=\frac{9}{5}$. So the equation of this line is $y=\frac{9}{5}C+32$. On the other hand, the equation of this graph is $y=F(C)$, since it is a graph of the function $F$. So evidently,
\[
F(C)=\frac{9}{5}C+32
\]
\end{pccsolution}
\end{pccexample}
%===================================
% Author: Hughes
% Date: October 2012
%===================================
\begin{pccexample}[Referencing a function]
Label each of the following snippets as correct use of vocabulary ({\color{green}\checkmark}) or incorrect use ({\color{red}$\times$});
if the usage is incorrect, give a brief reason why.
\begin{enumerate}
\item The function $f$ is shown in Figure \ldots\label{fineusage1}
\item The function $f(x)$ is shown in Figure \ldots\label{badusage1}
\item Consider the function $g$ that has formula $g(x)=x^2+3$.\label{fineusage2}
\item Consider the function $g(x)=x^2+1$ \ldots\label{badusage2}
\end{enumerate}
\begin{pccsolution}
\Cref{fineusage1,fineusage2} are fine usage of vocabulary ({\color{green}\checkmark}). \Cref{badusage1} is not ({\color{red}$\times$}), since $f(x)$ is the value of $f$ at $x$; it is not a function. Also \cref{badusage2} is bad usage ({\color{red}$\times$}) because $g$ is the function; $g(x)=x^2+1$ is the \emph{formula} for the function $g$.
\end{pccsolution}
We will be using the correct language throughout this document; pay close
attention to it and try your best to use it in all of your mathematical
work, both verbal and written.
\end{pccexample}
\begin{exercises}
%===================================
% Author: Hughes
% Date: October 2012
%===================================
\begin{problem}[Slope and vertical intercept]
In each of the following problems you are given a formula for a linear function.
State the slope of each function, and state the vertical intercept
of each function as an ordered pair.
\begin{multicols}{4}
\begin{subproblem}
$f(x)=3x-1$
\begin{shortsolution}
Slope is $3$, vertical intercept is $(0,-1)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$g(x)=5-\frac{x}{2}$
\begin{shortsolution}
Slope is $-\frac{1}{2}$, vertical intercept is $(0,5)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$h(x)=\pi-10x$
\begin{shortsolution}
Slope is $-10$, vertical intercept is $(0,\pi)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$k(x)=mx+b$
\begin{shortsolution}
Slope is $m$, vertical intercept is $(0,b)$.
\end{shortsolution}
\end{subproblem}
\end{multicols}
\end{problem}
%===================================
% Author: Hughes
% Date: October 2012
%===================================
\begin{problem}[Linear or quadratic]
Decide which of the following formulas correspond to a linear function,
and which correspond to a quadratic function.
\begin{multicols}{4}
\begin{subproblem}
$f(x)=2x+1$
\begin{shortsolution}
Linear.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$g(t)=t^2+2$
\begin{shortsolution}
Quadratic.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$h(s)=9-5s$
\begin{shortsolution}
Linear.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$j(u)=4^2-\frac{u}{5}$
\begin{shortsolution}
Linear.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$\alpha(c)=c^2+2c+4$
\begin{shortsolution}
Quadratic.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$\beta(m)=4$
\begin{shortsolution}
Linear.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$\gamma(h)=\frac{4}{3}-h^2$
\begin{shortsolution}
Quadratic.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$\delta(z)=z$
\begin{shortsolution}
Linear.
\end{shortsolution}
\end{subproblem}
\end{multicols}
\end{problem}
%===================================
% Author: Hughes
% Date: October 2012
%===================================
\begin{problem}[Vertex of a quadratic function]
Each of the following formulas corresponds to a quadratic function.
State the vertex and range of each function (the domain of
each function is $(-\infty,\infty)$).
\begin{multicols}{4}
\begin{subproblem}
$f(x)=(x-3)^2+4$
\begin{shortsolution}
Vertex: $(3,4)$, range: $[4,\infty)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$g(x)=4-(x-3)^2$
\begin{shortsolution}
Vertex: $(3,4)$, range: $(-\infty,4]$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$h(x)=2(x-5)^2$
\begin{shortsolution}
Vertex: $(5,0)$, range: $[0,\infty)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$j(x)=5(3x-4)^2+7$
\begin{shortsolution}
Vertex: $\left( \frac{4}{3},7 \right)$, range: $[7,\infty)$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$F(x)=x^2+1$
\begin{shortsolution}
Vertex: $\left( -\frac{1}{2},\frac{5}{4} \right)$, range: $\left[ \frac{5}{4},\infty \right)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$G(x)=3x^2+5x$
\begin{shortsolution}
Vertex: $\left( -\frac{5}{6},-\frac{25}{12} \right)$, range: $\left[ -\frac{25}{12},\infty\right)$
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$H(x)=4-\frac{1}{2}x^2$
\begin{shortsolution}
Vertex: $(0,4)$, range: $(-\infty,4]$.
\end{shortsolution}
\end{subproblem}
\begin{subproblem}
$J(x)=\frac{1}{3}-\frac{x}{2}-\frac{x^2}{5}$
\begin{shortsolution}
Vertex: $\left( -\frac{5}{4},\frac{1}{3} \right)$, range: $\left( -\infty,\frac{1}{3} \right]$.
\end{shortsolution}
\end{subproblem}
\end{multicols}
\end{problem}
\end{exercises}
\section{Domain and Range}
A function is a process for turning input values into output values. Occasionally a function $f$ will have input values for which the process breaks down.
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}\label{fun:ex:portlandpop}
Let $P$ be the population of Portland as a function of the year. According to Google\footnote{\href{http://www.google.com/publicdata/explore?ds=kf7tgg1uo9ude_&met_y=population&idim=place:4159000&dl=en&hl=en&q=population+of+portland}{http://www.google.com/publicdata/explore?ds=kf7tgg1uo9ude\_\&met\_y=population\&idim=place:4159000 \&dl=en\&hl=en\&q=population+of+portland}} we can say that:
\begin{align*}
P(2011) & = \num{593820} & P(1990) & = \num{487849}
\end{align*}
But what if we asked to find $P(1600)$? The question doesn't really make sense anymore. While there were indigenous peoples living in the area then, the city of Portland was not incorporated until 1851. We say that $P(1600)$ is \emph{undefined}.
\end{pccexample}
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}\label{fun:ex:MassWeight}
If $m$ is a person's mass in \si{\kilo\gram}, let $w(m)$ be their weight in \si{\pound}. There is an approximate formula for $w$:
\[
w(m)\approx 2.2m
\]
From this formula we can find:
\begin{align*}
w(50) & \approx \num{110} & w(80) & \approx \num{176}
\end{align*}
which tells us that a \SI[number-unit-product=-]{50}{\kilo\gram} person weighs \SI{110}{\pound}, and an \SI[number-unit-product=-]{80}{\kilo\gram} person weighs \SI{176}{\pound}.
What if we asked for $w(-100)$? In the context of this example, we would be asking for the weight of a person whose mass is \SI{-100}{\kilo\gram}. This is clearly nonsense. That means that $w(-100)$ is \emph{undefined}. Note that the \emph{context} of the example is telling us that $w(-100)$ is undefined even though the formula alone might suggest that $w(-100)=-220$.
\end{pccexample}
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}\label{fun:ex:contextfreedomain}
Let $g$ have the formula
\[
g(x)=\frac{x}{x-7}
\]
For most $x$-values, $g(x)$ is perfectly computable:
\begin{align*}
g(2) & = -\frac{2}{5} & g(14) & = \num{2}
\end{align*}
But if we try to compute $g(7)$, we run into an issue of arithmetic.
\begin{align*}
g(7) & = \frac{7}{7-7} \\
& = \frac{7}{0}
\end{align*}
The expression $\frac{7}{0}$ is \emph{undefined}. There is no number that this could equal.
\end{pccexample}
\begin{doyouunderstand}
\begin{problem}
Find an input for the function $f$ that would cause an undefined output, where $f(x)=\dfrac{x+2}{x+8}$.
\begin{shortsolution}
\num{-8} would be a bad input value; it would lead to division by \num{0}
\end{shortsolution}
\end{problem}
\end{doyouunderstand}
\begin{pccdefinition}[Domain]
The \emph{domain} of a function $f$ is the collection of all of its valid input values.
\end{pccdefinition}
%===================================
% Author: Jordan
% Date: Sep/Oct 2012
%===================================
\begin{pccexample}
Referring to the functions from \crefrange{fun:ex:portlandpop}{fun:ex:contextfreedomain},
\begin{itemize}
\item The domain of $P$ is all years starting from 1851 and later. It would be reasonable to say the the domain is actually all years from 1851 up to the current year, since we cannot guarantee that Portland will still exist into the future.
\item The domain of $w$ is all positive real numbers. It is nonsensical to have a person with negative mass or even one with zero mass. While there is some lower bound for the smallest mass a person could have, and also an upper bound for the largest mass a person could have, these boundaries are gray. We can say for sure that nonpositive numbers should never be used as input for $w$.
\item The domain of $g$ is all real numbers except $7$. This is the only number that causes a breakdown in $g$'s formula.
\end{itemize}
\end{pccexample}
\begin{doyouunderstand}
\begin{problem}\label{fun:prob:sqrtdomain}
What is the domain of the function $\sq$?
\begin{shortsolution}
Since $\sq$ can only be applied to nonnegative numbers, the domain is the set of all nonnegative numbers. That is, the domain is all numbers greater than or equal to \num{0}.
\end{shortsolution}
\end{problem}
\end{doyouunderstand}
\subsection{Interval, Set, and Set-Builder Notation}
Communicating the domain of a function can be wordy. In mathematics, we can communicate the same information using concise notation that is accepted for use almost worldwide. \Cref{fun:tab:IntervalNotation} contains example functions from this section, their domains, and illustrates \emph{interval notation} for these domains.
\begin{table}[!htb]
\begin{widepage}
\centering
\caption{Domains from \cref{fun:ex:MassWeight}, \cref{fun:ex:contextfreedomain}, and \cref{fun:prob:sqrtdomain}}
\label{fun:tab:IntervalNotation}
\begin{tabular}{p{1.5in}p{1.5in}cc}
\beforeheading
\heading{function} & \heading{verbal} & \heading{illustration of} & \heading{interval notation} \\
& \heading{domain} & \heading{domain} & \heading{for domain} \\
\afterheading
$w$ from \cref{fun:ex:MassWeight}, computing mass from weight
& all real numbers greater than \num{0}
& \begin{adjustbox}{valign=m}{\begin{tikzpicture}
\begin{axis}[
xmin=-10,xmax=10,
ymin=-1,ymax=1,
axis y line=none,
xlabel={$m$},
width=2in,
height=2cm,
grid=none,
xtick={-10,0,10},
xticklabels = {$-\infty$,$0$,$\infty$},
tick style={draw=none},
]
\addplot+[->,line width=3pt]coordinates{ (0,0) (10,0) };
\addplot[holdot]coordinates{ (0,0) };
\end{axis}
\end{tikzpicture}}\end{adjustbox}
& $(0,\infty)$ \\
$g$ from \cref{fun:ex:contextfreedomain}, with formula $g(x)=\frac{x}{x-7}$
& all real numbers except \num{7}
& \begin{adjustbox}{valign=m}{\begin{tikzpicture}
\begin{axis}[
xmin=-10,xmax=10,
ymin=-1,ymax=1,
axis y line=none,
xlabel={$x$},
width=2in,
height=2cm,
grid=none,
xtick={-10,7,10},
xticklabels = {$-\infty$,$7$,$\infty$},
tick style={draw=none},
]
\addplot+[line width=3pt]coordinates{ (-10,0) (10,0) };
\addplot[holdot]coordinates{ (7,0) };
\end{axis}
\end{tikzpicture}}\end{adjustbox}