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
We start by rewriting the right hand side
\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}
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}