Linearize objective function with non-linear terms

I have a problem with linear constraints but in the objective function I want to have some linear terms along with a $$x^2$$ term. So it is like the following:

$$\min \sum \limits _i \sum \limits _j (a[i,j] + b[i,j]^2)$$

$$a[i,j]$$ and $$b[i,j]$$ are integer decision variables.

All my constraints are linear. So my question is, how I can linearize the quadratic objective function and convert the problem to a linear one.

I had an idea to convert it to piecewise linear function, with derivatives at specific points, but I am looking for another solution, as my problem includes many binary and integer variables, and adding more it will make it more complex and slow to solve.

• I would try first with an MIQP solver. These are readily available, e.g. through neos-server.org/neos. Dec 1, 2022 at 13:32
• Thanks for the recommendation, but I have a working model in python and Xpress, and I am working on the redefinition of the objective function. Dec 1, 2022 at 15:57
• Xpress can solve problems with a convex quadratic objective (which yours is).
– prubin
Dec 1, 2022 at 16:52
• Ah ok, thanks for that. So you recommend to use the quadratic term in the objective function instead of linearizing it? Which one would be faster? I would prefer speed over accuracy, so I would go also with a good approximation. Dec 1, 2022 at 17:21
• @christouandr7, just try that. :) Dec 3, 2022 at 11:16