What you have shown is simply . You can minimize that by taking, for example, any value for a and then taking b= -a.
Surely that's NOT what you intended to say.
Notice that in the example you link to, the sum is over the index i and there is a in the summand so you have different terms for different i in your sum. Your example does not have that. I don't think anyone can answer what you meant to ask until you clarify what you are asking.