New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make checkodesol work for series solutions #17588
Conversation
✅ Hi, I am the SymPy bot (v149). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.5. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
Codecov Report
@@ Coverage Diff @@
## master #17588 +/- ##
============================================
- Coverage 74.76% 74.754% -0.006%
============================================
Files 634 634
Lines 165333 165347 +14
Branches 38857 38858 +1
============================================
+ Hits 123604 123605 +1
- Misses 36309 36319 +10
- Partials 5420 5423 +3 |
+ C1*(x + (x + 2)**4/12 - (x + 2)**3/3 + S(2)) | ||
+ O(x**6)) | ||
assert dsolve(eq, n=2) == Eq(f(x), C2*x + C1 + O(x**2)) | ||
assert dsolve(eq, x0=-2) == sol | ||
# FIXME: Solution should be O((x+2)**6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
O((x+2)**6)
has a different meaning. So we can't get from the solution and also O(x**6) is the correct way of representing the solution.
In [9]: Order((x+2)**6)
Out[9]: O(1)
For the checkodesol
We can pass the argument x0
and then we can use it for your work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I meant is:
In [1]: O((x+2)**6, (x, -2))
Out[1]:
⎛ 6 ⎞
O⎝(x + 2) ; x → -2⎠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making dsolve
return that fails because constantsimp
calls cse
which absorbs all the terms #17587
c601f5b
to
b07ada0
Compare
b07ada0
to
1081b6a
Compare
I'll merge this soon if no one objects |
References to other Issues or PRs
Fixes #16000
Brief description of what is fixed or changed
Makes checkodesol work for series solutions of ODEs as returned by dsolve. I'm not sure this works for series solutions around non-zero points because dsolve doesn't yet return correct series solution around nonzero points.
Other comments
I'm still working on this...
Release Notes