Successful application of gradient to simple example