1036. Find the following integrals and verify the results by differentiation:
1) $\left.\int\left(x^{2}-2 \sin x+3 e^{x}\right) d x ; 2\right) \int\left(\sec ^{2} x-3 \cos x+1\right) d x$;
2) $\int\left(\csc ^{2} x+7 \sin x-2\right) d x$.[^8]
Solution. 1) $\int\left(x^{2}-2 \sin x+3 e^{x}\right) d x=\frac{x^{3}}{3}+2 \cos x+$ $+3 e^{x}+C$ [I, II; (3), (7), (6)].

Verification. We will find the derivative of the obtained function $F(x)+C$ and ensure that it equals the integrand $f(x):$

$\left(\frac{x^{3}}{3}+2 \cos x+3 e^{x}+C\right)^{\prime}=\left(\frac{x^{3}}{3}\right)^{\prime}+(2 \cos x)^{\prime}+\left(3 e^{x}\right)^{\prime}+(C)^{\prime}=$ $=x^{2}-2 \sin x+3 e^{x}$.
2) $\int\left(\sec ^{2} x-3 \cos x+1\right) d x=\int \frac{d x}{\cos ^{2} x}-3 \int \cos x d x+\int d x=$ $=\operatorname{tg} x-3 \sin x+x+C \quad$ [II, I; (10), (8), (2)].

Verification. We will find the differential of the obtained function $F(x)+C$ and ensure that it equals the integrand $f(x) d x$:

$d(\operatorname{tg} x-3 \sin x+x+C)=(\operatorname{tg} x-3 \sin x+x+C)^{\prime} d x=$ $=\left(\sec ^{2} x-3 \cos x+1\right) d x$.
3) $\int\left(\csc ^{2} x+7 \sin x-2\right) d x=\int \frac{d x}{\sin ^{2} x}+7 \int \sin x d x-2 \int d x=$ $=-\operatorname{ctg} x-7 \cos x-2 x+C \quad$ [II, I; (9), (7), (2)].

Verification. $d(C-\operatorname{ctg} x-7 \cos x-2 x)=(C-\operatorname{ctg} x-$ $-7 \cos x-2 x)^{\prime} d x=\left(\frac{1}{\sin ^{2} x}+7 \sin x-2\right) d x$.