When we try to evaluate an integral such as, say
$$\int_a^b{f(x)dx}$$
there is often the case that we can analytically find
$$\int{f(x)dx}$$
a little faster (imagine leaving away the evaluation for specific terms for partial integrations, if you lack an example. Partially integrating forces you to evaluate two terms instead of one all of the sudden).
Therefore, I feel tempted to leave away the limits of integration in general and evaluating it at the very end, to save some time.
Unfortunately, I'm not sure if this holds for every scenario. Think of integration by substitution, where the limits might change due to substituting.
And so, I want to ask: When exactly can I just ignore the limits of integration and apply them to an indefinite integral instead?
If you're having trouble to understand the difference, just give $\int_0^{\pi}{e^x\cdot cos(x)dx}$ a try. Finding $\int{e^x\cdot cos(x)dx}$ is easy, but trying to find $\int_0^{\pi}{e^x\cdot cos(x)dx}$ directly (using partial integration and evaluating all the terms mid-way) is somewhat cumbersome.