2

I have two functions, $f:\mathbb{Q}\to\mathbb R_+$ given by $f(x) = \frac{1}{5} \sin{\left (\pi x \right )} + 4 $, and $g:\mathbb{Z_+}\to\mathbb{Q}$ given by $g(x) = - \frac{7 x}{2}$. I needed to find the composite function $h(x)=f(g(x))$

and I got the following result: $\frac{1}{5}\sin \left(-\frac{7\pi x}{2}\right)+4$

I know that the function above is not injective since h[1] = h[5] but why isn't this function surjective?

psmears
  • 767
Simon
  • 85

8 Answers8

8

It's not surjective because there are real numbers that you can't get as a result of this function. $\sin(y)$ is between $-1$ and $1$, so you can't get any result outside the range $[4-\frac15,4+\frac 15]$. In fact you can't get most results inside that range either, since $h(n+4)=h(n)$ means that it actually only takes four different values.

  • 1
    There are positive real numbers that you can't get as result. $f$ is defined as having range $\mathbb R_+$, so technically, that's considered the range of the composite function as well. (I wouldn't normally care but the whole point of this exercise seems to be to illustrate the formal definitions of functions, surjectivity, etc) – Jack M Mar 31 '17 at 15:15
  • Yes, good point. – Especially Lime Mar 31 '17 at 16:24
  • nitpick: $h(n+4)=h(n)$ implies it takes at most $4$ different values. In this case it is only $3$. – Jonas Meyer Mar 31 '17 at 20:10
  • @JonasMeyer Absolutely. Its values would be $\frac15 (\pm 1) + 4$ and $\frac15 \cdot 0 + 4$ (attained twice in one period), so the explicit range of $h$ is ${ 4 - \frac15, 4, 4 + \frac15 }$. – Jeppe Stig Nielsen Mar 31 '17 at 20:53
4

It's not surjective because it's a function between $\mathbb Z_+$ and $\mathbb R_+$. We know that $|\mathbb Z_+| < |\mathbb R_+|$, so there can't be any surjection from the smaller set to the larger.


Another way to actually show that your function is not surjective is to show that $f(g(x))\leq \frac92$, therefore there is no element $x\in\mathbb Z_+$ such that $f(g(x))=10$.

5xum
  • 123,496
  • 6
  • 128
  • 204
3

Hint. For all $x\in V\subset\mathbb{R}$ it holds that $$-1 \leq \sin(x)\leq 1$$ Hence we have that $$-\frac15+4\leq \frac15\sin(\pi g(x)) + 4\leq \frac15+4$$ and therefore $$\frac{19}{5}\leq f(g(x))\leq \frac{21}{5}$$

Now consider any value outside that range.

Eff
  • 12,989
3

We have $h : \mathbb{Z}_+ \to \mathbb{R}_+$, a surjective function $h$ would for every $y \in \mathbb{R}_+$ have a $x \in \mathbb{Z}_+$ with $y = h(x)$.

This would mean that one could find an enumeration for $\mathbb{R}_+$, a surjective function $\varphi : \mathbb{N} \to \mathbb{R}_+$, which is not possible.

mvw
  • 34,562
2

HINT: $$-1 \leq \sin(x) \leq 1.$$

2

When you noticed $h(1)=h(5)$ (don't use square brackets for this), you may have noticed that actually $h(x+4) = h(x)$ for all $x$. Therefore the image of $h$ consists of $h(1)$, $h(2)$, $h(3)$, and $h(4)$ only. Since these are only finitely many values, they are not all of $\mathbb R_+$.

Indeed, you also have $h(2)=4=h(4)$, the image consists of three numbers.

Carsten S
  • 8,726
1

It's because $\mathbb Q$ is countable while $\mathbb R$ isn't. Apart from the fact that the function is bounded you have that you misses values within it's bounds too, consider the equation:

$${1\over 5}\sin{-7\pi x\over 2} + 4 = {1\over 5}\sin C +4$$

has the solutions $-7\pi x/2 = \pi/2 \pm (\pi/2 - C)$ that is:

$$x = -{2\over 7 \pi} (\pi/2 \pm (\pi/2 - C) = -{1 \pm ( - 2C/\pi)\over 7 }$$

Now if $2C/\pi$ is irrational (for example $1/\sqrt{2}$) the solutions would be all irrational. This means the function don't take those values either.

skyking
  • 16,654
1

Whether it is surjective or not depends on the codomain. You can define a codomain as a set of all possible real outputs and thus make the function surjective.

However, assuming most naturally the codomain is $\mathbb R$ (because we talk about real-valued functions) or $\mathbb R_+$ (because that's a codomain of $f$, which is external in the requested function composition), the function $h$ obtained is not surjective, because the sine function is bounded by $+1$, so the maximum value of $\frac 15\,\sin(anything)+4$ will not exceed $\frac{21}5$, hence $h$ values will not cover the range $(\frac{21}5,\infty)$, which is a subset of the codomain (either $\mathbb R$ or $\mathbb R_+$).

CiaPan
  • 13,049