# Math 22 Functions

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

## Basic Definitions

A function is a relationship between two variables such that to each value of the independent variable there corresponds exactly one value of the dependent variable.

The domain of the function is the set of all values of the independent variable for which the function is defined.

The range of the function is the set of all values taken on by the dependent variable.

Function notation: We usually denote a function f of x as ${\displaystyle f(x)}$. For example, function ${\displaystyle y=2x^{2}+1}$ can be written as ${\displaystyle f(x)=2x^{2}+1}$ in function notation.

Exercises Find the domain and range of the following functions:

1) ${\displaystyle y={\sqrt {x+1}}}$

Solution:
The domain is where the function defines (or all possible values of x). So, the radicand (everything under the square root) need to be non-negative.
So, ${\displaystyle x+1\geq 0}$
Answer: ${\displaystyle x\geq -1}$ or ${\displaystyle [-1,\infty )}$
The range is all of possible outcomes (values of y). Notice that ${\displaystyle {\sqrt {x+1}}}$ is never negative. So ${\displaystyle y}$ is never negative.
Answer: ${\displaystyle y\geq 0}$ or ${\displaystyle [0,\infty )}$

## Evaluate a Function

To evaluate a function ${\displaystyle f(x)}$ at ${\displaystyle x=a}$. We just need to plug in ${\displaystyle x=a}$ to find ${\displaystyle f(a)}$.

Example: Find the value of the function ${\displaystyle f(x)=4x^{2}+1}$ at ${\displaystyle x=1,2,3}$

${\displaystyle f(1)=4(1)^{2}+1=4+1=5}$

${\displaystyle f(2)=4(2)^{2}+1=16+1=17}$

${\displaystyle f(3)=4(3)^{2}+1=36+1=37}$

Exercises Find the value of the function at the given values:

2) ${\displaystyle y={\sqrt {x+1}}}$ at ${\displaystyle x=3,-3}$

Solution:
${\displaystyle f(3)={\sqrt {3+1}}={\sqrt {4}}=2}$
${\displaystyle x=-3}$ isn't in the domain of ${\displaystyle f(x)}$. So, ${\displaystyle f(-3)=}$ undefined
OR
${\displaystyle f(-3)={\sqrt {-3+1}}={\sqrt {-2}}=undefined}$

## Combinations of Functions

Two functions can be combine in varuious way. For example, let ${\displaystyle f(x)=2x+1}$ and ${\displaystyle g(x)=x^{2}+3}$. Then,

${\displaystyle f(x)+g(x)=(2x+1)+(x^{2}+3)=x^{2}+2x+4}$

${\displaystyle f(x)-g(x)=(2x+1)-(x^{2}+3)=-x^{2}+2x-2}$

${\displaystyle f(x)g(x)=(2x+1)(x^{2}+3)=2x^{3}+x^{2}+6x+3}$

${\displaystyle {\frac {f(x)}{g(x)}}={\frac {2x+1}{x^{2}+3}}}$

## Composite Function

Let ${\displaystyle f}$ and ${\displaystyle g}$ be functions. The function given by ${\displaystyle (f\circ g)(x)=f(g(x))}$ is the composite function of ${\displaystyle f}$ and ${\displaystyle g}$.

Examples: Let ${\displaystyle f(x)=2x+1}$ and ${\displaystyle g(x)=x^{2}+3}$

So, ${\displaystyle (f\circ g)(x)=f(g(x))=f(x^{2}+3)=2(x^{2}+3)+1=2x^{2}+7}$

Exercises Given ${\displaystyle f(x)=3x-2}$ and ${\displaystyle g(x)=2x^{2}-1}$. Find each composite function below

1) ${\displaystyle (f\circ g)(x)}$

Solution:
${\displaystyle f(g(x))=f(2x^{2}-1)=3(2x^{2}-1)-2=6x^{2}-5}$

2) ${\displaystyle (g\circ f)(x)}$

Solution:
${\displaystyle g(f(x))=g(3x-2)=2(3x-2)^{2}-1}$

## Inverse Functions

Informally, the inverse function of ${\displaystyle f}$ is another function ${\displaystyle g}$ that “undoes” what ${\displaystyle f}$ has done. We usually denote ${\displaystyle g}$ as ${\displaystyle f^{-1}}$

 Formal definition of inverse function.
Let ${\displaystyle f}$ and ${\displaystyle g}$ be functions such that
${\displaystyle (f\circ g)(x)=f(g(x))=x}$
and
${\displaystyle (g\circ f)(x)=g(f(x))=x}$
Under these conditions, the function ${\displaystyle g}$ is the inverse function of ${\displaystyle f}$, we denote ${\displaystyle g=f^{-1}}$


Important: The domain of ${\displaystyle f}$ must be equal to the range of ${\displaystyle f^{-1}}$ , and the range of ${\displaystyle f}$ must be equal to the domain of ${\displaystyle f^{-1}}$

Exercise:

1) Show two functions ${\displaystyle f(x)=4x}$ and ${\displaystyle g(x)={\frac {1}{4}}x}$ are inverses

Solution:
We want to show that these two functions satisfy ${\displaystyle f(g(x))=x}$ and ${\displaystyle g(f(x))=x}$. So
Consider ${\displaystyle f(g(x))=f({\frac {1}{4}}x=4({\frac {1}{4}}x)=x}$
and ${\displaystyle g(x(x))=g(4x)={\frac {1}{4}}(4x)=x}$
Hence, ${\displaystyle f(x)=4x}$ and ${\displaystyle g(x)={\frac {1}{4}}x}$ are inverses

2) Show two functions ${\displaystyle f(x)={\frac {3}{2}}x+1}$ and ${\displaystyle g(x)={\frac {2}{3}}(x-1)}$ are inverses

Solution:
We want to show that these two functions satisfy ${\displaystyle f(g(x))=x}$ and ${\displaystyle g(f(x))=x}$. So
Consider ${\displaystyle f(g(x))=f({\frac {2}{3}}(x-1))={\frac {3}{2}}[{\frac {2}{3}}(x-1)]+1=(x-1)+1=x}$
and ${\displaystyle g(x(x))=g({\frac {3}{2}}x+1)={\frac {2}{3}}({\frac {3}{2}}x+1-1)={\frac {2}{3}}({\frac {3}{2}}x)=x}$
Hence, ${\displaystyle f(x)={\frac {3}{2}}x+1}$ and ${\displaystyle g(x)={\frac {2}{3}}(x-1)}$ are inverses

## Finding Inverse Function

 To find the inverse function ${\displaystyle f^{-1}(x)}$ of a given function ${\displaystyle f(x)}$. We can follow these steps:

1) Replace ${\displaystyle f(x)}$ with ${\displaystyle y}$
2) Interchange ${\displaystyle x}$ and ${\displaystyle y}$
3) Solve for ${\displaystyle y}$
4) Replace ${\displaystyle y}$ by ${\displaystyle f^{-1}(x)}$


Exercises Find the inverse function of

1) ${\displaystyle f(x)=4x-1}$

Solution:
Step 1: ${\displaystyle y=4x-1}$
Step 2: ${\displaystyle x=4y-1}$
Step 3: ${\displaystyle 4y=x+1}$
${\displaystyle y={\frac {x+1}{4}}}$
Step 4: ${\displaystyle f^{-1}(x)={\frac {x+1}{4}}}$

2) ${\displaystyle f(x)={\frac {3}{2}}x+1}$

Solution:
Step 1: ${\displaystyle y={\frac {3}{2}}x+1}$
Step 2: ${\displaystyle x={\frac {3}{2}}y+1}$
Step 3: ${\displaystyle {\frac {3}{2}}y=x-1}$
${\displaystyle y={\frac {3}{2}}(x-1)}$
Step 4: ${\displaystyle f^{-1}(x)={\frac {3}{2}}(x-1)}$