Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2266 > unrolled thread
| Started by | "A. Lapraitis" <ffcitatos@gmail.com> |
|---|---|
| First post | 2011-05-10 12:31 +0000 |
| Last post | 2011-05-11 08:26 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Numerical/analytical integration around a pole "A. Lapraitis" <ffcitatos@gmail.com> - 2011-05-10 12:31 +0000
Re: Numerical/analytical integration around a pole Gary Wardall <gwardall@gmail.com> - 2011-05-11 08:26 +0000
| From | "A. Lapraitis" <ffcitatos@gmail.com> |
|---|---|
| Date | 2011-05-10 12:31 +0000 |
| Subject | Numerical/analytical integration around a pole |
| Message-ID | <iqbb7i$jlt$1@smc.vnet.net> |
Hello,
I am trying to integrate a 1/(polynomial) function around its pole.
Could someone explain, why Integrate and NIntegrate give different
results?
Thanks a lot in advance!
A. L.
In[83]:= y[x_] := .24583 + 0.0175121 x - 0.793943 x^2 + 0.534908 x^3 -
0.650198 x^4;
(* Locating the pole *)
In[86]:= FindRoot[y[x] == 0, {x, .6}]
Out[86]= {x -> 0.601945}
In[84]:= Integrate[1/(y[x] + I/1000), {x, .5, .7}]
Out[84]= 5.25406 - 15.0137 I
In[85]:= NIntegrate[1/(y[x] + I/1000), {x, .5, .7}]
Out[85]= 0.323456 - 3.37701 I
[toc] | [next] | [standalone]
| From | Gary Wardall <gwardall@gmail.com> |
|---|---|
| Date | 2011-05-11 08:26 +0000 |
| Message-ID | <iqdh81$182$1@smc.vnet.net> |
| In reply to | #2266 |
On May 10, 7:31 am, "A. Lapraitis" <ffcita...@gmail.com> wrote:
> Hello,
>
> I am trying to integrate a 1/(polynomial) function around its pole.
> Could someone explain, why Integrate and NIntegrate give different
> results?
>
> Thanks a lot in advance!
> A. L.
>
> In[83]:= y[x_] := .24583 + 0.0175121 x - 0.793943 x^2 + 0.534908 x^3 -
> 0.650198 x^4;
>
> (* Locating the pole *)
> In[86]:= FindRoot[y[x] == 0, {x, .6}]
> Out[86]= {x -> 0.601945}
>
> In[84]:= Integrate[1/(y[x] + I/1000), {x, .5, .7}]
> Out[84]= 5.25406 - 15.0137 I
>
> In[85]:= NIntegrate[1/(y[x] + I/1000), {x, .5, .7}]
> Out[85]= 0.323456 - 3.37701 I
I get the same result for:
Integrate[1/(y[x] + I/1000), {x, .5, .7}]
and for
NIntegrate[1/(y[x] + I/1000), {x, .5, .7}]
In both cases I get:
0.323456 - 3.37701*I
Gary Wardall
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web