math.wiki
Functions › Logarithms › Expanding and condensing logarithms
Open on the map
Algebra 2

Expanding and condensing logarithms

The laws of logarithms each break one product, quotient or power apart. How do they work together on an expression with all three at once, and how is a string of logarithms gathered back into one?

Where you are 11 in Logarithms

When you reach for it

The laws of logarithms each do one thing: a product inside a logarithm becomes a sum, a quotient becomes a difference, and a power becomes a multiple. Real expressions seldom need only one of them. The logarithm of \displaystyle \frac{x^4\sqrt{y}}{z^2} has a quotient, a product, two powers and a root inside it, and getting it into its simplest pieces takes all three laws, used in the right order.

Two jobs come up, and they are the same laws read in opposite directions.

Expanding a logarithm means rewriting it as a sum and difference of multiples of logarithms, each of which has no product, quotient, power or root left in its argument. It is what you want when the separate pieces are easier to handle than the whole: when some of them are known numbers, when a function is easier to study term by term, or, later, in calculus, when a product of many factors is easier to differentiate as a sum.

Condensing a logarithmic expression means gathering a sum and difference of multiples of logarithms, all with the same base, into a single logarithm with coefficient 1. It is what you want when the pieces are awkward but the whole is simple, as in 2 \log 5 + \log 4, where neither logarithm is a whole number but the combination is. It is also the first move in solving a logarithmic equation, where one logarithm on each side can be turned back into a power statement.

The procedure

Throughout, every variable stands for a positive number, so that every logarithm written down exists. Where an argument has a sum in it, such as x + 6, the lesson says for which values of x the work holds; that condition is part of the answer.

Expanding works from the outside in. Look at the argument as a whole and ask what its last operation is, the one you would do last if you were computing it. That operation is the first law to use.

If the whole argument sits under a root or is raised to a power, the power law comes first, and the exponent multiplies everything that follows. For a root, write it as a power first: \displaystyle \sqrt[n]{M} = M^{\frac{1}{n}}. It is safest to put the rest in brackets, so that the multiplier reaches every term:

\log_b \sqrt[3]{Q} = \frac{1}{3}\log_b Q

If the argument is a fraction, the quotient law splits it into the logarithm of the top minus the logarithm of the bottom. The whole bottom is subtracted, so if the bottom is itself a product, its logarithm is a sum, and every term of that sum carries the minus sign:

\begin{aligned} \log_b \frac{M}{NP} &= \log_b M - \left(\log_b N + \log_b P\right) \\ &= \log_b M - \log_b N - \log_b P \end{aligned}

Once top and bottom are separate, the product law splits each into the logarithms of its factors. Finally the power law brings each factor’s exponent down in front of its logarithm. Any piece that is a logarithm of a known number is then worked out, so that \log_2 8 becomes 3 and \ln e becomes 1.

Each step is one law applied to arguments that are positive, so each is allowed. The order matters only for keeping track: the laws themselves can be used in any order that applies, and the result is the same.

Condensing works from the inside out, in reverse. A number multiplying a logarithm has to become an exponent first, by the power law read from right to left, p\log_b M = \log_b\left(M^p\right). Only a logarithm with coefficient 1 can be fed to the product or quotient law, because those laws are about \log_b M + \log_b N, not about 2\log_b M + \log_b N. Then terms with a plus sign go into the top of one argument as factors, by the product law, and terms with a minus sign go into the bottom, by the quotient law. A multiplier outside a bracket of several logarithms is used last: the bracket is condensed first, and the multiplier then becomes an exponent on the whole argument.

All the logarithms being condensed must have the same base. The product law is a statement about one base b, so \log_2 x + \log_3 y cannot be gathered by it.

A check that costs nothing. Expanding and condensing undo each other. After expanding, condense the answer in your head and see the original come back; after condensing, expand the single logarithm and see the original terms.

\displaystyle \log_3 \frac{x^4\sqrt{y}}{z^2}
\displaystyle \log_3\left(x^4\sqrt{y}\right)
-\log_3\left(z^2\right)
4\log_3 x
\tfrac{1}{2}\log_3 y
-2\log_3 z
4\log_3 x + \tfrac{1}{2}\log_3 y - 2\log_3 z
Figure 1Expanding works from the outside in. The quotient law splits top from bottom, the product law splits the top into its factors, and the power law brings each exponent down in front.

Worked examples

Example 1

Three laws on one argument

Expand \displaystyle \log_3 \frac{x^4\sqrt{y}}{z^2}, where x, y and z are positive.

Solution

The last operation in the argument is the division by z^2, so the quotient law comes first:

\begin{aligned} &\log_3 \frac{x^4\sqrt{y}}{z^2} \\ &\quad = \log_3\left(x^4\sqrt{y}\right) - \log_3\left(z^2\right) \end{aligned}

The top is a product of x^4 and \displaystyle \sqrt{y}, both positive, so the product law splits it:

\begin{aligned} &\log_3\left(x^4\sqrt{y}\right) - \log_3\left(z^2\right) \\ &\quad = \log_3\left(x^4\right) + \log_3 \sqrt{y} - \log_3\left(z^2\right) \end{aligned}

Now every argument is a single variable raised to a power. The square root is the power \displaystyle \frac{1}{2}, and the power law brings each exponent down in front:

\begin{aligned} &\log_3 \frac{x^4\sqrt{y}}{z^2} \\ &\quad = 4\log_3 x + \frac{1}{2}\log_3 y - 2\log_3 z \end{aligned}

As a check, condense the answer: 4\log_3 x = \log_3\left(x^4\right), \displaystyle \frac{1}{2}\log_3 y = \log_3 \sqrt{y} and 2\log_3 z = \log_3\left(z^2\right); the two plus terms multiply in the top and the minus term goes to the bottom, giving the original. The figure above shows the same work as a tree.

Example 2

Numbers inside the argument

Expand each, and work out any logarithm of a number. Here x and y are positive.

(a) \displaystyle \log_2\left(8x\sqrt[3]{y^2}\right) (b) \displaystyle \log \sqrt{100x^3}

Solution

(a) The argument is a product of three positive factors, so the product law gives three logarithms:

\begin{aligned} \log_2\left(8x\sqrt[3]{y^2}\right) &= \log_2 8 + \log_2 x + \log_2 \sqrt[3]{y^2} \\ &= 3 + \log_2 x + \frac{2}{3}\log_2 y \end{aligned}

because 2^3 = 8, and \displaystyle \sqrt[3]{y^2} = y^{\frac{2}{3}}, so the power law brings \displaystyle \frac{2}{3} down.

(b) Here the square root covers the whole argument, so it is the last operation and the power law comes first. The \displaystyle \frac{1}{2} multiplies everything that the rest of the work produces, so keep a bracket:

\begin{aligned} \log \sqrt{100x^3} &= \frac{1}{2}\log\left(100x^3\right) \\ &= \frac{1}{2}\left(\log 100 + 3\log x\right) \\ &= 1 + \frac{3}{2}\log x \end{aligned}

since \log 100 = 2 (the common logarithm has base 10, and 10^2 = 100). Without the bracket the \displaystyle \frac{1}{2} would reach only the first term, and the answer would be wrong.

Example 3

A root over a whole fraction

Expand \displaystyle \ln \sqrt[3]{\frac{x^2}{ey}}, where x and y are positive.

Solution

The cube root covers the whole fraction, so the power law with exponent \displaystyle \frac{1}{3} comes first:

\ln \sqrt[3]{\frac{x^2}{ey}} = \frac{1}{3}\ln \frac{x^2}{ey}

Inside the bracket, the quotient law subtracts the logarithm of the whole bottom. The bottom is the product ey, whose logarithm is \ln e + \ln y = 1 + \ln y, because the natural logarithm has base e. Keep that sum in a bracket, since all of it is subtracted:

\begin{aligned} \frac{1}{3}\ln \frac{x^2}{ey} &= \frac{1}{3}\Big(2\ln x - (1 + \ln y)\Big) \\ &= \frac{1}{3}\left(2\ln x - 1 - \ln y\right) \\ &= \frac{2}{3}\ln x - \frac{1}{3}\ln y - \frac{1}{3} \end{aligned}

Both the 1 and the \ln y carry the minus sign, because both came from the bottom.

Example 4

Factors that are sums

Expand \displaystyle \log_7 \frac{x^2 - 25}{(x + 2)^3}, and say for which x the expansion is equal to the original.

Solution

The laws act on products, quotients and powers, and x^2 - 25 is a difference, which no law can split. But it factors, as a difference of two squares: x^2 - 25 = (x - 5)(x + 5). Once it is a product, the laws apply:

\begin{aligned} \log_7 \frac{x^2 - 25}{(x + 2)^3} &= \log_7 \frac{(x - 5)(x + 5)}{(x + 2)^3} \\ &= \log_7(x - 5) + \log_7(x + 5) \\ &\qquad - 3\log_7(x + 2) \end{aligned}

The factors x + 5 and x + 2 stay inside their logarithms whole: they are sums, and a logarithm of a sum does not break apart.

Each law needs its own arguments positive: x - 5 > 0, x + 5 > 0 and x + 2 > 0. All three hold exactly when x > 5. The original logarithm is defined in more places: at x = -4, for instance, the argument is \displaystyle \frac{-9}{-8} = \frac{9}{8}, which is positive, but \log_7(-4 - 5) in the expansion has no real value. So the two sides are equal for x > 5 and only there.

Example 5

Condensing to a number

Write each as a single logarithm and find its value.

(a) 2\log 5 + \log 4 (b) 3\log_2 6 - \log_2 27

Solution

(a) Neither \log 5 nor \log 4 is a whole number, but the sum might be. First the coefficient becomes an exponent, by the power law read from right to left: 2\log 5 = \log\left(5^2\right) = \log 25. Now both logarithms have coefficient 1 and the same base, 10, so the product law gathers them:

\begin{aligned} 2\log 5 + \log 4 &= \log 25 + \log 4 \\ &= \log(25 \cdot 4) = \log 100 = 2 \end{aligned}

The order matters: the 2 belongs to \log 5 alone, so it must go onto the 5 before the product is formed.

(b) Again the coefficient goes first: 3\log_2 6 = \log_2\left(6^3\right) = \log_2 216. Then the quotient law gathers the difference:

\begin{aligned} 3\log_2 6 - \log_2 27 &= \log_2 216 - \log_2 27 \\ &= \log_2 \frac{216}{27} = \log_2 8 = 3 \end{aligned}

since 216 = 27 \cdot 8 and 2^3 = 8.

Example 6

Condensing expressions

Write each as a single logarithm with coefficient 1.

(a) \displaystyle 2\log_3 a - 5\log_3 b + \frac{1}{3}\log_3 c, for positive a, b and c.

(b) \displaystyle \frac{1}{2}\big(\ln x - 3\ln(x + 4)\big), for x > 0.

Solution

(a) Each coefficient becomes an exponent on its own argument: 2\log_3 a = \log_3\left(a^2\right), 5\log_3 b = \log_3\left(b^5\right) and \displaystyle \frac{1}{3}\log_3 c = \log_3 \sqrt[3]{c}. The two terms with a plus sign multiply in the top, by the product law, and the term with a minus sign goes to the bottom, by the quotient law:

\begin{aligned} &2\log_3 a - 5\log_3 b + \frac{1}{3}\log_3 c \\ &\quad = \log_3 \frac{a^2\sqrt[3]{c}}{b^5} \end{aligned}

(b) The \displaystyle \frac{1}{2} multiplies the whole bracket, so the bracket is condensed first. Inside it, 3\ln(x + 4) = \ln\left((x + 4)^3\right), and the quotient law gives

\ln x - 3\ln(x + 4) = \ln \frac{x}{(x + 4)^3}

Now the \displaystyle \frac{1}{2} becomes the exponent of the whole argument, which is a square root:

\begin{aligned} &\frac{1}{2}\big(\ln x - 3\ln(x + 4)\big) \\ &\quad = \ln \sqrt{\frac{x}{(x + 4)^3}} \end{aligned}

The original needs x > 0 (and then x + 4 > 0 as well). The single logarithm is also defined when x < -4, where top and bottom are both negative, so the two are equal for x > 0 only.

Example 7

Condense, simplify, then evaluate

Simplify \log_6\left(x^2 - 1\right) - \log_6(x - 1) to a single logarithm with no fraction in it, and use the result to find its value at x = 35. Say for which x the simplification holds.

Solution

Both logarithms have base 6 and coefficient 1, so the quotient law gathers them. For x > 1 both arguments are positive, since x^2 - 1 = (x - 1)(x + 1) with both factors positive:

\begin{aligned} \log_6\left(x^2 - 1\right) - \log_6(x - 1) &= \log_6 \frac{x^2 - 1}{x - 1} \\ &= \log_6 \frac{(x - 1)(x + 1)}{x - 1} \\ &= \log_6(x + 1) \end{aligned}

The factor x - 1 cancels because it is not zero when x > 1. At x = 35 the value is \log_6 36 = 2, since 6^2 = 36. Working it out the long way agrees: the original is \log_6 1224 - \log_6 34, and \displaystyle \frac{1224}{34} = 36.

The simplified form \log_6(x + 1) is defined for every x > -1, a wider set. At x = 0 it gives \log_6 1 = 0, but the original has \log_6(-1) in it and does not exist there. The two are equal for x > 1, which is what the original allows.

Boundaries

Every argument in every step must be positive. Each law is proved for positive arguments, and expanding or condensing is a chain of those laws. With variables this means the expanded and the condensed forms can have different domains, as in Examples 4, 6 and 7: an identity between them holds only where every logarithm on both sides is defined. When the condensed form is defined at more values, those extra values are where solving logarithmic equations can produce answers that have to be dropped.

Sums and differences inside the argument do not split. There is no law for \log_b(M + N), so \ln\left(x^2 + 9\right) is already fully expanded. A sum or difference can be expanded only if it first factors into a product, as x^2 - 25 = (x - 5)(x + 5) did in Example 4.

Even powers of quantities that may be negative. The power law needs a positive base of the power. If x might be negative, \log_b\left(x^2\right) is 2\log_b |x|, not 2\log_b x; in this lesson the variables are positive, which is what lets the absolute value be dropped.

One base at a time. Condensing needs all the logarithms to share a base. \log 5 + \ln 4 has one base 10 term and one base e term, and neither law can combine them. Moving a logarithm to a different base is the job of Change of base.

A coefficient belongs to its own logarithm. The power law turns p\log_b M into \log_b\left(M^p\right), and the p goes onto M alone. It is only when a multiplier sits outside a bracket of several logarithms that it becomes an exponent on the whole condensed argument.

Where this goes next

Condensing is the first move in solving logarithmic equations: several logarithms become one, the equation is rewritten in exponential form, and the domain conditions from this lesson decide which answers survive. Expanding is used in taking a logarithm of both sides of an exponential equation, where the logarithm of a product of powers splits into terms and the unknown exponent comes down in front. Expanding the logarithm of data that follows a power law turns it into a straight line, which is how log-log plots work. In calculus, expanding first turns a product or quotient of many factors into a sum, which is the idea behind logarithmic differentiation.

Exercises

In every exercise the variables stand for positive numbers, except where a factor is a sum; there, say for which x the work holds.

Expand

  1. \log_2\left(a^3b^2\right)
  2. \displaystyle \ln \frac{p^5}{q}
  3. \displaystyle \log_4 \frac{\sqrt{m}}{n^3}
  4. \displaystyle \log \frac{uv^4}{w^6}
  5. \displaystyle \log_5 \sqrt[4]{s^3t}
  6. \displaystyle \ln \frac{1}{a^2b^7}

Expand and work out the numbers

  1. \log_3\left(27k^5\right)
  2. \displaystyle \log_2 \frac{x^6}{16}
  3. \displaystyle \ln\left(e^3\sqrt{r}\right)
  4. \displaystyle \log \sqrt[3]{\frac{1000}{y^2}}

Factors that are sums

  1. \displaystyle \log_2 \frac{x^3}{x + 6}
  2. \displaystyle \ln\left(\left(x^2 - 4\right)\sqrt{x}\right)
  3. \displaystyle \log_3 \frac{(x + 1)^2}{\sqrt{x + 9}}

Condense and find the value

  1. \log_2 48 + \log_2 6 - 2\log_2 3
  2. 2\log 50 - \log 25
  3. \displaystyle \frac{1}{2}\log_3 81 + 3\log_3 6 - 3\log_3 2
  4. \ln\left(4e^3\right) - 2\ln 2

Condense to a single logarithm

  1. 4\log_5 x + 2\log_5 y
  2. \displaystyle 3\ln a - \frac{1}{2}\ln b
  3. \log x - 2\log y - 5\log z
  4. \displaystyle \frac{1}{3}\left(\log_2 m + 2\log_2 n\right)
  5. \ln(x + 3) + \ln(x - 3) - 2\ln x

Reasoning

  1. Show that \displaystyle \log_2 \frac{x}{yz} = \log_2 x - \log_2 y - \log_2 z, and explain why \log_2 z has a minus sign even though z is a factor of a product.
  2. Explain why \ln\left(x^2 + 9\right) cannot be expanded, while \ln\left(x^2 - 9\right) can. Expand the second, and say for which x the expansion holds.
  3. Show that \displaystyle \log_b \frac{M}{N} + \log_b \frac{N}{P} + \log_b \frac{P}{M} = 0 for positive M, N and P in two ways: once by expanding each term, once by condensing the sum.
  4. Use \log 2 \approx 0.30103 to work out 2\log(5 \cdot 4), and compare it with 2\log 5 + \log 4 from Example 5. Explain why condensing 2\log 5 + \log 4 must put the 2 on the 5 alone.
Answers
  1. 3\log_2 a + 2\log_2 b. Product law, then the power law on each factor.
  2. 5\ln p - \ln q. Quotient law, then the power law on the top.
  3. \displaystyle \frac{1}{2}\log_4 m - 3\log_4 n. Quotient law; \displaystyle \sqrt{m} = m^{\frac{1}{2}}.
  4. \log u + 4\log v - 6\log w. Quotient law, then product and power laws on the top.
  5. \displaystyle \frac{3}{4}\log_5 s + \frac{1}{4}\log_5 t. The fourth root covers everything, so \displaystyle \frac{1}{4}\left(3\log_5 s + \log_5 t\right).
  6. -2\ln a - 7\ln b. \ln 1 - \left(2\ln a + 7\ln b\right), and \ln 1 = 0.
  7. 3 + 5\log_3 k. \log_3 27 + \log_3\left(k^5\right), and 3^3 = 27.
  8. 6\log_2 x - 4. \log_2\left(x^6\right) - \log_2 16, and 2^4 = 16.
  9. \displaystyle 3 + \frac{1}{2}\ln r. \displaystyle \ln\left(e^3\right) + \ln \sqrt{r}, and \ln\left(e^3\right) = 3.
  10. \displaystyle 1 - \frac{2}{3}\log y. \displaystyle \frac{1}{3}\left(\log 1000 - 2\log y\right) = \frac{1}{3}\left(3 - 2\log y\right).
  11. 3\log_2 x - \log_2(x + 6), for x > 0. The sum x + 6 stays whole; for x > 0 it is positive too. The original is also defined for x < -6, where \log_2 x is not.
  12. \displaystyle \ln(x - 2) + \ln(x + 2) + \frac{1}{2}\ln x, for x > 2. Factor x^2 - 4 = (x - 2)(x + 2); all three arguments are positive exactly when x > 2, which is also where the original is defined.
  13. \displaystyle 2\log_3(x + 1) - \frac{1}{2}\log_3(x + 9), for x > -1. The original is also defined for -9 < x < -1, where \log_3(x + 1) is not.
  14. 5. \displaystyle \log_2 \frac{48 \cdot 6}{9} = \log_2 32 = 5.
  15. 2. \log 2500 - \log 25 = \log 100 = 2.
  16. 5. The sum is \log_3 9 + \log_3 216 - \log_3 8, which condenses to \displaystyle \log_3 \frac{9 \cdot 216}{8}, and that is \log_3 243 = 5.
  17. 3. \ln\left(4e^3\right) - \ln 4 = \ln\left(e^3\right) = 3.
  18. \log_5\left(x^4y^2\right).
  19. \displaystyle \ln \frac{a^3}{\sqrt{b}}.
  20. \displaystyle \log \frac{x}{y^2z^5}. Both minus terms go to the bottom.
  21. \displaystyle \log_2 \sqrt[3]{mn^2}. The bracket first, \log_2\left(mn^2\right), then the \displaystyle \frac{1}{3} becomes a cube root.
  22. \displaystyle \ln \frac{x^2 - 9}{x^2}, for x > 3. \ln\big((x + 3)(x - 3)\big) - \ln\left(x^2\right); the original needs x + 3 > 0, x - 3 > 0 and x > 0.
  23. By the quotient law, \displaystyle \log_2 \frac{x}{yz} = \log_2 x - \log_2(yz), and by the product law \log_2(yz) = \log_2 y + \log_2 z. The whole of \log_2(yz) is subtracted, so the result is \log_2 x - \left(\log_2 y + \log_2 z\right), which is \log_2 x - \log_2 y - \log_2 z. The factor z is in the bottom, and everything in the bottom is subtracted.
  24. No law turns the logarithm of a sum into simpler logarithms, and x^2 + 9 does not factor into real linear factors. But x^2 - 9 = (x - 3)(x + 3) is a product, so \ln\left(x^2 - 9\right) = \ln(x - 3) + \ln(x + 3) for x > 3, where both factors are positive. The original is also defined for x < -3, where both factors are negative and the expansion is not.
  25. Expanding: the three terms are \log_b M - \log_b N, then \log_b N - \log_b P, then \log_b P - \log_b M. Added, every logarithm cancels with another, leaving 0. Condensing: the product law gives \displaystyle \log_b\left(\frac{M}{N} \cdot \frac{N}{P} \cdot \frac{P}{M}\right) = \log_b 1 = 0.
  26. 2\log 20 \approx 2.60206, against 2\log 5 + \log 4 = 2. Here 2\log 20 = 2\left(1 + \log 2\right) \approx 2(1.30103), which is \log 400. The coefficient 2 in 2\log 5 + \log 4 multiplies only \log 5, so by the power law it becomes the exponent on 5 alone: \log 25 + \log 4 = \log 100.
kg1128 · updated 2026-10-19 · CC-BY-SA-4.0