Function to return nothing for a defined range of input values

127 Views Asked by At

If I have the function f(x) = 2x + 1, is there something I can do to the function that will make it undefined for certain input values, for example input values where x ≥ 1. This would give the graph an endpoint. It is easy enough to just write {2x + 1 | x ≥ 2} but I am looking for a one line equation. The type of answer I am looking for, if you were to graph it, would look like a line that goes from the point (1,3) to infinity to the right and nothing but an endpoint on the left. First, is this even possible and second, how would we achieve this?
Thanks in advance.

Edit: I am looking for an approach that would work in a graphing calculator or a program like Wolfram|Alpha or Symbolab; something generalized.

3

There are 3 best solutions below

5
On BEST ANSWER

For the example you've described:

$\frac{(2x+1)\sqrt{x-1}}{\sqrt{x-1}}$ is probably the simplest solution.

You can generalize it to limit the domains of other functions.

0
On

Something like:

$g(x) = \frac{f(x)(x-a)(x-b)(x-c)}{(x-a)(x-b)(x-c)} = \begin {cases} f(x)&x\notin\{a,b,c\}\\\text{undef.}&x \in\{a,b,c\}\end{cases} $

0
On

This should work on many systems: $$ (2x+1) \cdot \frac{1-x}{\max(1-x,0)} $$ Whenever $x \ge 1$, there is division by zero.

Unfortunately Wolfram Alpha does not give a plot when entering this formula.