# Higher Order Derivatives Using Limits

Source: https://cca.twango.dev/AP-Calculus-BC/Take-Home-Quizzes/quiz-03

#  Higher Order Derivatives Using Limits

In class, you have used the limit definition of a derivative to find the derivative of a function. In this quiz, you are going to be using the limit definition to do higher order derivatives instead of using the usual "shortcut" methods.

1. Just as a review, use the limit definition to find the derivative of $f(x) = 2x^2 - x$.
2. Now that you remember the limit definition for $f'(x)$, find a similar limit definition for $f''(x)$ that does NOT have $f'$ in the answer. That is, your answer should be: $$f''(x) = \lim_{h \to 0} \frac{?}{?}$$
3. Show that your limit definition for $f''(x)$ works for $f(x) = 2x^2 - x$. (Hint: Lots of algebra here)
4. Show that your limit definition works for $f(x) =  a_0 + a_1x + a_2x^2 + a_3x^3$, where $a_n$ is a constant.
5. Now for even higher order derivatives!
    1. Determine the limit definition for $f'''(x)$. (Remember that you should not have any derivatives in your limit definition.)
    2. Determine the limit definition for $f^{(4)}(x)$. (Hint: Look for patterns)
    3. Determine the limit definition for $f^{(n)}(x)$.

## Solution
Reviewed handwritten work follows. [[../assets/take-home-quiz-3.pdf|Original PDF]] (two written pages and two blank pages).

## Handwritten work

### 1. First derivative

$$
\begin{aligned}
f'(x)&=\lim_{h\to0}\frac{2(x+h)^2-(x+h)-(2x^2-x)}h\\
&=\lim_{h\to0}\frac{4xh+2h^2-h}h\\
&=\lim_{h\to0}(4x+2h-1)=4x-1.
\end{aligned}
$$

### 2. Second forward difference

The handwritten argument starts with the derivative of $f'$, replaces each derivative by a forward quotient, and collects coefficients:

$$
\begin{aligned}
\frac{[f(x+2h)-f(x+h)]/h-[f(x+h)-f(x)]/h}{h}
&=\frac{f(x+2h)-2f(x+h)+f(x)}{h^2}.
\end{aligned}
$$

Thus, for a sufficiently smooth function,

$$f''(x)=\lim_{h\to0}\frac{f(x+2h)-2f(x+h)+f(x)}{h^2}.$$

> [!note]
> Substituting finite quotients for derivatives inside another limit is a heuristic, not a justification for interchanging limits. Taylor expansion verifies the resulting formula when $f$ is twice continuously differentiable near $x$.

### 3. Check with $f(x)=2x^2-x$

$$
\begin{aligned}
f(x+2h)&=2x^2+8xh+8h^2-x-2h,\\
2f(x+h)&=4x^2+8xh+4h^2-2x-2h.
\end{aligned}
$$

Subtracting and adding $f(x)$ cancels the constant, $x$, and $xh$ terms, leaving $4h^2$. The quotient is 4, so $f''(x)=4$.

### 4. Check with a cubic polynomial

For $f(x)=a_0+a_1x+a_2x^2+a_3x^3$, the source expands each shifted term:

$$
\begin{aligned}
a_1(x+2h)&=a_1x+2a_1h,\\
a_2(x+2h)^2&=a_2x^2+4a_2xh+4a_2h^2,\\
a_3(x+2h)^3&=a_3x^3+6a_3x^2h+12a_3xh^2+8a_3h^3,\\
a_1(x+h)&=a_1x+a_1h,\\
a_2(x+h)^2&=a_2x^2+2a_2xh+a_2h^2,\\
a_3(x+h)^3&=a_3x^3+3a_3x^2h+3a_3xh^2+a_3h^3.
\end{aligned}
$$

Combining the three polynomials gives

$$
\begin{aligned}
f(x+2h)-2f(x+h)+f(x)&=2a_2h^2+6a_3xh^2+6a_3h^3,\\
f''(x)&=\lim_{h\to0}(2a_2+6a_3x+6a_3h)=2a_2+6a_3x.
\end{aligned}
$$

> [!correction]
> The original expansion of $a_2(x+2h)^2$ omits $h$ from its middle term ($4a_2x$); it should be $4a_2xh$. Its final derivative is correct.

### 5a–b. Third and fourth derivatives

Successive differences give the handwritten formulas

$$
f'''(x)=\lim_{h\to0}\frac{f(x+3h)-3f(x+2h)+3f(x+h)-f(x)}{h^3},
$$

$$
f^{(4)}(x)=\lim_{h\to0}\frac{f(x+4h)-4f(x+3h)+6f(x+2h)-4f(x+h)+f(x)}{h^4}.
$$

“Looks like Pascal's triangle”: the unsigned rows are $1,3,3,1$ and $1,4,6,4,1$.

### 5c. General formula and sign correction

The source relates the coefficients to binomial expansion, but writes $(x+y)^2$ and $(x-y)^2$ on the left of sums running to $n$. Those powers should be $n$:

$$
(x\pm y)^n=\sum_{k=0}^n\binom nk x^{n-k}(\pm y)^k.
$$

The original boxed answer is

$$\lim_{h\to0}\frac1{h^n}\sum_{k=0}^n\binom nk(-1)^k f(x+kh).$$

> [!correction]
> With the shift written as $x+kh$, the coefficient must be $(-1)^{n-k}$. The original sign gives $(-1)^n f^{(n)}(x)$, so it fails for odd $n$. The corrected formula is
> $$f^{(n)}(x)=\lim_{h\to0}\frac1{h^n}\sum_{k=0}^n(-1)^{n-k}\binom nk f(x+kh).$$
> Equivalently, keep $(-1)^k$ and use $f(x+(n-k)h)$. Here $f^{(n)}$ denotes a derivative, rather than the power $f^n$.

Related: [[quiz-02|Derivative perspectives]].
