When you are composing your post, look below the posting area to the $\LaTeX$ Live Preview element. on the bottom row, you will see a button labeled "Begin/End" which will allow you to easily compose things using the begin/end environment, among these are piecewise functions.
So, click the "Begin/End" button, and then from the drop-down menu, choose "Piecewise Function" and then in the first input element, give the function's name, such as $f(x)$, and then in the other input element, define each function piece, and its domain, separated by a comma.
Once you have this defined, then click "Submission Options" and choose the tags with which you wish for the code to be wrapped, and whether you want this to be inserted in the live preview, or for it to replace what is there, then if you are finished, click "Submit/Close" and the code will be generated in the live preview, and it you like what you see, you can copy this code to your post message, at the current cursor location there using the "Copy to Post" button.
If you are not certain what $\LaTeX$ codes to use for your definitions, use the Quick $\LaTeX$ element to the right, from which you can choose the symbols you will need.