Re: NIntegrate about singular point
- To: mathgroup at smc.vnet.net
- Subject: [mg126108] Re: NIntegrate about singular point
- From: A Retey <awnl at gmx-topmail.de>
- Date: Wed, 18 Apr 2012 03:53:32 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jmjf8p$89v$1@smc.vnet.net>
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