Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #9950
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Integration Problem |
| Date | 2012-05-04 02:28 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jnvert$8fh$1@smc.vnet.net> (permalink) |
| References | <201205030834.EAA29972@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 comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Integration Problem Bob Hanlon <hanlonr357@gmail.com> - 2012-05-04 02:28 +0000
csiph-web