\documentclass[a4paper]{article}
\usepackage{standalone}
\usepackage{newclude}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{harpoon}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage[dvipsnames, table]{xcolor}
\usepackage{blindtext}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepackage{mathtools}
\usetikzlibrary{calc}
\usetikzlibrary{angles}
\usetikzlibrary{datavisualization.formats.functions}
\usetikzlibrary{decorations.markings}
\usepgflibrary{arrows.meta}
\usepackage{longtable}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[LO,LE]{Year 12 Methods}
\fancyhead[CO,CE]{Andrew Lorimer}
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setlength{\parindent}{0cm}
\usepackage{mathtools}
\usepackage{xcolor} % used only to show the phantomed stuff
\setlength\fboxsep{0pt} \setlength\fboxrule{.2pt} % for the \fboxes
\newcommand*\leftlap[3][\,]{#1\hphantom{#2}\mathllap{#3}}
\newcommand*\rightlap[2]{\mathrlap{#2}\hphantom{#1}}
\newcolumntype{L}[1]{>{\hsize=#1\hsize\raggedright\arraybackslash}X}
\newcolumntype{R}[1]{>{\hsize=#1\hsize\raggedleft\arraybackslash}X}
\definecolor{cas}{HTML}{e6f0fe}
\definecolor{shade1}{HTML}{ffffff}
\definecolor{shade2}{HTML}{e6f2ff}
\definecolor{shade3}{HTML}{cce2ff}
\linespread{1.5}
\newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}
\newcommand{\tg}{\mathop{\mathrm{tg}}}
\newcommand{\cotg}{\mathop{\mathrm{cotg}}}
\newcommand{\arctg}{\mathop{\mathrm{arctg}}}
\newcommand{\arccotg}{\mathop{\mathrm{arccotg}}}
\pgfplotsset{every axis/.append style={
  axis x line=middle,    % centre axes
  axis y line=middle,
  axis line style={->},  % arrows on axes
  xlabel={$x$},          % axes labels
  ylabel={$y$},
}}
\begin{document}

\title{\vspace{-2cm}\hrule\vspace{0.4cm} Year 12 Methods}
\author{Andrew Lorimer}
\date{}
\maketitle

\begin{multicols}{2}

\section{Functions}

\begin{itemize}
  \tightlist
  \item vertical line test
  \item each \(x\) value produces only one \(y\) value
\end{itemize}

\subsection*{One to one functions}

\begin{itemize}
\tightlist
\item
  \(f(x)\) is \emph{one to one} if \(f(a) \ne f(b)\) if
  \(a, b \in \operatorname{dom}(f)\) and \(a \ne b\)\\
  \(\implies\) unique \(y\) for each \(x\) (\(\sin x\) is not 1:1,
  \(x^3\) is)
\item
  horizontal line test
\item
  if not one to one, it is many to one
\end{itemize}

\subsection*{Finding inverse functions \(f^{-1}\)}

\begin{itemize}
\tightlist
\item
  if \(f(g(x)) = x\), then \(g\) is the inverse of \(f\)
\item
  reflection across \(y-x\)
\item
  \(\operatorname{ran} \> f = \operatorname{dom} \> f^{-1}, \quad \operatorname{dom} \> f = \operatorname{ran} \> f^{-1}\)
\item
  inverse \(\ne\) inverse \emph{function} (i.e.~inverse must pass
  vertical line test)\\
  \(\implies f^{-1}(x)\) exists \(\iff f(x)\) is one to one
\item
  \(f^{-1}(x)=f(x)\) intersections may lie on line \(y=x\)
\end{itemize}

\subsubsection*{Requirements for showing working for \(f^{-1}\)}

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
  start with \emph{``let \(y=f(x)\)''}
\item
  must state \emph{``take inverse''} for line where \(y\) and \(x\) are
  swapped
\item
  do all working in terms of \(y=\dots\)
\item
  for sqrt, state \(\pm\) solutions then show restricted
\item
  for inverse \emph{function}, state in function notation
\end{enumerate}
\subsubsection*{Solving
\(\protect\begin{cases}px + qy = a \\ rx + sy = b\protect\end{cases} \>\)
for \(\{0,1,\infty\}\)
solutions}

where all coefficients are known except for one, and \(a, b\) are known

\begin{enumerate}
\tightlist
\item
  Write as matrices:
  \(\begin{bmatrix}p & q \\ r & s \end{bmatrix}  \begin{bmatrix} x \\ y \end{bmatrix}  =  \begin{bmatrix} a \\ b \end{bmatrix}\)
\item
  Find determinant of first matrix: \(\Delta = ps-qr\)
\item
  Let \(\Delta = 0\) for number of solutions \(\ne 1\)\\
  or let \(\Delta \ne 0\) for one unique solution.
\item
  Solve determinant equation to find variable \\
    \textbf{For infinite/no solutions:}
\item
  Substitute variable into both original equations
\item
  Rearrange equations so that LHS of each is the same
\item
  \(\text{RHS}(1) = \text{RHS}(2) \implies (1)=(2) \> \forall x\)
  (\(\infty\) solns)\\
  \(\text{RHS}(1) \ne \text{RHS}(2) \implies (1)\ne(2) \> \forall x\) (0
  solns)
\end{enumerate}

\colorbox{cas}{On CAS:} Matrix \(\rightarrow\) \texttt{det}

\subsubsection*{Solving \(\protect\begin{cases}a_1 x + b_1 y + c_1 z = d_1 \\ a_2 x + b_2 y + c_2 z = d_2 \\ a_3 x + b_3 y + c_3 z = d_3\protect\end{cases}\)}

\begin{itemize}
\tightlist
\item
  Use elimination
\item
  Generate two new equations with only two variables
\item
  Rearrange \& solve
\item
  Substitute one variable into another equation to find another variable
\end{itemize}
\subsection*{Odd and even functions}

Even when \(f(x) = -f(x)\)\\
Odd when \(-f(x) = f(-x)\)

Function is even if it is symmetrical across \(y\)-axis
\hspace{5em}\(\implies f(x)=f(-x)\)\\
Function \(x^{\pm {p \over q}}\) is odd if \(q\) is odd\\

\begin{tabularx}{\columnwidth}{XX}
  \textbf{Even:} & \textbf{Odd:} \\
  \begin{tikzpicture}\begin{axis}[ticks=none, yticklabels={,,}, xticklabels={,,}, xmin=-3,  xmax=3, scale=0.4, samples=100, smooth, unbounded coords=jump] \addplot[blue, mark=none] {(x^2)};  \end{axis}\end{tikzpicture} &
  \begin{tikzpicture}\begin{axis}[ticks=none, yticklabels={,,}, xticklabels={,,}, xmin=-3,  xmax=3, scale=0.4, samples=100, smooth, unbounded coords=jump] \addplot[blue, mark=none] {(x^3)};  \end{axis}\end{tikzpicture}
\end{tabularx}
\pagebreak
                  \pgfplotsset{every axis/.append style={
                    xlabel=,    % put the x axis in the middle
                    ylabel=,    % put the y axis in the middle
                  }}
                  \begin{table*}[ht]
                    \centering
                    \begin{tabularx}{\textwidth}{r|X|X}
                      & \(n\) is even & \(n\) is odd \\ \hline
                      \(x^n, n \in \mathbb{Z}^+\) & 
                      \makecell{\\\begin{tikzpicture}\begin{axis}[yticklabels={,,}, xticklabels={,,}, xmin=-3,  xmax=3, scale=0.4, samples=100, smooth, unbounded coords=jump] \addplot[orange, mark=none] {(x^2)};  \end{axis}\end{tikzpicture}} &
                      \makecell{\\\begin{tikzpicture}\begin{axis}[yticklabels={,,}, xticklabels={,,}, xmin=-3,  xmax=3, scale=0.4, samples=100, smooth, unbounded coords=jump] \addplot[orange, mark=none] {(x^3)};  \end{axis}\end{tikzpicture}} \\
                      \(x^n, n \in \mathbb{Z}^-\) &
                      \makecell{\\\begin{tikzpicture}\begin{axis}[yticklabels={,,}, xticklabels={,,}, xmin=-4,  xmax=4, ymax=8, ymin=-0, scale=0.4, smooth] \addplot[orange, mark=none, samples=100] {(x^(-2))};  \end{axis}\end{tikzpicture}} &
                        \makecell{\\\begin{tikzpicture}\begin{axis}[yticklabels={,,}, xticklabels={,,}, xmin=-3,  xmax=3, scale=0.4, samples=100, smooth] \addplot[orange, mark=none] {(x^(-1))};  \end{axis}\end{tikzpicture}} \\
                      \(x^{\frac{1}{n}}, n \in \mathbb{Z}^-\) &
                      \makecell{\\\begin{tikzpicture}\begin{axis}[yticklabels={,,}, xticklabels={,,}, xmin=-1,  xmax=5, scale=0.4, samples=100, smooth, unbounded coords=jump] \addplot[orange, mark=none] {(x^(1/2))};  \end{axis}\end{tikzpicture}} &
                        \makecell{\\\begin{tikzpicture}
                      \begin{axis}[enlargelimits=false, yticklabels={,,}, xticklabels={,,}, xmin=-3, xmax=3, ymin=-3, ymax=3, smooth, scale=0.4]
\addplot [orange,domain=-2:2,samples=1000,no markers] gnuplot[id=poly]{sgn(x)*(abs(x)**(1./3)) };
\end{axis}
                        \end{tikzpicture}}
                    \end{tabularx}
                  \end{table*}
                  \pgfplotsset{every axis/.append style={
                    xlabel=\(x\),    % put the x axis in the middle
                    ylabel=\(y\),    % put the y axis in the middle
                  }}

\section{Polynomials}

\subsection*{Quadratics}

\[ x^2 + bx + c = (x+m)(x+n) \]
\hfill where \(mn=c, \> m+n=b\)

\begin{align*}
  \hline
  \textbf{Difference} && a^2 - b^2 &= (a-b)(a+b) \\[2ex]
  \textbf{Perfect sq.} && a^2 \pm 2ab + b^2 &= (a \pm b^2) \\[2ex]
  \textbf{Completing} && x^2+bx+c &= (x+\frac{b}{2})^2+c-\frac{b^2}{4} \\
  && ax^2+bx+c &= a(x-\frac{b}{2a})^2+c-\frac{b^2}{4a} \\[2ex]
  \textbf{Quadratic} && x &= \dfrac{-b\pm\sqrt{b^2-4ac}}{2a} \\
  && & \text{where} \Delta=b^2-4ac \\
  \hline
\end{align*}

\subsection*{Cubics}

\textbf{Difference of cubes:} \(a^3 - b^3 = (a-b)(a^2 + ab + b^2)\)\\
\textbf{Sum of cubes:} \(a^3 + b^3 = (a+b)(a^2 - ab + b^2)\)\\
\textbf{Perfect cubes:} \(a^3 \pm 3a^2b + 3ab^2 \pm b^3 = (a \pm b)^3\)

\[ y=a(bx-h)^3 + c \]

\begin{itemize}
\tightlist
\item
  \(m=0\) at \emph{stationary point of inflection}
  (i.e.~(\({h \over b}, k)\))
\item
  in form \(y=(x-a)^2(x-b)\), local max at \(x=a\), local min at \(x=b\)
\item
  in form \(y=a(x-b)(x-c)(x-d)\): \(x\)-intercepts at \(b, c, d\)
\item
  in form \(y=a(x-b)^2(x-c)\), touches \(x\)-axis at \(b\), intercept at
  \(c\)
\end{itemize}

\subsection*{Linear and quadratic
graphs}

\subsubsection*{Forms of linear
equations}

\begin{itemize}
\tightlist
  \item \(y=mx+c\)
  \item \(\frac{x}{a} + \frac{y}{b}=1\) where \((x_1, y_1)\) lies on the graph
  \item \(y-y_1 = m(x-x_1)\) where \((a,0)\) and \((0,b)\) are \(x\)- and \(y\)-intercepts
\end{itemize}

\subsection*{Line properties}

Parallel lines: \(m_1 = m_2\)\\
Perpendicular lines: \(m_1 \times m_2 = -1\)\\
Distance: \(|\vec{AB}| = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}\)

\subsection*{Quartic graphs}

\subsubsection*{Forms of quartic
equations}

\(y=ax^4\)\\
\(y=a(x-b)(x-c)(x-d)(x-e)\)\\
\(y=ax^4+cd^2 (c \ge 0)\)\\
\(y=ax^2(x-b)(x-c)\)\\
\(y=a(x-b)^2(x-c)^2\)\\
\(y=a(x-b)(x-c)^3\)

\subsection*{Simultaneous equations
(linear)}

\begin{itemize}
\tightlist
\item
  \textbf{Unique solution} - lines intersect at point
\item
  \textbf{Infinitely many solutions} - lines are equal
\item
  \textbf{No solution} - lines are parallel
\end{itemize}


\input{temp/transformations}
\input{temp/stuff}
\input{circ-functions}
\input{temp/calculus}

\end{multicols}
\end{document}
