{"id":578,"date":"2009-01-19T12:52:13","date_gmt":"2009-01-19T11:52:13","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=578"},"modified":"2009-01-19T12:52:13","modified_gmt":"2009-01-19T11:52:13","slug":"symbolic-integration-bug-with-mathematica-7","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=578","title":{"rendered":"Symbolic integration bug with Mathematica 7?"},"content":{"rendered":"<p>Someone at my university reported the following Mathematica 7 bug to me and I thought I would share it with all of you in case someone was interested or could offer insight that we don&#8217;t have.\u00a0 Needless to say this has been reported to Wolfram via the official channels and I am sure that it will be sorted out soon.<\/p>\n<p>If you do<\/p>\n<p>Integrate[k^2 (k^2 &#8211; 1)\/((k^2 &#8211; 1)^2 + x^2)^(3\/2), {k, 0, Infinity},Assumptions -&gt; x &gt; 0]<\/p>\n<p>you get<\/p>\n<p>EllipticK[(2*x)\/(-I + x)]\/(2*Sqrt[-1 &#8211; I*x])<\/p>\n<p>Which is complex for all x whereas the integrand is purely real.\u00a0 As a\u00a0 particular example let us put x=2.\u00a0 Evaluating numerically:<\/p>\n<p>NIntegrate[k^2 (k^2 &#8211; 1)\/((k^2 &#8211; 1)^2 + 2^2)^(3\/2), {k, 0, Infinity}]<\/p>\n<p>gives<\/p>\n<p>0.706094<\/p>\n<p>But if I plug x=2 into the symbolic result given earlier<\/p>\n<p>N[EllipticK[(2*x)\/(-I + x)]\/(2*Sqrt[-1 &#8211; I*x]) \/.x-&gt;2]<\/p>\n<p>Then I get<\/p>\n<p>-5.35054*10^-17 + 0.568541 I<\/p>\n<p>Which is obvioulsy incorrect.\u00a0 Would someone with a copy of Maple 12 mind seeing what that makes of this integral please?\u00a0 Extra kudos to anyone who can do it by hand!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Someone at my university reported the following Mathematica 7 bug to me and I thought I would share it with all of you in case someone was interested or could offer insight that we don&#8217;t have.\u00a0 Needless to say this has been reported to Wolfram via the official channels and I am sure that it [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8],"tags":[],"class_list":["post-578","post","type-post","status-publish","format-standard","hentry","category-math-software","category-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-9k","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=578"}],"version-history":[{"count":4,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":582,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions\/582"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}