2. Derivatives

Part 1.: problems, solutions.
Part 2.: problems, solutions.
Part 3.: problems, solutions.


We say that a function f is differentiable in point x_0, if there exists the limit:

    \[\lim_{x\to x_0}\frac{f(x)-f(x_0)}{x-x_0}\]

and is finite. Then this limit is called the derivative of f in x_0 and denoted as f'(x_0).

E.g. function f(x)=3x^2 is differentiable in x=2, because:

    \[\lim_{x\to 2}\frac{f(x)-f(2)}{x-2}=\lim_{x\to 2}\frac{3x^2-12}{x-2}=\]

    \[=\lim_{x\to 2}\frac{3(x-2)(x+2)}{x-2}=\lim_{x\to 2}3(x+2)=12,\]

so: f'(2)=12.

Function g(x)=\sqrt{|x|} is not differentiable in x=0, because:

    \[\lim_{x\to 0}\frac{\sqrt{|x|}-0}{x-0}=\lim_{x\to 0}\frac{1}{\sqrt{|x|}}=\infty,\]

so this limit is infinite.

Function h(x)=|x+1| is not differentiable in x=-1, because:

    \[\lim_{x\to -1^+}\frac{f(x)-f(-1)}{x-(-1)}=\lim_{x\to -1^+}\frac{x+1-0}{x-(-1)}=1,\]


    \[\lim_{x\to -1^-}\frac{f(x)-f(-1)}{x-(-1)}=\lim_{x\to -1^-}\frac{-x-1-0}{x-(-1)}=-1,\]

so the limit we need does not exist.

Derivatives of some simple functions

It is easy to calculate the following facts. They are useful to calculate derivatives of more complicated functions. Let a\in\mathbb{R}



    \[(a^x)'=a^x \ln a,\]

    \[(\sin x)'=\cos x,\]

    \[(\cos x)'=-\sin x,\]

    \[(\log_a x)'=\frac{1}{x\ln a}.\]

Arithmetic of derivatives

The arithmetic theorem of limits of functions implies immediately that:



if respective derivatives exist.

It is also easy to notice that in the case of multiplication it is not so easy — multiplying the expression in the definition does not give the expression for derivative of the product. Nevertheless, it is easy to check that:

    \[(f(x)\cdot g(x))'=f(x)g'(x)+f'(x)g(x)\]



if respective derivatives exist.

E.g. let f(x)=x^2\sin x+2^x-5. Then: f'(x)=(x^2\sin x)'+(2^x)'-(5)'=2x\sin x +x^2\cos x+2^x \ln 2+0=2x\sin x +x^2\cos x+2^x \ln 2+0.

Composition of functions

We have the following theorem. Given functions f,g and h(x)=f(g(x)), we have h'(x)=g'(x)f'(g(x)), if the derivatives of g in x and of f in g(x) exist.

Therefore e.g. (\sin x^2)'=2x\cos x^2.

Local extrema and intervals of monotonicity

Local minimum or respectively local maximum of a function is an argument x_0, such that there exists an interval (x_0-\delta,x_0+\delta), such that f(x_0) is the least or respectively the greatest value of the function in this interval.

We have the following theorem: if a function f has in x_0 local extreme and the derivative, then f'(x_0)=0. Attention: the reverse implication does not hold, so the points in which the derivative equals zero are merely the candidates for extrema.

E.g. f(x)=x^2 has minimum in x=0 and indeed f'(x)=2x, so f'(0)=0. On the other hand for g(x)=x^3 we get g'(x)=3x^2 so again g'(0)=0, but for x=0 the function does not have a local extreme.

We say that a function is strictly increasing (respectively non-decreasing, strictly decreasing, non-increasing) on an interval (a,b) if for any x,x', such that a<x<x'<b, we have f(x)<f(x') (respectively: f(x)\leq f(x'), f(x)>f(x'), f(x)\geq f(x')).

The following theorem holds: if f'(x)>0 (respectively: f'(x)\geq 0, f'(x)<0, f'(x)\leq 0) for any x\in (a,b), then f is strictly increasing (respectively non-decreasing, strictly decreasing, non-increasing) on (a,b).

E.g. for f(x)=x^2 we have f'(x)=2x<0 for x<0 and >0 for x>0. So f is strictly decreasing on (-\infty, 0) and strictly increasing on (0,\infty).

Therefore a function f continuous in x_0 has in x_0 local maximum (respectively minimum), if there exists an interval (x_0-\delta,x_0+\delta), such that f is differentiable in its every point, and f'(x)\geq 0 (respectively f'(x)\leq 0) for x\in (x_0-\delta,x_0) and f'(x)\leq 0 (respectively f'(x)\geq 0) for x\in (x_0,x_0+\delta).

E.g. x=0 is the local minimum of f(x)=x^2, given what we calculated above about its derivative.

Derivative of the inverse function

If f is strictly monotone and continuous, then (f^{-1})'(y)=\frac{1}{f'(f^{-1}(y))} if derivative f exists in f^{-1}(y) and is non-zero.

E.g. let f(x)=x^3. Then f^{-1}(y)=\sqrt[3]{y}. Therefore:

    \[(\sqrt[3]{y})'=\frac{1}{f'(\sqrt[3]{y})}=\frac{1}{3(\sqrt[3]{y})^2}=\frac{1}{3} y^{-\frac{2}{3}}.\]

Geometric interpretation — tangent line

It is easy to see that the derivative of a function is the limit of tangents of the angles of secant lines intersecting the graph of the function in x_0 and x. Therefore, it is the tangent of the angle of the tangent line to the graph in x_0. Therefore, if f is continuous in x_0, then y=f'(x_0)(x-x_0)+f(x_0) is the equation of the tangent line to f in the point x=x_0.

E.g.: f=x^2. Therefore the tangent line to this parabola in x=3 is y=(2\cdot 3)(x-3)+3^2=6x-9.

Rolle and Lagrange theorems

Rolle theorem states that if f is continuous on [a,b] and differentiable on (a,b) and f(a)=f(b), then there exists c\in (a,b), such that f'(c)=0.

Therefore Lagrange theorem holds: if f is continuous on [a,b] and differentiable on (a,b), then there exists c\in (a,b), such that f'(c)=\frac{f(a)-f(b)}{a-b}.

L’Hôpital’s rule

L’Hôpital’s rule makes it possible to calculate some difficult cases in arithmetic of limits of functions using derivatives. If \lim_{x\to x_0}f(x)=\lim_{x\to x_0} g(x)=0 or \lim_{x\to x_0}f(x)=\lim_{x\to x_0} g(x)=\pm\infty and also \frac{f(x)}{g(x)} and \frac{f'(x)}{g'(x)} are defined on (x_0-\delta, x_0+\delta)\setminus\{x_0\} for some \delta, then \lim_{x\to x_0}\frac{f(x)}{g(x)}=\lim_{x\to x_0}\frac{f'(x)}{g'(x)}, if the second limit exists.

E.g. we calculate \lim_{x\to 0^+}\frac{\frac{1}{x}}{\ln x}. We have \frac{1}{x}\underrightarrow{x\to 0^+} \infty and \ln x\underrightarrow{x\to 0^+} -\infty. Also \left(\frac{1}{x}\right)'=-\frac{1}{x^2} and (\ln x)'=\frac{1}{x}. Therefore, \lim_{x\to 0^+}\frac{\frac{1}{|x|}}{\ln |x|}=\lim_{x\to 0^+}\frac{-\frac{1}{x^2}}{\frac{1}{x}}=\lim_{x\to 0^+}-\frac{1}{x}=-\infty.

Higher-order derivatives

Obviously, if the derivative of a function is differentiable, we can calculate its derivative, the derivative of the derivative, f''(x), which describes how the first derivative changes. And further we can calculate the third, fourth, etc. derivatives. Generally n-th derivative will be denoted by f^{(n)} and f^{(n+1)}(x)=f^{(n)}(x).

E.g., for f(x)=x^3, we get:





and for any n\geq 4,


Condition for the existence of a local extremum

The following theorem holds. If for some n>0:

  • f is differentiable in x up to at least 2n-th derivative,
  • f'(x)=f''(x)=\ldots=f^{(2n-1)}=0,
  • f^{(2n)}(x)>0 (respectively: f^{(2n)}(x)<0),

then f has a minimum (respectively, maximum) in x.

E.g. f(x)=x^8-x^4 has maximum in x=0, because:

    \[f'(x)=8x^7-4x^3\Rightarrow f'(0)=0\]

    \[f''(x)=56x^6-12x^2\Rightarrow f''(0)=0\]

    \[f'''(x)=336x^5-24x\Rightarrow f'''(0)=0\]

    \[f^{(4)}(x)=1680x^4-24\Rightarrow f^{(4)}(0)=-24\]

Convex and concave functions, inflection points

We shall say that f is convex on an interval (a,b), if its graph between any two points x,y\in (a,b) is under its secant line given by those points. In other words if for any x,y\in(a,b) and t\in [0,1]:


If the reverse inequality holds, the function f is concave. If f is convex on (a,b) and concave on (b,c) (or reversely) and continuous in c, we will say that c is an inflection point.

The following theorems hold:

  • if f' exists on a given interval and is increasing (respectively, decreasing), then f is convex (respectively, concave) on this interval,
  • if f'' exists on a given interval and is always positive (respectively, negative), then f f is convex (respectively, concave) on this interval,

E.g.: f(x)=x^3. We get f'(x)=3x^2, f''(x)=6x is positive on (0,\infty) so f is convex on this interval and negative on (-\infty,0) — so f is concave on it. Point 0 is an inflection point.


Asymptotes are lines which are lines to which the diagram of a function converges. Asymptotes can be vertical, horizontal or oblique.


If \lim_{x\to x_0^+} f(x)=\pm\infty, then line x=x_0 is a right vertical asymptote. Analogously, if \lim_{x\to x_0^-} f(x)=\pm\infty, this line is a left vertical asymptote. E.g. \lim_{x\to 0^+}\frac{1}{x}=\infty oraz \lim_{x\to 0^-}\frac{1}{x}=-\infty, so asymptote x=0 is a vertical asymptote of this function.

If \lim_{x\to\infty} f(x)=g or \lim_{x\to-\infty} f(x)=g, then line y=g is a respectively right or left horizontal asymptote of this function. Since \lim_{x\to\infty} 2^{-x}+2015=2015, y=2015 is a horizontal asymptote of 2^{-x}+2015=2015.

A line y=ax+b is an oblique asymptote (respectively left or right), if \lim_{x\to-\infty}f(x)-ax-b=0 or \lim_{x\to+\infty}f(x)-ax-b=0. If such a line is asymptote (assume it is a right asymptote), then a=\lim_{x\to\infty}\frac{f(x)}{x} oraz b=\lim_{x\to\infty}(f(x)-ax).

E.g.: let f(x)=\frac{2x^2-3}{3x-1}, then \lim_{x\to \infty}\frac{f(x)}{x}=\lim_{x\to \infty}\frac{2x^2-3}{3x^2-x}=\frac{2}{3} and \lim_{x\to\infty}\left(f(x)-\frac{2x}{3}\right)=\lim_{x\to\infty}\frac{\frac{2}{3}x-3}{3x-1}=\frac{2}{9}. Therefore, y=\frac{2}{3}x+\frac{2}{9} is an oblique asymptote of this function.