Is it possible to create a simple equation for a line that has abrupt slope changes??

59 Views Asked by At

For example, a line that :

  1. from -infinity to 0: y = 50
  2. from 200 to +infinity: y = 100
  3. and between 0 and 200, the linear connecting line (y=1/4x+50)

Thanks!

1

There are 1 best solutions below

4
On BEST ANSWER

Yes. You almost literally just did exactly that. This is typically denoted using a big curly brace containing the different cases like this (or similarly):

$$f(x) = \begin{cases} 50,& x < 50\\ 100,& x>100 \\ \frac{1}{4}x+50,& \text{else}\end{cases}$$

Though you may think this does not classify as "simple". In that case you can get the same by using indicator functions. It just looks different notation-wise:

$$f(x) = 50\cdot 1_{(-\infty, 50)}(x) + 100\cdot 1_{(200,\infty)}(x) +\left(\frac{1}{4}x+50\right)\cdot 1_{[50,200]}(x)$$

or perhaps:

$$f(x) = 50 + \frac{1}{4}x\cdot 1_{[50,200]}(x) + 50\cdot 1_{(200,\infty)}(x) $$