## Introduction to Exponential and Logarithmic Functions

Logarithmic functions and exponential functions are inverses of each other. That is, they undo each other.

### Learning Objectives

Explain the relationship between logarithmic functions and exponential functions

### Key Takeaways

#### Key Points

• An exponent of $-1$ denotes the inverse function. That is, $f^{-1}(x)$ is the inverse of the function $f(x)$.
• An inverse function is a function that undoes another function: If an input $x$ into the function $f$ produces an output $y$, then inputting $y$ into the inverse function $g$ produces the output $x$, and vice versa (i.e., $f(x)=y$, and $g(y)=x$).
• The logarithm to base $b$ is the inverse function of $f(x) = b^x$: $\log _{ b }{ { (b) }^{ x } } = x\log _{ b }{ (b) } =x$
• The natural logarithm $ln(x)$ is the inverse of the exponential function $e^x$:$b={ e }^{ lnb }$

#### Key Terms

• inverse function: A function that does exactly the opposite of another.

The inverse of an exponential function is a logarithmic function and vice versa. That is, the two functions undo each other. Thus $log_{b}b^{x}=x$ and $b^{log_{b}x}=x$. Composing the functions in either order leaves the initial input unchanged.

Another way of saying this is that if $f(x)=log_{b}x$, then the inverse function is given by $f^{-1}(x)=b^{x}$, and vice versa.

Lastly, as with all inverse functions, if we graph $f(x)=log_{b}x$  and $f^{-1}(x)=b^{x}$ on the same plane, the graphs will be symmetric across the line $y=x$. That is, if we fold the plane over the line $y=x$, the two curves will lie on each other. Another way of thinking about this is that if we generate points on the curve of $f(x)=log_{b}x$ we can find the points on the curve of  $f^{-1}(x)=b^{x}$ by interchanging the $x$ and $y$ coordinates of the points.

In the following graph you can see an exponential function in red and its inverse, a logarithmic function, in blue. The graphs are symmetric over the line $y=x$, which is pictured in black. Further, a point $(t,u=b^t)$ on the graph of $f(x)$ yields a point $(u,t=log{_b}u)$ on the graph of the logarithm and vice versa.

Logarithm function: The graph of the logarithm function $log_b(x)$ (blue) is obtained by reflecting the graph of the function $b(x)$ (red) at the diagonal line ($x=y$).

Thus far we have been looking at logs of the base $b$. Let us consider instead the natural log (a logarithm of the base $e$).  The natural logarithm is the inverse of the exponential function $f(x)=e^x$. It is defined for $e>0$, and satisfies $f^{-1}(x)=lnx$.

As they are inverses composing these two functions in either order yields the original input. That is, $e^{lnx}=lne^x=x$.

## Logarithmic Functions

The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number.

### Learning Objectives

Practice working with logarithmic functions and identify their parts

### Key Takeaways

#### Key Points

• The inverse of the logarithmic operation is exponentiation.
• The logarithm is commonly used in many fields: that with base $2$ in computer science, that with base $e$ in pure mathematics and financial mathematics, and that with base $10$ in natural science and engineering.

#### Key Terms

• exponentiation: The process of calculating a power by multiplying together a number of equal factors, where the exponent specifies the number of factors to multiply.
• exponent: The power to which a number, symbol, or expression is to be raised. For example, the $3$ in $x^3$.
• logarithm: The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number.

In its simplest form, a logarithm is an exponent. Taking the logarithm of a number, one finds the exponent to which a certain value, known as a base, is raised to produce that number once more.

Logarithms have the following structure: $log{_b}(x)=c$ where $b$ is known as the base, $c$ is the exponent to which the base is raised to afford $x$. The base $b>0$.

Note that $​​log{_b}x=c$ is not defined for $c<0$. This is because the base $b$ is positive and raising a positive number to any power will yield a non-negative number.

### Commonly Used Bases

A logarithm with a base of $10$ is called a common logarithm and is denoted simply as $logx$. The common log is used often in science and engineering.

A logarithm with a base of $e$ is called a natural logarithm and is denoted $lnx$. The irrational number  $e\approx 2.718$ arises naturally in financial mathematics, in computations having to do with compound interest and annuities.

A logarithm with a base of $2$ is called a binary logarithm. While it has no special notation, it is often used in computer science.

### The Exponential and Logarithmic Forms of an Equation

Logarithmic equations can be written as exponential equations and vice versa. The logarithmic equation $log_b(x)=c$ corresponds to the exponential equation $b^{c}=x$.

As an example, the logarithmic equation $log{_2}16=4$ corresponds to the exponential equation $2^4=16$.

Example 1: Solve for $x$ in the equation $log{_3}(243)=x$.

Here we are looking for the exponent to which $3$ is raised to yield $243$.

It might be more familiar if we convert the equation to exponential form giving us:

$3^x=243 \\ 3^5 =243$

Thus, $log{_3}(243)=5$.

The explanation of the previous example reveals the inverse of the logarithmic operation: exponentiation. Starting with $243$, if we take its logarithm with base $3$, then raise $3$ to the logarithm, we will once again arrive at $243$.

### Trivial Logarithmic Identities

$log_{b}1=0$ as  $b^0=1$ for $b\neq 0$. Note that $0^0\neq 1$. Rather, $0^0$ is called an indeterminate form.

$log{_b}b=1$ as $b^1=b$

$log{_b}0=undefined$, as there is no number x such that $b^x=0$

The following two logarithmic identities can be verified by converting the logarithmic equation into an exponential equation as follows:

$b^{log_{b}(x)}=x$

Converting this to a logarithmic equation yields: $log_{b}(x)=log_{b}(x)$

Converting $log_{b}(b^x)=x$ to an exponential equation yields $b^x=b^x$

### Applications of Logarithms

Historically, logarithms were invented by John Napier as a way of doing lengthy arithmetic calculations prior to the invention of the modern day calculator.

More recently, logarithms are most commonly used to simplify complex calculations that involve high-level exponents. In chemistry, for example, pH and pKa are used to simplify concentrations and dissociation constants, respectively, of high exponential value. The purpose is to bring wide-ranging values into a more manageable scope. A dissociation constant may be smaller than $10^{10}$, or higher than $10^{-50}$. Taking the logarithm of each brings the values into a more comprehensible scope ($10$ to $-50$).

## Common Bases of Logarithms

Any positive number can be used as the base of a logarithm but certain bases ($10$, $e$, and $2$) have more widespread applications than others.

### Learning Objectives

Distinguish between the uses of different types of special logarithms

### Key Takeaways

#### Key Points

• Logarithms with base equal to $10$ are called common logarithms. They are most applicable in physical and natural sciences and engineering.
• Logarithms with base equal to e are called natural logarithms. They are most applicable in pure mathematics and financial mathematics.
• Logarithms with base equal to $2$ are called binary logarithms. They are most applicable in computer science.

#### Key Terms

• logarithm: The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number.
• e: The base of the natural logarithm, 2.718281828459045…
• natural logarithm: The logarithm in base e

### Logarithms: History and Common Bases

Logarithms were originally invented by John Napier (1515-1617) to aid in arithmetical computations at a time when modern day calculators were not in use. In the present day, logarithms have many uses in disciplines as different as economics, computer science, engineering and natural sciences. Logarithmic scales reduce wide-ranging quantities to tiny scopes. For example, the decibel is a unit quantifying signal power log-ratios and amplitude log-ratios (of which sound pressure is a common example). In chemistry, pH is a logarithmic measure for the acidity of an aqueous solution. Logarithms are commonplace in scientific formulae, and in measurements of the complexity of algorithms and of geometric objects called fractals. They describe musical intervals, appear in formulas counting prime numbers, inform some models in psychophysics, and can aid in forensic accounting.

While any positive number can be used as the base of a logarithm, not all logarithms are equally useful in practice. Some bases have more applications than others. Out of the infinite number of possible bases, three stand out as particularly useful. These are $10$, $e$ and $2$.

### The Common Logarithm

A logarithm with a base of $10$ is called a common logarithm and is denoted simply as $logx$. Common logarithms are often used in physical and natural sciences and engineering.

### The Natural Logarithm

A logarithm with a base of $e$ is called a natural logarithm and is denoted $lnx$. The irrational number  $e\approx 2.718$ and arises naturally in financial mathematics in computations having to do with compound interest. Natural logarithms are also used in physical sciences and pure math.

### The Binary Logarithm

A logarithm with a base of $2$ is called a binary logarithm and is denoted $ldn$. Binary logarithms are useful in any application that involves the doubling of a quantity, and particularly in computer science with the use of integral parts.

### Uses of Logarithms

The list below highlights only some of the many uses of logarithms in the present day.

1. The magnitude of an earthquake (M) can be determined based on the logarithm of an intensity measurement from a seismograph (I):

$M=log(\frac{I}{I_0})$ where I0 is a constant.

2. The common logarithm is used in calculating the safety index which helps determine how safe certain activities are by determining how likely people are to die from them. For example, $1$ in $2,000,000$ people is killed by lightning. It might be hard to get a real sense of how likely one is to die by getting hit by lightning because $2,000,000$ is such a large number and our minds cannot make sense of it easily.  If one in $x$ people die as a result of doing some given activity each year, the safety index for that activity is simply the logarithm of $x$. The higher the safety index, the safer the activity in question. The safety index, because it is a logarithm, is a much smaller number. Logarithms help to shrink the numbers of very high magnitude to a smaller ones, which our brains can deal with easily.

3. pH is an abbreviation for power of hydrogen. The pH scale measures how acidic or basic a substance is. It ranges from $0$ to $14$. A pH of $7$ is neutral (water). A pH less than $7$ is acidic, and a pH greater than $7$ is basic. The acidity depends on the hydrogen ion concentration in the liquid (in moles per liter) written as [H+]. The greater the hydrogen ion concentration, the more acidic the solution. It is defined as $pH = -log10[H+]$.

Pure water contains a hydrogen ion concentration of $1 \cdot 10^{-7}$moles. It has a pH level of $7$.  Clearly, $7$ is an easier number for our brain to handle. This is an example of how logarithms helps us to deal with numbers of very small magnitudes.

4. The entropy $(S)$ of a system can be calculated from the natural logarithm of the number of possible microstates $(W)$ the system can adopt:

$S=k \cdot ln(W)$ where $k$ is a constant.

5. Logarithms occur in definitions of the dimension of fractals. Fractals are geometric objects that are self-similar: small parts reproduce, at least roughly, the entire global structure. The Sierpinski triangle can be covered by three copies of itself, each having sides half the original length. This makes the Hausdorff dimension of this structure $ln(3)/ln(2) ≈ 1.58$. Another logarithm-based notion of dimension is obtained by counting the number of boxes needed to cover the fractal in question.

Sierpinski triangle: The Sierpinski triangle can be covered by three copies of itself, over, and over, and over

6. Logarithms are related to musical tones and intervals. In equal temperament, the frequency ratio depends only on the interval between two tones, not on the specific frequency, or pitch, of the individual tones. For example, the note A has a frequency of $440$ Hz and B-flat has a frequency of $466$ Hz. The interval between A and B-flat is a semitone, as is the one between B-flat and B (frequency $493$ Hz). Therefore, logarithms can be used to describe the intervals: an interval is measured in semitones by taking the base-$\frac {21}{12}$ logarithm of the frequency ratio.

7. Natural logarithms are closely linked to counting prime numbers ($2, 3, 5, 7$…), an important topic in number theory. The prime number theorem states that for large enough N, the probability that a random integer not greater than N is prime is very close to $\frac {1} {log(N)}$.

## Converting between Exponential and Logarithmic Equations

Logarithmic and exponential forms are closely related, and an equation in either form can be freely converted into the other.

### Learning Objectives

Convert between exponential and logarithmic equations

### Key Takeaways

#### Key Points

• The logarithmic and exponential operations are inverses.
• If given an exponential equation, one can take the natural logarithm to isolate the variables of interest, and vice versa.
• Converting from logarithmic to exponential form can make for easier equation solving.

#### Key Terms

• logarithm: The logarithm of a number is the exponent by which another fixed value, the base, has to be raised to produce that number.
• dependent variable: The variable in an equation or function whose value depends on one or more variables in the equation or function.
• independent variable: Any variable in an equation or function whose value is not dependent on any other in the equation or function.

### The Exponential and Logarithmic Forms of an Equation

Logarithmic equations can be written as exponential equations and vice versa. The logarithmic equation $\log_b(x)=c$ corresponds to the exponential equation $b^{c}=x$.

As an example, the logarithmic equation $\log{_2}16=4$ can be converted to the exponential equation $2^4=16$.

The logarithmic equation $\log_4(64)=3$ can be converted into the exponential equation $4^3=64$.

### Solving Logarithmic Equations

Conversion from logarithmic to exponential form can help one solve otherwise difficult equations.

### Example 1

Solve for $x$ in the equation $\log{_3}243=x$

Here we are looking for the exponent to which $3$ is raised to yield $243$. It might be more familiar if we convert the equation to exponential form giving us:

$3^x=243 \\3^5=243$

The exponent we seek is $5$. Thus, $\log{_3}243=5$.

The
explanation of the previous example reveals the inverse of the logarithmic operation: exponentiation. Starting with $243$, if we take its logarithm with base $3$, then raise $3$ to the logarithm, we will once again arrive at $243$.

### Example 2

Solve for $x$ in the equation $\log_6(x-2)=3$

If we write the logarithmic equation as an exponential equation we obtain:

$6^{\log_6(x-2)}=6^3$

As the exponent and log on the left side of the equation undo each other we are left with:

\begin{align} x-2&=6^3 \\x-2&=216 \\x&=218 \end{align}

### Solving Exponential Equations

An exponential equation is an equation where the variable we are solving for appears in the exponent.

If the equation consists of two terms set equal to each other and these terms have the same base, then the exponents are equal. We can use this fact to solve such exponential equations as follows:

### Example 3

Solve for $x$ in the equation $5^{5x+8}=5^{x^{2}+3x}$

Here since the bases are both $5$, the exponents are equal. We use this fact to solve the equation as follows:

\begin{align} 5x+8&=x^2+3x \\ 0&=x^2+3x-5x-8 \\ 0&=x^2-2x-8 \\ 0&=(x-4)(x+2) \end{align}

$x=4 \text{ or } x=-2$

### Example 4

Solve for x in the equation $3^{x+1}=81^x$

Here the bases are not equal, but it is possible to write 81 using a base of 3 as follows:

\begin{align} 3^{x+1}&=(3^4)^x \\ 3^{x+1}&=3^{4x} \end{align}

At this point, the left and right sides of the equation have the same base so we can solve for $x$ by setting the two exponents equal to each other:

\begin{align} x+1&=4x \\ 1&=4x-x \\ 1&=3x \\ x&=\frac{1}{3} \end{align}

### Solving Exponential Equations Using Logarithms

In many cases, an exponential equation cannot be solved by using the methods of example $3$ and $4$ above because the bases cannot easily be made equal. In these cases taking the logarithm of both sides of the equation allows us to solve the equation. While you can take the log to any base, it is common to use the common log with a base of $10$ or the natural log with the base of $e$. This is because scientific and graphing calculators are equipped with a button for the common log that reads $log$, and a button for the natural log that reads $ln$ which allows us to obtain a good approximation for the common or natural log of a number.

### Example 5

Solve for $x$ in the equation $2^x=17$

Here we cannot easily write $17$ with a base of $2$ so instead we take the log of both sides as follows.

$\log{2^x}=\log17$

Next we use the properties of logarithms to move the variable out of the exponent.

$x\log2=\log17$

Lastly we divide by $\log2$ to solve for $x$.

$x=\frac{\log17}{\log2}$

It is important to note that this is an exact answer. We can arrive at an approximation by using the $\log$ button on your calculator.

$x=\frac{\log17}{\log2}\approx4.0877$

### Example 6

Solve for $x$ in the equation $2^x=17$ using the natural log

Here we will use the natural logarithm instead to illustrate the fact that any base will do.

\begin{align} \ln{2^x}&=\ln17 \\ x\ln2&=\ln17 \\x&=\frac{\ln17}{\ln2}\approx4.0877 \end{align}

### Example 7

Solve for $x$ in the equation $3=4^{5x+18}$

Again, we use logarithms to move the variable out of the exponent allowing us to solve for x as follows:

\begin{align} \log3&=\log4^{5x+18} \\ \log3&=(5x+8)\log4 \\ \frac{\log3}{\log4}&=5x+8 \\ \frac{\log3}{\log4}-8&=5x \\ \frac{\log3}{5\log4}-\frac{8}{5}&=x \\ \frac{\log3-8\log4}{5\log4}&=x \end{align}

Now we can use the properties of logarithms to re-write the left hand side and solve for $x$:

$\dfrac{\log\frac{3}{4^8}}{\log4^5}=\dfrac{\log\frac{3}{65536}}{\log1024}\approx-1.4415$