Convex Optimization Solver Calculator

Build convex models with bounds and inequalities. Review optimal points, values, diagnostics, and solver notes. Export polished summaries for teams, records, verification, and presentations.

Enter model inputs

Minimize a convex quadratic objective in two variables with box bounds and up to three extra linear inequality constraints.


Choose how many decimals appear in the report.
Used for feasibility and binding checks.
Reset

Formula used

The calculator minimizes the convex quadratic objective

f(x, y) = 0.5(ax² + by² + 2cxy) + dx + ey + constant

Subject to box bounds and optional linear inequalities:

xmin ≤ x ≤ xmax, ymin ≤ y ≤ ymax, and gx + hy ≤ k

Convexity is checked through the Hessian matrix:

H = [[a, c], [c, b]]

The model is convex when a ≥ 0, b ≥ 0, and ab − c² ≥ 0.

The solver first tests the stationary point from ∇f(x, y) = 0. If that point is not feasible, it minimizes the same objective along each feasible boundary line and compares all boundary candidates.

How to use this calculator

  1. Enter the quadratic coefficients for x², y², and xy.
  2. Provide the linear coefficients and constant term.
  3. Define lower and upper bounds for both variables.
  4. Enable any extra inequality constraints you need.
  5. Set precision and tolerance values for reporting.
  6. Click Solve optimization model to calculate the optimum.
  7. Review the solution, gradient, active constraints, and slack values.
  8. Use the CSV or PDF buttons to save the report.

Example data table

Item Example value
a4
b6
c1
d-8
e-10
Constant term0
x range0 to 5
y range0 to 4
Constraint 1x + y ≤ 5
Constraint 22x + y ≤ 7
Constraint 3-x + y ≤ 2
Expected optimumx ≈ 1.652174, y ≈ 1.391304

FAQs

1. What kind of problem does this solver handle?

It solves two-variable convex quadratic minimization problems with box limits and up to three extra linear inequality constraints. The objective can include squared, cross, linear, and constant terms.

2. Why does the calculator check the Hessian?

The Hessian confirms whether the quadratic surface is convex. Convexity matters because a feasible local minimum is also the global minimum, which makes the reported solution dependable.

3. What happens if my unconstrained optimum is feasible?

If the stationary point already satisfies every bound and inequality, that point becomes the solution. No boundary will bind, and the diagnostics will show an interior optimum.

4. What does a binding constraint mean?

A binding constraint is tight at the optimum. Its slack is nearly zero, so that limit directly shapes the solution and prevents movement toward a lower objective value.

5. Can the calculator solve nonconvex models?

No. It is designed for convex quadratic programs only. If the Hessian fails the convexity test, the tool stops and asks for coefficients that define a convex surface.

6. Why are precision and tolerance included?

Precision controls displayed decimals. Tolerance controls how strictly feasibility and binding checks are judged. Those settings help when coefficients are small, scaled, or very close to active limits.

7. Does the solver use all boundaries?

Yes. It checks the stationary point, then optimizes the same objective along every feasible boundary line. That comparison helps it locate the best admissible point in the region.

8. What do the CSV and PDF exports contain?

The exports capture the main result summary, including the optimal variables, objective value, gradients, convexity status, method, and binding constraints for reporting or documentation.

Related Calculators

utility maximization calculatorgradient descent calculatorfeasible region finderlearning rate optimizer

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.