\documentclass[11pt]{article}
 \setlength{\textheight}{10.4in}
 \setlength{\topmargin}{-1in}
 \setlength{\headheight}{0in}
 \setlength{\topsep}{0in}
 \setlength{\marginparwidth}{0in}
 \setlength{\marginparsep}{0in}
 \setlength{\oddsidemargin}{0in}
 \setlength{\evensidemargin}{0in}
 \setlength{\textwidth}{6.4in}
 \setlength{\parskip}{4pt}
 \setlength{\parindent}{0pt}
\usepackage{quiz}
\usepackage{alltt}
\usepackage{email}
\usepackage{hyperref}
\usepackage{graphicx}
\begin{document}
\section*{Quiz 5}
\rule{\textwidth}{0.5ex}
{\Large\sf Quiz5 Problem 1}. {\bf Balancing Chemical Equations}: Hematite and aluminum form aluminum oxide and iron.


The object of this problem is the derivation of the balanced chemical equation
\begin{center} Fe2O3 + 2 Al $\to$ Al2O3 + 2 Fe. \end{center}
The chemical symbols are defined as follows:

\begin{tabular}{llll}
Fe2O3 &   Hematite & Steel industry ore
\\
Al & Aluminum & Found in 270+ minerals
\\
Al2O3 & Aluminum oxide & Most commonly occurring
\\
Fe & Iron & Atomic number 26
\end{tabular}

{\bf Chemical balance} means that matching elements on each side of a chemical equation have the same total amount of atoms. Notation 4Al2O3 documents 4x2=8 aluminum atoms and 4x3=12 oxygen atoms. The given chemical equation is balanced, because the atom amounts for elements Fe, Al, O total on each side of the equation to 2, 2, 3, respectively.

{\bf Chemical Balance by Linear Algebra}.
We begin with the unbalanced chemical equation
\begin{center} Fe2O3 + Al $\to$ Al2O3 +  Fe, \end{center}
which means hematite and aluminum combine into aluminum oxide and iron.

Let's write the balanced equation as
\begin{center} $x_1$ Fe2O3 + $x_2$Al $\to$ $x_3$Al2O3 + $x_4$ Fe, \end{center}
where integers $x_1$ to $x_4$ are to be determined.
%$$
%\begin{array}{rcrl}
%2x_1 &=& x_4 & \mbox{~~~Fe} \\
%x_2 &=& 2x_3 & \mbox{~~~Al} \\
%3x_1 &=& 3x_3 & \mbox{~~~Oxygen O}
%\end{array}
%$$

(a) Chemical balance means that three algebraic equations hold. Write the equations in standard matrix form $A\vec{x}=\vec{0}$, where $A$ is a $3\times 4$ matrix and $\vec{x}$ has components $x_1$ to $x_4$.
%2A + 0B = 0C + 1D
%3A + 0B = 3C + 0D
%0A + 1B = 2C + 0D

(b) Show details for computing the reduced row echelon form $\rref(A)$.
%A:=<2,0,0,-1|3,0,-3,0|0,1,-2,0>^+;
%linalg[linsolve](A,<0,0,0>);
%linalg[rref](A);

(c) There are more variables than equations. Therefore, there is at least one free variable. Identify the lead variables and the free variables.

(d) Solve the system $A\vec{x}=\vec{0}$ in terms of the invented symbols.

{\bf Balanced Equation}. The smallest positive integer values for $x_1$ to $x_4$ are obtained from assigning values to the invented symbols. Then $x_1=1$, $x_2=2$, $x_3=1$, $x_4=2$. Substitution gives the balanced chemical equation
\begin{center} (1) Fe2O3 + (2) Al $\to$ (1) Al2O3 + (2) Fe. \end{center}

{\bf References}. Edwards-Penney sections 3.1, 3.2, 3.3. Especially, re-read 3.3
Theorem 3: {\small\em If variable $\vec{x}$ has more entries than there are equations in
            system $A\vec{x}=\vec{0}$, then the system has infinitely many solutions}.
Course document
\href{http://www.math.utah.edu/~gustafso/s2014/2250/linearequDRAFT.pdf}{Linear Algebraic Equations, No Matrices}.
How to balance chemical equations, a video by \href{http://video.about.com/chemistry/How-to-Balance-Chemistry-Equations.htm}{Anne Marie Helmenstine}
with English transcript.

\vfill
\newpage
\rule{\textwidth}{0.5ex}
{\Large\sf Quiz5 Problem 2}. {\bf Solving Higher Order Initial Value Problems with Linear Algebra}.

The objective of this problem is to learn how to solve for the constants in a general solution, using given initial conditions. The differential equation and its known general solution are
$$
\begin{array}{l}
y'''' - 4y'' = 0, \\
y(x) = c_1 + c_2 x + c_3 e^{2x} + c_4 e^{-2x}.
\end{array}
$$
The initial conditions are
$$y(0)=1, y'(0)=2, y''(0)=-1, y'''(0)=0.
$$


(a) Substitute the general solution into the four initial conditions to obtain the system of equations
$$
\left(\begin{array}{rrrr}
1 & 0 & 1 & 1\\
0 & 1 & 2 & -2 \\
0 & 0 & 4 & 4 \\
0 & 0 & 8 & -8
\end{array}\right)
\colvector{c_1 \\ c_2 \\ c_3\\ c_4} = \colvector{1 \\ 2 \\ -1\\ 0}
$$

(b) Solve the system of equations and then report the particular solution $y(x)$ so found.
\begin{quote}
 {\bf Remark}.\small\sf Picard's existence-uniqueness theorem says that the initial value problem has a unique solution, meaning that the linear algebra problem is in the unique solution case: no free variable.
\end{quote}

{\bf References}. Edwards-Penney sections 3.3, 3.4, 5.3.
Course manuscript
\href{http://www.math.utah.edu/~gustafso/s2014/2250/linearequDRAFT.pdf}{Linear Algebraic Equations, No Matrices}.

\rule{\textwidth}{0.5ex}
{\Large\sf Quiz5 Problem 3}. {\bf Ehrenfest Urn Model}.

The  Ehrenfest model considers $N$ gas molecules in a box-like container with permeable membrane separating two compartments $A$ and $B$. The molecules change sides of the membrane. The model describes the number of molecules expected to be in $A$.

Ehrenfest's model can be formulated as an Urn and Marble model, where urns $A$ and $B$ correspond to the two sides of the membrane and the marbles represent the molecules.

 {\bf Urn Model}. Between $A$ and $B$ there are $N$ marbles. At each step, one of the $N$ marbles is chosen at random
from either $A$ or $B$ and swapped into the other urn. The state is the
number of marbles in $A$, which is one of the numbers $0,1,\ldots,N$.
 If the marble count in $A$ is $i$, which is one of $0,1,\ldots,N$, then the marble count in $A$ will change to either $i+1$ with probability $\frac{N-i}{N}$ or else to $i-1$ with probability $\frac{i}{N}$.

 Let's consider $N=4$ and display the Ehrenfest transition probability matrix, which records the probabilities for the $5$ states $0,1,2,3,4$:
$$P=\left(\begin{array}{ccccc}
0& 1& 0& 0& 0 \\
\frac14& 0& \frac34& 0& 0 \\
0& \frac12& 0& \frac12& 0 \\
0& 0& \frac34& 0& \frac14 \\
0& 0& 0& 1& 0
\end{array}\right)$$
(a) Guess the expected number of marbles in $A$ after a long time. Compare to the steady-state temperature for two bodies of initially different temperature, when held in close contact.

(b) Vector $\vec{v}=\rowvector{0&0&0&0&1}$ represents the state when $A$ contains $4$ marbles. Compute
$\vec{v}P, \vec{v}P^2, \vec{v}P^3$ and explain the answers as marble counts in $A$. Can you compute $\vec{v}P^{51}$?

{\bf References}. Edwards-Penney sections 3.3, 3.4, 3.5, 6.3 ({\bf transition matrices}).
Course manuscript
\href{http://www.math.utah.edu/~gustafso/s2014/2250/linearequDRAFT.pdf}{Linear Algebraic Equations, No Matrices}. Wikipedia
\href{http://en.wikipedia.org/wiki/Ehrenfest_model}{Ehrenfest model}, especially the 1907 reference to
the paper of Paul and Tatjana Ehrenfest.

% P:=<0,1,0,0,0|1/4,0,3/4,0,0|0,1/2,0,1/2,0|0,0,3/4,0,1/4|0,0,0,1,0>^+;
% v:=<1,1,1,1,1>;# eigenvector for lambda=1

\end{document}
