# What is the domain and range of f(x) = (x+3)/(x^2+4)?

Jun 14, 2018

Domain: the whole real line
Range: $\left[- 0.0757 , 0.826\right]$

#### Explanation:

This question can be interpreted in one of two ways. Either we expect to only deal with the real line $\mathbb{R}$, or else also with the rest of the complex plane $\mathbb{C}$. The use of $x$ as a variable implies that we are dealing with the real line only, but there is an interesting difference between the two cases that I'll note.

The domain of $f$ is the whole of the numeric set considered minus any points that cause the function to blow up to infinity. This happens when the denominator ${x}^{2} + 4 = 0$, i.e. when ${x}^{2} = - 4$. This equation has no real solutions, so if we are working on the real line, the domain is the whole interval $\left(- \infty , + \infty\right)$. If we consider the infinite limits of the function by comparing leading terms in numerator and denominator, we see that at both infinities it tends to zero, and so we can if we wish add these to that interval to close it off: $\left[- \infty , + \infty\right]$.

The equation ${x}^{2} = - 4$ does however have two complex solutions, $x = \pm 2 i$. If we consider the whole complex plane, then the domain is the whole plane minus these two points: $\mathbb{C}$ \ $\left\{\pm 2 i\right\}$. As with the reals, we can add in infinity similarly if we wish.

To determine the range of $f$ we need to discover its maximum and minimum values over its domain. We will only talk in terms of the reals now, as determining an analogue to these over the complex plane is in general a different kind of problem requiring different mathematical tools.

Take the first derivative via the quotient rule:
$f ' \left(x\right) = \frac{\left({x}^{2} + 4\right) - 2 x \left(x + 3\right)}{{x}^{2} + 4} ^ 2 = \frac{- {x}^{2} - 6 x + 4}{{x}^{2} + 4} ^ 2$

The function $f$ reaches either an extremum or a point of inflection when $f ' \left(x\right) = 0$, i.e. when $- {x}^{2} - 6 x + 4 = 0$.
We solve this by the quadratic formula:
$x = - \frac{1}{2} \left(6 \pm \sqrt{52}\right) = - 3 \pm \sqrt{13}$. So the function has two such points.

We characterise these points by examining their values at the second derivative of $f$, which we take, again via the quotient rule:
$f ' ' \left(x\right) = \frac{\left(- 2 x - 6\right) {\left({x}^{2} + 4\right)}^{2} - \left(- {x}^{2} - 6 x + 4\right) \cdot 4 x \left({x}^{2} + 4\right)}{{x}^{2} + 4} ^ 4$
$= \frac{- 2 \left(x + 3\right) \left({x}^{2} + 4\right) + 4 x \left({x}^{2} + 6 x - 4\right)}{{x}^{2} + 4} ^ 3$

We know from our first derivative root calculation that the second term in the numerator is zero for these two points, as setting that to zero is the equation we just solved to find the input numbers.

So, noting that ${\left(- 3 \pm \sqrt{13}\right)}^{2} = 22 \overline{+} 6 \sqrt{13}$:
$f ' ' \left(- 3 \pm \sqrt{13}\right) = \frac{- 2 \left(- 3 \pm \sqrt{13} + 3\right) \left(22 \overline{+} 6 \sqrt{13} + 4\right)}{22 \overline{+} 6 \sqrt{13} + 4} ^ 3$
$= \frac{\overline{+} 2 \sqrt{13} \left(26 \overline{+} 6 \sqrt{13}\right)}{26 \overline{+} 6 \sqrt{13}} ^ 3$

In determining the sign of this expression, we ask whether $26 > 6 \sqrt{13}$. Square both sides to compare: ${26}^{2} = 676$, ${\left(6 \sqrt{13}\right)}^{2} = 36 \cdot 13 = 468$. So $26 - 6 \sqrt{13}$ is positive (and $26 + 6 \sqrt{13}$ even more so).

So the sign of the whole expression comes down to the $\overline{+}$ in front of it, which means that $x = - 3 - \sqrt{13}$ has $f ' ' \left(x\right) > 0$ (and is therefore a function minimum) and $x = - 3 + \sqrt{13}$ has $f ' ' \left(x\right) < 0$ (and is therefore a function maximum). Having noted that the function tends to zero at the infinities, we now understand the shape of the function fully.

So now to obtain the range, we must calculate the values of the function at the minimum and maximum points $x = - 3 \pm \sqrt{13}$

Recall that $f \left(x\right) = \frac{x + 3}{{x}^{2} + 4}$, and so
$f \left(- 3 \pm \sqrt{13}\right) = \frac{- 3 \pm \sqrt{13} + 3}{22 \overline{+} 6 \sqrt{13} + 4} = \frac{\pm \sqrt{13}}{26 \overline{+} 6 \sqrt{13}}$.

So, over the real line $\mathbb{R}$ the function $f \left(x\right)$ takes values in the range $\left[- \frac{\sqrt{13}}{26 + 6 \sqrt{13}} , \frac{\sqrt{13}}{26 - 6 \sqrt{13}}\right]$, which if we evaluate numerically, comes to $\left[- 0.0757 , 0.826\right]$, to three significant figures, obtained at $x$ values $- 6.61$ and $0.606$ (3 s.f.)

Plot the graph of the function as a sanity check:
graph{(x+3)/(x^2+4) [-15, 4.816, -0.2, 1]}

Jun 14, 2018

Domain: $x \in \mathbb{R}$
Range: $f \left(x\right) \in \left[- 0.075693909 , + 0.825693909\right] \textcolor{w h i t e}{\text{xxx}}$ (approximately)

#### Explanation:

Given
$\textcolor{w h i t e}{\text{XXX}} f \left(x\right) = \frac{x + 3}{{x}^{2} + 4}$

Domain
The domain are all values of $x$ for which $f \left(x\right)$ is defined.
For any function expressed as a polynomial divided by a polynomial, the function is defined for all values of $x$ where the divisor polynomial is not equal to zero. Since ${x}^{2} \ge 0$ for all values of $x$, ${x}^{2} + 4 > 0$ for all values of $x$; that is $x \ne 0$ for all values of $x$; the function is defined for all Real ($\mathbb{R}$) values of $x$.

Range
The range is a little more interesting to develop.
We note that if a continuous function has limits, the derivative of the function at the points resulting in those limits is equal to zero.

Although some of these steps may be trivial, we will work through this process from fairly basic principles for derivatives.

[1] Exponent Rule for Derivatives
If $f \left(x\right) = {x}^{n}$ then $\frac{d f \left(x\right)}{\mathrm{dx}} = n {x}^{n - 1}$

[2] Sum Rule for Derivatives
If $f \left(x\right) = r \left(x\right) + s \left(x\right)$ then $\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{d r \left(x\right)}{\mathrm{dx}} + \frac{d s \left(x\right)}{\mathrm{dx}}$

[3] Product Rule for Derivatives
If $f \left(x\right) = g \left(x\right) \cdot h \left(x\right)$ then $\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{d g \left(x\right)}{\mathrm{dx}} \cdot h \left(x\right) + g \left(x\right) \cdot \frac{d h \left(x\right)}{\mathrm{dx}}$

[4] Chain Rule for Derivatives
If $f \left(x\right) = p \left(q \left(x\right)\right)$ then $\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{d p \left(q \left(x\right)\right)}{d q \left(x\right)} \cdot \frac{d q \left(x\right)}{\mathrm{dx}}$

~~~~~~~~~~~~~~~~~~~~

For the given function $f \left(x\right) = \frac{x + 3}{{x}^{2} + 4}$

we note that this can be written as $f \left(x\right) = \left(x + 3\right) \cdot {\left({x}^{2} + 4\right)}^{- 1}$

By [3] we know
$\textcolor{w h i t e}{\text{XXX}} \textcolor{red}{\frac{d f \left(x\right)}{\mathrm{dx}}} = \textcolor{\lim e}{\frac{d \left(x + 3\right)}{\mathrm{dx}}} \cdot \textcolor{b l u e}{\left[{\left({x}^{2} + 4\right)}^{- 1}\right]} + \textcolor{b l u e}{\left(x + 3\right)} \cdot \textcolor{m a \ge n t a}{\frac{d \left({\left({x}^{2} + 4\right)}^{- 1}\right)}{\mathrm{dx}}}$

By [1] we have
$\textcolor{w h i t e}{\text{XXX}} \frac{d \left(x + 3\right)}{\mathrm{dx}} = \frac{\mathrm{dx}}{\mathrm{dx}} + \frac{d \left(3 \cdot {x}^{0}\right)}{\mathrm{dx}}$
and by [2]
$\textcolor{w h i t e}{\text{XXX}} \textcolor{\lim e}{\frac{d \left(x + 3\right)}{\mathrm{dx}}} = 1 + 0 = \textcolor{\lim e}{1}$

By [4] we have
$\textcolor{w h i t e}{\text{XXX}} \textcolor{m a \ge n t a}{\frac{d {\left(x + 4\right)}^{- 1}}{\mathrm{dx}}} = \frac{d {\left(x + 4\right)}^{- 1}}{d \left(x + 4\right)} \cdot \frac{d \left(x + 4\right)}{\mathrm{dx}}$
and by [1] and [2]
$\textcolor{w h i t e}{\text{XXXXXXXX}} = - 1 {\left({x}^{2} + 4\right)}^{- 2} \cdot 2 x$
or, simplified:
$\textcolor{w h i t e}{\text{XXXXXXXX}} = \textcolor{m a \ge n t a}{- \frac{2 x}{{\left({x}^{2} + 4\right)}^{2}}}$

giving us
color(white)("XXX")color(red)((d f(x))/(dx))=color(green)1 * color(blue)([(x+4)^(-1)]) +color(blue)((x+3)) * color(magenta)((-2x)/((x^2+4)^2)

which can be simplified as
$\textcolor{w h i t e}{\text{XXX}} \textcolor{red}{\frac{d f \left(x\right)}{\mathrm{dx}} = \frac{- {x}^{2} - 6 x + 4}{{\left({x}^{2} + 4\right)}^{2}}}$

As noted (way back) this means that the limit values will occur when
$\textcolor{w h i t e}{\text{XXX}} \frac{- {x}^{2} - 6 x + 4}{{\left({x}^{2} + 4\right)}^{2}} = 0$

$\textcolor{w h i t e}{\text{XXX}} \Rightarrow - {x}^{2} - 6 x + 4 = 0$

when
$\textcolor{w h i t e}{\text{XXX}} x = - 3 \pm \sqrt{13}$

Rather than prolong the agony, we will simply plug these values into our calculator (or spreadsheet, which is how I do it) to get the limits:
$\textcolor{w h i t e}{\text{XXX}} f \left(- 3 - \sqrt{13}\right) \approx - 0.075693909$
and
$\textcolor{w h i t e}{\text{XXX}} f \left(- 3 + \sqrt{13}\right) \approx 0.825693909$

Jun 14, 2018

A simpler way of finding the range. The domain is $x \in \mathbb{R}$. The range is $y \in \left[- 0.076 , 0.826\right]$

#### Explanation:

The domain is $x \in \mathbb{R}$ as

$\forall x \in \mathbb{R}$, the denominator ${x}^{2} + 4 > 0$

Let $y = \frac{x + 3}{{x}^{2} + 4}$

Cross multiply

$\implies$, $y \left({x}^{2} + 4\right) = x + 3$

$y {x}^{2} - x + 4 y - 3 = 0$

This is a quadratic equation in $x$

There are solutions if the discriminant $\Delta \ge 0$

$\Delta = {\left(- 1\right)}^{2} - 4 \cdot \left(y\right) \left(4 y - 3\right) = 1 - 16 {y}^{2} + 12 y$

Therefore,

$1 - 16 {y}^{2} + 12 y \ge 0$

$\implies$, $16 {y}^{2} - 12 y - 1 \le 0$

The solutions of this inequality are

$y \in \left[\frac{12 - \sqrt{{\left(- 12\right)}^{2} - 4 \cdot \left(- 1\right) \cdot 16}}{32} , \frac{\left(- 12\right) + \sqrt{{\left(- 12\right)}^{2} - 4 \cdot \left(- 1\right) \cdot 16}}{32}\right]$

$y \in \left[\frac{12 - \sqrt{208}}{32} , \frac{12 + \sqrt{208}}{32}\right]$

$y \in \left[- 0.076 , 0.826\right]$

graph{(x+3)/(x^2+4) [-6.774, 3.09, -1.912, 3.016]}