def apply_nonlinear(self, params, unknowns, resids):

        x = params['x']
        z = unknowns['z']
        resids['z'] = x*z + z - 4.0

        # Output equations need to evaluate a residual just like an explicit comp.
        resids['y'] = x + 2.0*z - unknowns['y']
Don't solve; just calculate the residual.
dataset/ETHPy150Open OpenMDAO/OpenMDAO/examples/implicit_ext_solve.py/SimpleImplicitComp.apply_nonlinear