Curve sketching¶
Exercises · Derivatives · with worked solutions · PDF
Exercise 1
For each of the following functions of the real variable \(x\), determine:
-
the domain and the limits at its endpoints, pointing out any continuous extensions;
-
any local extrema and the intervals of monotonicity;
-
any inflection points and the intervals of convexity;
-
any asymptotes;
-
a qualitative graph that takes into account all the previous elements.
Exercise 2
Solution
The function \(f(x)=x-\frac{1}{x}\) is defined for \(x\neq0\), hence its natural domain \(D\) is given by
We have
in particular the line \(x=0\) (the \(y\)-axis) is a vertical asymptote. From
it then follows that the line \(y=x\) is an oblique asymptote as \(x\to\pm\infty\). The presence of these asymptotes can also be obtained from analytic geometry: the curve with equation \(y=x-\frac{1}{x}\), in implicit form \(x^{2}-xy-1=0\), is a hyperbola whose asymptotes are precisely the lines \(x=0\) and \(y=x\) (the asymptotes of a hyperbola are obtained by setting equal to \(0\) the homogeneous part of degree \(2\) of the equation).
The function \(f(x)\) is infinitely differentiable on its domain \(D\). The first derivative is
and \(f'(x)>0\) for every \(x\in D\). Hence the function \(f(x)\) is strictly increasing on the interval \((-\infty,0)\) and also strictly increasing on the interval \((0,+\infty)\).
The second derivative is
and it has the opposite sign of \(x\). Hence the function \(f(x)\) is strictly convex on the interval \((-\infty,0)\) and strictly concave on the interval \((0,+\infty)\).
The position of the graph with respect to the oblique asymptote is easily deduced from \(f(x)-x=-1/x\): we have \(f(x)>x\) for \(x<0\) while \(f(x)<x\) for \(x>0\).
Now collect all the previous elements in a qualitative graph.
Exercise 3
Solution
The function \(f(x)=\frac{\sqrt{x}}{\sqrt{x}-1}\) is defined for \(x\geq0\), \(x\neq1\), hence its natural domain \(D\) is given by
We have
in particular the line \(x=1\) is a vertical asymptote and the line \(y=1\) is a horizontal asymptote as \(x\to+\infty\).
The function \(f(x)\) is continuous on \(D\) and infinitely differentiable on \(D\setminus\{0\}\). At the point \(x=0\) the difference quotient has limit
hence the function \(f(x)\) is not differentiable at \(x=0\) and at the point \((0,0)\) the graph has the \(y\)-axis as a vertical tangent.
For \(x\in D\setminus\{0\}\) the first derivative is
and \(f'(x)<0\) for every \(x\). Hence the function \(f(x)\) is strictly decreasing on the interval \([0,1)\) and also strictly decreasing on the interval \((1,+\infty)\).
The second derivative is
which vanishes at \(x=1/9\), is positive for \(0<x<1/9\), negative for \(1/9<x<1\), and positive again for \(x>1\). Hence the function \(f(x)\) is strictly convex on the interval \((0,1/9)\), strictly concave on the interval \((1/9,1)\), and strictly convex again on the interval \((1,+\infty)\). At \(x=1/9\) there is an inflection point: at the point \((1/9,-1/2)\) the graph crosses from above to below the tangent line.
Now collect all the previous elements in a qualitative graph.
Exercise 4
Solution
The function \(f(x)=\sqrt{x^{2}-1}-\sqrt{x^{2}+1}\) is defined for \(x\leq-1\), \(x\geq1\), hence its natural domain \(D\) is given by
The function under consideration is even: the following study could be restricted to the interval \([1,+\infty)\). We have
in particular the line \(y=0\) (the \(x\)-axis) is a horizontal asymptote as \(x\to\pm\infty\). We then have
The function \(f(x)\) is continuous on \(D\) and infinitely differentiable on \(D\setminus\{-1,1\}\).
For \(x\in D\setminus\{-1,1\}\) the first derivative is
and it has the same sign as \(x\). Hence the function \(f(x)\) is strictly decreasing on the interval \((-\infty,-1)\) and strictly increasing on the interval \((1,+\infty)\).
At the points \(x=\pm1\) we have
hence the function \(f(x)\) is not differentiable at \(x=\pm1\) and at the points \((\pm1,-\sqrt{2})\) the graph has a vertical tangent.
The second derivative is
and it is negative for every \(x\). Hence the function \(f(x)\) is strictly concave on the interval \((-\infty,-1)\) and on the interval \((1,+\infty)\).
Now collect all the previous elements in a qualitative graph, respecting in particular the symmetry of the graph with respect to the \(y\)-axis (even symmetry).
Exercise 5
Solution
The function \(f(x)=\frac{\sqrt{2x-1}}{\log(2x-1)}\) is defined for \(2x-1>0\), \(2x-1\neq1\), hence its natural domain \(D\) is given by
We have
in particular the line \(x=1\) is a vertical asymptote. The order of infinity of \(f(x)\) as \(x\to+\infty\) is lower than that of \(\sqrt{x}\), which rules out an oblique asymptote (the order of infinity of functions with an oblique asymptote is that of \(x\)).
The function \(f(x)\) is continuous on \(D\); the limit \(\lim_{x\to1/2}f(x)=0\) allows us to extend the function continuously also to \(x=1/2\) by setting \(f(1/2)=0\).
The function is infinitely differentiable on \(D\). The first derivative is
At the point \(x=1/2\), the difference quotient of the continuous extension has limit
The continuous extension of \(f\) is not differentiable at \(x=1/2\). At the point \((1/2,0)\) its graph has a vertical tangent.
Going back to \(f'(x)\) at the points of \(D\), we have \(f'(x)>0\) for \(x>(e^{2}+1)/2\), \(f'(x)<0\) for \(x<(e^{2}+1)/2\), \(f'(x)=0\) for \(x=(e^{2}+1)/2\). Hence the function \(f(x)\) is strictly decreasing on the interval \((1/2,1)\) and on the interval \((1,(e^{2}+1)/2)\), and strictly increasing on the interval \(((e^{2}+1)/2,+\infty)\). The point \(x=(e^{2}+1)/2\) is a local minimum point with value \(f((e^{2}+1)/2)=e/2\).
The second derivative is
and it is positive for \(x\in(1/2,(e^{-\sqrt{8}}+1)/2)\), negative for \(x\in((e^{-\sqrt{8}}+1)/2,1)\), positive for \(x\in(1,(e^{\sqrt{8}}+1)/2)\), negative for \(x\in((e^{\sqrt{8}}+1)/2,+\infty)\). It follows that \(f\) is strictly convex for \(x\in(1/2,(e^{-\sqrt{8}}+1)/2)\), strictly concave for \(x\in((e^{-\sqrt{8}}+1)/2,1)\), strictly convex for \(x\in(1,(e^{\sqrt{8}}+1)/2)\), strictly concave for \(x\in((e^{\sqrt{8}}+1)/2,+\infty)\). The points \(x=(e^{\pm\sqrt{8}}+1)/2\) are inflection points with respective values \(f((e^{\pm\sqrt{8}}+1)/2)=\pm e^{\pm\sqrt{2}}/\sqrt{8}\).
Now collect all the previous elements in a qualitative graph.
Exercise 6
Solution
The function \(f(x)=xe^{\frac{1}{x}}\) is defined for \(x\neq0\), hence its natural domain \(D\) is given by
We have
in particular the line \(x=0\) (the \(y\)-axis) is a vertical asymptote. As \(x\to\pm\infty\), from \(e^{y}=1+y+o(y)\) as \(y\to0\), we obtain
hence the line \(y=x+1\) is an oblique asymptote as \(x\to\pm\infty\).
The function \(f(x)\) is continuous on \(D\); the limit \(\lim_{x\to0^{-}}f(x)=0\) allows us to extend the function continuously from the left to \(x=0\) by setting \(f(0)=0\).
The function is infinitely differentiable on \(D\). The first derivative is
At the point \(x=0\), the left difference quotient of the extension has limit
The left continuous extension of \(f\) is left-differentiable at \(x=0\) with \(f'_{-}(0)=0\). The negative \(x\) half-axis is a tangent half-line to the graph at the point \((0,0)\).
Going back to \(f'(x)\) at the points of \(D\), we have \(f'(x)>0\) for \(x<0\), \(f'(x)<0\) for \(0<x<1\), again \(f'(x)>0\) for \(x>1\), and \(f'(x)=0\) for \(x=1\). Hence the function \(f(x)\) is strictly increasing on the interval \((-\infty,0)\), strictly decreasing on the interval \((0,1)\), and strictly increasing again on the interval \((1,+\infty)\). The point \(x=1\) is a local minimum point with value \(f(1)=e\).
The second derivative is
and it has the same sign as \(x\). It follows that \(f\) is strictly convex for \(x\in(0,+\infty)\) and strictly concave for \(x\in(-\infty,0)\).
Now collect all the previous elements in a qualitative graph.
Exercise 7
Solution
The function \(f(x)=e^{\frac{1-|x|}{1+x}}\) is defined for \(x\neq-1\), hence its natural domain \(D\) is given by
On the set \((-\infty,-1)\cup(-1,0]\) the function is constant: \(f(x)=e^{\frac{1+x}{1+x}}=e\) for every \(x\leq0\), \(x\neq-1\). Obviously we can extend the function continuously to \(x=-1\) by defining \(f(-1)=e\). We then have
in particular the line \(y=1/e\) is a horizontal asymptote as \(x\to+\infty\).
The function \(f(x)\) is continuous on \(D\).
The function is infinitely differentiable on \(D\setminus\{0\}\). The first derivative is obviously \(0\) for \(x<0\), while it is
At the point \(x=0\), the left derivative is \(0\) while
The function is not differentiable at \(x=0\) since \(f'_{-}(0)\neq f'_{+}(0)\). The graph has a corner point at \((0,e)\): on the left it consists of the half-line \(y=e\), \(x\leq0\), while the right branch has tangent half-line \(y=-2ex+e\), \(x\geq0\).
We then have \(f'(x)<0\) for every \(x>0\), hence \(f\) is strictly decreasing on the interval \((0,+\infty)\).
Since the function is constant for \(x\leq0\), we only need to compute the second derivative for \(x>0\), where it is
and it is positive. It follows that \(f\) is strictly convex for \(x\in(0,+\infty)\).
Now collect all the previous elements in a qualitative graph.
Exercise 8
Solution
The function \(f(x)=\left|\frac{\log x}{x}\right|\) is defined for \(x>0\), hence its natural domain \(D\) is given by
where its expression can be simplified to
Keep in mind, now and in what follows, the sign of \(\log x\), which gives \(|\log x|=-\log x\) for \(0<x<1\) and \(|\log x|=\log x\) for \(x>1\). We have
in particular the line \(x=0\) (the \(y\)-axis) is a vertical asymptote while the line \(y=0\) (the \(x\)-axis) is a horizontal asymptote as \(x\to+\infty\).
The function \(f(x)\) is continuous on \(D\), it clearly takes only non-negative values, and the point \(x=1\), where \(f(1)=0\), is an absolute minimum point.
The function is infinitely differentiable on \(D\setminus\{1\}\). The first derivative is
At the point \(x=1\), the left derivative is
while the right derivative is
The function is not differentiable at \(x=1\) since \(f'_{-}(1)\neq f'_{+}(1)\). The graph has a corner point at \((1,0)\): on the left the tangent half-line has equation \(y=-x+1\), on the right \(y=x-1\).
Solution
We then have \(f'(x)<0\) for every \(x\in(0,1)\), hence \(f\) is strictly decreasing on the interval \((0,1)\). We have \(f'(x)>0\) for every \(x\in(1,e)\) and \(f'(x)<0\) for every \(x\in(e, +\infty)\), \(f'(e)=0\), hence \(f\) is strictly increasing on the interval \((1,e)\) and strictly decreasing on the interval \((e,+\infty)\); the point \(x=e\) is a relative maximum point with value \(f(e)=1/e\).
On \(D\setminus\{1\}\) the second derivative is
It follows that \(f\) is strictly convex for \(x\in(0,1)\) and on \((e^{3/2},+\infty)\); strictly concave on \((1,e^{3/2})\). The point \(x=e^{3/2}\) is an inflection point with value \(f(e^{3/2})=3/2e^{3/2}\).
Now collect all the previous elements in a qualitative graph.
Exercise 9
Solution
The function \(f(x)=\sqrt{1-|e^{2x}-1|}\) is defined for \(|e^{2x}-1|\leq1\), hence for \(-1\leq e^{2x}-1\leq1\), from which \(0\leq e^{2x}\leq2\) and finally \(x\leq(\log2)/2\), since \(e^{2x}>0\) for every \(x\). The natural domain \(D\) is given by
Keep in mind, now and in what follows, the sign of \(e^{2x}-1\), which gives \(|e^{2x}-1|=1-e^{2x}\) for \(x<0\) and \(|e^{2x}-1|=e^{2x}-1\) for \(x>0\). In particular
The behavior of \(e^{x}\) for \(x<0\) is well known; in particular it follows that
(the \(x\)-axis is a horizontal asymptote as \(x\to-\infty\)) and that \(f\) is strictly increasing on \((-\infty,0)\). We then have
The function \(f(x)\) is continuous on \(D\), it clearly takes only non-negative values, and the point \(x=(\log2)/2\), where \(f((\log2)/2)=0\), is an absolute minimum point.
The function is infinitely differentiable on \(D\setminus\{0,(\log2)/2\}\). The first derivative is
At the point \(x=0\), the left derivative is
while the right derivative is
The function is not differentiable at \(x=0\) since \(f'_{-}(0)\neq f'_{+}(0)\). The graph has a corner point at \((0,1)\): on the left the tangent half-line has equation \(y=x+1\), on the right \(y=-x+1\).
Solution
At the point \(x=(\log2)/2\) we have
The function is not differentiable at \(x=(\log2)/2\). At the point \(((\log2)/2,0)\) the graph has a vertical tangent.
We then have \(f'(x)<0\) for every \(x\in(0,(\log2)/2)\), hence \(f\) is strictly decreasing on the interval \((0,(\log2)/2)\). The point \(x=0\) is an (absolute) maximum point with value \(f(0)=1\).
On \((-\infty,0)\) the function coincides with \(e^{x}\), and it is well known that the exponential function is strictly convex. We then have
which is negative on that interval. It follows that \(f\) is strictly concave for \(x\in(0,(\log2)/2)\).
Now collect all the previous elements in a qualitative graph.
(i) The function \(f(x)=x-\arctan x\) has natural domain \(D=\R\) with
It is an odd function, which would allow us to study it only for \(x\geq0\).
From
it then follows that the function has the oblique asymptotes
The function is infinitely differentiable on all of \(\R\). The first derivative is
with \(f'(0)=0\) and \(f'(x)>0\) for every \(x\neq0\). It follows that \(f\) is strictly increasing on all of \(\R\) and that the point \(x=0\) is an inflection point with horizontal tangent, with corresponding value \(f(0)=0\).
The second derivative is
and it has the same sign as \(x\). In particular \(f\) is strictly concave on \((-\infty,0)\) and strictly convex on \((0,+\infty)\).
Now collect all the previous elements in a qualitative graph, respecting the central symmetry of the graph with respect to the origin (odd symmetry).
Exercise 10
Solution
The function \(f(x)=x-\arctan x\) has natural domain \(D=\R\) with
It is an odd function, which would allow us to study it only for \(x\geq0\).
From
it then follows that the function has the oblique asymptotes
The function is infinitely differentiable on all of \(\R\). The first derivative is
with \(f'(0)=0\) and \(f'(x)>0\) for every \(x\neq0\). It follows that \(f\) is strictly increasing on all of \(\R\) and that the point \(x=0\) is an inflection point with horizontal tangent, with corresponding value \(f(0)=0\).
The second derivative is
and it has the same sign as \(x\). In particular \(f\) is strictly concave on \((-\infty,0)\) and strictly convex on \((0,+\infty)\).
Now collect all the previous elements in a qualitative graph, respecting the central symmetry of the graph with respect to the origin (odd symmetry).
Exercise 11
Solution
The function \(f(x)=1-x^{2}+\log|x|\) is defined for \(x\neq0\), hence its natural domain \(D\) is given by
It is an even function, which would allow us to study it only for \(x>0\).
From \(f(x)\sim-x^{2}\) as \(x\to\pm\infty\) we have
and we deduce that the function has no oblique asymptotes. We then have
in particular the line \(x=0\) (the \(y\)-axis) is a vertical asymptote.
The function is infinitely differentiable on all of \(D\). The first derivative is
Analyzing its sign for \(x>0\), we have \(f'(\sqrt{1/2})=0\), \(f'(x)>0\) for \(0<x<\sqrt{1/2}\), \(f'(x)<0\) for \(x>\sqrt{1/2}\). It follows that \(f\) is strictly increasing on \((0,\sqrt{1/2})\), strictly decreasing on \((\sqrt{1/2},+\infty)\), and that the point \(x=\sqrt{1/2}\) is an (absolute) maximum point with corresponding value \(f(\sqrt{1/2})=1/2-(\log2)/2\). In particular the graph meets the \(x\)-axis at two points with positive abscissa. One of these points is \(x=1\); the other has abscissa in the interval \((0,\sqrt{1/2})\) and can be approximated, if needed, with one of the algorithms studied for finding the zeros of smooth functions.
The study of monotonicity and extrema of \(f\) for \(x<0\) follows by even symmetry: the point \(x=-\sqrt{1/2}\) is an (absolute) maximum point with corresponding value \(f(-\sqrt{1/2})=1/2-(\log2)/2\), etc., etc.
The second derivative is
and it is negative for every \(x\in D\). In particular \(f\) is strictly concave both on \((-\infty,0)\) and on \((0,+\infty)\).
Now collect all the previous elements in a qualitative graph, respecting the axial symmetry of the graph with respect to the \(y\)-axis (even symmetry).