# Calculus/Derivatives

## Derivative of a function ${\displaystyle f}$ at a number ${\displaystyle a}$

### Notation

We denote the derivative of a function ${\displaystyle f}$ at a number ${\displaystyle a}$ as ${\displaystyle f'(a)\,\!}$.

### Definition

The derivative of a function ${\displaystyle f}$ at a number ${\displaystyle a}$ a is given by the following limit (if it exists):

${\displaystyle f'(a)=\lim _{h\rightarrow 0}{\frac {f(a+h)-f(a)}{h}}}$

An analagous equation can be defined by letting ${\displaystyle x=(a+h)}$. Then ${\displaystyle h=(x-a)}$, which shows that when ${\displaystyle x}$ approaches ${\displaystyle a}$, ${\displaystyle h}$ approaches ${\displaystyle 0}$:

${\displaystyle f'(a)=\lim _{x\rightarrow a}{\frac {f(x)-f(a)}{x-a}}}$

### Interpretations

#### As the slope of a tangent line

Given a function ${\displaystyle y=f(x)\,\!}$, the derivative ${\displaystyle f'(a)\,\!}$ can be understood as the slope of the tangent line to ${\displaystyle f(x)}$ at ${\displaystyle x=a}$:

##### Example

Find the equation of the tangent line to ${\displaystyle y=x^{2}}$ at ${\displaystyle x=1}$.

##### Solution

To find the slope of the tangent, we let ${\displaystyle y=f(x)}$ and use our first definition:

${\displaystyle f'(a)=\lim _{h\rightarrow 0}{\frac {f(a+h)-f(a)}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}(a+h)^{2}-(a)^{2}}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}a^{2}+2ah+h^{2}-a^{2}}{h}}\Rightarrow \lim _{h\rightarrow 0}{\frac {\color {Blue}h(2a+h)}{h}}\Rightarrow \lim _{h\rightarrow 0}{\color {Blue}(2a+h)}}$

It can be seen that as ${\displaystyle h}$ approaches ${\displaystyle 0}$, we are left with ${\displaystyle f'(a)={\color {Blue}2a}\,\!}$. If we plug in ${\displaystyle 1}$ for ${\displaystyle a}$:

${\displaystyle f'({\color {Red}1})=2({\color {Red}1})\Rightarrow {\color {Red}2}}$

So our preliminary equation for the tangent line is ${\displaystyle y={\color {Red}2}x+b}$. By plugging in our tangent point ${\displaystyle (1,1)}$ to find ${\displaystyle b}$, we can arrive at our final equation:

${\displaystyle {\color {Red}1}=2({\color {Red}1})+b\Rightarrow -1=b}$

So our final equation is ${\displaystyle y=2x-1\,\!}$.

#### As a rate of change

The derivative of a function ${\displaystyle f(x)}$ at a number ${\displaystyle a}$ can be understood as the instantaneous rate of change of ${\displaystyle f(x)}$ when ${\displaystyle x=a}$.

## The derivative as a function

So far we have only examined the derivative of a function ${\displaystyle f}$ at a certain number ${\displaystyle a}$. If we move from the constant ${\displaystyle a}$ to the variable ${\displaystyle x}$, we can calculate the derivative of the function as a whole, and come up with an equation that represents the derivative of the function ${\displaystyle f}$ at any arbitrary ${\displaystyle x}$ value. For clarification, the derivative of ${\displaystyle f}$ at ${\displaystyle a}$ is a number, whereas the derivative of ${\displaystyle f}$ is a function.

### Notation

Likewise to the derivative of ${\displaystyle f}$ at ${\displaystyle a}$, the derivative of the function ${\displaystyle f(x)}$ is denoted ${\displaystyle f'(x)\,\!}$.

### Definition

The derivative of the function ${\displaystyle f}$ is defined by the following limit:

${\displaystyle f'(x)=\lim _{h\rightarrow 0}{\frac {f(x+h)-f(x)}{h}}}$

Also,

${\displaystyle f'(x)=\lim _{h\rightarrow x}{\frac {f(x)-f(h)}{h-x}}}$

or

${\displaystyle f'(x)=\lim _{h\rightarrow 0}{\frac {f(x+h)-f(x-h)}{2h}}}$