# Basic integral; substitution or integration by parts?

I understand that I have to do it more than once. Should I start with substitution or integration by parts? I have tried a little of both but end up with the integral of things I can't calculate. $\int e^{x^2+1} dx$ is an example of that.

-

First, substitution:

$$u=x^2+1\implies du=2x\,dx\implies 2x\,dx(x^2+1)e^{x^2+1}=du\,ue^u$$

and now by parts:

$$2\int u\,e^udu=2u\,e^u-2e^u+C$$

-
So I don't have to put $x^2+1$ back in for u before doing the integration? – Algific Aug 11 '13 at 12:13
No. The purpose of substitution is exactly so that you can temporarily forget about $x$, and perform the integration in $u$. Your final solution would be $2(x^2+1)e^{x^2+1} - 2e^{x^2+1} + C$ – Prahlad Vaidyanathan Aug 11 '13 at 12:18

Here's how to think about substitution: $$2\int (x^2+1)e^{x^2+1}\Big( 2x\,dx\Big)$$ If you don't know why $2x$ was segregated from everything else and put together with $dx$ inside the big parentheses, then you've missed a main idea of substitution. You should take that separation of $2x$ from the rest and joining it with $dx$ as suggesting what substitution to use.

-