In [0] solveset((x - 1)*(y - 2), (x, y)) Out[1] {{1, arbitrary}, {arbitrary, 2}}
Out[1] {{1, (-oo, oo)}, {(-oo, oo), 2}}
In [0] solveset(x**2 + y**2, (x, y)) Out[1] {0, 0}
In [0] solveset([x + y == 1, x - y == 0], (x,y)) Out[1] {{1/2, 1/2}}
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/c786148f-3ea3-411f-b24c-93dc0174b381%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/51ec7e79-71d0-43e8-8cd9-d34b63af493e%40googlegroups.com.
The output should rather be a set of ProductSets rather than a set of sets.General FiniteSet is unordered so {(-oo, oo), 2} is same as {2, (-oo, oo)}.This example shows how you can define and use a product set.```In [9]: s = FiniteSet(2)*Interval(-oo, oo)In [10]: sOut[10]: {2} x (-oo, oo)In [11]: (2, 0) in sOut[11]: True```
> Solve System of Equation: (solvesys)> (For system of Equation, we can have this):> ```python> In [0] solveset([x + y == 1, x - y == 0], (x,y))> Out[1] {{1/2, 1/2}}> ```It has the same issue as I mentioned above {1/2, 1/2} is unordered. You can use a FinteSet set of ordered tuple.```In [14]: FiniteSet((S(1)/2, S(1)/2))Out[14]: {(1/2, 1/2)}```
> we also need to extend singularities module (though useful in general)+1I suggest that you create a detailed plan of "how" you are going to solvemultivariate equations and how will you find a singular point. I did a shallowstudy of the current multivariate solver in `solve`. The writeup is here:
Try searching for some literature,
You could look at it, but I think that, unless it has been changed sinceI last looked, it has nothing at all to offer vs. an algorithmic approach.
And some real problems in that it returns answers that are wrong, sometimes.
dig into other older CAS
and probably you should ask professor Fateman forhelp. He can be harsh but if you have a thick skin he can be a lot of help too.
In []: solve(x**2 + y**3 == 1, (x, y))
Out[]: {x, sqrt(1 - y**3)} # x: arbitraryIn []: solve(x**2 + y**2 == 4)
Out[]: {Circle, (0, 0), 2}On Sat, Feb 28, 2015 at 10:53 PM, AMiT Kumar <dtu....@gmail.com> wrote:
> One correction:
> * System of Multivariate Equations:
> We CAN implement this for comparatively lower order polynomial in new
> solveset.
>
> The only thing We can't implement is Multivariate inequalities, as we will
> need CAD for that.
It's still a good idea to think about them when designing the APIs, as
we will hopefully eventually get a CAD implementation.
primaryhint = [ "univariate", "multivariate", "single_eq", "multiple_eq" ]
subhints = [ 'solve_linear_system' 'linear_trig', 'polynomial', 'transcendental', 'piecewise', 'relational' 'solve_lambertw' 'miscellaneous' ]
def classify_solver(f, symbols=None): """ Clasifies the input equation(s)/function(s) to solve for, into possible hints such as linear, univariate, multivariate, etc. """ hints = []
# Methods to classify Equations
def solveset(f, symbol=None):
if eq_type == 'linear':
solve_linear(f, symbol)
if eq_type == 'linear_system':
solve_linear_system(f, symbol)
.
.
. and so on
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6LCoaNKjroiz7sSaHEDtDg%2BRywWSkC4bzUEa6Wh-9mwKw%40mail.gmail.com.
def classify_primaryhint(f):
"""Clasifies expression(s) `f` based on the primaryhints. Primaryhints are
"univariate", "multivariate_or_parametric", "single_eq", "multiple_eq".
Examples
========
>>> from sympy import *
>>> from sympy.solvers.solveset import *
>>> from sympy.abc import x
>>> classify_primaryhint(x**2 + 2*x + 1)
>>> ['single_eq', 'univariate']
"""
phints = []
# classify by number of Equations, i.e single_eq or multiple_eq
if not iterable(f):
phints.append('single_eq')
f = sympify(f)
free_symbols = set(f.free_symbols)
else:
free_symbols = []
for fi in f:
fi = sympify(fi)
free_symbols.append(fi.free_symbols)
if len(f) > 1:
phints.append('multiple_eq')
# classify by univariate and multivariate
if len(free_symbols) == 1:
phints.append('univariate')
elif len(free_symbols) > 1:
phints.append('multivariate')
return phintsIf the Malange form is html, couldn't you just copy the html from the
wiki source as well?