{"id":801,"date":"2009-11-23T18:01:34","date_gmt":"2009-11-23T17:01:34","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=801"},"modified":"2010-08-27T14:12:42","modified_gmt":"2010-08-27T13:12:42","slug":"a-random-collection-of-bugs-in-mathematica-7-and-7-0-1","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=801","title":{"rendered":"A random collection of bugs in Mathematica 7 and 7.0.1"},"content":{"rendered":"<p>There was a discussion recently on <a href=\"http:\/\/groups.google.co.uk\/group\/comp.soft-sys.math.mathematica\/topics\">comp.soft-sys.math.mathematica<\/a> about <a href=\"http:\/\/groups.google.co.uk\/group\/comp.soft-sys.math.mathematica\/browse_thread\/thread\/d102921e1cf52386\/03be36e57ac7a123\">maintaining a user-led Mathematica bug list<\/a> and various solutions were proposed.\u00a0 I have no desire (and certainly no time) to even try to maintain a &#8216;proper&#8217; bug database for Mathematica but I am interested in maintaining a list of bugs that <strong>I personally find interesting<\/strong> and that I would like to see explained or fixed.<\/p>\n<p>This post is that list.<\/p>\n<p>First &#8211; some answers to potential questions.<\/p>\n<p><strong>Why are you doing this?\u00a0 I thought you liked Mathematica.<\/strong><\/p>\n<p>I love Mathematica but, like all pieces of software, it is not perfect.\u00a0 I find (some of) the imperfections interesting and since I get lots of hits from google every month from people looking for bugs in MATLAB, Mathematica, Maple, Mathcad etc then I assume that I am not alone.\u00a0 Every bug that I discuss here will be submitted to Wolfram Research and I will also update the page when the bug gets fixed.<\/p>\n<p><strong>I emailed\/wrote a comment about a bug and you haven&#8217;t included it in the list. Why?<br \/>\n<\/strong><\/p>\n<p>Sorry about that &#8211; please don&#8217;t take it personally.\u00a0 I am low on time and may not have managed to verify the &#8216;bug&#8217; or maybe it just didn&#8217;t tickle my fancy.\u00a0 It&#8217;s also possible that I simply don&#8217;t understand the problem you are referring to and I will not post anything on here that I don&#8217;t at least <strong>think<\/strong> I understand.\u00a0 Remember &#8211; I&#8217;m not trying to keep a list of <strong>all<\/strong> Mathematica bugs &#8211; just some of the ones that I find interesting.<\/p>\n<p><strong>One of the &#8216;bugs&#8217; you posted is not a bug &#8211; you just misunderstood the situation.<\/strong><\/p>\n<p>Oops, sorry!\u00a0 Please educate me so I can update it.<\/p>\n<p><strong>I think I have found a bug in Mathematica &#8211; what should I do?<\/strong><\/p>\n<p>In the first instance I suggest you post it to <a href=\"http:\/\/groups.google.co.uk\/group\/comp.soft-sys.math.mathematica\/topic\">comp.soft-sys.math.mathematica<\/a> &#8211; there are plenty of people there who know a lot about Mathematica and they (probably) will let you know if you really have found a bug or not.  If everyone suspects that it is a bug then your next step is to <a href=\"http:\/\/support.wolfram.com\/submitabug.cgi\">report it to Wolfram<\/a>.\u00a0 Finally, if you think I&#8217;d like to know about it then feel free to leave a comment to this post or<a href=\"https:\/\/www.walkingrandomly.com\/?p=53\"> email me<\/a>.<\/p>\n<h3><strong>FullSimplify bug 1<\/strong><\/h3>\n<pre>Clear[n];\r\nFullSimplify[n Exp[-n * 0.], Element[n, Integers]]<\/pre>\n<p>expected output:<\/p>\n<pre>n<\/pre>\n<p>actual output:<\/p>\n<pre>n\/2<\/pre>\n<p>original source &#8211; <a href=\"http:\/\/groups.google.co.uk\/group\/comp.soft-sys.math.mathematica\/browse_thread\/thread\/7765178b873ae699\">here<\/a>.<\/p>\n<h3><strong>Integrate bug 1<\/strong><\/h3>\n<pre>Integrate[k^2 (k^2 - 1)\/((k^2 - 1)^2 + x^2)^(3\/2), {k, 0, Infinity},Assumptions -&gt; x &gt; 0]<\/pre>\n<p>Expected output:<\/p>\n<pre>1\/2*1\/(1+x^2)^(1\/4)*EllipticK(1\/2*2^(1\/2)*(((1+x^2)^(1\/2)+1)\/(1+x^2)^(1\/2))^(1\/2))<\/pre>\n<p>Actual output:<\/p>\n<pre>EllipticK[(2*x)\/(-I + x)]\/(2*Sqrt[-1 - I*x])<\/pre>\n<p>Note that although the integrand is real for all k, Mathematica gives a complex result which is clearly wrong.\u00a0 Original source &#8211; <a href=\"https:\/\/www.walkingrandomly.com\/?p=578#comments\">here<\/a>.<\/p>\n<h3><strong>Limit bug 1<\/strong><\/h3>\n<pre>Limit[EllipticTheta[3, 0, x], x -&gt; 1, Direction -&gt; 1]<\/pre>\n<p>Expected Output:<\/p>\n<pre>Infinity<\/pre>\n<p>Actual Output:<\/p>\n<pre>0<\/pre>\n<p>Original Source: <a href=\"http:\/\/groups.google.co.uk\/group\/comp.soft-sys.math.mathematica\/browse_thread\/thread\/cf8d9ea6d8f63837\">here<\/a><\/p>\n<h3>NetworkFlow bug<\/h3>\n<p>The following code should complete in less than a second.<\/p>\n<pre>\r\n<< \"Combinatorica`\"\r\nNetworkFlow[CompleteGraph[4, 4], 1, 8]\r\n<\/pre>\n<p>but in Mathematica 7.0.1 (tested on Windows and Linux) it never completes and hogs a CPU indefinitely. Wolfram are aware of this one and it should be fixed in the next release.  Thanks to G\u00e1bor Megyesi of Manchester University for sending me this one.<\/p>\n<p>Feel free to let me know of others that you find but please bear in mind the points at the beginning of this post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There was a discussion recently on comp.soft-sys.math.mathematica about maintaining a user-led Mathematica bug list and various solutions were proposed.\u00a0 I have no desire (and certainly no time) to even try to maintain a &#8216;proper&#8217; bug database for Mathematica but I am interested in maintaining a list of bugs that I personally find interesting and that [&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":[8],"tags":[],"class_list":["post-801","post","type-post","status-publish","format-standard","hentry","category-mathematica"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-cV","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/801","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=801"}],"version-history":[{"count":23,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/801\/revisions"}],"predecessor-version":[{"id":2841,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/801\/revisions\/2841"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}