Python, Cvxpy, Optimization.
subject to the constraint # Import the library import cvxpy as cp # Define the variable x = cp.Variable() # Define the objective function objective = cp.Minimize(x**2 + 1) # Define the constraint constraints = [x >= 2] # Form and solve the problem problem = cp.Problem(objective, constraints)