Skip to main content

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.

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*}

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

\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.