With the integrate command, together with a 3*x^2 expression as well as two limits, in this case 0, 2, because it is a definite integral, the immediate integral of the entered expression is calculated, then the limits are replaced , obtaining the result 8