\documentclass[12pt,a4paper,twocolumn,landscape]{exam}

\usepackage{xparse}
\usepackage{tikz}
    \usetikzlibrary{arrows,calc,fit}
\usepackage{mathtools}
\usepackage{fullpage}
\usepackage{todonotes}
\usepackage{float}
\usepackage[compact,explicit]{titlesec} % http://ctan.org/pkg/titlesec
\usepackage[utf8]{inputenc}
\usepackage{titling}
\usepackage{wrapfig}
\usepackage{boxedminipage}
\usepackage{parskip} % Don't indent paragraphs

\usepackage{fib}
\usepackage{common}

\pagestyle{headandfoot}

\firstpageheadrule
\firstpageheader{Solving Linear Equations}
                {Level 7-8}
                {\today}

\runningheadrule
\runningheader{Solving Linear Equations}
              {Solving Linear Equations, Page \thepage\ of \numpages}
              {\today}

\firstpagefooter{}{}{}
\runningfooter{}{}{}

\begin{document}

\section*{Solving Linear Equations - Level 7-8}

\begin{minipage}{\linewidth}

\begin{wrapfigure}{R}{0.3\linewidth}
    \centering
    \begin{boxedminipage}{\linewidth}
        Keywords:
        \begin{itemize}
            \item Linear
            \item Solve
            \item Unknown
        \end{itemize}
    \end{boxedminipage}
\end{wrapfigure}

Linear equations are written with one unknown variable which is shown by a
letter.

It is necessary to \textbf{rearrange} the equation in order to find the value
of x.

\end{minipage}

\begin{questions}

\question Solve 2x+3 = 7 for the unknown.

\begin{minipage}{\linewidth}

    \begin{wrapfigure}{R}{0.3\linewidth}
        \vspace{-25pt}
        \centering
        \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
            thick,main node/.style={draw=none,fill=none}]

            \node[main node] (1) {$2x + 3 = 7$};
            \node[main node] (2) [below of=1] {$2x = 4$};

            \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$-3$} (2.west)
            (1.east) edge [bend left] node[right] {$-3$} (2.east);
        \end{tikzpicture}
    \end{wrapfigure}

    Start by looking at the section of the equation that contains the unknown. In
    this case the left hand side.

\end{minipage}

The next step is to collect all constants (numbers) on the side of the equation
that does not contain the unknown. We want to move the 3 to the right hand
side. Because it is +3, to move it to the other side we must -3.

\begin{minipage}{\linewidth}

    \begin{wrapfigure}{R}{0.3\linewidth}
        \centering
        \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
            thick,main node/.style={draw=none,fill=none}]

            \node[main node] (1) {$2x = 4$};
            \node[main node] (2) [below of=1] {$x = 2$};

            \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$\div 2$} (2.west)
            (1.east) edge [bend left] node[right] {$\div 2$} (2.east);
        \end{tikzpicture}
    \end{wrapfigure}

    We can see that there are still numbers on the right hand side with the
    unknown. The coefficient (multiplier) of x is 2. Since the 2 is times x we
    need to divide by 2 to get the x by itself.

\end{minipage}

We can see that there are no more numbers on the side of x so the solution is:
$x = 2$

To check the solution, put the unknown back into the original equation. $2
\times 2 + 3 = 7$

\begin{keypoints}[t]
    Key things to remember:
    \begin{itemize}
        \item Collect all \textbf{terms} involving the \textbf{unknown} to one
              side of the equation.
        \item The opposite of addition is subtraction.
        \item The opposite of multiplication is division.
        \item If you do something to one side of the equation you MUST do the
              same thing to the other side.
    \end{itemize}
\end{keypoints}

\subsection*{Higher Level Questions}

A harder question is shown below, the steps taken are shown on the arrows.  The
first step is to bring all \textbf{unknowns} to the same side of the equation.

\question Find the value of x: $6x - 12 = x + 8$

\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$6x - 12 = x + 8$};
        \node[main node] (2) [below of=1] {$5x - 12 = 8$};
        \node[main node] (3) [below of=2] {$5x = 20$};
        \node[main node] (4) [below of=3] {$x = 4$};

        \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$-x$} (2.west)
            (1.east) edge [bend left] node[right] {$-x$} (2.east)
            (2.west) edge [bend right] node[left]{$+12$} (3.west)
            (2.east) edge [bend left] node[right] {$+12$} (3.east)
            (3.west) edge [bend right] node[left]{$\div 5$} (4.west)
            (3.east) edge [bend left] node[right] {$\div 5$} (4.east);
    \end{tikzpicture}
\end{figure}

Check:

On the left hand side of the \textbf{original} equation:\\
$6(4) - 12 = 24 - 12 = 12$

On the right hand side of the \textbf{original} equation:\\
$4 + 8 = 12$

The left hand side and right hand side of the equation are equal so you know
that your solution is correct: $x = 4$

\end{questions}

\newpage

\subsection*{Practice Questions}

\begin{questions}

\question Find the value of x: $6+2x = x-6$

\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$6 + 2x = x - 6$};
        \node[main node] (2) [below of=1] {$\fib{6 + x} = -6$};
        \node[main node] (3) [below of=2] {$\fib{x} = \fib{-12}$};

        \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$-x$} (2.west)
            (1.east) edge [bend left] node[right] {$-x$} (2.east)
            (2.west) edge [bend right] node[left]{$-6$} (3.west)
            (2.east) edge [bend left] node[right] {$\fib{-6}$} (3.east);
    \end{tikzpicture}
\end{figure}

Check:

$6 + \fib{2}x = 6 + 2 \times -12 = \fib{-18}$\\
$\fib{x} - 6 = \fib{-12} - 6 = \fib{-18}$

\end{questions}

\begin{questions}

\newpage

\subsection*{Solving Linear Equations}

\question[3] Find the value of x: $6x + 13 = 4 + 9x$ \droppoints

\begin{minipage}{0.69\linewidth}
\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$6x + 13 = 4 + 9x$};
        \node[main node] (2) [below of=1] {$\fib{13} = 4 + 3x$};
        \node[main node] (3) [below of=2] {$\fib{9} = \fib{3x}$};
        \node[main node] (4) [below of=3] {$\fib{x} = \fib{3}$};

        \path[every node/.style={font=\sffamily\small}]
        (1.west) edge [bend right] node[left]{$-6x$} (2.west)
        (1.east) edge [bend left] node[right] {$-6x$} (2.east)
        (2.west) edge [bend right] node[left]{$-4$} (3.west)
        (2.east) edge [bend left] node[right] {$-4$} (3.east)
        (3.west) edge [bend right] node[left]{$\fib{\div 3}$} (4.west)
        (3.east) edge [bend left] node[right] {$\fib{\div 3}$} (4.east);
    \end{tikzpicture}
\end{figure}
\end{minipage}
\begin{boxedminipage}{0.3\linewidth}
    TIP:

    When you have unknowns on both sides of the equations you can choose which
    one to move.

    Try and move the lower number of unknowns to avoid negatives.

\end{boxedminipage}

Check:

$6\fib{x} + 13 = 6\fib{3} + 13 = 31$\\
$4 + 9\fib{x} = 4 + \fib{27} = 31$

\newpage

\question[3] Find the value of x: $7x + 8 = 2x - 2$ \droppoints

\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$7x + 8 = 2x - 2$};
        \node[main node] (2) [below of=1] {$5x + 8 = \fib{-2}$};
        \node[main node] (3) [below of=2] {$\fib{5x} = \fib{-10}$};
        \node[main node] (4) [below of=3] {$\fib{x} = \fib{-2}$};

        \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$-2x$} (2.west)
            (1.east) edge [bend left] node[right] {$-2x$} (2.east)
            (2.west) edge [bend right] node[left]{$\fib{-8}$} (3.west)
            (2.east) edge [bend left] node[right] {$\fib{-8}$} (3.east)
            (3.west) edge [bend right] node[left]{$\div \fib{5}$} (4.west)
            (3.east) edge [bend left] node[right] {$\div \fib{5}$} (4.east);
    \end{tikzpicture}
\end{figure}

Check:

$7\fib{x} + 8 = \fib{-14} + 8 = \fib{-4}$\\
$2\fib{x} - 2 = \fib{-6} - 2 = \fib{-4}$

\newpage

\question[3]

Susie clears out boxes on the weekend. She gets paid £10 for the weekend and an
extra £2 for each box she clears. If Susie is paid £40, how many boxes did she
clear? \droppoints

\begin{minipage}{0.69\linewidth}
\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$\fib{10 + 2x} = 40$};
        \node[main node] (2) [below of=1] {$\fib{2x} = \fib{30}$};
        \node[main node] (3) [below of=2] {$\fib{x} = \fib{15}$};

        \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$-\fib{10}$} (2.west)
            (1.east) edge [bend left] node[right] {$-\fib{10}$} (2.east)
            (2.west) edge [bend right] node[left]{$\div\fib{2}$} (3.west)
            (2.east) edge [bend left] node[right] {$\div\fib{2}$} (3.east);
    \end{tikzpicture}
\end{figure}
\end{minipage}
\begin{boxedminipage}{0.3\linewidth}
    LOOK!:

    This question is asking you to make the linear equation yourself.

    HINT:

    What is the unknown?
\end{boxedminipage}

Check:

$\fib{2}\fib{x} + \fib{10} = \fib{30} + \fib{10} = \fib{40}$

\newpage

\question[3]

Rearrange to find the unknown:\\
$3z - 18 = 7z - 10$ \droppoints

\begin{minipage}{0.69\linewidth}
\begin{figure}[H]
    \centering
    \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
        thick,main node/.style={draw=none,fill=none}]

        \node[main node] (1) {$3z - 18 = 7z - 10$};
        \node[main node] (2) [below of=1] {$\fib{3z} = \fib{7z + 8}$};
        \node[main node] (3) [below of=2] {$\fib{-4z} = \fib{8}$};
        \node[main node] (4) [below of=3] {$\fib{z} = \fib{-2}$};


        \path[every node/.style={font=\sffamily\small}]
            (1.west) edge [bend right] node[left]{$\fib{+ 18}$} (2.west)
            (1.east) edge [bend left] node[right] {$\fib{+ 18}$} (2.east)
            (2.west) edge [bend right] node[left]{$\fib{- 7z}$} (3.west)
            (2.east) edge [bend left] node[right] {$\fib{- 7z}$} (3.east)
            (3.west) edge [bend right] node[left]{$\fib{\div -2}$} (4.west)
            (3.east) edge [bend left] node[right] {$\fib{\div -2}$} (4.east);
    \end{tikzpicture}
\end{figure}
\end{minipage}
\begin{boxedminipage}{0.3\linewidth}
    NOTE:

    This question uses z as the unknown. Any letter may be used as the
    unknown.

\end{boxedminipage}

Check:

$3\fib{z} - 18 = \fib{-6} - 18 = \fib{-24}$\\
$7\fib{z} - 10 = \fib{-14} - 10 = \fib{-24}$

\end{questions}

\end{document}
