Consider,
I=∫π20ex(sinx−cosx)dx=∫π20exsinxdx−∫π20excosxdx
=[sinx.ex]π20−∫π20cosx.exdx−∫π20excosxdx
=(sinπ2.eπ2)−2∫π20excosdx
=eπ2−2∫π20excosxdx--- (1)
Now we have to find out ∫π20excosxdx
∫π20excosxdx=[ex(sinx)]π20−∫π20exsinxdx
=eπ2−[[ex(−cosx)]π20]−∫π20ex(−cosx)dx
=eπ2−1−∫π20excosxdx
2∫π20excosxdx=eπ2−1⇒∫π20excosxdx=12(eπ2−1)
Putting the value of ∫π20excosxdx in (1), we get
I=eπ2−2{12(eπ2−1)}=eπ2−eπ2+1=1