solve for z: y = (1-z)*exp((1-z)^2*x)+1