# Integral problem. Do I need a u sub?

$$\int_0^1 e^x - xe^{x^{2}}dx$$

I think I can do this:

$$\int_0^1 e^x dx- \int_0^1xe^{x^{2}}dx$$

$$(e - 1) - \int_0^1xe^{x^{2}}dx$$

I'm not sure how to handle the right side?

If I set $u = x^2$, then $\frac{du}{dx} = 2x$ and then $du = 2x\cdot dx$

Where do I go from here?

EDIT

Is this right?

$\frac{du}{2} = x \cdot dx$

so $$\frac{1}{2} \int_0^1 e^u \cdot du$$

$$\frac{1}{2} e^{x^{2}} ] _0^1$$ $$= \frac{e}{2} - \frac{1}{2}$$

so...

$$\int_0^1 e^x - x \cdot e^{x^2} = (e - 1 ) - \frac{e}{2} + \frac{1}{2}$$

• All you did so far is correct. Just perform the substitution (let $x$ disappear)... – Yves Daoust May 12 '18 at 14:03

One of the most frequently applied trick(especially in evaluating electromagnetism integrals) is: $$xdx=\frac12d(x^2)$$