When we run the next code:

# Variables minimized over

x1 <- Variable(1)

x2 <- Variable(1)

# Problem definition

objective <- Minimize(5*x1^2 + x2^2 + 2*x1*x2)
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 2*x1*x2 into the objetctive function, the algorithm works well.