{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/14445","repository_url":"https://api.github.com/repos/sympy/sympy","labels_url":"https://api.github.com/repos/sympy/sympy/issues/14445/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/14445/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/14445/events","html_url":"https://github.com/sympy/sympy/pull/14445","id":303820587,"number":14445,"title":"Fixes dsolve for system of equations","user":{"login":"vishalg2235","id":17894780,"avatar_url":"https://avatars2.githubusercontent.com/u/17894780?v=4","gravatar_id":"","url":"https://api.github.com/users/vishalg2235","html_url":"https://github.com/vishalg2235","followers_url":"https://api.github.com/users/vishalg2235/followers","following_url":"https://api.github.com/users/vishalg2235/following{/other_user}","gists_url":"https://api.github.com/users/vishalg2235/gists{/gist_id}","starred_url":"https://api.github.com/users/vishalg2235/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishalg2235/subscriptions","organizations_url":"https://api.github.com/users/vishalg2235/orgs","repos_url":"https://api.github.com/users/vishalg2235/repos","events_url":"https://api.github.com/users/vishalg2235/events{/privacy}","received_events_url":"https://api.github.com/users/vishalg2235/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-09T12:07:56Z","updated_at":"2018-03-12T03:46:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/14445","html_url":"https://github.com/sympy/sympy/pull/14445","diff_url":"https://github.com/sympy/sympy/pull/14445.diff","patch_url":"https://github.com/sympy/sympy/pull/14445.patch"},"body":"Fixes dsolve for solving system of equations.\r\nAs per commits [here](https://github.com/diofant/diofant/pull/286).\r\n\r\n3 errors which were coming:\r\n1) https://github.com/sympy/sympy/compare/master...vishalg2235:dsolve-system?expand=1#diff-472b116dfa6e4e86ea88b212aaffc929R51 here I have replaced `sol3` with the results which dsolve is giving but still it is creating assertion error.\r\n2) [here](https://github.com/sympy/sympy/blob/master/sympy/solvers/tests/test_ode.py#L228) dsolve is giving a non-piecewise result.\r\n3) same as 1st error [here](https://github.com/sympy/sympy/blob/master/sympy/solvers/tests/test_ode.py#L401) also I have changed `sol2` with the result of dsolve but assertion error is coming.\r\n\r\n@cbm755  @asmeurer @skirpichev Please review!"},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/372186495","html_url":"https://github.com/sympy/sympy/pull/14445#issuecomment-372186495","issue_url":"https://api.github.com/repos/sympy/sympy/issues/14445","id":372186495,"user":{"login":"normalhuman","id":13082030,"avatar_url":"https://avatars1.githubusercontent.com/u/13082030?v=4","gravatar_id":"","url":"https://api.github.com/users/normalhuman","html_url":"https://github.com/normalhuman","followers_url":"https://api.github.com/users/normalhuman/followers","following_url":"https://api.github.com/users/normalhuman/following{/other_user}","gists_url":"https://api.github.com/users/normalhuman/gists{/gist_id}","starred_url":"https://api.github.com/users/normalhuman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/normalhuman/subscriptions","organizations_url":"https://api.github.com/users/normalhuman/orgs","repos_url":"https://api.github.com/users/normalhuman/repos","events_url":"https://api.github.com/users/normalhuman/events{/privacy}","received_events_url":"https://api.github.com/users/normalhuman/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T03:46:46Z","updated_at":"2018-03-12T03:46:46Z","author_association":"MEMBER","body":"It's the usual issue with 1/2, 1/4, 1/7 and so on. Type S(1)/2, S(1)/4, S(1)/7... instead.\r\n\r\n> A common mistake is copying an expression that is printed and reusing it. If the expression has a Rational (i.e., <number>/<number>) in it, you will not get the same result, obtaining the Python result for the division rather than a SymPy Rational.  http://docs.sympy.org/latest/gotchas.html#python-numbers-vs-sympy-numbers\r\n\r\nThis is only needed when you have one integer divided by another. `I/2` is fine, and `sqrt(7)/4` is fine: in both cases, we already have a SymPy expression in the numerator, and then division happens by SymPy rules.\r\n\r\nFor example, line 51 of test_ode should be\r\n\r\n```\r\n    sol3 = [Eq(x(t), C1*(-2*sqrt(7)*I*(S(1)/4 + sqrt(7)*I/4)*exp(t*(3 - sqrt(7)*I)/2)/7 + 2*sqrt(7)*I*(S(1)/4 - sqrt(7)*I/4)*exp(t*(3 + sqrt(7)*I)/2)/7) + C2*((S(1)/4 + sqrt(7)*I/4)*(S(1)/2 + sqrt(7)*I/14)*exp(t*(3 - sqrt(7)*I)/2) + (S(1)/4 - sqrt(7)*I/4)*(S(1)/2 - sqrt(7)*I/14)*exp(t*(3 + sqrt(7)*I)/2))), Eq(y(t), C1*(-2*sqrt(7)*I*exp(t*(3 - sqrt(7)*I)/2)/7 + 2*sqrt(7)*I*exp(t*(3 + sqrt(7)*I)/2)/7) + C2*((S(1)/2 + sqrt(7)*I/14)*exp(t*(3 - sqrt(7)*I)/2) + (S(1)/2 - sqrt(7)*I/14)*exp(t*(3 + sqrt(7)*I)/2)))]\r\n```"}}
{"actor":{"display_login":"normalhuman"}}