Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9950 > unrolled thread
| Started by | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| First post | 2012-05-04 02:28 +0000 |
| Last post | 2012-05-04 02:28 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Integration Problem Bob Hanlon <hanlonr357@gmail.com> - 2012-05-04 02:28 +0000
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Date | 2012-05-04 02:28 +0000 |
| Subject | Re: Integration Problem |
| Message-ID | <jnvert$8fh$1@smc.vnet.net> |
Integrate[E^(-1/10 ((1 + r2z)^2)), {r2z, -Infinity, Infinity}]
Sqrt[10 \[Pi]]
% // N
5.60499
Integrate[E^(-0.1 ((1 + r2z)^2)), {r2z, -Infinity, Infinity}]
5.60499 - 2.03152*10^-16 I
The use of an inexact number (0.1) results in the calculation being
done with machine precision that keeps the complex part from
cancelling exactly. This artifact can be removed with Chop.
% // Chop
5.60499
Alternatively, you can use NIntegrate which doesn't involve any
intermediate complex representations.
NIntegrate[E^(-0.1 ((1 + r2z)^2)), {r2z, -Infinity, Infinity}]
5.60499
Bob Hanlon
On Thu, May 3, 2012 at 4:34 AM, Michael Musheghian
<michael.musheghian@gmail.com> wrote:
> Greetings!
>
> I found that evaluation of this 2 integrals yield a bit different result. What could be the reason?
>
> Integrate[E^(-1/10 ((1 + r2z)^2)), {r2z, -Infinity, Infinity}]
>
> Integrate[E^(-0.1 ((1 + r2z)^2)), {r2z, -Infinity, Infinity}]
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web