On Sat, Feb 28, 2015 at 10:53 PM, AMiT Kumar <dtu.a...@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. Aaron Meurer > > > On Friday, February 27, 2015 at 6:58:51 PM UTC+5:30, AMiT Kumar wrote: >> >> Hi, >> >> I was trying to explore solvers for multivariate functions in other >> CAS like Maple and Mathematica and Maxima, >> Here is the documentation I found about solvers in Maxima: >> >> https://github.com/andrejv/maxima/blob/master/share/algebra/solver/solver1-en.html >> >> >> I think we need to be very specific about the problem set we are >> going to tackle for 'Multivariate Functions' in the solveset. >> Here are the cases where we encounter Multivariate Functions: >> >> * System of Multivariate Equations: >> This is a lot of work in the Polynomials module, which needs to >> be done, before addressing it in solvers. >> >> * Multivariate Inequalities: >> This can also not be addressed in solvers until we have CAD >> (Cylindrical Algebraic Decomposition), which is itself a GSoC >> Project. >> >> The couple of cases which are in the scope of current discussion are: >> * Multivariate Single Equation with Point solution. >> We can only solve equations which are of the form (x - a)*(y - b)*(z - >> c)*... >> or convertible to this form. >> Though other popular CAS are also not good for solving equations other >> than >> this form. If we don't know the solution we can just return it in terms of >> other >> variables as in next case. >> >> * Multivariate Single Equation with non-point solution. >> In this case, we can output results in the form of the >> other variables: For Example: >> >> In []: solve(x**2 + y**3 == 1, (x, y)) >> Out[]: {x, sqrt(1 - y**3)} # x: arbitrary >> >> Similiar to Wolframalpha: >> http://www.wolframalpha.com/input/?i=solve%28x**2+%2B+y**2+%3D%3D+1%29 >> >> Or else in this case we could have some functionality for curve >> detection (maybe using geometry module), to return information about >> curves in cases like: >> >> In []: solve(x**2 + y**2 == 4) >> Out[]: {Circle, (0, 0), 2} >> >> >> (as Here we know that the output: x = +/-sqrt(y**2 - 1) is not of much >> significance.) >> >> We need not worry much about multivariate, the focus should be more on: >> 1) Solving Transcendental equations, such as 'Equation solvable by >> LambertW. >> 2) Linear Systems (system of linear equations) >> 3) Modularising the current code. >> 4) What else set infrastructure we need. >> >> I would also like to discuss more about the sub-modules in which the >> current solve needs to broken, such as: linear systems, >> transcendental Equations, etc. >> >> AMiT Kumar >> 3rd Year Undergrad >> Delhi Technological University >> www.iamit.in >> >> >> >> >> >> On Friday, February 6, 2015 at 12:08:45 AM UTC+5:30, AMiT Kumar wrote: >>> >>> Hi, >>> I am AMiT Kumar, I would be GSoC Applicant to SymPy this year. I have >>> been following the SymPy Community for quite sometime now and have also got >>> around 11-12 patches Merged in the Code base. So, now, I have got a decent >>> idea of `How things works`. >>> >>> I would like to work on Solvers as Mentioned on the Ideas Page. Last year >>> Harsh Gupta did a very good job by Rewriting the Univariate solvers >>> (solveset.py), I have gone through his work. After having conversation with >>> him and digging into solveset, I got to know there is still a lot of work >>> which needs to be done. >>> >>> I could see a couple of entry points on the Ideas page: >>> https://github.com/sympy/sympy/issues/8725 (I have Merged a PR for this) >>> https://github.com/sympy/sympy/issues/8711 (Replace all internal solve() >>> calls with solveset() ): TODO >>> >>> Things, I would like to implement in solveset includes: >>> >>> Multivariate Equation solving: >>> >>> I think for solving multivariate equations, the order of variables should >>> be given as input, so that we don't need to have a dict as output and we can >>> return Set, as if we automatically detect variables, we need to output the >>> dict of results. >>> >>> Multivariate functions with non point solution: (solvemv) >>> >>> In [0] solveset((x - 1)*(y - 2), (x, y)) >>> Out[1] {{1, arbitrary}, {arbitrary, 2}} >>> >>> or we may return: >>> >>> Out[1] {{1, (-oo, oo)}, {(-oo, oo), 2}} >>> >>> >>> Multivariate functions with point solutions: (solvemv) >>> >>> >>> In [0] solveset(x**2 + y**2, (x, y)) >>> Out[1] {0, 0} >>> >>> Solve System of Equation: (solvesys) >>> (For system of Equation, we can have this): >>> >>> In [0] solveset([x + y == 1, x - y == 0], (x,y)) >>> Out[1] {{1/2, 1/2}} >>> >>> For inequality solver (or for solvers in general) we also need to extend >>> singularities module (though useful in general), so as to prevent getting >>> wrong results, caused due to incorrect simplification of expression, as we >>> saw in this issue: https://github.com/sympy/sympy/issues/8715 , Example: x + >>> 1/x > -2 + 1/x this inequality is written as expr = expr. lhs - expr.rhs , >>> which cancels 1/x and gives wrong result, by including singular point in the >>> solution. >>> inequality solver in solveset currently uses inequalities.py (dependent >>> on solve) (some discussion here: >>> https://groups.google.com/forum/#!topic/sympy/Yp5NqrXmp2U). It is related to >>> the next point below. >>> All internal solve() calls needs to be replaced with solveset() , this is >>> very important for bringing out the solveset from sandbox to eventually >>> replace solve(). (we need to consider the output API (return type) also >>> while replacing). >>> We also need to extend the set - boolean (relational) conversion methods >>> to handle multivariate variables. >>> Complex set Infrastructure is also not there (though I see a WIP PR for >>> that), and yes we also need to see what other set capabilities we need to >>> implement to support various other kinds of solutions. >>> >>> And also other solvers as mentioned on ideas page like 'Equations >>> solvable by LambertW function' also needs to work. >>> >>> I would love to get feedback from the community before presenting my >>> proposal. >>> >>> Cheers! >>> AMiT Kumar >>> 3rd Year Undergrad >>> Delhi Technological University >>> www.iamit.in > > -- > 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+unsubscr...@googlegroups.com. > To post to this group, send email to sympy@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/de89e1e3-d053-439d-bb9a-32777f3a6b80%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sympy@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/CAKgW%3D6KG35grbYwCyk-O62_JGN2TC_fJXurKvmrYxrb3SYDfOQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.