Gradient method optimization example. Examples of gradient descent algorithms.