Hi, I am solving a system of two equations, but the equations themselves change depending on whether one parameter is positive or negative : for x0<0
sol[i1_?NumberQ, i2_?NumberQ, z0_?NumberQ, x0_?NumberQ] :=FindRoot[{i1 == f1[z, x], i2 == -f2[z, x]}, {{z, z0}, {x, x0}}]
and for x0>0
sol[i1_?NumberQ, i2_?NumberQ, z0_?NumberQ, x0_?NumberQ] :=FindRoot[{i1 == f1[z, x], i2 == f2[z, x]}, {{z, z0}, {x, x0}}]
(for x0<0 there is '-' sign before f2). i1, i2, x0, z0 are constants. (Function sol[] is needed because I have a cycle where the solution is found many times for different values of the numerical parameters). Can I combine these two situation into one, so that I could use a single function sol[] for both x<0 and x>0?