[spec] additions to complex graphs and exp identities
[notes.git] / spec / spec-collated.tex
index e7957131bcaf7d5e88a4803bfc9fa01cbbca4aaa..97385d2274b0f1e730ceb0a1c32b4d550e8c36a1 100644 (file)
 \documentclass[a4paper]{article}
-\usepackage[a4paper,margin=2cm]{geometry}
-\usepackage{multicol}
-\usepackage{multirow}
+\usepackage[dvipsnames, table]{xcolor}
+\usepackage{adjustbox}
 \usepackage{amsmath}
 \usepackage{amssymb}
-\usepackage{harpoon}
-\usepackage{tabularx}
-\usepackage{makecell}
-\usepackage[dvipsnames, table]{xcolor}
+\usepackage{array}
 \usepackage{blindtext}
+\usepackage{dblfloatfix}
+\usepackage{enumitem}
+\usepackage{fancyhdr}
+\usepackage[a4paper,margin=1.8cm]{geometry}
 \usepackage{graphicx}
-\usepackage{wrapfig}
-\usepackage{tikz}
-\usepackage{tikz-3dplot}
+\usepackage{harpoon}
+\usepackage{hhline}
+\usepackage{import}
+\usepackage{keystroke}
+\usepackage{listings}
+\usepackage{makecell}
+\usepackage{mathtools}
+\usepackage{mathtools}
+\usepackage{multicol}
+\usepackage{multirow}
 \usepackage{pgfplots}
-\usetikzlibrary{calc}
-\usetikzlibrary{angles}
-\usetikzlibrary{datavisualization.formats.functions}
-\usetikzlibrary{decorations.markings}
+\usepackage{pst-plot}
+\usepackage{rotating}
+%\usepackage{showframe} % debugging only
+\usepackage{subfiles}
+\usepackage{tabularx}
+\usepackage{tabu}
+\usepackage{tcolorbox}
+\usepackage{tikz-3dplot}
+\usepackage{tikz}
+\usepackage{tkz-fct}
+\usepackage[obeyspaces]{url}
+\usepackage{wrapfig}
+
+
+\usetikzlibrary{%
+  angles,
+  arrows,
+  arrows.meta,
+  calc,
+  datavisualization.formats.functions,
+  decorations,
+  decorations.markings,
+  decorations.text,
+  decorations.pathreplacing,
+  decorations.text,
+  scopes
+}
+
+\newcommand\given[1][]{\:#1\vert\:}
+\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
+
 \usepgflibrary{arrows.meta}
-\usepackage{fancyhdr}
+\pgfplotsset{compat=1.16}
+\pgfplotsset{every axis/.append style={
+  axis x line=middle,
+  axis y line=middle,
+  axis line style={->},
+  xlabel={$x$},
+  ylabel={$y$},
+}}
+
+\psset{dimen=monkey,fillstyle=solid,opacity=.5}
+\def\object{%
+    \psframe[linestyle=none,fillcolor=blue](-2,-1)(2,1)
+    \psaxes[linecolor=gray,labels=none,ticks=none]{->}(0,0)(-3,-3)(3,2)[$x$,0][$y$,90]
+    \rput{*0}{%
+        \psline{->}(0,-2)%
+        \uput[-90]{*0}(0,-2){$\vec{w}$}}
+}
+
 \pagestyle{fancy}
+\fancypagestyle{plain}{\fancyhead[LO,LE]{} \fancyhead[CO,CE]{}} % rm title & author for first page
 \fancyhead[LO,LE]{Year 12 Specialist}
 \fancyhead[CO,CE]{Andrew Lorimer}
 
-\usepackage{mathtools}
-\usepackage{xcolor} % used only to show the phantomed stuff
 \renewcommand\hphantom[1]{{\color[gray]{.6}#1}} % comment out!
-\setlength\fboxsep{0pt} \setlength\fboxrule{.2pt} % for the \fboxes
 \newcommand*\leftlap[3][\,]{#1\hphantom{#2}\mathllap{#3}}
 \newcommand*\rightlap[2]{\mathrlap{#2}\hphantom{#1}}
+\linespread{1.5}
+\setlength{\parindent}{0pt}
+\setlength\fboxsep{0pt} \setlength\fboxrule{.2pt} % for the \fboxes
+
 \newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}%
 \newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}%
-\definecolor{cas}{HTML}{e6f0fe}
-\linespread{1.5}
-\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
+\newcolumntype{Y}{>{\centering\arraybackslash}X}
+
+\definecolor{cas}{HTML}{cde1fd}
+\definecolor{important}{HTML}{fc9871}
+\definecolor{dark-gray}{gray}{0.2}
+\definecolor{light-gray}{HTML}{cccccc}
+\definecolor{peach}{HTML}{e6beb2}
+\definecolor{lblue}{HTML}{e5e9f0}
+
 \newcommand{\tg}{\mathop{\mathrm{tg}}}
 \newcommand{\cotg}{\mathop{\mathrm{cotg}}}
 \newcommand{\arctg}{\mathop{\mathrm{arctg}}}
 \newcommand{\arccotg}{\mathop{\mathrm{arccotg}}}
 
+\newtcolorbox{cas}{colframe=cas!75!black, fonttitle=\sffamily\bfseries, title=On CAS, left*=3mm}
+\newtcolorbox{theorembox}[1]{colback=green!10!white, colframe=blue!20!white, coltitle=black, fontupper=\sffamily, fonttitle=\sffamily, #1}
+\newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=darkgray, fontupper=\sffamily\bfseries}
 
-                  \pgfplotsset{every axis/.append style={
-                    axis x line=middle,    % put the x axis in the middle
-                    axis y line=middle,    % put the y axis in the middle
-                    axis line style={->}, % arrows on the axis
-                    xlabel={$x$},          % default put x on x-axis
-                    ylabel={$y$},          % default put y on y-axis
-                  }}
 \begin{document}
 
+\title{\vspace{-22mm}Year 12 Specialist\vspace{-4mm}}
+\author{Andrew Lorimer}
+\date{}
+\maketitle
+\vspace{-9mm}
 \begin{multicols}{2}
 
   \section{Complex numbers}
 
   \[\mathbb{C}=\{a+bi:a,b\in\mathbb{R}\}\]
-
   \begin{align*}
     \text{Cartesian form: } & a+bi\\
     \text{Polar form: } & r\operatorname{cis}\theta
 
   \subsection*{Operations}
 
-  \definecolor{shade1}{HTML}{ffffff}
-  \definecolor{shade2}{HTML}{e6f2ff}
-  \definecolor{shade3}{HTML}{cce2ff}
-  \begin{tabularx}{\columnwidth}{r|X|X}
+  \begin{tabularx}{\columnwidth}{|r|X|X|}
+    \hline
+    \rowcolor{cas}
     & \textbf{Cartesian} & \textbf{Polar} \\
     \hline
     \(z_1 \pm z_2\) & \((a \pm c)(b \pm d)i\) & convert to \(a+bi\)\\
     \hline
     \(z_1 \cdot z_2\) & \(ac-bd+(ad+bc)i\) & \(r_1r_2 \operatorname{cis}(\theta_1 + \theta_2)\)\\
     \hline
-    \(z_1 \div z_2\) & \((z_1 \overline{z_2}) \div |z_2|^2\) & \(\left(\frac{r_1}{r_2}\right) \operatorname{cis}(\theta_1 - \theta_2)\)
+    \(z_1 \div z_2\) & \((z_1 \overline{z_2}) \div |z_2|^2\) & \(\left(\frac{r_1}{r_2}\right) \operatorname{cis}(\theta_1 - \theta_2)\) \\
+    \hline
   \end{tabularx}
 
   \subsubsection*{Scalar multiplication in polar form}
   \[k\left(r \operatorname{cis}\theta\right)=kr \operatorname{cis}\left(\begin{cases}\theta - \pi & |0<\operatorname{Arg}(z)\le \pi \\ \theta + \pi & |-\pi<\operatorname{Arg}(z)\le 0\end{cases}\right)\]
 
     \subsection*{Conjugate}
-
+    \vspace{-7mm} \hfill  \colorbox{cas}{\texttt{conjg(a+bi)}}
     \begin{align*}
       \overline{z} &= a \mp bi\\
       &= r \operatorname{cis}(-\theta)
     \end{align*}
 
-    \noindent \colorbox{cas}{On CAS: \texttt{conjg(a+bi)}}
-
     \subsubsection*{Properties}
 
     \begin{align*}
       \overline{z_1 \pm z_2} &= \overline{z_1}\pm\overline{z_2}\\
       \overline{z_1 \cdot z_2} &= \overline{z_1}\cdot\overline{z_2}\\
-      \overline{kz} &= k\overline{z} \quad | \quad k \in \mathbb{R}\\
+      \overline{kz} &= k\overline{z} \> \forall \>  k \in \mathbb{R}\\
       z\overline{z} &= (a+bi)(a-bi)\\
       &= a^2 + b^2\\
       &= |z|^2
       \frac{z_1}{z_2}&=z_1z_2^{-1}\\
       &=\frac{z_1\overline{z_2}}{|z_2|^2}\\
       &=\frac{(a+bi)(c-di)}{c^2+d^2}\\
-      & \qquad \text{(rationalise denominator)}
+      & \text{then rationalise denominator}
     \end{align*}
 
     \subsection*{Polar form}
 
-    \begin{align*}
-      z&=r\operatorname{cis}\theta\\
-      &=r(\cos \theta + i \sin \theta)
-    \end{align*}
+    \[ r \operatorname{cis} \theta = r\left( \cos \theta + i \sin \theta \right) \]
 
     \begin{itemize}
       \item{\(r=|z|=\sqrt{\operatorname{Re}(z)^2 + \operatorname{Im}(z)^2}\)}
-      \item{\(\theta = \operatorname{arg}(z)\) \quad \colorbox{cas}{On CAS: \texttt{arg(a+bi)}}}
+      \item{\(\theta = \operatorname{arg}(z)\) \hfill \colorbox{cas}{\texttt{arg(a+bi)}}}
       \item{\(\operatorname{Arg}(z) \in (-\pi,\pi)\) \quad \bf{(principal argument)}}
-      \item{\colorbox{cas}{Convert on CAS:}\\ \verb|compToTrig(a+bi)| \(\iff\) \verb|cExpand{r·cisX}|}
       \item{Multiple representations:\\\(r\operatorname{cis}\theta=r\operatorname{cis}(\theta+2n\pi)\) with \(n \in \mathbb{Z}\) revolutions}
       \item{\(\operatorname{cis}\pi=-1,\qquad \operatorname{cis}0=1\)}
     \end{itemize}
 
+    \begin{cas}
+      \-\hspace{1em}\verb|compToTrig(a+bi)| \(\iff\) \verb|cExpand{r·cisX}|
+    \end{cas}
+
     \subsection*{de Moivres' theorem}
 
-    \[(r \operatorname{cis} \theta)^n = r^n \operatorname{cis}(n\theta) \text{ where } n \in \mathbb{Z}\]
+    \begin{theorembox}{}
+      \[(r \operatorname{cis} \theta)^n = r^n \operatorname{cis}(n\theta) \text{ where } n \in \mathbb{Z}\]
+    \end{theorembox}
 
     \subsection*{Complex polynomials}
 
       \hline
     \end{tabularx}
 
+    \begin{theorembox}{title=Factor theorem}
+      If \(\beta z + \alpha\) is a factor of \(P(z)\), \\
+      \-\hspace{1em}then \(P(-\dfrac{\alpha}{\beta})=0\).
+    \end{theorembox}
+
     \subsection*{\(n\)th roots}
 
     \(n\)th roots of \(z=r\operatorname{cis}\theta\) are:
 
     \subsection*{Sketching complex graphs}
 
-    \subsubsection*{Linear}
+    \subsubsection*{Rays/lines \qquad \(\operatorname{Arg}( z\pm b)=\theta\)}
+
+    \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
+      \draw [->] (-0.75,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
+      \draw [->] (0,-1) -- (0,1) node [above] {$\operatorname{Im}(z)$};
+      \draw [->, thick, brown] (-0.25,0) -- (-0.75,-1);
+      \node [above, font=\footnotesize] at (-0.25,0) {\(\frac{1}{4}\)};
+      \begin{scope}
+        \path[clip] (-0.25,0) -- (-0.75,-1) -- (0,0);
+        \fill[orange, opacity=0.5, draw=black] (-0.25,0) circle (2mm);
+      \end{scope}
+      \node at (-0.08,-0.3) {\(\frac{\pi}{8}\)};
+      \node [font=\footnotesize, left] at (-0.75,-1) {\(\operatorname{Arg}(z+\frac{1}{4})=\frac{\pi}{8}\)};
+      \node [brown, mydot] at (-0.25,0) {};
+      \draw [<->, thick, green] (0,-1) -- (1.5,0.5) node [pos=0.25, black, font=\footnotesize, right] {\(|z-2|=|z-(1+i)|\)};
+      \node [left, font=\footnotesize] at (0,-1) {\(-1\)};
+      \node [below, font=\footnotesize] at (1,0) {\(1\)};
+    \end{tikzpicture}\end{center}
 
     \begin{itemize}
+      \item \(\operatorname{Arg}(z \pm b) = \theta\) (ray)
       \item{\(\operatorname{Re}(z)=c\) or \(\operatorname{Im}(z)=c\) (perpendicular bisector)}
       \item{\(\operatorname{Im}(z)=m\operatorname{Re}(z)\)}
-      \item{\(|z+a|=|z+b| \implies 2(a-b)x=b^2-a^2\)\\Geometric: equidistant from \(a,b\)}
+      \item \(|z - (a+bi)|=|z - (c+di)| \\ \implies \frac{2(c-a)x + a^2 + b^2 - c^2 - d^2}{2(b-d)}\)
+      \item \(\operatorname{Re}(z) \pm \operatorname{Im}(z) = c\)
     \end{itemize}
 
     \subsubsection*{Circles}
     \begin{itemize}
       \item \(|z-z_1|^2=c^2|z_2+2|^2\)
       \item \(|z-(a+bi)|=c \implies (x-a)^2+_(y-b)^2=c^2\)
+      \item \(z \overline{z} = r^2\)
     \end{itemize}
 
-    \noindent \textbf{Loci} \qquad \(\operatorname{Arg}(z)<\theta\)
+    \subsubsection*{Regions \qquad \(\operatorname{Arg}(z) \lessgtr \theta\)}
 
     \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
       \draw [->] (0,0) -- (1,0) node [right]  {$\operatorname{Re}(z)$};
       \node [blue, mydot] {};
     \end{tikzpicture}\end{center}
 
-    \noindent \textbf{Rays} \qquad \(\operatorname{Arg}(z-b)=\theta\)
-
-    \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
-      \draw [->] (-0.75,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
-      \draw [->] (0,-1) -- (0,1) node [above] {$\operatorname{Im}(z)$};
-      \draw [->, thick, brown] (-0.25,0) -- (-0.75,-1);
-      \node [above, font=\footnotesize] at (-0.25,0) {\(\frac{1}{4}\)};
-      \begin{scope}
-        \path[clip] (-0.25,0) -- (-0.75,-1) -- (0,0);
-        \fill[orange, opacity=0.5, draw=black] (-0.25,0) circle (2mm);
-      \end{scope}
-      \node at (-0.08,-0.3) {\(\frac{\pi}{8}\)};
-      \node [font=\footnotesize, left] at (-0.75,-1) {\(\operatorname{Arg}(z+\frac{1}{4})=\frac{\pi}{8}\)};
-      \node [brown, mydot] at (-0.25,0) {};
-      \draw [<->, thick, green] (0,-1) -- (1.5,0.5) node [pos=0.25, black, font=\footnotesize, right] {\(|z-2|=|z-(1+i)|\)};
-      \node [left, font=\footnotesize] at (0,-1) {\(-1\)};
-      \node [below, font=\footnotesize] at (1,0) {\(1\)};
-    \end{tikzpicture}\end{center}
 
     \section{Vectors}
     \begin{center}\begin{tikzpicture}
       \end{scope}
       \node[black, right] at (2.5,1.5) {\(y\vec{j}\)};
     \end{tikzpicture}\end{center}
+
     \subsection*{Column notation}
 
     \[\begin{bmatrix}x\\ y \end{bmatrix} \iff x\boldsymbol{i} + y\boldsymbol{j}\]
             \end{scope}
           \end{tikzpicture}\end{center}
           \begin{align*}\boldsymbol{a} \cdot \boldsymbol{b} &= a_1 b_1 + a_2 b_2 \\  &= |\boldsymbol{a}| |\boldsymbol{b}| \cos \theta \\ &\quad (\> 0 \le \theta \le \pi) \text{ - from cosine rule}\end{align*}
-            \noindent\colorbox{cas}{On CAS: \texttt{dotP({[}a\ b\ c{]},\ {[}d\ e\ f{]})}}
+            \noindent\colorbox{cas}{On CAS:} \texttt{dotP({[}a\ b\ c{]},\ {[}d\ e\ f{]})}
 
             \subsubsection*{Properties}
 
                 Area \(=\boldsymbol{c} \cdot \boldsymbol{a}\)
             \end{itemize}
 
+            \subsubsection*{Perpendicular bisectors of a triangle}
+
+\hspace{-1.5cm}\begin{tikzpicture}
+  [
+    scale=3,
+    >=stealth,
+    point/.style = {draw, circle,  fill = black, inner sep = 1pt},
+    dot/.style   = {draw, circle,  fill = black, inner sep = .2pt},
+    thick
+  ]
+
+  \node at (-1,1) [text width=5cm, rounded corners, fill=lblue, inner sep=1ex]
+    {
+      \sffamily The three bisectors meet at the circumcenter \(Z\) where \(|\overrightharp{ZA}| = |\overrightharp{ZB}| = |\overrightharp{ZC}|\).
+    };
+
+  % the circle
+  \def\rad{1}
+  \node (origin) at (0,0) [point, label = {right: {\(Z\)}}]{};
+  \draw [thin] (origin) circle (\rad);
+
+  % triangle nodes: just points on the circle
+  \node (n1) at +(60:\rad) [point, label = above:\(A\)] {};
+  \node (n2) at +(-145:\rad) [point, label = below:\(B\)] {};
+  \node (n3) at +(-45:\rad) [point, label = {below right:\(C\)}] {};
+
+  % triangle edges: connect the vertices, and leave a node at the midpoint
+  \draw[orange] (n3) -- node (a) [label = {above right:\(D\)}] {} (n1);
+  \draw[blue] (n3) -- node (b) [label = {below right:\(F\)}] {} (n2);
+  \draw[red] (n1) -- node (c) [label = {left: \(E\)}] {} (n2);
+
+  % Bisectors
+  % start at the point lying on the line from (origin) to (a), at
+  % twice that distance, and then draw a path going to the point on
+  % the line lying on the line from (a) to the (origin), at 3 times
+  % that distance.
+  \draw[orange, dotted]
+    ($ (origin) ! 2 ! (a) $)
+    node [right] {\sffamily Bisector \(AC\)}
+    -- ($(a) ! 3 ! (origin)$ );
+
+  % similarly for origin and b
+  \draw[blue, dotted]
+    ($ (origin) ! 2 ! (b) $)
+    -- ($(b) ! 3 ! (origin)$ )
+    node [right] {\sffamily Bisector \(BC\)};
+
+  \draw[red, dotted]
+    ($ (origin) ! 5 ! (c) $)
+    -- ($(c) ! 7 ! (origin)$ )
+    node [right] {\sffamily Bisector \(AB\)};
+
+  \draw[gray, dashed, thin] (n1) -- (origin) -- (n2);
+  \draw[gray, dashed, thin] (origin) -- (n3);
+
+  % Right angle symbols
+  \def\ralen{.5ex}  % length of the short segment
+  \foreach \inter/\first/\last in {a/n3/origin, b/n2/origin, c/n2/origin}
+    {
+      \draw [thin] let \p1 = ($(\inter)!\ralen!(\first)$), % point along first path
+                \p2 = ($(\inter)!\ralen!(\last)$),  % point along second path
+                \p3 = ($(\p1)+(\p2)-(\inter)$)      % corner point
+            in
+              (\p1) -- (\p3) -- (\p2);              % path
+    }
+\end{tikzpicture}
+
+            \begin{theorembox}{title=Perpendicular bisector theorem}
+              If a point \(P\) lies on the perpendicular bisector of line \(\overrightharp{XY}\), then \(P\) is equidistant from the endpoints of the bisected segment
+              \[ \text{i.e. } |\overrightharp{PX}| = |\overrightharp{PY}| \]
+            \end{theorembox}
+
             \subsubsection*{Useful vector properties}
 
             \begin{itemize}
                   \begin{tikzpicture}
                     \begin{axis}[yticklabel style={yshift=1.0pt, anchor=north east},x=0.1cm, y=1cm, ymax=2, ymin=-2, xticklabels={}, ytick={-1.5708,1.5708},yticklabels={\(-\frac{\pi}{2}\),\(\frac{\pi}{2}\)}]
                       \addplot[color=orange, smooth] gnuplot [domain=-35:35, unbounded coords=jump,samples=350] {atan(x)} node [pos=0.5, above left] {\(\tan^{-1}x\)};
-                      \addplot[->, gray, dotted, thick, domain=-35:35] {1.5708};
-                      \addplot[->, gray, dotted, thick, domain=-35:35] {-1.5708};
+                      \addplot[gray, dotted, thick, domain=-35:35] {1.5708} node [black, font=\footnotesize, below right, pos=0] {\(y=\frac{\pi}{2}\)};
+                      \addplot[gray, dotted, thick, domain=-35:35] {-1.5708} node [black, font=\footnotesize, above left, pos=1] {\(y=-\frac{\pi}{2}\)};
                     \end{axis}
                   \end{tikzpicture}
-\columnbreak
+
+                  \subsection*{Mensuration}
+
+                  \begin{tikzpicture}[draw=blue!70,thick]
+                    \filldraw[fill=lblue] circle (2cm);
+                    \filldraw[fill=white] 
+                    (320:2cm) node[right] {} 
+                    -- (220:2cm) node[left] {} 
+                    arc[start angle=220, end angle=320, radius=2cm] 
+                    -- cycle;
+                    \node {Major Segment};
+                    \node at (-90:1.5) {Minor Segment};
+
+                    \begin{scope}[xshift=4.5cm]
+                      \draw [fill=lblue] circle (2cm);
+                      \filldraw[fill=white] 
+                      (320:2cm) node[right] {}
+                      -- (0,0) node[above] {}
+                      -- (220:2cm) node[left] {} 
+                      arc[start angle=220, end angle=320, radius=2cm]
+                      -- cycle;
+                      \node at (90:1cm) {Major Sector};
+                      \node at (-90:1.5) {Minor Sector};
+                    \end{scope}
+                  \end{tikzpicture}
+
+
+                  \begin{align*}
+                    \textbf{Sectors: } A &= \pi r^2 \dfrac{\theta}{2\pi} \\
+                    &= \dfrac{r^2 \theta}{2}
+                  \end{align*}
+
+                  \[ \textbf{Segments: } A = \dfrac{r^2}{2} \left(\theta - \sin \theta \right) \]
+
+                  \begin{align*}
+                    \textbf{Chords: } \operatorname{crd} \theta &= \sqrt{(1 - \cos\theta)^2 + \sin^2 \theta} \\
+                    &= \sqrt{2 - 2\cos\theta} \\
+                    &= 2 \sin \left(\dfrac{\theta}{2}\right)
+                  \end{align*}
+
                   \section{Differential calculus}
 
+                  \[f^\prime(x) = \lim_{\delta x \rightarrow 0}{\delta y \over \delta x}={\frac{dy}{dx}}\]
+
                   \subsection*{Limits}
 
                   \[\lim_{x \rightarrow a}f(x)\]
                       \(f(x)\) is continuous \(\iff L^-=L^+=f(x) \> \forall x\)
                   \end{enumerate}
 
-                  \subsection*{Gradients of secants and tangents}
+                  \subsection*{Gradients}
 
                   \textbf{Secant (chord)} - line joining two points on curve\\
                   \textbf{Tangent} - line that intersects curve at one point
 
-                  \subsection*{First principles derivative}
-
-                  \[f^\prime(x) = \lim_{\delta x \rightarrow 0}{\delta y \over \delta x}={\frac{dy}{dx}}\]
-
-                  \subsubsection*{Logarithmic identities}
-
-                  \(\log_b (xy)=\log_b x + \log_b y\)\\
-                  \(\log_b x^n = n \log_b x\)\\
-                  \(\log_b y^{x^n} = x^n \log_b y\)
+                  \subsubsection*{Points of Inflection}
 
-                  \subsubsection*{Index identities}
+                  \emph{Stationary point} - i.e.
+                  \(f^\prime(x)=0\)\\
+                  \emph{Point of inflection} - max \(|\)gradient\(|\) (i.e.
+                  \(f^{\prime\prime} = 0\))
 
-                  \(b^{m+n}=b^m \cdot b^n\)\\
-                  \((b^m)^n=b^{m \cdot n}\)\\
-                  \((b \cdot c)^n = b^n \cdot c^n\)\\
-                  \({a^m \div a^n} = {a^{m-n}}\)
+                  \subsubsection*{Strictly increasing/decreasing}
 
-                  \subsection*{Derivative rules}
+                  For \(x_2\) and \(x_1\) where \(x_2 > x_1\):
 
-                  \renewcommand{\arraystretch}{1.4}
-                  \begin{tabularx}{\columnwidth}{rX}
-                    \hline
-                    \(f(x)\) & \(f^\prime(x)\)\\
-                    \hline
-                    \(\sin x\) & \(\cos x\)\\
-                    \(\sin ax\) & \(a\cos ax\)\\
-                    \(\cos x\) & \(-\sin x\)\\
-                    \(\cos ax\) & \(-a \sin ax\)\\
-                    \(\tan f(x)\) & \(f^2(x) \sec^2f(x)\)\\
-                    \(e^x\) & \(e^x\)\\
-                    \(e^{ax}\) & \(ae^{ax}\)\\
-                    \(ax^{nx}\) & \(an \cdot e^{nx}\)\\
-                    \(\log_e x\) & \(\dfrac{1}{x}\)\\
-                    \(\log_e {ax}\) & \(\dfrac{1}{x}\)\\
-                    \(\log_e f(x)\) & \(\dfrac{f^\prime (x)}{f(x)}\)\\
-                    \(\sin(f(x))\) & \(f^\prime(x) \cdot \cos(f(x))\)\\
-                    \(\sin^{-1} x\) & \(\dfrac{1}{\sqrt{1-x^2}}\)\\
-                    \(\cos^{-1} x\) & \(\dfrac{-1}{sqrt{1-x^2}}\)\\
-                    \(\tan^{-1} x\) & \(\dfrac{1}{1 + x^2}\)\\
-                    \(\frac{d}{dy}f(y)\) & \(\dfrac{1}{\frac{dx}{dy}}\) (reciprocal)\\
-                    \(uv\) & \(u \frac{dv}{dx}+v\frac{du}{dx} (product rule)\)\\
-                    \(\dfrac{u}{v}\) & \(\dfrac{v\frac{du}{dx}-u\frac{dv}{dx}}{v^2}\) (quotient rule)\\
-                    \(f(g(x))\) & \(f^\prime(g(x))\cdot g^\prime(x)\)\\
-                    \hline
-                  \end{tabularx}
+                  \textbf{strictly increasing}\\
+                  \-\hspace{1em}where \(f(x_2) > f(x_1)\) or \(f^\prime(x)>0\)
 
-                  \subsection*{Reciprocal derivatives}
+                  \textbf{strictly decreasing}\\
+                  \hspace{1em}where \(f(x_2) < f(x_1)\) or \(f^\prime(x)<0\)
+                  \begin{warning}
+                    Endpoints are included, even where \(\boldsymbol{\frac{dy}{dx}=0}\)
+                  \end{warning}
 
-                  \[\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}\]
-
-                  \subsection*{Differentiating \(x=f(y)\)}
-                  \begin{align*}
-                    \text{Find }& \frac{dx}{dy}\\
-                    \text{Then, }\frac{dx}{dy} &= \frac{1}{\frac{dy}{dx}} \\
-                    \implies {\frac{dy}{dx}} &= \frac{1}{\frac{dx}{dy}}\\
-                    \therefore {\frac{dy}{dx}} &= \frac{1}{\frac{dx}{dy}}
-                  \end{align*}
 
                   \subsection*{Second derivative}
                   \begin{align*}f(x) \longrightarrow &f^\prime (x) \longrightarrow f^{\prime\prime}(x)\\
 
                   \noindent Order of polynomial \(n\)th derivative decrements each time the derivative is taken
 
-                  \subsubsection*{Points of Inflection}
-
-                  \emph{Stationary point} - i.e.
-                  \(f^\prime(x)=0\)\\
-                  \emph{Point of inflection} - max \(|\)gradient\(|\) (i.e.
-                  \(f^{\prime\prime} = 0\))
 
+                  \subsection*{Slope fields}
+
+                  \begin{tikzpicture}[declare function={diff(\x,\y) = \x+\y;}]
+                    \begin{axis}[axis equal, ymin=-4, ymax=4, xmin=-4, xmax=4, ticks=none, enlargelimits=true, ]
+                      \addplot[thick, orange, domain=-4:2] {e^(x)-x-1};
+                      \pgfplotsinvokeforeach{-4,...,4}{%
+                        \draw[gray] ( {#1 -0.1}, {4 - diff(#1, 4) *0.1}) --  ( {#1 +0.1}, {4  + diff(#1, 4) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {3 - diff(#1, 3) *0.1}) --  ( {#1 +0.1}, {3  + diff(#1, 3) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {2 - diff(#1, 2) *0.1}) --  ( {#1 +0.1}, {2  + diff(#1, 2) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {1 - diff(#1, 1) *0.1}) --  ( {#1 +0.1}, {1  + diff(#1, 1) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {0 - diff(#1, 0) *0.1}) --  ( {#1 +0.1}, {0  + diff(#1, 0) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-1 - diff(#1, -1) *0.1}) --  ( {#1 +0.1}, {-1  + diff(#1, -1) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-2 - diff(#1, -2) *0.1}) --  ( {#1 +0.1}, {-2  + diff(#1, -2) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-3 - diff(#1, -3) *0.1}) --  ( {#1 +0.1}, {-3  + diff(#1, -3) *0.1});
+                        \draw[gray] ( {#1 -0.1}, {-4 - diff(#1, -4) *0.1}) --  ( {#1 +0.1}, {-4  + diff(#1, -4) *0.1});
+                      }
+                    \end{axis}
+                  \end{tikzpicture}
 
-                  \pgfplotsset{every axis/.append style={
-                    axis x line=none,    % put the x axis in the middle
-                    axis y line=none,    % put the y axis in the middle
-                  }}
                   \begin{table*}[ht]
                     \centering
-                    \begin{tabularx}{\textwidth}{rXXX}
+                    \begin{tabularx}{\textwidth}{|r|Y|Y|Y|}
                       \hline
-                      \rowcolor{shade2}
-                      & \centering\(\dfrac{d^2 y}{dx^2} > 0\)  & \centering \(\dfrac{d^2y}{dx^2}<0\) & \(\dfrac{d^2y}{dx^2}=0\) (inflection) \\
+                      \rowcolor{lblue}
+                      & \adjustbox{margin=0 1ex, valign=m}{\centering\(\dfrac{d^2 y}{dx^2} > 0\)}  & \adjustbox{margin=0 1ex, valign=m}{\centering \(\dfrac{d^2y}{dx^2}<0\)} & \adjustbox{margin=0 1ex, valign=m}{\(\dfrac{d^2y}{dx^2}=0\) (inflection)} \\
                       \hline
                       \(\dfrac{dy}{dx}>0\) &
-                      \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-3,  xmax=0.8, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(e^(x))};  \addplot[red] {x/2.5+0.75}; \end{axis}\end{tikzpicture} \\Rising (concave up)}&
-                        \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=0.1, xmax=4,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(ln(x))};  \addplot[red] {x/1.5-0.56}; \end{axis}\end{tikzpicture} \\Rising (concave down)}&
-                          \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-1.5,  xmax=1.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {x}; \end{axis}\end{tikzpicture} \\Rising inflection point}\\
+                      \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-3,  xmax=0.8, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(e^(x)};  \addplot[red] {x/2.5+0.75}; \end{axis}\end{tikzpicture} \\Rising (concave up)}&
+                        \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0.1, xmax=4,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(ln(x))};  \addplot[red] {x/1.5-0.56}; \end{axis}\end{tikzpicture} \\Rising (concave down)}&
+                          \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1.5,  xmax=1.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {x}; \end{axis}\end{tikzpicture} \\Rising inflection point}\\
                             \hline
                             \(\dfrac{dy}{dx}<0\) &
-                            \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-.5, xmax=1, ymin=-.5, ymax=.5, scale=0.2, samples=100] \addplot[blue] {(1/(x+1)-1}; \addplot[red] {-x}; \end{axis}\end{tikzpicture} \\Falling (concave up)}&
-                              \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=0,  xmax=1.5, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(2-x*x)^(1/2)};  \addplot[red] {-x+2}; \end{axis}\end{tikzpicture} \\Falling (concave down)}&
-                                \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=1.5,  xmax=4.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {-x+3.1415}; \end{axis}\end{tikzpicture} \\Falling inflection point}\\
+                            \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-.5, xmax=1, ymin=-.5, ymax=.5, scale=0.2, samples=100] \addplot[blue] {1/(x+1)-1}; \addplot[red] {-x}; \end{axis}\end{tikzpicture} \\Falling (concave up)}&
+                              \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=0,  xmax=1.5, scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(2-x*x)^(1/2)};  \addplot[red] {-x+2}; \end{axis}\end{tikzpicture} \\Falling (concave down)}&
+                                \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=1.5,  xmax=4.5,   scale=0.2, samples=100] \addplot[blue] {(sin((deg x)))}; \addplot[red] {-x+3.1415}; \end{axis}\end{tikzpicture} \\Falling inflection point}\\
                                   \hline
                                   \(\dfrac{dy}{dx}=0\)&
-                                  \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \\Local minimum}&                       \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x))}; \addplot[red, very thick] {0}; \end{axis}\end{tikzpicture} \\Local maximum}&
-                                    \makecell{\\\begin{tikzpicture}\begin{axis}[xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \(\>\) \begin{tikzpicture}\begin{axis}[xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x*x))}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture}  \\Stationary inflection point}\\
+                                  \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \\Local minimum}&                       \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x)}; \addplot[red, very thick] {0}; \end{axis}\end{tikzpicture} \\Local maximum}&
+                                    \makecell{\\\begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(x*x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture} \(\>\) \begin{tikzpicture}\begin{axis}[axis x line=none, axis y line=none, xmin=-1,  xmax=1,   scale=0.2, samples=50, unbounded coords=jump] \addplot[blue] {(-x*x*x)}; \addplot[red, thick] {0}; \end{axis}\end{tikzpicture}  \\Stationary inflection point}\\
                                       \hline
                     \end{tabularx}
                   \end{table*}
                   \begin{itemize}
                     \item
-                      if \(f^\prime (a) = 0\) and \(f^{\prime\prime}(a) > 0\), then point
-                      \((a, f(a))\) is a local min (curve is concave up)
+                      \(f^\prime (a) = 0, \> f^{\prime\prime}(a) > 0\) \\
+                      \textbf{local min} at \((a, f(a))\) (concave up)
                     \item
-                      if \(f^\prime (a) = 0\) and \(f^{\prime\prime} (a) < 0\), then point
-                      \((a, f(a))\) is local max (curve is concave down)
+                      \(f^\prime (a) = 0, \>  f^{\prime\prime} (a) < 0\) \\
+                      \textbf{local max} at \((a, f(a))\) (concave down)
                     \item
-                      if \(f^{\prime\prime}(a) = 0\), then point \((a, f(a))\) is a point of
-                      inflection
+                      \(f^{\prime\prime}(a) = 0\) \\
+                      \textbf{point of inflection} at \((a, f(a))\)
                     \item
-                      if also \(f^\prime(a)=0\), then it is a stationary point of inflection
+                      \(f^{\prime\prime}(a) = 0, \> f^\prime(a)=0\) \\
+                      stationary point of inflection at \((a, f(a)\)
                   \end{itemize}
 
                   \subsection*{Implicit Differentiation}
 
                   \[{\frac{dp}{dx}} = {\frac{dq}{dx}} \quad \text{and} \quad {\frac{dp}{dy}} = {\frac{dq}{dy}}\]
 
-                  \noindent \colorbox{cas}{\textbf{On CAS:}}\\
-                  Action \(\rightarrow\) Calculation \(\rightarrow\) \texttt{impDiff(y\^{}2+ax=5,\ x,\ y)}\\
-                  Returns \(y^\prime= \dots\).
-
-                  \subsection*{Integration}
+                  \begin{cas}
+                    Action \(\rightarrow\) Calculation \\
+                      \-\hspace{1em}\texttt{impDiff(y\^{}2+ax=5,\ x,\ y)}
+                  \end{cas}
 
-                  \[\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)\]
-
-                  \subsection*{Integral laws}
-
-                  \renewcommand{\arraystretch}{1.4}
-                  \begin{tabularx}{\columnwidth}{rX}
-                    \hline
-                    \(f(x)\) & \(\int f(x) \cdot dx\) \\
-                    \hline
-                    \(k\) (constant) & \(kx + c\)\\
-                    \(x^n\) & \(\dfrac{1}{n+1} x^{n+1}\) \\
-                    \(a x^{-n}\) &\(a \cdot \log_e |x| + c\)\\
-                    \(\dfrac{1}{ax+b}\) &\(\dfrac{1}{a} \log_e (ax+b) + c\)\\
-                    \((ax+b)^n\) & \(\dfrac{1}{a(n+1)}(ax+b)^{n-1} + c\>|\>n\ne 1\)\\
-                    \((ax+b)^{-1}\) & \(\dfrac{1}{a}\log_e |ax+b|+c\)\\
-                    \(e^{kx}\) & \(\dfrac{1}{k} e^{kx} + c\)\\
-                    \(e^k\) & \(e^kx + c\)\\
-                    \(\sin kx\) & \(\dfrac{-1}{k} \cos (kx) + c\)\\
-                    \(\cos kx\) & \(\dfrac{1}{k} \sin (kx) + c\)\\
-                    \(\sec^2 kx\) & \(\dfrac{1}{k} \tan(kx) + c\)\\
-                    \(\dfrac{1}{\sqrt{a^2-x^2}}\) & \(\sin^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
-                    \(\dfrac{-1}{\sqrt{a^2-x^2}}\) & \(\cos^{-1} \dfrac{x}{a} + c \>\vert\> a>0\)\\
-                    \(\frac{a}{a^2-x^2}\) & \(\tan^{-1} \frac{x}{a} + c\)\\
-                    \(\frac{f^\prime (x)}{f(x)}\) & \(\log_e f(x) + c\)\\
-                    \(\int f(u) \cdot \frac{du}{dx} \cdot dx\) & \(\int f(u) \cdot du\) (substitution)\\
-                    \(f(x) \cdot g(x)\) & \(\int [f^\prime(x) \cdot g(x)] dx + \int [g^\prime(x) f(x)] dx\)\\
-                    \hline
-                  \end{tabularx}
+                  \subsection*{Function of the dependent
+                  variable}
 
-                  Note \(\sin^{-1} {x \over a} + \cos^{-1} {x \over a}\) is constant \(\forall x \in (-a, a)\)
+                  If \({\frac{dy}{dx}}=g(y)\), then
+                  \(\frac{dx}{dy} = 1 \div \frac{dy}{dx} = \frac{1}{g(y)}\). Integrate both sides to solve equation. Only add \(c\) on one side. Express
+                  \(e^c\) as \(A\).
 
-                  \subsection*{Definite integrals}
+                  \subsection*{Reciprocal derivatives}
 
-                  \[\int_a^b f(x) \cdot dx = [F(x)]_a^b=F(b)-F(a)\]
+                  \[\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}\]
 
-                  \begin{itemize}
+                  \subsection*{Differentiating \(x=f(y)\)}
+                  Find \(\dfrac{dx}{dy}\), then \(\dfrac{dy}{dx} = \dfrac{1}{\left(\dfrac{dx}{dy}\right)}\)
 
-                    \item
-                      Signed area enclosed by\\
-                      \(\> y=f(x), \quad y=0, \quad x=a, \quad x=b\).
-                    \item
-                      \emph{Integrand} is \(f\).
-                  \end{itemize}
+                  \subsection*{Parametric equations}
 
-                  \subsubsection*{Properties}
 
-                  \[\int^b_a f(x) \> dx = \int^c_a f(x) \> dx + \int^b_c f(x) \> dx\]
+                  \begin{align*}
+                    \dfrac{dy}{dt} &= \dfrac{dy}{dx} \cdot \dfrac{dx}{dt} \\
+                    \therefore \dfrac{dy}{dx} &= \dfrac{\left(\dfrac{dy}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ provided } \dfrac{dx}{dt} \ne 0 \\
+                    \dfrac{d^2y}{dx^2} &= \dfrac{\left(\dfrac{dy^\prime}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ where } y^\prime = \dfrac{dy}{dx}
+                  \end{align*}
 
-                  \[\int^a_a f(x) \> dx = 0\]
+                \subsection*{Integration}
 
-                  \[\int^b_a k \cdot f(x) \> dx = k \int^b_a f(x) \> dx\]
+                \[\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)\]
 
-                  \[\int^b_a f(x) \pm g(x) \> dx = \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx\]
+                  \subsubsection*{Properties}
 
-                  \[\int^b_a f(x) \> dx = - \int^a_b f(x) \> dx\]
+                  \begin{align*}
+                    \int^b_a f(x) \> dx &= \int^c_a f(x) \> dx + \int^b_c f(x) \> dx \\
+                    \int^a_a f(x) \> dx &= 0 \\
+                    \int^b_a k \cdot f(x) \> dx &= k \int^b_a f(x) \> dx \\
+                    \int^b_a f(x) \pm g(x) \> dx &= \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx \\
+                    \int^b_a f(x) \> dx &= - \int^a_b f(x) \> dx \\
+                  \end{align*}
 
                   \subsection*{Integration by substitution}
 
                   \[\int f(u) {\frac{du}{dx}} \cdot dx = \int f(u) \cdot du\]
 
-                  \noindent Note \(f(u)\) must be 1:1 \(\implies\) one \(x\) for each \(y\)
+                  \begin{warning}
+                    \(\boldsymbol{f(u)}\) must be 1:1 \(\boldsymbol{\implies}\) one \(\boldsymbol{x}\) for each \(\boldsymbol{y}\)
+                  \end{warning}
                   \begin{align*}\text{e.g. for } y&=\int(2x+1)\sqrt{x+4} \cdot dx\\
                     \text{let } u&=x+4\\
                     \implies& {\frac{du}{dx}} = 1\\
                       \(\sin 2x = 2 \sin x \cos x\)
                   \end{itemize}
 
+                  \subsection*{Separation of variables}
+
+                  If \({\frac{dy}{dx}}=f(x)g(y)\), then:
+
+                  \[\int f(x) \> dx = \int \frac{1}{g(y)} \> dy\]
+
                   \subsection*{Partial fractions}
 
-                  \colorbox{cas}{On CAS:}\\
-                  \indent Action \(\rightarrow\) Transformation \(\rightarrow\)
-                  \texttt{expand/combine}\\
-                  \indent Interactive \(\rightarrow\) Transformation \(\rightarrow\)
-                  Expand \(\rightarrow\) Partial
+                  To factorise \(f(x) = \frac{\delta}{\alpha \cdot \beta}\):
+                  \begin{align*}
+                    \dfrac{\delta}{\alpha \cdot \beta \cdot \gamma} &= \dfrac{A}{\alpha} + \dfrac{B}{\beta} + \dfrac{C}{\gamma} \tag{1} \\
+                    \text{Multiply by } & (\alpha \cdot \beta \cdot \gamma) \text{:} \\
+                    \delta &= \beta\gamma A + \alpha\gamma B +\alpha\beta C \tag{2} \\
+                    \text{Substitute } x &= \{\alpha, \beta, \gamma\} \text{ into (2) to find denominators}
+                  \end{align*}
 
-                  \subsection*{Graphing integrals on CAS}
+                  \subsubsection*{Repeated linear factors}
 
-                  \colorbox{cas}{In main:} Interactive \(\rightarrow\) Calculation \(\rightarrow\)
-                  \(\int\) (\(\rightarrow\) Definite)\\
-                  Restrictions: \texttt{Define\ f(x)=..} then \texttt{f(x)\textbar{}x\textgreater{}..}
+                  \[ \dfrac{p(x)}{(x-a)^n} = \dfrac{A_1}{(x-a)} + \dfrac{A_2}{(x-a)^2} + \dots + \dfrac{A_n}{(x-a)^n} \]
 
-                  \subsection*{Applications of antidifferentiation}
+                  \subsubsection*{Irreducible quadratic factors}
 
-                  \begin{itemize}
+                  \[ \text{e.g. } \dfrac{3x-4}{(2x-3)(x^2+5)} = \dfrac{A}{2x-3} + \dfrac{Bx+C}{x^2+5} \]
 
-                    \item
-                      \(x\)-intercepts of \(y=f(x)\) identify \(x\)-coordinates of
-                      stationary points on \(y=F(x)\)
-                    \item
-                      nature of stationary points is determined by sign of \(y=f(x)\) on
-                      either side of its \(x\)-intercepts
-                    \item
-                      if \(f(x)\) is a polynomial of degree \(n\), then \(F(x)\) has degree
-                      \(n+1\)
-                  \end{itemize}
+                  \begin{cas}
+                    Action \(\rightarrow\) Transformation:\\
+                    \-\hspace{1em} \texttt{expand(..., x)}
 
-                  To find stationary points of a function, substitute \(x\) value of given
-                  point into derivative. Solve for \({\frac{dy}{dx}}=0\). Integrate to find
-                  original function.
+                    To reverse, use \texttt{combine(...)}
+                  \end{cas}
+
+                  \subsection*{Integrating \(\boldsymbol{\dfrac{dy}{dx} = g(y)}\)}
+
+                  \[ \text{if } \dfrac{dy}{dx} = g(y), \text{ then } x = \int{\dfrac{1}{g(y)}} \> dy \]
+
+                  \subsection*{Graphing integrals on CAS}
+
+                  \begin{cas}
+                    \textbf{In main:} Interactive \(\rightarrow\) Calculation \(\rightarrow\) \(\int\)\\
+                    For restrictions, \texttt{Define\ f(x)=...} then \texttt{f(x)\textbar{}x\textgreater{}...}
+                  \end{cas}
 
                   \subsection*{Solids of revolution}
 
                   Approximate as sum of infinitesimally-thick cylinders
 
-                  \subsubsection*{Rotation about \(x\)-axis}
+                  \subsubsection*{Rotation about \(\boldsymbol{x}\)-axis}
 
-                  \begin{align*}
-                    V &= \int^{x=b}_{x-a} \pi y^2 \> dx \\
-                    &= \pi \int^b_a (f(x))^2 \> dx
-                  \end{align*}
+                  \[ V = \pi\int^{x=b}_{x=a} f(x)^2 \> dx \]
 
-                  \subsubsection*{Rotation about \(y\)-axis}
+                  \subsubsection*{Rotation about \(\boldsymbol{y}\)-axis}
 
                   \begin{align*}
-                    V &= \int^{y=b}_{y=a} \pi x^2 \> dy \\
-                    &= \pi \int^b_a (f(y))^2 \> dy
+                    V &= \pi \int^{y=b}_{y=a} x^2 \> dy \\
+                    &= 2\pi \int^{x=b}_{x=a} x|f(x)| \> dx
                   \end{align*}
 
-                  \subsubsection*{Regions not bound by \(y=0\)}
+                  \subsubsection*{Rotating the area between two graphs}
 
-                  \[V = \pi \int^b_a f(x)^2 - g(x)^2 \> dx\]
+                  \[V = \pi \int^b_a \left( f(x)^2 - g(x)^2 \right) \> dx\]
                   \hfill where \(f(x) > g(x)\)
 
                   \subsection*{Length of a curve}
 
-                  \[L = \int^b_a \sqrt{1 + ({\frac{dy}{dx}})^2} \> dx \quad \text{(Cartesian)}\]
+                  For length of \(f(x)\) from \(x=a \rightarrow x=b\):
+                  \begin{align*}
+                    &\text{Cartesian} \> & L &= \int^b_a \sqrt{1 + \left(\dfrac{dy}{dx}\right)^2} \> dx \\
+                    &\text{Parametric} \> & L & = \int^b_a \sqrt{\left(\dfrac{dx}{dt}\right)^2 + \left(\dfrac{dy}{dt}\right)^2} \> dt
+                  \end{align*}
+
+                  \begin{cas}
+                    \begin{enumerate}[label=\alph*), leftmargin=5mm]
+                      \item Evaluate formula
+                      \item Interactive \(\rightarrow\) Calculation \(\rightarrow\) Line \(\rightarrow\) \texttt{arcLen}
+                    \end{enumerate}
+                  \end{cas}
+
+                  \subsection*{Applications of antidifferentiation}
+
+                  \begin{itemize}
 
-                  \[L = \int^b_a \sqrt{{\frac{dx}{dt}} + ({\frac{dy}{dt}})^2} \> dt \quad \text{(parametric)}\]
+                    \item
+                      \(x\)-intercepts of \(y=f(x)\) identify \(x\)-coordinates of
+                      stationary points on \(y=F(x)\)
+                    \item
+                      nature of stationary points is determined by sign of \(y=f(x)\) on
+                      either side of its \(x\)-intercepts
+                    \item
+                      if \(f(x)\) is a polynomial of degree \(n\), then \(F(x)\) has degree
+                      \(n+1\)
+                  \end{itemize}
 
-                  \noindent \colorbox{cas}{On CAS:}\\
-                  \indent Evaluate formula,\\
-                  \indent or Interactive \(\rightarrow\) Calculation
-                  \(\rightarrow\) Line \(\rightarrow\) \texttt{arcLen}
+                  To find stationary points of a function, substitute \(x\) value of given
+                  point into derivative. Solve for \({\frac{dy}{dx}}=0\). Integrate to find
+                  original function.
 
                   \subsection*{Rates}
 
 
                   \[f(x) = \frac{P(x)}{Q(x)} \quad \text{where } P, Q \text{ are polynomial functions}\]
 
-                  \subsubsection*{Addition of ordinates}
+                  \subsection*{Euler's method}
 
-                  \begin{itemize}
+                  \[\dfrac{f(x+h) - f(x)}{h} \approx f^\prime (x) \quad \text{for small } h\]
 
-                    \item
-                      when two graphs have the same ordinate, \(y\)-coordinate is double the
-                      ordinate
-                    \item
-                      when two graphs have opposite ordinates, \(y\)-coordinate is 0 i.e.
-                      (\(x\)-intercept)
-                    \item
-                      when one of the ordinates is 0, the resulting ordinate is equal to the
-                      other ordinate
-                  \end{itemize}
+                  \[\implies f(x+h) \approx f(x) + hf^\prime(x)\]
+
+                  \begin{theorembox}{}
+                    If \(\dfrac{dy}{dx} = g(x)\) with \(x_0 = a\) and \(y_0 = b\), then:
+                    \[\begin{cases}
+                      x_{n+1} = x_n + h \\
+                      y_{n+1} = y_n + hg(x_n)
+                    \end{cases}\]
+                  \end{theorembox}
+
+                  \[
+                    \dfrac{d^2y}{dx^2}
+                    \begin{cases}
+                      > 0 \implies \text{ underestimate (concave up)} \\
+                      < 0 \implies \text{ overestimate (concave down)}
+                    \end{cases}
+                  \]
+                  
+                  \begin{center}\begin{tikzpicture}
+                      \begin{axis}[xmin=0,  xmax=1.6, ticks=none, enlargelimits=true, samples=100]
+                        \addplot[blue, domain=-0.25:1.5, postaction={decorate,decoration={text along path, text align={align=center, left indent=3cm}, text={|\sffamily|solution curve}}}] {e^(x-3/2)+1/4};
+                        \addplot[red] {(x+1/2)*e^(-1)+1/4} (1.7,1.0593) node [above, black] {\(\ell\)};
+                        \addplot[mark=*, black] coordinates {(0.5,0.6179)} node[above left]{\((x_0, y_0)\)};
+                        \addplot[mark=*, orange] coordinates {(1.4,1.1548)} node[left]{\color{black} \sffamily correct solution};
+                        \addplot[mark=*, black] coordinates {(1.4,0.94897)} node[above right] {\((x_1,y_1)\)};
+                        \draw [gray, dashed] (0.5,0) -- (0.5,0.6179) -- (1.6,0.6179);
+                        \draw [gray, dashed] (1.4,0) -- (1.4, 1.1548);
+                        \draw [<->] (0.5,0.48) -- (1.4,0.48) node[midway, fill=white] {\(h\)};
+                        \draw [gray, dashed] (1.4,0.94897) -- (1.6,0.94897);
+                        \draw [<->] (1.5,0.94897) -- (1.5,0.6179) node[midway, rotate=90, below] {\(hg(x_0)\)};
+                      \end{axis}
+                  \end{tikzpicture}\end{center}
+
+                  \begin{cas}
+                    Menu \(\rightarrow\) Sequence \(\rightarrow\) Recursive
+
+                    \textbf{To generate \(\boldsymbol{x}\)-values:}
+                    \begin{itemize}
+                      \item Enter \(a_{n+1}=a_n + h\) where \(h\) is the step size \\
+                        (input \(a_n\) from menu bar)
+                      \item In \(a_0\), set the initial value \(x_0\) as a constant
+                    \end{itemize}
+
+                    \textbf{To generate \(\boldsymbol{y}\)-values:}
+                    \begin{itemize}
+                      \item In \(b_{n+1}\), enter \(\dfrac{dy}{dx}\), replacing \(x\) with \(a_n\)
+                      \item Set \(b_0 = y(x_0)\) as a constant
+                    \end{itemize}
+
+                    To view table of values, tap table icon (top left) \\
+                    To compare approximations with actual values, enter in \(c_{n+1} = a_{n+1} - f(a_{n+1})\) where \(f(x) = \int \dfrac{dy}{dx} \> dx\)
+
+                  \end{cas}
 
                   \subsection*{Fundamental theorem of calculus}
 
                   \textbf{Degree} - highest power of highest derivative\\
                   e.g. \({\left(\dfrac{dy^2}{d^2} x\right)}^3\) \qquad order 2, degree 3
 
-                  \subsubsection*{Verifying solutions}
+                  \begin{warning}
+                    To verify solutions, find \(\frac{dy}{dx}\) from \(y\) and substitute into original
+                  \end{warning}
+                  
+                  \vspace*{1cm}
+                  \hspace*{-1cm}
 
-                  Start with \(y=\dots\), and differentiate. Substitute into original
-                  equation.
+                  { \tabulinesep=1.2mm
+                  \begin{tabu}{|c|c|}
 
-                  \subsubsection*{Function of the dependent
-                  variable}
+                    \hline
+                    \taburowcolors 2{gray..white}
+                    \textbf{DE} & \textbf{Method} \\
+                    \hline
 
-                  If \({\frac{dy}{dx}}=g(y)\), then
-                  \(\frac{dx}{dy} = 1 \div \frac{dy}{dx} = \frac{1}{g(y)}\). Integrate both sides to solve equation. Only add \(c\) on one side. Express
-                  \(e^c\) as \(A\).
+                    \tabureset
+                    \(\dfrac{dy}{dx} = f(x)\)
+                    &
+                    {\(\begin{aligned}
+                      y &= \int f(x) \> dx \\
+                      &= F(x) + c \quad \text{where } F^\prime(x) = f(x)
+                    \end{aligned}\)} \\
 
+                    \hline
 
+                    \(\dfrac{d^2y}{dx^2} = f(x)\)
+                    &
+                    {\(\begin{aligned}
+                      \dfrac{dy}{dx} &= \int f(x) \> dx \\
+                      &= F(x) + c \quad \text{where } F^\prime(x) = f(x) \\
+                      \therefore y &= \iint f(x) \> dx = \int \left( F(x) + c \right) \> dx \\
+                      &= G(x) + cx + d \\
+                      & \text{where } G^\prime(x) = F(x)
+                    \end{aligned}\)} \\
 
-                  \subsubsection*{Mixing problems}
+                    \hline
 
-                  \[\left(\frac{dm}{dt}\right)_\Sigma = \left(\frac{dm}{dt}\right)_{\text{in}} - \left(\frac{dm}{dt}_{\text{out}}\right)\]
+                    \(\dfrac{dy}{dx} = g(y)\)
+                    &
+                    {\(\begin{aligned}
+                      \dfrac{dx}{dy} &= \dfrac{1}{g(y)} \\
+                      \therefore x &= \int \dfrac{1}{g(y)} \> dy \\
+                      &= F(y) + c \\ 
+                      & \text{where } F^\prime(y) = \dfrac{1}{g(y)}
+                    \end{aligned}\)} \\
 
-                  \subsubsection*{Separation of variables}
+                    \hline
 
-                  If \({\frac{dy}{dx}}=f(x)g(y)\), then:
+                    \(\dfrac{dy}{dx} = f(x) g(y)\)
+                    &
+                    {\(\begin{aligned}
+                      f(x) &= \dfrac{1}{g(y)} \cdot \dfrac{dy}{dx} \\
+                      \int f(x) \> dx &= \int \dfrac{1}{g(y)} \> dy
+                    \end{aligned}\)} \\
 
-                  \[\int f(x) \> dx = \int \frac{1}{g(y)} \> dy\]
+                    \hline
+                  \end{tabu}}
 
-                  \subsubsection*{Euler's method for solving DEs}
+                  \subsubsection*{Mixing problems}
 
-                  \[\frac{f(x+h) - f(x)}{h} \approx f^\prime (x) \quad \text{for small } h\]
+                  \[\left(\frac{dm}{dt}\right)_\Sigma = \left(\frac{dm}{dt}\right)_{\text{in}} - \left(\frac{dm}{dt}_{\text{out}}\right)\]
 
-                  \[\implies f(x+h) \approx f(x) + hf^\prime(x)\]
+                  \include{calculus-rules}
 
-              
     \section{Kinematics \& Mechanics}
 
       \subsection*{Constant acceleration}
-        {\centering \begin{tabular}{ l r }  % TODO need to fix centering here
-          \hline & no \\ \hline
-          $v=u+at$ & $x$ \\
-          $s = {1 \over 2}(v+u)t$ & $a$ \\
-          $s=ut+{1 \over 2}at^2$ & $v$ \\
-          $s=vt-{1 \over 2}at^2$ & $u$ \\
-          $v^2=u^2+2as$ & $t$ \\ \hline
-        \end{tabular}}
-
-      \[ v_{\text{avg}} = \frac{\Delta\text{position}}{\Delta t} \]
-      \begin{align*}
-        \text{speed} &= |{\text{velocity}}| \\
-        &= \sqrt{v_x^2 + v_y^2 + v_z^2}
-      \end{align*}
-      \textbf{Distance travelled between \(t=a \rightarrow t=b\):}
-      \[= \int^b_a \sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2} \cdot dt \]
-      
+
+      \begin{itemize}
+        \item \textbf{Position} - relative to origin
+        \item \textbf{Displacement} - relative to starting point
+      \end{itemize}
+
+      \subsubsection*{Velocity-time graphs}
+
+      \begin{description}[nosep, labelindent=0.5cm, leftmargin=0.5\columnwidth]
+        \item[Displacement:] \textit{signed} area
+        \item[Distance travelled:] \textit{total} area
+      \end{description}
+
+      \[ \text{acceleration} = \frac{d^2x}{dt^2} = \frac{dv}{dt} = v\frac{dv}{dx} = \frac{d}{dx}\left(\frac{1}{2}v^2\right) \]
+
+        \begin{center}
+          \renewcommand{\arraystretch}{1}
+          \begin{tabular}{ l r }
+            \hline & no \\ \hline
+            \(v=u+at\) & \(x\) \\
+            \(v^2 = u^2+2as\) & \(t\) \\
+            \(s = \frac{1}{2} (v+u)t\) & \(a\) \\
+            \(s = ut + \frac{1}{2} at^2\) & \(v\) \\
+            \(s = vt- \frac{1}{2} at^2\) & \(u\) \\ \hline
+          \end{tabular}
+        \end{center}
+
+        \[ v_{\text{avg}} = \frac{\Delta\text{position}}{\Delta t} \]
+        \begin{align*}
+          \text{speed} &= |{\text{velocity}}| \\
+          &= \sqrt{v_x^2 + v_y^2 + v_z^2}
+        \end{align*}
+
+        \noindent \textbf{Distance travelled between \(t=a \rightarrow t=b\):}
+        \begin{align*}
+          &= \int^{b}_{a}{\sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2}} \> dt \tag{2D} \\
+          &= \int^{t=b}_{t=a}{\dfrac{dx}{dt}} \> dt \tag{linear}
+        \end{align*}
+
+        \noindent \textbf{Shortest distance between \(\boldsymbol{r}(t_0)\) and \(\boldsymbol{r}(t_1)\):}
+        \[ = |\boldsymbol{r}(t_1) - \boldsymbol{r}(t_2)| \]
+
       \subsection*{Vector functions}
 
         \[ \boldsymbol{r}(t) = x \boldsymbol{i} + y \boldsymbol{j} + z \boldsymbol{k} \]
         Let \(\boldsymbol{r}(t)=x(t)\boldsymbol{i} + y(t)\boldsymbol(j)\). If both \(x(t)\) and \(y(t)\) are differentiable, then:
         \[ \boldsymbol{r}(t)=x(t)\boldsymbol{i}+y(t)\boldsymbol{j} \]
 
+      \subfile{dynamics}
+      \subfile{statistics}
   \end{multicols}
 \end{document}