## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. | $x$ | \| | $2$ | $4$ | $6$ | $8$ | $10$ | $12$ | |-----|-|----|-----|-----|---|----|----| | $f(x)$ | \| | $13$ | $\pi$ | $\frac12$ | $1$ | $1$ | $3$ | --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x$ if $x$ is an integer, and $f(x) = t$ such that $t$ is the number of pixels used to render the letter $x$ in this font, if $x$ is not an integer. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. $f:X\to Y$ has *domain* $X$, the set of inputs, *codomain* $Y$, the set that all the outputs belong to, *range* (or *image*) $f(X)=\\{y\in Y$ such that $y=f(x)$ for some $x\in X\\}$. Can use a table, a rule, a formula to define a function. $f(x) = x^2 - \sin(x)$ Most of our functions will be defined by formulae. --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. If $x$ is fixed, then $f(x)$ is fixed. $f$ is the function, $f(x)$ means "the function $f$ evaluated at the input $x$" means "the output of $f$ which corresponds to the input $x$". --- ## Functions A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. But different inputs could give the same output. #### Example $f:\mathbb R\to\mathbb R$ defined by $f(x) = x^2$ has $f(-x)=f(x)$ for all $x$, so $f$ is not injective. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. --- ## Functions: injectivity and surjectivity A function is a machine that takes in things and puts out things. Usually, the things are real numbers. A function always gives the same output for the same input. #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. --- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective. #### Examples Which of the following are injective, surjective, bijective on domain $\mathbb R$ and codomain $\mathbb R$? $f(x) = x^3, \\;\\; g(x) = x^3-x, \\;\\; h(x) = \frac1{\lvert x \rvert +1}, \\;\\; p(x) = \sin(x)$, $q(x) = 5, \\;\\; r(x) = x+\lceil x \rceil$. (How) can you restrict their domains and codomains to make them bijective? --- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $f(x) = x^3$. Every horizontal line crosses the curve $\leq1$ time, so $f$ is injective. Every horizontal line crosses the curve $\geq1$ time, so $f$ is surjective. $f$ is both injective and surjective, so it is bijective.

--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $g(x) = x^3-x$. Some horizontal lines cross the curve $>1$ time, so $g$ is not injective. Every horizontal line crosses the curve $\geq1$ time, so $g$ is surjective. $g$ is not injective, so it is not bijective.

--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $h:\mathbb R\to\mathbb R$ given by $h(x) = \frac1{\lvert x \rvert +1}$ is neither injective nor surjective. But $h:[0,\infty)\to(0,1]$ would be bijective. $h:(-\infty,0]\to(0,1]$ would be bijective.
")
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $p:\mathbb R\to\mathbb R$ given by $p(x) = \sin(x)$ is neither injective nor surjective. But $p:[\frac{-\pi}2,\frac\pi2]\to[-1,1]$ would be bijective. $p:[\frac{-3\pi}2,\frac{-\pi}2]\to[-1,1]$ would be bijective. $p:[-\pi,0]\to[-1,0]$ would be surjective but not injective.
")
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $q:\mathbb R\to\mathbb R$ given by $q(x) = 5$ is neither injective nor surjective. To make $q$ bijective, we would have to its domain and codomain to single points.
--- ## Functions: injectivity and surjectivity #### Definition A function $f$ is *injective* if $f(x_1)=f(x_2) \implies x_1=x_2$. A function $f:X\to Y$ is *surjective* if its range is its codomain; if $\\,\forall y \in Y,\\;\exists\\,x \in X$ such that $f(x)=y$. A function is *bijective* if it is both injective and surjective.
#### Examples $r:\mathbb R\to\mathbb R$ given by $r(x) = x+\lceil x\rceil$ is injective but not surjective. But $r:(0,1]\to(1,2]$ would be bijective. $r:(0,2]\to(1,2]\cup(3,4]$ would be bijective. $r:(0,2]\to(1,4]$ would be injective but not surjective.
")
--- ## Limit estimation Let $f:\mathbb R \to\mathbb R$ and $a\in\mathbb R$. Informally, $\displaystyle \ell=\lim_{x\to a}f(x)$ is "the value $f(x)$ gets close to when $x$ gets close to $a$". We need a more formal definition of limits for this course, because we need to be able to *prove* what $\ell$ is. We need to prove what $\ell$ is because estimating can result in mistakes. [Excel file demonstrating the dangers of estimating limits](https://nc.dasmithmaths.com/index.php/s/H2HgtQMrWDxbiJB) --- ## Limits of real functions #### Definition Suppose $c\lt a\lt d$ and $f:(c,a)\cup(a,d):\to\mathbb R$. Then $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### Or, in words,
No matter how small we pick $\varepsilon>0$
,
we can always go close enough to $a$ (ie. $\delta$ close) to ensure that
all $x$ closer to $a$ (ie. within $\delta$ of $a$) give
$f(x)$ within $\varepsilon$ of $\ell$
. #### Notation In this case, we write $\displaystyle \lim\_{x\to a} f(x) = \ell$. [Excel file demonstrating how a limit is defined](https://nc.dasmithmaths.com/index.php/s/b29754YarxgnEsC) --- ## Limits of real functions #### Definition Suppose $c\lt a\lt d$ and $f:(c,a)\cup(a,d):\to\mathbb R$. Then $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### Or, in words,
No matter how small we pick $\varepsilon>0$
,
we can always go close enough to $a$ (ie. $\delta$ close) to ensure that
all $x$ closer to $a$ (ie. within $\delta$ of $a$) give
$f(x)$ within $\varepsilon$ of $\ell$
. #### How to prove convergence if you know the limit Construct a machine (a function) that
tells you $\delta$
for any given $\varepsilon$
, and that $\delta$
d
o
e
s
t
h
e
j
o
b
. --- ## Limits of real functions #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### How to prove convergence if you know the limit Construct a machine (a function) that
tells you $\delta$
for any given $\varepsilon$
, and that $\delta$
d
o
e
s
t
h
e
j
o
b
. #### Theorem If $f(x)=x^2$ then $\lim_{x\to0}f(x) = 0$. #### Proof For any $\varepsilon>0$, let $\delta=\sqrt\varepsilon$. If $\lvert x-0 \rvert \lt \delta$, then $\left\lvert f(x)-0 \right\rvert = \lvert x^2 \rvert = x^2 \lt \delta^2 = \varepsilon$. □ --- ## Limits of real functions #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### How to prove convergence if you know the limit Construct a machine (a function) that
tells you $\delta$
for any given $\varepsilon$
, and that $\delta$
d
o
e
s
t
h
e
j
o
b
. #### Theorem If $f(x)=x^2$ then $\lim_{x\to0}f(x) = 0$. #### Rough work I want to make $\left\lvert f(x)-0 \right\rvert \lt \varepsilon$. I calculate $\left\lvert f(x)-0 \right\rvert = \left\lvert x^2 \right\rvert = x^2$ and I'm allowed to insist $\lvert x-0 \rvert \lt \delta$, which implies $x^2 \lt \delta^2$. So I just need $\delta^2 \leqslant \varepsilon$. So choose $\delta = \sqrt\varepsilon$. --- ## Limits of real functions #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### Theorem If $f(x)=x^2$ then $\lim_{x\to0}f(x) = 0$. #### Rough work I want to make $\left\lvert f(x)-0 \right\rvert \lt \varepsilon$. I calculate $\left\lvert f(x)-0 \right\rvert = \left\lvert x^2 \right\rvert = x^2$ and I'm allowed to insist $\lvert x-0 \rvert \lt \delta$, which implies $x^2 \lt \delta^2$. So I just need $\delta^2 \leqslant \varepsilon$. So choose $\delta = \sqrt\varepsilon$. #### Proof For any $\varepsilon>0$, let $\delta=\sqrt\varepsilon$. If $\lvert x-0 \rvert \lt \delta$, then $\left\lvert f(x)-0 \right\rvert = \lvert x^2 \rvert = x^2 \lt \delta^2 = \varepsilon$. □ --- ## Limits of real functions #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### Theorem If $f(x)=\frac{x+1}{2-x}$ then $\lim_{x\to1}f(x) = 2$. #### Proof For any $\varepsilon>0$, let $\delta=\min\\{\frac\varepsilon6,\frac12\\}$. If $\lvert x-1 \rvert \lt \delta$, then $6\lvert x-1 \rvert\lt\varepsilon$ and $\lvert 2-x \rvert = 2-x \gt \frac12$, so $\left\lvert\frac{x+1}{2-x} - 2 \right\rvert = \frac{3\lvert x-1 \rvert}{\lvert 2-x \rvert} \lt \frac{3\lvert x-1 \rvert}{\frac12} = 6 \lvert x-1 \rvert\lt\varepsilon$. □ --- ## Limits of real functions #### Theorem If $f(x)=\frac{x+1}{2-x}$ then $\lim_{x\to1}f(x) = 2$. #### Rough work I want to make $\left\lvert f(x)-2 \right\rvert \lt \varepsilon$. I calculate $\left\lvert f(x)-2 \right\rvert = \ldots = \frac{3\lvert x-1 \rvert}{\lvert 2-x \rvert}$ and I'm allowed to insist $\lvert x-1 \rvert \lt \delta$. If $x$ is close to $1$ then $\lvert 2-x \rvert$ is close to $1$ too. Quantitatively, if $\lvert x-1 \rvert \lt \frac12$, then $\frac12 \lt \lvert 2-x \rvert \lt \frac32$, so $\frac1{\lvert 2-x \rvert} \lt 2$. That tells me $\left\lvert f(x)-2 \right\rvert = \frac{3\lvert x-1 \rvert}{\lvert 2-x \rvert} \lt 6\lvert x-1 \rvert$. Now to achieve $\left\lvert f(x)-2 \right\rvert \lt \varepsilon$, all I need is $6\lvert x-1 \rvert \lt \varepsilon$; equivalently $\lvert x-1 \rvert \lt \frac\varepsilon6$. To make all this work, I need both $\lvert x-1 \rvert \lt \frac12$ and $\lvert x-1 \rvert \lt \frac\varepsilon6$. So choose $\delta = \min\\{\frac\varepsilon6,\frac12\\}$. --- ## Limits of real functions ### Why not input at the limit point? #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if for all $\varepsilon>0$, $\exists \delta>0$ such that $0 \lt \lvert x-a \rvert \lt \delta \implies$$\lvert f(x)-\ell \rvert < \varepsilon$.
Why $0 \lt \lvert x-a \rvert \lt \delta$ not just $\lvert x-a \rvert \lt \delta$? Consider $\chi\_{\\{3\\}}:\mathbb R\to\mathbb R$, the indicator function of the set $\\{3\\}$, which is $0$ everywhere except $1$ if the input is $3$.
")
We want limits to be defined so that $\displaystyle \lim\_{x\to3}\chi\_{\\{3\\}}(x) = 0$. --- ## Limits of real functions #### Definition $f(x)$ *converges* to *limit* $\ell\in\mathbb R$ as $x\to a$ if
for all $\varepsilon>0$
,
$\exists \delta>0$ such that
$0 \lt \lvert x-a \rvert \lt \delta \implies$
$\lvert f(x)-\ell \rvert < \varepsilon$
. #### Theorem If $f(x)=5x+3-\chi\_{\\{2\\}}(x)$ then $f(2)=12$ but $\lim_{x\to2}f(x) = ?$. #### Proof $f(2) = 5(2)+3-\chi\_{\\{2\\}}(1) = 10+3-1=12$. Your turn! $\ldots$ #### How to prove convergence if you know the limit Construct a machine (a function) that
tells you $\delta$
for any given $\varepsilon$
, and that $\delta$
d
o
e
s
t
h
e
j
o
b
. --- ## Limits of real functions #### Theorem If $f(x)=5x+3-\chi\_{\\{2\\}}(x)$ then $f(2)=12$ but $\lim_{x\to2}f(x) = ?$. #### Rough work If $x\approx2$ but $x\neq2$, then $f(x)\approx 5 (2) + 3 - 0 = 13$, so guess that the limit is $13$. I want to make $\left\lvert f(x)-13 \right\rvert \lt \varepsilon$. Suppose $x\neq2$. Then $f(x)=5x+3-0$. I calculate $\left\lvert f(x)-13 \right\rvert = \left\lvert 5x+3-13 \right\rvert = 5\left\lvert x-2 \right\rvert$ and I'm allowed to insist $0 \lt \lvert x-2 \rvert \lt \delta$. Now to achieve $\left\lvert f(x)-13 \right\rvert \lt \varepsilon$, all I need is $5\lvert x-2 \rvert \lt \varepsilon$; equivalently $\lvert x-2 \rvert \lt \frac\varepsilon5$. So choose $\delta = \frac\varepsilon5$. --- ## Limits of real functions #### Theorem If $f(x)=5x+3-\chi\_{\\{2\\}}(x)$ then $f(2)=12$ but $\lim_{x\to2}f(x) = ?$. #### Rough work If $x\approx2$ but $x\neq2$, then $f(x)\approx 5 (2) + 3 - 0 = 13$, so guess that the limit is $13$. I want to make $\left\lvert f(x)-13 \right\rvert \lt \varepsilon$. Suppose $x\neq2$. Then $f(x)=5x+3-0$. I calculate $\left\lvert f(x)-13 \right\rvert = \left\lvert 5x+3-13 \right\rvert = 5\left\lvert x-2 \right\rvert$ and I'm allowed to insist $0 \lt \lvert x-2 \rvert \lt \delta$. Now to achieve $\left\lvert f(x)-13 \right\rvert \lt \varepsilon$, all I need is $5\lvert x-2 \rvert \lt \varepsilon$; equivalently $\lvert x-2 \rvert \lt \frac\varepsilon5$. So choose $\delta = \frac\varepsilon5$. #### Proof For any $\varepsilon>0$, let $\delta=\frac\varepsilon5$. If $0 \lt \lvert x-2 \rvert \lt \delta$, then $\left\lvert f(x)-13 \right\rvert = \left\lvert 5x+3-\chi\_{\\{2\\}}(x)-13 \right\rvert = 5 \lvert x-2 \rvert\lt5\frac\varepsilon5=\varepsilon$. □ --- ## Limits of real functions
Plot of $y=f(x)$. ")
$\displaystyle f(2)=$ $\displaystyle\lim\_{x\to2}f(x)=$
Some content
Some more content