The Principle

The method step by step

Let's apply the complete method to the example ∫2x ex2 dx\displaystyle\int 2x\,e^{x^2}\,\mathrm{d}x. Four steps, always the same.

Step On this example
1. Set u=x2u = x^2
2. Differentiate du=2x dx\mathrm{d}u = 2x\,\mathrm{d}x
3. Substitute ∫2x ex2 dx=∫eu du\displaystyle\int 2x\,e^{x^2}\,\mathrm{d}x = \int e^u\,\mathrm{d}u
4. Integrate, then go back to xx ∫eu du=eu+C=ex2+C\displaystyle\int e^u\,\mathrm{d}u = e^u + C = e^{x^2} + C

Step 2 is the key. Differentiating u=x2u = x^2 gives dudx=2x\dfrac{\mathrm{d}u}{\mathrm{d}x} = 2x, which we rearrange as du=2x dx\mathrm{d}u = 2x\,\mathrm{d}x. This little block 2x dx2x\,\mathrm{d}x is exactly what appears in the integral: we replace it in one go with du\mathrm{d}u. It is this substitution that makes the xx disappear.

Be careful with step 4: after integrating in uu, you must go back to the original variable xx by replacing uu with its expression. An antiderivative must be expressed in terms of xx, not uu.

What if the factor is not exactly u′u'? We adjust by a constant. For ∫x ex2 dx\displaystyle\int x\,e^{x^2}\,\mathrm{d}x, the factor 22 is missing: we write x dx=12(2x dx)=12 dux\,\mathrm{d}x = \tfrac{1}{2}\left(2x\,\mathrm{d}x\right) = \tfrac{1}{2}\,\mathrm{d}u.

∫x ex2 dx=12∫eu du=12ex2+C\int x\,e^{x^2}\,\mathrm{d}x = \frac{1}{2}\int e^u\,\mathrm{d}u = \frac{1}{2}e^{x^2} + C

Remember the sequence: set uu, derive du\mathrm{d}u from it, substitute, integrate, go back to xx. It is mechanical once the right uu has been spotted.