spec / spec-collated.texon commit [spec] additions to complex graphs and exp identities (4de6207)
   1\documentclass[a4paper]{article}
   2\usepackage[dvipsnames, table]{xcolor}
   3\usepackage{adjustbox}
   4\usepackage{amsmath}
   5\usepackage{amssymb}
   6\usepackage{array}
   7\usepackage{blindtext}
   8\usepackage{dblfloatfix}
   9\usepackage{enumitem}
  10\usepackage{fancyhdr}
  11\usepackage[a4paper,margin=1.8cm]{geometry}
  12\usepackage{graphicx}
  13\usepackage{harpoon}
  14\usepackage{hhline}
  15\usepackage{import}
  16\usepackage{keystroke}
  17\usepackage{listings}
  18\usepackage{makecell}
  19\usepackage{mathtools}
  20\usepackage{mathtools}
  21\usepackage{multicol}
  22\usepackage{multirow}
  23\usepackage{pgfplots}
  24\usepackage{pst-plot}
  25\usepackage{rotating}
  26%\usepackage{showframe} % debugging only
  27\usepackage{subfiles}
  28\usepackage{tabularx}
  29\usepackage{tabu}
  30\usepackage{tcolorbox}
  31\usepackage{tikz-3dplot}
  32\usepackage{tikz}
  33\usepackage{tkz-fct}
  34\usepackage[obeyspaces]{url}
  35\usepackage{wrapfig}
  36
  37
  38\usetikzlibrary{%
  39  angles,
  40  arrows,
  41  arrows.meta,
  42  calc,
  43  datavisualization.formats.functions,
  44  decorations,
  45  decorations.markings,
  46  decorations.text,
  47  decorations.pathreplacing,
  48  decorations.text,
  49  scopes
  50}
  51
  52\newcommand\given[1][]{\:#1\vert\:}
  53\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
  54
  55\usepgflibrary{arrows.meta}
  56\pgfplotsset{compat=1.16}
  57\pgfplotsset{every axis/.append style={
  58  axis x line=middle,
  59  axis y line=middle,
  60  axis line style={->},
  61  xlabel={$x$},
  62  ylabel={$y$},
  63}}
  64
  65\psset{dimen=monkey,fillstyle=solid,opacity=.5}
  66\def\object{%
  67    \psframe[linestyle=none,fillcolor=blue](-2,-1)(2,1)
  68    \psaxes[linecolor=gray,labels=none,ticks=none]{->}(0,0)(-3,-3)(3,2)[$x$,0][$y$,90]
  69    \rput{*0}{%
  70        \psline{->}(0,-2)%
  71        \uput[-90]{*0}(0,-2){$\vec{w}$}}
  72}
  73
  74\pagestyle{fancy}
  75\fancypagestyle{plain}{\fancyhead[LO,LE]{} \fancyhead[CO,CE]{}} % rm title & author for first page
  76\fancyhead[LO,LE]{Year 12 Specialist}
  77\fancyhead[CO,CE]{Andrew Lorimer}
  78
  79\renewcommand\hphantom[1]{{\color[gray]{.6}#1}} % comment out!
  80\newcommand*\leftlap[3][\,]{#1\hphantom{#2}\mathllap{#3}}
  81\newcommand*\rightlap[2]{\mathrlap{#2}\hphantom{#1}}
  82\linespread{1.5}
  83\setlength{\parindent}{0pt}
  84\setlength\fboxsep{0pt} \setlength\fboxrule{.2pt} % for the \fboxes
  85
  86\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}%
  87\newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}%
  88\newcolumntype{Y}{>{\centering\arraybackslash}X}
  89
  90\definecolor{cas}{HTML}{cde1fd}
  91\definecolor{important}{HTML}{fc9871}
  92\definecolor{dark-gray}{gray}{0.2}
  93\definecolor{light-gray}{HTML}{cccccc}
  94\definecolor{peach}{HTML}{e6beb2}
  95\definecolor{lblue}{HTML}{e5e9f0}
  96
  97\newcommand{\tg}{\mathop{\mathrm{tg}}}
  98\newcommand{\cotg}{\mathop{\mathrm{cotg}}}
  99\newcommand{\arctg}{\mathop{\mathrm{arctg}}}
 100\newcommand{\arccotg}{\mathop{\mathrm{arccotg}}}
 101
 102\newtcolorbox{cas}{colframe=cas!75!black, fonttitle=\sffamily\bfseries, title=On CAS, left*=3mm}
 103\newtcolorbox{theorembox}[1]{colback=green!10!white, colframe=blue!20!white, coltitle=black, fontupper=\sffamily, fonttitle=\sffamily, #1}
 104\newtcolorbox{warning}{colback=white!90!black, leftrule=3mm, colframe=important, coltext=darkgray, fontupper=\sffamily\bfseries}
 105
 106\begin{document}
 107
 108\title{\vspace{-22mm}Year 12 Specialist\vspace{-4mm}}
 109\author{Andrew Lorimer}
 110\date{}
 111\maketitle
 112\vspace{-9mm}
 113\begin{multicols}{2}
 114
 115  \section{Complex numbers}
 116
 117  \[\mathbb{C}=\{a+bi:a,b\in\mathbb{R}\}\]
 118  \begin{align*}
 119    \text{Cartesian form: } & a+bi\\
 120    \text{Polar form: } & r\operatorname{cis}\theta
 121  \end{align*}
 122
 123  \subsection*{Operations}
 124
 125  \begin{tabularx}{\columnwidth}{|r|X|X|}
 126    \hline
 127    \rowcolor{cas}
 128    & \textbf{Cartesian} & \textbf{Polar} \\
 129    \hline
 130    \(z_1 \pm z_2\) & \((a \pm c)(b \pm d)i\) & convert to \(a+bi\)\\
 131    \hline
 132    \(+k \times z\) & \multirow{2}{*}{\(ka \pm kbi\)} & \(kr\operatorname{cis} \theta\)\\
 133    \cline{1-1}\cline{3-3}
 134    \(-k \times z\) & & \(kr \operatorname{cis}(\theta\pm \pi)\)\\
 135    \hline
 136    \(z_1 \cdot z_2\) & \(ac-bd+(ad+bc)i\) & \(r_1r_2 \operatorname{cis}(\theta_1 + \theta_2)\)\\
 137    \hline
 138    \(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)\) \\
 139    \hline
 140  \end{tabularx}
 141
 142  \subsubsection*{Scalar multiplication in polar form}
 143
 144  For \(k \in \mathbb{R}^+\):
 145  \[k\left(r \operatorname{cis}\theta\right)=kr \operatorname{cis}\theta\]
 146
 147  \noindent For \(k \in \mathbb{R}^-\):
 148  \[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)\]
 149
 150    \subsection*{Conjugate}
 151    \vspace{-7mm} \hfill  \colorbox{cas}{\texttt{conjg(a+bi)}}
 152    \begin{align*}
 153      \overline{z} &= a \mp bi\\
 154      &= r \operatorname{cis}(-\theta)
 155    \end{align*}
 156
 157    \subsubsection*{Properties}
 158
 159    \begin{align*}
 160      \overline{z_1 \pm z_2} &= \overline{z_1}\pm\overline{z_2}\\
 161      \overline{z_1 \cdot z_2} &= \overline{z_1}\cdot\overline{z_2}\\
 162      \overline{kz} &= k\overline{z} \> \forall \>  k \in \mathbb{R}\\
 163      z\overline{z} &= (a+bi)(a-bi)\\
 164      &= a^2 + b^2\\
 165      &= |z|^2
 166    \end{align*}
 167
 168    \subsection*{Modulus}
 169
 170    \[|z|=|\vec{Oz}|=\sqrt{a^2 + b^2}\]
 171
 172    \subsubsection*{Properties}
 173
 174    \begin{align*}
 175      |z_1z_2|&=|z_1||z_2|\\
 176      \left|\frac{z_1}{z_2}\right|&=\frac{|z_1|}{|z_2|}\\
 177      |z_1+z_2|&\le|z_1|+|z_2|
 178    \end{align*}
 179
 180    \subsection*{Multiplicative inverse}
 181
 182    \begin{align*}
 183      z^{-1}&=\frac{a-bi}{a^2+b^2}\\
 184      &=\frac{\overline{z}}{|z|^2}a\\
 185      &=r \operatorname{cis}(-\theta)
 186    \end{align*}
 187
 188    \subsection*{Dividing over \(\mathbb{C}\)}
 189
 190    \begin{align*}
 191      \frac{z_1}{z_2}&=z_1z_2^{-1}\\
 192      &=\frac{z_1\overline{z_2}}{|z_2|^2}\\
 193      &=\frac{(a+bi)(c-di)}{c^2+d^2}\\
 194      & \text{then rationalise denominator}
 195    \end{align*}
 196
 197    \subsection*{Polar form}
 198
 199    \[ r \operatorname{cis} \theta = r\left( \cos \theta + i \sin \theta \right) \]
 200
 201    \begin{itemize}
 202      \item{\(r=|z|=\sqrt{\operatorname{Re}(z)^2 + \operatorname{Im}(z)^2}\)}
 203      \item{\(\theta = \operatorname{arg}(z)\) \hfill \colorbox{cas}{\texttt{arg(a+bi)}}}
 204      \item{\(\operatorname{Arg}(z) \in (-\pi,\pi)\) \quad \bf{(principal argument)}}
 205      \item{Multiple representations:\\\(r\operatorname{cis}\theta=r\operatorname{cis}(\theta+2n\pi)\) with \(n \in \mathbb{Z}\) revolutions}
 206      \item{\(\operatorname{cis}\pi=-1,\qquad \operatorname{cis}0=1\)}
 207    \end{itemize}
 208
 209    \begin{cas}
 210      \-\hspace{1em}\verb|compToTrig(a+bi)| \(\iff\) \verb|cExpand{r·cisX}|
 211    \end{cas}
 212
 213    \subsection*{de Moivres' theorem}
 214
 215    \begin{theorembox}{}
 216      \[(r \operatorname{cis} \theta)^n = r^n \operatorname{cis}(n\theta) \text{ where } n \in \mathbb{Z}\]
 217    \end{theorembox}
 218
 219    \subsection*{Complex polynomials}
 220
 221    Include \(\pm\) for all solutions, incl. imaginary
 222
 223    \begin{tabularx}{\columnwidth}{ R{0.55} X  }
 224      \hline
 225      Sum of squares & \(\begin{aligned} 
 226        z^2 + a^2 &= z^2-(ai)^2\\
 227      &= (z+ai)(z-ai) \end{aligned}\) \\
 228      \hline
 229      Sum of cubes & \(a^3 \pm b^3 = (a \pm b)(a^2 \mp ab + b^2)\)\\
 230      \hline
 231      Division & \(P(z)=D(z)Q(z)+R(z)\) \\
 232      \hline
 233      Remainder theorem & Let \(\alpha \in \mathbb{C}\). Remainder of \(P(z) \div (z-\alpha)\) is \(P(\alpha)\)\\
 234      \hline
 235      Factor theorem & \(z-\alpha\) is a factor of \(P(z) \iff P(\alpha)=0\) for \(\alpha \in \mathbb{C}\)\\
 236      \hline
 237      Conjugate root theorem & \(P(z)=0 \text{ at } z=a\pm bi\) (\(\implies\) both \(z_1\) and \(\overline{z_1}\) are solutions)\\
 238      \hline
 239    \end{tabularx}
 240
 241    \begin{theorembox}{title=Factor theorem}
 242      If \(\beta z + \alpha\) is a factor of \(P(z)\), \\
 243      \-\hspace{1em}then \(P(-\dfrac{\alpha}{\beta})=0\).
 244    \end{theorembox}
 245
 246    \subsection*{\(n\)th roots}
 247
 248    \(n\)th roots of \(z=r\operatorname{cis}\theta\) are:
 249
 250    \[z = r^{\frac{1}{n}} \operatorname{cis}\left(\frac{\theta+2k\pi}{n}\right)\]
 251
 252    \begin{itemize}
 253
 254      \item{Same modulus for all solutions}
 255      \item{Arguments separated by \(\frac{2\pi}{n} \therefore\) there are \(n\) roots}
 256      \item{If one square root is \(a+bi\), the other is \(-a-bi\)}
 257      \item{Give one implicit \(n\)th root \(z_1\), function is \(z=z_1^n\)}
 258      \item{Solutions of \(z^n=a\) where \(a \in \mathbb{C}\) lie on the circle \(x^2+y^2=\left(|a|^{\frac{1}{n}}\right)^2\) \quad (intervals of \(\frac{2\pi}{n}\))}
 259    \end{itemize}
 260
 261    \noindent For \(0=az^2+bz+c\), use quadratic formula:
 262
 263    \[z=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\]
 264
 265    \subsection*{Fundamental theorem of algebra}
 266
 267    A polynomial of degree \(n\) can be factorised into \(n\) linear factors in \(\mathbb{C}\):
 268
 269    \[\implies P(z)=a_n(z-\alpha_1)(z-\alpha_2)(z-\alpha_3)\dots(z-\alpha_n)\]
 270    \[\text{ where } \alpha_1,\alpha_2,\alpha_3,\dots,\alpha_n \in \mathbb{C}\]
 271
 272    \subsection*{Argand planes}
 273
 274    \begin{center}\begin{tikzpicture}[scale=2]
 275      \draw [->] (-0.2,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
 276      \draw [->] (0,-0.2) -- (0,1.5) node [above] {$\operatorname{Im}(z)$};
 277      \coordinate (P) at (1,1);
 278      \coordinate (a) at (1,0);
 279      \coordinate (b) at (0,1);
 280      \coordinate (O) at (0,0);
 281      \draw (0,0) -- (P) node[pos=0.5, above left]{\(r\)} node[pos=1, right]{\(\begin{aligned}z&=a+bi\\&=r\operatorname{cis}\theta\end{aligned}\)};
 282        \draw [gray, dashed] (1,1) -- (1,0) node[black, pos=1, below]{\(a\)};
 283        \draw [gray, dashed] (1,1) -- (0,1) node[black, pos=1, left]{\(b\)};
 284        \begin{scope}
 285          \path[clip] (O) -- (P) -- (a);
 286          \fill[red, opacity=0.5, draw=black] (O) circle (2mm);
 287          \node at ($(O)+(20:3mm)$) {$\theta$};
 288        \end{scope}
 289        \filldraw (P) circle (0.5pt);
 290    \end{tikzpicture}\end{center}
 291
 292    \begin{itemize}
 293      \item{Multiplication by \(i \implies\) CCW rotation of \(\frac{\pi}{2}\)}
 294      \item{Addition: \(z_1 + z_2 \equiv\) \overrightharp{\(Oz_1\)} + \overrightharp{\(Oz_2\)}}
 295    \end{itemize}
 296
 297    \subsection*{Sketching complex graphs}
 298
 299    \subsubsection*{Rays/lines \qquad \(\operatorname{Arg}( z\pm b)=\theta\)}
 300
 301    \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
 302      \draw [->] (-0.75,0) -- (1.5,0) node [right]  {$\operatorname{Re}(z)$};
 303      \draw [->] (0,-1) -- (0,1) node [above] {$\operatorname{Im}(z)$};
 304      \draw [->, thick, brown] (-0.25,0) -- (-0.75,-1);
 305      \node [above, font=\footnotesize] at (-0.25,0) {\(\frac{1}{4}\)};
 306      \begin{scope}
 307        \path[clip] (-0.25,0) -- (-0.75,-1) -- (0,0);
 308        \fill[orange, opacity=0.5, draw=black] (-0.25,0) circle (2mm);
 309      \end{scope}
 310      \node at (-0.08,-0.3) {\(\frac{\pi}{8}\)};
 311      \node [font=\footnotesize, left] at (-0.75,-1) {\(\operatorname{Arg}(z+\frac{1}{4})=\frac{\pi}{8}\)};
 312      \node [brown, mydot] at (-0.25,0) {};
 313      \draw [<->, thick, green] (0,-1) -- (1.5,0.5) node [pos=0.25, black, font=\footnotesize, right] {\(|z-2|=|z-(1+i)|\)};
 314      \node [left, font=\footnotesize] at (0,-1) {\(-1\)};
 315      \node [below, font=\footnotesize] at (1,0) {\(1\)};
 316    \end{tikzpicture}\end{center}
 317
 318    \begin{itemize}
 319      \item \(\operatorname{Arg}(z \pm b) = \theta\) (ray)
 320      \item{\(\operatorname{Re}(z)=c\) or \(\operatorname{Im}(z)=c\) (perpendicular bisector)}
 321      \item{\(\operatorname{Im}(z)=m\operatorname{Re}(z)\)}
 322      \item \(|z - (a+bi)|=|z - (c+di)| \\ \implies \frac{2(c-a)x + a^2 + b^2 - c^2 - d^2}{2(b-d)}\)
 323      \item \(\operatorname{Re}(z) \pm \operatorname{Im}(z) = c\)
 324    \end{itemize}
 325
 326    \subsubsection*{Circles}
 327
 328    \begin{itemize}
 329      \item \(|z-z_1|^2=c^2|z_2+2|^2\)
 330      \item \(|z-(a+bi)|=c \implies (x-a)^2+_(y-b)^2=c^2\)
 331      \item \(z \overline{z} = r^2\)
 332    \end{itemize}
 333
 334    \subsubsection*{Regions \qquad \(\operatorname{Arg}(z) \lessgtr \theta\)}
 335
 336    \begin{center}\begin{tikzpicture}[scale=2,mydot/.style={circle, fill=white, draw, outer sep=0pt, inner sep=1.5pt}]
 337      \draw [->] (0,0) -- (1,0) node [right]  {$\operatorname{Re}(z)$};
 338      \draw [->] (0,-0.5) -- (0,1) node [above] {$\operatorname{Im}(z)$};
 339      \draw [<-, dashed, thick, blue] (-1,0) -- (0,0);
 340      \draw [->, thick, blue] (0,0) -- (1,1);
 341      \fill [gray, opacity=0.2, domain=-1:1, variable=\x] (-1,-0.5) -- (-1,0) -- (0, 0) -- (1,1) -- (1,-0.5) -- cycle;
 342      \begin{scope}
 343        \path[clip] (0,0) -- (1,1) -- (1,0);
 344        \fill[red, opacity=0.5, draw=black] (0,0) circle (2mm);
 345        \node at ($(0,0)+(20:3mm)$) {$\frac{\pi}{4}$};
 346      \end{scope}
 347      \node [font=\footnotesize] at (0.5,-0.25) {\(\operatorname{Arg}(z)\le\frac{\pi}{4}\)};
 348      \node [blue, mydot] {};
 349    \end{tikzpicture}\end{center}
 350
 351
 352    \section{Vectors}
 353    \begin{center}\begin{tikzpicture}
 354      \draw [->] (-0.5,0) -- (3,0) node [right]  {\(x\)};
 355      \draw [->] (0,-0.5) -- (0,3) node [above] {\(y\)};
 356      \draw [orange, ->, thick] (0.5,0.5) -- (2.5,2.5) node [pos=0.5, above] {\(\vec{u}\)};
 357      \begin{scope}[very thick, every node/.style={sloped,allow upside down}]
 358        \draw [gray, dashed, thick] (0.5,0.5) -- (2.5,0.5) node [pos=0.5] {\midarrow} node[black, pos=0.5, below]{\(x\vec{i}\)};
 359        \draw [gray, dashed, thick] (2.5,0.5) -- (2.5,2.5) node [pos=0.5] {\midarrow};
 360      \end{scope}
 361      \node[black, right] at (2.5,1.5) {\(y\vec{j}\)};
 362    \end{tikzpicture}\end{center}
 363
 364    \subsection*{Column notation}
 365
 366    \[\begin{bmatrix}x\\ y \end{bmatrix} \iff x\boldsymbol{i} + y\boldsymbol{j}\]
 367      \(\begin{bmatrix}x_2-x_1\\ y_2-y_1 \end{bmatrix}\) \quad between \(A(x_1,y_1), \> B(x_2,y_2)\)
 368
 369        \subsection*{Scalar multiplication}
 370
 371        \[k\cdot (x\boldsymbol{i}+y\boldsymbol{j})=kx\boldsymbol{i}+ky\boldsymbol{j}\]
 372
 373        \noindent For \(k \in \mathbb{R}^-\), direction is reversed
 374
 375        \subsection*{Vector addition}
 376        \begin{center}\begin{tikzpicture}[scale=1]
 377          \coordinate (A) at (0,0);
 378          \coordinate (B) at (2,2);
 379          \draw [->, thick, red] (0,0) -- (2,2) node [pos=0.5, below right] {\(\vec{u}=2\vec{i}+2\vec{j}\)};
 380          \draw [->, thick, blue] (2,2) -- (1,4) node [pos=0.5, above right] {\(\vec{v}=-\vec{i}+2\vec{j}\)};
 381          \draw [->, thick, orange] (0,0) -- (1,4) node [pos=0.5, left] {\(\vec{u}+\vec{v}=\vec{i}+4\vec{j}\)};
 382        \end{tikzpicture}\end{center}
 383
 384        \[(x\boldsymbol{i}+y\boldsymbol{j}) \pm (a\boldsymbol{i}+b\boldsymbol{j})=(x \pm a)\boldsymbol{i}+(y \pm b)\boldsymbol{j}\]
 385
 386        \begin{itemize}
 387          \item Draw each vector head to tail then join lines
 388          \item Addition is commutative (parallelogram)
 389          \item \(\boldsymbol{u}-\boldsymbol{v}=\boldsymbol{u}+(-\boldsymbol{v}) \implies \overrightharp{AB}=\boldsymbol{b}-\boldsymbol{a}\)
 390        \end{itemize}
 391
 392        \subsection*{Magnitude}
 393
 394        \[|(x\boldsymbol{i} + y\boldsymbol{j})|=\sqrt{x^2+y^2}\]
 395
 396        \subsection*{Parallel vectors}
 397
 398        \[\boldsymbol{u} || \boldsymbol{v} \iff \boldsymbol{u} = k \boldsymbol{v} \text{ where } k \in \mathbb{R} \setminus \{0\}\]
 399
 400        For parallel vectors \(\boldsymbol{a}\) and \(\boldsymbol{b}\):\\
 401        \[\boldsymbol{a \cdot b}=\begin{cases}
 402          |\boldsymbol{a}||\boldsymbol{b}| \hspace{2.8em} \text{if same direction}\\
 403          -|\boldsymbol{a}||\boldsymbol{b}| \hspace{2em} \text{if opposite directions}
 404        \end{cases}\]
 405        %\includegraphics[width=0.2,height=\textheight]{graphics/parallelogram-vectors.jpg}
 406        %\includegraphics[width=1]{graphics/vector-subtraction.jpg}
 407
 408        \subsection*{Perpendicular vectors}
 409
 410        \[\boldsymbol{a} \perp \boldsymbol{b} \iff \boldsymbol{a} \cdot \boldsymbol{b} = 0\ \quad \text{(since \(\cos 90 = 0\))}\]
 411
 412        \subsection*{Unit vector \(|\hat{\boldsymbol{a}}|=1\)}
 413        \[\begin{split}\hat{\boldsymbol{a}} & = {\frac{1}{|\boldsymbol{a}|}}\boldsymbol{a} \\ & = \boldsymbol{a} \cdot {|\boldsymbol{a}|}\end{split}\]
 414
 415          \subsection*{Scalar product \(\boldsymbol{a} \cdot \boldsymbol{b}\)}
 416
 417
 418          \begin{center}\begin{tikzpicture}[scale=2]
 419            \draw [->] (0,0) -- (1,0.5) node [pos=0.5, above left] {\(\boldsymbol{b}\)};
 420            \draw [->] (0,0) -- (1,0) node [pos=0.5, below] {\(\boldsymbol{a}\)};
 421            \begin{scope}
 422              \path[clip] (1,0.5) -- (1,0) -- (0,0);
 423              \fill[orange, opacity=0.5, draw=black] (0,0) circle (2mm);
 424              \node at ($(0,0)+(15:4mm)$) {\(\theta\)};
 425            \end{scope}
 426          \end{tikzpicture}\end{center}
 427          \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*}
 428            \noindent\colorbox{cas}{On CAS:} \texttt{dotP({[}a\ b\ c{]},\ {[}d\ e\ f{]})}
 429
 430            \subsubsection*{Properties}
 431
 432            \begin{enumerate}
 433              \item
 434                \(k(\boldsymbol{a\cdot b})=(k\boldsymbol{a})\cdot \boldsymbol{b}=\boldsymbol{a}\cdot (k\boldsymbol{b})\)
 435              \item
 436                \(\boldsymbol{a \cdot 0}=0\)
 437              \item
 438                \(\boldsymbol{a} \cdot (\boldsymbol{b} + \boldsymbol{c})=\boldsymbol{a} \cdot \boldsymbol{b} + \boldsymbol{a} \cdot \boldsymbol{c}\)
 439              \item
 440                \(\boldsymbol{i \cdot i} = \boldsymbol{j \cdot j} = \boldsymbol{k \cdot k}= 1\)
 441              \item
 442                \(\boldsymbol{a} \cdot \boldsymbol{b} = 0 \quad \implies \quad \boldsymbol{a} \perp \boldsymbol{b}\)
 443              \item
 444                \(\boldsymbol{a \cdot a} = |\boldsymbol{a}|^2 = a^2\)
 445            \end{enumerate}
 446
 447            \subsection*{Angle between vectors}
 448
 449            \[\cos \theta = \frac{\boldsymbol{a} \cdot \boldsymbol{b}}{|\boldsymbol{a}| |\boldsymbol{b}|} = \frac{a_1 b_1 + a_2 b_2}{|\boldsymbol{a}| |\boldsymbol{b}|}\]
 450
 451            \noindent \colorbox{cas}{On CAS:} \texttt{angle([a b c], [a b c])}
 452
 453            (Action \(\rightarrow\) Vector \(\rightarrow\)Angle)
 454
 455            \subsection*{Angle between vector and axis}
 456
 457            \noindent For\(\boldsymbol{a} = a_1 \boldsymbol{i} + a_2 \boldsymbol{j} + a_3 \boldsymbol{k}\)
 458            which makes angles \(\alpha, \beta, \gamma\) with positive side of
 459            \(x, y, z\) axes:
 460            \[\cos \alpha = \frac{a_1}{|\boldsymbol{a}|}, \quad \cos \beta = \frac{a_2}{|\boldsymbol{a}|}, \quad \cos \gamma = \frac{a_3}{|\boldsymbol{a}|}\]
 461
 462            \noindent \colorbox{cas}{On CAS:} \texttt{angle({[}a\ b\ c{]},\ {[}1\ 0\ 0{]})}\\for angle
 463            between \(a\boldsymbol{i} + b\boldsymbol{j} + c\boldsymbol{k}\) and
 464            \(x\)-axis
 465
 466            \subsection*{Projections \& resolutes}
 467
 468            \begin{tikzpicture}[scale=3]
 469              \draw [->, purple] (0,0) -- (1,0.5) node [pos=0.5, above left] {\(\boldsymbol{a}\)};
 470              \draw [->, orange] (0,0) -- (1,0) node [pos=0.5, below] {\(\boldsymbol{u}\)};
 471              \draw [->, blue] (1,0) -- (2,0) node [pos=0.5, below] {\(\boldsymbol{b}\)};
 472              \begin{scope}
 473                \path[clip] (1,0.5) -- (1,0) -- (0,0);
 474                \fill[orange, opacity=0.5, draw=black] (0,0) circle (2mm);
 475                \node at ($(0,0)+(15:4mm)$) {\(\theta\)};
 476              \end{scope}
 477              \begin{scope}[very thick, every node/.style={sloped,allow upside down}]
 478                \draw [gray, dashed, thick] (1,0) -- (1,0.5) node [pos=0.5] {\midarrow} node[black, pos=0.5, right, rotate=-90]{\(\boldsymbol{w}\)};
 479              \end{scope}
 480              \draw (0,0) coordinate (O)
 481              (1,0) coordinate (A)
 482              (1,0.5) coordinate (B)
 483              pic [draw,red,angle radius=2mm] {right angle = O--A--B};
 484            \end{tikzpicture}
 485
 486            \subsubsection*{\(\parallel\boldsymbol{b}\) (vector projection/resolute)}
 487
 488            \begin{align*}
 489              \boldsymbol{u} & = \frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{b}|^2}\boldsymbol{b} \\
 490              & = \left(\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{b}|}\right)\left(\frac{\boldsymbol{b}}{|\boldsymbol{b}|}\right) \\
 491              & = (\boldsymbol{a} \cdot \hat{\boldsymbol{b}})\hat{\boldsymbol{b}}
 492            \end{align*}
 493
 494            \subsubsection*{\(\perp\boldsymbol{b}\) (perpendicular projection)}
 495            \[\boldsymbol{w} = \boldsymbol{a} - \boldsymbol{u}\]
 496
 497            \subsubsection*{\(|\boldsymbol{u}|\) (scalar projection/resolute)}
 498            \begin{align*}
 499              s &= |\boldsymbol{u}|\\
 500              &= \boldsymbol{a} \cdot \hat{\boldsymbol{b}}\\
 501              &=\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{|\boldsymbol{b}|}\\
 502              &= |\boldsymbol{a}| \cos \theta
 503            \end{align*}
 504
 505            \subsubsection*{Rectangular (\(\parallel,\perp\)) components}
 506
 507            \[\boldsymbol{a}=\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{\boldsymbol{b}\cdot\boldsymbol{b}}\boldsymbol{b}+\left(\boldsymbol{a}-\frac{\boldsymbol{a}\cdot\boldsymbol{b}}{\boldsymbol{b}\cdot\boldsymbol{b}}\boldsymbol{b}\right)\]
 508
 509
 510            \subsection*{Vector proofs}
 511
 512            \textbf{Concurrent:} intersection of \(\ge\) 3 lines
 513
 514            \begin{tikzpicture}
 515              \draw [blue] (0,0) -- (1,1);
 516              \draw [red] (1,0) -- (0,1);
 517              \draw [brown] (0.4,0) -- (0.6,1);
 518              \filldraw (0.5,0.5) circle (2pt);
 519            \end{tikzpicture}
 520
 521            \subsubsection*{Collinear points}
 522
 523            \(\ge\) 3 points lie on the same line
 524
 525            \begin{tikzpicture}
 526              \draw [purple] (0,0) -- (4,1);
 527              \filldraw (2,0.5) circle (2pt) node [above] {\(C\)};
 528              \filldraw (1,0.25) circle (2pt) node [above] {\(A\)};
 529              \filldraw (3,0.75) circle (2pt) node [above] {\(B\)};
 530              \coordinate (O) at (2.8,-0.2);
 531              \node at (O) [below] {\(O\)}; 
 532              \begin{scope}[->, orange, thick] 
 533                \draw (O) -- (2,0.5) node [pos=0.5, above, font=\footnotesize, black] {\(\boldsymbol{c}\)};
 534                \draw (O) -- (1,0.25) node [pos=0.5, below, font=\footnotesize, black] {\(\boldsymbol{a}\)};
 535                \draw (O) -- (3,0.75) node [pos=0.5, right, font=\footnotesize, black] {\(\boldsymbol{b}\)};
 536              \end{scope}
 537            \end{tikzpicture}
 538
 539            \begin{align*}
 540              \text{e.g. Prove that}\\
 541              \overrightharp{AC}=m\overrightharp{AB} \iff \boldsymbol{c}&=(1-m)\boldsymbol{a}+m\boldsymbol{b}\\
 542              \implies \boldsymbol{c} &= \overrightharp{OA} + \overrightharp{AC}\\
 543              &= \overrightharp{OA} + m\overrightharp{AB}\\
 544              &=\boldsymbol{a}+m(\boldsymbol{b}-\boldsymbol{a})\\
 545              &=\boldsymbol{a}+m\boldsymbol{b}-m\boldsymbol{a}\\
 546              &=(1-m)\boldsymbol{a}+m{b}
 547            \end{align*}
 548            \begin{align*}
 549              \text{Also, } \implies \overrightharp{OC} &= \lambda \vec{OA} + \mu \overrightharp{OB} \\
 550              \text{where } \lambda + \mu &= 1\\
 551              \text{If } C \text{ lies along } \overrightharp{AB}, & \implies 0 < \mu < 1
 552            \end{align*}
 553
 554
 555            \subsubsection*{Parallelograms}
 556
 557            \begin{center}\begin{tikzpicture}
 558              \coordinate (O) at (0,0) node [below left] {\(O\)};
 559              \coordinate (A) at (4,0);
 560              \coordinate (B) at (6,2);
 561              \coordinate (C) at (2,2);
 562              \coordinate (D) at (6,0);
 563
 564              \draw[postaction={decorate}, decoration={markings, mark=at position 0.6 with {\arrow{>>}}}] (O)--(A) node [below left] {\(A\)};
 565              \draw[postaction={decorate}, decoration={markings,mark=at position 0.5 with {\arrow{>}}}] (A)--(B) node [above right] {\(B\)};
 566              \draw[postaction={decorate}, decoration={markings, mark=at position 0.6 with {\arrow{>>}}}] (B)--(C) node [above left] {\(C\)};
 567              \draw[postaction={decorate}, decoration={markings,mark=at position 0.5 with {\arrow{>}}}] (C)--(O);
 568
 569              \draw [gray, dashed] (O) -- (B) node [pos=0.75] {\(\diagdown\diagdown\)} node [pos=0.25] {\(\diagdown\diagdown\)};
 570              \draw [gray, dashed] (A) -- (C) node [pos=0.75] {\(\diagup\)} node [pos=0.25] {\(\diagup\)};
 571              \begin{scope}
 572                \path[clip] (C) -- (A) -- (O);
 573                \fill[orange, opacity=0.5, draw=black] (0,0) circle (4mm);
 574                \node at ($(0,0)+(20:8mm)$) {\(\theta\)};
 575              \end{scope}
 576              \draw [gray, thick, dotted] (B) -- (D) node [pos=0.5, right, black, font=\footnotesize] {\(|\boldsymbol{c}|\sin\theta\)} (A) -- (D) node [pos=0.5, below, black, font=\footnotesize] {\(|\boldsymbol{c}|\cos\theta\)};
 577              \draw pic [draw,thick,red,angle radius=2mm] {right angle=O--D--B};
 578            \end{tikzpicture}\end{center}
 579
 580            \begin{itemize}
 581              \item
 582                Diagonals \(\overrightharp{OB}, \overrightharp{AC}\) bisect each other
 583              \item
 584                If diagonals are equal length, it is a rectangle
 585              \item
 586                \(|\overrightharp{OB}|^2 + |\overrightharp{CA}|^2 = |\overrightharp{OA}|^2 + |\overrightharp{AB}|^2 + |\overrightharp{CB}|^2 + |\overrightharp{OC}|^2\)
 587              \item
 588                Area \(=\boldsymbol{c} \cdot \boldsymbol{a}\)
 589            \end{itemize}
 590
 591            \subsubsection*{Perpendicular bisectors of a triangle}
 592
 593\hspace{-1.5cm}\begin{tikzpicture}
 594  [
 595    scale=3,
 596    >=stealth,
 597    point/.style = {draw, circle,  fill = black, inner sep = 1pt},
 598    dot/.style   = {draw, circle,  fill = black, inner sep = .2pt},
 599    thick
 600  ]
 601
 602  \node at (-1,1) [text width=5cm, rounded corners, fill=lblue, inner sep=1ex]
 603    {
 604      \sffamily The three bisectors meet at the circumcenter \(Z\) where \(|\overrightharp{ZA}| = |\overrightharp{ZB}| = |\overrightharp{ZC}|\).
 605    };
 606
 607  % the circle
 608  \def\rad{1}
 609  \node (origin) at (0,0) [point, label = {right: {\(Z\)}}]{};
 610  \draw [thin] (origin) circle (\rad);
 611
 612  % triangle nodes: just points on the circle
 613  \node (n1) at +(60:\rad) [point, label = above:\(A\)] {};
 614  \node (n2) at +(-145:\rad) [point, label = below:\(B\)] {};
 615  \node (n3) at +(-45:\rad) [point, label = {below right:\(C\)}] {};
 616
 617  % triangle edges: connect the vertices, and leave a node at the midpoint
 618  \draw[orange] (n3) -- node (a) [label = {above right:\(D\)}] {} (n1);
 619  \draw[blue] (n3) -- node (b) [label = {below right:\(F\)}] {} (n2);
 620  \draw[red] (n1) -- node (c) [label = {left: \(E\)}] {} (n2);
 621
 622  % Bisectors
 623  % start at the point lying on the line from (origin) to (a), at
 624  % twice that distance, and then draw a path going to the point on
 625  % the line lying on the line from (a) to the (origin), at 3 times
 626  % that distance.
 627  \draw[orange, dotted]
 628    ($ (origin) ! 2 ! (a) $)
 629    node [right] {\sffamily Bisector \(AC\)}
 630    -- ($(a) ! 3 ! (origin)$ );
 631
 632  % similarly for origin and b
 633  \draw[blue, dotted]
 634    ($ (origin) ! 2 ! (b) $)
 635    -- ($(b) ! 3 ! (origin)$ )
 636    node [right] {\sffamily Bisector \(BC\)};
 637
 638  \draw[red, dotted]
 639    ($ (origin) ! 5 ! (c) $)
 640    -- ($(c) ! 7 ! (origin)$ )
 641    node [right] {\sffamily Bisector \(AB\)};
 642
 643  \draw[gray, dashed, thin] (n1) -- (origin) -- (n2);
 644  \draw[gray, dashed, thin] (origin) -- (n3);
 645
 646  % Right angle symbols
 647  \def\ralen{.5ex}  % length of the short segment
 648  \foreach \inter/\first/\last in {a/n3/origin, b/n2/origin, c/n2/origin}
 649    {
 650      \draw [thin] let \p1 = ($(\inter)!\ralen!(\first)$), % point along first path
 651                \p2 = ($(\inter)!\ralen!(\last)$),  % point along second path
 652                \p3 = ($(\p1)+(\p2)-(\inter)$)      % corner point
 653            in
 654              (\p1) -- (\p3) -- (\p2);              % path
 655    }
 656\end{tikzpicture}
 657
 658            \begin{theorembox}{title=Perpendicular bisector theorem}
 659              If a point \(P\) lies on the perpendicular bisector of line \(\overrightharp{XY}\), then \(P\) is equidistant from the endpoints of the bisected segment
 660              \[ \text{i.e. } |\overrightharp{PX}| = |\overrightharp{PY}| \]
 661            \end{theorembox}
 662
 663            \subsubsection*{Useful vector properties}
 664
 665            \begin{itemize}
 666              \item
 667                \(\boldsymbol{a} \parallel \boldsymbol{b} \implies \boldsymbol{b}=k\boldsymbol{a}\) for some
 668                \(k \in \mathbb{R} \setminus \{0\}\)
 669              \item
 670                If \(\boldsymbol{a}\) and \(\boldsymbol{b}\) are parallel with at
 671                least one point in common, then they lie on the same straight line
 672              \item
 673                \(\boldsymbol{a} \perp \boldsymbol{b} \iff \boldsymbol{a} \cdot \boldsymbol{b}=0\)
 674              \item
 675                \(\boldsymbol{a} \cdot \boldsymbol{a} = |\boldsymbol{a}|^2\)
 676            \end{itemize}
 677
 678            \subsection*{Linear dependence}
 679
 680            \(\boldsymbol{a}, \boldsymbol{b}, \boldsymbol{c}\) are linearly dependent if they are \(\nparallel\) and:
 681            \begin{align*}
 682              0&=k\boldsymbol{a}+l\boldsymbol{b}+m\boldsymbol{c}\\
 683              \therefore \boldsymbol{c} &= m\boldsymbol{a} + n\boldsymbol{b} \quad \text{(simultaneous)}
 684            \end{align*}
 685
 686            \noindent \(\boldsymbol{a}, \boldsymbol{b},\) and \(\boldsymbol{c}\) are linearly
 687            independent if no vector in the set is expressible as a linear
 688            combination of other vectors in set, or if they are parallel.
 689
 690            \subsection*{Three-dimensional vectors}
 691
 692            Right-hand rule for axes: \(z\) is up or out of page.
 693
 694            \tdplotsetmaincoords{60}{120} 
 695            \begin{center}\begin{tikzpicture} [scale=3, tdplot_main_coords, axis/.style={->,thick}, 
 696              vector/.style={-stealth,red,very thick}, 
 697              vector guide/.style={dashed,gray,thick}]
 698
 699              %standard tikz coordinate definition using x, y, z coords
 700              \coordinate (O) at (0,0,0);
 701
 702              %tikz-3dplot coordinate definition using x, y, z coords
 703
 704              \pgfmathsetmacro{\ax}{1}
 705              \pgfmathsetmacro{\ay}{1}
 706              \pgfmathsetmacro{\az}{1}
 707
 708              \coordinate (P) at (\ax,\ay,\az);
 709
 710              %draw axes
 711              \draw[axis] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};
 712              \draw[axis] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};
 713              \draw[axis] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};
 714
 715              %draw a vector from O to P
 716              \draw[vector] (O) -- (P);
 717
 718              %draw guide lines to components
 719              \draw[vector guide]         (O) -- (\ax,\ay,0);
 720              \draw[vector guide] (\ax,\ay,0) -- (P);
 721              \draw[vector guide]         (P) -- (0,0,\az);
 722              \draw[vector guide] (\ax,\ay,0) -- (0,\ay,0);
 723              \draw[vector guide] (\ax,\ay,0) -- (0,\ay,0);
 724              \draw[vector guide] (\ax,\ay,0) -- (\ax,0,0);
 725              \node[tdplot_main_coords,above right]
 726              at (\ax,\ay,\az){(\ax, \ay, \az)};
 727            \end{tikzpicture}\end{center}
 728
 729            \subsection*{Parametric vectors}
 730
 731            Parametric equation of line through point \((x_0, y_0, z_0)\) and
 732            parallel to \(a\boldsymbol{i} + b\boldsymbol{j} + c\boldsymbol{k}\) is:
 733
 734            \[\begin{cases}x = x_o + a \cdot t \\ y = y_0 + b \cdot t \\ z = z_0 + c \cdot t\end{cases}\]
 735
 736              \section{Circular functions}
 737
 738              \(\sin(bx)\) or \(\cos(bx)\): period \(=\frac{2\pi}{b}\)
 739
 740              \noindent \(\tan(nx)\): period \(=\frac{\pi}{n}\)\\
 741              \indent\indent\indent asymptotes at \(x=\frac{(2k+1)\pi}{2n} \> \vert \> k \in \mathbb{Z}\)
 742
 743              \subsection*{Reciprocal functions}
 744
 745              \subsubsection*{Cosecant}
 746
 747              \[\operatorname{cosec} \theta = \frac{1}{\sin \theta} \> \vert \> \sin \theta \ne 0\]
 748
 749              \begin{itemize}
 750                \item
 751                  \textbf{Domain} \(= \mathbb{R} \setminus {n\pi : n \in \mathbb{Z}}\)
 752                \item
 753                  \textbf{Range} \(= \mathbb{R} \setminus (-1, 1)\)
 754                \item
 755                  \textbf{Turning points} at
 756                  \(\theta = \frac{(2n + 1)\pi}{2} \> \vert \> n \in \mathbb{Z}\)
 757                \item
 758                  \textbf{Asymptotes} at \(\theta = n\pi \> \vert \> n \in \mathbb{Z}\)
 759              \end{itemize}
 760
 761              \subsubsection*{Secant}
 762
 763\begin{tikzpicture}
 764  \begin{axis}[ytick={-1,1}, yticklabels={\(-1\), \(1\)}, xmin=-7,xmax=7,ymin=-3,ymax=3,enlargelimits=true, xtick={-6.2830, -3.1415, 3.1415, 6.2830},xticklabels={\(-2\pi\), \(-\pi\), \(\pi\), \(2\pi\)}]
 765%    \addplot[blue, domain=-6.2830:6.2830,unbounded coords=jump,samples=80] {sec(deg(x))};
 766    \addplot[blue, restrict y to domain=-10:10, domain=-7:7,samples=100] {sec(deg(x))} node [pos=0.93, black, right] {\(\operatorname{sec} x\)};
 767    \addplot[red, dashed, domain=-7:7,samples=100] {cos(deg(x))};
 768    \draw [gray, dotted, thick] ({axis cs:1.5708,0}|-{rel axis cs:0,0}) -- ({axis cs:1.5708,0}|-{rel axis cs:0,1});
 769    \draw [gray, dotted, thick] ({axis cs:4.71239,0}|-{rel axis cs:0,0}) -- ({axis cs:4.71239,0}|-{rel axis cs:0,1});
 770    \draw [gray, dotted, thick] ({axis cs:-4.71239,0}|-{rel axis cs:0,0}) -- ({axis cs:-4.71239,0}|-{rel axis cs:0,1});
 771    \draw [gray, dotted, thick] ({axis cs:-1.5708,0}|-{rel axis cs:0,0}) -- ({axis cs:-1.5708,0}|-{rel axis cs:0,1});
 772\end{axis}
 773    \node [black] at (7,3.5) {\(\cos x\)};
 774\end{tikzpicture}
 775
 776                \[\operatorname{sec} \theta = \frac{1}{\cos \theta} \> \vert \> \cos \theta \ne 0\]
 777
 778                \begin{itemize}
 779
 780                  \item
 781                    \textbf{Domain}
 782                    \(= \mathbb{R} \setminus \frac{(2n + 1) \pi}{2} : n \in \mathbb{Z}\}\)
 783                  \item
 784                    \textbf{Range} \(= \mathbb{R} \setminus (-1, 1)\)
 785                  \item
 786                    \textbf{Turning points} at
 787                    \(\theta = n\pi \> \vert \> n \in \mathbb{Z}\)
 788                  \item
 789                    \textbf{Asymptotes} at
 790                    \(\theta = \frac{(2n + 1) \pi}{2} \> \vert \> n \in \mathbb{Z}\)
 791                \end{itemize}
 792
 793                \subsubsection*{Cotangent}
 794
 795\begin{tikzpicture}
 796  \begin{axis}[xmin=-3,xmax=3,ymin=-1.5,ymax=1.5,enlargelimits=true, xtick={-3.1415, -1.5708, 1.5708, 3.1415},xticklabels={\(-\pi\), \(-\frac{\pi}{2}\), \(\frac{\pi}{2}\), \(\pi\)}]
 797    \addplot[blue, smooth, domain=-3:-0.1,unbounded coords=jump,samples=105] {cot(deg(x))} node [pos=0.3, left] {\(\operatorname{cot} x\)};
 798\addplot[blue, smooth, domain=0.1:3,unbounded coords=jump,samples=105] {cot(deg(x))};
 799\addplot[red, smooth, dashed] gnuplot [domain=-1.5:1.5,unbounded coords=jump,samples=105] {tan(x)};
 800\addplot[red, smooth, dashed] gnuplot [domain=-3.5:-1.8,unbounded coords=jump,samples=105] {tan(x)} node [pos=0.5, right] {\(\tan x\)};
 801\addplot[red, smooth, dashed] gnuplot [domain=1.8:3.5,unbounded coords=jump,samples=105] {tan(x)};
 802    \draw [thick, red, dotted] ({axis cs:-1.5708,0}|-{rel axis cs:0,0}) -- ({axis cs:-1.5708,0}|-{rel axis cs:0,1});
 803    \draw [thick, blue, dotted] ({axis cs:-3.1415,0}|-{rel axis cs:0,0}) -- ({axis cs:-3.1415,0}|-{rel axis cs:0,1});
 804    \draw [thick, blue, dotted] ({axis cs:0,0}|-{rel axis cs:0,0}) -- ({axis cs:0,0}|-{rel axis cs:0,1});
 805    \draw [thick, blue, dotted] ({axis cs:3.1415,0}|-{rel axis cs:0,0}) -- ({axis cs:3.1415,0}|-{rel axis cs:0,1});
 806    \draw [thick, red, dotted] ({axis cs:1.5708,0}|-{rel axis cs:0,0}) -- ({axis cs:1.5708,0}|-{rel axis cs:0,1});
 807\end{axis}
 808\end{tikzpicture}
 809
 810                  \[\operatorname{cot} \theta = {{\cos \theta} \over {\sin \theta}} \> \vert \> \sin \theta \ne 0\]
 811
 812                  \begin{itemize}
 813
 814                    \item
 815                      \textbf{Domain} \(= \mathbb{R} \setminus \{n \pi: n \in \mathbb{Z}\}\)
 816                    \item
 817                      \textbf{Range} \(= \mathbb{R}\)
 818                    \item
 819                      \textbf{Asymptotes} at \(\theta = n\pi \> \vert \> n \in \mathbb{Z}\)
 820                  \end{itemize}
 821
 822                  \subsubsection*{Symmetry properties}
 823
 824                  \[\begin{split}
 825                    \operatorname{sec} (\pi \pm x) & = -\operatorname{sec} x \\
 826                    \operatorname{sec} (-x) & = \operatorname{sec} x \\
 827                    \operatorname{cosec} (\pi \pm x) & = \mp \operatorname{cosec} x \\
 828                    \operatorname{cosec} (-x) & = - \operatorname{cosec} x \\
 829                    \operatorname{cot} (\pi \pm x) & = \pm \operatorname{cot} x \\
 830                    \operatorname{cot} (-x) & = - \operatorname{cot} x
 831                  \end{split}\]
 832
 833                  \subsubsection*{Complementary properties}
 834
 835                  \[\begin{split}
 836                    \operatorname{sec} \left({\pi \over 2} - x\right) & = \operatorname{cosec} x \\
 837                    \operatorname{cosec} \left({\pi \over 2} - x\right) & = \operatorname{sec} x \\
 838                    \operatorname{cot} \left({\pi \over 2} - x\right) & = \tan x \\
 839                    \tan \left({\pi \over 2} - x\right) & = \operatorname{cot} x
 840                  \end{split}\]
 841
 842                  \subsubsection*{Pythagorean identities}
 843
 844                  \[\begin{split}
 845                    1 + \operatorname{cot}^2 x & = \operatorname{cosec}^2 x, \quad \text{where } \sin x \ne 0 \\
 846                    1 + \tan^2 x & = \operatorname{sec}^2 x, \quad \text{where } \cos x \ne 0
 847                  \end{split}\]
 848
 849                  \subsection*{Compound angle formulas}
 850
 851                  \[\cos(x \pm y) = \cos x + \cos y \mp \sin x \sin y\]
 852                  \[\sin(x \pm y) = \sin x \cos y \pm \cos x \sin y\]
 853                  \[\tan(x \pm y) = {{\tan x \pm \tan y} \over {1 \mp \tan x \tan y}}\]
 854
 855                  \subsection*{Double angle formulas}
 856
 857                  \[\begin{split}
 858                    \cos 2x &= \cos^2 x - \sin^2 x \\
 859                    & = 1 - 2\sin^2 x \\
 860                    & = 2 \cos^2 x -1
 861                  \end{split}\]
 862
 863                  \[\sin 2x = 2 \sin x \cos x\]
 864
 865                  \[\tan 2x = {{2 \tan x} \over {1 - \tan^2 x}}\]
 866
 867                  \subsection*{Inverse circular functions}
 868
 869                  \begin{tikzpicture}
 870                    \begin{axis}[ymin=-2, ymax=4, xmin=-1.1, xmax=1.1, ytick={-1.5708, 1.5708, 3.14159},yticklabels={$-\frac{\pi}{2}$, $\frac{\pi}{2}$, $\pi$}]
 871                      \addplot[color=red, smooth] gnuplot [domain=-2:2,unbounded coords=jump,samples=500] {asin(x)} node [pos=0.25, below right] {\(\sin^{-1}x\)};
 872                      \addplot[color=blue, smooth] gnuplot [domain=-2:2,unbounded coords=jump,samples=500] {acos(x)} node [pos=0.25, below left] {\(\cos^{-1}x\)};
 873                      \addplot[mark=*, red] coordinates {(-1,-1.5708)} node[right, font=\footnotesize]{\((-1,-\frac{\pi}{2})\)} ;
 874                      \addplot[mark=*, red] coordinates {(1,1.5708)} node[left, font=\footnotesize]{\((1,\frac{\pi}{2})\)} ;
 875                      \addplot[mark=*, blue] coordinates {(1,0)};
 876                      \addplot[mark=*, blue] coordinates {(-1,3.1415)} node[right, font=\footnotesize]{\((-1,\pi)\)} ;
 877                    \end{axis}
 878                  \end{tikzpicture}\\
 879
 880                  Inverse functions: \(f(f^{-1}(x)) = x\) (restrict domain)
 881
 882                  \[\sin^{-1}: [-1, 1] \rightarrow \mathbb{R}, \quad \sin^{-1} x = y\]
 883                  \hfill where \(\sin y = x, \> y \in [{-\pi \over 2}, {\pi \over 2}]\)
 884
 885                  \[\cos^{-1}: [-1,1] \rightarrow \mathbb{R}, \quad \cos^{-1} x = y\]
 886                  \hfill where \(\cos y = x, \> y \in [0, \pi]\)
 887
 888                  \[\tan^{-1}: \mathbb{R} \rightarrow \mathbb{R}, \quad \tan^{-1} x = y\]
 889                  \hfill where \(\tan y = x, \> y \in \left(-{\pi \over 2}, {\pi \over 2}\right)\)
 890
 891                  \begin{tikzpicture}
 892                    \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}\)}]
 893                      \addplot[color=orange, smooth] gnuplot [domain=-35:35, unbounded coords=jump,samples=350] {atan(x)} node [pos=0.5, above left] {\(\tan^{-1}x\)};
 894                      \addplot[gray, dotted, thick, domain=-35:35] {1.5708} node [black, font=\footnotesize, below right, pos=0] {\(y=\frac{\pi}{2}\)};
 895                      \addplot[gray, dotted, thick, domain=-35:35] {-1.5708} node [black, font=\footnotesize, above left, pos=1] {\(y=-\frac{\pi}{2}\)};
 896                    \end{axis}
 897                  \end{tikzpicture}
 898
 899                  \subsection*{Mensuration}
 900
 901                  \begin{tikzpicture}[draw=blue!70,thick]
 902                    \filldraw[fill=lblue] circle (2cm);
 903                    \filldraw[fill=white] 
 904                    (320:2cm) node[right] {} 
 905                    -- (220:2cm) node[left] {} 
 906                    arc[start angle=220, end angle=320, radius=2cm] 
 907                    -- cycle;
 908                    \node {Major Segment};
 909                    \node at (-90:1.5) {Minor Segment};
 910
 911                    \begin{scope}[xshift=4.5cm]
 912                      \draw [fill=lblue] circle (2cm);
 913                      \filldraw[fill=white] 
 914                      (320:2cm) node[right] {}
 915                      -- (0,0) node[above] {}
 916                      -- (220:2cm) node[left] {} 
 917                      arc[start angle=220, end angle=320, radius=2cm]
 918                      -- cycle;
 919                      \node at (90:1cm) {Major Sector};
 920                      \node at (-90:1.5) {Minor Sector};
 921                    \end{scope}
 922                  \end{tikzpicture}
 923
 924
 925                  \begin{align*}
 926                    \textbf{Sectors: } A &= \pi r^2 \dfrac{\theta}{2\pi} \\
 927                    &= \dfrac{r^2 \theta}{2}
 928                  \end{align*}
 929
 930                  \[ \textbf{Segments: } A = \dfrac{r^2}{2} \left(\theta - \sin \theta \right) \]
 931
 932                  \begin{align*}
 933                    \textbf{Chords: } \operatorname{crd} \theta &= \sqrt{(1 - \cos\theta)^2 + \sin^2 \theta} \\
 934                    &= \sqrt{2 - 2\cos\theta} \\
 935                    &= 2 \sin \left(\dfrac{\theta}{2}\right)
 936                  \end{align*}
 937
 938                  \section{Differential calculus}
 939
 940                  \[f^\prime(x) = \lim_{\delta x \rightarrow 0}{\delta y \over \delta x}={\frac{dy}{dx}}\]
 941
 942                  \subsection*{Limits}
 943
 944                  \[\lim_{x \rightarrow a}f(x)\]
 945                  \(L^-,\quad L^+\) \qquad limit from below/above\\
 946                  \(\lim_{x \to a} f(x)\) \quad limit of a point\\
 947
 948                  \noindent For solving \(x\rightarrow\infty\), put all \(x\) terms in denominators\\
 949                  e.g. \[\lim_{x \rightarrow \infty}{{2x+3} \over {x-2}}={{2+{3 \over x}} \over {1-{2 \over x}}}={2 \over 1} = 2\]
 950
 951                  \subsubsection*{Limit theorems}
 952
 953                  \begin{enumerate}
 954                    \item
 955                      For constant function \(f(x)=k\), \(\lim_{x \rightarrow a} f(x) = k\)
 956                    \item
 957                      \(\lim_{x \rightarrow a} (f(x) \pm g(x)) = F \pm G\)
 958                    \item
 959                      \(\lim_{x \rightarrow a} (f(x) \times g(x)) = F \times G\)
 960                    \item
 961                      \(\therefore \lim_{x \rightarrow a} c \times f(x)=cF\) where \(c=\) constant
 962                    \item
 963                      \({\lim_{x \rightarrow a} {f(x) \over g(x)}} = {F \over G}, G \ne 0\)
 964                    \item
 965                      \(f(x)\) is continuous \(\iff L^-=L^+=f(x) \> \forall x\)
 966                  \end{enumerate}
 967
 968                  \subsection*{Gradients}
 969
 970                  \textbf{Secant (chord)} - line joining two points on curve\\
 971                  \textbf{Tangent} - line that intersects curve at one point
 972
 973                  \subsubsection*{Points of Inflection}
 974
 975                  \emph{Stationary point} - i.e.
 976                  \(f^\prime(x)=0\)\\
 977                  \emph{Point of inflection} - max \(|\)gradient\(|\) (i.e.
 978                  \(f^{\prime\prime} = 0\))
 979
 980                  \subsubsection*{Strictly increasing/decreasing}
 981
 982                  For \(x_2\) and \(x_1\) where \(x_2 > x_1\):
 983
 984                  \textbf{strictly increasing}\\
 985                  \-\hspace{1em}where \(f(x_2) > f(x_1)\) or \(f^\prime(x)>0\)
 986
 987                  \textbf{strictly decreasing}\\
 988                  \hspace{1em}where \(f(x_2) < f(x_1)\) or \(f^\prime(x)<0\)
 989                  \begin{warning}
 990                    Endpoints are included, even where \(\boldsymbol{\frac{dy}{dx}=0}\)
 991                  \end{warning}
 992
 993
 994                  \subsection*{Second derivative}
 995                  \begin{align*}f(x) \longrightarrow &f^\prime (x) \longrightarrow f^{\prime\prime}(x)\\
 996                  \implies y \longrightarrow &\frac{dy}{dx} \longrightarrow \frac{d^2 y}{dx^2}\end{align*}
 997
 998                  \noindent Order of polynomial \(n\)th derivative decrements each time the derivative is taken
 999
1000
1001                  \subsection*{Slope fields}
1002
1003                  \begin{tikzpicture}[declare function={diff(\x,\y) = \x+\y;}]
1004                    \begin{axis}[axis equal, ymin=-4, ymax=4, xmin=-4, xmax=4, ticks=none, enlargelimits=true, ]
1005                      \addplot[thick, orange, domain=-4:2] {e^(x)-x-1};
1006                      \pgfplotsinvokeforeach{-4,...,4}{%
1007                        \draw[gray] ( {#1 -0.1}, {4 - diff(#1, 4) *0.1}) --  ( {#1 +0.1}, {4  + diff(#1, 4) *0.1});
1008                        \draw[gray] ( {#1 -0.1}, {3 - diff(#1, 3) *0.1}) --  ( {#1 +0.1}, {3  + diff(#1, 3) *0.1});
1009                        \draw[gray] ( {#1 -0.1}, {2 - diff(#1, 2) *0.1}) --  ( {#1 +0.1}, {2  + diff(#1, 2) *0.1});
1010                        \draw[gray] ( {#1 -0.1}, {1 - diff(#1, 1) *0.1}) --  ( {#1 +0.1}, {1  + diff(#1, 1) *0.1});
1011                        \draw[gray] ( {#1 -0.1}, {0 - diff(#1, 0) *0.1}) --  ( {#1 +0.1}, {0  + diff(#1, 0) *0.1});
1012                        \draw[gray] ( {#1 -0.1}, {-1 - diff(#1, -1) *0.1}) --  ( {#1 +0.1}, {-1  + diff(#1, -1) *0.1});
1013                        \draw[gray] ( {#1 -0.1}, {-2 - diff(#1, -2) *0.1}) --  ( {#1 +0.1}, {-2  + diff(#1, -2) *0.1});
1014                        \draw[gray] ( {#1 -0.1}, {-3 - diff(#1, -3) *0.1}) --  ( {#1 +0.1}, {-3  + diff(#1, -3) *0.1});
1015                        \draw[gray] ( {#1 -0.1}, {-4 - diff(#1, -4) *0.1}) --  ( {#1 +0.1}, {-4  + diff(#1, -4) *0.1});
1016                      }
1017                    \end{axis}
1018                  \end{tikzpicture}
1019
1020                  \begin{table*}[ht]
1021                    \centering
1022                    \begin{tabularx}{\textwidth}{|r|Y|Y|Y|}
1023                      \hline
1024                      \rowcolor{lblue}
1025                      & \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)} \\
1026                      \hline
1027                      \(\dfrac{dy}{dx}>0\) &
1028                      \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)}&
1029                        \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)}&
1030                          \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}\\
1031                            \hline
1032                            \(\dfrac{dy}{dx}<0\) &
1033                            \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)}&
1034                              \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)}&
1035                                \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}\\
1036                                  \hline
1037                                  \(\dfrac{dy}{dx}=0\)&
1038                                  \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}&
1039                                    \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}\\
1040                                      \hline
1041                    \end{tabularx}
1042                  \end{table*}
1043                  \begin{itemize}
1044                    \item
1045                      \(f^\prime (a) = 0, \> f^{\prime\prime}(a) > 0\) \\
1046                      \textbf{local min} at \((a, f(a))\) (concave up)
1047                    \item
1048                      \(f^\prime (a) = 0, \>  f^{\prime\prime} (a) < 0\) \\
1049                      \textbf{local max} at \((a, f(a))\) (concave down)
1050                    \item
1051                      \(f^{\prime\prime}(a) = 0\) \\
1052                      \textbf{point of inflection} at \((a, f(a))\)
1053                    \item
1054                      \(f^{\prime\prime}(a) = 0, \> f^\prime(a)=0\) \\
1055                      stationary point of inflection at \((a, f(a)\)
1056                  \end{itemize}
1057
1058                  \subsection*{Implicit Differentiation}
1059
1060                  \noindent Used for differentiating circles etc.
1061
1062                  If \(p\) and \(q\) are expressions in \(x\) and \(y\) such that \(p=q\),
1063                  for all \(x\) and \(y\), then:
1064
1065                  \[{\frac{dp}{dx}} = {\frac{dq}{dx}} \quad \text{and} \quad {\frac{dp}{dy}} = {\frac{dq}{dy}}\]
1066
1067                  \begin{cas}
1068                    Action \(\rightarrow\) Calculation \\
1069                      \-\hspace{1em}\texttt{impDiff(y\^{}2+ax=5,\ x,\ y)}
1070                  \end{cas}
1071
1072                  \subsection*{Function of the dependent
1073                  variable}
1074
1075                  If \({\frac{dy}{dx}}=g(y)\), then
1076                  \(\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
1077                  \(e^c\) as \(A\).
1078
1079                  \subsection*{Reciprocal derivatives}
1080
1081                  \[\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}\]
1082
1083                  \subsection*{Differentiating \(x=f(y)\)}
1084                  Find \(\dfrac{dx}{dy}\), then \(\dfrac{dy}{dx} = \dfrac{1}{\left(\dfrac{dx}{dy}\right)}\)
1085
1086                  \subsection*{Parametric equations}
1087
1088
1089                  \begin{align*}
1090                    \dfrac{dy}{dt} &= \dfrac{dy}{dx} \cdot \dfrac{dx}{dt} \\
1091                    \therefore \dfrac{dy}{dx} &= \dfrac{\left(\dfrac{dy}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ provided } \dfrac{dx}{dt} \ne 0 \\
1092                    \dfrac{d^2y}{dx^2} &= \dfrac{\left(\dfrac{dy^\prime}{dt}\right)}{\left(\dfrac{dx}{dt}\right)} \text{ where } y^\prime = \dfrac{dy}{dx}
1093                  \end{align*}
1094
1095                \subsection*{Integration}
1096
1097                \[\int f(x) \cdot dx = F(x) + c \quad \text{where } F^\prime(x) = f(x)\]
1098
1099                  \subsubsection*{Properties}
1100
1101                  \begin{align*}
1102                    \int^b_a f(x) \> dx &= \int^c_a f(x) \> dx + \int^b_c f(x) \> dx \\
1103                    \int^a_a f(x) \> dx &= 0 \\
1104                    \int^b_a k \cdot f(x) \> dx &= k \int^b_a f(x) \> dx \\
1105                    \int^b_a f(x) \pm g(x) \> dx &= \int^b_a f(x) \> dx \pm \int^b_a g(x) \> dx \\
1106                    \int^b_a f(x) \> dx &= - \int^a_b f(x) \> dx \\
1107                  \end{align*}
1108
1109                  \subsection*{Integration by substitution}
1110
1111                  \[\int f(u) {\frac{du}{dx}} \cdot dx = \int f(u) \cdot du\]
1112
1113                  \begin{warning}
1114                    \(\boldsymbol{f(u)}\) must be 1:1 \(\boldsymbol{\implies}\) one \(\boldsymbol{x}\) for each \(\boldsymbol{y}\)
1115                  \end{warning}
1116                  \begin{align*}\text{e.g. for } y&=\int(2x+1)\sqrt{x+4} \cdot dx\\
1117                    \text{let } u&=x+4\\
1118                    \implies& {\frac{du}{dx}} = 1\\
1119                    \implies& x = u - 4\\
1120                    \text{then } &y=\int (2(u-4)+1)u^{\frac{1}{2}} \cdot du\\
1121                    &\text{(solve as  normal integral)}
1122                  \end{align*}
1123
1124                  \subsubsection*{Definite integrals by substitution}
1125
1126                  For \(\int^b_a f(x) {\frac{du}{dx}} \cdot dx\), evaluate new \(a\) and
1127                  \(b\) for \(f(u) \cdot du\).
1128
1129                  \subsubsection*{Trigonometric integration}
1130
1131                  \[\sin^m x \cos^n x \cdot dx\]
1132
1133                  \paragraph{\textbf{\(m\) is odd:}}
1134                  \(m=2k+1\) where \(k \in \mathbb{Z}\)\\
1135                  \(\implies \sin^{2k+1} x = (\sin^2 z)^k \sin x = (1 - \cos^2 x)^k \sin x\)\\
1136                  Substitute \(u=\cos x\)
1137
1138                  \paragraph{\textbf{\(n\) is odd:}}
1139                  \(n=2k+1\) where \(k \in \mathbb{Z}\)\\
1140                  \(\implies \cos^{2k+1} x = (\cos^2 x)^k \cos x = (1-\sin^2 x)^k \cos x\)\\
1141                  Substitute \(u=\sin x\)
1142
1143                  \paragraph{\textbf{\(m\) and \(n\) are even:}}
1144                  use identities...
1145
1146                  \begin{itemize}
1147
1148                    \item
1149                      \(\sin^2x={1 \over 2}(1-\cos 2x)\)
1150                    \item
1151                      \(\cos^2x={1 \over 2}(1+\cos 2x)\)
1152                    \item
1153                      \(\sin 2x = 2 \sin x \cos x\)
1154                  \end{itemize}
1155
1156                  \subsection*{Separation of variables}
1157
1158                  If \({\frac{dy}{dx}}=f(x)g(y)\), then:
1159
1160                  \[\int f(x) \> dx = \int \frac{1}{g(y)} \> dy\]
1161
1162                  \subsection*{Partial fractions}
1163
1164                  To factorise \(f(x) = \frac{\delta}{\alpha \cdot \beta}\):
1165                  \begin{align*}
1166                    \dfrac{\delta}{\alpha \cdot \beta \cdot \gamma} &= \dfrac{A}{\alpha} + \dfrac{B}{\beta} + \dfrac{C}{\gamma} \tag{1} \\
1167                    \text{Multiply by } & (\alpha \cdot \beta \cdot \gamma) \text{:} \\
1168                    \delta &= \beta\gamma A + \alpha\gamma B +\alpha\beta C \tag{2} \\
1169                    \text{Substitute } x &= \{\alpha, \beta, \gamma\} \text{ into (2) to find denominators}
1170                  \end{align*}
1171
1172                  \subsubsection*{Repeated linear factors}
1173
1174                  \[ \dfrac{p(x)}{(x-a)^n} = \dfrac{A_1}{(x-a)} + \dfrac{A_2}{(x-a)^2} + \dots + \dfrac{A_n}{(x-a)^n} \]
1175
1176                  \subsubsection*{Irreducible quadratic factors}
1177
1178                  \[ \text{e.g. } \dfrac{3x-4}{(2x-3)(x^2+5)} = \dfrac{A}{2x-3} + \dfrac{Bx+C}{x^2+5} \]
1179
1180                  \begin{cas}
1181                    Action \(\rightarrow\) Transformation:\\
1182                    \-\hspace{1em} \texttt{expand(..., x)}
1183
1184                    To reverse, use \texttt{combine(...)}
1185                  \end{cas}
1186
1187                  \subsection*{Integrating \(\boldsymbol{\dfrac{dy}{dx} = g(y)}\)}
1188
1189                  \[ \text{if } \dfrac{dy}{dx} = g(y), \text{ then } x = \int{\dfrac{1}{g(y)}} \> dy \]
1190
1191                  \subsection*{Graphing integrals on CAS}
1192
1193                  \begin{cas}
1194                    \textbf{In main:} Interactive \(\rightarrow\) Calculation \(\rightarrow\) \(\int\)\\
1195                    For restrictions, \texttt{Define\ f(x)=...} then \texttt{f(x)\textbar{}x\textgreater{}...}
1196                  \end{cas}
1197
1198                  \subsection*{Solids of revolution}
1199
1200                  Approximate as sum of infinitesimally-thick cylinders
1201
1202                  \subsubsection*{Rotation about \(\boldsymbol{x}\)-axis}
1203
1204                  \[ V = \pi\int^{x=b}_{x=a} f(x)^2 \> dx \]
1205
1206                  \subsubsection*{Rotation about \(\boldsymbol{y}\)-axis}
1207
1208                  \begin{align*}
1209                    V &= \pi \int^{y=b}_{y=a} x^2 \> dy \\
1210                    &= 2\pi \int^{x=b}_{x=a} x|f(x)| \> dx
1211                  \end{align*}
1212
1213                  \subsubsection*{Rotating the area between two graphs}
1214
1215                  \[V = \pi \int^b_a \left( f(x)^2 - g(x)^2 \right) \> dx\]
1216                  \hfill where \(f(x) > g(x)\)
1217
1218                  \subsection*{Length of a curve}
1219
1220                  For length of \(f(x)\) from \(x=a \rightarrow x=b\):
1221                  \begin{align*}
1222                    &\text{Cartesian} \> & L &= \int^b_a \sqrt{1 + \left(\dfrac{dy}{dx}\right)^2} \> dx \\
1223                    &\text{Parametric} \> & L & = \int^b_a \sqrt{\left(\dfrac{dx}{dt}\right)^2 + \left(\dfrac{dy}{dt}\right)^2} \> dt
1224                  \end{align*}
1225
1226                  \begin{cas}
1227                    \begin{enumerate}[label=\alph*), leftmargin=5mm]
1228                      \item Evaluate formula
1229                      \item Interactive \(\rightarrow\) Calculation \(\rightarrow\) Line \(\rightarrow\) \texttt{arcLen}
1230                    \end{enumerate}
1231                  \end{cas}
1232
1233                  \subsection*{Applications of antidifferentiation}
1234
1235                  \begin{itemize}
1236
1237                    \item
1238                      \(x\)-intercepts of \(y=f(x)\) identify \(x\)-coordinates of
1239                      stationary points on \(y=F(x)\)
1240                    \item
1241                      nature of stationary points is determined by sign of \(y=f(x)\) on
1242                      either side of its \(x\)-intercepts
1243                    \item
1244                      if \(f(x)\) is a polynomial of degree \(n\), then \(F(x)\) has degree
1245                      \(n+1\)
1246                  \end{itemize}
1247
1248                  To find stationary points of a function, substitute \(x\) value of given
1249                  point into derivative. Solve for \({\frac{dy}{dx}}=0\). Integrate to find
1250                  original function.
1251
1252                  \subsection*{Rates}
1253
1254                  \subsubsection*{Gradient at a point on parametric curve}
1255
1256                  \[{\frac{dy}{dx}} = {{\frac{dy}{dt}} \div {\frac{dx}{dt}}} \> \vert \> {\frac{dx}{dt}} \ne 0 \text{ (chain rule)}\]
1257
1258                  \[\frac{d^2}{dx^2} = \frac{d(y^\prime)}{dx} = {\frac{dy^\prime}{dt} \div {\frac{dx}{dt}}} \> \vert \> y^\prime = {\frac{dy}{dx}}\]
1259
1260                  \subsection*{Rational functions}
1261
1262                  \[f(x) = \frac{P(x)}{Q(x)} \quad \text{where } P, Q \text{ are polynomial functions}\]
1263
1264                  \subsection*{Euler's method}
1265
1266                  \[\dfrac{f(x+h) - f(x)}{h} \approx f^\prime (x) \quad \text{for small } h\]
1267
1268                  \[\implies f(x+h) \approx f(x) + hf^\prime(x)\]
1269
1270                  \begin{theorembox}{}
1271                    If \(\dfrac{dy}{dx} = g(x)\) with \(x_0 = a\) and \(y_0 = b\), then:
1272                    \[\begin{cases}
1273                      x_{n+1} = x_n + h \\
1274                      y_{n+1} = y_n + hg(x_n)
1275                    \end{cases}\]
1276                  \end{theorembox}
1277
1278                  \[
1279                    \dfrac{d^2y}{dx^2}
1280                    \begin{cases}
1281                      > 0 \implies \text{ underestimate (concave up)} \\
1282                      < 0 \implies \text{ overestimate (concave down)}
1283                    \end{cases}
1284                  \]
1285                  
1286                  \begin{center}\begin{tikzpicture}
1287                      \begin{axis}[xmin=0,  xmax=1.6, ticks=none, enlargelimits=true, samples=100]
1288                        \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};
1289                        \addplot[red] {(x+1/2)*e^(-1)+1/4} (1.7,1.0593) node [above, black] {\(\ell\)};
1290                        \addplot[mark=*, black] coordinates {(0.5,0.6179)} node[above left]{\((x_0, y_0)\)};
1291                        \addplot[mark=*, orange] coordinates {(1.4,1.1548)} node[left]{\color{black} \sffamily correct solution};
1292                        \addplot[mark=*, black] coordinates {(1.4,0.94897)} node[above right] {\((x_1,y_1)\)};
1293                        \draw [gray, dashed] (0.5,0) -- (0.5,0.6179) -- (1.6,0.6179);
1294                        \draw [gray, dashed] (1.4,0) -- (1.4, 1.1548);
1295                        \draw [<->] (0.5,0.48) -- (1.4,0.48) node[midway, fill=white] {\(h\)};
1296                        \draw [gray, dashed] (1.4,0.94897) -- (1.6,0.94897);
1297                        \draw [<->] (1.5,0.94897) -- (1.5,0.6179) node[midway, rotate=90, below] {\(hg(x_0)\)};
1298                      \end{axis}
1299                  \end{tikzpicture}\end{center}
1300
1301                  \begin{cas}
1302                    Menu \(\rightarrow\) Sequence \(\rightarrow\) Recursive
1303
1304                    \textbf{To generate \(\boldsymbol{x}\)-values:}
1305                    \begin{itemize}
1306                      \item Enter \(a_{n+1}=a_n + h\) where \(h\) is the step size \\
1307                        (input \(a_n\) from menu bar)
1308                      \item In \(a_0\), set the initial value \(x_0\) as a constant
1309                    \end{itemize}
1310
1311                    \textbf{To generate \(\boldsymbol{y}\)-values:}
1312                    \begin{itemize}
1313                      \item In \(b_{n+1}\), enter \(\dfrac{dy}{dx}\), replacing \(x\) with \(a_n\)
1314                      \item Set \(b_0 = y(x_0)\) as a constant
1315                    \end{itemize}
1316
1317                    To view table of values, tap table icon (top left) \\
1318                    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\)
1319
1320                  \end{cas}
1321
1322                  \subsection*{Fundamental theorem of calculus}
1323
1324                  If \(f\) is continuous on \([a, b]\), then
1325
1326                  \[\int^b_a f(x) \> dx = F(b) - F(a)\]
1327                  \hfill where \(F = \int f \> dx\)
1328                  
1329                  \subsection*{Differential equations}
1330
1331                  \noindent\textbf{Order} - highest power inside derivative\\
1332                  \textbf{Degree} - highest power of highest derivative\\
1333                  e.g. \({\left(\dfrac{dy^2}{d^2} x\right)}^3\) \qquad order 2, degree 3
1334
1335                  \begin{warning}
1336                    To verify solutions, find \(\frac{dy}{dx}\) from \(y\) and substitute into original
1337                  \end{warning}
1338                  
1339                  \vspace*{1cm}
1340                  \hspace*{-1cm}
1341
1342                  { \tabulinesep=1.2mm
1343                  \begin{tabu}{|c|c|}
1344
1345                    \hline
1346                    \taburowcolors 2{gray..white}
1347                    \textbf{DE} & \textbf{Method} \\
1348                    \hline
1349
1350                    \tabureset
1351                    \(\dfrac{dy}{dx} = f(x)\)
1352                    &
1353                    {\(\begin{aligned}
1354                      y &= \int f(x) \> dx \\
1355                      &= F(x) + c \quad \text{where } F^\prime(x) = f(x)
1356                    \end{aligned}\)} \\
1357
1358                    \hline
1359
1360                    \(\dfrac{d^2y}{dx^2} = f(x)\)
1361                    &
1362                    {\(\begin{aligned}
1363                      \dfrac{dy}{dx} &= \int f(x) \> dx \\
1364                      &= F(x) + c \quad \text{where } F^\prime(x) = f(x) \\
1365                      \therefore y &= \iint f(x) \> dx = \int \left( F(x) + c \right) \> dx \\
1366                      &= G(x) + cx + d \\
1367                      & \text{where } G^\prime(x) = F(x)
1368                    \end{aligned}\)} \\
1369
1370                    \hline
1371
1372                    \(\dfrac{dy}{dx} = g(y)\)
1373                    &
1374                    {\(\begin{aligned}
1375                      \dfrac{dx}{dy} &= \dfrac{1}{g(y)} \\
1376                      \therefore x &= \int \dfrac{1}{g(y)} \> dy \\
1377                      &= F(y) + c \\ 
1378                      & \text{where } F^\prime(y) = \dfrac{1}{g(y)}
1379                    \end{aligned}\)} \\
1380
1381                    \hline
1382
1383                    \(\dfrac{dy}{dx} = f(x) g(y)\)
1384                    &
1385                    {\(\begin{aligned}
1386                      f(x) &= \dfrac{1}{g(y)} \cdot \dfrac{dy}{dx} \\
1387                      \int f(x) \> dx &= \int \dfrac{1}{g(y)} \> dy
1388                    \end{aligned}\)} \\
1389
1390                    \hline
1391                  \end{tabu}}
1392
1393                  \subsubsection*{Mixing problems}
1394
1395                  \[\left(\frac{dm}{dt}\right)_\Sigma = \left(\frac{dm}{dt}\right)_{\text{in}} - \left(\frac{dm}{dt}_{\text{out}}\right)\]
1396
1397                  \include{calculus-rules}
1398
1399    \section{Kinematics \& Mechanics}
1400
1401      \subsection*{Constant acceleration}
1402
1403      \begin{itemize}
1404        \item \textbf{Position} - relative to origin
1405        \item \textbf{Displacement} - relative to starting point
1406      \end{itemize}
1407
1408      \subsubsection*{Velocity-time graphs}
1409
1410      \begin{description}[nosep, labelindent=0.5cm, leftmargin=0.5\columnwidth]
1411        \item[Displacement:] \textit{signed} area
1412        \item[Distance travelled:] \textit{total} area
1413      \end{description}
1414
1415      \[ \text{acceleration} = \frac{d^2x}{dt^2} = \frac{dv}{dt} = v\frac{dv}{dx} = \frac{d}{dx}\left(\frac{1}{2}v^2\right) \]
1416
1417        \begin{center}
1418          \renewcommand{\arraystretch}{1}
1419          \begin{tabular}{ l r }
1420            \hline & no \\ \hline
1421            \(v=u+at\) & \(x\) \\
1422            \(v^2 = u^2+2as\) & \(t\) \\
1423            \(s = \frac{1}{2} (v+u)t\) & \(a\) \\
1424            \(s = ut + \frac{1}{2} at^2\) & \(v\) \\
1425            \(s = vt- \frac{1}{2} at^2\) & \(u\) \\ \hline
1426          \end{tabular}
1427        \end{center}
1428
1429        \[ v_{\text{avg}} = \frac{\Delta\text{position}}{\Delta t} \]
1430        \begin{align*}
1431          \text{speed} &= |{\text{velocity}}| \\
1432          &= \sqrt{v_x^2 + v_y^2 + v_z^2}
1433        \end{align*}
1434
1435        \noindent \textbf{Distance travelled between \(t=a \rightarrow t=b\):}
1436        \begin{align*}
1437          &= \int^{b}_{a}{\sqrt{\left(\frac{dx}{dt}\right)^2 + \left(\frac{dy}{dt}\right)^2}} \> dt \tag{2D} \\
1438          &= \int^{t=b}_{t=a}{\dfrac{dx}{dt}} \> dt \tag{linear}
1439        \end{align*}
1440
1441        \noindent \textbf{Shortest distance between \(\boldsymbol{r}(t_0)\) and \(\boldsymbol{r}(t_1)\):}
1442        \[ = |\boldsymbol{r}(t_1) - \boldsymbol{r}(t_2)| \]
1443
1444      \subsection*{Vector functions}
1445
1446        \[ \boldsymbol{r}(t) = x \boldsymbol{i} + y \boldsymbol{j} + z \boldsymbol{k} \]
1447
1448        \begin{itemize}
1449          \item If \(\boldsymbol{r}(t) \equiv\) position with time, then the graph of endpoints of \(\boldsymbol{r}(t) \equiv\) Cartesian path
1450          \item Domain of \(\boldsymbol{r}(t)\) is the range of \(x(t)\)
1451          \item Range of \(\boldsymbol{r}(t)\) is the range of \(y(t)\)
1452        \end{itemize}
1453
1454      \subsection*{Vector calculus}
1455
1456      \subsubsection*{Derivative}
1457
1458        Let \(\boldsymbol{r}(t)=x(t)\boldsymbol{i} + y(t)\boldsymbol(j)\). If both \(x(t)\) and \(y(t)\) are differentiable, then:
1459        \[ \boldsymbol{r}(t)=x(t)\boldsymbol{i}+y(t)\boldsymbol{j} \]
1460
1461      \subfile{dynamics}
1462      \subfile{statistics}
1463  \end{multicols}
1464\end{document}