3.5: Describing Relationships with Logarithmic Functions
Up to this point, we have primarily used logarithmic functions as a tool to solve exponential equations. However, logarithmic functions can be used to describe some relationships on their own, such as sound intensity, soil compaction, earthquakes, or the ph or acidity of a compound. This is our goal for this section. Let's start by graphing logarithmic functions.
Focus: Graphing Logarithmic Functions
First, we will graph the logarithmic function \(y = f(x) =\log _{2} (x)\). We need to find a table of values that represents points on the graph. The relationship is easier to calculate values in exponential form. Converting to exponential form, we have \(x = f^{-1}(y)=2^{y}\).
The exponential function \(x = f^{-1}(y)=2^{y}\) produces this table of values.
| \(y\) | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
| \(x = f^{-1}(y)=2^{y}\) | \(\dfrac{1}{8}\) | \(\dfrac{1}{4}\) | \(\dfrac{1}{2}\) | 1 | 2 | 4 | 8 |
Since the logarithmic function is the inverse of the exponential function, \(y = f(x) =\log _{2} (x)\) produces this table of values, where the inputs and outputs are switched.
| \(x\) | \(\dfrac{1}{8}\) | \(\dfrac{1}{4}\) | \(\dfrac{1}{2}\) | 1 | 2 | 4 | 8 |
| \(y = f(x) =\log _{2} (x)\) | -3 | -2 | -1 | 0 | 1 | 2 | 3 |
In this second table for the values of the logarithm, notice that
1. As the input x increases, the output y increases at a slower and slower rate. In symbolic notation, we write this as \(x \to \infty ,f(x) \to \infty\).
2. As the input x decreases towards zero, the the output y becomes a larger and larger size negative number approaching negative infinity. In symbolic notation, we write as \(x \to 0^{+} ,f(x) \to -\infty\).
3. Since the outputs of an exponential function are only positive values, the inputs of a logarithm can only be positive values. Therefore, the domain of the log function is \((0,\infty )\).
4. Since the inputs of an exponential function can accept all real numbers as inputs, the logarithm can output any real number, so the range is all real numbers or \((-\infty ,\infty )\).
Sketching the graph,
Key Point: The Features of the Graph of a Logarithm
Graphically, in the function \(g(x)=\log _{b} (x)\)
- The graph has a horizontal or x-intercept at (1, 0)
- The graph is increasing at a slower and slower rate
- The domain of the function is \(x > 0\), or \((0,\infty )\)
- The range of the function is all real numbers, or \((-\infty ,\infty )\)
When sketching a general logarithm with base \(b\), it can be helpful to remember that the graph will pass through the points (1, 0) and (\(b\), 1). To get a feeling for how the base affects the shape of the graph, examine the graphs below.
Notice that the larger the base, the slower the graph grows. For example, the common log graph, while it grows without bound, it does so very slowly. For example, to reach an output of 8, the input must be 100,000,000.
Focus: The Domain of Logarithmic Functions
Another important observation made was the domain of the logarithm. Like the reciprocal and square root functions, the logarithm has a restricted domain which must be considered when finding the domain of a composition involving a log.
The input of a logarithmic function must be positive.
Example \(\PageIndex{1}\)
Find the domain of the logarithmic functions
a) \(f(x)=\log (5-2x)\).
b) \(f(x)=ln(x-5)+2\).
Solution
a) The logarithm is only defined with the input is positive, so this function will only be defined when \(5 - 2x > 0\). Solving this inequality,
\[\begin{align*} -2x &>-5 \\[4pt] x &< \dfrac{5}{2} \end{align*} \nonumber\]
The domain of this function is \(x < \dfrac{5}{2}\), or in interval notation, \(\left(-\infty ,\dfrac{5}{2} \right)\)
b) The logarithm is only defined with the input is positive, so this function will only be defined when \(x-5 > 0\). Solving this inequality,
\[x > 5 \nonumber\]
The domain of this function is \(x > 5\), or in interval notation, \(\left(5 , \infty \right)\).
Find the domain of the function \(f(x)= \log _{3} (3x+4) \).
- Answer
-
The logarithm is only defined with the input is positive, so this function will only be defined when \(3x+4 > 0\). Solving this inequality,
\[\begin{align*} 3x &>-4 \\[4pt] x &> \dfrac{-4}{3} \end{align*} \nonumber\]
The domain of this function is \(x > \dfrac{-4}{3}\), or in interval notation, \(\left(\dfrac{-4}{3} , \infty \right)\)
Focus: An Application Logarithmic Functions
Case: Soil Compaction
Soil compaction, the relationship between the amount of force F applied to soil and the distance the soil compacts Y, can be described by a logarithmic function. To understand why a logarithmic function is appropriate to describe soil compaction, consider the following scenario. If two people, first a smaller person followed by a larger person, walking in line in the others tracks on deep fresh snow with snowshoes of the same size. If the smaller person with a smaller weight, such as \(F_1 = 100 lbs\) , steps on a fresh snow with their snowshoe, the snow will compact a distance \(y_1\). If the larger person with a larger weight, such as \(F_2 = 200 lbs\) , steps into the same snowshoe track of the smaller person ahead of them, the snow will compact an additional, but smaller distance \(y_2\) corresponding to the increase in force \( \Delta F = 100\). In general, as larger and larger force is applied to the snow with the same surface area, the distance compacted increases at a smaller and smaller rate, just like that of a logarithmic function.
In many locations, the soil consists of layers of different types of soil, such as sand, clay, rock, and top soil. Each soil layer compacts differently and would be described by a different logarithmic functions, such as \(y_1 =a_1 ln(b_1 F_1 - c_1)+ d_1\) for one soil layer and \(y_2=a_2 ln(b_2 F_2 -c_2 )+ d_2\) for another soil layer where a,b,c, and d are constants. To find the total compaction of all soil layers, we would add two corresponding logarithmic functions. We need to develop additional properties of logarithms in order to perform operations on logarithms like this.
Focus: Operations and Simplifying with Logarithmic Expressions
There are additional properties of logarithms that will allow us to add and subtract logarithmic expressions like the ones mentioned above.
Additional Properties of logarithms
1) The Log Sum Property:
\[\log _{b} \left(M\right)+\log _{b} \left(N\right)=\log _{b} (MN)\]
In words, to add two logs of the same base, multiply the inputs in a single logarithm.
2) The Log Difference Property:
\[\log _{b} \left(M\right)-\log _{b} \left(N\right)=\log _{b} \left(\dfrac{M}{N} \right) \]
In words, to subtract two logs of the same base, divide the inputs in a single logarithm.
3) The Power Property of Logarithms:
\[\log _{b} \left(x^{n} \right)=n\log _{b} \left(x\right)\]
We offer a proof of Property 3.5.1 to help solidify our new rules and show how they follow from properties you’ve already seen.
Proof
Let \(a=\log _{b} \left(M\right)\) and \(c=\log _{b} \left(N\right)\).
Converting each expression to exponential form, \(b^{a} =M\) and \(b^{c} =N\).
Multiplying the expressions on the left side of the two equations by the expressions on the right side of the equations, we have
\[MN=b^{a} b^{c} \nonumber\]
Using the laws of exponents on the expression on the right side, we have
\[MN=b^{a+c} \nonumber\]
Converting this expression back to logarithmic form we have
\[\log _{b} \left(MN\right)=a+c \nonumber\]
Replacing \(a\) and \(c\) with their definition establishes the result
\[\log _{b} \left(MN\right)=\log _{b} M+\log _{b} N \nonumber\]
The proof for the difference property is very similar.
With these properties, we can rewrite expressions involving multiple logs as a single log, or break an expression involving a single log into expressions involving multiple logs.
Example \(\PageIndex{2}\)
Simplify the logarithmic expressions by writing them as a single logarithm.
a) \(y = \log _{3} \left(5\right)+\log _{3} \left(8\right)-\log _{3} \left(2\right)\)
b) \(y = 2\log \left(x\right)+3\log \left(4x^{2}\right)\)
Solution
a) Using the sum of logs property on the first two terms,
\[\log _{3} \left(5\right)+\log _{3} \left(8\right)=\log _{3} \left(5\cdot 8\right)=\log _{3} \left(40\right) \nonumber\]
This reduces our original expression to
\[y = \log _{3} \left(40\right)-\log _{3} \left(2\right) \nonumber\]
Then using the difference of logs property,
\[y= \log _{3} \left(40\right)-\log _{3} \left(2\right)=\log _{3} \left(\dfrac{40}{2} \right)=\log _{3} \left(20\right) \nonumber\]
b) In this example, we have logarithmic terms with a constant multiples. The Sum Property of logs only applies if we adding two logs without constant multiples. We can remedy this by using the power property of logs on each expression to write
\[y =2\log \left(x\right) + 3\log \left(4x^{2}\right) =\log \left(x^{2} \right) + \log \left((4x^{2})^{3}\right) \nonumber\]
Notice in the second expression, which has two factors in its input, we had to raise the whole input to that power when using the power property of logs. Simplifying the inputs of each logarithm, then utilizing the sum of logs property we have
\[y =\log \left(x^{2} \right) + \log \left(64x^{6}\right) = \log (x^{2} \cdot 64x^{6}) \nonumber\]
Performing the multiplication in the input of the logarithm we have:
\[y= \log (64x^{8}) \nonumber\]
Simplify the logarithmic expressions by writing them as a single logarithm.
a) \(y = \log _{2} \left(4x\right)+\log _{2} \left(8x\right)\)
b) \(y = 10\cdot ln\left(x\right) - 2\cdot ln \left(3x^{4}\right)\)
- Answer
-
a) Using the sum of logs property,
\[y = \log _{2} \left(4x\right)+\log _{2} \left(8x\right) =\log _{2} \left(4x\cdot 8x\right)=\log _{2} \left(32x^{2}\right) \nonumber\]
b) First, we need to use the power property of logs on each expression to write
\[y = 10\cdot ln\left(x\right) - 2\cdot ln\left(3x^{4}\right) =ln\left(x^{10}\right) - ln\left((3x^{4})^{2}\right) \nonumber\]
Simplifying the inputs of each logarithm, then utilizing the difference of logs property we have
\[y =ln\left(x^{10}\right) - ln\left(9x^{8}\right) = ln(\dfrac{x^{10}}{9x^{8}}) = ln(\dfrac{x^{2}}{9}) \nonumber\]
Notice, in the examples above, we were able to perform the operations inside of the logarithm and ultimately simplify the expression since the expressions involved the same variables. Logarithmic expressions with multiple variables on the other hand may be simplified by writing them as a sum or difference of simpler logarithmic expressions.
Rewrite \(y=\ln \left(\dfrac{x^{4} y}{z} \right)\) as a sum or difference of logs
Solution
First, noticing we have a quotient of two expressions, we can utilize the difference property of logs to write
\[y=\ln \left(\dfrac{x^{4} y}{z} \right)=\ln \left(x^{4} y\right)-\ln (z) \nonumber\]
Then seeing the product in the first term, we use the sum property
\[y=\ln \left(x^{4} y\right)-\ln (z)=\ln \left(x^{4} \right)+\ln (y)-\ln (z)\nonumber\]
Finally, we could use the power property on the first term
\[y= \ln \left(x^{4} \right)+\ln (y)-\ln (z)=4\ln (x)+\ln (y)-\ln (z) \nonumber\]
Focus: More on Solving Logarithmic Equations
Case: An equation with one log term.
In sec. 3.4, we explored solving logarithmic equations with one log term such as the one in the example below.
\[3\log_{2} (x)=12.\nonumber\]
Solution
We learned that we could solve this type of logarithmic function by isolating the log term. \[\log_{2} (x)= \dfrac{12}{3}=4\nonumber\]
Then converting to exponential form and solving if necessary gives us our solution.
\[x = 2^{4} =16 \nonumber\]
Case: An equation with two or more log terms.
If we have two log terms in an equation, such as \[\log_{2} (x^{2}) + \log_{2} (3x)=12\nonumber\] we can't isolate a single log term. However, we can use the properties of logarithms to write the equation with one log term. Then solve the equation like we did in example 3.5.4.
Example \(\PageIndex{5}\)
Solve \(\log_{2} (x) + \log_{2} (3x)=5\)
Solution
\[\log_{2} (x) + \log_{2} (3x)=5\nonumber\] First, we combine the two log terms into one using the sum property of logarithms.
\[\log_{2} (x \cdot 3x) =5\nonumber\] Simplifying.
\[\log_{2} (3x^{2}) =5\nonumber\] Then converting to exponential form
\[3x^{2} = 2^{5} \nonumber\] and solving.
\[x^{2} = \dfrac{32}{3} \nonumber\]
\(x =+ \sqrt(\dfrac{32}{3}) \approx +3.266\) or \(x =- \sqrt(\dfrac{32}{3}) \approx -3.266 \)
However, \( x \approx -3.266 \) is not in the domain of the original logarithmic expressions. We can't input negative numbers into logarithms. We call this an extraneous solution. This equation has no solutions.
When using the log sum or difference properties in solving logarithmic equations with two or more terms, verify whether or not your solutions are in the domain of the original logarithmic expressions.
Notice that an extraneous solution to a logarithmic equation with two log terms can occur when using the sum or difference properties of logarithms in certain cases. For example, \( log(-2)\) and \( log(-50)\) are not defined since the inputs of the logarithm are negative. However, when using the log sum property on the \( log(-2) + log(-50) = log(-2 \cdot -50) = log(100) = 2\), we end up with an expression on the right side of the equation that is defined even though the original expression was not defined.
Example \(\PageIndex{6}\)
Solve \(2\log (4x^{2})-3\log (x)=2\).
Solution
We need a single logarithmic expression on the left side of the equation. First we need to use the power property of logs and simplifying.
\[\log ((4x^{2})^2)-\log (x^{3})=2 \nonumber\]
\[\log (16x^{4})-\log (x^{3})=2 \nonumber\]
Then using the difference property of logs, we can rewrite the left side:
\[\log \left(\dfrac{16x^{4}}{x^{3}} \right)=2 \nonumber\]
\[\log \left(16x \right)=2 \nonumber\]
Then converting to exponential form
\[10^{2} = 16x \nonumber\] and solving
\[x = \dfrac{100}{16} = 6.25\nonumber\]
Checking this answer in the original equation, we can verify there are no domain issues, and this answer is correct.Exercise \(\PageIndex{7}\)
Solve \(\log (x^{2} -4)=1+\log (x+2)\).
- Answer
-
\[\log (x^{2} -4)=1+\log (x+2)\nonumber\] Move both logs to one side
\[\log \left(x^{2} -4\right)-\log \left(x+2\right)=1\nonumber\] Use the difference property of logs
\[\log \left(\dfrac{x^{2} -4}{x+2} \right)=1\nonumber\] Factor
\[\log \left(\dfrac{(x+2)(x-2)}{x+2} \right)=1\nonumber\] Simplify
\[\log \left(x-2\right)=1\nonumber\] Rewrite as an exponential
\[10^{1} =x-2\nonumber\] Add 2 to both sides
\[x=12\nonumber\]
Solve \(\ln (3x)+2 \cdot \ln (x)=1\).
- Answer
-
\[\ln (3x)+2 \ln (x)=1\nonumber\] Use the power property of exponents to remove the coefficient of the logarithm.
\[\ln (3x)+\ln (x^{2})=1\nonumber\] Use the sum of logs property on the right.
\[\ln (3x \cdot x^{2}) = 1\nonumber\] Simplify.\[\ln (3x^{3}) = 1\nonumber\]. Converting to exponential form.
\[e^{1} = 3x^{3} \nonumber\] and solving
\[x = \dfrac{e}{3}^{\tfrac{1}{3}} \approx 0.7439\nonumber\]
Focus: Solving More Complex Exponential Equations
More complex exponential equations can often be solved in more than one way. In the following example, we will solve the same problem in two ways – one using logarithm properties, and the other using exponential properties.
Example \(\PageIndex{8a}\)
In 2008, the population of Kenya was approximately 38.8 million, and was growing by 2.64% each year, while the population of Sudan was approximately 41.3 million and growing by 2.24% each year(World Bank, World Development Indicators, as reported on http://www.google.com/publicdata , retrieved August 24, 2010). If these trends continue, when will the population of Kenya match that of Sudan?
Solution
We start by writing an equation for each population in terms of \(t\), the number of years after 2008.
\[\begin{array}{l} {Kenya(t)=38.8(1+0.0264)^{t} } \\ {Sudan(t)=41.3(1+0.0224)^{t} } \end{array}\nonumber\]
To find when the populations will be equal, we can set the equations equal
\[38.8(1.0264)^{t} =41.3(1.0224)^{t} \nonumber\]
For our first approach, we take the log of both sides of the equation.
\[\log \left(38.8(1.0264)^{t} \right)=\log \left(41.3(1.0224)^{t} \right) \nonumber\]
Utilizing the sum property of logs, we can rewrite each side,
\[\log (38.8)+\log \left(1.0264^{t} \right)=\log (41.3)+\log \left(1.0224^{t} \right)\nonumber\]
Then utilizing the exponent property, we can pull the variables out of the exponent
\[\log (38.8)+t\log \left(1.0264\right)=\log (41.3)+t\log \left(1.0224\right) \nonumber\]
Moving all the terms involving \(t\) to one side of the equation and the rest of the terms to the other side,
\[t\log \left(1.0264\right)-t\log \left(1.0224\right)=\log (41.3)-\log (38.8) \nonumber\]
Factoring out the \(t\) on the left,
\[t\left(\log \left(1.0264\right)-\log \left(1.0224\right)\right)=\log (41.3)-\log (38.8)\nonumber\]
Dividing to solve for \(t\)
\[t=\dfrac{\log (41.3)-\log (38.8)}{\log \left(1.0264\right)-\log \left(1.0224\right)} \approx 15.991\nonumber\]
It will be 15.991 years until the populations will be equal.
Example \(\PageIndex{8b}\)
Solve the problem above by rewriting before taking the log.
Solution
Starting at the equation
\[38.8(1.0264)^{t} =41.3(1.0224)^{t}\nonumber\]
Divide to move the exponential terms to one side of the equation and the constants to the other side
\[\dfrac{1.0264^{t} }{1.0224^{t} } =\dfrac{41.3}{38.8}\nonumber\]
Using exponent rules to group on the left,
\[\left(\dfrac{1.0264}{1.0224} \right)^{t} =\dfrac{41.3}{38.8}\nonumber\]
Taking the log of both sides
\[\log \left(\left(\dfrac{1.0264}{1.0224} \right)^{t} \right)=\log \left(\dfrac{41.3}{38.8} \right)\nonumber\]
Utilizing the exponent property on the left,
\[t\log \left(\dfrac{1.0264}{1.0224} \right)=\log \left(\dfrac{41.3}{38.8} \right)\nonumber\]
Dividing gives
\[t=\dfrac{\log \left(\dfrac{41.3}{38.8} \right)}{\log \left(\dfrac{1.0264}{1.0224} \right)} \approx 15.991\text{ years}\nonumber\]
While the answer does not immediately appear identical to that produced using the previous method, note that by using the difference property of logs, the answer could be rewritten:
\[t=\dfrac{\log \left(\dfrac{41.3}{38.8} \right)}{\log \left(\dfrac{1.0264}{1.0224} \right)} =\dfrac{\log (41.3)-\log (38.8)}{\log (1.0264)-\log (1.0224)}\nonumber\]
Focus: More Applications with Logarithmic Functions
Earthquakes
A logarithmic function is used for earthquakes. This scale is commonly and mistakenly called the Richter Scale, which was a very similar scale succeeded by the MMS.
Moment Magnitude Scale
For an earthquake with seismic moment \(S\), a measurement of earth movement, the MMS value, or magnitude of the earthquake, is
\[M = \dfrac{2}{3} log(\dfrac{S}{S_0})\]
Where \(S_0 = 10^{16}\) is a baseline measure for the seismic moment.
Example \(\PageIndex{9}\)
If one earthquake has a MMS magnitude of 6.0, and another has a magnitude of 8.0, how much more powerful (in terms of earth movement) is the second earthquake?
Solution
Since the first earthquake has magnitude 6.0, we can find the amount of earth movement for that quake, which we'll denote \(S_1\). The value of \(S_0\) is not particularity relevant, so we will not replace it with its value.
\[6.0 = \dfrac{2}{3} log (\dfrac{S_1}{S_0})\nonumber\]
\[6.0 (\dfrac{3}{2}) = log (\dfrac{S_1}{S_0})\nonumber\]
\[9 = log(\dfrac{S_1}{S_0})\nonumber\] Converting to exponential form
\[\dfrac{S_1}{S_0} = 10^9\nonumber\]
\[S_1 = 10^9 S_0\nonumber\]
This tells us the first earthquake has about \(10^9\) times more earth movement than the baseline measure.
Doing the same with the second earthquake, \(S_2\), with a magnitude of 8.0,
\[8.0 = \dfrac{2}{3} log (\dfrac{S_2}{S_0})\nonumber\]
\[S_2 = 10^{12} S_0\nonumber\]
Comparing the earth movement of the second earthquake to the first,
\[\dfrac{S_2}{S_1} = \dfrac{10^{12} S_0} {10^9 S_0} = 10^3 = 1000\nonumber\]
The second value's earth movement is 1000 times as large as the first earthquake.
Example \(\PageIndex{10}\)
One earthquake has magnitude of 3.0. If a second earthquake has twice as much earth movement as the first earthquake, find the magnitude of the second quake.
Solution
Since the first quake has magnitude 3.0,
\[3.0 = \dfrac{2}{3} log (\dfrac{S}{S_0})\nonumber\]
Solving for \(S\),
\[3.0 \dfrac{3}{2} = log (\dfrac{S}{S_0})\nonumber\]
\[4.5 = log (\dfrac{S}{S_0})\nonumber\] Converting to exponential form
\[10^{4.5} = \dfrac{S}{S_0}\nonumber\]
\[S = 10^{4.5} S_0\nonumber\]
Since the second earthquake has twice as much earth movement, for the second quake,
\[S = 2 \cdot 10^{4.5} S_0\nonumber\]
Finding the magnitude,
\[M = \dfrac{2}{3} log (\dfrac{2 \cdot 10^{4.5} S_0}{S_0})\nonumber\]
\[M = \dfrac{2}{3} log (2 \cdot 10^{4.5}) \approx 3.201\nonumber\]
The second earthquake with twice as much earth movement will have a magnitude of about 3.2.
Measuring Ph, the acidity or basicity of a liquid.
In chemistry, pH is a measure of the acidity or basicity of a liquid. The pH is related to the concentration of hydrogen ions, [ H \({}^{+}\)], measured in moles per liter, by the equation
\[pH=-\log \left(\left[H^{+} \right]\right)\]
If a liquid has concentration of 0.0001 moles per liber, determine the pH.
Determine the hydrogen ion concentration of a liquid with pH of 7.
Solution
To answer the first question, we evaluate the expression \(-\log \left(0.0001\right)\). While we could use our calculators for this, we do not really need them here, since we can use the inverse property of logs:
\[-\log \left(0.0001\right)=-\log \left(10^{-4} \right)=-(-4)=4\nonumber\]
To answer the second question, we need to solve the equation \(7=-\log \left(\left[H^{+} \right]\right)\). Begin by isolating the logarithm on one side of the equation by multiplying both sides by -1:
\[-7=\log \left(\left[H^{+} \right]\right)\nonumber\] Rewriting into exponential form yields the answer:
\[\left[H^{+} \right]=10^{-7} =0.0000001\text{ moles per liter}\nonumber \]
If the concentration of hydrogen ions in a liquid is doubled, what is the effect on pH?
Solution
Suppose \(C\) is the original concentration of hydrogen ions, and \(P\) is the original pH of the liquid, so \(P=-\log \left(C\right)\). If the concentration is doubled, the new concentration is \(2C\). Then the pH of the new liquid is
\[pH=-\log \left(2C\right) \nonumber\]
Using the sum property of logs,
\[pH=-\log \left(2C\right)=-\left(\log (2)+\log (C)\right)=-\log (2)-\log (C) \nonumber\]
Since \(P=-\log \left(C\right)\), the new pH is
\[pH=P-\log (2)=P-0.301 \nonumber\]
When the concentration of hydrogen ions is doubled, the pH decreases by 0.301.
Important Topics of this Section
- Graphing log functions
- Solving logarithmic functions
- Sum of logs property
- Difference of logs property
- Applications of logarithmic equations