Here we show how to sketch the graph of a function $f(x)$, using information obtained from the function itself and its derivatives. We may classify all the features according to its source, into zeroth, first, second order considerations.
It is impossible to get all the details correct, but it will help us get a sense of what the curve looks like.
In this HowDo, we will use $f(x) = x^{3}-3x-1$ as an example.
A function | $f(x)$ |
First, we need to compute the first and second derivatives of $f(x)$.
Second, we examine the features that can be extracted. These include:
- zeroth order: Domain, Intercepts, Asymptotes, Period, Symmetry.
- first order: Critical points, Extrema, Singular points, Monotonicity.
- second order: Inflection points, Concavity.
Lastly, we sketch the graph using the information obtained.
We given a function differentiable twice. First, we need to compute the following:
first derivative | $f'(x)$ |
second derivative | $f''(x)$ |
For our example $f(x) = x^{3}-3x-1$, we make the following computation:
$f(x)$ | $x^{3}-3x-1$ |
$f'(x)$ | $3x^2-3$ |
$f''(x)$ | $6x$ |
Zeroth-order information is the information you can get by inspecting $f(x)$. You may remember these as "DIAPS". We will go over them one by one.
Domain | (aka Domain of Definition) |
Intercepts | (x-intercepts, y-intercepts) |
Asymptotes | (horizontal, vertical, or sloped) |
Period | (if periodic) |
Symmetry | (even, odd or other kinds) |
The function $f(x) = x^{3}-3x-1$ is defined for all real numbers.
We need the x-intercepts (also called roots or zeros of the function) and the y-intercept.
For our example, we can say that there are three roots $x_1,x_2,x_3$ satisfying $x_1\in(-2,-1)$, $x_2\in(-1,0)$, and $x_3\in(1,2)$. These values are obtained by applying intermediate value theorem.
Luckily, finding the y-intercept is straightforward: we simply set $x=0$, to find $y =f(0) = -1$.
So the y-intercept is $-1$.
Finding the precise values of x-intercepts of a function is in general not feasible. However, there are several methods to ascertain their approximate positions. It is usually unnecessary to get a very precise value if we are only interested in describing the shape of the curve roughly.
(You can find more precise values by applying methods described in other HowDos, such as the method of bisection and Newton's method)
The function has no asymptote.
(See the HowDo about asymptotes for more detail. )
This is not a periodic function.
Usually, we only consider the periodicity of well-known functions like trigonometric functions and floor functions.
However, when only a component of a function is periodic, one can still exploit it to some extent.
Consider the function $g(x) = x^2\cos{x}$. We know the function is not periodic, but one may use the periodicity of $\cos{x}$ to sketch its graph. See the HowDo on envelope-oscillation sketching method.
There's no obvious symmetry to be exploited in this case.
(Actually, the function is symmetric around the point $(0,-1)$, but I did not notice it at first)
Symmetry refers to the situation when we apply a transformation of the plane to the graph of a function $f(x)$, we get exactly the same graph.
For example, for an even function, if we reflect the graph around $y$-axis, we would get the same graph back. And for an odd function, if we reflect the graph around the origin, we would get exactly the same graph.
In a sense, periodicity is also a particular form of symmetry, because it refers to the scenario when a translation to the left or to the right leaves the graph unchanged.
$$f(x) = x^3-3x-1$$
Domain | all real numbers $\mathbb{R}$ |
Intercepts | 3 x-intercepts, y-intercept: $-1$ |
Asymptotes | none |
Period | aperiodic |
Symmetry | none |
You may remember these as "CSME". We will go over them one by one.
Critical points | (where $f'(x) = 0$) |
Singular points | (where $f'(x)$ does not exist) |
Monotonicty | (intervals of increase or decrease) |
(Local) Extrema | (where local maximum or local minimum is achieved) |
If $f'(x) = 0$, we say $x$ is a critical point of $f(x)$.
We've already found $f'(x)=3x^2-3$, so the critical points are $x = 1, -1$.
This is where $f'(x)$ is not defined. Typically, only a few isolated points are singular points. It is possible for a local maximum or local minimum to occur at such a point. For instance, we consider $y= |x|$, for which $x=0$ is a local minimum and a singular point.
Our function $f(x)$ is differentiable everywhere, so there's no singular point.
If a function has a positive derivative on an interval, then it is strictly increasing on that interval. If a function has a negative derivative on an interval, then it is strictly decreasing on that interval. Therefore, from $f'$ we can find all the intervals where $f'>0$ or $f'<0$.
For our example $f(x) = x^3-3x-1$, we found $f'(x)>0$ when $x<-1$ or $x>1$, and $f'(x)<0$ when $-1
So we have the following conclusion:
$(-\infty, -1)$ | increasing |
$(-1, 1)$ | decreasing |
$(1, \infty)$ | increasing |
Typically, a critical point can be a local maximum, local minimum, or a saddle point. This is determined by the sign of f' around each critical point. A singular point could also be local extremum.
For instance, we find that $f'(x)>0$ when $x<-1$, $f'(x)<0$ when $-10$ when $x>1$. So $x = -1$ is a local maximum, with a value of $f(-1) = 1$, and $x=1$ is a local minimum, with a value of $f(1) = -3$.
Please see the HowDo on how to identify maxima and minima of a differentiable function.
local maximum | $(-1,1)$ |
local minimum | $(1,-3)$ |
Critical points | $(-1, 1)$ and $(1,-3)$ |
Singular points | none |
Monotonicity | increasing on $(-\infty, -1)$ and $(1,\infty)$, decreasing on $(-1,1)$ |
(Local) Extrema | local maximum $(-1,1)$, local minimum $(1,-3)$ |
Inflection points | (where $f''(x)=0$ and changes sign) |
Concavity | (up or down or neither) |
A inflection point $x$ is where $f''(x)=0$ and where $f''$ changes sign. We calculated $f''(x) = 6x$, so $x=0$ is an inflection point, and the only one. This is where the concavity of the function might change.
If $f''(x)>0$ on an interval, then $f$ is concave up on that interval. If $f''(x)<0$ on an interval, then $f$ is concave down on that interval.
For our example, since $f''(x) = 6x$, we know:
$(-\infty, 0)$ | concave down |
$(0, \infty)$ | concave up |
The most important aspect of the shape is obtained by considering the signs of $f'(x)$ and $f''(x)$. So we may draw a diagram of the signs of these function on each interval.
The end result is something like the diagram above!
We first sketch the relevant points, including all intercepts, local maxima and minima, inflection points.
Keep in mind when drawing the curve that these are the points that you need to pass through.
If you like, you can also compute other points on the curve. This would make the graph more accurate, although it requires more work.
If there is periodicity in the function or a part of the function, take this into account.
If there is symmetry, we need only draw part of the graph and reflect it to form the other part.
Next we sketch the aymptotes, if any. This gives the behaviour of the curve as at least one of the coordinates tend to $\infty$. This is covered in detail in the HowDo about finding the asymptotes.
Mark all $x$ coordinate where $f, f', f''$ equals to 0, and consider the sign of $f'$ and $f''$ on each of the resulting intervals.
When you're drawing the curve, remember the monotonicity (increasing or decreasing) of the curve and the concavity (up or down).
Lastly, draw a curve that is smooth except at singular points. At a singular point, you may find a cusp or an angle (these are rarely encountered in exams).
Comments (0)