input: Write a python function to optimize a given quadratic cost function using gradient descent.
  assert optimization_algorithm(10) < 0
  assert optimization_algorithm(-10) > -3
  assert optimization_algorithm(0) < 0
output: def optimization_algorithm(x):
      learning_rate = 0.1
      num_iterations = 1000
      for _ in range(num_iterations):
          gradient = 2 * x
          x -= learning_rate * gradient
      return x