Gradient descent for multiple variables