Integral of $$$e^{x^{2}} - \sin{\left(x \right)}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \left(e^{x^{2}} - \sin{\left(x \right)}\right)\, dx$$$.
Solution
Integrate term by term:
$${\color{red}{\int{\left(e^{x^{2}} - \sin{\left(x \right)}\right)d x}}} = {\color{red}{\left(\int{e^{x^{2}} d x} - \int{\sin{\left(x \right)} d x}\right)}}$$
The integral of the sine is $$$\int{\sin{\left(x \right)} d x} = - \cos{\left(x \right)}$$$:
$$\int{e^{x^{2}} d x} - {\color{red}{\int{\sin{\left(x \right)} d x}}} = \int{e^{x^{2}} d x} - {\color{red}{\left(- \cos{\left(x \right)}\right)}}$$
This integral (Imaginary Error Function) does not have a closed form:
$$\cos{\left(x \right)} + {\color{red}{\int{e^{x^{2}} d x}}} = \cos{\left(x \right)} + {\color{red}{\left(\frac{\sqrt{\pi} \operatorname{erfi}{\left(x \right)}}{2}\right)}}$$
Therefore,
$$\int{\left(e^{x^{2}} - \sin{\left(x \right)}\right)d x} = \cos{\left(x \right)} + \frac{\sqrt{\pi} \operatorname{erfi}{\left(x \right)}}{2}$$
Add the constant of integration:
$$\int{\left(e^{x^{2}} - \sin{\left(x \right)}\right)d x} = \cos{\left(x \right)} + \frac{\sqrt{\pi} \operatorname{erfi}{\left(x \right)}}{2}+C$$
Answer
$$$\int \left(e^{x^{2}} - \sin{\left(x \right)}\right)\, dx = \left(\cos{\left(x \right)} + \frac{\sqrt{\pi} \operatorname{erfi}{\left(x \right)}}{2}\right) + C$$$A