\documentclass[a4paper,12pt]{article}
\usepackage{amssymb}
\begin{document}

\begin{center}
\large \textbf{Math 34A \hspace{.15in} Practice Midterm II Solutions \hspace{.15in} Fall 2007}
\end{center}

{\bf Problem 1}
Solve the following equation for x: $5^{2+3x} - 2^x = 0$
\\
Solution: First, add $2^x$ to both sides of the equation to get
\begin{eqnarray*}
5^{2+3x} & = & 2^x \\
\end{eqnarray*}
Next, take $log$ of both sides, then simplify:
\begin{eqnarray*}
log(5^{2+3x}) & = & log(2^x) \\
(2+3x)log(5) & = & xlog(2)\\
2log(5) + 3xlog(5) & = & xlog(2)\\
\end{eqnarray*}
Now isolate x:
\begin{eqnarray*}
2log(5)  & = & xlog(2) - 3xlog(5)\\
2log(5) & = & x(log(2) - 3log(5))\\
\\
\frac{2log(5)}{log(2)-3log(5)} & = & x\\
\end{eqnarray*}

{\bf Problem 2}
Line A goes through $(3,1)$ and $(5,9)$.  Line B
goes through the point $(2,7)$ and has twice the slope of line A.
What is the equation of line B?

{\bf Solution} To find the slope of line A, we compute rise/run
using the two points given: $$\frac{rise}{run} =
\frac{9-1}{5-3} = \frac{8}{2} = 4$$  So, the slope of line B is $8$.
Using the point-slope formula, the equation for line B is: $$y-7 =
8(x-2)$$ or $$y = 8x - 9$$

{\bf Problem 3}
\\
Can A is 3$\frac{g}{L}$ of salt water, and can B has 4$L$ of water which is $y\frac{g}{L}$ salt water. How much water must be used from A so that we get water which is 2$\frac{g}{L}$ of salt water?\\
\\
Solution:
We first construct a system of equations. $A$ is the total amount used from can A, and $C$ is the total amount of resulting water. Then
\begin{eqnarray*}
  A + 4 & = & C\\
  3A + 4y & = & 2C
\end{eqnarray*}
Substituting the first equation into the second, we get that
\begin{eqnarray*}
  3A + 4y & = & 2(A + 4)\\
  \rightarrow 3A + 4y & = & 2A + 8\\
  \rightarrow A & = & 8 - 4y
\end{eqnarray*}

{\bf Problem 4}
\\
Bacteria double in in mass every 10 hours. Initially there are 30mg of bacteria. After how many hours will there be 240mg?
\\
Solution: Let $A(t)$ be the mass of bacteria at time $t$. Then $A(0) = $ initial amount = 30. By the doubing formula: $A(t) = 30(2)^\frac{t}{10}$. We are asked at what time $t$ is $A(t) = 240$ so we need to solve:

\begin{eqnarray*}
   240 & = & 30(2)^\frac{t}{10}\\
   8 & = & 2^\frac{t}{10}\\
   log(8) & = & \frac{t}{10} log (2)\\
   t & = & 10\frac {log(8)}{log(2)} = 10\frac{log(2^3)}{log(2)} = 30\frac{log(2)}{log(2)} = 30
\end{eqnarray*}

{\bf Problem 5}
\\
a) If log(2) = $a$ and log(3) = $b$, what is log(12) n terms of $a, b$?
\\
Solution:
log(12) = log(2*2*3) = log(2) + log(2) + log(3) = 2$a$ + $b$
\\
b) Express $5^x$ as a power of 8.
\\
Solution: 
Let $y$ be the the power of 8 you are looking for. Then $5^x = 8^y$ and we must solve for $y$. We take logs:
\begin{eqnarray*}
   5^x = 8^y\\
   xlog(5) = ylog(8)\\
   y = x\frac{log(5)}{log(8)}
\end{eqnarray*}
\\
c) What is the average rate of change of $f(x) = x^2$ from $x = 1$ to $x = 1 + h$?
\\
Solution: We must calculate
\begin{eqnarray*}
   \frac{f(1+h) - f(1)}{(1+h) - 1} = \frac{(1+h)^2 - 1^2}{h} = \frac{2h + h^2}{h} = 2+h\\
\end{eqnarray*}

\end{document}
 