<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>4.3.8 (Plotting log example)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<h3>Plotting logarithmic functions</h3>
<p>In general, plotting logarithmic functions are similar to plotting exponentials as they are the inverse functions. However, in some cases they behave slightly differently. Suppose that we wish to plot a general exponential function \(f(x) = k \cdot \log_b(a-c) + d\). This is the general logarithmic function. We can see using the applet above that all logarithmic functions follow a similar shape, so in order to accurately sketch such graphs we need to find the following information:</p>
<ol>
<li>What happens to the function \(f(x)\) as \(x \to \pm\infty\)?</li>
<li>What is the \(x\)-intercept of the graph?</li>
<li>We need two different points to draw the curve.</li>
</ol>
<p>We shall see this by way of the following example.</p>
<p> </p>
<h3>Example</h3>
<p>Sketch the graph of \(y = \log_2(x-1)+1\) and state the domain and range of the function.</p>
<h3>Solution</h3>
<p>Firstly note that \(x-1&gt;0\) when \(x&gt;1\). Therefore</p>
<p>Domain: \(\{x: x&gt; 1\}\).</p>
<p>Range:\(\{y : y \in \mathbb{R}\}\).</p>
<p> </p>
<p>Next note that as \(x \to 1\) \(y \to -\infty\), therefore the vertical line which the graph tends to is \(x = 1\), this is the <strong>vertical asymptote</strong> of the graph. Also note that as \(x \to \infty\), \(y \to \infty\), so there is no <strong>horizontal asymptote</strong>. In addition, if \(x = 0\) then \(\log_2(x-1)\) is undefined, so there is no \(y\)-intercept.</p>
<p>To find the \(x\)-intercept we set \(y = 0\) and rearrange the function to get \(x\). therefore, we have \[ 0 = \log_2(x-1)+1 \implies \log_2(x-1)= -1 \implies x-1 = 2^{-1} = \frac{1}{2} \implies x = \frac{3}{2}. \] So the \(x\)-intercept is \(\frac{3}{2}\).</p>
<p>Now let us find two points on the curve, say \(x = 2\) and \(x = 5\). Then \[ x = 2 \implies y = \log_2(2-1)+1 = 1 \qquad \mbox{ and } \qquad x = 5 \implies \log_2(5-1)+ 1 = 2+1 =3. \] Therefore two points are the curve are \((2,1)\) and \((5,3)\). Putting all of this together we can sketch the following graph.</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="@@PLUGINFILE@@/Logarithmic%20function.png" alt="graph of logarithmic function example" width="615" height="418" /></p>
</br>
<p>As a summary, we can see that the function \(f(x) = \log_a x\) has the following properties:</p>
<ol>
<li>Domain: \(\{x: x> 1\}\).</li>
<li>Range:\(\{y: y \in \mathbb{R}\}\).</li>
<li>Asymptote: \(x = 1\) (vertical).</li>
</ol>]]></text>
<file name="Exponential function.png" path="/" encoding="base64">[encoded data, 93728 characters]</file>
<file name="Logarithmic function.png" path="/" encoding="base64">[encoded data, 89740 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
