Since the exponential function only outputs positive values, the logarithm can only accept positive values as inputs, so the domain of any logarithm function is \((0,\infty)\text{.}\)
Since the exponential function can accept all real numbers as inputs, the logarithm can output any real number, so the range is all real numbers, or \((-\infty,\infty)\text{.}\)
Sketching the graph, notice that as the input approaches zero from the right, the output of the function grows very large in the negative direction, indicating a vertical asymptote at \(x = 0\text{.}\)
When sketching a general logarithm with base \(b\text{,}\) it can be helpful to remember that the graph will pass through the points \((1, 0)\) and \((b, 1)\text{.}\) To get a feeling for how the base affects the shape of the graph, examine the graphs below.
Notice that the larger the base, the slower the graph grows. For example, the common logarithm graph, while it grows without bound, it does so very slowly. For example, to reach an output of 8, the input must be 100,000,000.
Another important observation made was the domain of the logarithm. Like the reciprocal and square root functions, the logarithm has a restricted domain which must be considered when finding the domain of a composition involving a logarithms.
The logarithm is only defined with the input is positive, so this function will only be defined when \(5-2x>0\text{.}\) Solving this inequality, this is only true when \(-2x>-5\text{,}\) which is only true when \(x<\dfrac{5}{2}\text{.}\)
Subsection4.5.2Transformations of the Logarithmic Function
Transformations can be applied to a logarithmic function using the basic transformation techniques, but as with exponential functions, several transformations result in interesting relationships.
First recall the change of base property tells us that \(\log_{b}(x)=\dfrac{\log_c(x)}{\log_c(b)}=\dfrac{1}{\log_c(b)}\log_{c}(x)\text{.}\) From this, we can see that \(\log_{b}(x)\) is a vertical stretch or compression of the graph of the \(\log_{c}(x)\) graph. This tells us that a vertical stretch or compression is equivalent to a change of base. For this reason, we will often see graphs of logarithmic functions in terms of the common or natural logarithmic functions.
Next, consider the effect of a horizontal compression on the graph of a logarithmic function. Considering \(f(x)=\log(cx)\text{,}\) we can use the sum property to see \(f(x)=\log(cx)=\log(c)+\log(x)\text{.}\) Since \(\log(c)\) is a constant, the effect of a horizontal compression is the same as the effect of a vertical shift.
This is a horizontal shift to the left by 2 units. Notice that none of our logarithm rules allow us rewrite this in another form, so the effect of this transformation is unique. Shifting the graph of \(\ln(x)\) to the left by two units gives us the following graph:
Factoring the inside as \(f(x)=5\log(-(x-2))\) reveals that this graph is that of the common logarithm, horizontally reflected, vertically stretched by a factor of 5, and shifted to the right by 2 units.
So, we can tell that the vertical asymptote will be shifted to \(x = 2\text{,}\) and the graph will have domain \((-\infty,2)\) (due to the horizontal reflection). A rough sketch can be created by using the vertical asymptote along with a couple points on the graph, such as \(f(1)=5\log(-1+2)=5\log(1)=0\) and \(f(-8)=5\log(-(-8)+2)=5\log(10)=5\text{.}\)
Any transformed logarithmic function can be written in the form \(f(x)=a\log(x-b)+k\text{,}\) or \(f(x)=a\log(-(x-b))+k\) if horizontally reflected, where \(x = b\) is the vertical asymptote.
This graph has a vertical asymptote at \(x =-2\) and has been vertically reflected. We do not know yet the vertical shift (equivalent to horizontal stretch) or the vertical stretch (equivalent to a change of base). We know so far that the equation will have form \(f(x)=-a\log(x+2)+k\text{.}\)
It appears the graph passes through the points \((-1, 1)\) and \((2,-1)\text{.}\) Substituting in \((-1, 1)\text{,}\) we can see: \(1=-a\log(-1+2)+k\text{,}\) so \(1=-a\log(1)+k\text{,}\) and since \(\log(1)=0\text{,}\) we know that \(1=k\text{.}\)
Next, substituting in \((2,-1)\text{,}\) we see that \(-1=-a\log(2+2)+1\text{.}\) Simplifying gives us \(-2=-a\log( 4)\text{,}\) and thus \(a=\dfrac{2}{\log(4)}\text{.}\)
The graph is horizontally reflected and has a vertical asymptote at \(x = 3\text{,}\) giving the form \(f(x)=a\log(-(x-3))+k\text{.}\) Substituting in the point \((2,0)\) gives \(0=a\log(-(2-3))+k\text{,}\) simplifying to \(k = 0\text{.}\) Substituting in \((-2,-2)\text{,}\)\(-2=a\log(-(-2-3))\text{,}\) so \(\dfrac{-2}{\log( 5)}=a\text{.}\) The equation is \(f(x)=\dfrac{-2}{\log( 5)}\log(-(x-3))\) or \(f(x)=-2\log_{5}(-(x-3))\text{.}\)
Domain: \(x>-2\) or \((-2,\infty)\text{.}\) Range: all real numbers, or \((-\infty, \infty)\text{.}\) As \(x\to-2^{+}, f(x)\to \infty\) and as \(x\to\infty, f(x)\to-\infty\text{.}\)