Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Oct 16, 2021
1 parent e4cf168 commit 1cff70f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions diofant/tests/solvers/test_ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2979,3 +2979,13 @@ def test_sympyissue_9204():
def test_sympyissue_22155():
assert (dsolve(f(x).diff(x) - exp(f(x) - x)) ==
Eq(f(x), x + log(-1/(exp(x)*C1 - 1))))


def test_sympyissue_22294():
eq = Eq(f(x).diff(x) - f(x), x*f(x)**2)
assert 'Bernoulli' in classify_ode(eq)
assert dsolve(eq) == Eq(f(x), exp(x)/(exp(x)*(-x + 1) + C1))

eq = Eq(f(x).diff(x) - f(x), -x*f(x)**2)
assert 'Bernoulli' in classify_ode(eq)
assert dsolve(eq) == Eq(f(x), exp(x)/(exp(x)*(x - 1) + C1))
1 change: 1 addition & 0 deletions docs/release/notes-0.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,4 @@ These Sympy issues also were addressed:
* :sympyissue:`22155`: Problem with solving simple separable ODE
* :sympyissue:`22220`: Bug in the evaluation of a log limit
* :sympyissue:`22248`: solve running forever
* :sympyissue:`22294`: Bernoulli differential equation

0 comments on commit 1cff70f

Please sign in to comment.