Logarithms

Definition

The logarithm of a positive real number x with respect to base b, a positive real number not equal to 1, is the exponent by which b must be raised to yield x. In other words, the logarithm of x to base b is the solution y to the equation.

If any base b is equal to the anti-logarithm, the logarithm is always 1.

If the anti-logarithm is 1, the logarithm is always 0.

Formula

  1. Product: The logarithm of a product is the sum of the logarithms of the numbers being multiplied.
  2. Quotient: The logarithm of the ratio of two numbers is the difference of the logarithms.
  3. Power: The logarithm of the p-th power of a number is p times the logarithm of the number itself.
  4. Root: The logarithm of a p-th root is the logarithm of the number divided by p.

Change of base

The logarithm can be computed from the logarithms of x and b with respect to an arbitrary base k.

Given a number x and its logarithm logb(x) to an unknown base b, the base is given by:

Exercises

Q.1

Solve the exponential equation. :

Q.2

Plot running time T(N) vs. input size N using log-log scale. :