Hi everyone, I’m currently trying to graph a piecewise function in Desmos, but I’m not quite sure how to do it. The function I’m working with is f(x) = { 2x + 1 if x ≤ 0, 4x - 3 if x > 0 }. I’ve tried entering it as two separate functions, but that doesn’t seem to work. I also tried using the “piecewise” function in Desmos, but I’m not sure how to properly format it. Can anyone help me with this? Thanks in advance!

easeus data recovery crack download

1 Like

```
f(x)={x<=0:2x+1, 4x-3}
```

This can be extended to additional pieces, where you have {condition 1:expression 1, condition 2:expression 2, … , “otherwise” expression}

2 Likes

Also if your function gets complicated, use this notation:

f(x) = x + 1 { x < 0 }

and simply add more lines. This makes it easier to read imo

You can also use a combination of min max and ceil functions. I was running into limitations where you couldn’t define a default outer function such as -1 > x > 1. Also trying to add the pieces together resulted in nothing being returned.

The solution I came up with

```
f(x) = |x| max(min(ceil(|a-x|-b),1),0)
g(x) = x^2 max(min(ceil(b-|a-x|),1,0)
f(x) + g(x)
```

where a defines the function center and b defines the width.

when a = 0 and b = 1:

f(x) would be -1 > x > 1 and

g(x) would be -1 < x < 1.

You can also remove the absolute value to get ie x>1 or x<1 etc.