Last line `>>> result` is not very useful since you don't include the displayed result. Perhaps just put `>>> result.x, result.fun` and actually include the result as displayed by the interpreter.