Issue 3258 in sympy: AssertionError in dsolve()

1 view
Skip to first unread message

sy...@googlecode.com

unread,
May 7, 2012, 11:24:23 PM5/7/12
to sympy-...@googlegroups.com
Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Solvers

New issue 3258 by asme...@gmail.com: AssertionError in dsolve()
http://code.google.com/p/sympy/issues/detail?id=3258

In [172]: dsolve(-b1(x) - (x - xp)*b1(x).diff(x) + q(x), b1(x))
---------------------------------------------------------------------------
AssertionError Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython-input-172-5bebda334e1e>
in
<module>()
----> 1 dsolve(-b1(x) - (x - xp)*b1(x).diff(x) + q(x), b1(x))

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/ode.pyc in
dsolve(eq, func, hint, simplify, prep, **kwargs)
531 return dsolve(eq, func, hint=hints['default'],
simplify=simplify,
532 prep=prep, classify=False,
order=hints['order'],
--> 533 match=hints[hints['default']])
534 elif hint in ('all', 'all_Integral', 'best'):
535 retdict = {}

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/ode.pyc in
dsolve(eq, func, hint, simplify, prep, **kwargs)
575 if simplify:
576 rv = odesimp(solvefunc(eq, func, order=hints['order'],
--> 577 match=hints[hint]), func, hints['order'], hint)
578 else:
579 # We still want to integrate (you can disable it separately
with the hint)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/core/multidimensional.pyc
in
wrapper(*args, **kwargs)
123 result = apply_on_element(wrapper, args,
kwargs, n)
124 return result
--> 125 return f(*args, **kwargs)
126 return wrapper

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/ode.pyc in
odesimp(eq, func, order, hint)
973
974 # First, integrate if the hint allows it.
--> 975 eq = _handle_Integral(eq, func, order, hint)
976 assert isinstance(eq, Equality)
977

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/solvers/ode.pyc in
_handle_Integral(expr, func, order, hint)
1729 if not i.has(x0) and not i.has(y0):
1730 sol += i
-> 1731 assert sol != 0
1732 sol = Eq(sol.subs(y, f(x)),expr.rhs) # expr.rhs == C1
1733 del exactvars

AssertionError:

This is using the default hint, '1st_exact'.  Perhaps issue 2793 would help
here.

sy...@googlecode.com

unread,
May 22, 2013, 1:53:24 PM5/22/13
to sympy-...@googlegroups.com
Updates:
Status: Fixed

Comment #1 on issue 3258 by smi...@gmail.com: AssertionError in dsolve()
http://code.google.com/p/sympy/issues/detail?id=3258

This appears to be working

>>> var('xp');b1=Function('f');dsolve(-b1(x) - (x - xp)*b1(x).diff(x) +
>>> q(x), b1(x))
xp
f(x) == (C1 - Integral(-f(x) + q(x), x))/xp

The offending line was removed in 6eb61339190f5b8603a322a23a58410fe12b9dbe.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages