Solution:
Let
I=∫01(xex+sin4πx)dx
Integrating xex by parts, taking x as the first function,
∫xexdx=xex−∫1⋅exdx=xex−ex
Also,
∫sin4πxdx=−π4cos4πx
So,
F(x)=xex−ex−π4cos4πx
By the second fundamental theorem of integral calculus,
I=F(1)−F(0)=[e−e−π4cos4π]−[0−1−π4cos0]
Since cos4π=21 and cos0=1,
I=−2π4+1+π4=−π22+1+π4
Therefore,
∫01(xex+sin4πx)dx=1+π4−π22