# AoMath: Derivatives

Here we look back at some earlier stuff in algebra and extend our definition and understanding of functions.

You may remember that a function takes in a number and spits out a number. If f(x) = x^3 - 1, t aking in 5 gives 124 as an output.

Actually, it is possible to take in several numbers and spit out one number. Area(length, width) = length x width.

In fact, you can even take in several numbers and spit out 2 numbers. Let V be a function measuring the vector between two points (a, b) and (c, d). V(a, b, c, d) = (c - a, d - b).

Here is our last jump in functions for now. We can take in an entire function and spit out a function. "Finding the inverse" is a function on functions. You take in x + 3 and you find that the inverse is x - 3. In x^3 - 5; out (x + 5)^(1/3). Etc.

Great! We're ready to understand derivatives.
A derivative finds the instantaneous slope of the tangent at all points in the domain of an input function, say f(x), and is denoted by f '(x) or "f prime of x".

Let's start with lines. f(x) = mx + b. Does the slope of f(x) change? What is the derivative at x = 1? x = 237? What is f '(x)? The slope! $$\boxed{f(x) = mx + b \Rightarrow f'(x) = m}$$ I like to call this the "line rule." These are the rules you must know:
Constant Rule: $$\boxed{f(x) = c \Rightarrow f'(x) = 0}$$
Line Rule: $$\boxed{f(x) = mx + b \Rightarrow f'(x) = m}$$
Coefficient Rule: $$\boxed{f(x) = c\cdot g(x) \Rightarrow f'(x) = c\cdot g'(x)}$$ "shorthand": $$\boxed{f(x) = c\cdot u \Rightarrow f'(x) = c\cdot u'}$$
Brian's Crazy Monomial Rule: $$\boxed{f(x) = ax^n \Rightarrow f'(x) = a(n)x^{n-1}}$$
Power Rule: $$\boxed{f(x) = g(x)^{n} \Rightarrow f'(x) = n(g(x))^{n-1}(g'(x))}$$ "shorthand": $$\boxed{f(x) = u^{n} \Rightarrow f'(x) = n(u)^{n-1}u'}$$
Sum/Diff Rule: $$\boxed{f(x) = g(x) \pm h(x) \Rightarrow f'(x) = g'(x) \pm h'(x)}$$ "shorthand":$$\boxed{f(x) = u \pm v \Rightarrow f'(x) = u' \pm v'}$$
Product Rule: $$\boxed{f(x) = g(x)\cdot h(x) \Rightarrow f'(x) = g(x)\cdot h'(x) + g'(x)\cdot h(x)}$$ "sh": $$\boxed{f(x) = u\cdot v \Rightarrow u'(v) + u(v')}$$
Quotient Rule: $$\boxed{f(x) = \frac{g(x)}{h(x)} \Rightarrow f' = \frac{g'\cdot h - g \cdot h'}{h^2}}$$ (I usually derive this rule when it is needed.**)
Chain Rule: $$\boxed{f(x) = g(h(x)) \Rightarrow f'(x) = g'(h(x))(h'(x))}$$ "sh": $$\boxed{f(x) = u\circ v \Rightarrow (u'\circ v)\cdot (v')}$$

As you may have guessed they can all be proven from the limit definition of derivative.

** Proof of the Quotient Rule: clear fractions (multiply by denominator), differentiate, solve for f', replace f, clean up.
$$f = \frac{g}{h} \Longrightarrow f\cdot h = g \Longrightarrow f'h + fh' = g' \Longrightarrow f' = \frac{g' - fh'}{h} \Longrightarrow f' = \frac{g' - \frac{g}{h} \cdot h'}{h} \Longrightarrow f' = \frac{g'\cdot h - g \cdot h'}{h^2}$$