## Logarithmic Functions

A logarithmic function is used to better model functions which increase at an exponential rate. It is the inverse of the exponential function and the general equation is:

$f(x)=log_{a}(x)$

The two main log functions that are used in methods is log to base of eulers number, the natural log and log to the base 10, where every time x increases by 1 the function increases by a factor of 10.

## Sketching log functions

Here are a few guidelines to sketching logarithmic functions.

Number one

$f(1)=0$

Number two

$f(a)=1$

Number three is that we can’t take a log of a negative number or zero, since any number to the power of another number cannot equal zero or a negative number, you just get smaller fractions. Therefore the domain is only real positive numbers.

Number four

$x\rightarrow 0, f(x) \rightarrow \infty^{-}$

Number five is that the range includes all real numbers, which means the function can equal anything.

Number six is that it is only a one to function, which means that every point on the x axis corresponds to one and only one point on the y axis

If we follow these rules the basic function is not hard at all to sketch.

## Transformations

### Translations

$y=log_{a}(x-h)+k$

The rules of sketching the function this function are similar to the exponential function

In this equation h represents the shift along the x-axis and k the shift along the y-axis. So our known co-ordinates will face a small shift

$(-1,\frac{1}{a}) \rightarrow (-1+h,\frac{1}{a}+k)$

$(0,1) \rightarrow (h,1+k)$

$(1,a) \rightarrow (1+h,a+k)$

### Reflections

The graph can be reflected in the x-axis by placing a negative in front of the function to get:

$y=-log(x)$

The graph can be reflected in the y-axis by placing a negative in front of x in the function to get:

$y=-log(-x)$

Since we can’t have the log of a negative number then all the values of x for this function must be negative.

Here we can see a number of natural logs graphed here. Increasing the value of the base will cause the function to increase at a greater rate for values of x greater than one and decrease at a greater rate for values less than one but greater than zero.

Here we can see the green function is a reflection of the blue function in the x axis and the red function is a reflection of the blue function in the x axis.

It is also possible for a log function to be reflected in both the x and y axis, if the negative is applied before the function and the x value.

If there are translations applied to the function as well, you must first reflect the function before you translate them.

### Dialation

The effect of dilation is similar to what happened with the exponential functions. If there is a value k in front of the function the dilation factor will be k from the x axis, the value will just be multiplied by k.

If there was a x coefficient to the value of k inside the log brackets then the dilation factor to the y axis will be one over k, the x-coefficient will be multiplied by one over k for a given value.

### Example

Lets now have a look at an example:

$f(x)=-3log(2x+5)-3$

Which we can rewrite as

$f(x)=-3log(2(x+\frac{5}{2}))-3$

Straight away we can see that there is a reflection in the x-axis, dilation by a factor of three from the x axis, a half from the y-axis, but a shift of the graph five over two to the left and three down.

At this stage we need to have the shape of a negative log in our mind and from there we know it will have both a x and y intercept. A y-intercept due to the shift to the left, allowing for some negative values of x.

The asymptote will move:

$x=0 \rightarrow x=-2.5$

Then find the y intercept, let x=0

$f(0)=e^{1-0}+3=e+3$

Given there is no dilation we can just draw the normal exponential function going through the y intercept of e plus 3, after it has been reflected in the x-axis.