# Basics

## Exponents

- Ref: wisc classware.
- Ref: Ismor Fischer from UW-Madison.

### Power function

For any real number *base* x, the *powers* of x is defined as: $x^0 = 1, x^1 = x, x^2 = x⋅x, x^3 = x⋅x⋅x,$ etc. The exception is $0^0$, which is considered indeterminate.

Powers are also called *exponents*.

*Fractional exponents* is defined in terms of *roots*:

- $x^{1/2} = \sqrt{x}$ , the square root of x.
- $x^{1/3} = \sqrt[3]{x}$ , the cube root of x, etc.
- In general, we have $x^{m/n} = (\sqrt[n]{x})^m$, i.e., the $n^{th}$ root of x, raised to the $m^{th}$ power.
- Negative exponents: $x^{-1}=\frac{1}{x}$.

Power functions have the general form $y = x^p$, for any real value of p, for $x \gt 0$.

$f(x)=x^2$: quadratic equation forms a curved *parabola* in the XY-plane. In this case, the curve is said to be *concave up*, i.e., it “holds water.” Similarly, the graph of $–x^2$ is *concave down*; it “spills water".

$f(x)=x^{-1}$. This is the graph of a *hyperbola*, which has two branches, one in the first quadrant and the other in the third. As we move to the right, the graph approaches the X-axis as a horizontal *asymptote*.

The hyperbola is one of the three kinds of conic section, formed by the intersection of a plane and a double cone. The other conic sections are the parabola and the ellipse.

### Exponential function

The var $x$ is an exponent. $f(x) = 2^x$.

The inverse of the exponential function $y = b^x$ is, by definition, the logarithm function $y = log_b (x)$.

#### Lambert W function

quora.com. Solve a hard equations: $2^x = x$.

$$ x = 2^x $$ $$ x = e^{\ln(2^x)} = e^{x \ln 2} $$

To further on, we needs knowlege of Lambert W function.

The Lambert W function (also called the *omega function* or *product logarithm*, is a set of functions, namely the branches of the inverse relation of the function $f(z) = ze^z$ where $z$ is any complex number. In other words
$$ z=f^{-1}(ze^{z})=W(ze^{z}) $$
which can also be expressed as
$$ f(W) = We^W $$
Wolfram.

By substituting the above equation in $z'=ze^{z}$, we get the defining equation for the W function (and for the W relation in general): $$ z'=W(z')e^{W(z')} $$ for any complex number $z'$.

Since the function $f$ is not injective, the relation W is multivalued (except at 0).

##### Examples

\begin{aligned} 2^{t}&=5t\\ 1&={\frac {5t}{2^{t}}}\\ 1&=5t\,e^{-t\ln 2}\\ {\frac {1}{5}}&=t\,e^{-t\ln 2}\\ {\frac {-\ln 2}{5}}&=(-t\ln 2)\,e^{(-t\ln 2)}\\ W\left({\frac {-\ln 2}{5}}\right)&=-t\ln 2\\ t&=-{\frac {W\left({\frac {-\ln 2}{5}}\right)}{\ln 2}} \end{aligned}

Another example: \begin{aligned} x^{x}&=z\\ \Rightarrow x\ln x&=\ln z\\ \Rightarrow e^{\ln x}\cdot \ln x&=\ln z\\ \Rightarrow \ln x&=W(\ln z)\\ \Rightarrow x&=e^{W(\ln z)}\\ \end{aligned}

or, equivalently, $x={\frac {\ln z}{W(\ln z)}}$ since: $ \ln z=W(\ln z)e^{W(\ln z)}$ by definition.

## Quadratic formula

For quadratic equation $0 = ax^2 + bx + c$, the quadratic formula is: $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

### Formula derivation

公式推导。

For equation $0 = ax^2 + bx + c$. $$ 0 = x^2 + \frac{b}{a} x + \frac{c}{a} \quad (\forall a \neq 0)$$ Using binomial theorem, $ (x+a)^2 = x^2 + 2xa + a^2$, so: $$ 0 = x^2 + \frac{b}{a} x + (\frac{b}{2a})^2 - (\frac{b}{2a})^2 + \frac{c}{a} $$ $$ (x + \frac{b}{2a})^2 = (\frac{b}{2a})^2 - \frac{c}{a} $$ $$ x + \frac{b}{2a} = \pm \sqrt{ (\frac{b}{2a})^2 - \frac{c}{a} } $$ In this step, $(\frac{b}{2a})^2 - \frac{c}{a} = \frac{b^2 - 4ac}{(2a)^2} \geq 0 \Rightarrow b^2-4ac \geq 0$ $$ x + \frac{b}{2a} = \pm \sqrt{ (\frac{b^2}{(2a)^2}) - \frac{4ac}{(2a)^2} } $$ $$ x = -\frac{b}{2a} \pm \frac{1}{2a} \sqrt{b^2 - 4ac} $$ $$ x = -\frac{b \pm \sqrt{b^2 - 4ac}}{2a} $$

## Binomial Theorem

$$ (a+b)^n = \sum_{i=0}^{n} \binom{n}{i} a^i b^{n-i} $$ where $\binom{n}{i}$ denotes the total number of different combinations of $i$ items chosen from within $n$ items. $$ \binom{n}{i} = \frac{n!}{i!(n-i)!} $$

See wikipedia: binomial expansion visualization for geometry interpretation of binomial expansion.