<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>2.2.1.4 The Domain and Range of a Function</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p><span><strong>The Domain and Range of a Function</strong></span></p>
<p>The set of values which we allow the independent variable to take is called the <span><strong>domain</strong></span> of the function. A domain is often an interval on the \(x\) axis. For example, the function \[y=g(x)=5x+2, \qquad -5\le x\le 20\] has any value of \(x\) between \(-5\) and \(20\) inclusive as its domain because it has been stated as this. If the domain of a function is not stated then it is taken to be the largest set possible. For example \[h(t)=t^2+1\] has domain \(-\infty&lt;t&lt;\infty\) since \(h\) is defined for every value of \(t\) and the domain has not been stated otherwise.</p>
<p>Later, you will meet some functions for which certain values of the independent variable must be excluded from the domain because at these values the function would be undefined. One such example is \( \displaystyle{f(x)={1\over x}}\) for which we must exclude the value \(x=0\), since \(\displaystyle{{1\over 0}}\) is meaningless.</p>
<p>Similarly, we cannot include the value \(x=2\) in the domain of \(f(x)=\dfrac{1}{x-2}\).</p>
<p>The set of values of the function for a given domain, that is, the set of \(y\) values, is called the <span><strong>range</strong></span> of the function. The range of \(g(x)\) above is \(-23\le g(x) \le 102\) and the range of \(h(t)\) is \(1\le h(t)&lt;\infty\). Usually the range of a function can sometimes be identified by inspecting its graph. Note that the range depends on the domain, and taking a larger (or smaller) domain could result in a larger (or smaller) range.</p>
<p>There is a related concept, called the <b>codomain</b> of a function. The codomain of a function can be any set which contains the range of the function.<br></p>

<hr>
<h4 class="HELM_example">Example</h4>
<p>Consider the function given by \(g(t)=2t^2+1\), \(-2\le t\le 2\).</p>
<ol class="HELM_parts">
  <li><p>State the domain of the function.</p></li>
  <li><p>Plot a graph of the function.</p></li>
  <li><p>Deduce the range of the function from the graph.</p></li>
</ol>

<h4 class="HELM_solution">Solution</h4>
<ol class="HELM_parts">
  <li><p>The domain is given as the interval \(-2\le t\le 2\), that is any value of \(t\) between \(-2\) and \(2\) inclusive.</p></li>
<li><p>To draw the graph a table of input and output values must be constructed first.</p><p> <span><strong>Table</strong></span></p>
<table class="HELM_table">
<thead><tr>
<th>\(t\)</th>
<th>\(-2\)</th>
<th>\(-1\)</th>
<th>\(0\)</th>
<th>\(1\)</th>
<th>\(2\)</th>
</tr></thead><tbody>
<tr>
<td><b>\(y=g(t)\)</b></td>
<td>\(9\)</td>
<td>\(3\)</td>
<td>\(1\)</td>
<td>\(3\)</td>
<td>\(9\)</td>
</tr>
</tbody></table>
<p>Each pair of \(t\) and \(y\) values in the table is plotted as a single point shown as \(\bullet\) in the figure below. The points are then joined with a smooth curve to produce the required graph.</p>
<figure class="HELM_figure"><img src="@@PLUGINFILE@@/fig9.svg" alt="" class="img-responsive atto_image_button_text-bottom" width="250" height="159"></figure>
<li><p>The range is the set of values which the function takes. By inspecting the graph we see that the range of \(g\) is the interval \(1\le g(t)\le 9\).</p></li>
</ol>]]></text>
<file name="fig8.svg" path="/" encoding="base64">[encoded data, 27060 characters]</file>
<file name="fig9.svg" path="/" encoding="base64">[encoded data, 42876 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
