Integral of $$$2 - e^{\frac{x}{2}}$$$

The calculator will find the integral/antiderivative of $$$2 - e^{\frac{x}{2}}$$$, with steps shown.

Related calculator: Definite and Improper Integral Calculator

Please write without any differentials such as $$$dx$$$, $$$dy$$$ etc.
Leave empty for autodetection.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Find $$$\int \left(2 - e^{\frac{x}{2}}\right)\, dx$$$.

Solution

Integrate term by term:

$${\color{red}{\int{\left(2 - e^{\frac{x}{2}}\right)d x}}} = {\color{red}{\left(\int{2 d x} - \int{e^{\frac{x}{2}} d x}\right)}}$$

Apply the constant rule $$$\int c\, dx = c x$$$ with $$$c=2$$$:

$$- \int{e^{\frac{x}{2}} d x} + {\color{red}{\int{2 d x}}} = - \int{e^{\frac{x}{2}} d x} + {\color{red}{\left(2 x\right)}}$$

Let $$$u=\frac{x}{2}$$$.

Then $$$du=\left(\frac{x}{2}\right)^{\prime }dx = \frac{dx}{2}$$$ (steps can be seen »), and we have that $$$dx = 2 du$$$.

The integral becomes

$$2 x - {\color{red}{\int{e^{\frac{x}{2}} d x}}} = 2 x - {\color{red}{\int{2 e^{u} d u}}}$$

Apply the constant multiple rule $$$\int c f{\left(u \right)}\, du = c \int f{\left(u \right)}\, du$$$ with $$$c=2$$$ and $$$f{\left(u \right)} = e^{u}$$$:

$$2 x - {\color{red}{\int{2 e^{u} d u}}} = 2 x - {\color{red}{\left(2 \int{e^{u} d u}\right)}}$$

The integral of the exponential function is $$$\int{e^{u} d u} = e^{u}$$$:

$$2 x - 2 {\color{red}{\int{e^{u} d u}}} = 2 x - 2 {\color{red}{e^{u}}}$$

Recall that $$$u=\frac{x}{2}$$$:

$$2 x - 2 e^{{\color{red}{u}}} = 2 x - 2 e^{{\color{red}{\left(\frac{x}{2}\right)}}}$$

Therefore,

$$\int{\left(2 - e^{\frac{x}{2}}\right)d x} = 2 x - 2 e^{\frac{x}{2}}$$

Simplify:

$$\int{\left(2 - e^{\frac{x}{2}}\right)d x} = 2 \left(x - e^{\frac{x}{2}}\right)$$

Add the constant of integration:

$$\int{\left(2 - e^{\frac{x}{2}}\right)d x} = 2 \left(x - e^{\frac{x}{2}}\right)+C$$

Answer

$$$\int \left(2 - e^{\frac{x}{2}}\right)\, dx = 2 \left(x - e^{\frac{x}{2}}\right) + C$$$A


Please try a new game Rotatly