f(x)=\left\{\begin{matrix}
x^2, \: kun\: x\leqslant 1\  
-x+2, \: kun\: x > 1
\end{matrix}\right.

f = Function(x^(2), -1000, 1)
g = Function(-x + 2, 1, 1000)