# Logarithms

## Definition

The logarithm of a positive real number

xwith respect to baseb, a positive real number not equal to 1, is the exponent by whichbmust be raised to yieldx. In other words, the logarithm ofxto basebis the solutionyto 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

**Product**: The logarithm of a product is the sum of the logarithms of the numbers being multiplied.**Quotient**: The logarithm of the ratio of two numbers is the difference of the logarithms.**Power**: The logarithm of the p-th power of a number is p times the logarithm of the number itself.**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. :