\chapter{Exponentials and logarithms}
\section{Logarithmic equations}
We now study equations where the variable is in the input of a logarithmic function, such
as
\[\log(4x-3) = \log (2x+1).\]
\subsection{Checking the solutions}
There is an important difference between exponential equations and logarithmic equations:
the domain of \(y=b^x\) is \((-\infty, \infty)\), but the domain of \(y=\log_b x\) is \((0,\infty)\),
and we cannot take logarithms of zero or negative numbers:
\[\log_b 0 \mbox{ DNE}, \hspace{3ex} \log_b(-2) \mbox{ DNE}.\]
This means that the solution of an exponential equation will always work (provided we did not
make any mistake in deriving it!), but it may well happen that the solution of a logarithmic
equation will not be a valid solution, because even though we derived it correctly, it
turns out not to be in the domain of a logarithmic function.
Because of this, it is necessary to check that the answers that we find when
solving a logarithmic equation are really solutions, by substituting
them back into the original equation. It can happen that none of the answers we found
can be used for the original equation. In this case the equation has no solutions.
\begin{example}
The simplest case of a logarithmic equation is when there is a single logarithm on each side of the
equation, such as
\[\log(4x-3) = \log (2x+1).\]
In this case, since the graph of the \(y=\log x\) is always increasing, we know that the
function is one-to-one, and so there can only be one input for a given output. So we
solve the equation by simply equating the two inputs:
\[4x -3 = 2x +1.\]
Solving thie equation we find \(x=2\). But before we say that this is a solution we check the
original equation. Substituting \(x=2\), we find:
\[\log(4(2)-3) = \log (2(2)+1).\]
This is the same as
\[\log 5 = \log 5\]
and this is correct, without any problems coming from the domain, so we conclude that \(x=2\) is the
solution to the given equation.
\end{example}
\begin{example}
Now we try the equation
\[\ln(2x-3)= \ln(4x+1).\]
Proceeding as before, we need to solve
\[2x-3=4x+1\]
and the solution of this is \(x=-2\). But when we substitute this back into the given equation
we run into trouble with the domain: the left side of the equation becomes
\(\ln(2(-2) -3) = \ln(-7)\) and this is undefined. So we conclude that the equation has no solution.
\end{example}
\subsection{Using properties of logarithms to solve equations}
If the equation has more than one logarithmic function on one side, we can use the property
of logarithms to condense and reduce to a single logarithm.
\begin{example}
We want to solve the equation
\[\log (x+3) + \log(4-x) = \log (2-2x).\]
First we use property (A) to condense the left side:
\[\log\left( (x+3)(4-x)\right) = \log (2-2x)\]
Then we proceed as before, equating the inputs:
\[(x+3)(4-x) = 2-2x\]
Expanding the left side we find
\[4x-x^2+12-3x=2-2x\]
Now move all terms to the left and simplify:
\[-x^2+3x+10=0\]
Multiply by \(-1\):
\[x^2-3x-10=0\]
This equation can be factored:
\[(x-5)(x+2)=0\]
So we find the two possible solutions:
\[x=5 \hspace{2ex} \mbox{or} \hspace{2ex} x=-2.\]
But we need to check them, by substituting the value in the original equation. We try \(x=5\) first:
\[\log(5+3)+\log(4-5) = \log (2-2(5))\]
\[\log8 +\log(-1) = \log(-8).\]
But logarithms of negative numbers are undefined, so \(x=5\) is not a solution. Now we try \(x=-2\):
\[\log(-2+3)+\log(4-(-2)) = \log (2-2(-2))\]
\[\log(1) + \log (4+2) = \log (2+4)\]
\[0+\log 6 = \log 6.\]
The last line is a correct statement, and so \(x=-2\) is a solution.
\end{example}
Note that the positive answer \(x=5\) in the last example was not a good solution, while the
negative answer \(x=-2\) was a solution. So it is not right to assume that only the positive
answers for \(x\) will work as solutions. We need to check each answer, whether it is positive
or negative.
\subsection{Using the translation formula}
In the previous examples we solved the equations by simply equating the inputs of logarithmic
functions. Sometimes it is necessary to use the translation formula: \(\log_bx=y\) is equivalent
to \(b^y=x\).
\begin{example}
We solve the equation:
\[2\log_2 (4x+1) = 1.\]
First divide both sides by \(2\), to get the logarithm by itself on the left side:
\[\log_2(4x+1) = \frac{1}{2}.\]
Now use the translation formula:
\[ \log_2(4x+1) = \frac{1}{2} \hspace{2ex} \Rightarrow \hspace{2ex} 2^{1/2} = 4x+1. \]
This simplifies as
\[\sqrt{2}-1 = 4x,\]
and dividing by \(4\), we find the solution
\[x=\frac{\sqrt{2}-1}{4}.\]
We need to check this solution. We could use a calculator to compute this irrational number. But there
is a shortcut: as long as the answer we found does not produce any zeros or negative numbers
in the input of a logarithm, it will be a valid solution. The input of the logarithm in the given
equation is \(4x+1\), so we just need to check that this is not zero or negative:
\[
\begin{array}{rcl}
4x+1 &=& \displaystyle 4\left(\frac{\sqrt{2}-1}{4}\right)+1\\[1.5ex]
&=& \displaystyle \cancel{4}\frac{\sqrt{2}-1}{\cancel{4}}+1\\[1.5ex]
&=& \sqrt{2}-1 +1\\[1.5ex]
&=& \sqrt{2}
\end{array}
\]
This is not a negative number, so the answer \(\displaystyle x=\frac{\sqrt{2}-1}{4}\)
is a solution of the original equation.
\end{example}
\begin{example}
We now solve the equation
\[\log(5x)+ \log(x-1)= 2.\]
Using property (A), we combine the two logarithms into a single one:
\[\log(5x(x-1)) =2.\]
Now use the translation formula. Remember that the base of \(\log \) is \(10\).
\[10^2 = 5x(x-1).\]
Simplify and expand the right side:
\[100=5x^2-5x.\]
Rearrange the terms of the equation:
\[5x^2-5x-100=0.\]
Divide all by \(5\):
\[x^2-x-20=0.\]
This equation can be solved by factoring:
\[
\begin{array}{rcl}
(x-5)(x+4)& = & 0 \\[1.5ex]
x-5 =0 & \mbox{ or } & x+4=0 \\[1.5ex]
x=5 & \mbox{ or } & x=-4
\end{array}\]
Now we check the solutions: substituting \(x=5\) in the original equation, we find
\[\log(5(5)) + \log(5-1) = 2,\]
that simplifies to
\[\log(25) + \log(4) = 2.\]
Using property (A), combine the left side into a single logarithm:
\[\log (25(4)) = 2\]
or
\[\log 100 =2.\]
This last equation is surely correct, and so the answer \(x=5\) is a solution.
Checking \(x=-4\), we find that the logarithms have a negative input:
\[\log(5(-4)) + \log(-4-1) = 2,\]
so \(x=-4\) is not a solution.
\end{example}
We can also solve equations where the variable is the base of the logarithm. Here too the translation
formula will do the job.
\begin{example}
We want to solve the following equation for $x$: $\log_{x}32 = 5$.
\[ \begin{array}{rcll} \log_{x}32 &=& 5 & \\[1.5ex]
x^{5} &=& 32 & \mbox{Use the translation formula}\\[1.5ex]
x &=& \sqrt[5]{32}& \mbox{Take the fifth root of both sides}\\[1.5ex]
x &=& 2& \mbox{Simplify}
\end{array}
\]
Now we check our answer: $\log_{2}32 = 5$ is correct, so $x = 2$ is the only solution.
\end{example}
Problems
\problem
Solve the logarithmic equations, and make sure that the answer really solves the equation.
\begin{enumerate}
\item
\(\log(2x-5)=\log(3x+1)\)
\item
\(\ln(x^2-8)=\ln(2x)\)
\item
\(\log_2 x+\log_2(x+2)=\log_2(x+6)\)
\end{enumerate}
\begin{sol}
\begin{enumerate}
\item \
\[\begin{array}{rcll}
&&&\\[-7ex]
\log(2x-5) & = & \log(3x+1) & \mbox{The given equation}\\[1.5ex]
2x-5 & =& 3x+1 & \mbox{Equate the inputs}\\[1.5ex]
x& = & -6 & \mbox{Solve the equation}\\[1.5ex]
\log(2(-6)-5)& = & \log(3(-6)+1) & \mbox{Substitute in the original equation}\\[1.5ex]
\mbox{No solution} & & & \mbox{We find a negative input for the logarithm}\\[1.5ex]
\end{array}
\]
\item \
\[\begin{array}{rcll}
&&&\\[-7ex]
\ln(x^2-8) &=& \ln(2x) & \mbox{The given equation}\\[1.5ex]
x^2-8 & = & 2x & \mbox{Equate the inputs}\\[1.5ex]
x^2-2x+8 & = & 0 & \mbox{Subtract \(2x\) from both sides}\\[1.5ex]
(x+2)(x-4) & = & 0 & \mbox{Factor}\\[1.5ex]
x+2=0 & \mbox{ or } & x-4=0 & \mbox{}\\[1.5ex]
x=-2& \mbox{ or } & x=4 & \mbox{Find the possible solutions}\\[1.5ex]
\ln((-2)^2-8)& = & \ln(2(-2)) & \mbox{Substitute \(x=-2\) in the given equation}\\[1.5ex]
\ln(-4) ?& & &\mbox{Find a negative input in the logarithm } \\[1.5ex]
\ln(4^2-8) & = & \ln(2(4)) & \mbox{Substitute \(x=4\)}\\[1.5ex]
\ln(8) & = & \ln(8) & \mbox{Find a correct statement}\\[1.5ex]
\mbox{\(x=4\)}& & \xcancel{x=-2} & \mbox{\(x=4\) is the only solution}
\end{array}
\]
\item \
\[\begin{array}{rcll}
&&&\\[-7ex]
\log_2 x+\log_2(x+2) & = & \log_2(x+6) & \mbox{The given equation}\\[1.5ex]
\log_2(x(x+2)) & = & \log_2(x+6) & \mbox{Use property (A) to combine the left side}\\[1.5ex]
x(x+2) & = & x+6 & \mbox{Equate the inputs}\\[1.5ex]
x^2+2x & = & x+6 & \mbox{Distribute the left side}\\[1.5ex]
x^2 +x -6 & = & 0 & \mbox{Move all terms to left side, simplify}\\[1.5ex]
(x+3)(x-2) &= & 0 & \mbox{Factor}\\[1.5ex]
x+3=0& \mbox{or} & x-2=0 & \mbox{}\\[1.5ex]
x=-3& \mbox{or} & x=2 &\mbox{Find the solutions} \\[1.5ex]
\log_2(-3) +\log_2(-3+2) ?& & & \mbox{Check \(x=-3\): Negative input}\\
&&& \mbox{for logarithm, not a solution}\\[1.5ex]
\log_2 2 + \log_2(2+2)& = & \log_2(2+6) & \mbox{Check \(x=2\)}\\[1.5ex]
\log_2 2 +\log_2 4 & = & \log_2 8& \mbox{Simplify}\\[1.5ex]
\log_2(2\cdot 4)& = & \log_2 8&\mbox{Use property (A) on the left side}\\[1.5ex]
\log_2 8 & = & \log_2 8 & \mbox{Find a correct statement}\\[1.5ex]
\mbox{\(x=2\)} & & \xcancel{x=-3} & \mbox{ \(x=2\) is the only solution}
\end{array}
\]
\end{enumerate}
\end{sol}
\mproblem
Solve the logarithmic equations, and make sure that the answer really solves the equation.
\begin{enumerate}
\item
\(\log_4(x^2-3x)=\log_4 (6-2x)\)
\item
\(\ln(5x-3)=\ln(3x-4)\)
\item
\(\log (4x)+\log(x-1)=\log 8\)
\end{enumerate}
\problem
Solve the logarithmic equations.
\begin{enumerate}
\item
\(2 \log(3x+1)=-1\)
\item
\(\log_7(x+4) +\log_7(x-2)=1\)
\item
\(\ln(4x) + \ln (x-1) = 0 \)
\end{enumerate}
\begin{sol}
\begin{enumerate}
\item \
\[\begin{array}{rcll}
&&&\\[-6ex]
2 \log(3x+1) & = & -1 & \mbox{The given equation}\\[1.5ex]
\log(3x+1) & = & \displaystyle \frac{-1}{2} & \mbox{Divide by \(2\) to isolate the logarithm}\\[1.5ex]
3x+1 & = & 10^{-1/2} & \mbox{Use the translation \(\log x = y\Rightarrow 10^y =x\)}\\[1.5ex]
3x+1 & = & \displaystyle \frac{1}{\sqrt{10}} & \mbox{Re-write fractional
exponent as square root}\\[1.5ex]
3x & = & \displaystyle \frac{1}{\sqrt{10}}-1 & \mbox{Subtract \(1\)}\\[1.5ex]
3x & = & \displaystyle \frac{1-\sqrt{10}}{\sqrt{10}} & \mbox{Re-write as a single fraction}\\[1.5ex]
x&= & \displaystyle \frac{1-\sqrt{10}}{3 \sqrt{10}}& \mbox{Divide by \(3\), and find the answer}\\[1.5ex]
3x+1& = & \displaystyle 3\cdot \frac{1-\sqrt{10}}{3 \sqrt{10}} +1 &
\mbox{Check that the input of \(\log\) is positive}\\[1.5ex]
& = & \displaystyle \cancel{3}\cdot \frac{1-\sqrt{10}}{\cancel{3} \sqrt{10}} +1 &
\mbox{Cancel the \(3\)} \\[1.5ex]
& = & \displaystyle \frac{1-\sqrt{10}}{ \sqrt{10}} +1 & \mbox{}\\[1.5ex]
& = & \displaystyle \frac{1}{\sqrt{10}} -\frac{\sqrt{10}}{ \sqrt{10}} +1 & \mbox{Split the fraction}\\[1.5ex]
& = & \displaystyle \frac{1}{\sqrt{10}} -1 +1 & \mbox{}\\[1.5ex]
& = & \displaystyle \frac{1}{\sqrt{10}}& \mbox{Simplify. We find a positive input for the logarithm}\\[1.5ex]
& & \mbox{\(x=\displaystyle \frac{1-\sqrt{10}}{3 \sqrt{10}}\)} &
\mbox{So the answer we found is a valid solution}
\end{array}
\]
\item \
\[\begin{array}{rcll}
&&&\\[-6ex]
\log_7(x+4) +\log_7(x-2) & = & 1 & \mbox{The given equation}\\[1.5ex]
\log_7((x+4)(x-2)) & = & 1 & \mbox{Use property (A) on the left side}\\[1.5ex]
(x+4)(x-2) & = & 7^1 & \mbox{Use the translation \(\log_7x=y\Rightarrow 7^y=x\)}\\[1.5ex]
x^2+2x-8 & = & 7 & \mbox{Expand the left side and simplify}\\[1.5ex]
x^2 +2x -15& = 0 & & \mbox{Subtract \(7\) from both sides, simplify}\\[1.5ex]
(x+5)(x-3)&= & & \mbox{Factor the left side}\\[1.5ex]
x+5=0& \mbox{or} & x-3=0 & \mbox{}\\[1.5ex]
x=-5 & \mbox{or} & x=3 &\mbox{Find the answers}\\[1.5ex]
\log_7(-5+4) + \log_7(-5-2) & & & \mbox{Check \(x=-5\)}\\[1.5ex]
\log_7(-1) + \log_7(-7) ? & & & \mbox{Find negative input of logarithm, not a solution }\\[1.5ex]
\log_7(3+4) + \log_7(3-2) & = & 1 & \mbox{Check \(x=3\)}\\[1.5ex]
\log_7 7 + \log_7 1& = & 1 & \mbox{}\\
1 + 0 & = & 1 &\mbox{Find a correct statement}\\[1.5ex]
\mbox{\(x=3\)} & & \xcancel{x=-5}&\mbox{\(x=3\) is the only solution}
\end{array}
\]
\item \
\[\begin{array}{rcll}
&&&\\[-7ex]
\ln(4x) + \ln (1-x) & = & 0 & \mbox{The given equation}\\[1.5ex]
\ln(4x(1-x)) & = & 0 & \mbox{Use property (A) to combine the left side}\\[1.5ex]
4x(1-x) & = & e^0 & \mbox{Use translation \(\ln x = y \Rightarrow e^y=x\)}\\[1.5ex]
4x -4x^2 & = & 1 & \mbox{Expand and simplify}\\[1.5ex]
4x - 4x^2 -1 & = & 0 & \mbox{Subtract \(1\) from both sides}\\[1.5ex]
4x^2 -4x +1&= & 0 & \mbox{Multiply by \(-1\) and re-arrange}\\[1.5ex]
(2x-1)^2& = & & \mbox{Factor}\\[1.5ex]
2x-1& = & =0 &\mbox{Take square root} \\[1.5ex]
2x& = & 1 & \mbox{Add \(1\) to both sides}\\[1.5ex]
x & = & \displaystyle\frac{1}{2} & \mbox{Divide by \(2\), find the answer}\\[1.5ex]
\displaystyle \ln \left(4\cdot \frac{1}{2}\right) + \ln \left(1-\frac{1}{2}\right) & = & 0 & \mbox{Check the answer}\\[1.5ex]
\displaystyle \ln 2 + \ln \frac{1}{2}& = & 0 & \mbox{Simplify}\\[1.5ex]
\ln 2 + \ln 1 -\ln 2 & = & 0&\mbox{Use property (B)}\\[1.5ex]
\ln 2 + 0 - \ln 2 & = & 0 & \mbox{use \(\ln 1 =0\), find a correct statement}\\[1.5ex]
& & \mbox{\(\displaystyle x= \frac{1}{2}\)} & \mbox{The answer we found is a solution}
\end{array}
\]
\end{enumerate}
\end{sol}
\mproblem
Solve the logarithmic equations.
\begin{enumerate}
\item
\(\log x + \log (x-3)=1\)
\item
\(\log_6(x+4) +\log_6(3-x)=1\)
\item
\(2\log_2(4x-3) =-1\)
\end{enumerate}