In mathematica, I have a piecewise function similar to:
Piecewise[{ {x^2 + 2*x - 4, 0 <= x <= 1/4},
{0, true} }]
I don't know how many pieces there will be, or what the internal ordering will look like, but I know that exactly one of the pieces will have x=0
as its left endpoint. How do I extract that piece in its general form (x^2 + 2*x - 4
) without knowing the upper end of its domain (1/4
)?