1
$\begingroup$

I have two piecewise functions: $$ f(x) = \begin{cases} 2 \qquad x > 2 \\ 3 \qquad x <2 \end{cases} $$ $$ g(x) = \begin{cases} -2 \qquad x \ge 2 \\ 2 \qquad x <2 \end{cases} $$

I need to calculate $g(x) - f(x)$ but I don't understand what happens at $x = 2$ as only $g(x)$ is defined there.

  • 2
    The domain of the difference of two functions is the intersection of the domains. Thus, $x=2$ gets excluded.2017-02-28
  • 0
    @quasi so $g(x) - f(x)$ is undefined at $x = 2$?2017-02-28
  • 1
    Yes, that's right. After all, how would you do a subtraction of "undefined" minus a number?2017-02-28
  • 0
    @quasi will the same logic hold for other arithmetic operations on the functions?2017-02-28
  • 1
    Yes, definitely. So multiplication would have the same issue. For division of two functions, the new domain would be the subset of the intersection of the domains for which the denominator is nonzero.2017-02-28
  • 0
    @quasi what about the composition of $f(g(x))$?2017-02-28
  • 1
    $g(x)$ needs to be defined otherwise $f$ can't accept the input. But $g(x)$ would also need to be in the domain of $f$. Thus, the new domain is the set of $x$ values in the domain of $g$ such that $g(x)$ is an element of the domain of $f$.2017-02-28
  • 0
    so it's also impossible because the domain of $f(x)$ is only a subset of the domain of $g(x)$?2017-02-28
  • 0
    No, think that through. Better yet, experiment. What is $f(g(4))\,?$ What is $f(g(-13))\,?$2017-02-28
  • 0
    I think that for any $x \ge 2$, $f(g(x)) = 3$ but for any $x < 2$ the result is undefined.2017-02-28
  • 1
    Yes, very good. So $f(g(x)) = 3,\; x \ge 2$.2017-02-28

1 Answers 1

1

Split it into cases.

For $x<2,$ $f(x)=3$ and $g(x)=2$ so $g(x)-f(x)=-1$ for $x<2.$

At $x=2$ $f(x)$ doesn't exist so $g(x)-f(x)$ is undefined here.

For $x>2$ it's just $-2-2=-4.$

  • 0
    Needs a few edits. For $x < 2, g(x) - f(x) = ?$ Also, for the case $x=2$, you need some dollar signs.2017-02-28
  • 0
    dangit fixed lol2017-02-28