A piecewise defined function

A piecewise defined function can be drawn in the following way.

<param name=function1 value="2*x^2*(x<0)+4*x*(x>0)">