Re: NIntegrate that upper limit is infinite
- To: mathgroup at smc.vnet.net
- Subject: [mg71896] Re: NIntegrate that upper limit is infinite
- From: "dimitris" <dimmechan at yahoo.com>
- Date: Sat, 2 Dec 2006 05:11:46 -0500 (EST)
- References: <ekp4q1$2h9$1@smc.vnet.net>
Your code contain many mistakes. Let assume that G[a_?NumericQ] := ((-(a - Cos[0.5])^(-3/2))/(3*( 10)^2))*(Sin[0.5])^(2) + (1/1 - 0.1*0.1)*(-(0.005*(1 + Cos[0.5]) + 0.001/1000)*(1 + Cos[0.5])^(1/ 2)*(ArcTan[( a - Cos[0.5])^(1/2)/(1 + Cos[0.5])^(1/2)] - Pi/ 2) + (0.005*(1 - Cos[0.5]) - 0.001/1000)*(1 - Cos[ 0.5])^(-1/ 2)*(-ArcTanh[(1 - Cos[0.5])^(1/2)/(a - Cos[0.5])^(1/2)]) ) P[a_?NumericQ] := Re[N[LegendreP[(-1/2) + I, a]]] Plot[G[a], {a, 1, 10}] Plot[P[a], {a, 1, 20}] Plot[P[a]G[a], {a, 1, 20}] Then Block[{Message}, NIntegrate[G[a]*P[a], {a, 1, Infinity}, SingularityDepth -> 1000]] -0.00259109 Regards Dimitris Evanescence wrote: > Dear all: > My question is as follows: > First I definite a function that is: > G[a_]=((-(a-Cos[0.5])^(-3/2))/(3*(10)^2))*(Sin[0.5])^(2)+(1/1-0.1*0.1)*(-(0.005*(1+Cos[0.5])+0.001/1000)*(1+Cos[0.5])^(1/2)*(ArcTan[(a-Cos[0.5])^(1/2)/-(1+Cos[0.5])^(1/2)]-Pi/2)+(0.005*(1-Cos[0.5])-0.001/1000)*(1-Cos[0.5])^(1/2)*(-ArcTanh[(1-Cos[0.5])^(1/2)/(a-Cos[0.5])^(1/2)]) > > > another function is: > P[a_]=Re[N[LegendreP[(-1/2)+i,a]]] where i =(-1)^(1/2) > > then > NIntegrate[G[a]*P[a],{a,1,infinite}] > but get the error message such that I do not get the correct answer > so,please solve my confuse,thank you! > > Evanescence 2006/12/1