Changeset 7820:3af2c144d35a
- Timestamp:
- 12/20/07 12:15:58 (5 years ago)
- Branch:
- default
- Tags:
- 2.9.1.alpha2
- File:
-
- 1 edited
-
sage/calculus/equations.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/calculus/equations.py
r7730 r7820 727 727 728 728 def solve(f, *args, **kwds): 729 """729 r""" 730 730 Algebraically solve an equation of system of equations for given variables. 731 731 … … 734 734 *args -- variables to solve for. 735 735 solution_dict = True -- return a list of dictionaries containing the solutions. 736 736 737 EXAMPLES: 737 738 sage: x, y = var('x, y') … … 760 761 0.000 , 1.00 761 762 763 If True appears in the list of equations it is ignored, and if 764 False appears in the list then no solutions are returned. E.g., 765 note that the first \code{3==3} evaluates to True, not to a symbolic 766 equation. 767 768 sage: solve([3==3, 1.00000000000000*x^3 == 0], x) 769 [x == 0] 770 sage: solve([1.00000000000000*x^3 == 0], x) 771 [x == 0] 772 773 Here, the first evaluates to False, so there are no solutions: 774 sage: solve([1==3, 1.00000000000000*x^3 == 0], x) 775 [] 762 776 763 777 """ 764 778 if isinstance(f, (list, tuple)): 779 f = [s for s in f if s is not True] 780 for s in f: 781 if s is False: 782 return [] 783 765 784 m = maxima(list(f)) 766 785 try:
Note: See TracChangeset
for help on using the changeset viewer.
