Advanced Optimization, Conjugrate, Bfgs.
J-val equals, you know, theta one minus five squared plus theta two minus five squared. So it’s just computing this cost function over here. And the second argument that this function returns is gradient. So gradient is going to be a two by one vector, and the two elements of the gradient vector