{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/14939","repository_url":"https://api.github.com/repos/sympy/sympy","labels_url":"https://api.github.com/repos/sympy/sympy/issues/14939/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/14939/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/14939/events","html_url":"https://github.com/sympy/sympy/pull/14939","id":342288403,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjIxOTU4","number":14939,"title":"limit(sqrt(x)*cos(x - x**2) / (x + 1), x, oo) causes recursion error","user":{"login":"maurogaravello","id":20386091,"node_id":"MDQ6VXNlcjIwMzg2MDkx","avatar_url":"https://avatars3.githubusercontent.com/u/20386091?v=4","gravatar_id":"","url":"https://api.github.com/users/maurogaravello","html_url":"https://github.com/maurogaravello","followers_url":"https://api.github.com/users/maurogaravello/followers","following_url":"https://api.github.com/users/maurogaravello/following{/other_user}","gists_url":"https://api.github.com/users/maurogaravello/gists{/gist_id}","starred_url":"https://api.github.com/users/maurogaravello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maurogaravello/subscriptions","organizations_url":"https://api.github.com/users/maurogaravello/orgs","repos_url":"https://api.github.com/users/maurogaravello/repos","events_url":"https://api.github.com/users/maurogaravello/events{/privacy}","received_events_url":"https://api.github.com/users/maurogaravello/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-18T11:28:31Z","updated_at":"2018-07-29T11:05:10Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/14939","html_url":"https://github.com/sympy/sympy/pull/14939","diff_url":"https://github.com/sympy/sympy/pull/14939.diff","patch_url":"https://github.com/sympy/sympy/pull/14939.patch"},"body":"#### References to other Issues or PRs\r\n<!-- If this pull request fixes an issue, write \"Fixes #NNNN\" in that exact\r\nformat, e.g. \"Fixes #1234\". See\r\nhttps://github.com/blog/1506-closing-issues-via-pull-requests .-->\r\n\r\nFixes  #14574 \r\n\r\n#### Brief description of what is fixed or changed\r\n\r\n`limit(sqrt(x)*cos(x - x**2) / (x + 1), x, oo)` causes recursion error. I noticed\r\nthat `heuristics()` in `limits.py` was not able to find the result.\r\nAfter a change of variable, i.e. `x -> 1/x`, `heuristics()` calculates the limits\r\nof each of the three factors and put them in the list `r`. At the end,\r\n`r = [0, oo, AccumBounds(-1,1)]` and in this way the code `rv = e.func(*r)` returns\r\n`S.Nan`.\r\n\r\nMy idea is to separate the factors of type `AccumBounds`, collected in `r2`, from the others,\r\ncollected in `e2`. Then calculate the limit for the expression obtained by the product\r\nof elements of `e2` and finally try to resolve the original limit.\r\n\r\n#### Other comments\r\n\r\nA test was added.\r\n\r\n<!-- Your title above should be a short description of what\r\nwas changed. Do not include the issue number in the title. -->\r\n\r\n<!-- BEGIN RELEASE NOTES -->\r\n* series\r\n  * added a heuristic method for solving indefinite forms in limits \r\n\r\n<!-- END RELEASE NOTES -->\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/408668817","html_url":"https://github.com/sympy/sympy/pull/14939#issuecomment-408668817","issue_url":"https://api.github.com/repos/sympy/sympy/issues/14939","id":408668817,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODY2ODgxNw==","user":{"login":"sympy-bot","id":41242049,"node_id":"MDQ6VXNlcjQxMjQyMDQ5","avatar_url":"https://avatars0.githubusercontent.com/u/41242049?v=4","gravatar_id":"","url":"https://api.github.com/users/sympy-bot","html_url":"https://github.com/sympy-bot","followers_url":"https://api.github.com/users/sympy-bot/followers","following_url":"https://api.github.com/users/sympy-bot/following{/other_user}","gists_url":"https://api.github.com/users/sympy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy-bot/subscriptions","organizations_url":"https://api.github.com/users/sympy-bot/orgs","repos_url":"https://api.github.com/users/sympy-bot/repos","events_url":"https://api.github.com/users/sympy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/sympy-bot/received_events","type":"User","site_admin":false},"created_at":"2018-07-29T11:05:10Z","updated_at":"2018-07-29T11:05:10Z","author_association":"NONE","body":":white_check_mark:\n\nHi, I am the [SymPy bot](https://github.com/sympy/sympy-bot) (v120). I'm here to make sure this pull request has a release notes entry. Please read the [guide on how to write release notes](https://github.com/sympy/sympy/wiki/Writing-Release-Notes). <details><summary>Click here to see the pull request description that was parsed.</summary>\n\n    #### References to other Issues or PRs\r\n    <!-- If this pull request fixes an issue, write \"Fixes #NNNN\" in that exact\r\n    format, e.g. \"Fixes #1234\". See\r\n    https://github.com/blog/1506-closing-issues-via-pull-requests .-->\r\n\r\n    Fixes  #14574 \r\n\r\n    #### Brief description of what is fixed or changed\r\n\r\n    `limit(sqrt(x)*cos(x - x**2) / (x + 1), x, oo)` causes recursion error. I noticed\r\n    that `heuristics()` in `limits.py` was not able to find the result.\r\n    After a change of variable, i.e. `x -> 1/x`, `heuristics()` calculates the limits\r\n    of each of the three factors and put them in the list `r`. At the end,\r\n    `r = [0, oo, AccumBounds(-1,1)]` and in this way the code `rv = e.func(*r)` returns\r\n    `S.Nan`.\r\n\r\n    My idea is to separate the factors of type `AccumBounds`, collected in `r2`, from the others,\r\n    collected in `e2`. Then calculate the limit for the expression obtained by the product\r\n    of elements of `e2` and finally try to resolve the original limit.\r\n\r\n    #### Other comments\r\n\r\n    A test was added.\r\n\r\n    <!-- Your title above should be a short description of what\r\n    was changed. Do not include the issue number in the title. -->\r\n\r\n    <!-- BEGIN RELEASE NOTES -->\r\n    * series\r\n      * added a heuristic method for solving indefinite forms in limits \r\n\r\n    <!-- END RELEASE NOTES -->\r\n\r\n\r\n\r\n\n\n</details><p>\n\n\n\nYour release notes are in good order.\n\nHere is what the release notes will look like:\n* series\n  * added a heuristic method for solving indefinite forms in limits ([#14939](https://github.com/sympy/sympy/pull/14939) by [@maurogaravello](https://github.com/maurogaravello))\n\nThis will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.2.1.\n\nNote: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it.\n\n"}}
{"actor":{"display_login":"sympy-bot"}}