from gekko import GEKKO m = GEKKO() x = m.Param(0.5) y = m.Var() m.Equation(y==m.if3(x-3,6*m.exp(-x)+1,x)) m.solve() print(x.value[0],y.value[0])