Question: I'm trying to evaluate
$\lim\_{e\to 0} \, \frac{i}{e}\int\_{\pi }^0 \frac{1-\exp (i e \exp (i \theta ))}{\exp (i \theta )} \, d\theta$ with Mathematica 9.0.1.0 on OS X.

However, I get "Undefined" for this input:

```
Limit[I/e Integrate[(1 - Exp[I e Exp[I θ]])/Exp[I θ], {θ, π, 0}], e -> 0]

```

We can see numerically that the correct answer is $-\pi$ by using this code:

```
With[{e = 0.000001}, I/e NIntegrate[(1 - Exp[I e Exp[I θ]])/Exp[I θ], {θ, π, 0}] ] // Chop

```

What goes wrong in this process? Is it possible to get the correct result?

Answer: 
There seems to be some issue with the definite integral. But you can easily work around it by using indefinite integration then evaluate for the limit of integration (replaced your $\theta$ with $x$ to paste here)

```
 r = Integrate[(1 - Exp[I e Exp[I x]])/Exp[I x], x];
-((r /. x -> Pi) - (r /. x -> 0));
Limit[I/e*%, e -> 0]

```

![Mathematica graphics](https://i.stack.imgur.com/il5bQ.png)

Mathematica 9.01 on windows

One can see something is strange, by doing:

```
r = Integrate[(1 - Exp[I e Exp[I x]])/Exp[I x], {x, \[Pi], 0}]
Assuming[Re[e] <= 0 && Im[e] == 0, Limit[I/e*r, e -> 0]]

```

Where did this 1/4096 value come from?

![Mathematica graphics](https://i.stack.imgur.com/a38l9.png)
You can use [`AsymptoticIntegrate`](http://reference.wolfram.com/language/ref/AsymptoticIntegrate):

```
I/e AsymptoticIntegrate[(1 - Exp[I e Exp[I θ]])/Exp[I θ, {θ, π, 0}, {e, 0, 1}]

```

> 
> -π
> 
> 
>