{"id":886,"date":"2014-06-19T12:22:48","date_gmt":"2014-06-19T17:22:48","guid":{"rendered":"http:\/\/blog.richmond.edu\/physicsbunn\/?p=886"},"modified":"2014-06-19T12:23:06","modified_gmt":"2014-06-19T17:23:06","slug":"strange-mathematica-behavior","status":"publish","type":"post","link":"https:\/\/blog.richmond.edu\/physicsbunn\/2014\/06\/19\/strange-mathematica-behavior\/","title":{"rendered":"Strange Mathematica behavior"},"content":{"rendered":"<p><a href=\"http:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.01.18-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-887\" src=\"http:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.01.18-PM.png\" alt=\"\" width=\"301\" height=\"110\" srcset=\"https:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.01.18-PM.png 301w, https:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.01.18-PM-300x109.png 300w\" sizes=\"auto, (max-width: 301px) 100vw, 301px\" \/><\/a><\/p>\n<p>So far so good. This is the correct result. Now multiply the x by 1.0:<\/p>\n<p><a href=\"http:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.04.08-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-888\" src=\"http:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.04.08-PM.png\" alt=\"\" width=\"536\" height=\"195\" srcset=\"https:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.04.08-PM.png 536w, https:\/\/blog.richmond.edu\/physicsbunn\/files\/2014\/06\/Screen-Shot-2014-06-19-at-1.04.08-PM-300x109.png 300w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>That makes Mathematica think that the integral fails to converge.<\/p>\n<p>I found this out when reproducing some calculations from a couple of years ago. It seemed to work back then, so this behavior seems to have been introduced in a recent version of Mathematica.<\/p>\n<p>I know of various reasons why putting in the 1.0 could make a difference (because it forces Mathematica to think in terms of floating-point numbers with finite accuracy, rather than exact integers), but I don&#8217;t think any of them should make a difference here. The integral is failing to converge at x=0 (I checked that the problem is there, not at infinity), and the integrand is perfectly well-behaved there, even if you replace the 1.0 by any other complex number.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far so good. This is the correct result. Now multiply the x by 1.0: &nbsp; That makes Mathematica think that the integral fails to converge. I found this out when reproducing some calculations from a couple of years ago. It seemed to work back then, so this behavior seems to have been introduced in &hellip; <a href=\"https:\/\/blog.richmond.edu\/physicsbunn\/2014\/06\/19\/strange-mathematica-behavior\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Strange Mathematica behavior<\/span><\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-886","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/posts\/886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/comments?post=886"}],"version-history":[{"count":0,"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/posts\/886\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/media?parent=886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/categories?post=886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.richmond.edu\/physicsbunn\/wp-json\/wp\/v2\/tags?post=886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}