I was trying to reference a piecewise function inside another function in desmos. For example, suppose I had the following:
$$ f(x) = \left\{ \begin{array}{ll} |x+1| & \quad x\lt-1 \\ 0 & \quad x\geq-1 \end{array} \right. $$
and I wanted to create a new function in terms of $f$, like so:
$$ h(x) = \frac{1}{1+f(x)} $$
Ordinarily, desmos can handle this. But when $f$ is a piecewise function, it seems to break down. Is this a problem with how I'm defining my piecewise function (see image below)? Or is this just a limitation of desmos?
Piece wise functions in Desmos are defined by typing in $f(x)=\{C_1:D_1,C_2:D_2,\dots\}$ where $C_i$ is a condition like $x<\frac12$ and $D_i$ is a definition for the range of values described by $C_i$, like $|x-\frac12|.$
Referencing your image, $f(x)$ should be defined as $$f(x)=\left\{x<\frac12:\left|x-\frac12\right|,\frac12 \le x\le 1:0,1<x:|1-x|\right\}$$