Further Calculus

If you won’t further your studies into a STEM discipline, then the tools and techniques in this post would not be terribly relevant for you. But for the aspiring STEM student, we are now going to do calculus with trigonometric functions and exponential functions.

The derivative of y = \sin(x) is an exceedingly challenging idea to compute without more technical tool of limits outside the high school syllabus. To conceive of a meaningful derivation sacrifices either rigour or intuitiveness. Nevertheless, for this post, I will present the intuitive idea that appeared to me as I lay in my bed, fast asleep.

Denote f(x) = \sin(x). Derivatives intuitively measures the gradient of the tangent to the curve. Therefore, in the diagram below, I have computed the gradient of the tangent to each point on the curve y = f(x). I colour-coded each point (t, f(t)) using the gradient f'(t) at that point on a scale from very-red (i.e. gradient of -1) to very-green (i.e. gradient of +1). Hence, the graph goes from green to red, then back to green at the very end.

If now we plot the points of the new graph y = f'(x) according to the colour-coding, the first quarter of the new graph lies in the top-half green section. The second and third quarters of the new graph lie in the bottom-half red section. And finally, the fourth quarter of the new graph lie in the top half-green section once again.

Recalling our discussions on trigonometric graphs, y=f'(x) looks very much like the graph of y = \cos(x). This is, in fact, mathematically true.

Theorem 1. \displaystyle \frac{\mathrm d}{\mathrm dx}(\sin(x)) = \cos(x).

Proof. Omitted. Or relegated to a study in more advanced calculus. In the language of limits, we need to use the limit definition of the derivative to show that

\displaystyle \lim_{h \to 0} \frac{\sin(x + h) - \sin(x)}{ h } = \cos(x).

Then the core result is proven using the limit

\displaystyle \lim_{h \to 0} \frac{\sin(h)}{h} = 1.

Remark 1. Strictly speaking, we have put the cart before the horse—I couldn’t colour the sine graph unless I already knew that the derivative of \sin(x) is \cos(x). Nevertheless, the goal of this post is to motivate the result, then relegating a formal proof elsewhere in the blog.

You might wonder—in that case, why not obtain all other derivatives in this manner? Other than the fact that I need to slave-drive ChatGPT harder than I already do, it turns out that the existing differentiation technology, if we accept them to remain true for non-polynomials, empowers us to obtain (almost) all of these other derivatives.

For instance, the chain rule helps us compute the derivative of \cos(x), since the complementary angle identities tell us that

\begin{aligned} \cos(x) &= \sin(\pi/2 - x), \\ \sin(x) &= \cos(\pi/2 - x). \end{aligned}

Example 1. Show that \displaystyle \frac{\mathrm d}{\mathrm dx}(\cos(x)) = -{\sin(x)}.

Solution. Using the complementary angle identities, the chain rule, and Theorem 1,

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\cos(x)) &= \frac{\mathrm d}{\mathrm dx}(\sin(\pi/2 - x)) \\ &= \cos(\pi/2 - x) \cdot \frac{\mathrm d}{\mathrm dx} (\pi/2 - x) \\ &= \sin( x) \cdot \left( \frac{\mathrm d}{\mathrm dx} (\pi/2) - \frac{\mathrm d}{\mathrm dx} (x) \right) \\ &= \sin( x) \cdot ( 0 -  1 ) \\ &= -{\sin(x)}. \end{aligned}

These two results, coupled with the quotient rule, help us compute the derivative of \tan(x), since \tan(x) = \sin(x)/{\cos(x)}. These reasons and more motivated our study on trigonometric identities.

Example 2. Show that \displaystyle \frac{\mathrm d}{\mathrm dx}(\tan(x)) = \sec^2(x).

Solution. Using the quotient rule and previous theorems,

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\tan(x)) &= \frac{\mathrm d}{\mathrm dx} \left( \frac{\sin(x)}{\cos(x)} \right) \\ &= \frac{\frac{\mathrm d}{\mathrm dx}(\sin(x)) \cdot \cos(x) - \sin(x) \cdot \frac{\mathrm d}{\mathrm dx}(\cos(x)) }{\cos^2(x)} \\ &= \frac{ \cos(x) \cdot \cos(x) - \sin(x) \cdot (-{\sin(x)}) }{\cos^2(x)} \\ &= \frac{ \cos^2(x) + \sin^2(x) }{\cos^2(x)} \\ &= \frac 1{\cos^2(x)} \\ &= \sec^2(x). \end{aligned}

There are many more commonly-used derivatives in this exercise here. We now state the integral versions of these three results.

Theorem 4. The following integrals hold:

\begin{aligned} \int \sin(x)\, \mathrm dx &= -{\cos(x)} + C, \\ \int \cos(x)\, \mathrm dx &= \sin(x) + C, \\ \int \sec^2(x)\, \mathrm dx &= \tan(x) + C. \end{aligned}

Proof. We prove the first result to illustrate the power of thinking of integration as reverse differentiation. Using Theorem 2 and linearity,

\displaystyle -\int \sin(x)\, \mathrm dx= \int -{\sin(x)}\, \mathrm dx = \cos(x) + C.

Therefore dividing by -1 on both sides,

\displaystyle \int \sin(x)\, \mathrm dx = -{\cos(x)} + C',

where C' := -C.

We have to discuss the exponential family too. Once again, just like with the derivative of \sin(x), the derivative of e^x requires more technical real-analytic tools to properly establish. Nevertheless, here is an experimentally-inspired attempt at motivating the result.

Let’s first ask ourselves: how can we experimentally compute the gradient f'(t) of the tangent L_t at a point P(t, f(t)) on the graph of y = f(x)? By definition, this tangent must pass through the point Q(t+1, f(t) + f'(t)).

Draw a line M_t parallel to the tangent passing through R(t+1, f(t)). We leave it as an exercise to check that its x-intercept x_0 is given by the expression

\displaystyle x_0 = (t+1)-\frac{ f(t) }{ f'(t) }.

In particular, if we know that M_t has an x-intercept of x_0, then we can compute f'(t) via

\displaystyle f'(t) = \frac{ f(t) }{(t+1)-x_0}.

Now particularise to f(x) = e^x, which we can draw by sampling input values:

Notice that the x-intercept of M_t is exactly x_0 = t. This result is not a bug—it’s a feature of the graph of y = e^x, and it works for any t. In particular, using our “experimental” calculation of f'(t), we get

\displaystyle f'(t) = \frac{f(t)}{(t+1) - t} = f(t) = e^t.

This result is a consequence of the famous differentiation result for exponentials.

Theorem 2. \displaystyle \frac{\mathrm d}{\mathrm dx}(e^x) = e^x.

Proof. Omitted.

Remark 2. Once again, we have assumed Theorem 2 in our illustration. A complete proof requires a rigorous definition of the real exponential, then deducing its various properties, and concluding by using the limit definition of the derivative. In the language of limits, the heart of the proof is the limit result

\displaystyle \lim_{h \to 0} \frac{e^h - 1}{h} = 1.

Recall that e^x has a foil: the logarithm. More precisely, whenever well-defined,

e^{\ln(x)} = x,\quad x > 0.

Example 3. Show that \displaystyle \frac{\mathrm d}{\mathrm dx}(\ln(x)) = 1/x for x > 0. The domain restriction x > 0 allows the expression \ln(x) to make sense.

Solution. Using the chain rule and Theorem 2,

\begin{aligned} e^{\ln(x)} &= x \\ \frac{\mathrm d}{\mathrm dx} (e^{\ln(x)}) &= \frac{\mathrm d}{\mathrm dx}(x) \\ e^{\ln(x)} \cdot \frac{\mathrm d}{\mathrm dx}(\ln(x)) &= 1 \\ \frac{\mathrm d}{\mathrm dx}(\ln(x)) &= \frac 1{ e^{\ln(x)} } = \frac 1x. \end{aligned}

Remark 1. For x < 0, we have -x > 0, so the chain rule yields

\displaystyle \frac{\mathrm d}{\mathrm dx} (\ln(-x)) = \frac 1{-x} \cdot (-1) = \frac 1x.

Therefore, the integral version of these results are given by

\displaystyle \int \frac 1x\, \mathrm dx  = \begin{cases} \ln(x) + C_1, & x > 0, \\ \ln(-x) + C_2, & x < 0.\end{cases}

Since the absolute value is defined by

|x| = \begin{cases} x, & x \geq 0, \\ -x, & x < 0, \end{cases}

we can abbreviate the integral result as follows:

\displaystyle \int \frac 1x\, \mathrm dx  = \ln |x| + C,\quad x \neq 0.

In particular, the absolute value symbol | \cdot | is essential in our final answer.

Definition 1. Define -\pi/2 \leq \sin^{-1}(x) \leq \pi/2 for -1 \leq x \leq 1 by

\sin^{-1}(x) = y \quad \iff \quad \sin(y) = x.

Similarly, define 0 \leq \cos^{-1}(x) \leq \pi for -1 \leq x \leq 1 by

\cos^{-1}(x) = y \quad \iff \quad \cos(y) = x.

Likewise, define -\pi/2 < \tan^{-1}(x) < \pi/2 for real x by

\tan^{-1}(x) = y \quad \iff \quad \tan(y) = x.

In particular,

\begin{aligned}\sin(\sin^{-1}(x)) &= x, \\ \cos(\cos^{-1}(x)) &= x, \\ \tan(\tan^{-1}(x)) &= x. \end{aligned}

The domain restrictions allow the expressions \sin^{-1}(x), \cos^{-1}(x), \tan^{-1}(x) to make sense, similar to how the domain restriction x > 0 allows the expression \ln(x) to make sense.

Example 4. Show that \displaystyle \int \frac 1{\sqrt{1-x^2}}\, \mathrm dx = \sin^{-1}(x) + C.

Solution. For the first result, use the chain rule and Theorem 1:

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\sin(\sin^{-1}(x))) &= \frac{\mathrm d}{\mathrm dx}(x) \\ \cos(\sin^{-1}(x)) \cdot \frac{\mathrm d}{\mathrm dx}(\sin^{-1}(x)) &= 1 . \end{aligned}

Since -1 < x < 1, -\pi/2 < \sin^{-1}(x) < \pi/2, so that 0 < \cos(\sin^{-1}(x)) \leq 1.

By the Pythagorean identity,

\begin{aligned} \cos(\sin^{-1}(x)) &= \sqrt{ 1 - \sin^2(\sin^{-1}(x)) } \\ &={ \sqrt{ 1 - ( \sin(\sin^{-1}(x)) )^2 } } \\ &= { \sqrt{ 1 - x^2 } }. \end{aligned}

Therefore,

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\sin^{-1}(x)) &= \frac 1{\cos(\sin^{-1}(x))}  = \frac 1{\sqrt{1-x^2}}.\end{aligned}

By definition,

\displaystyle  \int \frac 1{\sqrt{1-x^2}}\, \mathrm dx  = \sin^{-1}(x) + C.

Example 5. Show that \displaystyle \int \frac 1{1+x^2}\, \mathrm dx = \tan^{-1}(x) + C.

Solution. Follow the strategy in Example 4 by using the chain rule and Example 2:

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\tan(\tan^{-1}(x))) &= \frac{\mathrm d}{\mathrm dx}(x) \\ \sec^2(\tan^{-1}(x)) \cdot \frac{\mathrm d}{\mathrm dx}(\tan^{-1}(x)) &= 1. \end{aligned}

Using the Pythagorean identity,

\begin{aligned} \sec^2(\tan^{-1}(x)) &= 1 + \tan^2(\tan^{-1}(x))  \\ &= 1 +( \tan(\tan^{-1}(x)) )^2 \\ &= 1 + x^2. \end{aligned}

Therefore,

\displaystyle \frac{\mathrm d}{\mathrm dx}(\tan^{-1}(x)) = \frac 1{\sec^2(\tan^{-1}(x))} = \frac 1{1 + x^2}.

By definition,

\displaystyle \int \frac 1{ 1+x^2 }\, \mathrm dx = \tan^{-1}(x) + C.

We conclude with one rather peculiar result regarding \cos^{-1}(x).

Example 6. Given that -1 \leq x \leq 1, show that

\displaystyle \frac{\mathrm d}{\mathrm dx}(\cos^{-1}(x)) = - \frac 1{\sqrt{1-x^2}}.

Solution. By the complementary angle identities,

\begin{aligned}\cos^{-1}(x) &= \cos^{-1}(\sin(\sin^{-1}(x))) \\ &= \cos^{-1}(\cos(\pi/2 - \sin^{-1}(x))) \\ &= \pi/2 - \sin^{-1}(x).\end{aligned}

Differentiating on both sides,

\begin{aligned} \frac{\mathrm d}{\mathrm dx}(\cos^{-1}(x)) &= \frac{\mathrm d}{\mathrm dx}(\pi/2) - \frac{\mathrm d}{\mathrm dx}(\sin^{-1}(x)) \\ &= 0 -\frac 1{\sqrt{ 1 - x^2 }} \\ &= -\frac 1{\sqrt{ 1 - x^2 }}. \end{aligned}

We have barely scratched the surface of calculus. There is much more that can be explored in many depths. At a high level, the area interpretation of integration allows mathematicians and statisticians to model probabilities—our conceived notions of randomness. We explore a special sub-branch of this topic next time.

—Joel Kindiak, 23 Jan 26, 2045H

,

Published by


Leave a comment