# Leibniz Formula

The Leibniz formula expresses the derivative on $$n$$th order of the product of two functions. Suppose that the functions $$u\left( x \right)$$ and $$v\left( x \right)$$ have the derivatives up to $$n$$th order. Consider the derivative of the product of these functions.

The first derivative is described by the well known formula:

${\left( {uv} \right)^\prime } = u’v + uv’.$

Differentiating this expression again yields the second derivative:

${{\left( {uv} \right)^{\prime\prime}} = {\left[ {{{\left( {uv} \right)}^\prime }} \right]^\prime } } = {{\left( {u’v + uv’} \right)^\prime } } = {{\left( {u’v} \right)^\prime } + {\left( {uv’} \right)^\prime } } = {u^{\prime\prime}v + u’v’ + u’v’ + uv^{\prime\prime} }={ u^{\prime\prime}v + 2u’v’ + uv^{\prime\prime}.}$

Likewise, we can find the third derivative of the product $$uv:$$

${{\left( {uv} \right)^{\prime\prime\prime}} = {\left[ {{\left( {uv} \right)^{\prime\prime}}} \right]^\prime } } = {{\left( {u^{\prime\prime}v + 2u’v’ + uv^{\prime\prime}} \right)^\prime } } = {{\left( {u^{\prime\prime}v} \right)^\prime } + {\left( {2u’v’} \right)^\prime } + {\left( {uv^{\prime\prime}} \right)^\prime } } = {u^{\prime\prime\prime}v + \color{blue}{u^{\prime\prime}v’} + \color{blue}{2u^{\prime\prime}v’} }+{ \color{red}{2u’v^{\prime\prime}} + \color{red}{u’v^{\prime\prime}} + uv^{\prime\prime\prime} } = {u^{\prime\prime\prime}v + \color{blue}{3u^{\prime\prime}v’} }+{ \color{red}{3u’v^{\prime\prime}} + uv^{\prime\prime\prime}.}$

It is easy to see that these formulas are similar to the binomial expansion raised to the appropriate exponent. Assuming that the terms with zero exponent $${u^0}$$ and $${v^0}$$ correspond to the functions $$u$$ and $$v$$ themselves, we can write the general formula for the derivative of $$n$$th order of the product of functions $$uv$$ as follows:

${\left( {uv} \right)^{\left( n \right)}} = {\sum\limits_{i = 0}^n {\left( {\begin{array}{*{20}{c}} n\\ i \end{array}} \right){u^{\left( {n – i} \right)}}{v^{\left( i \right)}}} ,}$

where $${\left( {\begin{array}{*{20}{c}} n\\ i \end{array}} \right)}$$ denotes the number of $$i$$-combinations of $$n$$ elements.

This formula is called the Leibniz formula and can be proved by induction.

#### Proof.

Suppose that the functions $$u$$ and $$v$$ have the derivatives of $$\left( {n + 1} \right)$$th order. Using the recurrence relation, we write the expression for the derivative of $$\left( {n + 1} \right)$$th order in the following form:

${y^{\left( {n + 1} \right)}} = {\left[ {{y^{\left( n \right)}}} \right]^\prime } = {\left[ {{{\left( {uv} \right)}^{\left( n \right)}}} \right]^\prime } = {\left[ {\sum\limits_{i = 0}^n {\left( {\begin{array}{*{20}{c}} n\\ i \end{array}} \right){u^{\left( {n – i} \right)}}{v^{\left( i \right)}}} } \right]^\prime }.$

After differentiation we obtain:

${y^{\left( {n + 1} \right)}} = {\sum\limits_{i = 0}^n {\left( {\begin{array}{*{20}{c}} n\\ i \end{array}} \right){u^{\left( {n – i + 1} \right)}}{v^{\left( i \right)}}} }+{ \sum\limits_{i = 0}^n {\left( {\begin{array}{*{20}{c}} n\\ i \end{array}} \right){u^{\left( {n – i} \right)}}{v^{\left( {i + 1} \right)}}} .}$

Both sums in the right-hand side can be combined into a single sum. Indeed, take an intermediate index $$1 \le m \le n.$$ The first term when $$i = m$$ is written as

$\left( {\begin{array}{*{20}{c}} n\\ m \end{array}} \right){u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}},$

and the second term when $$i = m – 1$$ is as follows:

${\left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right){u^{\left( {n – \left( {m – 1} \right)} \right)}}{v^{\left( {\left( {m – 1} \right) + 1} \right)}} }={ \left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right){u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}}.}$

The sum of these two terms is given by

${\left( {\begin{array}{*{20}{c}} n\\ m \end{array}} \right){u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}} + \left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right){u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}} } = {\left[ {\left( {\begin{array}{*{20}{c}} n\\ m \end{array}} \right) + \left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right)} \right]\cdot}\kern0pt{{u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}}.}$

It is known from combinatorics that

${\left( {\begin{array}{*{20}{c}} n\\ m \end{array}} \right) + \left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right) }={ \left( {\begin{array}{*{20}{c}} {n + 1}\\ m \end{array}} \right).}$

Therefore, the sum of these two terms can be written as

${\left[ {\left( {\begin{array}{*{20}{c}} n\\ m \end{array}} \right) + \left( {\begin{array}{*{20}{c}} n\\ {m – 1} \end{array}} \right)} \right]\cdot}\kern0pt{{u^{\left( {n – m + 1} \right)}}{v^{\left( m \right)}} } = {\left( {\begin{array}{*{20}{c}} {n + 1}\\ m \end{array}} \right){u^{\left( {n + 1 – m} \right)}}{v^{\left( m \right)}}.}$

It is clear that when $$m$$ changes from $$1$$ to $$n$$ this combination will cover all terms of both sums except the term for $$i = 0$$ in the first sum equal to

${\left( {\begin{array}{*{20}{c}} n\\ 0 \end{array}} \right){u^{\left( {n – 0 + 1} \right)}}{v^{\left( 0 \right)}} }={ {u^{\left( {n + 1} \right)}}{v^{\left( 0 \right)}},}$

and the term for $$i = n$$ in the second sum equal to

${\left( {\begin{array}{*{20}{c}} n\\ n \end{array}} \right){u^{\left( {n – n} \right)}}{v^{\left( {n + 1} \right)}} }={ {u^{\left( 0 \right)}}{v^{\left( {n + 1} \right)}}.}$

AAs a result, the derivative of $$\left( {n + 1} \right)$$th order of the product of functions $$uv$$ is represented in the form

${{y^{\left( {n + 1} \right)}} } = {{u^{\left( {n + 1} \right)}}{v^{\left( 0 \right)}} }+{ \sum\limits_{m = 1}^n {\left( {\begin{array}{*{20}{c}} {n + 1}\\ m \end{array}} \right){u^{\left( {n + 1 – m} \right)}}{v^{\left( m \right)}}} + {u^{\left( 0 \right)}}{v^{\left( {n + 1} \right)}} } = {\sum\limits_{m = 0}^{n + 1} {\left( {\begin{array}{*{20}{c}} {n + 1}\\ m \end{array}} \right){u^{\left( {n + 1 – m} \right)}}{v^{\left( m \right)}}} .}$

As can be seen, the expression for $${y^{\left( {n + 1} \right)}}$$ has a similar form as for the derivative $${y^{\left( n \right)}}.$$ Only now the upper limit of summation is equal to $$n + 1$$ instead of $$n.$$ Thus, the Leibniz formula is proved for an arbitrary natural number $$n.$$

## Solved Problems

Click or tap a problem to see the solution.

### Example 1

Find the $$4$$th derivative of the function $$y = {e^x}\sin x.$$

### Example 2

Find the $$3$$rd derivative of the function $$y = x\sin x.$$

### Example 3

Find the third derivative of the function $$y = {e^{2x}}\ln x.$$

### Example 4

Find the $$3$$rd derivative of the function $$y = {e^x}\cos x.$$

### Example 5

Find the $$4$$th-order derivative of the function $$y = x\sinh x.$$

### Example 6

Find all derivatives of the function $$y = {e^x}{x^2}.$$

### Example 7

Given the function $$y = {x^2}\cos 3x.$$ Find the third-order derivative.

### Example 8

Find the fifth derivative of the function $${y }={ \left( {{x^3} + 2{x^2} + 3x} \right){e^x}.}$$

### Example 9

Find the $$3$$rd derivative of the function $$y = \large{\frac{{{e^x}}}{x}}\normalsize.$$

### Example 10

Find the $$n$$th-order derivative of the function $$y = {x^2}\cos x.$$

### Example 11

Find the $$10$$th-order derivative of the function $$y = \left( {{x^2} + 4x + 1} \right)\sqrt {{e^x}}$$ at the point $$x = 0.$$

### Example 12

Find the $$5$$th derivative of the function $$y = {x^2}\sin 2x$$ at $$x = 0.$$

### Example 13

Find the $$n$$th-order derivative of the function $$y = {x^3}\sin 2x.$$

### Example 14

Find the $$n$$th order derivative of the function $$y = x\ln x.$$

### Example 15

Find the $$n$$th-order derivative of the function $$y = \left( {3{x^2} – 2x} \right)\ln x,$$ $$x \gt 0.$$

### Example 16

Find the $$n$$th-order derivative of the function $$y = \arctan x$$ at the point $$x = 0.$$

### Example 17

Calculate the $$4$$th derivative of the function $$y = \large{\frac{{{x^2}}}{{x – 1}}}\normalsize$$ at $$x = 2.$$

### Example 18

Determine the $$3$$rd derivative of the function $$y = \large{\frac{{{x^3}}}{{x + 2}}}\normalsize$$ at $$x = -1.$$

### Example 1.

Find the $$4$$th derivative of the function $$y = {e^x}\sin x.$$

Solution.

Let $$u = \sin x,$$ $$v = {e^x}.$$ Using the Leibniz formula, we can write

$\require{cancel}{{y^{\left( 4 \right)}} = {\left( {{e^x}\sin x} \right)^{\left( 4 \right)}} }={ \sum\limits_{i = 0}^4 {\left( {\begin{array}{*{20}{c}} 4\\ i \end{array}} \right){u^{\left( {4 – i} \right)}}{v^{\left( i \right)}}} }={ \sum\limits_{i = 0}^4 {\left( {\begin{array}{*{20}{c}} 4\\ i \end{array}} \right){{\left( {\sin x} \right)}^{\left( {4 – i} \right)}}{{\left( {{e^x}} \right)}^{\left( i \right)}}} }={ \left( {\begin{array}{*{20}{c}} 4\\ 0 \end{array}} \right){\left( {\sin x} \right)^{\left( 4 \right)}}{e^x} }+{ \left( {\begin{array}{*{20}{c}} 4\\ 1 \end{array}} \right)\left( {\sin x} \right)^{\prime\prime\prime}\left( {{e^x}} \right)^\prime }+{ \left( {\begin{array}{*{20}{c}} 4\\ 2 \end{array}} \right)\left( {\sin x} \right)^{\prime\prime}\left( {{e^x}} \right)^{\prime\prime} }+{ \left( {\begin{array}{*{20}{c}} 4\\ 3 \end{array}} \right)\left( {\sin x} \right)^\prime\left( {{e^x}} \right)^{\prime\prime\prime} }+{ \left( {\begin{array}{*{20}{c}} 4\\ 4 \end{array}} \right)\left( {\sin x} \right){\left( {{e^x}} \right)^{\left( 4 \right)}} }={ 1 \cdot \sin x \cdot {e^x} }+{\cancel{ 4 \cdot \left( { – \cos x} \right) \cdot {e^x} }}+{ 6 \cdot \left( { – \sin x} \right) \cdot {e^x} }+{\cancel{ 4 \cdot \cos x \cdot {e^x} }}+{ 1 \cdot \sin x \cdot {e^x} }={ – 4{e^x}\sin x.}$

### Example 2.

Find the $$3$$rd derivative of the function $$y = x\sin x.$$

Solution.

Let $$u = \sin x,$$ $$v = x.$$ By the Leibniz formula, we can write:

${y^{\prime\prime\prime} = \sum\limits_{i = 0}^3 {\left( {\begin{array}{*{20}{c}} 3\\ i \end{array}} \right){u^{\left( {3 – i} \right)}}{v^{\left( i \right)}}} }={ \sum\limits_{i = 0}^3 {\left( {\begin{array}{*{20}{c}} 3\\ i \end{array}} \right){{\left( {\sin x} \right)}^{\left( {3 – i} \right)}}{x^{\left( i \right)}}} .}$

It is clear that

${x^\prime = 1,\;\;}\kern0pt{x^{\prime\prime} = x^{\prime\prime\prime} \equiv 0.}$

Then the series expansion has only two terms:

${y^{\prime\prime\prime} = \left( {\begin{array}{*{20}{c}} 3\\ 0 \end{array}} \right)\left( {\sin x} \right)^{\prime\prime\prime}x }+{ \left( {\begin{array}{*{20}{c}} 3\\ 1 \end{array}} \right)\left( {\sin x} \right)^{\prime\prime}x^\prime.}$

Calculating the derivatives, we obtain

${y^{\prime\prime\prime} \text{ = }}\kern0pt{1 \cdot \left( { – \cos x} \right) \cdot x + 3 \cdot \left( { – \sin x} \right) \cdot 1 }={ – x\cos x – 3\sin x.}$

### Example 3.

Find the third derivative of the function $$y = {e^{2x}}\ln x.$$

Solution.

We set $$u = {e^{2x}}$$, $$v = \ln x$$. The derivatives of the functions $$u$$ and $$v$$ are

${u’ = {\left( {{e^{2x}}} \right)^\prime } = 2{e^{2x}},\;\;\;}\kern-0.3pt {u^{\prime\prime} = {\left( {2{e^{2x}}} \right)^\prime } = 4{e^{2x}},\;\;\;}\kern-0.3pt {u^{\prime\prime\prime} = {\left( {4{e^{2x}}} \right)^\prime } = 8{e^{2x}},}$

${v’ = {\left( {\ln x} \right)^\prime } = \frac{1}{x},\;\;\;}\kern-0.3pt {v^{\prime\prime} = {\left( {\frac{1}{x}} \right)^\prime } = – \frac{1}{{{x^2}}},\;\;\;}\kern-0.3pt {v^{\prime\prime\prime} = {\left( { – \frac{1}{{{x^2}}}} \right)^\prime } } = { – {\left( {{x^{ – 2}}} \right)^\prime } } = {2{x^{ – 3}} }={ \frac{2}{{{x^3}}}.}$

The third-order derivative of the original function is given by the Leibniz rule:

${y^{\prime\prime\prime} = {\left( {{e^{2x}}\ln x} \right)^{\prime \prime \prime }} } = {\sum\limits_{i = 0}^3 {\left( {\begin{array}{*{20}{c}} 3\\ i \end{array}} \right){u^{\left( {3 – i} \right)}}{v^{\left( i \right)}}} } = {\sum\limits_{i = 0}^3 {\left( {\begin{array}{*{20}{c}} 3\\ i \end{array}} \right){{\left( {{e^{2x}}} \right)}^{\left( {3 – i} \right)}}{{\left( {\ln x} \right)}^{\left( i \right)}}} } = {\left( {\begin{array}{*{20}{c}} 3\\ 0 \end{array}} \right) \cdot 8{e^{2x}}\ln x } + {\left( {\begin{array}{*{20}{c}} 3\\ 1 \end{array}} \right) \cdot 4{e^{2x}} \cdot \frac{1}{x} } + {\left( {\begin{array}{*{20}{c}} 3\\ 2 \end{array}} \right) \cdot 2{e^{2x}} \cdot \left( { – \frac{1}{{{x^2}}}} \right) } + {\left( {\begin{array}{*{20}{c}} 3\\ 3 \end{array}} \right){e^{2x}} \cdot \frac{2}{{{x^3}}} } = {1 \cdot 8{e^{2x}}\ln x }+{ 3 \cdot \frac{{4{e^{2x}}}}{x} } – {3 \cdot \frac{{2{e^{2x}}}}{{{x^2}}} }+{ 1 \cdot \frac{{2{e^{2x}}}}{{{x^3}}} } = {8{e^{2x}}\ln x + \frac{{12{e^{2x}}}}{x} }-{ \frac{{6{e^{2x}}}}{{{x^2}}} }+{ \frac{{2{e^{2x}}}}{{{x^3}}} } = {2{e^{2x}}\cdot}\kern0pt{\left( {4\ln x + \frac{6}{x} – \frac{3}{{{x^2}}} + \frac{1}{{{x^3}}}} \right).}$

### Example 4.

Find the $$3$$rd derivative of the function $$y = {e^x}\cos x.$$

Solution.

Let $$u = \cos x,$$ $$v = {e^x}.$$ Using the Leibniz formula, we have

${y^{\prime\prime\prime} = \left( {{e^x}\cos x} \right)^{\prime\prime\prime} }={ \sum\limits_{i = 0}^3 {\left( {\begin{array}{*{20}{c}} 3\\ i \end{array}} \right){{\left( {\cos x} \right)}^{\left( {3 – i} \right)}}{{\left( {{e^x}} \right)}^{\left( i \right)}}} }={ \left( {\begin{array}{*{20}{c}} 3\\ 0 \end{array}} \right)\left( {\cos x} \right)^{\prime\prime\prime}{e^x} }+{ \left( {\begin{array}{*{20}{c}} 3\\ 1 \end{array}} \right)\left( {\cos x} \right)^{\prime\prime}\left( {{e^x}} \right)^\prime }+{ \left( {\begin{array}{*{20}{c}} 3\\ 2 \end{array}} \right)\left( {\cos x} \right)^\prime\left( {{e^x}} \right)^{\prime\prime} }+{ \left( {\begin{array}{*{20}{c}} 3\\ 3 \end{array}} \right)\cos x\left( {{e^x}} \right)^{\prime\prime\prime}.}$

The derivatives of cosine are

$\left( {\cos x} \right)^\prime = – \sin x;$

${\left( {\cos x} \right)^{\prime\prime} = \left( { – \sin x} \right)\prime }={ – \cos x;}$

${\left( {\cos x} \right)^{\prime\prime\prime} = \left( { – \cos x} \right)\prime }={ \sin x.}$

All derivatives of the exponential function $$v = {e^x}$$ are $${e^x}.$$ Hence,

${y^{\prime\prime\prime} = 1 \cdot \sin x \cdot {e^x} }+{ 3 \cdot \left( { – \cos x} \right) \cdot {e^x} }+{ 3 \cdot \left( { – \sin x} \right) \cdot {e^x} }+{ 1 \cdot \cos x \cdot {e^x} }={ {e^x}\left( { – 2\sin x – 2\cos x} \right) }={ – 2{e^x}\left( {\sin x + \cos x} \right).}$

### Example 5.

Find the $$4$$th-order derivative of the function $$y = x\sinh x.$$

Solution.

We denote $$u = \sinh x,$$ $$v = x.$$ By the Leibniz formula,

${{y^{\left( 4 \right)}} = {\left( {x\sinh x} \right)^{\left( 4 \right)}} }={ \sum\limits_{i = 0}^4 {\left( {\begin{array}{*{20}{c}} 4\\ i \end{array}} \right){{\left( {\sinh x} \right)}^{\left( {4 – i} \right)}}{x^{\left( i \right)}}} }={ \left( {\begin{array}{*{20}{c}} 4\\ 0 \end{array}} \right){\left( {\sinh x} \right)^{\left( 4 \right)}}x }+{ \left( {\begin{array}{*{20}{c}} 4\\ 1 \end{array}} \right){\left( {\sinh x} \right)^{\left( 3 \right)}}x^\prime + \ldots }$

Calculate the derivatives of the hyperbolic sine function:

$\left( {\sinh } \right)^\prime = \cosh x;$

${\left( {\sinh } \right)^{\prime\prime} = \left( {\cosh x} \right)^\prime }={ \sinh x;}$

${\left( {\sinh } \right)^{\prime\prime\prime} = \left( {\sinh x} \right)^\prime }={ \cosh x;}$

${{\left( {\sinh } \right)^{\left( 4 \right)}} = \left( {\cosh x} \right)^\prime }={ \sinh x.}$

So, this yields

${{y^{\left( 4 \right)}} = \left( {\begin{array}{*{20}{c}} 4\\ 0 \end{array}} \right)\sinh x \cdot x }+{ \left( {\begin{array}{*{20}{c}} 4\\ 1 \end{array}} \right)\cosh x \cdot 1 }={ 1 \cdot \sinh x \cdot x }+{ 4 \cdot \cosh x \cdot 1 }={ x\sinh x + 4\cosh x.}$

Page 1
Problems 1-5
Page 2
Problems 6-18