Disciplined convex programming error: Cannot perform the operation: {real affine} .* {log-affine}

First of all, you must follow CVX’s rules.

Second of all, the objective is convex for x > 3.