# Graphs

Given a function $$f$$, a point $$\xo$$ is

- a local maximum if, for all $$x$$ around $$\xo$$, $$$f(x)\le f(\xo);$$$
- a local minimum if, for all $$x$$ around $$\xo$$, $$$f(x)\ge f(\xo).$$$

An extremum is either a minimum or a maximum. A local extremum is sometimes called a turning point or a relative extremum.

$$0$$ is a minimum of $$ x^2$$ and a maximum of $$ -x^2$$.

**At a local extremum, the tangent must be horizontal** $$$ f'(\xo)=0. $$$

At a local maximum $$\xo$$, $$f$$ "increases" to its left, so $$f'(\xo)\ge 0$$, and "decreases" to its right, so $$f'(\xo)\le 0$$. Thus, $$f'(\xo)=0$$.

A stationary point $$\xo$$ of a function $$f$$ has horizontal tangent $$$ f'(\xo) = 0 $$$

A point of inflection is a stationary point that is not an extremum.

In practice, a stationary point $$\xo$$ is

- a local maximum if $$f''(\xo)\lt 0$$,
- a local minimum if $$f''(\xo) \gt 0$$,
- a point of inflection if $$f''$$ changes sign around $$\xo$$.

$$0$$ is a stationary point of $$$f_1(x) = x^2,\quad f_2(x)= x^3,\quad f_3(x) = -x^2.$$$ It is minimum of $$f_1$$ ($$f''_1(0)= 2$$), a maximum of $$f_3$$ ($$f''_3(0)= -2$$) and an inflection point of $$f_2$$ ($$f''_2(x) = 6x$$).

We show that, when $$f''(\xo)\lt 0$$, $$\xo$$ is a local maximum. $$f'$$ is decreasing and $$0$$ at $$\xo$$. On the left of $$\xo$$, $$f'$$ is positive, so $$f$$ is increasing, so $$f(x)\le f(\xo)$$. Similarly, on its right, $$f(x)\le f(\xo)$$.

An asymptote is a straight line tangent to a function at infinity.

- A vertical asymptote is a line of the form $$x=a$$ when $$$\lim_{x\to \pm a}f(x) = \pm\infty.$$$ The function has an infinite limit at $$a$$ when $$x$$ approaches $$a$$ either from below ($$ x\to a-$$) or from above ($$ x\to a+$$).
- A horizontal asymptote is a line of the form $$y=b$$ when $$$\lim_{x\to \pm\infty}f(x) = b.$$$ The function has a limit when $$x$$ goes to infinity.
- An oblique asymptote is a line $$y = ax + b$$ ($$a\ne 0$$) when $$$\lim_{x\to\pm\infty}\big(f(x)-ax\big) = b.$$$

$$f(x) = 2(x-1)/x$$ has two asymptotes: $$x = 0$$ and $$y=2$$.

The graph of modified functions can often be deduced from simple geometrical transformations of the graph of the original function. To deduce the transformation, we often consider how a few points on the graph are modified from the original graph and then extrapolate.

We explain which modified function corresponds to the appropriate transformation on the graph of $$f$$. $$a\ne 0$$ is a fixed number.

- Horizontal translation of $$a$$: $$f(x-a)$$
- Vertical translation of $$a$$: $$f(x)+a$$
- Horizontal scaling of ratio $$1/a$$: $$f(ax)$$. It is a stretch or dilation if $$\vert a\vert \lt 1$$ and a compression if $$\vert a\vert \gt 1$$.
- Vertical scaling of ratio $$1/a$$: $$af(x)$$
- Horizontal reflection (along vertical axis): $$f(-x)$$
- Vertical reflection (along horizontal axis): $$-f(x)$$
- Rotation of angle $$\pi$$ about the origin:$$-f(-x)$$

It is often useful to be able to apply more elaborate graph transformations. The methodology is unchanged: draw the function, see how it changes a few points and extrapolate to get the full graph.

- $$f(\vert x\vert)$$:
**Horizontal reflection**of the graph of $$f$$ for $$x\ge0$$. - $$\vert f(x)\vert$$:
**Vertical reflection**of the negative part of the graph of $$f$$. - $$1/f(x)$$:
**roots**of $$f$$ (solutions of $$f(x)=0$$) are transformed into**vertical asymptotes**; monotonicity is transformed into**inverse monotonicity**(if $$f$$ is increasing, $$1/f$$ is decreasing); when $$\vert f(x)\vert = 1$$, graphs $$f$$ and $$1/f$$ intersect. - $$y^2=f(x)$$: when $$f(x)\lt 0$$, $$y$$ is undefined; if $$f(x)\ge 0$$, $$y$$ is the graph
**superposition**of the graphs of the functions $$\sqrt{f(x)}$$ and $$-\sqrt{f(x)}$$; monotonicity of $$\sqrt{f(x)}$$ and $$f$$ is same; when $$f(x) = 1$$, graphs $$f$$ and $$\sqrt{f}$$ intersect.