# 2.14: Higher Order Derivatives

- Page ID
- 89726

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

The operation of differentiation takes as input one function, \(f(x)\text{,}\) and produces as output another function, \(f'(x)\text{.}\) Now \(f'(x)\) is once again a function. So we can differentiate it again, assuming that it is differentiable, to create a third function, called the second derivative of \(f\text{.}\) And we can differentiate the second derivative again to create a fourth function, called the third derivative of \(f\text{.}\) And so on.

- \(f''(x)\) and \(f^{(2)}(x)\) and \(\frac{\mathrm{d} ^{2}}{\mathrm{d} x^{2}}(x)\) all mean \(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}f(x)\big)\)
- \(f'''(x)\) and \(f^{(3)}(x)\) and \(\frac{\mathrm{d} ^{3}}{\mathrm{d} x^{3}}(x)\) all mean \(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}f(x)\big)\big)\)
- \(f^{(4)}(x)\) and \(\frac{\mathrm{d} ^{4}}{\mathrm{d} x^{4}}(x)\) both mean \(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}\big(\frac{\mathrm{d} }{\mathrm{d} x}f(x)\big)\big)\big)\)
- and so on.

Here is a simple example. Then we'll think a little about the significance of second order derivatives. Then we'll do a more a computationally complex example.

Let \(n\) be a natural number and let \(f(x)= x^n\text{.}\) Then

\begin{align*} \dfrac{d}{dx}x^n&=nx^{n-1}\\ \frac{\mathrm{d} ^{2}}{\mathrm{d} x^{2}}x^n&=\dfrac{d}{dx}\big(nx^{n-1}\big)=n(n-1)x^{n-2}\\ \frac{\mathrm{d} ^{3}}{\mathrm{d} x^{3}}x^n&=\dfrac{d}{dx}\big(n(n-1)x^{n-2}\big)=n(n-1)(n-2)x^{n-3} \end{align*}

Each time we differentiate, we bring down the exponent, which is exactly one smaller than the previous exponent brought down, and we reduce the exponent by one. By the time we have differentiated \(n-1\) times, the exponent has decreased to \(n-(n-1)=1\) and we have brought down the factors \(n(n-1)(n-2)\cdots 2\text{.}\) So

\begin{align*} \frac{\mathrm{d} ^{n-1}}{\mathrm{d} x^{n-1}}x^n&=n(n-1)(n-2)\cdots 2x \end{align*}

and

\begin{align*} \frac{\mathrm{d} ^{n}}{\mathrm{d} x^{n}}x^n&=n(n-1)(n-2)\cdots 1 \end{align*}

The product of the first \(n\) natural numbers, \(1\cdot 2\cdot 3\cdot \cdots \cdot n,\) is called “\(n\) factorial” and is denoted \(n!\text{.}\) So we can also write

\begin{align*} \frac{\mathrm{d} ^{n}}{\mathrm{d} x^{n}}x^n&=n! \end{align*}

If \(m \gt n\text{,}\) then

\begin{align*} \frac{\mathrm{d} ^{m}}{\mathrm{d} x^{m}}x^n&=0 \end{align*}

Recall that the derivative \(v'(a)\) is the (instantaneous) rate of change of the function \(v(t)\) at \(t=a\text{.}\) Suppose that you are walking on the \(x\)–axis and that \(x(t)\) is your \(x\)–coordinate at time \(t\text{.}\) Also suppose, for simplicity, that you are moving from left to right. Then \(v(t)=x'(t)\) is your velocity at time \(t\) and \(v'(a)=x''(a)\) is the rate at which your velocity is changing at time \(t=a\text{.}\) It is called your acceleration. In particular, if \(x''(a) \gt 0\text{,}\) then your velocity is increasing, i.e. you are speeding up, at time \(a\text{.}\) If \(x''(a) \lt 0\text{,}\) then your velocity is decreasing, i.e. you are slowing down, at time \(a\text{.}\) That's one interpretation of the second derivative.

Find \(y''\) if \(y=y^3+xy+x^3\text{.}\)

*Solution* This problem concerns some function \(y(x)\) that is not given to us explicitly. All that we are told is that \(y(x)\) satisfies

\[ y(x)=y(x)^3+xy(x)+x^3 \tag{E1} \nonumber \]

for all \(x\text{.}\) We are asked to find \(y''(x)\text{.}\) We cannot solve this equation to get an explicit formula for \(y(x)\text{.}\) So we use implicit differentiation, as we did in Example 2.11.1. That is, we apply \(\dfrac{d}{dx}\) to both sides of (E1). This gives

\[ y'(x)=3y(x)^2\,y'(x)+y(x)+x\,y'(x)+3x^2 \tag{E2} \nonumber \]

which we can solve for \(y'(x)\text{,}\) by moving all \(y'(x)\)'s to the left hand side, giving

\[ \big[1-x-3y(x)^2\big]y'(x) = y(x)+3x^2 \nonumber \]

and then dividing across.

\[ y'(x) = \frac{y(x)+3x^2}{1-x-3y(x)^2} \tag{E3} \nonumber \]

To get \(y''(x)\text{,}\) we have two options.

*Method 1.* Apply \(\dfrac{d}{dx}\) to both sides of (E2). This gives

\[ y''(x)=3y(x)^2\,y''(x)+6y(x)\,y'(x)^2+2y'(x)+x\,y''(x)+6x \nonumber \]

We can now solve for \(y''(x)\text{,}\) giving

\[ y''(x) = \frac{6x+2y'(x)+6y(x)y'(x)^2}{1-x-3y(x)^2} \tag{E4} \nonumber \]

Then we can substitute in (E3), giving

\begin{align*} & y''(x) = 2\frac{3x+ \frac{y(x)+3x^2}{1-x-3y(x)^2} +3y(x) \big(\frac{y(x)+3x^2}{1-x-3y(x)^2}\big)^2} {1-x-3y(x)^2}\\ &= 2\frac{3x{[1\!-\!x\!-\!3y(x)^2]}^2+ [y(x)\!+\!3x^2][1\!-\!x\!-\!3y(x)^2] +3y(x) {[y(x)\!+\!3x^2]}^2}{{[1-x-3y(x)^2]}^3} \end{align*}

*Method 2.* Alternatively, we can also differentiate (E3).

\begin{align*} & y''(x) = \frac{[y'(x)+6x][1\!-\!x\!-\!3y(x)^2]- [y(x)+3x^2][-1-6y(x)y'(x)]}{{[1-x-3y(x)^2]}^2}\\ &= \frac{\big[\frac{y(x)+3x^2}{1-x-3y(x)^2}+6x\big][1-x-3y(x)^2]- [y(x)+3x^2][-1-6y(x)\frac{y(x)+3x^2}{1-x-3y(x)^2}]} {{[1-x-3y(x)^2]}^2}\\ &= \frac{2[y(x)+3x^2][1\!-\!x\!-\!3y(x)^2]+6x{[1\!-\!x\!-\!3y(x)^2]}^2 +6y(x){[y(x)\!+\!3x^2]}^2} {{[1-x-3y(x)^2]}^3} \end{align*}

*Remark 1.* We have now computed \(y''(x)\) — sort of. The answer is in terms of \(y(x)\text{,}\) which we don't know. Since we cannot get an explicit formula for \(y(x)\text{,}\) there's not a great deal that we can do, in general.

*Remark 2.* Even though we cannot solve \(y=y^3+xy+x^3\) explicitly for \(y(x)\text{,}\) for general \(x\text{,}\) it is sometimes possible to solve equations like this for some special values of \(x\text{.}\) In fact, we saw in Example 2.11.1 that when \(x=1\text{,}\) the given equation reduces to \(y(1)=y(1)^3+1\cdot y(1)+1^3\text{,}\) or \(y(1)^3=-1\text{,}\) which we can solve to get \(y(1)=-1\text{.}\) Substituting into (E2), as we did in Example 2.11.1 gives

\[ y'(1) = \frac{-1+3}{1-1-3(-1)^2} = -\frac{2}{3} \nonumber \]

and substituting into (E4) gives

\[ y''(1) = \frac{6+2\big(-\frac{2}{3}\big)+6(-1)\big(-\frac{2}{3}\big)^2} {1-1-3(-1)^2} =\frac{6-\frac{4}{3}-\frac{8}{3}}{-3} = -\frac{2}{3} \nonumber \]

(It's a fluke that, in this example, \(y'(1)\) and \(y''(1)\) happen to be equal.) So we now know that, even though we can't solve \(y=y^3+xy+x^3\) explicitly for \(y(x)\text{,}\) the graph of the solution passes through \((1,-1)\) and has slope \(-\frac{2}{3}\) (i.e. is sloping downwards by between \(30^\circ\) and \(45^\circ\)) there and, furthermore, the slope of the graph decreases as \(x\) increases through \(x=1\text{.}\)

Here is a sketch of the part of the graph very near \((1, -1)\text{.}\) The tangent line to the graph at \((1, -1)\) is also shown. Note that the tangent line is sloping down to the right, as we expect, and that the graph lies below the tangent line near \((1,-1)\text{.}\) That's because the slope \(f'(x)\) is decreasing (becoming more negative) as \(x\) passes through \(1\text{.}\)

Many people will suppress the \((x)\) in \(y(x)\) when doing computations like those in Example 2.14.4. This gives shorter, easier to read formulae, like \(y'=\frac{y+3x^2}{1-x-3y^2}\text{.}\) If you do this, you must never forget that \(y\) is a function of \(x\) and is *not* a constant. If you do forget, you'll make the very serious error of saying that \(\dfrac{dy}{dx}=0\text{,}\) which is false.

## Exercises

Stage 1

What is the 180th derivative of the function \(f(x)=e^x\text{?}\)

Suppose \(f(x)\) is a differentiable function, with \(f'(x) \gt 0\) and \(f''(x) \gt 0\) for every \(x \in (a,b)\text{.}\) Which of the following must be true?

- \(f(x)\) is positive over \((a,b)\)
- \(f(x)\) is increasing over \((a,b)\)
- \(f(x)\) is increasing at a constant rate over \((a,b)\)
- \(f(x)\) is increasing faster and faster over \((a,b)\)
- \(f''''(x) \gt 0\) for some \(x \in (a,b)\)

Let \(f(x)=ax^{15}\) for some constant \(a\text{.}\) Which value of \(a\) results in \(f^{(15)}(x)=3\text{?}\)

Find the mistake(s) in the following work, and provide a corrected answer.

Suppose \(-14x^2+2xy+y^2=1\text{.}\) We find \(\displaystyle\frac{\mathrm{d} ^{2}y}{\mathrm{d} x^{2}}\) at the point \(\left(1,3\right)\text{.}\) Differentiating implicitly:

\begin{align*} -28x+2y+2xy'+2yy'&=0\\ \end{align*}

Plugging in \(x=1\text{,}\) \(y=3\text{:}\)

\begin{align*} -28+6+2y'+6y'&=0\\ y'&=\frac{11}{4}\\ \end{align*}Differentiating:

\begin{align*} y''&=0 \end{align*}

Stage 2

Let \(f(x)=(\log x-1)x\text{.}\) Evaluate \(f''(x)\text{.}\)

Evaluate \(\displaystyle\frac{\mathrm{d} ^{2}}{\mathrm{d} x^{2}}\{\arctan x\}\text{.}\)

The unit circle consists of all point \(x^2+y^2=1\text{.}\) Give an expression for \(\displaystyle\frac{\mathrm{d} ^{2}y}{\mathrm{d} x^{2}}\) in terms of \(y\text{.}\)

Suppose the position of a particle at time \(t\) is given by \(s(t) = \dfrac{e^t}{t^2+1}\text{.}\) Find the acceleration of the particle at time \(t=1\text{.}\)

Evaluate \(\displaystyle\frac{\mathrm{d} ^{3}}{\mathrm{d} x^{3}}\{\log(5x^2-12)\}\text{.}\)

The height of a particle at time \(t\) seconds is given by \(h(t)=-\cos t\text{.}\) Is the particle speeding up or slowing down at \(t=1\text{?}\)

The height of a particle at time \(t\) seconds is given by \(h(t)=t^3-t^2-5t+10\text{.}\) Is the particle's motion getting faster or slower at \(t=1\text{?}\)

Suppose a curve is defined implicitly by

\[ x^2+x+y=\sin(xy) \nonumber \]

What is \(\displaystyle\frac{\mathrm{d} ^{2}y}{\mathrm{d} x^{2}}\) at the point \((0,0)\text{?}\)

Which statements below are true, and which false?

- \(\displaystyle\frac{\mathrm{d} ^{4}}{\mathrm{d} x^{4}} \sin x = \sin x\)
- \(\displaystyle\frac{\mathrm{d} ^{4}}{\mathrm{d} x^{4}} \cos x = \cos x\)
- \(\displaystyle\frac{\mathrm{d} ^{4}}{\mathrm{d} x^{4}} \tan x = \tan x\)

Stage 3

A function \(f(x)\) satisfies \(f'(x) \lt 0\) and \(f''(x) \gt 0\) over \((a,b)\text{.}\) Which of the following curves below might represent \(y=f(x)\text{?}\)

Let \(f(x)=2^{x}\text{.}\) What is \(f^{(n)}(x)\text{,}\) if \(n\) is a whole number?

Let \(f(x)=ax^3+bx^2+cx+d\text{,}\) where \(a\text{,}\) \(b\text{,}\) \(c\text{,}\) and \(d\) are nonzero constants. What is the smallest integer \(n\) so that \(\displaystyle\frac{\mathrm{d} ^{n}f}{\mathrm{d} x^{n}}=0\) for all \(x\text{?}\)

\[ f(x)=e^{x+x^2}\qquad \qquad \qquad h(x)=1+x+\frac{3}{2}x^2 \nonumber \]

- Find the first and second derivatives of both functions
- Evaluate both functions and their first and second derivatives at 0.
- Show that for all \(x \gt 0\text{,}\) \(f(x) \gt h(x)\text{.}\)

Remark: for some applications, we only need to know that a function is “big enough.” Since \(f(x)\) is a difficult function to evaluate, it may be useful to know that it is bigger than \(h(x)\) when \(x\) is positive.

The equation \(x^3y+y^3=10x\) defines \(y\) implicitly as a function of \(x\) near the point \((1,2)\text{.}\)

- Compute \(y'\) at this point.
- It can be shown that \(y''\) is negative when \(x=1\text{.}\) Use this fact and your answer to 2.14.2.18.a to make a sketch showing the relationship of the curve to its tangent line at \((1,2)\text{.}\)

Let \(g(x)=f(x)e^x\text{.}\) In Question 2.7.3.12, Section 2.7, we learned that \(g'(x)=[f(x)+f'(x)]e^x\text{.}\)

- What is \(g''(x)\text{?}\)
- What is \(g'''(x)\text{?}\)
- Based on your answers above, guess a formula for \(g^{(4)}(x)\text{.}\) Check it by differentiating.

Suppose \(f(x)\) is a function whose first \(n\) derivatives exist over all real numbers, and \(f^{(n)}(x)\) has precisely \(m\) roots. What is the maximum number of roots that \(f(x)\) may have?

How many roots does the function \(f(x)=(x+1)\log(x+1)+\sin x - x^2\) have?

Let \(f(x) = x|x|\text{.}\)

- Show that \(f(x)\) is differentiable at \(x = 0\text{,}\) and find \(f'(0)\text{.}\)
- Find the second derivative of \(f(x)\text{.}\) Explicitly state, with justification, the point(s) at which \(f''(x)\) does not exist, if any.