-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RootFinding GSOC project #1192
RootFinding GSOC project #1192
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1192 /- ##
==========================================
Coverage 77.07% 79.42% 2.34%
==========================================
Files 32 46 14
Lines 3533 4626 1093
==========================================
Hits 2723 3674 951
- Misses 810 952 142 ☔ View full report in Codecov by Sentry. |
@n0rbed thank you very much for making the PR. I will add some comments. |
…loat as it is, also removed trig unused func
…into RootFinding
…into RootFinding
Hello! this is a PR concerning the GSOC project "RootFinding for Symbolics.jl" which you can check more details about here. The aim of this project is to add the solve function to Symbolics.jl for solving equations symbolically. The supervisors of this project are @sumiya11 and @shashi.
Feel free to try the solver out yourself. Comments and suggestions are very welcome.
There are 2 issues in this PR regarding licenses: (1) Nemo.jl may be not LGPL v3 compatible, we are working on it. (2) Groebner.jl is GPL, so it goes into an extension.
Prior to this PR, all work and progress was carried out here
Currently, there are 4 available solvers which are grouped under one function, solve.
solve_univar
solve_multipoly
solve_multivar
ia_solve
To give you an idea of what these solvers are capable of, here are some examples:
solve_univar
(uses factoring and analytic solutions up to degree 4)solve_multivar
(uses Groebner basis andsolve_univar
to find roots)solve_multipoly
(uses GCD between the input polys)ia_solve
(solving by isolation and attraction)This function attempts to follow the PRESS system in [1]. It first checks the number of occurrences, then uses isolate or attract as needed.
attract(lhs, var)
currently uses 4 techniques for attraction.log(f(x)) log(g(x)) => log(h(x))
a*b^(f(x)) c*d^(g(x)) => f(x) * log(b) - g(x) * log(d) log(-a/c)
.sin(x 2)^2 sin(x 2) 10
is converted toX^2 X 10
.issue #866 😉
Issues solved
issue #1115
issue #961, similarly, issue #525 and #524 are also solved
issue #424
Difficulties faced
Whilst developing the polynomial solvers, complex numbers and domains were found to cause problems in multiple aspects of our results. First, sqrt needed another complex() inside of it if the integer is negative, say
sqrt(-2)
does not work,sqrt(complex(-2))
works. Cbrts however, dont support complex nums, so you'll have to do(complex(1))^(1/3)
if you wanna compute the cuberoot of1 0im
. Substituting variables by complex numbers also caused bugs. To solve this, included in the filesolve_helpers.jl
andia_helpers.jl
are helper functions such asssubs
,ssqrt
,scbrt
, andslog
which handle all these cases themselves so that the output is nice and tidy, and that the program at runtime does not need to evaluate whatever is in a square root for example to check if its inside our domain or not.Documentation
There's an in depth documentation here which covers the first 3 solvers in depth since they were not mentioned here. Some parts of this documentation may be outdated though, so do be careful since functions may have been renamed or altered slightly.
References
[1]: R. W. Hamming, Coding and Information Theory, ScienceDirect, 1980.