Mathematics: Logarithms and logarithm equations.
This text explains the mathematical background of logarithms and shows, how to proceed to solve logarithm equations. If you need an application to test your mathematics knowledge, my logarithm equations exercise generator, freely available in the Free Pascal GUI Applications section, may be helpful. Also note, that in the application's sources, programming newbies may find some hints, on how to deal with logarithms in Free Pascal. Another way to test your logarithm knowledge, is to use my logarithm equations online application.
Powers.
Raising a number to a power is a special case of multiplication, where all factors are equal, the power being the number of times the number itself is taken as a factor. Example: Raising 5 to the third power is equivalent to a multiplication, where the number 5 is taken 3 times as factor, i.e. 5×5×5 = 125. The power of a number is indicated by an exponent, which is a number in small print, placed to the right and toward the top of the number. The number itself is called base. Note, that raising a number to a power is sometimes called exponentiation. Raising 5 to the third power is thus written 53. 5 is the base and 3 is the exponent. Other example: Raising 10 to the 6th power is written 106 (10 being the base and 6 the exponent) and the value of the 6th power of 10 is 10×10×10×10×10×10 = 1 million.
Special cases to remember:
- The 0th power of any number is equal to 1: a0 = 1.
- The first power of any number is this number itself: a1 = a.
- The second power of a number is called square, the third one is called cube.
Laws of exponents:
Operation | Feature | Exponent law |
---|---|---|
Multiplication | same base | an · am = an+m |
Division | same base | an / am = an-m |
Power of a product | same exponent | (ab)n = an · bn |
Power of a quotient | same exponent | (a/b)n = an / bn |
Power of a power | (an)m = anm |
The power exponents must not be positive integers, they may be negative and even fractional. Use the following definitions:
a-n = 1 / an and a1/n = n√a.
Combining the exponent rules and these definitions, we are now able to calculate for example 82/3:
82/3 = (82)1/3 = 641/3 = 3√64 = 4.
Logarithms.
I guess that it's since the beginning of the schooling system, that there are lots of people who don't like or even hate mathematics. Perhaps, because they are afraid of such "complicated" words like logarithms. Powers, with their base and their exponent, normally don't cause any problems: everyone knows what is a square or a cube. Believe it or not, if you understand powers, you'll also understand logarithms, because a logarithm is the inverse of a power.
We can define the logarithm base b as a function, that is a solution for y of the equation x = by. The logarithm of a number
is indicated by the word log and the base, which is a number in small print, placed to the right and toward the bottom of log. Thus, logarithms may be defined by:
y = logb(x) <=> x = by.
Examples: log5(125) = 3, because 53 = 125, and log10(10000) = 4, because 104 = 10000.
Note, that logarithms base 10 (called common logarithms), are simply written log, without the base (as in the second example above). Other special logarithms are the natural logarithms, that have as base the irrational number e ≈ 2.71828. Natural logarithms are normally written as ln, to clearly distinguish them from log and without the base.
Special cases to remember:
- Any base logarithms of negative numbers are undefined.
- Any base logarithms of 0 are undefined.
- Any base logarithms of 1 are equal to 0: logb(1) = 0.
- The base b logarithms of b are equal to 1: logb(b) = 1; ex: ln(e) = 1.
Note: Logarithms, that are the inverse of power with a (positive) integer as exponent, may be calculated manually, remembering that
powers are special multiplications and considering that logarithms are special divisions. To calculate the logarithm, just continue dividing the number by the
logarithm's base until you get 1. The number of division factors is nothing else than the logarithm. Example:
log2(32): 32 / 2 = 16, 16 / 2 = 8, 8 / 2 = 4, 4 / 2 = 2, 2 / 2 = 1;
32 / 2 / 2 / 2 / 2 / 2 = 1;
5 factors, thus log2(32) = 5.
Laws of logarithms:
Operation | Feature | Logarithm law |
---|---|---|
Logarithm of a product | same base | logb(xy) = logb(x) + logb(y) |
Logarithm of a quotient | same base | logb(x/y) = logb(x) - logb(y) |
Logarithm reciprocal | logb(1/x) = -logb(x) | |
Logarithm of a power | logb(xy) = y·logb(x) |
Relationship between logarithms and powers.
We have seen that logb(c) = k is a solution of the equation bk = c. If we plug the value of k of the solution into the equation, we get:
blogb(c) = c.
If we plug the value of c of the equation into the solution, we get:
logb(bk) = k.
Logarithm base conversion.
To convert a base b logarithm to a base a logarithm, use the formula:
loga(x) = logb(x) / logb(a).
Thus, to convert a common logarithm to a natural logarithm:
ln(x) = log(x) / log(e) ≈ 2.3026·log(x).
Solving logarithm equations.
Solving logarithm equations requires 3 steps:
|
Transforming logarithm equations containing only logarithms.
If the equation contains only logarithm terms (i.e. no constants), consider the following:
- If the equation contains only two logarithms, on opposite sides of the equal sign, with the same base, you can simply drop the logarithms.
- If the equation contains a sum of two logarithms, use the logarithm of a product formula to transform the sum to a single logarithm term.
- If the equation contains a difference of two logarithms, use the logarithm of a quotient formula to transform the sum to a single logarithm term.
Examples:
Example 1: Transforming the equation log5(-5x + 1) = log5(-4x - 4).
There are only logarithm terms, just two logarithms with same base on the opposite sides of the equal sign. Simply drop the logarithms.
log5(-5x + 1) = log5(-4x - 4)
-5x + 1 = -4x - 4
Example 2: Transforming the equation log7(x - 2) + log7(x + 3) = log7(14).
There are only logarithm terms, but on the left side of the equal sign, there is a sum of two logarithms. Transform this sum to a product, what
results in two logarithms with same base on the opposite sides of the equal sign and the logarithms may be dropped.
log7(x - 2) + log7(x + 3) = log7(14)
log7[(x - 2)(x + 3)] = log7(14)
(x - 2)(x + 3) = 14
x2 + x - 20 = 0
Example 3: Transforming the equation log7(10x + 3) - log7(-8x + 3) = log7(-3x + 1).
There are only logarithm terms, but on the right side of the equal sign, there is a difference of two logarithms. Transform this difference to a
quotient, what results in two logarithms with same base on the opposite sides of the equal sign and the logarithms may be dropped.
log7(10x + 3) - log7(-8x + 3) = log7(-3x + 1)
log7[(10x + 3) / (-8x + 3)] = log7(-3x + 1)
(10x + 3) / (-8x + 3) = (-3x + 1)
10x + 3 = (-3x + 1)(-8x + 3)
10x + 3 = 24x2 - 17x + 3
24x2 - 27x = 0
Transforming logarithm equations containing terms without logarithms.
If the equation contains not only logarithm terms but also terms without logarithm (constants), consider the following:
- If the equation contains a sum of two logarithms, simplify the equation, using the logarithm of a product formula to transform the sum to a single logarithm term.
- If the equation contains a difference of two logarithms, simplify the equation, using the logarithm of a quotient formula to transform the sum to a single logarithm term.
- Rewrite the equation in exponential form.
Rewriting a logarithm equation in exponential form means raising all terms on both sides of the equal sign to a power with base b, b actually being the base of the logarithm terms in the equation. Doing so will result in dropping the logarithms (cf. relationship between logarithms and powers earlier in this text) and getting a power expression for the constant terms. Example: The exponential form of the equation log4(x -12) = 3 is x - 12 = 43.
Examples:
Example 4: Transforming the equation log7(-4x - 7) = 2.
There is a term without logarithm, thus, we have to rewrite the equation in exponential form (no logarithm sum or difference here, so no simplification to do).
log7(-4x - 7) = 2
-4x - 7 = 72
-4x - 7 = 49
Example 5: Transforming the equation log6(-8x - 2) + log6(5x + 6) = 1.
There is a term without logarithm, thus, we have to rewrite the equation in exponential form. The sum of two logarithms on the left side of the equal sign can
be simplified to a product.
log6(-8x - 2) + log6(5x + 6) = 1
log6[(-8x - 2)(5x + 6)] = 1
(-8x - 2)(5x + 6) = 61
-40x2 - 58x - 12 = 6
40x2 + 58x + 18 = 0
Solving the equation in x to solve the equation in log(x).
To finish this tutorial, lets solve the logarithm equations, given as examples above. The way to proceed consists in first solving the simple equation in x and then checking for each solution found if it is a valid solution of the logarithm equation (checking if logarithm arguments are positive for the solution values). Use the following link, if you need help in solving linear and quadratic equations in one variable.
Example 1: Solving the equation log5(-5x + 1) = log5(-4x - 4).
The corresponding equation in x is: -5x + 1 = -4x - 4 and has a unique solution x = 5.
Using x = 5 in the original logarithm equation would be, for both logarithm terms, taking the logarithm of a negative number, what is an invalid operation. Thus:
The equation log5(-5x + 1) = log5(-4x - 4) has no solution.
Example 2: Solving the equation log7(x - 2) + log7(x + 3) = log7(14).
The corresponding equation in x is: x2 + x - 20 = 0 and has two solutions x1 = -5 and x2 = 4.
Using x = -5 in the original logarithm equation would be, for both logarithm terms, taking the logarithm of a negative number, what is an invalid operation. Using x = 4
gives a positive argument for both logarithm terms. Thus:
The equation log5(-5x + 1) = log5(-4x - 4) has a unique solution x = 4.
Example 3: Solving the equation log7(10x + 3) - log7(-8x + 3) = log7(-3x + 1).
The corresponding equation in x is: 24x2 - 27x = 0 and has 2 solutions x1 = 0 and x2 = 1.13.
The second solution has to be eliminated, as it would result in a negative argument of a logarithm function. Thus:
The equation log7(10x + 3) - log7(-8x + 3) = log7(-3x + 1) has a unique solution x = 0.
Example 4: Solving the equation log7(-4x - 7) = 2.
The corresponding equation in x is: -4x - 7 = 49 and has one solution x = -14.
Using x = -14 in the logarithm equation is no problem. Thus:
The equation log7(-4x - 7) = 2 has a unique solution x = -14.
The corresponding equation in x is: 40x2 + 58x + 18 = 0 and has two solutions x1 = -1 and x2 = -0.45.
Both solutions of the equation in x will give positive arguments for both logarithm terms in the original logarithm equation. Thus:
The equation log6(-8x - 2) + log6(5x + 6) = 1 has two solutions x1 = -1 and x2 = -0.45.
If you find this tutorial helpful, please, support me and this website by signing my guestbook.