Algebraic Thinking
8.3 Functions
What Is a Function?
A function assigns each input exactly one output.
Definition: Function
A function from A to B pairs each element of A with one and only one element of B. A is the domain, B is the codomain.
Fact: Domain, Codomain, and Range
- Domain: allowed inputs.
- Codomain: target output set.
- Range: outputs actually produced.
Example: Is it a function from ordered pairs?
Determine whether each is a function.
Show Solution
- Not a function: input 1 maps to two different outputs.
- Function: each input has exactly one output (many-to-one allowed).
- Function: each input appears once with a single output.
MyOpenMath: MOM: Function identification
Sequences and Series as Functions
Sequences are functions whose domain is natural numbers.
Theorem: Arithmetic Series Sum
For arithmetic sequence with first term a1 and difference d,
$$S_n=\frac{n(2a_1+d(n-1))}{2}=\frac{n(a_1+a_n)}{2}.$$
Theorem: Geometric Series Sum
For geometric sequence with first term a1 and ratio r (r not equal 1),
$$S_n=\frac{a_1(1-r^n)}{1-r}.$$
Example: Sum of arithmetic series
Find sum of first 100 terms of 3, 7, 11, 15, ...
Show Solution
Here a1=3 and d=4.
$$a_{100}=3+99(4)=399.$$
Then
$$S_{100}=\frac{100(3+399)}{2}=50\cdot402=20100.$$
Example: Sum of geometric series
For sequence 2, 6, 18, 54, ... find S10.
Show Solution
a1=2 and r=3.
$$S_{10}=\frac{2(1-3^{10})}{1-3}=\frac{2(1-59049)}{-2}=59048.$$
MyOpenMath: MOM: Sequences and series
Composition of Functions
Composition feeds one function output into another.
Definition: Function Composition
For functions f and g,
$$(f\circ g)(x)=f(g(x)).$$
Example: Compute both composition orders
If f(x)=x^2 and g(x)=x-3, find (f o g)(x), (g o f)(x), then evaluate at x=3 and x=-2.
Show Solution
$$(f\circ g)(x)=f(x-3)=(x-3)^2.$$
$$(g\circ f)(x)=g(x^2)=x^2-3.$$
At x=3:
$$(f\circ g)(3)=0, \quad (g\circ f)(3)=6.$$
At x=-2:
$$(f\circ g)(-2)=(-5)^2=25, \quad (g\circ f)(-2)=4-3=1.$$
So composition order matters.
Example: Temperature conversion by composition
Given
$$F(C)=\frac95C+32, \quad K(F)=\frac59(F-32)+273.15,$$
find K as a function of C.
Show Solution
Compose:
$$K(C)=K(F(C))=\frac59\left(\frac95C+32-32\right)+273.15.$$
Simplify:
$$K(C)=C+273.15.$$