Use linearity and the power rule.
Antiderivative. ∫(x2+2x)dx=3x3+2⋅2x2=3x3+x2.
Evaluate at the limits.
[3x3+x2]12=(38+4)−(31+1)=38+312−31−33=38+12−1−3=316.
Check (dual-solve): integrate the two terms separately. ∫12x2dx=[3x3]12=38−1=37; ∫122xdx=[x2]12=4−1=3=39. Adding: 37+39=316, matching.
✓Final answer
∫12(x2+2x)dx=316.