MAT1001 Differential Calculus: Lecture Notes

\(\newcommand{\footnotename}{footnote}\) \(\def \LWRfootnote {1}\) \(\newcommand {\footnote }[2][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\newcommand {\footnotemark }[1][\LWRfootnote ]{{}^{\mathrm {#1}}}\) \(\let \LWRorighspace \hspace \) \(\renewcommand {\hspace }{\ifstar \LWRorighspace \LWRorighspace }\) \(\newcommand {\TextOrMath }[2]{#2}\) \(\newcommand {\mathnormal }[1]{{#1}}\) \(\newcommand \ensuremath [1]{#1}\) \(\newcommand {\LWRframebox }[2][]{\fbox {#2}} \newcommand {\framebox }[1][]{\LWRframebox } \) \(\newcommand {\setlength }[2]{}\) \(\newcommand {\addtolength }[2]{}\) \(\newcommand {\setcounter }[2]{}\) \(\newcommand {\addtocounter }[2]{}\) \(\newcommand {\arabic }[1]{}\) \(\newcommand {\number }[1]{}\) \(\newcommand {\noalign }[1]{\text {#1}\notag \\}\) \(\newcommand {\cline }[1]{}\) \(\newcommand {\directlua }[1]{\text {(directlua)}}\) \(\newcommand {\luatexdirectlua }[1]{\text {(directlua)}}\) \(\newcommand {\protect }{}\) \(\def \LWRabsorbnumber #1 {}\) \(\def \LWRabsorbquotenumber "#1 {}\) \(\newcommand {\LWRabsorboption }[1][]{}\) \(\newcommand {\LWRabsorbtwooptions }[1][]{\LWRabsorboption }\) \(\def \mathchar {\ifnextchar "\LWRabsorbquotenumber \LWRabsorbnumber }\) \(\def \mathcode #1={\mathchar }\) \(\let \delcode \mathcode \) \(\let \delimiter \mathchar \) \(\def \oe {\unicode {x0153}}\) \(\def \OE {\unicode {x0152}}\) \(\def \ae {\unicode {x00E6}}\) \(\def \AE {\unicode {x00C6}}\) \(\def \aa {\unicode {x00E5}}\) \(\def \AA {\unicode {x00C5}}\) \(\def \o {\unicode {x00F8}}\) \(\def \O {\unicode {x00D8}}\) \(\def \l {\unicode {x0142}}\) \(\def \L {\unicode {x0141}}\) \(\def \ss {\unicode {x00DF}}\) \(\def \SS {\unicode {x1E9E}}\) \(\def \dag {\unicode {x2020}}\) \(\def \ddag {\unicode {x2021}}\) \(\def \P {\unicode {x00B6}}\) \(\def \copyright {\unicode {x00A9}}\) \(\def \pounds {\unicode {x00A3}}\) \(\let \LWRref \ref \) \(\renewcommand {\ref }{\ifstar \LWRref \LWRref }\) \( \newcommand {\multicolumn }[3]{#3}\) \(\require {textcomp}\) \(\require {upgreek}\) \(\newcommand {\intertext }[1]{\text {#1}\notag \\}\) \(\let \Hat \hat \) \(\let \Check \check \) \(\let \Tilde \tilde \) \(\let \Acute \acute \) \(\let \Grave \grave \) \(\let \Dot \dot \) \(\let \Ddot \ddot \) \(\let \Breve \breve \) \(\let \Bar \bar \) \(\let \Vec \vec \) \(\require {cancel}\) \(\newcommand {\LWRsubmultirow }[2][]{#2}\) \(\newcommand {\LWRmultirow }[2][]{\LWRsubmultirow }\) \(\newcommand {\multirow }[2][]{\LWRmultirow }\) \(\newcommand {\mrowcell }{}\) \(\newcommand {\mcolrowcell }{}\) \(\newcommand {\STneed }[1]{}\) \(\def \ud {\mathrm {d}}\) \(\def \ui {\mathrm {i}}\) \(\def \uj {\mathrm {j}}\) \(\def \uh {\mathrm {h}}\) \(\newcommand {\R }{\mathbb {R}}\) \(\newcommand {\N }{\mathbb {N}}\) \(\newcommand {\C }{\mathbb {C}}\) \(\newcommand {\Z }{\mathbb {Z}}\) \(\newcommand {\CP }{\mathbb {C}P}\) \(\newcommand {\RP }{\mathbb {R}P}\) \(\def \bk {\vec {k}}\) \(\def \bm {\vec {m}}\) \(\def \bn {\vec {n}}\) \(\def \be {\vec {e}}\) \(\def \bE {\vec {E}}\) \(\def \bx {\vec {x}}\) \(\def \uL {\mathrm {L}}\) \(\def \uU {\mathrm {U}}\) \(\def \uW {\mathrm {W}}\) \(\def \uE {\mathrm {E}}\) \(\def \uT {\mathrm {T}}\) \(\def \uV {\mathrm {V}}\) \(\def \uM {\mathrm {M}}\) \(\def \uH {\mathrm {H}}\) \(\DeclareMathOperator {\sech }{sech}\) \(\DeclareMathOperator {\csch }{csch}\) \(\DeclareMathOperator {\arcsec }{arcsec}\) \(\DeclareMathOperator {\arccot }{arcCot}\) \(\DeclareMathOperator {\arccsc }{arcCsc}\) \(\DeclareMathOperator {\arccosh }{arcCosh}\) \(\DeclareMathOperator {\arcsinh }{arcsinh}\) \(\DeclareMathOperator {\arctanh }{arctanh}\) \(\DeclareMathOperator {\arcsech }{arcsech}\) \(\DeclareMathOperator {\arccsch }{arcCsch}\) \(\DeclareMathOperator {\arccoth }{arcCoth}\) \(\def \re {\textup {Re}}\) \(\def \im {\textup {Im}}\) \(\newcommand {\up }{\uppi }\) \(\newcommand {\ut }{\uptheta }\) \(\newcommand {\uw }{\upomega }\) \(\newcommand {\uph }{\upphi }\) \(\newcommand {\uvph }{\upvarphi }\)

Chapter 8 Advanced Topics

This section is non examinable and is included so that you have a feel for how the material in this module can be taken further.

8.1 L’Hôpital’s rule for evaluating limits

We saw in chapter 2 that some limits lead to nonsense expressions. For example, If we were confronted with \(\lim _{x\to 0}\sin (x)/x\), this looks like it will result in \(0/0\) which is does not make sense. Remember that not all limits that look indeterminate really are. For example

\begin{equation*} \lim _{x\to 4}\frac {x^{2}-16}{x-4} \end{equation*}

looks at first glance like it will have the form \(0/0\) since both the numerator and denominator vanish for \(x=4\). However, the numerator can be factored as \(x^{2}-16=(x-4)(x+4)\) so the limit simplifies to

\begin{equation*} \lim _{x\to 4}\frac {x^{2}-16}{x-4}=\lim _{x\to 4}\frac {(x-4)(x+4)}{x-4}=\lim _{x\to 4}(x+4)=8. \end{equation*}

This is why we said that you should try to expand and simplify the function that you are taking the limit of as much as possible.

L’Hôpital1’s rule enable us to make sense of some of those limits which still look indeterminate after they have been simplified. To apply L’Hôpital’s rule, we have to be taking the limit of a ratio of functions \(f(x),g(x)\), where both are differentiable, the derivative of \(g(x)\) does not vanish, and in the limit \(f(x)\) and \(g(x)\) wither both go to zero or both go to infinity. Then we have that

\begin{equation} \lim _{x\to a}\frac {f(x)}{g(x)}=\lim _{x\to a}\frac {f'(x)}{g'(x)}, \label {eq: l'hopital's rule} \end{equation}

so we can replace the ratio of the functions with the ratio of their derivatives. If both of the derivatives still vanish, or diverge, in the limit, then process can be repeated and we end up with more derivatives

\begin{equation*} \lim _{x\to a}\frac {f(x)}{g(x)}=\lim _{x\to a}\frac {f^{(n)}(x)}{g^{(n)}(x)}, \end{equation*}

where the superscript \((n)\) means that we are differentiating the functions \(n\) times.

Note that if the limit does not lead to an indeterminate then L’Hôpital’s rule does not hold!

1 Originally spelt L’Hospital, with a silent s and no circumflex

  • Example 8.1. As a counter example consider the limit

    \begin{equation*} \lim _{x\to 1}\frac {f(x)}{g(x)}=\lim _{x\to 1}\frac {x+1}{2x+1}. \end{equation*}

    Both \(\lim _{x\to 1}f(x)=2\) and \(\lim _{x\to 1}g(x)=3\) are finite and no-zero. Evaluating the limit directly gives

    \begin{equation*} \lim _{x\to 1}\frac {x+1}{2x+1}=\frac {2}{3}. \end{equation*}

    We can also calculate the limit of the ratio of derivatives,

    \begin{equation*} \lim _{x\to 1}\frac {f'(x)}{g'(x)}\lim _{x\to 1}\frac {1}{2}=\frac {1}{2}\neq \frac {2}{3}. \end{equation*}

    So the limit of the ratio does not match the limit of the ratio of derivatives.

As long as our original limit looks like it is indeterminate we can use L’Hôpital’s rule.

  • Example 8.2. The limit of \(\sin (x)/x\) as \(x\to 0\) is evaluated as follows

    \begin{equation*} \lim _{x\to 0}\frac {\sin (x)}{x}=\lim _{x\to 0}\frac {\cos (x)}{1}=1. \end{equation*}

We can also evaluate other limits that may not at first look like a ratio of functions.

  • Example 8.3. Consider the limit \(\lim _{x\to -\infty }xe^{x}\) this looks like it becomes the indeterminate \((-\infty )(0)\). If we recall that \(1/e^{x}=e^{-x}\) then we can rewrite the limit as

    \begin{equation*} \lim _{x\to -\infty }xe^{x}=\lim _{x\to -\infty }\frac {x}{e^{-x}}, \end{equation*}

    which looks like the indeterminate \(-\infty /\infty \). Now we can apply L’Hôpital’s rule to get

    \begin{equation*} \lim _{x\to -\infty }\frac {x}{e^{-x}}=\lim _{x\to -\infty }\frac {1}{-e^{-x}}=0, \end{equation*}

    since \(1/\infty \) is zero.

8.2 Trigonometric Derivatives in Degrees

At various points in this module I have said that you should always work with angles in radians as this makes life easier when differentiating trig functions. Here I want to discuss how to take the derivative if we are measuring the angle in degrees.

First we need some notation, we will use the subscript \(\text {rad}\) when our function has an argument in degrees and \(\text {deg}\) when our function has an argument in degrees. Then we can assume the result that we were given in chapter 3, but rewritten in this new notation, that

\begin{equation*} \frac {\ud }{\ud x}\sin _{\text {rad}}(x)=\cos _{\text {rad}}(x). \end{equation*}

Now recall that if \(x\) is an angle in radians then the corresponding angle, \(\theta \) in degrees is

\begin{equation*} \theta =\frac {180^{\circ }}{\uppi }x, \qquad \text {or } x=\frac {\uppi }{180^{\circ }}\theta . \end{equation*}

Now we can calculate the derivative of \(\sin _{\text {deg}}\) using the chain rule

\begin{align*} \frac {\ud }{\ud \theta }\sin _{\text {deg}}(\theta )&=\frac {\ud }{\ud \theta }\sin _{\text {rad}}\left (\frac {\uppi }{180^{\circ }}\theta \right )\\ &=\frac {\ud x}{\ud \theta }\frac {\ud }{\ud x}\sin _{\text {rad}}(x)\\ &=\frac {\uppi }{180^{\circ }}\cos _{\text {rad}}(x)\\ &=\frac {\uppi }{180^{\circ }}\cos _{\text {rad}}\left (\frac {\uppi }{180^{\circ }}\theta \right )\\ &=\frac {\uppi }{180^{\circ }}\cos _{\text {deg}}\left (\theta \right ). \end{align*}

The derivatives of other trig functions can be calculated in similar ways. This is why we have to be careful to use radians as we do not want to have to keep track of factors of \(\uppi /180^{\circ }\) every time we differentiate.

There is an interesting discussion of this result and how to think about the difference between trig functions that take arguments in radians and degrees here

8.3 Functions of two variables

8.4 Multiple integrals

8.5 Optimisation Problems

8.6 Polynomial approximation

In chapter 6 we met Newton’s divided difference method which enabled us to find a polynomial approximation to a function, making use of a table of values with a uniform step size2. The interpolating polynomial is expressed in terms of the data points, step size, and finite differences as

\begin{equation} f(x)=f_{0}+\frac {x-x_{0}}{h}\Delta f_{0}+\frac {(x-x_{0})(x-x_{1})}{2!h^{2}}\Delta ^{2}f_{0}+\dots +\frac {(x-x_{0})(x-x_{1})\cdots (x-x_{n})}{n!h^{n}}\Delta ^{n}f_{0}. \label {eq: divided difference 2} \end{equation}

The number of terms \(n+1\) is determined by the number of data points we start of with as if we only have one point, then we just get \(f_{0}\), two data points gives one first difference \(\Delta f_{0}=f_{1}-f_{0}\), three data points gives one second difference, \(\Delta ^{2}f_{0}=\Delta f_{1}-\Delta f_{0}\). Thus \(n+1\) points gives a series with \(n+1\) terms as shown in eq. (8.2).

The discussion of numerical differentiation in chapter 6 showed us that these finite differences are discrete are discrete versions of the derivative. For example

\begin{equation*} \frac {\ud f}{\ud x}(a)\simeq \frac {f(a+h)-f(a)}{h}=\frac {\Delta f_{a}}{h} \end{equation*}

in the forward difference scheme. It turns out that we can do the same for higher derivatives and see that

\begin{equation*} \frac {\ud ^{2}f}{\ud x^{2}}(a)\simeq \frac {\Delta ^{2}f_{a}}{h^{2}}, \end{equation*}

or in general

\begin{equation*} \frac {\Delta ^{n}f_{a}}{h^{n}}=\frac {\ud ^{n}f}{\ud x^{n}}(a) \end{equation*}

2 We saw that if teh step size is not uniform we can still