Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9681

Re: NIntegrate about singular point

From A Retey <awnl@gmx-topmail.de>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: NIntegrate about singular point
Date 2012-04-18 07:54 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jmls0d$jdp$1@smc.vnet.net> (permalink)
References <jmjf8p$89v$1@smc.vnet.net>

Show all headers | View raw


Hi,

> I am dealing with an integral as following
>
> h = 1
> m = 1
> n = 1
> t = 1
> k = 4.0269
> kk = 4.0284
> Plot[x^(m + n - 1)/(x*Sinh[x*h] -
>       kk*Cosh[x*h])*((x +
>         kk)*((-1)^(m + n)*Exp[x*(2.*(-0.2) + h)] - ((-1)^m + (-1)^n)*
>          Exp[-x*h]) + (x - kk)*Exp[-x*(2.*(-0.2) + h)]), {x, 0, 40}]
> NIntegrate[
>   x^(m + n - 1)/(x*Sinh[x*h] -
>       kk*Cosh[x*h])*((x +
>         kk)*((-1)^(m + n)*Exp[x*(2.*(-0.2) + h)] - ((-1)^m + (-1)^n)*
>          Exp[-x*h]) + (x - kk)*Exp[-x*(2.*(-0.2) + h)]), {x, 0,
>    Infinity}]
>
> It has a singular point when the denominator is zero.
> At begining, I try to solve it in another system, yet with Nan result.
>
> It is the first time for me to use Mathematica.
> Can it solve the integral with singular point?

I think that NIntegrate handles many singularities automatically if the 
integral actually converges. I haven't checked, but I suspect that in 
this case the integral is probably simply not converging. It's easy 
enough though to get the cauchy principle value, if that is what you're 
after:

expr = x^(m + n - 1)/(x*Sinh[x*h] -
      kk*Cosh[x*h])*((x +
        kk)*((-1)^(m + n)*Exp[x*(2.*(-0.2) + h)] - ((-1)^m + (-1)^n)*
         Exp[-x*h]) + (x - kk)*Exp[-x*(2.*(-0.2) + h)]);

singularity = x /. FindRoot[Denominator[expr] == 0, {x, 4}]

NIntegrate[expr, {x, 0, Infinity}, Exclusions -> {singularity},
  Method -> "PrincipalValue"]

you might want to have a look at tutorial/NIntegrateOverview in the 
documentation center to learn more details about the various options and 
methods of NIntegrate.

hth,

albert

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

NIntegrate about singular point bowlderster <bowlderster@gmail.com> - 2012-04-17 10:05 +0000
  Re: NIntegrate about singular point A Retey <awnl@gmx-topmail.de> - 2012-04-18 07:54 +0000
    Re: NIntegrate about singular point bowlderster <bowlderster@gmail.com> - 2012-04-19 07:54 +0000
  Re: NIntegrate about singular point danl@wolfram.com - 2012-04-18 07:56 +0000
  Re: NIntegrate about singular point danl@wolfram.com - 2012-04-20 11:49 +0000

csiph-web