Help with DCP rules <This post pertains to CVXR, not to CVX>

When we run the next code:

Variables minimized over

x1 <- Variable(1)
x2 <- Variable(1)

Problem definition

objective <- Minimize(5x1^2 + x2^2 + 2x1x2)
constraints <- list(0.25
x1^2+ x2 - 1 <= 0)
prob2.1 <- Problem(objective, constraints)

prob2.1 <- Problem(objective)

Problem solution

solution2.1 <- solve(prob2.1)

We get the next message:

Error in construct_intermediate_chain(object, candidate_solvers, gp = gp) :
Problem does not follow DCP rules.

What is the problem in CVXR although this objective function is convex?

When we drop the term 2x1x2 into the objetctive function, the algorithm works well.

Despite the similar names, and CVX using the cvxr.com domain, CVXR is a different package than CVX.

Per Frequently Asked Questions — CVXR , for CVXR questions,

Please post questions to the cvx tag on StackOverflow.