TITLE: Are some indefinite integrals impossible to compute or just don't exist?
QUESTION [18 upvotes]: I've just started working with integrals relatively recently and I am so surprised how much harder they are to compute than derivatives. For example, for something as seemingly simple as $\int e^{ \cos x} dx $ is impossible right? I can't use u-sub since there is no $-\sin(x)$ multiplying the function, also integration by parts seems like it wouldn't work, correct? So does this mean this integral is impossible to compute?

REPLY [6 votes]: You're asking various different questions here since existence, computability and having a closed-form are all separate aspects of functions and integrals. To show you how, let's embark on a journey to make the nastiest function we can. It's interesting and important to recognise the distinction between different terms and pathological cases are a good way of differentiating between them.
All the functions you will have encountered until high-school have closed form integrals. This means we can neatly write their integral using other "simple" functions. This includes trigonometric functions, exponentials and polynomials; e.g. $\int \frac12x^2+2\ \mathrm{d}x=\frac{1}{6}x^3+2x+C$.
However, we can prove that some simple-looking functions have no closed form integral. As the other answers point out, it is impossible to write $\int e^{-x^2}\ \mathrm{d}x$ using simple functions but we can still compute the numerical value of the integral: $\int_0^1e^{-x^2}\ \mathrm{d}x\approx0.747$. Clearly our function isn't nasty enough yet.
We can't always compute the value of some functions or even some numbers. There are some uncomputable numbers that, despite existing, can't be found numerically; it's impossible to know what their value is. The most famous of these are Chaitin's constants, Ω. So, let's throw one into the mix. With $\int_0^1e^{-x^2}+\Omega\ \mathrm{d}x$ it's not just impossible to write the function in a closed form but now we can't even compute its value! Pretty nasty but can we get worse?
With that last integral, we couldn't find its value but it did have a value. Can we make a function where it's impossible to even integrate it? The Dirichlet function, $I_\mathbb{Q}(x)$, manages this. It's equal to $1$ at the rational numbers but $0$ everywhere else. Essentially, the $0$'s and $1$'s are too close to each other for us to be able to tell them apart so it can't be integrated. 
There are many other ways we can describe functions and further narrow the qualities we've listed with different types of integration, computability and closed-forms.