Re: Integral Fails to Converge
- To: mathgroup at smc.vnet.net
- Subject: [mg101894] Re: Integral Fails to Converge
- From: antononcube <antononcube at gmail.com>
- Date: Mon, 20 Jul 2009 19:22:58 -0400 (EDT)
- References: <h3pelq$o36$1@smc.vnet.net>
Hi, First let me point out that you probably have used FORTRAN notation to specify numerical values. If we assume that with (1 E-3) you mean (1/1000) and we redefine your constants to have infinite precision (shown below) then NIntegrate has no problem calculating the integral with t set to 1. In[660]:= t = 1; a = 105/10000; cw = 454 *(10^(-12)); gammaw = 9810; volume = 802 *(10^(-7)); e = 208 (10^8); p = 23/100; nu = 10^(-6); n = 1/100; l = 15/100; cs = (3*(1 - (2*p)))/e; s = l*gammaw*((n*cw) + cs); K = 10^(-20); T = K*l*gammaw/nu; In[659]:= {a, cw, gammaw, volume, e, p, nu, n, l, cs, s, K, T} // N Out[659]= {0.0105, 4.54*^-10, 9810., 0.0000802, 2.08*^10, 0.23, 1.*^-6, 0.01, 0.15, 7.788461538461539*^-11, 1.2128782153846155*^-7, 1.*^-20, 1.4715*^-11} In[674]:= alpha = \[Pi]*(a^2)*s/(volume*cw*gammaw); beta = \[Pi]*T*t/(volume*cw*gammaw); In[676]:= Clear[f1] f1[u_] := (((u*BesselJ[0, u]) - 2*alpha*BesselJ[1, u])^2) + (((u*BesselY[0, u]) - 2*alpha*BesselY[1, u])^2); In[678]:= f1n[u_?NumericQ] := (((u*BesselJ[0, u]) - 2*alpha*BesselJ[1, u])^2) + (((u*BesselY[0, u]) - 2*alpha*BesselY[1, u])^2); In[679]:= f = (8*alpha/(\[Pi]^2))* Integrate[(((Exp[-beta*u*u/alpha])/(u*f1[u]))), {u, 0, Infinity}] Out[679]= (8860131*Integrate[1/(E^((3250000*u^2)/2953377)* (u*((u*BesselJ[0, u] - (8860131*Pi*BesselJ[1, u])/ 118335100)^2 + (u*BesselY[0, u] - (8860131*Pi*BesselY[1, u])/118335100)^2))), {u, 0, Infinity}])/(29583775*Pi) In[680]:= f = (8*alpha/(\[Pi]^2))* NIntegrate[(((Exp[-beta*u*u/alpha])/(u*f1n[u]))), {u, 0, Infinity}] Out[680]= 0.6974195846386315 In[683]:= Plot[Re[((Exp[-beta*u*u/alpha])/(u*f1n[u]))], {u, 0, 10}, PlotRange -> All] On Jul 17, 5:01 am, Antoine Letendre <antoine.leten... at gmail.com> wrote: > Hi! > > I have a question regarding the Integral of a complicated function. > The program I am running is the following: > > t =. ..; > a = 0.0105; > cw = 4.54 E - 10; > gammaw = 9.81 E + 3; > volume = 8.02 E - 5; > e = 2.08 E + 10; > p = 0.23; > nu = 1 E - 6; > n = 0.01; > l = 0.15; > > cs = (3*(1 - (2*p)))/e; > s = l*gammaw*((n*cw) + cs); > > K = 1 E - 20; > T = K*l*gammaw/nu; > > alpha = \[Pi]*(a^2)*s/(volume*cw*gammaw); > beta = \[Pi]*T*t/(volume*cw*gammaw); > > f1 = (((u*BesselJ[0, u]) - > 2*alpha*BesselJ[1, u])^2) + (((u*BesselY[0, u]) - > 2*alpha*BesselY[1, u])^2); > > f = (8*alpha/(\[Pi]^2))* > Integrate[(((Exp[-beta*u*u/alpha])/(u*f1))), {u, 0, Infinity}] > > Unfortunately it gives the error:NIntegrate::ncvb:NIntegratefailed to con= verge to prescribed accuracy > after 9 recursive bisections in u near {u} = {0.000201031}.NIntegrate > obtained > 7.35544*10^6+3.1321576550246354049389926310603926238860307749390128833831= 07=AD35176*10^-459 > I and 1732.8568273226265` for the integral and error estimates. > > Any suggestions would be of great help. > > Thanks in advance