Skip to main content

CLP-1 Differential Calculus

Section 2.14 Higher Order Derivatives

Subsection 2.14.1 Higher Order Derivatives

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.

Definition 2.14.1.

  • \(f''(x)\) and \(f^{(2)}(x)\) and \(\ddiff{2}{f}{x}(x)\) all mean \(\diff{}{x}\big(\diff{}{x}f(x)\big)\)
  • \(f'''(x)\) and \(f^{(3)}(x)\) and \(\ddiff{3}{f}{x}(x)\) all mean \(\diff{}{x}\big(\diff{}{x}\big(\diff{}{x}f(x)\big)\big)\)
  • \(f^{(4)}(x)\) and \(\ddiff{4}{f}{x}(x)\) both mean \(\diff{}{x}\big(\diff{}{x}\big(\diff{}{x}\big(\diff{}{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.

Example 2.14.2. Derivatives of \(x^n\).

Let \(n\) be a natural number and let \(f(x)= x^n\text{.}\) Then
\begin{align*} \diff{}{x}x^n&=nx^{n-1}\\ \ddiff{2}{}{x}x^n&=\diff{}{x}\big(nx^{n-1}\big)=n(n-1)x^{n-2}\\ \ddiff{3}{}{x}x^n&=\diff{}{x}\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*} \ddiff{{n-1}}{}{x}x^n&=n(n-1)(n-2)\cdots 2x \end{align*}
and
\begin{align*} \ddiff{n}{}{x}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*} \ddiff{n}{}{x}x^n&=n! \end{align*}
If \(m \gt n\text{,}\) then
\begin{align*} \ddiff{m}{}{x}x^n&=0 \end{align*}

Example 2.14.3. Position, velocity and acceleration.

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.

Example 2.14.4. 2.11.1 continued.

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
\begin{equation*} y(x)=y(x)^3+xy(x)+x^3 \tag{E1} \end{equation*}
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 \(\diff{}{x}\) to both sides of (E1). This gives
\begin{equation*} y'(x)=3y(x)^2\,y'(x)+y(x)+x\,y'(x)+3x^2 \tag{E2} \end{equation*}
which we can solve for \(y'(x)\text{,}\) by moving all \(y'(x)\)’s to the left hand side, giving
\begin{equation*} \big[1-x-3y(x)^2\big]y'(x) = y(x)+3x^2 \end{equation*}
and then dividing across.
\begin{equation*} y'(x) = \frac{y(x)+3x^2}{1-x-3y(x)^2} \tag{E3} \end{equation*}
To get \(y''(x)\text{,}\) we have two options.
Method 1. Apply \(\diff{}{x}\) to both sides of (E2). This gives
\begin{equation*} y''(x)=3y(x)^2\,y''(x)+6y(x)\,y'(x)^2+2y'(x)+x\,y''(x)+6x \end{equation*}
We can now solve for \(y''(x)\text{,}\) giving
\begin{equation*} y''(x) = \frac{6x+2y'(x)+6y(x)y'(x)^2}{1-x-3y(x)^2} \tag{E4} \end{equation*}
Then we can substitute in (E3), giving
\begin{align*} \amp 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*} \amp 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
\begin{equation*} y'(1) = \frac{-1+3}{1-1-3(-1)^2} = -\frac{2}{3} \end{equation*}
and substituting into (E4) gives
\begin{equation*} 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} \end{equation*}
(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{.}\)

Warning 2.14.5.

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 \(\diff{y}{x}=0\text{,}\) which is false.

Exercises 2.14.2 Exercises

Exercises — Stage 1 .

1.
What is the 180th derivative of the function \(f(x)=e^x\text{?}\)
2.
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?
  1. \(f(x)\) is positive over \((a,b)\)
  2. \(f(x)\) is increasing over \((a,b)\)
  3. \(f(x)\) is increasing at a constant rate over \((a,b)\)
  4. \(f(x)\) is increasing faster and faster over \((a,b)\)
  5. \(f''''(x) \gt 0\) for some \(x \in (a,b)\)
3.
Let \(f(x)=ax^{15}\) for some constant \(a\text{.}\) Which value of \(a\) results in \(f^{(15)}(x)=3\text{?}\)
4.
Find the mistake(s) in the following work, and provide a corrected answer.
Suppose \(-14x^2+2xy+y^2=1\text{.}\) We find \(\ds\ddiff{2}{y}{x}\) 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*}

Exercises — Stage 2 .

5.
Let \(f(x)=(\log x-1)x\text{.}\) Evaluate \(f''(x)\text{.}\)
6.
Evaluate \(\ds\ddiff{2}{}{x}\{\arctan x\}\text{.}\)
7.
The unit circle consists of all point \(x^2+y^2=1\text{.}\) Give an expression for \(\ds\ddiff{2}{y}{x}\) in terms of \(y\text{.}\)
8.
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{.}\)
9.
Evaluate \(\ds\ddiff{3}{}{x}\{\log(5x^2-12)\}\text{.}\)
10.
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{?}\)
11.
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{?}\)
12.
Suppose a curve is defined implicitly by
\begin{equation*} x^2+x+y=\sin(xy) \end{equation*}
What is \(\ds\ddiff{2}{y}{x}\) at the point \((0,0)\text{?}\)
13.
Which statements below are true, and which false?
  1. \(\displaystyle \ds\ddiff{4}{}{x} \sin x = \sin x\)
  2. \(\displaystyle \ds\ddiff{4}{}{x} \cos x = \cos x\)
  3. \(\displaystyle \ds\ddiff{4}{}{x} \tan x = \tan x\)

Exercises — Stage 3 .

14.
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{?}\)
15.
Let \(f(x)=2^{x}\text{.}\) What is \(f^{(n)}(x)\text{,}\) if \(n\) is a whole number?
16.
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 \(\ds\ddiff{n}{f}{x}=0\) for all \(x\text{?}\)
17. (✳).
\begin{equation*} f(x)=e^{x+x^2}\qquad \qquad \qquad h(x)=1+x+\frac{3}{2}x^2 \end{equation*}
  1. Find the first and second derivatives of both functions
  2. Evaluate both functions and their first and second derivatives at 0.
  3. 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.
18. (✳).
The equation \(x^3y+y^3=10x\) defines \(y\) implicitly as a function of \(x\) near the point \((1,2)\text{.}\)
  1. Compute \(y'\) at this point.
  2. 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{.}\)
19.
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{.}\)
  1. What is \(g''(x)\text{?}\)
  2. What is \(g'''(x)\text{?}\)
  3. Based on your answers above, guess a formula for \(g^{(4)}(x)\text{.}\) Check it by differentiating.
20.
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?
21.
How many roots does the function \(f(x)=(x+1)\log(x+1)+\sin x - x^2\) have?
22. (✳).
Let \(f(x) = x|x|\text{.}\)
  1. Show that \(f(x)\) is differentiable at \(x = 0\text{,}\) and find \(f'(0)\text{.}\)
  2. Find the second derivative of \(f(x)\text{.}\) Explicitly state, with justification, the point(s) at which \(f''(x)\) does not exist, if any.