\documentclass[12pt]{article}
\usepackage[usenames]{color} %used for font color
\usepackage{amssymb} %maths
\usepackage{amsmath} %maths
\usepackage[utf8]{inputenc} %useful to type directly diacritic characters
\usepackage{graphicx}
\usepackage [english]{babel}
\usepackage [autostyle, english = american]{csquotes}
\MakeOuterQuote{"}
\graphicspath{ {./} }
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\prob}{\mathbb{P}}

\author{Tianshuang (Ethan) Qiu}
\begin{document}
\title{Homework 2}
\maketitle
\newpage

\section{Ross 4.15}
For this we first prove that $\frac{1}{n}>0 \forall n \in \N$. First we multiply both sides by $n$, since $n \in \N, n > 0$, the sign does not change.
\newline
We get $LHS = 1$ $RHS = 0$, since $1 > 0$ is an axiom, therefore we know that $1/n > 0$.
\newline
Now since we have proven $\frac{1}{n} \geq 0 \forall n \in \N$, by the ordered field axioms $a \leq b$.
\newline
Q.E.D.
\newpage

\section{Ross 4.16}
Let the set in question be denoted by $S$. We will prove the claim via contradiction. We break its negative down into two cases: $\sup S < a$ or $\sup S > a$.
\newline
For the former, let $x = \sup S | x \in \R$. By the denseness of rationals we see that there exists $q \in \Q s.t. x \leq q \leq a$. By the definition of this set we have $q \in S$. Therefore we have just found a member of this set that is greater than the supremum. This is a contradiction so $x$ cannot be less than a.
\newline
For the latter, we once again let $x = \sup S | x \in \R$. Consider $a$. $a<x$ and by definition of $S$, $\forall s \in S, s<a$. We have found an upperbound that is less than our supremum. That is a contradiction so $x$ cannot be greater than a.
\newline
$\sup S = a$ Q.E.D.
\newpage

\section{Ross 8.2}
\subsection{a}
Claim: $a_n \to 0$
\newline
Proof: $a_n = \frac{n}{n^2+1} \leq \frac{n+1/n}{n^2+1} = \frac{1}{n}$ ($n \neq 0$)
\newline
Let $\epsilon > 0$, we select our $N = \frac{1}{\epsilon}$. $\forall n>N, |a_n-0| < \frac{1}{n} < \epsilon$, thus the sequence converges.

\subsection{c}
Claim: $c_n \to \frac{4}{7}$
\newline
Proof: $|c_n- \frac{4}{7}| = |\frac{28n+21}{49n-35} - \frac{4(7n-5)}{49n-35}|$
$$= \frac{28n+21-28n+20}{49n-35}$$
$$= \frac{41}{49n-35} \leq \frac{41}{49n}$$
\newline
Let  $\epsilon > 0$, we select our $N = \frac{41}{49\epsilon}$. For all $n>N, |c_n- \frac{4}{7}| \leq \frac{41}{49n} < \epsilon$

\subsection{e}
Claim: $s_n \to 0$
\newline
Proof: $|s_n - 0| = |\frac{1}{n}sin n| \leq \frac{1}{n}$.
\newline
Let  $\epsilon > 0$, we select our $N = \frac{1}{\epsilon}$. For all $n>N, |s_n-0| \leq \frac{1}{n} < \epsilon$
\newpage

\section{Ross 8.5}
\subsection{a}
Let $\epsilon > 0$, since $a_n, b_n \to s$, $|a_n-s|<\epsilon \forall n > N_1$ and $|b_n-s|<\epsilon \forall n > N_2$.
\newline
Let $k> \max \{ N_1, N_2\}$, $a_k \leq s_k \leq b_k$. We subtract s from the expression and we have: $a_k-s \leq s_k -s \leq b_k-s$. Furthermore $|a_k-s|<\epsilon, |b_k - s| < \epsilon$.
\newline
Since $s_k-s$ is "sandwiched" between two expressions whose absolute values are less than epsilon, then $|s_k-s|<\epsilon$.
\newline
$s_n \to 0$, Q.E.D.

\subsection{b}
Claim: $lim s_n = 0$.
\newline
Proof:
Since the absolute value s strictly non-negative, $t_n \geq 0$. Let $\epsilon>0$, since $\lim t_n = 0$, $\exists N s.t. \forall k> N, t_k < \epsilon$. Then consider the seqence $d_n = 0$. Obviously $\lim d_n = 0$.
\newline
$$0 = |d_k-0| \leq |s_k| = |s_k - 0| \leq t_k = |t_k - 0|$$
Therefore $s_n$ converges to 0 by squeeze lemma.
\newpage

\section{Ross 8.7}
\subsection{a}
Assume that this sequence $a_n$ converges, let $a_n \to k$. By our assumption $\exists N \in \R s.t. |a_n - k|<\epsilon \forall n > N$.
Since this is a cosine function it is cyclical, we can see that it goes 1, 0.5, -0.5, -1, -0.5, 0.5, ..., repeating ad infinitum.
\newline
Let $\epsilon = 0.1$. Select $t > N, t \bmod 6 \equiv 0$. By the pattern we observed above, we know that $a_t = 0$. Furthermore, we know that $a_{t+1} = 0.5$. By the definition of convergence we have $|a_t-k|<\epsilon$, $|a_{t+1}-k|< \epsilon$, subsituting the values we have calculated we have $|0-k|<0.1, |0.5-k|<0.1, |0-k|+|0.5-k|\leq 0.2$. However by the triangle property we know that $|0-k|+|0.5-k| \leq 0.5$. This is a contradiction, therefore our assuption is not correct.
\newline
$a_n$ does not converge. Q.E.D.

\subsection{b}
For this problem we simply need to show that the sequence is not bounded.
\newline
Assume that the sequence is bounded, and that there is a supremum $k$. By the Archimedean Principle $\exists n \in N s.t. n>k$. Consider $s_n$ (if $n$ is odd consider $s_{n+1}$), this term is greater than $k$. Therefore we have found a member in the set that is greater than the supremum. $\rightarrow \leftarrow$
\newline
The sequence is not bounded, therefore $s_n$ cannot converge. Q.E.D.

\subsection{c}
The sequence here is very similar to that in section (a). The pattern is 0, 0.5, 1, 0.5, 0, -0.5, -1, -0.5, ... . We can let $\epsilon = 0.1$ again and assume that it converges. So let $N \in \R s.t. |c_n - \lim c_n| < \epsilon \forall n > N$. Pick $i > N s.t. i \bmod 6 \equiv 0$. From the pattern that we observed, $c_{n+1} = 0.5$. By the triangle inequality we see that $\lim c_n$ cannot exist since we need the "two sides" (0.2) to be less than the other side (0.5).
\newline
We have found a contradiction, $c_n$ does not converge.
\newpage

\section{Ross 8.10}
Since $\lim s_n > a$, $\lim s_n - a > 0$. Let this value be $d$.
\newline
Consider $\epsilon = d$. Since the sequence converges we have $\exists N \in R s.t. \forall n > N, |s_n - \lim s_n|<\epsilon$. Since $\epsilon = \lim s_n - a$, we have
$$|s_n - \lim s_n| < \lim s_n - a$$
If $s_n \geq \lim s_n$, $s_n > a$ because $\lim s_n > a$.
\newline
Otherwise, $s_n < \lim s_n$. We can simplfy $|s_n - \lim s_n| < \lim s_n - a$ into $ \lim s_n - s_n < \lim s_n - a$, and by algebraic manipulation we have $s_n > a$.
\newline
In both cases $s_n > a$. Q.E.D.
\newpage

\section{Q7}
Claim: $\lim s_n = 1$
\newline
Let $\epsilon > 0$. Consider $a_n = 1$, $b_n = 1-\frac{1}{n}$. Obviously $a_n$ converges to 1.
\newline
For $b_n$, let $N = \frac{1}{\epsilon}$. $\forall k > N$, we have $|b_k - 1| = |1-\frac{1}{k}-1| = |-\frac{1}{k}| = \frac{1}{k} < \epsilon$. Therefore $b_n \to 1$
\newline
Since $\frac{1}{n} > 0 \forall n \in \N$, $(1-\frac{1}{n})<1$, so $\sqrt{(1-\frac{1}{n})} > (1-\frac{1}{n})$.
\newline
We have shown that $a_n \to 1$, $b_n \to 1$, and $b_n \leq s_n \leq a_n$. Therefore $s_n \to 1$ by squeeze theorem.
\newline
Q.E.D.
\end {document}


\chapter{Interpolation Convergence Proofs}
\label{chap:cvip_converge}

This chapter works through the convergence proofs for MSN interpolation on
Chebyshev nodes. We focus on interpolating up to degree $2n$.


\section{Model Description}
The Basilisk IMU module imu\_sensor.cpp is responsible for producing sensed body rates and acceleration from simulation truth values. It also provides a change in velocity and change in attitude value for the time between IMU calls. Each check within test\_imu\_sensor.py sets initial attitude MRP, body rates, and accumulated Delta V and validates output for a range of time.

There is a large variation throughout the industry as to what constitutes and IMU.  Some manufacturers offer IMUs which output only acceleration and angular rate while others include accumulated change in velocity in attitude. For Basilisk, the IMU is defined as a device which outputs all four values.

\subsection{Mathematical Model}
\subsubsection{Platform Frame and Sensor Labels}
It will be helpful to note for the following descriptions that the sensor is labeled with a capital S while the sensor platform frame is labeled with a capital P. To be more explicit, There is a coordinate frame, P, the platform frame, in which is the IMU is defined. In all cases so far, the IMU sits at the platform frame origin and its axes are aligned with the platform frame axes. So, any position or velocity vector describing the sensor also describes the platform frame origin. With that in mind, in this report, it has been attempted to track the kinematics of the sensor, while reporting values in the platform frame, rather than tracking the kinematics of the platform form.

\subsubsection{Frame Depedent Derivatives}
Inertial time derivatives are marked with a dot (i.e. $\frac{\mathcal{N}d}{dt}x = \dot{x}$). Body frame time derivatives are marked with a prime (i.e. $\frac{\mathcal{B}d}{dt}x = x^\prime$)
\subsubsection{Angular Rates}
The angular rate of the sensor in platform frame coordinates is output as:
\begin{equation}
	 \leftexp{P}{\bm{\omega}_{S/N}} =  \leftexp{P}{\bm{\omega}_{P/N}} =[PB] \leftexp{B}{\bm{\omega}_{B/N}}
\end{equation}

Where $\cal{P}$ is the sensor platform frame, $\cal{B}$ is the vehicle body frame, and $\cal{N}$ is the inertial frame. [PB] is the direction cosine matrix from $\cal{B}$ to $\cal{P}$. This allows for an arbitrary angular offset between $\cal{B}$ and $\cal{P}$ and allows for that offset to be time-varying. $\leftexp{B}{\bm{\omega}_{B/N}}$ is provided by the spacecraftPlus output message from the most recent dynamics integration.

\subsubsection{Angular Displacement}
The IMU also outputs the angular displacement accumulated between IMU calls. In order to avoid complexities having to do with the relative timestep between the dynamics process and the IMU calls, this is not calculated in the same way as an IMU works physically. In this way, also, the dynamics do not have to be run at a fast enough rate for a physical IMU angular accumulation to be simulated.
The modified Rodriguez parameter (MRP) is recorded for the last time (1) the IMU was called. Once the new MRP is received, both are converted to DCMs and the step-PRV is computed as follows The current MRP is always provided by the spacecraftPlus message from the most recent dynamics integration.
\begin{equation}
	[PN]_2 = [PB][BN]_2
\end{equation}
\begin{equation}
	[PN]_1 = [PB][BN]_1
\end{equation}
\begin{equation}
	[NP]_1 = [PN]_1^T
\end{equation}
\begin{equation}
	[P_2P_1] = [PN]_2[NP]_1
\end{equation}
\begin{equation}
\bm{q} = \verb|C2PRV(|[P_2P_1]\verb|)|
\end{equation}
where $\bm{q}$ above is the principal rotation vector for the sensor from timestep 1 to timestep 2. The functions used in conversion from the DCM to PRV are part of the Basilisk Rigid Body Kinematics library. The double conversion is used to avoid singularities.

\subsubsection{Linear Acceleration}
The sensor is assumed to have an arbitrary offset from the center of mass of the spacecraft. However, because of the completely coupled nature of the Basilisks dynamics framework, the center of mass does not need to be present explicitly in equations of motion for the sensor. It is implicit in the motion of the body frame. With that in mind, the equation for the acceleration of the sensor is derived below:

\begin{equation}
\bm{r}_{S/N} = \bm{r}_{B/N} + \bm{r}_{S/B}
\end{equation}

Using the transport theorem for $\dot{\bm{r}}_{S/B}$:
\begin{equation}
	\dot{\bm{r}}_{S/N} = \dot{\bm{r}}_{B/N} + \bm{r}'_{S/B} + \bm{\omega}_{B/N} \times \bm{r}_{S/B}
	\label{eq:rDot}
\end{equation}

But $\bm{r}'_{S/B}$ is $0$ because the sensor is assumed to be fixed relative to the body frame. Then,
\begin{equation}
\ddot{\bm{r}}_{S/N} = \ddot{\bm{r}}_{B/N} + \dot{\bm{\omega}}_{B/N} \times \bm{r}_{S/B} +  \bm{\omega}_{B/N} \times (\bm{\omega}_{B/N} \times \bm{r}_{S/B})
\end{equation}
The equation above is the equation for the inertial acceleration of the sensor, but the sensor will only measure the non-conservative accelerations. To account for this, the equation is modified to be:
\begin{equation}
\ddot{\bm{r}}_{S/N, \textrm{sensed}} = (\ddot{\bm{r}}_{B/N} - \bm{a}_\textrm{g}) + \dot{\bm{\omega}}_{B/N} \times \bm{r}_{S/B} +  \bm{\omega}_{B/N} \times (\bm{\omega}_{B/N} \times \bm{r}_{S/B})
\end{equation}
where $\bm{a}_\textrm{g}$ is the instantaneous acceleration due to gravity. Conveniently, $(\ddot{\bm{r}}_{B/N} - \bm{a}_\textrm{g})$ is available from the spacecraft, but in the body frame. The acceleration provided, though, is the time-averaged acceleration between the last two dynamics integration calls and not the instantaneous acceleration. $\bm{r}_{S/B}$ is also available in the body frame. $\dot{\bm{\omega}}_{B/N}$ is given by the spacecraft in body frame coordinates as well. Again, this is a time-averaged value output by the spacecraft, rather than an instantaneous value. Because all values are given in the body frame, the above equation is calulated in the body frame and then converted as seen below:
\begin{equation}
	\leftexp{P}{\ddot{\bm{r}}_{S/N, \textrm{sensed}}} = [PB] \leftexp{B}{ \ddot{\bm{r}}_{S/N, \textrm{sensed}}}
\end{equation}

\subsubsection{Change In Velocity}
The IMU also outputs the velocity accumulated between IMU calls. In order to avoid complexities having to do with the relative time step between the dynamics process and the IMU calls, this is not calculated in the same way as an IMU works physically. In this way, also, the dynamics do not have to be run at a fast enough rate for a physical IMU velocity accumulation to be simulated.

Differencing Eq. \ref{eq:rDot} with itself from time 1 to time 2 gives the equation:
\begin{equation}
	\Delta_{2/1} 	\dot{\bm{r}}_{S/N} = \Delta_{2/1} \dot{\bm{r}}_{B/N} + \Delta_{2/1} (\bm{\omega}_{B/N} \times \bm{r}_{S/B})
	\label{eq:DeltaVelocity}
\end{equation}
$\Delta_{2/1} \dot{\bm{r}}_{B/N}$ is calculated as the difference between the total change in velocity accumulated by the spacecraft body frame at time 2 minus the total change in velocity accumulated by the spacecraft body frame at time 1:
\begin{equation}
\Delta_{2/1} \dot{\bm{r}}_{B/N} = DV_{\textrm{body\_non-conservative},2} - DV_{\textrm{body\_non-conservative},1}
\end{equation}
The above $DV$ values are given by the spacecraft module in body frame coordinates but used in inertial coordinates. They are computed by accumulating the velocity after each dynamics integration and subtracting out the time-averaged gravitational acceleration multiplied by the dynamics time step. Then,
\begin{equation}
	\Delta_{2/1} (\bm{\omega}_{B/N} \times \bm{r}_{S/B}) = \bm{\omega}_{{B/N}_2} \times \bm{r}_{{S/B}_2} - \bm{\omega}_{{B/N}_1} \times \bm{r}_{{S/B}_1}
\end{equation}
$\bm{\omega}_{{B/N}}$ output by the spacecraft is the angular rate from the most recent dynamics integration. Again, the above equation is calculated in the inertial frame and then converted to platform frame coordinates. this means that the values given by spacecraft plus are first converted into inertial frame coordinates, including the location of the sensor in the body frame. At this point, Eq. \ref{eq:DeltaVelocity} is evaluated in the body frame and converted to the sensor platform frame:
\begin{equation}
\leftexp{P} {\Delta_{2/1}} 	\dot{\bm{r}}_{S/N} = [PN] ^{\mathcal{N}} \Delta_{2/1} 	\dot{\bm{r}}_{S/N}
\end{equation}
This, the change in velocity sensed by the IMU between IMU calls in platform frame coordinates, is the change in velocity output from the model. To be clear, this is the sensed inertial velocity change in platform frame coordinates. This makes the assumption that the IMU is tracking its attitude and performing the calculations internally to return this value correctly. It is not simply the integral of the acceleration value above in the body frame coordinates.

\subsubsection{Error Modeling}
The state which the simulation records for the spacecraft prior to sending that state to the IMU module is considered to be "truth". So, to simulate the errors found in real instrumentation, errors are added to the "truth" values for acceleration and angular velocity:

\begin{equation}
\mathbf{a}_{\mathrm{measured}} = \mathbf{a}_{\mathrm{truth}} + \mathbf{e}_{\mathrm{a,noise}} + \mathbf{e}_{\mathrm{a, bias}}
\end{equation}
\begin{equation}
\bm{\omega}_{\mathrm{measured}} = \bm{\omega}_{\mathrm{truth}} + \mathbf{e}_{\mathrm{\omega,noise}} + \mathbf{e}_{\mathrm{\omega, bias}}
\end{equation}
Then, these error values are "integrated" over the IMU timestep and applied to the $\Delta v$ and $PRV$ values:
\begin{equation}
\mathbf{DV}_{\mathrm{measured}} = \mathbf{DV}_{\mathrm{truth}} + (\mathbf{e}_{\mathrm{a,noise}} + \mathbf{e}_{\mathrm{a, bias}})\Delta t
\end{equation}
\begin{equation}
\mathbf{q}_{\mathrm{measured}} = \mathbf{q}_{\mathrm{truth}} + (\mathbf{e}_{\mathrm{\omega,noise}} + \mathbf{e}_{\mathrm{\omega, bias}})\Delta t
\end{equation}
This convenient approximation that $\bm{q$} = $\bm{\omega}\Delta t$ for a given timestep proves useful through the application of IMU errors.

\subsubsection{Data Discretization}
Because sensors record data digitally, that data can only be recorded in discrete chunks, rather than the (relatively) continuous values that the computer calculates at each time steps. In order to simulate real IMU behavior in this way, a least significant bit (LSB) value is accepted for both the gyro and the accelerometer. This LSB is applied in the following way:

\begin{equation}
\mathbf{a}_{\mathrm{discretized}} = \verb|sign|(\mathbf{a}_\mathrm{measured})(\mathrm{LSB})\Biggl\lfloor\Biggl|\frac{\mathbf{a}_{\mathrm{measured}}}{(\mathrm{LSB})}\Biggr|\Biggr\rfloor
\end{equation}
\begin{equation}
\mathbf{e}_{\mathrm{d},\mathrm{a}} = \mathbf{a}_{\mathrm{measured}} - \mathbf{a}_{\mathrm{discretized}}
\end{equation}
\begin{equation}
\mathbf{DV}_{\mathrm{discretized}} = \mathbf{DV}_{\mathrm{measured}} -\mathbf{e}_{\mathrm{d},\mathrm{a}} \Delta t
\end{equation}

\begin{equation}
\bm{\omega}_{\mathrm{discretized}} = \verb|sign|(\bm{\bm{\omega}_\mathrm{measured}})(\mathrm{LSB})\Biggl\lfloor\Biggl|\frac{\bm{\omega}_{\mathrm{measured}}}{(\mathrm{LSB})}\Biggr|\Biggr\rfloor
\end{equation}
\begin{equation}
\mathbf{e}_{\mathrm{d},\omega} =\bm{\omega}_{\mathrm{measured}} - \bm{\omega}_{\mathrm{discretized}}
\end{equation}
\begin{equation}
\mathbf{q}_{\mathrm{discretized}} = \mathbf{q}_{\mathrm{measured}} - \mathbf{e}_{\mathrm{d},\mathrm{\omega}}\Delta t
\end{equation}
Where $\lfloor$  $\rfloor$ indicate the \textbf{floor()} function and LSB can be either the accelerometer or gyro least significant bit as appropriate.

\subsubsection{Saturation}
Real sensors can also become saturated. Saturation is the last effect implemented on the IMU, \textit{in an elementwise manner}:

\begin{equation}
	\bm{a}_{\mathrm{sat}} = \mathrm{max}\big(a_{\mathrm{min}}, \mathrm{min}\big(    \bm{a}_{\mathrm{discretized}}, a_{\mathrm{max}}    \big)   \big)
\end{equation}
\begin{equation}
\bm{\omega}_{\mathrm{sat}} = \mathrm{max}\big(\omega_{\mathrm{min}}, \mathrm{min}\big(    \bm{\omega}_{\mathrm{discretized}}, \omega_{\mathrm{max}}    \big)   \big)
\end{equation}
The above operations are performed element-wise. This is only computed if the values are found to be outside of the max-min range. Now, along each axis that was saturated:

\begin{equation}
	DV_{\mathrm{sat},i} = a_{\mathrm{sat},i} \Delta t
\end{equation}
\begin{equation}
q_{\mathrm{sat},i} = \omega_{\mathrm{sat},i}  \Delta t
\end{equation}
The above is calculated any time that $a_i$ or $\omega_i$ are found to be outside of their max-min bounds. Note again the use of the approximation of the PRV as the integral of the angular rates.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Written By Michael Brodskiy
% Class: Analytic Geometry & Calculus III (Math-292)
% Professor: V. Cherkassky
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[12pt]{article}
\usepackage{alphalph}
\usepackage[utf8]{inputenc}
\usepackage[russian,english]{babel}
\usepackage{titling}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{enumitem}
\usepackage{amssymb}
\usepackage[super]{nth}
\usepackage{everysel}
\usepackage{ragged2e}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{cancel}
\geometry{top=1.0in,bottom=1.0in,left=1.0in,right=1.0in}
\newcommand{\subtitle}[1]{%
  \posttitle{%
    \par\end{center}
    \begin{center}\large#1\end{center}
    \vskip0.5em}%

}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
citecolor=blue,
}

\urlstyle{same}

\title{Calculus III Formula Sheet}
\date{\today}
\author{Michael Brodskiy\\ \small Professor: V. Cherkassky}

% Mathematical Operations:

% Sum: $$\sum_{n=a}^{b} f(x) $$
% Integral: $$\int_{lower}^{upper} f(x) dx$$
% Limit: $$\lim_{x\to\infty} f(x)$$

\begin{document}

\maketitle

\section{Chapter 12}

\subsection{Unit 1}

\begin{enumerate}

  \item The distance formula in three dimensions:
    $$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}$$

  \item A sphere with center $(h,k,l)$:
    $$(x-h)^2+(y-k)^2+(z-l)^2=r^2$$

\end{enumerate}

\subsection{Unit 2}

\begin{enumerate}
\setcounter{enumi}{2}

  \item Vector given two points, $A=(x_1,y_1,z_1)$ and $B=(x_2,y_2,z_1)$
    $$\overrightarrow{v}=\langle x_2-x_1, y_2-y_1, z_2-z_1\rangle$$

  \item Magnitude of vector in:
    \begin{enumerate}

      \item Two dimensions ($a=\langle a_1,a_2\rangle)$:

        $$|\overrightarrow{a}|=\sqrt{(a_1)^2+(a_2)^2}$$

      \item Three dimensions ($a=\langle a_1,a_2,a_3\rangle)$:

        $$|\overrightarrow{a}|=\sqrt{(a_1)^2+(a_2)^2+(a_3)^2}$$

    \end{enumerate}

  \item Standard Basis Vectors:

    $$\bold{\hat{i}}=\langle 1,0,0\rangle\,\,\,\,\,\,\,\bold{\hat{j}}=\langle0,1,0\rangle\,\,\,\,\,\,\,\bold{\hat{k}}=\langle 0,0,1\rangle$$

  \item Unit Vectors (Any vector with magnitude 1):
    $$\overrightarrow{u}_a=\frac{\overrightarrow{a}}{|\overrightarrow{a}|}$$

\end{enumerate}

\subsection{Unit 3}

\begin{enumerate}
    \setcounter{enumi}{5}

  \item Dot Product\footnote{Two vectors are orthogonal (perpendicular) if $\overrightarrow{a}\cdot\overrightarrow{b}=0$} (Also Known As Scalar Product):

    $$\overrightarrow{a}\cdot\overrightarrow{b}=a_1b_1+a_2b_2+a_3b_3$$

  \item Dot Product Angle Formula:
    $$\overrightarrow{a}\cdot\overrightarrow{b}=|\overrightarrow{a}||\overrightarrow{b}|\cos\theta$$

  \item Direction Angles:\footnote{$\alpha$ corresponds to the $x$ axis, $\beta$ to the $y$ axis, and $\gamma$ to the $z$ axis}
    $$\cos\alpha=\frac{\overrightarrow{a}\bold{\hat{i}}}{|\overrightarrow{a}|}$$
    $$\cos\beta=\frac{\overrightarrow{a}\bold{\hat{j}}}{|\overrightarrow{a}|}$$
    $$\cos\gamma=\frac{\overrightarrow{a}\bold{\hat{k}}}{|\overrightarrow{a}|}$$

\item Projections:

  \begin{enumerate}

    \item Scalar projection of $\overrightarrow{b}$ onto $\overrightarrow{a}$:
      $$comp_{\overrightarrow{a}}\overrightarrow{b}=\frac{\overrightarrow{a}\cdot\overrightarrow{b}}{|\overrightarrow{a}|}$$

    \item Vector projection of $\overrightarrow{b}$ onto $\overrightarrow{a}$:
      $$proj_{\overrightarrow{a}}\overrightarrow{b}=\left(\frac{\overrightarrow{a}\cdot\overrightarrow{b}}{|\overrightarrow{a}|}\right)\frac{\overrightarrow{a}}{|\overrightarrow{a}|}$$
  \end{enumerate}

\end{enumerate}

\subsection{Unit 4}

\begin{enumerate}
    \setcounter{enumi}{9}

  \item Cross Product:\footnote{The vector created by $\overrightarrow{a}\text{ x }\overrightarrow{b}$ is orthogonal to both $\overrightarrow{a}$ and $\overrightarrow{b}$}
    $$\overrightarrow{a}\text{ x }\overrightarrow{b}=\begin{vmatrix} \bold{\hat{i}} & \bold{\hat{j}} & \bold{\hat{k}}\\ a_1 & a_2 & a_3\\ b_1 & b_2 & b_3\\ \end{vmatrix}=\langle a_2b_3-a_3b_2, a_3b_1-a_1b_3,a_1b_2-a_2b_1\rangle$$

  \item Cross Product Angle Formula:\footnote{If the cross product equals zero, the two vectors are parallel}
    $$|\overrightarrow{a}\text{ x }\overrightarrow{b}|=|\overrightarrow{a}||\overrightarrow{b}|\sin\theta$$

  \item Volume of the Parallelepiped created by vectors $\overrightarrow{a}$, $\overrightarrow{b}$, and $\overrightarrow{c}$:
    $$V=|\overrightarrow{a}\cdot(\overrightarrow{b}\text{ x }\overrightarrow{c})|$$

\end{enumerate}

\subsection{Unit 5}

\begin{enumerate}
    \setcounter{enumi}{12}

  \item Parametric line equations, given parallel vector $\langle a,b,c \rangle$, through point $(x_o,y_o,z_o)$:
    $$x=x_o+at\,\,\,\,\,y=y_o+bt\,\,\,\,\,z=z_o+ct$$

  \item Symmetric Equations:

    $$t=\frac{x-x_o}{a}=\frac{y-y_o}{b}=\frac{z-z_o}{c}$$

  \item Equation of a plane:

    $$a(x-x_o)+b(y-y_o)+c(z-z_o)=0$$

  \item Distance from plane to point $(x_1+y_1+z_1)$:
    $$D=\frac{|ax_1+by_1+cz_1+d|}{\sqrt{a^2+b^2+c^2}}$$
\end{enumerate}

\subsection{Unit 6}

\begin{enumerate}
    \setcounter{enumi}{16}

  \item Quadric Surface Formulas:
    \begin{center}
\begin{tabular}{|p{.45\textwidth}||p{.45\textwidth}|}

\hline
  Figure & Equation \\
\hline
Ellipsoid: A Figure in Which All Traces are Ellipses & $\frac{x^2}{a^2}+\frac{y^2}{b^2}+\frac{z^2}{c^2}=1$\\
\hline
  Cone: A Figure in Which Horizontal Traces are Ellipses and Vertical Traces in $x$ and $y$ are Hyperbolas & $\frac{x^2}{a^2}+\frac{y^2}{b^2}=\frac{z^2}{c^2}$\\
\hline
Elliptic Paraboloid: Horizontal Traces are Ellipses and Vertical Traces are Parabolas & $\frac{x^2}{a^2}+\frac{y^2}{b^2}=\frac{z}{c}$\\
\hline
Hyperboloid of One Sheet: Horizontal Traces are Ellipses and Vertical Traces are Hyperbolas & $\frac{x^2}{a^2}+\frac{y^2}{b^2}-\frac{z^2}{c^2}=1$\\
\hline
Hyperbolic Paraboloid: Horizontal Traces are Hyperbolas and Vertical Traces are Parabolas & $\frac{x^2}{a^2}-\frac{y^2}{b^2}=\frac{z}{c}$\\
\hline
Hyperboloid of Two Sheets: Horizontal Traces are Ellipses in $z$ and Vertical Traces are Hyperbolas & $-\frac{x^2}{a^2}-\frac{y^2}{b^2}+\frac{z^2}{c^2}=1$\\
\hline

\end{tabular}
\end{center}
\end{enumerate}

\section{Chapter 13}

\subsection{Unit 1}

\begin{enumerate}
    \setcounter{enumi}{17}
  \item Limit of a vector function:
    $$\lim_{t\to a}\overrightarrow{r}(t)=\langle \lim_{t\to a}x(t), \lim_{t\to a} y(t), \lim_{t\to a}z(t)\rangle$$
\end{enumerate}

\subsection{Unit 2}

\begin{enumerate}
    \setcounter{enumi}{18}

  \item Derivative of a vector function:
    $$\frac{d}{dt}[\overrightarrow{r}(t)]=\langle x'(t), y'(t), z'(t)\rangle$$

  \item Derivative of cross and dot products:

    \begin{enumerate}

      \item Dot Product:
        $$\frac{d}{dt}[\overrightarrow{u}(t)\cdot\overrightarrow{v}(t)]=\overrightarrow{u}'(t)\cdot\overrightarrow{v}(t)+\overrightarrow{u}(t)\cdot\overrightarrow{v}'(t)$$

      \item Cross Product:
        $$\frac{d}{dt}[\overrightarrow{u}(t)\text{ x }\overrightarrow{v}(t)]=\overrightarrow{u}'(t)\text{ x }\overrightarrow{v}(t)+\overrightarrow{u}(t)\text{ x }\overrightarrow{v}'(t)$$

    \end{enumerate}

  \item Integral of a vector function:
    $$\int_a^b \overrightarrow{r}(t)\,dt=\left(\int_a^b x(t)\,dt\right)\bold{\hat{i}}+\left(\int_a^by(t)\,dt\right)\bold{\hat{j}}+\left(\int_a^bz(t)\,dt\right)\bold{\hat{k}}$$
\end{enumerate}

\subsection{Unit 3}

\begin{enumerate}
    \setcounter{enumi}{21}

  \item Arc Length of a parametric vector function:
        $$L=\int_a^b\sqrt{\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2+\left(\frac{dz}{dt}\right)^2}\,dt=\int_a^b |\overrightarrow{r}'(t)|\,dt$$

      \item Unit Tangent Vector:
        $$\overrightarrow{T}(t)=\frac{\overrightarrow{r}'(t)}{|\overrightarrow{r}'(t)|}$$

      \item Curvature:
        \begin{enumerate}

          \item Using the unit tangent vector:
            $$\kappa(t)=\frac{|\overrightarrow{T}'(t)|}{|\overrightarrow{r}'(t)|}$$

          \item Using first and second order derivatives:
            $$\kappa(t)=\frac{|\overrightarrow{r}'(t)\text{ x }\overrightarrow{r}''(t)|}{|\overrightarrow{r}'(t)|^3}$$

          \item For single variable functions:
            $$\kappa(x)=\frac{|f''(x)|}{[1+(f'(x))^2]^{\frac{3}{2}}}$$

        \end{enumerate}

      \item Unit Normal Vector:
        $$\overrightarrow{N}(t)=\frac{\overrightarrow{T}'(t)}{|\overrightarrow{T}'(t)|}$$

      \item Binormal Vector:
        $$\overrightarrow{B}(t)=\overrightarrow{T}(t)\text{ x }\overrightarrow{N}(t)$$
    \end{enumerate}

\subsection{Unit 4}

\begin{enumerate}
    \setcounter{enumi}{26}

  \item Velocity:
    $$\overrightarrow{v}(t)=\overrightarrow{r}'(t)$$

  \item Speed:
    $$|\overrightarrow{v}(t)|=|\overrightarrow{r}'(t)|$$

  \item Acceleration:
    $$\overrightarrow{a}(t)=\overrightarrow{v}'(t)=\overrightarrow{r}''(t)$$
\end{enumerate}

\section{Chapter 14}

\subsection{Unit 1}

\begin{enumerate}
    \setcounter{enumi}{29}

  \item Level curves are used to demonstrate the height of a function, by drawing a line where $f(x,y,z)=k$, where $k$ is any constant in the domain of $f$
\end{enumerate}

\subsection{Unit 2}

\begin{enumerate}
    \setcounter{enumi}{30}

  \item To evaluate a multivariable limit, one must evaluate it along different paths:
    \textit{Example}
    $$\lim_{(x,y)\to(0,0)}\frac{x}{y}$$
      Evaluate along $y=mx$, which is any line through the origin
      $$\lim_{(x,y)\to(0,0)}\frac{\cancel{x}}{m\cancel{x}}\Rightarrow\frac{1}{m}$$
      Therefore, this limit does not exist because, for different slopes, the value is different

\end{enumerate}

\subsection{Unit 3}

\begin{enumerate}
    \setcounter{enumi}{31}

  \item To find a partial derivative, hold all variables aside from the one being differentiated with respect to to find a partial derivative.

\end{enumerate}

\subsection{Unit 4}

\begin{enumerate}
    \setcounter{enumi}{32}

  \item If $f$ has continuous partial derivatives, the following equation may be used to find a tangent plane:
    $$z-z_o=f_x(x_o,y_o)(x-x_o)+f_y(x_o,y_o)(y-y_o)$$

  \item Total differential:
    $$dz=\frac{\partial z}{\partial x}dx+\frac{\partial z}{\partial y}dy$$
    Or, with a multivariable function:
    $$df=\frac{\partial f}{\partial x}dx+\frac{\partial f}{\partial y}dy+\frac{\partial f}{\partial z}dz$$

\end{enumerate}

\subsection{Unit 5}

\begin{enumerate}
    \setcounter{enumi}{34}

  \item The Chain Rule (Where $x$ and $y$ are differentiable functions of $t$, $x(t)$ and $y(t)$ and $z=f(x(t),y(t)$):
    $$\frac{dz}{dt}=\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt}$$

  \item The Chain Rule (Where $x$ and $y$ are differentiable functions of $(s,t)$, $x(s,t)$, and $y(s,t)$ and $z=f(x(s,t),y(s,t))$:
      $$\frac{\partial z}{\partial s}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial s}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial s}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\frac{\partial z}{\partial t}=\frac{\partial z}{\partial x}\frac{\partial x}{\partial t}+\frac{\partial z}{\partial y}\frac{\partial y}{\partial t}$$

    \item Implicit differentiation:
      $$\frac{dy}{dx}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial y}}=-\frac{F_x}{F_y}$$

    \item Implicit Function Theorem:
      $$\frac{\partial z}{\partial x}=-\frac{\frac{\partial F}{\partial x}}{\frac{\partial F}{\partial z}}\,\,\,\,\,\,\,\,\,\,\frac{\partial z}{\partial y}=-\frac{\frac{\partial F}{\partial y}}{\frac{\partial F}{\partial z}}$$

\end{enumerate}

\subsection{Unit 6}

\begin{enumerate}
    \setcounter{enumi}{38}

  \item Directional derivative of function $f(x,y)$ in the direction of unit vector $u=\langle a,b \rangle$:
    $$D_uf(x,y)=f_x(x,y)a+f_y(x,y)b$$
    Or, in three dimensions:
    $$D_uf(x,y,z)=f_x(x,y,z)a+f_y(x,y,z)b+f_z(x,y,z)c$$

  \item Gradient Vector:
    $$\nabla f(x,y) = \langle f_x(x,y),f_y(x,y) \rangle=\frac{\partial f}{\partial x}\bold{\hat{i}}+\frac{\partial f}{\partial y}\bold{\hat{j}}$$
    Or, in three dimensions:
    $$\nabla f(x,y,z) = \langle f_x(x,y),f_y(x,y) \rangle=\frac{\partial f}{\partial x}\bold{\hat{i}}+\frac{\partial f}{\partial y}\bold{\hat{j}}+\frac{\partial f}{\partial z}\bold{\hat{k}}$$

  \item Tangent Multivariable Planes:
    $$F_x(x_o,y_o,z_o)(x-x_o)+F_y(x_o,y_o,z_o)(y-y_o)+F_z(x_o,y_o,z_o)(z-z_o)=0$$

\end{enumerate}

\subsection{Unit 7}

\begin{enumerate}
    \setcounter{enumi}{41}

  \item Second Derivative Test:
    $$D(a,b)=f_{xx}(a,b)f_{yy}(a,b)-[f_{xy}(a,b)]^2$$
    \begin{enumerate}

      \item If $D > 0$ and $f_{xx}(a,b) > 0$, then $f(a,b)$ is a local minimum
      \item If $D > 0$ and $f_{xx}(a,b) < 0$, then $f(a,b)$ is a local maximum
      \item If $D < 0$, then $f(a,b)$ is not a local maximum or minimum

    \end{enumerate}

\end{enumerate}

\section{Chapter 15}

\subsection{Unit 1}

\begin{enumerate}
    \setcounter{enumi}{42}

  \item Double Integral over Rectangles:
    Given rectangle $R=\{(x,y)\big| a\leq x\leq b, c\leq y\leq d\}$
    The double integral of the function $f(x,y)$ is:
    $$\iint_R f(x,y)\,dA=\int_a^b\int_c^df(x,y)\,dy\,dx$$
    This yields the volume of the shape under the function $f(x,y)$ and above rectangle, $R$

  \item Midpoint Rule for Double integrals:
    $$\int_R f(x,y)\,dA\approx\sum_{i=1}^m\sum_{j=1}^nf(\bar{x}_i,\bar{y}_i)\,\Delta A$$

\end{enumerate}

\subsection{Unit 2}

\begin{enumerate}
    \setcounter{enumi}{44}

  \item Type I Region ($D=\{(x,y)\big|a\leq x\leq b, g_1(x)\leq y\leq g_2(x)$):
      $$\int_a^b\int_{g_1(x)}^{g_2(x)}f(x,y)\,dy\,dx$$

    \item Type II Region ($D=\{(x,y)\big|h_1(y)\leq x\leq h_2(y), c \leq y\leq d$):
      $$\int_c^d\int_{h_1(y)}^{h_2(y)}f(x,y)\,dx\,dy$$

\end{enumerate}

\subsection{Unit 3}

\begin{enumerate}
    \setcounter{enumi}{46}

  \item Change to Polar Coordinates:
    $$\int_{\alpha}^{\beta}\int_a^b f(r\cos\theta,r\sin\theta)r\,dr\,d\theta$$

  \item Polar bounded by function(s) ($D=\{(r,\theta)\big|\alpha\leq\theta\leq\beta, h_1(\theta)\leq r\leq h_2(\theta)\}$):
    $$\int_{\alpha}^{\beta}\int_{h_1(\theta)}^{h_2(\theta)} f(r\cos\theta,r\sin\theta)r\,dr\,d\theta$$

\end{enumerate}

\subsection{Unit 4}

\begin{enumerate}
    \setcounter{enumi}{48}

  \item Mass from density function:
    $$m=\iint_D \rho(x,y)\,dA$$

  \item Moment about the:

    \begin{enumerate}

      \item $x$ axis:
        $$M_x=\iint_D y\rho(x,y)\,dA$$

      \item $y$ axis:
        $$M_y=\iint_D x\rho(x,y)\,dA$$

    \end{enumerate}

  \item Center of mass:

    $$\bar{x}=\frac{M_y}{m}\,\,\,\,\,\,\,\,\,\,\bar{y}=\frac{M_x}{m}$$

  \item Moment of Inertia about the:

    \begin{enumerate}

      \item $x$ axis:
        $$I_x=\iint_D y^2\rho(x,y)\,dA$$

      \item $y$ axis:
        $$I_y=\iint_D x^2\rho(x,y)\,dA$$

      \item Origin (Polar):
        $$I_o=\iint_D (x^2+y^2)\rho(x,y)\,dA$$

    \end{enumerate}

\end{enumerate}

\subsection{Unit 5}

\begin{enumerate}
    \setcounter{enumi}{52}

  \item Surface Area:
    $$\iint_D \sqrt{[f_x(x,y)]^2+[f_y(x,y)]^2+1}\,dA$$

\end{enumerate}

\subsection{Unit 6}

\begin{enumerate}
    \setcounter{enumi}{53}

  \item Triple Integral on Box ($B=\{(x,y,z)\big|a\leq x\leq b, c\leq y\leq d, r\leq z\leq s\}$):
    $$\int_a^b\int_c^d\int_r^sf(x,y,z)\,dx\,dy\,dz$$

  \item Type I $E$ ($E=\{(x,y,z)\big|(x,y)\in D, u_1(x,y)\leq z\leq u_2(x,y)\}$):
    $$\iint_D \left[\int_{u_1(x,y)}^{u_2(x,y)}f(x,y,z)\,dz\right]\,dA$$

  \item Type I $D$ and $E$ ($E=\{(x,y,z)\big| a\leq x\leq b, g_1(x)\leq y\leq g_2(x), u_1(x,y)\leq z\leq u_2(x,y)\}$):
    $$\int_a^b\int_{g_1(x)}^{g_2(x)}\int_{u_1(x,y)}^{u_2(x,y)}f(x,y,z)\,dz\,dy\,dx$$

  \item Type II $D$ and Type I $E$ ($E=\{(x,y,z)\big| h_1(y)\leq x\leq h_2(y), c\leq y\leq d, u_1(x,y)\leq z\leq u_2(x,y)\}$):
    $$\int_c^d\int_{h_1(y)}^{h_2(y)}\int_{u_1(x,y)}^{u_2(x,y)}f(x,y,z)\,dz\,dx\,dy$$

  \item Type II $E$ ($E=\{(x,y,z)\big|u_1(y,z)\leq x\leq u_2(y,z), c\leq y\leq d,r\leq z\leq s\}$)
    $$\iint_D \left[\int_{u_1(y,z)}^{u_2(y,z)} f(x,y,z)\,dx\right]\,dA$$

  \item Type III $E$ ($E=\{(x,y,z)\big|a\leq x\leq b, u_1(x,z)\leq y\leq u_2(x,z), r\leq z\leq s\}$)
    $$\iint_D\left[\int_{u_1(x,z)}^{u_2(x,z)}f(x,y,z)\,dy\right]\,dA$$

\end{enumerate}

\subsection{Unit 7 (Skip)}

\subsection{Unit 8 (Skip)}

\subsection{Unit 9}

\begin{enumerate}
    \setcounter{enumi}{59}

  \item The Jacobian Transformation:
    $$J=\Large{\begin{vmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v} \\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \\ \end{vmatrix}}=\frac{\partial x}{\partial u}\frac{\partial y}{\partial v}-\frac{\partial x}{\partial v}\frac{\partial y}{\partial u}$$

  \item Change of Variables in Double Integrals
    $$\iint_S f(x(u,v),y(u,v)) J\,du\,dv$$

\end{enumerate}

\section{Chapter 16}

\subsection{Unit 1}

\begin{enumerate}
    \setcounter{enumi}{61}

  \item Gradient vector fields:
    $$\nabla f(x,y,z)=f_x(x,y,z)\bold{\hat{i}}+f_y(x,y,z)\bold{\hat{j}}+f_z(x,y,z)\bold{\hat{k}}$$

\end{enumerate}

\subsection{Unit 2}

\begin{enumerate}
    \setcounter{enumi}{62}

  \item Line Integrals:
    $$\int_C f(x,y,z)\,ds=\int_C f(x,y,z)\sqrt{\left(\frac{\partial f}{\partial x}\right)^2+\left(\frac{\partial f}{\partial y}\right)^2+\left(\frac{\partial f}{\partial z}\right)^2}\,dt$$

\end{enumerate}

\subsection{Unit 3}

\begin{enumerate}
    \setcounter{enumi}{63}

  \item Fundamental Theorem of Line Integrals
    $$\int_C \bold{F}\,d\bold{r}=\int_C \nabla f\,d\bold{r}=f(\bold{r}(b))-f(\bold{r}(a))$$

  \item Conservative Vector Field If:
    $$\frac{\partial P}{\partial y}=\frac{\partial Q}{\partial x}$$

\end{enumerate}

\subsection{Unit 4}

\begin{enumerate}
    \setcounter{enumi}{65}

  \item Green's Theorem:
    $$\int_C P\,dx+Q\,dy=\iint_D \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right)\,dA$$

\end{enumerate}

\end{document}