Re: StruveH runtime error
- To: mathgroup at smc.vnet.net
- Subject: [mg45680] Re: StruveH runtime error
- From: vb at cybertester.com (Vladimir Bondarenko)
- Date: Mon, 19 Jan 2004 05:15:23 -0500 (EST)
- References: <buap11$mim$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Toshiyuki \(Toshi\) Meshii" <meshii at mech.fukui-u.ac.jp> wrote in message news:<buap11$mim$1 at smc.vnet.net>... TM> StruveH[1,10^5] TM> Microsoft Visual C++ Runtime Library Runtime Error! TM> Program......\Mathkernel.exe TM> abnormal program termination. TM> Can someone help me on calculating StruveH functions TM> for large values by Mathematica? I confirm that you re-discovered a bug in Mathematica 5 I reported to Stephen Wolfram on 1 Sep 2001 22:26:38 in the CHAPTER 1: Integration: Simplest Elementary Functions of my memoir OPPORTUNITIES TO IMPROVE THE MATHKERNEL under # 385 and # 467. For example, the entry # 467 refers to NProduct[StruveH[0, n], {n, 1, Infinity}] In Mathematica 5.0, this expression invokes Runtime Error: Microsoft Visual C++ Runtime Library I have already sent you report to support at wolfram.com . The solution to your problem is to use asymptotic expansions: StruveH[1,z] -> (2-Sqrt[Pi/z](Cos[z]+Sin[z]))/Pi + O(1/z^(3/2)) In[1] := $Version Out[1] = 5.0 for Microsoft Windows (June 11, 2003) In[2] := (2 - Sqrt[Pi/z](Cos[z]+Sin[z]))/Pi/.z -> 10^4//N//Timing Out[2] = {0. Second, 0.643716} In[3]:= (2-Sqrt[Pi/z](Cos[z]+Sin[z]))/Pi/.z->10^5//N//Timing Out[3]= {0. Second, 0.638339} In[4]:= (2-Sqrt[Pi/z](Cos[z]+Sin[z]))/Pi /.z ->10^1000000//N//Timing Out[4]= {0.831 Second, 0.63662} By the way, StruveH[1,z] satisfies the following ODE In[5]:= DSolve[{z^2y''[z] + z y'[z] + (z^2 - 1)y[z] == 2/P z^2,\ y[0] == 0, y'[0] == 0}, y[z], z] (* unfortunately, Mathematica 5 fails here *) Out[5]= {} (* expected: StruveH[1, z] *) which is yet another bug. Best wishes, Vladimir Bondarenko GEMM architect Co-founder, CEO, Mathematical Director Cyber Tester, LLC http://www.cybertester.com/ http://www.CAS-testing.org/ ................................................................