```html

Derivatives

The concept of a derivative is fundamental in calculus and represents the instantaneous rate of change of a function with respect to one of its variables. It tells us how a function's output changes as its input changes by a tiny amount. Geometrically, the derivative of a function at a point gives the slope of the tangent line to the function's graph at that point.

Left and Right Derivatives

For a function $f(x)$ to be differentiable at a point $x=c$, it must be continuous at $x=c$. However, continuity alone does not guarantee differentiability. For instance, functions with sharp corners or cusps are continuous but not differentiable at those points. To understand differentiability more deeply, we introduce the concepts of left and right derivatives.

The **right derivative** of a function $f(x)$ at a point $x=c$, denoted as $f'(c^+)$ or $f'_+(c)$, is defined as the limit of the difference quotient as $h$ approaches 0 from the positive side (i.e., $h \to 0^+$):

$f'(c^+) = \lim_{h \to 0^+} \frac{f(c+h) - f(c)}{h}$

This limit represents the slope of the tangent line as we approach the point $c$ from the right side of the graph.

The **left derivative** of a function $f(x)$ at a point $x=c$, denoted as $f'(c^-)$ or $f'_-(c)$, is defined as the limit of the difference quotient as $h$ approaches 0 from the negative side (i.e., $h \to 0^-$):

$f'(c^-) = \lim_{h \to 0^-} \frac{f(c+h) - f(c)}{h}$

This limit represents the slope of the tangent line as we approach the point $c$ from the left side of the graph.

A function $f(x)$ is differentiable at $x=c$ if and only if both the left and right derivatives exist and are equal. That is, $f(x)$ is differentiable at $x=c$ if $f'(c^+) = f'(c^-)$. In this case, the derivative $f'(c)$ is equal to this common value:

$f'(c) = f'(c^+) = f'(c^-)$

Example: Consider the function $f(x) = |x|$ at $x=0$.

Right derivative at $x=0$:

$f'(0^+) = \lim_{h \to 0^+} \frac{|0+h| - |0|}{h} = \lim_{h \to 0^+} \frac{|h|}{h}$

Since $h \to 0^+$, $h$ is positive, so $|h| = h$.

$f'(0^+) = \lim_{h \to 0^+} \frac{h}{h} = \lim_{h \to 0^+} 1 = 1$

Left derivative at $x=0$:

$f'(0^-) = \lim_{h \to 0^-} \frac{|0+h| - |0|}{h} = \lim_{h \to 0^-} \frac{|h|}{h}$

Since $h \to 0^-$, $h$ is negative, so $|h| = -h$.

$f'(0^-) = \lim_{h \to 0^-} \frac{-h}{h} = \lim_{h \to 0^-} -1 = -1$

Since $f'(0^+) = 1$ and $f'(0^-) = -1$, the left and right derivatives are not equal. Therefore, $f(x) = |x|$ is not differentiable at $x=0$. This aligns with the geometric understanding of the graph of $|x|$ having a sharp corner at the origin.

Mean Value Theorem (MVT)

The Mean Value Theorem is a cornerstone of differential calculus. It establishes a relationship between the average rate of change of a function over an interval and its instantaneous rate of change at some point within that interval.

Statement of the Mean Value Theorem: If a function $f(x)$ satisfies the following two conditions:

  1. $f(x)$ is continuous on the closed interval $[a, b]$.
  2. $f(x)$ is differentiable on the open interval $(a, b)$.
Then, there exists at least one number $c$ in the open interval $(a, b)$ such that:

$f'(c) = \frac{f(b) - f(a)}{b - a}$

Interpretation: The theorem states that if a function is continuous and differentiable over an interval, then there must be at least one point within that interval where the instantaneous rate of change (the derivative $f'(c)$) is equal to the average rate of change of the function over the entire interval (represented by the slope of the secant line connecting the endpoints $(a, f(a))$ and $(b, f(b))$).

Geometric Interpretation: The MVT guarantees that there is a point $c$ in $(a, b)$ where the tangent line to the curve $y=f(x)$ is parallel to the secant line connecting the points $(a, f(a))$ and $(b, f(b))$.

Example: Let $f(x) = x^2$ on the interval $[1, 3]$.

1. $f(x) = x^2$ is a polynomial, so it is continuous on $[1, 3]$ and differentiable on $(1, 3)$. The conditions of the MVT are satisfied.

2. Calculate the average rate of change: $\frac{f(b) - f(a)}{b - a} = \frac{f(3) - f(1)}{3 - 1} = \frac{3^2 - 1^2}{2} = \frac{9 - 1}{2} = \frac{8}{2} = 4$.

3. Find the derivative of $f(x)$: $f'(x) = 2x$.

4. Find $c$ such that $f'(c) = 4$: $2c = 4$ $c = 2$.

Since $c=2$ lies in the interval $(1, 3)$, the Mean Value Theorem is verified for this function and interval.

Rolle's Theorem

Rolle's Theorem is a special case of the Mean Value Theorem. It provides a condition under which the derivative of a function must be zero at some point within an interval.

Statement of Rolle's Theorem: If a function $f(x)$ satisfies the following three conditions:

  1. $f(x)$ is continuous on the closed interval $[a, b]$.
  2. $f(x)$ is differentiable on the open interval $(a, b)$.
  3. $f(a) = f(b)$.
Then, there exists at least one number $c$ in the open interval $(a, b)$ such that $f'(c) = 0$.

Interpretation: If a function is continuous and differentiable on an interval, and its values at the endpoints of the interval are equal, then there must be at least one point within the interval where the tangent line is horizontal (i.e., the derivative is zero).

Geometric Interpretation: If the graph of a function starts and ends at the same height, then there must be at least one point between the start and end where the graph has a horizontal tangent.

Proof using MVT: Rolle's Theorem can be easily proven from the MVT. If $f(a) = f(b)$, then $\frac{f(b) - f(a)}{b - a} = \frac{0}{b - a} = 0$. According to the MVT, there exists a $c$ in $(a, b)$ such that $f'(c) = \frac{f(b) - f(a)}{b - a}$. Therefore, $f'(c) = 0$.

Example: Let $f(x) = x^3 - 3x^2 + 2x$ on the interval $[0, 2]$.

1. $f(x)$ is a polynomial, so it is continuous on $[0, 2]$ and differentiable on $(0, 2)$.

2. Check the endpoint values: $f(0) = 0^3 - 3(0)^2 + 2(0) = 0$. $f(2) = 2^3 - 3(2)^2 + 2(2) = 8 - 3(4) + 4 = 8 - 12 + 4 = 0$. Since $f(0) = f(2)$, the third condition of Rolle's Theorem is met.

3. Find the derivative of $f(x)$: $f'(x) = 3x^2 - 6x + 2$.

4. Find $c$ such that $f'(c) = 0$: $3c^2 - 6c + 2 = 0$.

Using the quadratic formula, $c = \frac{-(-6) \pm \sqrt{(-6)^2 - 4(3)(2)}}{2(3)} = \frac{6 \pm \sqrt{36 - 24}}{6} = \frac{6 \pm \sqrt{12}}{6} = \frac{6 \pm 2\sqrt{3}}{6} = 1 \pm \frac{\sqrt{3}}{3}$.

The two values for $c$ are $1 - \frac{\sqrt{3}}{3}$ and $1 + \frac{\sqrt{3}}{3}$. Approximately, $\sqrt{3} \approx 1.732$, so $\frac{\sqrt{3}}{3} \approx 0.577$. $c_1 \approx 1 - 0.577 = 0.423$. $c_2 \approx 1 + 0.577 = 1.577$.

Both $c_1 \approx 0.423$ and $c_2 \approx 1.577$ lie within the open interval $(0, 2)$. Thus, Rolle's Theorem is satisfied.

Taylor's Theorem

Taylor's Theorem is a powerful tool that allows us to approximate a function in a neighborhood of a point using its derivatives at that point. It provides a way to represent a function as an infinite sum of terms, where each term is derived from the function's derivatives at a single point. The finite version of Taylor's Theorem, using a remainder term, provides an approximation with a bounded error.

Taylor Series: For a function $f(x)$ that has infinitely many derivatives at a point $a$, the Taylor series of $f(x)$ centered at $a$ is given by:

$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x-a)^n = f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \frac{f'''(a)}{3!}(x-a)^3 + \dots$

where $f^{(n)}(a)$ denotes the $n$-th derivative of $f$ evaluated at $a$, and $0! = 1$.

A special case is the **Maclaurin series**, which is a Taylor series centered at $a=0$:

$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n = f(0) + \frac{f'(0)}{1!}x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3 + \dots$

Taylor's Theorem with Remainder (Lagrange Form): If $f(x)$ is such that its $(n+1)$-th derivative $f^{(n+1)}(x)$ exists on an interval containing $a$, then for any $x$ in that interval, there exists a number $c$ between $a$ and $x$ such that:

$f(x) = P_n(x) + R_n(x)$

where $P_n(x)$ is the Taylor polynomial of degree $n$ centered at $a$:

$P_n(x) = f(a) + \frac{f'(a)}{1!}(x-a) + \frac{f''(a)}{2!}(x-a)^2 + \dots + \frac{f^{(n)}(a)}{n!}(x-a)^n$

and $R_n(x)$ is the remainder term (in Lagrange form):

$R_n(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x-a)^{n+1}$

The term $R_n(x)$ represents the error in approximating $f(x)$ by $P_n(x)$.

Example: Find the Maclaurin series for $f(x) = e^x$.

We need to find the derivatives of $f(x) = e^x$ and evaluate them at $a=0$. $f(x) = e^x \implies f(0) = e^0 = 1$ $f'(x) = e^x \implies f'(0) = e^0 = 1$ $f''(x) = e^x \implies f''(0) = e^0 = 1$ $f^{(n)}(x) = e^x \implies f^{(n)}(0) = e^0 = 1$ for all $n \ge 0$.

Substituting these into the Maclaurin series formula:

$e^x = \sum_{n=0}^{\infty} \frac{1}{n!}x^n = 1 + \frac{x}{1!} + \frac{x^2}{2!} + \frac{x^3}{3!} + \dots$

This series converges for all real numbers $x$.

Example using Taylor's Theorem with Remainder: Approximate $f(x) = \sin(x)$ near $x=0$ using a Taylor polynomial of degree 3, and estimate the error.

Center $a=0$. We need derivatives up to order 4 for the remainder. $f(x) = \sin(x) \implies f(0) = 0$ $f'(x) = \cos(x) \implies f'(0) = 1$ $f''(x) = -\sin(x) \implies f''(0) = 0$ $f'''(x) = -\cos(x) \implies f'''(0) = -1$ $f^{(4)}(x) = \sin(x) \implies f^{(4)}(c) = \sin(c)$

The Taylor polynomial of degree $n=3$ is: $P_3(x) = f(0) + \frac{f'(0)}{1!}x + \frac{f''(0)}{2!}x^2 + \frac{f'''(0)}{3!}x^3$ $P_3(x) = 0 + \frac{1}{1!}x + \frac{0}{2!}x^2 + \frac{-1}{3!}x^3$ $P_3(x) = x - \frac{x^3}{6}$

The remainder term $R_3(x)$ is: $R_3(x) = \frac{f^{(4)}(c)}{(3+1)!}(x-0)^{3+1} = \frac{\sin(c)}{4!}x^4 = \frac{\sin(c)}{24}x^4$, where $c$ is between 0 and $x$.

So, $\sin(x) = x - \frac{x^3}{6} + \frac{\sin(c)}{24}x^4$.

The error in approximating $\sin(x)$ by $x - \frac{x^3}{6}$ is $\frac{\sin(c)}{24}x^4$. Since $-1 \le \sin(c) \le 1$, the absolute error is bounded by $\frac{|x|^4}{24}$.

L'Hôpital's Rule

L'Hôpital's Rule is a method used to evaluate limits of indeterminate forms. An indeterminate form is an expression of the form $\frac{0}{0}$ or $\frac{\infty}{\infty}$ that arises when trying to compute a limit. The rule states that under certain conditions, the limit of a quotient of two functions is equal to the limit of the quotient of their derivatives.

Statement of L'Hôpital's Rule: Suppose we want to find the limit: $\lim_{x \to c} \frac{f(x)}{g(x)}$ If this limit is an indeterminate form of type $\frac{0}{0}$ or $\frac{\infty}{\infty}$, and if the limit $\lim_{x \to c} \frac{f'(x)}{g'(x)}$ exists (or is $\infty$ or $-\infty$), then:

$\lim_{x \to c} \frac{f(x)}{g(x)} = \lim_{x \to c} \frac{f'(x)}{g'(x)}$

The rule also applies to one-sided limits (e.g., $x \to c^+$ or $x \to c^-$) and limits as $x \to \infty$ or $x \to -\infty$.

Conditions for applying L'Hôpital's Rule:

  1. The limit must be of the form $\frac{0}{0}$ or $\frac{\infty}{\infty}$.
  2. Both $f(x)$ and $g(x)$ must be differentiable in an open interval containing $c$, except possibly at $c$.
  3. $g'(x) \neq 0$ in the interval, except possibly at $c$.
  4. The limit of the ratio of the derivatives, $\lim_{x \to c} \frac{f'(x)}{g'(x)}$, must exist or be $\pm \infty$.

Other Indeterminate Forms: L'Hôpital's Rule can also be used to evaluate limits that result in other indeterminate forms like $0 \cdot \infty$, $\infty - \infty$, $1^\infty$, $0^0$, and $\infty^0$. This is done by algebraically manipulating the expression to transform it into a $\frac{0}{0}$ or $\frac{\infty}{\infty}$ form.

  • For $0 \cdot \infty$: Rewrite as $\frac{f(x)}{1/g(x)}$ (form $\frac{0}{0}$) or $\frac{g(x)}{1/f(x)}$ (form $\frac{\infty}{\infty}$).
  • For $\infty - \infty$: Rewrite as $\frac{f(x)g(x) - h(x)k(x)}{g(x)k(x)}$ by finding a common denominator, or rewrite one term as $\frac{1}{1/f(x)}$ to get a difference of reciprocals.
  • For $1^\infty$, $0^0$, $\infty^0$: Use logarithms. Let $y = [f(x)]^{g(x)}$, then $\ln(y) = g(x) \ln(f(x))$. Evaluate $\lim \ln(y)$ which will be of the form $0 \cdot \infty$, then exponentiate the result.

Example 1: Indeterminate Form $\frac{0}{0}$ Evaluate $\lim_{x \to 0} \frac{\sin(x)}{x}$.

As $x \to 0$, $\sin(x) \to 0$ and $x \to 0$. This is the indeterminate form $\frac{0}{0}$. Let $f(x) = \sin(x)$ and $g(x) = x$. $f'(x) = \cos(x)$ and $g'(x) = 1$.

Apply L'Hôpital's Rule: $\lim_{x \to 0} \frac{\sin(x)}{x} = \lim_{x \to 0} \frac{\cos(x)}{1} = \frac{\cos(0)}{1} = \frac{1}{1} = 1$.

Example 2: Indeterminate Form $\frac{\infty}{\infty}$ Evaluate $\lim_{x \to \infty} \frac{x^2}{e^x}$.

As $x \to \infty$, $x^2 \to \infty$ and $e^x \to \infty$. This is the indeterminate form $\frac{\infty}{\infty}$. Let $f(x) = x^2$ and $g(x) = e^x$. $f'(x) = 2x$ and $g'(x) = e^x$.

Apply L'Hôpital's Rule: $\lim_{x \to \infty} \frac{x^2}{e^x} = \lim_{x \to \infty} \frac{2x}{e^x}$.

This is still an indeterminate form $\frac{\infty}{\infty}$. We apply the rule again. $f''(x) = 2$ and $g''(x) = e^x$.

Apply L'Hôpital's Rule again: $\lim_{x \to \infty} \frac{2x}{e^x} = \lim_{x \to \infty} \frac{2}{e^x}$.

As $x \to \infty$, $e^x \to \infty$, so $\frac{2}{e^x} \to 0$. Thus, $\lim_{x \to \infty} \frac{x^2}{e^x} = 0$.

Example 3: Indeterminate Form $0 \cdot \infty$ Evaluate $\lim_{x \to 0^+} x \ln(x)$.

As $x \to 0^+$, $x \to 0$ and $\ln(x) \to -\infty$. This is the indeterminate form $0 \cdot (-\infty)$. Rewrite the expression as a fraction: $x \ln(x) = \frac{\ln(x)}{1/x}$.

Now, as $x \to 0^+$, $\ln(x) \to -\infty$ and $1/x \to \infty$. This is the indeterminate form $\frac{-\infty}{\infty}$. Let $f(x) = \ln(x)$ and $g(x) = 1/x$. $f'(x) = 1/x$ and $g'(x) = -1/x^2$.

Apply L'Hôpital's Rule: $\lim_{x \to 0^+} \frac{\ln(x)}{1/x} = \lim_{x \to 0^+} \frac{1/x}{-1/x^2} = \lim_{x \to 0^+} \frac{1}{x} \cdot (-x^2) = \lim_{x \to 0^+} (-x) = 0$.

Shortcut for L'Hôpital's Rule: Remember "derivative of the top over derivative of the bottom." Always check for indeterminate forms first! If it's not $\frac{0}{0}$ or $\frac{\infty}{\infty}$, L'Hôpital's Rule cannot be applied. You might need to apply it multiple times.
```