# definite integral and indefinite integral different (~Gaussian)

Hello, I get strange behaviour on the following function. It persists when changing constants, but is not present for very simple functions, so any hint for a limit would be appreciated.

```
f1 = exp(-1/2*(y-a)^2/N)+exp(-1/2*(y+a)^2/N); f1
f2 = f1*y^2; f2
f4 = f2(a=3,N=0.7); f4
>(e^(-0.714285714285714*(y - 3)^2) + e^(-0.714285714285714*(y + 3)^2))*y^2
Z = integral(f4,y,-100,100); Z.n(digits=5)
>9.7000
F = integrate(f4,y); H = F(y=100) - F(y=-100); H.n(digits=5)
>-2.4622e-2917
```

As you see, I get right results when using the definite integral, while calculation the indefinite integral and manually evaluating it gains wrong results.

By the way, when integrating from -inf to inf, I should get `N+a^2`

. Is there any way to see this?

What version of Sage are you using?

Thank you for the answers, both of you!