We are searching data for your request:

**Forums and discussions:**

**Manuals and reference books:**

**Data from registers:**

**Wait the end of the search in all databases.**

Upon completion, a link will appear to access the found materials.

Upon completion, a link will appear to access the found materials.

Learning Objectives

- Convert from logarithmic to exponential form.
- Convert from exponential to logarithmic form.
- Evaluate logarithms.
- Use common logarithms.
- Use natural logarithms.

In 2010, a major earthquake struck Haiti, destroying or damaging over 285,000 homes. One year later, another, stronger earthquake devastated Honshu, Japan, destroying or damaging over 332,000 buildings,^{}like those shown in Figure (PageIndex{1}). Even though both caused substantial damage, the earthquake in 2011 was 100 times stronger than the earthquake in Haiti. How do we know? The magnitudes of earthquakes are measured on a scale known as the Richter Scale. The Haitian earthquake registered a 7.0 on the Richter Scale^{}whereas the Japanese earthquake registered a 9.0.

The Richter Scale is a base-ten logarithmic scale. In other words, an earthquake of magnitude (8) is not twice as great as an earthquake of magnitude (4). It is

[10^{8−4}=10^4=10,000 onumber]

times as great! In this lesson, we will investigate the nature of the Richter Scale and the base-ten function upon which it depends.

## Converting from Logarithmic to Exponential Form

In order to analyze the magnitude of earthquakes or compare the magnitudes of two different earthquakes, we need to be able to convert between logarithmic and exponential form. For example, suppose the amount of energy released from one earthquake were 500 times greater than the amount of energy released from another. We want to calculate the difference in magnitude. The equation that represents this problem is (10^x=500), where (x) represents the difference in magnitudes on the Richter Scale. How would we solve for (x)?

We have not yet learned a method for solving exponential equations. None of the algebraic tools discussed so far is sufficient to solve (10^x=500). We know that ({10}^2=100) and ({10}^3=1000), so it is clear that (x) must be some value between 2 and 3, since (y={10}^x) is increasing. We can examine a graph, as in Figure (PageIndex{1}), to better estimate the solution.

Estimating from a graph, however, is imprecise. To find an algebraic solution, we must introduce a new function. Observe that the graph in Figure (PageIndex{2}) passes the horizontal line test. The exponential function (y=b^x) is one-to-one, so its inverse, (x=b^y) is also a function. As is the case with all inverse functions, we simply interchange (x) and (y) and solve for (y) to find the inverse function. To represent (y) as a function of (x), we use a logarithmic function of the form (y={log}_b(x)). The base (b) **logarithm** of a number is the exponent by which we must raise (b) to get that number.

We read a logarithmic expression as, “The logarithm with base (b) of (x) is equal to (y),” or, simplified, “log base (b) of (x) is (y).” We can also say, “(b) raised to the power of (y) is (x),” because logs are exponents. For example, the base (2) logarithm of (32) is (5), because (5) is the exponent we must apply to (2) to get (32). Since (2^5=32), we can write ({log}_232=5). We read this as “log base (2) of (32) is (5).”

We can express the relationship between logarithmic form and its corresponding exponential form as follows:

[egin{align} log_b(x)=yLeftrightarrow b^y=x, b> 0, b eq 1 end{align}]

Note that the base (b) is always positive.

Because logarithm is a function, it is most correctly written as (log_b(x)), using parentheses to denote function evaluation, just as we would with (f(x)). However, when the input is a single variable or number, it is common to see the parentheses dropped and the expression written without parentheses, as (log_bx). Note that many calculators require parentheses around the (x).

We can illustrate the notation of logarithms as follows:

Notice that, comparing the logarithm function and the exponential function, the input and the output are switched. This means (y=log_b(x)) and (y=b^x) are inverse functions.

DEFINITION OF THE LOGARITHMIC FUNCTION

A logarithm base (b) of a positive number (x) satisfies the following definition.

For (x>0), (b>0), (b≠1),

[egin{align} y={log}_b(x) ext{ is equivalent to } b^y=x end{align}]

where,

- we read ({log}_b(x)) as, “the logarithm with base (b) of (x)” or the “log base (b) of (x)."
- the logarithm (y) is the exponent to which (b) must be raised to get (x).

Also, since the logarithmic and exponential functions switch the (x) and (y) values, the domain and range of the exponential function are interchanged for the logarithmic function. Therefore,

- the domain of the logarithm function with base (b) is ((0,infty)).
- the range of the logarithm function with base (b) is ((−infty,infty)).

Q&A: Can we take the logarithm of a negative number?

*No. Because the base of an exponential function is always positive, no power of that base can ever be negative. We can never take the logarithm of a negative number. Also, we cannot take the logarithm of zero. Calculators may output a log of a negative number when in complex mode, but the log of a negative number is not a real number.*

How to: Given an equation in logarithmic form ({log}_b(x)=y), convert it to exponential form

- Examine the equation (y={log}_bx) and identify (b), (y),and (x).
- Rewrite ({log}_bx=y) as (b^y=x).

Example (PageIndex{1}): Converting from Logarithmic Form to Exponential Form

Write the following logarithmic equations in exponential form.

- ({log}_6(sqrt{6})=dfrac{1}{2})
- ({log}_3(9)=2)

**Solution**

First, identify the values of (b), (y),and (x). Then, write the equation in the form (b^y=x).

- ({log}_6(sqrt{6})=dfrac{1}{2})
Here, (b=6), (y=dfrac{1}{2}),and (x=sqrt{6}). Therefore, the equation ({log}_6(sqrt{6})=dfrac{1}{2}) is equivalent to

(6^{ frac{1}{2}}=sqrt{6})

- ({log}_3(9)=2)
Here, (b=3), (y=2),and (x=9). Therefore, the equation ({log}_3(9)=2) is equivalent to

(3^2=9)

Exercise (PageIndex{1})

Write the following logarithmic equations in exponential form.

- ({log}_{10}(1,000,000)=6)
- ({log}_5(25)=2)

- Answer a
({log}_{10}(1,000,000)=6) is equivalent to ({10}^6=1,000,000)

- Answer b
({log}_5(25)=2) is equivalent to (5^2=25)

## Converting from Exponential to Logarithmic Form

To convert from exponents to logarithms, we follow the same steps in reverse. We identify the base (b),exponent (x),and output (y). Then we write (x={log}_b(y)).

Example (PageIndex{2}): Converting from Exponential Form to Logarithmic Form

Write the following exponential equations in logarithmic form.

- (2^3=8)
- (5^2=25)
- ({10}^{−4}=dfrac{1}{10,000})

**Solution**

First, identify the values of (b), (y),and (x). Then, write the equation in the form (x={log}_b(y)).

- (2^3=8)
Here, (b=2), (x=3),and (y=8). Therefore, the equation (2^3=8) is equivalent to ({log}_2(8)=3).

- (5^2=25)
Here, (b=5), (x=2),and (y=25). Therefore, the equation (5^2=25) is equivalent to ({log}_5(25)=2).

- ({10}^{−4}=dfrac{1}{10,000})
Here, (b=10), (x=−4),and (y=dfrac{1}{10,000}). Therefore, the equation ({10}^{−4}=dfrac{1}{10,000}) is equivalent to ({log}_{10} left (dfrac{1}{10,000} ight )=−4).

Exercise (PageIndex{2})

Write the following exponential equations in logarithmic form.

- (3^2=9)
- (5^3=125)
- (2^{−1}=dfrac{1}{2})

- Answer a
(3^2=9) is equivalent to ({log}_3(9)=2)

- Answer b
(5^3=125) is equivalent to ({log}_5(125)=3)

- Answer c
(2^{−1}=dfrac{1}{2}) is equivalent to ({log}_2 left (dfrac{1}{2} ight )=−1)

## Evaluating Logarithms

Knowing the squares, cubes, and roots of numbers allows us to evaluate many logarithms mentally. For example, consider ({log}_28). We ask, “To what exponent must (2) be raised in order to get 8?” Because we already know (2^3=8), it follows that ({log}_28=3).

Now consider solving ({log}_749) and ({log}_327) mentally.

- We ask, “To what exponent must (7) be raised in order to get (49)?” We know (7^2=49). Therefore, ({log}_749=2)
- We ask, “To what exponent must (3) be raised in order to get (27)?” We know (3^3=27). Therefore, (log_{3}27=3)

Even some seemingly more complicated logarithms can be evaluated without a calculator. For example, let’s evaluate (log_{ce{2/3}} frac{4}{9}) mentally.

- We ask, “To what exponent must (ce{2/3}) be raised in order to get (ce{4/9})? ” We know (2^2=4) and (3^2=9), so [{left(dfrac{2}{3} ight )}^2=dfrac{4}{9}. onumber] Therefore, [{log}_{ce{2/3}} left (dfrac{4}{9} ight )=2. onumber]

How to: Given a logarithm of the form (y={log}_b(x)),evaluate it mentally

- Rewrite the argument (x) as a power of (b): (b^y=x).
- Use previous knowledge of powers of (b) identify (y) by asking, “To what exponent should (b) be raised in order to get (x)?”

Example (PageIndex{3}): Solving Logarithms Mentally

Solve (y={log}_4(64)) without using a calculator.

**Solution**

First we rewrite the logarithm in exponential form: (4^y=64). Next, we ask, “To what exponent must (4) be raised in order to get (64)?”

We know

(4^3=64)

Therefore,

({log}_4(64)=3)

Exercise (PageIndex{3})

Solve (y={log}_{121}(11)) without using a calculator.

- Answer
({log}_{121}(11)=dfrac{1}{2}) (recalling that (sqrt{121}={(121)}^{ frac{1}{2}}=11))

Example (PageIndex{4}): Evaluating the Logarithm of a Reciprocal

Evaluate (y={log}_3 left (dfrac{1}{27} ight )) without using a calculator.

**Solution**

First we rewrite the logarithm in exponential form: (3^y=dfrac{1}{27}). Next, we ask, “To what exponent must (3) be raised in order to get (dfrac{1}{27})?”

We know (3^3=27),but what must we do to get the reciprocal, (dfrac{1}{27})? Recall from working with exponents that (b^{−a}=dfrac{1}{b^a}). We use this information to write

[egin{align*} 3^{-3}&= dfrac{1}{3^3} &= dfrac{1}{27} end{align*}]

Therefore, ({log}_3 left (dfrac{1}{27} ight )=−3).

Exercise (PageIndex{4})

Evaluate (y={log}_2 left (dfrac{1}{32} ight )) without using a calculator.

- Answer
({log}_2 left (dfrac{1}{32} ight )=−5)

## Using Common Logarithms

Sometimes we may see a logarithm written without a base. In this case, we assume that the base is (10). In other words, the expression (log(x)) means ({log}_{10}(x)). We call a base (-10) logarithm a* common logarithm*. Common logarithms are used to measure the Richter Scale mentioned at the beginning of the section. Scales for measuring the brightness of stars and the pH of acids and bases also use common logarithms.

DEFINITION OF THE COMMON LOGARITHM

A common logarithm is a logarithm with base (10). We write ({log}_{10}(x)) simply as (log(x)). The common logarithm of a positive number (x) satisfies the following definition.

For (x>0),

[egin{align} y={log}(x) ext{ is equivalent to } {10}^y=x end{align}]

We read (log(x)) as, “the logarithm with base (10) of (x) ” or “log base (10) of (x).”

The logarithm (y) is the exponent to which (10) must be raised to get (x).

How to: Given a common logarithm of the form (y=log(x)), evaluate it mentally

- Rewrite the argument (x) as a power of (10): ({10}^y=x).
- Use previous knowledge of powers of (10) to identify (y) by asking, “To what exponent must (10) be raised in order to get (x)?”

Example (PageIndex{5}): Finding the Value of a Common Logarithm Mentally

Evaluate (y=log(1000)) without using a calculator.

**Solution**

First we rewrite the logarithm in exponential form: ({10}^y=1000). Next, we ask, “To what exponent must (10) be raised in order to get (1000)?” We know

({10}^3=1000)

Therefore, (log(1000)=3).

Exercise (PageIndex{5})

Evaluate (y=log(1,000,000)).

- Answer
(log(1,000,000)=6)

How to: Given a common logarithm with the form (y=log(x)),evaluate it using a calculator

- Press
**[LOG]**. - Enter the value given for (x),followed by
**[ ) ]**. - Press
**[ENTER]**.

Example (PageIndex{6}): Finding the Value of a Common Logarithm Using a Calculator

Evaluate (y=log(321)) to four decimal places using a calculator.

**Solution**

- Press
**[LOG]**. - Enter 321
*,*followed by**[ ) ]**. - Press
**[ENTER]**.

Rounding to four decimal places, (log(321)≈2.5065).

**Analysis**

Note that ({10}^2=100) and that ({10}^3=1000). Since (321) is between (100) and (1000), we know that (log(321)) must be between (log(100)) and (log(1000)). This gives us the following:

(100<321<1000)

(2<2.5065<3)

Exercise (PageIndex{6})

Evaluate (y=log(123)) to four decimal places using a calculator.

- Answer
(log(123)≈2.0899)

Example (PageIndex{7}): Rewriting and Solving a Real-World Exponential Model

The amount of energy released from one earthquake was (500) times greater than the amount of energy released from another. The equation ({10}^x=500) represents this situation, where (x) is the difference in magnitudes on the Richter Scale. To the nearest thousandth, what was the difference in magnitudes?

**Solution**

We begin by rewriting the exponential equation in logarithmic form.

({10}^x=500)

(log(500)=x) Use the definition of the common log.

Next we evaluate the logarithm using a calculator:

- Press
**[LOG]**. - Enter (500),followed by
**[ ) ]**. - Press
**[ENTER]**. - To the nearest thousandth, (log(500)≈2.699).

The difference in magnitudes was about (2.699).

Exercise (PageIndex{7})

The amount of energy released from one earthquake was (8,500) times greater than the amount of energy released from another. The equation ({10}^x=8500) represents this situation, where (x) is the difference in magnitudes on the Richter Scale. To the nearest thousandth, what was the difference in magnitudes?

- Answer
The difference in magnitudes was about (3.929).

## Using Natural Logarithms

The most frequently used base for logarithms is (e). Base (e) logarithms are important in calculus and some scientific applications; they are called **natural logarithms**. The base (e) logarithm, ({log}_e(x)), has its own notation,(ln(x)). Most values of (ln(x)) can be found only using a calculator. The major exception is that, because the logarithm of (1) is always (0) in any base, (ln1=0). For other natural logarithms, we can use the (ln) key that can be found on most scientific calculators. We can also find the natural logarithm of any power of (e) using the inverse property of logarithms.

DEFINITION OF THE NATURAL LOGARITHM

A natural logarithm is a logarithm with base (e). We write ({log}_e(x)) simply as (ln(x)). The natural logarithm of a positive number (x) satisfies the following definition.

For (x>0),

(y=ln(x)) is equivalent to (e^y=x)

We read (ln(x)) as, “the logarithm with base (e) of (x)” or “the natural logarithm of (x).”

The logarithm (y) is the exponent to which (e) must be raised to get (x).

Since the functions (y=e^x) and (y=ln(x)) are inverse functions, (ln(e^x)=x) for all (x) and (e^{ln (x)}=x) for (x>0).

How to: Given a natural logarithm with the form (y=ln(x)), evaluate it using a calculator

- Press
**[LN]**. - Enter the value given for (x), followed by
**[ ) ]**. - Press
**[ENTER]**.

Example (PageIndex{8}): Evaluating a Natural Logarithm Using a Calculator

Evaluate (y=ln(500)) to four decimal places using a calculator.

**Solution**

- Press
**[LN]**. - Enter (500),followed by
**[ ) ]**. - Press
**[ENTER]**.

Rounding to four decimal places, (ln(500)≈6.2146)

Exercise (PageIndex{8})

Evaluate (ln(−500)).

- Answer
It is not possible to take the logarithm of a negative number in the set of real numbers.

Media

Access this online resource for additional instruction and practice with logarithms.

- Introduction to Logarithms

## Key Equations

Definition of the logarithmic function | For (x>0), (b>0), (b≠1), (y={log}_b(x)) if and only if (b^y=x). |

Definition of the common logarithm | For (x>0), (y=log(x)) if and only if ({10}^y=x). |

Definition of the natural logarithm | For (x>0), (y=ln(x)) if and only if (e^y=x). |

## Key Concepts

- The inverse of an exponential function is a logarithmic function, and the inverse of a logarithmic function is an exponential function.
- Logarithmic equations can be written in an equivalent exponential form, using the definition of a logarithm. See Example (PageIndex{1}).
- Exponential equations can be written in their equivalent logarithmic form using the definition of a logarithm See Example (PageIndex{2}).
- Logarithmic functions with base (b) can be evaluated mentally using previous knowledge of powers of (b). See Example (PageIndex{3}) and Example (PageIndex{4}).
- Common logarithms can be evaluated mentally using previous knowledge of powers of (10). See Example (PageIndex{5}).
- When common logarithms cannot be evaluated mentally, a calculator can be used. See Example (PageIndex{6}).
- Real-world exponential problems with base (10) can be rewritten as a common logarithm and then evaluated using a calculator. See Example (PageIndex{7}).
- Natural logarithms can be evaluated using a calculator Example (PageIndex{8})
**.**

## Download Now!

We have made it easy for you to find a PDF Ebooks without any digging. And by having access to our ebooks online or by storing it on your computer, you have convenient answers with Section 6 3 Logarithmic Functions Logarithmic Functions A . To get started finding Section 6 3 Logarithmic Functions Logarithmic Functions A , you are right to find our website which has a comprehensive collection of manuals listed.

Our library is the biggest of these that have literally hundreds of thousands of different products represented.

Finally I get this ebook, thanks for all these Section 6 3 Logarithmic Functions Logarithmic Functions A I can get now!

I did not think that this would work, my best friend showed me this website, and it does! I get my most wanted eBook

wtf this great ebook for free?!

My friends are so mad that they do not know how I have all the high quality ebook which they do not!

It's very easy to get quality ebooks )

so many fake sites. this is the first one which worked! Many thanks

wtffff i do not understand this!

Just select your click then download button, and complete an offer to start downloading the ebook. If there is a survey it only takes 5 minutes, try any survey which works for you.

## 6.3: Logarithmic Functions - Mathematics

**Table 12.10 Mathematical Functions**

Name | Description |
---|---|

ABS() | Return the absolute value |

ACOS() | Return the arc cosine |

ASIN() | Return the arc sine |

ATAN() | Return the arc tangent |

ATAN2() , ATAN() | Return the arc tangent of the two arguments |

CEIL() | Return the smallest integer value not less than the argument |

CEILING() | Return the smallest integer value not less than the argument |

CONV() | Convert numbers between different number bases |

COS() | Return the cosine |

COT() | Return the cotangent |

CRC32() | Compute a cyclic redundancy check value |

DEGREES() | Convert radians to degrees |

EXP() | Raise to the power of |

FLOOR() | Return the largest integer value not greater than the argument |

LN() | Return the natural logarithm of the argument |

LOG() | Return the natural logarithm of the first argument |

LOG10() | Return the base-10 logarithm of the argument |

LOG2() | Return the base-2 logarithm of the argument |

MOD() | Return the remainder |

PI() | Return the value of pi |

POW() | Return the argument raised to the specified power |

POWER() | Return the argument raised to the specified power |

RADIANS() | Return argument converted to radians |

RAND() | Return a random floating-point value |

ROUND() | Round the argument |

SIGN() | Return the sign of the argument |

SIN() | Return the sine of the argument |

SQRT() | Return the square root of the argument |

TAN() | Return the tangent of the argument |

TRUNCATE() | Truncate to specified number of decimal places |

All mathematical functions return NULL in the event of an error.

Returns the absolute value of *X* , or NULL if *X* is NULL .

The result type is derived from the argument type. An implication of this is that ABS(-9223372036854775808) produces an error because the result cannot be stored in a signed BIGINT value.

This function is safe to use with BIGINT values.

Returns the arc cosine of *X* , that is, the value whose cosine is *X* . Returns NULL if *X* is not in the range -1 to 1 .

Returns the arc sine of *X* , that is, the value whose sine is *X* . Returns NULL if *X* is not in the range -1 to 1 .

Returns the arc tangent of *X* , that is, the value whose tangent is *X* .

Returns the arc tangent of the two variables *X* and *Y* . It is similar to calculating the arc tangent of *Y* / *X* , except that the signs of both arguments are used to determine the quadrant of the result.

Returns the smallest integer value not less than *X* .

For exact-value numeric arguments, the return value has an exact-value numeric type. For string or floating-point arguments, the return value has a floating-point type.

Converts numbers between different number bases. Returns a string representation of the number *N* , converted from base *from_base* to base *to_base* . Returns NULL if any argument is NULL . The argument *N* is interpreted as an integer, but may be specified as an integer or a string. The minimum base is 2 and the maximum base is 36 . If *from_base* is a negative number, *N* is regarded as a signed number. Otherwise, *N* is treated as unsigned. CONV() works with 64-bit precision.

Returns the cosine of *X* , where *X* is given in radians.

Returns the cotangent of *X* .

Computes a cyclic redundancy check value and returns a 32-bit unsigned value. The result is NULL if the argument is NULL . The argument is expected to be a string and (if possible) is treated as one if it is not.

Returns the argument *X* , converted from radians to degrees.

Returns the value of *e* (the base of natural logarithms) raised to the power of *X* . The inverse of this function is LOG() (using a single argument only) or LN() .

Returns the largest integer value not greater than *X* .

For exact-value numeric arguments, the return value has an exact-value numeric type. For string or floating-point arguments, the return value has a floating-point type.

Formats the number *X* to a format like '#,###,###.##' , rounded to *D* decimal places, and returns the result as a string. For details, see Section 12.8, “String Functions and Operators”.

This function can be used to obtain a hexadecimal representation of a decimal number or a string the manner in which it does so varies according to the argument's type. See this function's description in Section 12.8, “String Functions and Operators”, for details.

Returns the natural logarithm of *X* that is, the base- *e* logarithm of *X* . If *X* is less than or equal to 0.0E0, the function returns NULL and a warning “ Invalid argument for logarithm ” is reported.

This function is synonymous with LOG( *X* ) . The inverse of this function is the EXP() function.

If called with one parameter, this function returns the natural logarithm of *X* . If *X* is less than or equal to 0.0E0, the function returns NULL and a warning “ Invalid argument for logarithm ” is reported.

The inverse of this function (when called with a single argument) is the EXP() function.

If called with two parameters, this function returns the logarithm of *X* to the base *B* . If *X* is less than or equal to 0, or if *B* is less than or equal to 1, then NULL is returned.

Returns the base-2 logarithm of *X* . If *X* is less than or equal to 0.0E0, the function returns NULL and a warning “ Invalid argument for logarithm ” is reported.

LOG2() is useful for finding out how many bits a number requires for storage. This function is equivalent to the expression LOG( *X* ) / LOG(2) .

Returns the base-10 logarithm of *X* . If *X* is less than or equal to 0.0E0, the function returns NULL and a warning “ Invalid argument for logarithm ” is reported.

Modulo operation. Returns the remainder of *N* divided by *M* .

This function is safe to use with BIGINT values.

MOD() also works on values that have a fractional part and returns the exact remainder after division:

Returns the value of π (pi). The default number of decimal places displayed is seven, but MySQL uses the full double-precision value internally.

Returns the value of *X* raised to the power of *Y* .

Returns the argument *X* , converted from degrees to radians. (Note that π radians equals 180 degrees.)

Returns a random floating-point value *v* in the range 0 <= *v* < 1.0 . To obtain a random integer *R* in the range *i* <= *R* < *j* , use the expression FLOOR( *i* + RAND() * ( *j* − *i* )) . For example, to obtain a random integer in the range the range 7 <= *R* < 12 , use the following statement:

If an integer argument *N* is specified, it is used as the seed value:

With a constant initializer argument, the seed is initialized once when the statement is prepared, prior to execution.

With a nonconstant initializer argument (such as a column name), the seed is initialized with the value for each invocation of RAND() .

One implication of this behavior is that for equal argument values, RAND( *N* ) returns the same value each time, and thus produces a repeatable sequence of column values. In the following example, the sequence of values produced by RAND(3) is the same both places it occurs.

RAND() in a WHERE clause is evaluated for every row (when selecting from one table) or combination of rows (when selecting from a multiple-table join). Thus, for optimizer purposes, RAND() is not a constant value and cannot be used for index optimizations. For more information, see Section 8.2.1.20, “Function Call Optimization”.

Use of a column with RAND() values in an ORDER BY or GROUP BY clause may yield unexpected results because for either clause a RAND() expression can be evaluated multiple times for the same row, each time returning a different result. If the goal is to retrieve rows in random order, you can use a statement like this:

To select a random sample from a set of rows, combine ORDER BY RAND() with LIMIT :

RAND() is not meant to be a perfect random generator. It is a fast way to generate random numbers on demand that is portable between platforms for the same MySQL version.

This function is unsafe for statement-based replication. A warning is logged if you use this function when binlog_format is set to STATEMENT .

Rounds the argument *X* to *D* decimal places. The rounding algorithm depends on the data type of *X* . *D* defaults to 0 if not specified. *D* can be negative to cause *D* digits left of the decimal point of the value *X* to become zero. The maximum absolute value for *D* is 30 any digits in excess of 30 (or -30) are truncated.

The return value has the same type as the first argument (assuming that it is integer, double, or decimal). This means that for an integer argument, the result is an integer (no decimal places):

ROUND() uses the following rules depending on the type of the first argument:

For exact-value numbers, ROUND() uses the “ round half away from zero ” or “ round toward nearest ” rule: A value with a fractional part of .5 or greater is rounded up to the next integer if positive or down to the next integer if negative. (In other words, it is rounded away from zero.) A value with a fractional part less than .5 is rounded down to the next integer if positive or up to the next integer if negative.

For approximate-value numbers, the result depends on the C library. On many systems, this means that ROUND() uses the “ round to nearest even ” rule: A value with a fractional part exactly halfway between two integers is rounded to the nearest even integer.

The following example shows how rounding differs for exact and approximate values:

In MySQL 8.0.21 and later, the data type returned by ROUND() (and TRUNCATE() ) is determined according to the rules listed here:

When the first argument is of any integer type, the return type is always BIGINT .

When the first argument is of any floating-point type or of any non-numeric type, the return type is always DOUBLE .

When the first argument is a DECIMAL value, the return type is also DECIMAL .

The type attributes for the return value are also copied from the first argument, except in the case of DECIMAL , when the second argument is a constant value.

When the desired number of decimal places is less than the scale of the argument, the scale and the precision of the result are adjusted accordingly.

In addition, for ROUND() (but not for the TRUNCATE() function), the precision is extended by one place to accomodate rounding that increases the number of significant digits. If the second argument is negative, the return type is adjusted such that its scale is 0, with a corresponding precision. For example, ROUND(99.999, 2) returns 100.00 —the first argument is DECIMAL(5, 3) , and the return type is DECIMAL(5, 2) .

If the second argument is negative, the return type has scale 0 and a corresponding precision ROUND(99.999, -1) returns 100 , which is DECIMAL(3, 0) .

Returns the sign of the argument as -1 , 0 , or 1 , depending on whether *X* is negative, zero, or positive.

Returns the sine of *X* , where *X* is given in radians.

Returns the square root of a nonnegative number *X* .

Returns the tangent of *X* , where *X* is given in radians.

Returns the number *X* , truncated to *D* decimal places. If *D* is 0 , the result has no decimal point or fractional part. *D* can be negative to cause *D* digits left of the decimal point of the value *X* to become zero.

All numbers are rounded toward zero.

In MySQL 8.0.21 and later, the data type returned by TRUNCATE() follows the same rules that determine the return type of the ROUND() function for details, see the description for ROUND() .

## Common Logs and Natural Logs

There are two logarithm buttons on your calculator. One is marked "log" and the other is marked "ln". Neither one of these has the base written in. The base can be determined, however, by looking at the inverse function, which is written above the key and accessed by the 2 nd key.

### Common Logarithm (base 10)

When you see "log" written, with no base, assume the base is 10.

That is: log x = log_{10} x.

Some of the applications that use common logarithms are in pH (to measure acidity), decibels (sound intensity), the Richter scale (earthquakes).

An interesting (possibly) side note about pH. "Chapter 50: Sewers" of the Village of Forsyth Code requires forbids the discharge of waste with a pH of less than 5.5 or higher than 10.5 (section 50.07).

Common logs also serve another purpose. Every increase of 1 in a common logarithm is the result of 10 times the argument. That is, an earthquake of 6.3 has 10 times the magnitude of a 5.3 earthquake. The decibel level of loud rock music or a chainsaw (115 decibels = 11.5 bels) is 10 times louder than chickens inside a building (105 decibels = 10.5 bels)

### Natural Logarithms (base e)

Remember that number *e*, that we had from the previous section? You know, the one that was approximately 2.718281828 (but doesn't repeat or terminate). That is the base for the natural logarithm.

When you see "ln" written, the base is *e*.

That is: ln x = log_{e} x

Exponential growth and decay models are one application that use natural logarithms. This includes continuous compounding, radioactive decay (half-life), population growth. Typically applications where a process is continually happening. Now, these applications were first mentioned in the exponential section, but you will be able to solve for the other variables involved (after section 4) using logarithms.

In higher level mathematics, the natural logarithm is the logarithm of choice. There are several special properties of the natural logarithm function, and it's inverse function, that make life much easier in calculus.

Since "ln x" and "*e* x " are inverse functions of each other, any time an "ln" and "e" appear right next to each other, with absolutely nothing in between them (that is, when they are composed with each other), then they inverse out, and you're left with the argument.

## 6.3: Logarithmic Functions - Mathematics

To understand what a logarithm is you first have to understand what a power is. Follow that link first if you don't!

OK, you do know what a power is. So it makes sense to you to write something like

After these preliminaries, we can now get into the meat of the matter. The equation (*) is the key to everything. The number b is the base , the number x the exponent , and the expression that equals y is a power . If we think of x as the independent variable and y as the dependent variable then (*) defines an exponential function .

In the equation (*) we can now pretend that two of the variables are given, and solve for the third. If the base and the exponent are given we compute a power , if the the exponent and the power are given we compute a root (or radical ), and, if the power and the base are given, we compute a logarithm.

In other words, The logarithm of a number y with respect to a base b is the exponent to which we have to raise b to obtain y.

We can write this definition as

and we say that x is the logarithm of y with base b if and only if b to the power x equals y .

Let's illustrate this definition with a few examples. If you have difficulties with any of these powers go back to my page on powers.

## Special Bases

## More Information

You should find extensive information on logarithms in any textbook on College Algebra. To check your understanding and guide your further study figure out answers to the following questions:

- Why are logarithms important?
- Why are exponential functions important?
- How do you convert a logarithm with respect to one base to a logarithm with respect to another base?
- Why does the base have to be positive?
- Why is the power always positive?
- What is it that makes natural logarithms natural?

## A Logarithm Calculator

## However, your browser does not support Java. If it did you would not see this message! Get a java compatible browser such as Netscape, of a sufficiently advanced version.

to bring up a Logarithm Calculator that lets you pick two of the numbers in (*) and computes the third. It's pretty straightforward to use, but here is documentation.

## 6.3: Logarithmic Functions - Mathematics

**Graphing Logarithmic Functions**

The pH of a solution is defined as the - log of the hydrogen ion concentration or

pH = -log [H+]

Thus the pH of a solution changes with the hydrogen concentration as follows

[H+]pH1.0 M 0 0.1 M 1 0.01 M 2 0.001 M 3 0.0001 M 4 0.00001 M 5 0.000001 M 6 0.0000001 M 7 0.00000001 M 8 0.000000001 M 9 0.0000000001 M 10 0.00000000001 M 11 0.000000000001 M 12 0.0000000000001 M 13 0.00000000000001 M 14 If you were to plot [H+] on the

x-axis and pH on they-axis the graph would look like thisAs you will see below, your plot of hydrogen concentration versus pH represents a reflection of a base 10 logarithmic function. In this section, we will consider some of the properties of these curves.

Graphs of Logarithmic FunctionsLogarithmic and exponential functions are inverses of one another. Therefore, the graph of

y= log_{a}xis the reflection of the graph ofy=a xacross the liney=x. The overall shape of the graph of a logarithmic function depends on whether 0 <a< 1 ora> 1 . The two different cases are graphically represented below.

The behavior in each figure can be summarized as follows. f_{1}(x) = log_{a}x,0 <a< 1f_{2}(x) = log_{a}x,a> 11. As

x&rarr 0 + ,f_{1}(x) &rarr &infinThis means that the curve appears to increase as values of

xget close to 0 from the right-hand side andf_{1}(x) approaches the linex= 0 (or the vertical asymptote).2.As

x&rarr &infin ,f_{1}(x) &rarr - &infinIn other words,

f_{1}(x) decreases without bound asxincreases .3. If f

_{1}(1) = 0 and f_{2}(1) = 0The curve intersects the

x-axis at (1,0). This point is called thex-intercept.1. As

x&rarr 0 + ,f_{2}(x) &rarr - &infinThis means that as values of

xapproach 0,f_{2}(x) approachesx= 0 (the vertical asymptote).2. As x &rarr &infin ,

f_{2}(x)&rarr &infinIn other words,

f_{2}(x) increases without bound to the right of the curve.3. If f

_{1}(1) = 0 and f_{2}(1) = 0The curve intersects the

x-axis at (1,0). This point is called thex-intercept.It is important to recognize that base

a> 1 logarithmic functions increase very slowly.

Graphs of Transformed Logarithmic FunctionsAs we saw in the sample curve of pH, logarithmic functions can be complicated with transformations, such as stretches, shrinks, and reflections. These graphical transformations should be handled in the same manner as those for any other function you have studied.

*****

**In the next section we will discuss the logarithmic scale and its uses in biology.**

## 6.3: Logarithmic Functions - Mathematics

This table presents a catalog of the coefficient-wise math functions supported by Eigen. In this table, a , b , refer to Array objects or expressions, and m refers to a linear algebra Matrix/Vector object. Standard scalar types are abbreviated as follows:

- int: i32
- float: f
- double: d
- std::complex<float> : cf
- std::complex<double> : cd

For each row, the first column list the equivalent calls for arrays, and matrices when supported. Of course, all functions are available for matrices by first casting it as an array: m.array() .

The third column gives some hints in the underlying scalar implementation. In most cases, Eigen does not implement itself the math function but relies on the STL for standard scalar types, or user-provided functions for custom scalar types. For instance, some simply calls the respective function of the STL while preserving argument-dependent lookup for custom types. The following:

means that the STL's function std::foo will be potentially called if it is compatible with the underlying scalar type. If not, then the user must ensure that an overload of the function foo is available for the given scalar type (usually defined in the same namespace as the given scalar type). This also means that, unless specified, if the function std::foo is available only in some recent c++ versions (e.g., c++11), then the respective Eigen's function/method will be usable on standard types only if the compiler support the required c++ version.

## Log loss function math explained

Have you ever worked on a classification problem in Machine Learning? If yes, then you might have come across cross-entropy or log loss function in Logistic regression.

What’s that function used for? What’s the significance of the function in classification problems?

Let’s find out in detail by looking at the math behind the function.

Before we start delving into the math behind the function and see how it has been derived we should know what a loss function is.

In simple terms, Loss function: A function used to evaluate the performance of the algorithm used for solving a task. Detailed definition

In a binary classification algorithm such as Logistic regression, the goal is to minimize the cross-entropy function.

Cross-entropy is a measure of the difference between two probability distributions for a given random variable or set of events — Jason Brownlee

Let’ s consider we have data of patients, and the task is to find which patients have cancer. In our example, as we do not have the entire population’s data, we try to predict the likelihood of a person having cancer from a sample of data. We only need to predict for the malignant class *i.e* *P(y=1 | x ) = p̂* because the probability for the negative class can be derived from it *i.e* *P(y=0 | x ) =1-P(y=1 | x ) = 1-p̂*.

A good binary classification algorithm should produce a ** high**value of

**( probability of predicting the malignant class for a sample S) which is the closest estimate to**

*p̂**P*(probability of predicting the malignant class of the total population).

In probability theory, a probability density function, or density of a continuous random variable, is a function whose value at any given sample in the sample space can be interpreted as providing a relative likelihood that the value of the random variable would equal that sample — Wikipedia

*The idea is to find the maximum of the likelihood function for a particular value of* θ

To find a maximize of a function means to differentiate the function (dL/dθ= 0)

As Likelihood function L is a product of the probability distribution function of each Xi, we have to use the product rule in differentiation to differentiate such a function, which will become a complicated task.

This is where the Logarithms come to the rescue.

Log(xy) = Logx + LogyDifferentiation: d(Logx)/dx = 1/x

Applying log to the likelihood function simplifies the expression into a sum of the log of probabilities and does not change the graph with respect to θ. Moreover, differentiating the log of the likelihood function will give the same estimated θ because of the monotonic property of the log function.

This transformation of the likelihood function helps in finding the value of θ, which maximizes the likelihood function.

## 6.3: Logarithmic Functions - Mathematics

**SECTION 4. WHAT IS A LOGARITHM?**

A logarithm is the power to which a number must be raised in order to get some other number (see Section 3 of this Math Review for more about exponents). For example, the base ten logarithm of 100 is 2, because ten raised to the power of two is 100:

This is an example of a base-ten logarithm. We call it a base ten logarithm because ten is the number that is raised to a power. The base unit is the number being raised to a power. There are logarithms using different base units. If you wanted, you could use two as a base unit. For instance, the base two logarithm of eight is three, because two raised to the power of three equals eight:

In general, you write log followed by the base number as a subscript. The most common logarithms are base 10 logarithms and natural logarithms they have special notations. A base ten log is written

and a base ten logarithmic equation is usually written in the form:

A natural logarithm is written

and a natural logarithmic equation is usually written in the form:

So, when you see log by itself, it means base ten log. When you see ln, it means natural logarithm (we'll define natural logarithms below). In this course only base ten and natural logarithms will be used.

For more information about this site contact the Distance Education Coordinator.

Copyright © 2004 by the Regents of the University of Minnesota, an equal opportunity employer and educator.

## Complex Logarithm Function

**Proof**

an equation *f(z)* = has infinitely many solutions in a case of complex variable, and the complex logarithm function Ln( *z* ) is a multi-valued function.

If *k* = 0 we have a principal logarithm ln( *z* ) or principal branch of the logarithm:

where ln (-5) is a principal logarithm.

1) ln (-5) = ln (|-5|) + *i* [ arg (-5) ] = ln (5) +

= ln (5) + (2 *k* + 1) , where *k* ᮹ integer.

The logarithm function Ln( *z* ) has a singularity at *z* = 0 . If the non-zero complex number *z* is expressed in polar coordinates as

Ln(*z*) = ln(*r*) + *i*( + ) , where *k* is any integer and ln(*r*) is the usual natural logarithm of a real number.

A fact that the complex logarithm function is the multi-valued function explains **Paradox of Bernoulli and Leibniz**

The paradox of Bernoulli and Leibniz is not an 裬usive㡳e for the complex logarithm function. Let us look at Example 2.

An explanation of the example 2

When we deal with several properties familiar from the real logarithm we should remember that the complex logarithm is the multi-valued function.

Ln( *zw* ) = ln(4) - *i* + 2 *k* 1

Ln( *z* ) + Ln( *w* ) = ln(4) + *i* + 2 *k* 2

It is possible to find such *k* 1 and *k* 2 , that

ln(4) - *i* + 2 *k* 1 = ln(4) + *i* + 2 *k* 2

Let us consider several properties of the logarithm function familiar from the real logarithm. It is necessary to remember about 毮t size="+1"> 튠 to make them always valid for the complex extension.