Enter model inputs
Minimize a convex quadratic objective in two variables with box bounds and up to three extra linear inequality constraints.
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
- Enter the quadratic coefficients for x², y², and xy.
- Provide the linear coefficients and constant term.
- Define lower and upper bounds for both variables.
- Enable any extra inequality constraints you need.
- Set precision and tolerance values for reporting.
- Click Solve optimization model to calculate the optimum.
- Review the solution, gradient, active constraints, and slack values.
- Use the CSV or PDF buttons to save the report.
Example data table
| Item | Example value |
|---|---|
| a | 4 |
| b | 6 |
| c | 1 |
| d | -8 |
| e | -10 |
| Constant term | 0 |
| x range | 0 to 5 |
| y range | 0 to 4 |
| Constraint 1 | x + y ≤ 5 |
| Constraint 2 | 2x + y ≤ 7 |
| Constraint 3 | -x + y ≤ 2 |
| Expected optimum | x ≈ 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.