MATH 120 - Day 3

2024-09-09 13:34:40 -0400 EDT


Functions

Formal Definition: A function is a tripe (f, X, Y) where X and Y are sets and f is a rule which assigns ever element of x to an element of y.

Example: $ X = [0, 2\pi], Y = [-1, 1], f(x) = \sin{x}$ Note: A graph of a function must only have a y value per x (vertical line text)

Branched Functions = f(x) = $ \left(\begin{array}{rrrr} \text{formula for } x \in x_1 \\ \text{formula for } x \in x_2 \\ \text{formula for } x \in x_3 \end{array}\right) $

The X and Y in this context will almost always be $ x = \mathbb{R}, y = \mathbb{R}$

Example: $ g(x) = || x | - 1 |$ \

$\text{if } x \geq 0 \text{ then } |x| = x \text{ and } || x | -1 | = | x - 1 |$
    $\text{if } x - 1 \geq 0 \Leftrightarrow x \geq 1 \text{ then } | - x - 1 | = x - 1$
    $\text{if } x - 1 \le 0 \Leftrightarrow x \le 1 \text{ then } | - x - 1 | = - x + 1$
$\text{if } x \le 0 \text{ then } |x| = -x \text{ and } || x | -1 | = | - x + 1 |$
    $\text{if } - x - 1 \geq 0 \Leftrightarrow x \geq -1 \text{ then } | - x - 1 | = - x - 1$
    $\text{if } - x - 1 \le 0 \Leftrightarrow x \le -1 \text{ then } | - x - 1 | = x + 1$

$ g(x) = ||x| - 1 | = \left(\begin{array}{rrrrrrrr} x - 1 \text{ if } x \geq 1\\ - x + 1 \text{ if } 0 \leq x \leq 1\\ - x - 1 \text{ if } x \leq -1\\ x + 1 \text{ if } -1 \leq x \leq 0 \end{array}\right) $

Notation for a function: $ f: x \leftarrow y $


Domain

Definition: the domain of a function is set X

Note: The domain is rarely specified. It is either obvious or you have to solve for it

Examples:
$ f(x) = \sqrt{x}, \text{ domain(f)} = [0, \infty)$
$ f(x) = \frac{1}{x}, \text{ domain(f)} = \lbrace x \in \mathbb{R} | x \neq 0 \rbrace$

$\text{ domain(f)}, f(x) = \ln (| 3x + 2 | - 4)$

ln(x) is well defined for $y \in (0, \infty) = \lbrace x \in \mathbb{R} | x \neq 0 \rbrace$
f(x) is well defined iff | 3x + 2 | - 4 > 0
$ \begin{align} | 3x + 2 | - 4 > 0 \\ \Leftrightarrow& \ | 3x + 2 | > 4 \\ \Leftrightarrow& \ 3x + 2 > 4 \text{ or } 3x + 2 < -4 \\ \Leftrightarrow& \ 3x > 2 \text{ or } 3x < -6 \\ \Leftrightarrow& \ x > 2/3 \text{ or } x < -2 \end{align} $

$\therefore \text{ domain(f) } = (\frac{2}{3}, \infty) \cup (-\infty, -2)$


Range

Definition: the range of a function is:
range(f) = $ \lbrace f(x) | x \in \mathbb{R} X \rbrace \subset Y$

Example
f(x) = sin(x), range(f) = [-1, 1]
f(x) = $e^x$, range(f) = $(0, \infty) = \lbrace x \in \mathbb{R} | x \ge 0 \rbrace $


Composition

$ f: x \leftarrow y $ and $ g: x \leftarrow z $
$ x \leftarrow y \leftarrow z \Leftrightarrow g \circ f$

Definition: the composition of f and g is the function given by $g \circ f(x) = g(f(x))$ for all domain of f

Note: the range of f must ne in g
range(f) $\subset$ domain(g)