Back
This section is aimed at students in upper secondary education in the Danish school system, some objects will be simplified some details will be omitted.

Maclaurin Series

In this section I will present some familiar functions as so-called Maclaurin series and it's application to derivatives.

Exponential Function

Consider the following function, represented as a sum $$f(x)=\sum_{n=0}^\infty\frac{x^n}{n!}=1+x+\frac{x^2}{2}+\frac{x^3}{3!}+\cdots$$ If we differentiate term-wise we get \begin{align} f'(x)=&\sum_{n=0}^\infty\frac{nx^{n-1}}{n!}\\ =&\sum_{n=1}^\infty\frac{x^{n-1}}{(n-1)!}\\ =&\sum_{n=0}^\infty\frac{x^n}{n!}\\ =&f(x) \end{align} and as well we know, the only function with this property is the natural exponential function so \(f(x)=ce^x\) but \(c=f(0)=1\) so \(f(x)=e^x\).

Trigonometric Functions

We can use Euler's formula to express the trigonometric functions as their Maclaurin series: \begin{align} \cos(x)+i\sin(x)=&e^{ix}=\sum_{n=0}^\infty\frac{(ix)^{n}}{n!}= \sum_{n=0}^\infty\frac{i^nx^n}{n!}\\ =&1+ix+i^2\frac{x^2}{2}+i^3\frac{x^3}{3!}+i^4\frac{x^4}{4!}+i^5 \frac{x^5}{5!}+\cdots\\ =&1+ix-\frac{x^2}{2}-i\frac{x^3}{3!}+\frac{x^4}{4!}+i\frac{x^5}{5!}\cdots\\ =&1-\frac{x^2}{2}+\frac{x^4}{4!}-\cdots\\ +i&\left(x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots\right) \end{align} This means that \begin{align} \cos(x)=&1-\frac{x^2}{2}+\frac{x^4}{4!}-\cdots\\ =&\sum_{n=0}^\infty(-1)^n\frac{x^{2n}}{(2n)!}\\ \sin(x)=&x-\frac{x^3}{3!}+\frac{x^5}{5!}-\cdots\\ =&\sum_{n=0}^\infty(-1)^n\frac{x^{2n+1}}{(2n+1)!} \end{align} Euler's formula also provides another way to express the trigonometric functions, by considering that \begin{align} e^{ix}\pm e^{-ix}=&\cos(x)+i\sin(x)\pm\cos(-x)+i\sin(-x)\\ =&\cos(x)\pm\cos(x)+i(\sin(x)\mp\sin(x)) \end{align} if we take the top sign, the sines will cancel, and if we take the bottom signs, the cosines cancel. This yields the following formulas: \begin{align} \cos(x)=&\frac{e^{ix}+e^{-ix}}{2}\\ \sin(x)=&\frac{e^{ix}-e^{-ix}}{2i} \end{align} An application to this definition is that

Lemmas

$$\sin(a+b)=\sin(a)\cos(b)+\cos(a)\sin(b)$$ $$\sin(a)-\sin(b)=2\cos\left(\frac{a+b}{2}\right)\sin\left(\frac{a-b}{2}\right)$$ $$\lim_{x\to0}\frac{1-\cos(x)}{x}=0$$ $$\lim_{x\to0}\frac{\sin(x)}{x}=1$$

Proof

We start by rewriting the right hand side of the first equation: \begin{align} \sin(a)\cos(b)+\cos(a)\sin(b)=&\frac{e^{ia}-e^{-ia}}{2i}\frac{e^{ib}+e^{-ib}}{2}+\frac{e^{ia}+e^{-ia}}{2}\frac{e^{ib}-e^{-ib}}{2i}\\ =&\frac{e^{i(a+b)}}{4i}+\cancel{\frac{e^{i(a-b)}}{4i}-\frac{e^{i(-a+b)}}{4i}}-\frac{e^{-i(a+b)}}{4i}+\frac{e^{i(a+b)}}{4i}-\cancel{\frac{e^{i(a-b)}}{4i}+\frac{e^{i(-a+b)}}{4i}}-\frac{e^{-i(a+b)}}{4i}\\ =&2\left(\frac{e^{i(a+b)}}{4i}-\frac{e^{-i(a+b)}}{4i}\right)=\frac{e^{i(a+b)}-e^{-i(a+b)}}{2i}\\ =&\sin(a+b) \end{align} and the second: \begin{align} 2\cos\left(\frac{a+b}{2}\right)\sin\left(\frac{a-b}{2}\right)=&\cancel{2}\frac{e^{i\frac{a+b}{2}}+e^{-i\frac{a+b}{2}}}{\cancel{2}}\frac{e^{i\frac{a-b}{2}}-e^{-i\frac{a-b}{2}}}{2i}\\ =&\frac{e^{i\frac{a\cancel{+b}}{2}+i\frac{a\cancel{-b}}{2}}-e^{i\frac{\cancel{a}+b}{2}-i\frac{\cancel{a}-b}{2}}+e^{-i\frac{\cancel{a}+b}{2}+i\frac{\cancel{a}-b}{2}}-e^{-i\frac{a\cancel{+b}}{2}-i\frac{a\cancel{-b}}{2}}}{2i}\\ =&\frac{e^{ia}-e^{ib}+e^{-ib}-e^{-ia}}{2i}\\ =&\frac{e^{ia}-e^{-ia}}{2i}-\frac{e^{ib}-e^{-ib}}{2i}\\ =&\sin(a)-\sin(b) \end{align} For the last two I make a geometric argument. Consider the normal sine and cosine, it's the height and width of a right triangle in the unit circle. For \(1-\cos(x)\) we make another right triangle that is adjacent to the first, but where the third vertex is at \((1,0)\) and call its angle \(\theta\), instead of at the origin. In this new triangle we have a hypotenuse that approximately has the same length as the arc length \(x\) for small values of \(x\) and \(\lim_{x\to0}\theta=\frac{\pi}{2}\), which means that $$\lim_{x\to0}\frac{1-\cos(x)}{x}=\lim_{x\to0}\cos(\theta)=\cos\left(\frac{\pi}{2}\right)=0$$ and $$\lim_{x\to0}\frac{\sin(x)}{x}=\lim_{x\to0}\sin(\theta)=\sin\left(\frac{\pi}{2}\right)=1$$

Derivatives Theorem

\begin{align} \cos'(x)=&-\sin(x)\\ \sin'(x)=&\cos(x) \end{align}
I will use two approaches to differentiate the two aforementioned trigonometric functions which yields

Proof by Linearity

Using the linearity of the derivative we can differentiate the Maclaurin series for the trigonometric functions term-wise \begin{align} \cos'(x)=&\sum_{n=0}^\infty(-1)^n\frac{2nx^{2n-1}}{(2n)!}\\ =&\sum_{n=1}^\infty(-1)^n\frac{x^{2n-1}}{(2n-1)!}\\ =&\sum_{n=0}^\infty(-1)^{n+1}\frac{x^{2n+1}}{(2n+1)!}\\ =&-\sin(x)\\ \sin'(x)=&\sum_{n=0}^\infty(-1)^n\frac{(2n+1)x^{2n}}{(2n+1)!}\\ =&\sum_{n=0}^\infty(-1)^n\frac{x^{2n}}{(2n)!}\\ =&\cos(x) \end{align}

Proof 1 from First Principles

We can also use the Maclaurin series to differentiate them from first principles \begin{align} (\cos(x+h)-\cos(x))/h=&(\cos(x)\cos(h)-\sin(x)\sin(h)-cos(x))/h\\ =&\cos(x)\frac{\cos(h)-1}{h}-\sin(x)\frac{\sin(h)}{h}\\ \to&\cancel{\cos(x)\frac{\cos(h)-1}{h}}-\sin(x)\cancel{\frac{\sin(h)}{h}}\\ =&-\sin(x)\\ (\sin(x+h)-\sin(x))/h=&(\cos(x)\sin(h)+\sin(x)\cos(h)-\sin(x))/h\\ =&\cos(x)\frac{\sin(h)}{h}+\sin(x)\frac{\cos(h)-1}{h}\\ \to&\cos(x)\cancel{\frac{\sin(h)}{h}}+\cancel{\sin(x)\frac{\cos(h)-1}{h}}\\ =&\cos(x) \end{align} since \begin{align} \frac{\cos(h)-1}{h}=&\left(1-\frac{h^2}{2}+\frac{h^4}{4!}-\cdots-1\right)/h\\ =&-\frac{h}{2}+\frac{h^3}{4!}-\cdots\\ \to&0\\ \frac{\sin(h)}{h}=&\left(h-\frac{h^3}{3!}+\frac{h^5}{5!}-\cdots\right)/h\\ =&1-\frac{h^2}{3!}+\frac{h^4}{5!}-\cdots\\ \to&1 \end{align}

Proof 2 from First Principles

\begin{align} \lim_{h\to0}\frac{\sin(x+h)-\sin(x)}{h}=&\lim_{h\to0}2\cos\left(\frac{x+h+x}{2}\right)\sin\left(\frac{x+h-x}{2}\right)/h\\ =&\lim_{h\to0}\frac{2}{h}\cos\left(x+\frac{h}{2}\right)\sin\left(\frac{h}{2}\right)\\ =&\lim_{k\to0}\cos(x+k)\frac{\sin(k)}{k}\\ =&\cos(x)\cdot1 \end{align}

Proof 3 from First Principles

\begin{align} \lim_{h\to0}\frac{\sin(x+h)-\sin(x)}{h}=&\lim_{h\to0}\frac{\sin(x)\cos(h)+\cos(x)\sin(h)-\sin(x)}{h}\\ =&\sin(x)\lim_{h\to0}\frac{\cos(h)-1}{h}+\cos(x)\lim_{h\to0}\frac{sin(h)}{h}\\ =&\sin(x)\cdot0+\cos(x)\cdot1 \end{align} This means that if we take the second derivative we get that

Corollary

\begin{align} \cos''(x)=&-\cos(x)\\ \sin''(x)=&-\sin(x) \end{align}
In fact, these are the only functions, up to multiplication by a constant, that have this property of \(f''(x)=-f(x)\).