Re: Re: Problem with the GaussianQuadratureWeights[n, a, b]
- To: mathgroup at smc.vnet.net
- Subject: [mg26462] Re: [mg26444] Re: Problem with the GaussianQuadratureWeights[n, a, b]
- From: Cheng Liu <cliu at lanl.gov>
- Date: Thu, 21 Dec 2000 22:46:46 -0500 (EST)
- References: <91pjn3$5vp@smc.vnet.net> <200012210651.BAA08643@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Thank you Jens, By setting the precision higher than the default (16) solve the problem described in my previous post. But another problem appears, In[9]:= GaussianQuadratureWeights[7, 0, 1, 20] Out[9]= \!\({{0.0254460438286207377369051579760743056`24.7499, 0.08184679159616065512531181311972918224`22.9004}, \ {0.1292344072003027800680676133596057328`25.5629, 0.176800361948499354889282418503202`22.9376}, \ {0.2970774243113014165466967939615192127788252`26.1861, 0.241352841905111882955195047583155`22.9492}, {1\/2, 9.1004562140604214415812457652156224`23.0189*^-9}, \ {0.70292257568869858345330320603848078722`26.5602, 0.241352841905111882955195047583156`22.9064}, \ {0.8707655927996972199319323866403942672`26.3914, 0.176800361948499354889282418500441`22.3581}, \ {0.9745539561713792622630948420239256944`26.3331, 0.081846791596160655125311813120987`22.4951}}\) Note the point at x=1/2, w is almost zero, which should be around 0.2. Another observation is that GaussianQuadratureWeights[7, 0, 1, 20] and GaussianQuadratureWeights[7, 0, 1] give different answers to the weight w. Any help would be appreciated. Thanks. Cheng >Hi, > >setting the precision will help and > >GaussianQuadratureWeights[42, 0, 1, 32] > >work fine. > >Cheng Liu wrote: >> >> Hi, >> >> I accidently run into this strange behavior. I am using the >> package NumericalMath`GaussianQuadrature` and the function >> GaussianQuadratureWeights[n, a, b] to obtain the abscissas and weights >> for the n-point Gaussian quadrature formula on the interval (a, b). >> The specific interval in my problem is (0, 1), I noticed that >> when 40 <= n <= 50, if n is odd, the function gives correct answer, >> but when n is even, the function gives the following error message: >> >> In[43]:= >> GaussianQuadratureWeights[42, 0, 1] >> \!\(Power::"infy" \(\(:\)\(\ \)\) >> "Infinite expression \!\(1\/0.`\) encountered."\) >> \!\(Power::"infy" \(\(:\)\(\ \)\) >> "Infinite expression \!\(1\/0.`\) encountered."\) >> \!\(Power::"infy" \(\(:\)\(\ \)\) >> "Infinite expression \!\(1\/0.`\) encountered."\) >> General::stop : >> Further output of Power::infy will be suppressed during this >>calculation. >> f::indet : >> Indeterminate expression - 1672.96 + ComplexInfinity + >> ComplexInfinity + \[LeftSkeleton]6\[RightSkeleton] + >>ComplexInfinity + >> ComplexInfinity encountered. >SNIPP SNAPP >> Thanks. >> >> Cheng >> -- -- ==================================================== Cheng Liu, Ph.D. MST-8, Structure/Property Relations Materials Science and Technology Division Los Alamos National Laboratory Los Alamos, New Mexico 87545 Phone: 505-665-6892 (office), 505-667-9950 (lab) Fax: 505-667-8021 email: cliu at lanl.gov ====================================================
- References:
- Re: Problem with the GaussianQuadratureWeights[n, a, b]
- From: Jens-Peer Kuska <kuska@informatik.uni-leipzig.de>
- Re: Problem with the GaussianQuadratureWeights[n, a, b]