Cut'n'Paste
Piecewise defined functions

f(x) = {exp1 cond1 exp2 cond2 exp3cond3     or     f(x)={exp1cond1exp2cond2

 

Piecewise function definitions. Replace expn with your expressions, condn with conditions. Once inserted you can edit these with the MathML editor. If you wish to change the style of brace you can do it here, just change the { in the code below to [ or (, etc.

Similarly the space between the expressions and the definitions can be changed by changing the expressions mspace width='10pt'

 

To use this code: Copy the appropriate code piece below and paste it into the MathML tab of the Equation Editor. Note that you must delete the line of code that is already in that Tab before pasting the following in!

Three-part function:

<math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mi mathvariant='italic'>f</mi><mi mathvariant='normal'>(</mi><mi mathvariant='italic'>x</mi><mi mathvariant='normal'>)=</mi></mrow><mrow><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>{</mo><mfenced open='' close='' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>exp1</mi><mspace width='10pt' /></mrow> </mtd> <mtd><mrow><mi>cond1</mi></mrow></mtd></mtr><mtr><mtd> <mrow><mi>exp2</mi><mspace width='10pt' /></mrow> </mtd><mtd><mrow><mi>cond2</mi></mrow></mtd></mtr> <mtr><mtd><mrow><mi>exp3</mi><mspace width='10pt' /></mrow></mtd><mtd><mrow><mi>cond3</mi> </mrow></mtd></mtr></mtable></mfenced> </mrow></math>

 

Two-part function:

<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi mathvariant="italic">f</mi><mi mathvariant="normal">(</mi><mi mathvariant="italic">x</mi><mi mathvariant="normal">)=</mi></mrow><mrow><mo fence="true" lspace="0.1666667em" rspace="0.1666667em" stretchy="true">{</mo><mfenced open="" close="" separators=","><mtable rowalign="baseline" columnalign="center" groupalign="{left}" rowspacing="1.0ex"><mtr><mtd><mrow><mi>exp1</mi><mspace width='10pt' /></mrow></mtd><mtd><mrow><mi>cond1</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>exp2</mi><mspace width='10pt' /></mrow></mtd><mtd><mrow><mi>cond2</mi></mrow></mtd></mtr></mtable></mfenced></mrow></math>

Cut'N'Paste Index

Main Index

Updated: 7/23/2019 SMS/MUO