<a href="https://colab.research.google.com/github/johnpharmd/DS-Sprint-03-Creating-Professional-Portfolios/blob/master/LaTeX.ipynb" target="_parent"></a>

# Wrap LaTeX statements in dollar signs

`$a = 2$`

`$b = 7030$`

`$c = 4.375$`

$a = 2$

$b = 7030$

$c = 4.375$

# Other LaTeX Commands begin with a backslash

## Greek Letters:

`$\alpha, \alpha, \beta,  \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi$`

$\alpha, \alpha, \beta,  \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \mu, \Phi$

## Set Notation:

`$\forall x \in X,  \exists p \leq 5$`

$\forall x \in X,  \exists p \leq 5$

## Limits:

`$\lim\limits_{x \to \infty} \exp(-x) = 0$`

$\lim\limits_{x \to \infty} \exp(-x) = 0$

## Powers using the caret "^"

`$x^2$`

$x^2$

## For complicated exponents/indices wrap them in curly braces

`$x^{2+i}$`

$x^{2+i}$

## Indices using the underscore "_"

`$B_{i}$`

$B_{i}$

> ### Combining powers and indices:

`$k_{n+1} = n^2 + k_n^2 - k_{n-1}$`

$k_{n+1} = n^2 + k_n^2 - k_{n-1}$

## Fractions

`$\frac{2}{3}$`

$\frac{2}{3}$

`$\frac{n!}{k!(n-k)!}$`

$\frac{n!}{k!(n-k)!}$


## Binomials

`$\binom{n}{k}$`

$\binom{n}{k}$


## Roots

`$\sqrt{2}$`

$\sqrt{2}$

`$\sqrt{a^2 + b^2}$`

$\sqrt{a^2 + b^2}$

## Sums

`$\sum_{i=1}^{10} t_i$`

$\sum_{i=1}^{10} t_i$

or

`$\displaystyle\sum_{i=1}^{10} t_i$`

$\displaystyle\sum_{i=1}^{10} t_i$

## Integrals

`$\int\limits_a^b$`

$\int\limits_a^b$

## Brackets and Delimiters

`$( a ), [ b ], \{ c \}, | d |, \| e \|,
\langle f \rangle, \lfloor g \rfloor,
\lceil h \rceil, \ulcorner i \urcorner$`

$( a ), [ b ], \{ c \}, | d |, \| e \|,
\langle f \rangle, \lfloor g \rfloor,
\lceil h \rceil, \ulcorner i \urcorner$


## Vectors

$\vec{a} = 
  \begin{pmatrix}
           1\\
           2
  \end{pmatrix}$
  
## Matrices 
 
 $B = \begin{bmatrix}
  a & b & c \\
  d & e & f \\
  g & h & i
 \end{bmatrix}$
 


## Whitespace

Often the most difficult part of LaTeX is getting the sizing and whitespace to cooperate.

Wrapping an entire equation in the \equation wrappers often helps keep it 

Colab will recognize many of these commands as LaTeX without the dollar signs as well.

`$\begin{equation}
  x = a_0 + \cfrac{1}{a_1 
          + \cfrac{1}{a_2 
          + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } }
\end{equation}$`

$\begin{equation}
  x = a_0 + \cfrac{1}{a_1 
          + \cfrac{1}{a_2 
          + \cfrac{1}{a_3 + \cfrac{1}{a_4} } } }
\end{equation}$


### Horizontal Spacing Options

<https://tex.stackexchange.com/questions/74353/what-commands-are-there-for-horizontal-spacing>

`\quad` is probably my favorite horizontal spacing option.

`$ a \quad b^2 \quad c_i \quad \pi $`

$ a \quad b^2 \quad c_i \quad \pi $

### Centering Equations


\begin{align}
c = -6.022\mathrm{e}{+23}
\qquad
d = \pi
\end{align}

## Normal Text in "Math Mode"

"Math Mode" is what it's called when you're inside of a statement that is wrapped in dollar signs.

`$ a+b = 12 ... \textrm{normal text} ... \frac{1}{2}$`

$ a+b = 12 ... \textrm{normal text} ... \frac{1}{2}$



# Lets try to recreate a few of these formulas together:

You can use the site: <http://latex2png.com/> To convert LaTeX into downloadable PNGs. 
 
 

## Quadratic Formula


$x=\frac{-b\pm\sqrt{b^{2}-4ac}}{2a}$

## Standard Deviation



$\sigma = \sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2}$

## General Matrix Notation



$A_{m,n} = 
\begin{pmatrix} 
 a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\
 a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
 a_{m,1} & a_{m,2} & \cdots & a_{m,n} 
\end{pmatrix}$

# Assignment:

## “What are your goals for data science?”

# Stretch Goal (1): 

## Try to recreate these formulas on your own:

### Cauchy's Integral Formula



$f(a) = \frac{1}{2\pi i}\oint\frac{f(z)}{z-a}dz$

### Definition of Christoffel Symbols



$(\nabla_XY)^k = X^i(\nabla_iY)^k = X^i(\frac{\partial Y^k}{\partial X^i}+\Gamma_{im}^k Y^m)$

### Curl of a Vector Field



$\vec\nabla \times \vec F = (\frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z})\textrm{i} + (\frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x})\textrm{j} + (\frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y})\textrm{k}$ 

# Stretch Goal (2):

Visit: <https://projecteuler.net/>

Make an account and begin solving the challenges using Python. For each challenge that you solve, write an explanation of why your solution works using LaTeX. 

fe7a20108cef36e495a51bfb1df4dde47331a001
ipynb
Jupyter Notebook
LaTeX.ipynb
johnpharmd/DS-Sprint-03-Creating-Professional-Portfolios
635b74de9914686c16154202ea8b78fa0cf929a7
MIT
LaTeX.ipynb
johnpharmd/DS-Sprint-03-Creating-Professional-Portfolios
635b74de9914686c16154202ea8b78fa0cf929a7
MIT
LaTeX.ipynb
johnpharmd/DS-Sprint-03-Creating-Professional-Portfolios
635b74de9914686c16154202ea8b78fa0cf929a7
MIT
Qwen/Qwen-72B
1. YES
2. YES