SymPy

Shekhar Prasad Rajak (@shekharrajak)

 

GSoC 2016 - Solvers: Completing Solveset

 

  • ​​Open Source Python Library
  • For Symbolic Computation
  • Written entirely in Python
  • No dependency except mpmath

What is SymPy?

Study and development of algorithms and software

for manipulating mathematical expressions and other

mathematical objects.

Symbolic Computation

Symbolic vs Numeric?

  • Symbolic:  π
  • Numeric:  3.14159265359

● Standalone

● Full featured

● BSD licensed

● Embraces Python

● Usable as a library

Why SymPy? 

Provide a symbolic manipulation library in Python.

- en route to a full featured computer algebra system

Goal

Ondřej Čertík started the project in 2006.

● Lot of work was done in Google Summer of Code 2007.

● Participated in every GSoC for last 9 years.

Aaron Meurer took over as a lead developer on Jan 4, 2011.

History

Features

Features

Small Package

Huge Capabilities!

< 5 MB

Statistics

  • Over 400 Contributors
  • Half a million lines of code & docs
  • 2700+ Stargazers on github repository
  • 1400+ forks
  • 200+ watchers
  • 60,000+ Monthly downloads on PyPi
  • 300+ Open Pull requests
  • 53 releases, Latest: SymPy 1.0! 

Google Summer of Code 2016

 

Solvers: Completing Solveset

Solvers

  • solves equations and systems of equations
  • polynomial
  • transcendental
  • piecewise combinations
  • systems of linear and polynomial equations
  • systems containing relational expressions.
  • Became unreadable code and little to extend

Solveset

  • cleaner input and output
  • infinitely many solutions using ImageSet
  • soln in complex domain and real domain
  • soln in Set(s).
  • soln may have Intersection, Union.

Non linear solver for solveset

  • Solve system of N non linear equations with M variables

  • Solves Positive dimensional system

  • non polynomial equation using substitution method

  • real and complex solutions

Improved Trigonometric Equation Solver

  • Defined ImageSet union
  • Improved trig solver: Fixes many bugs
  • Factoring the complicated trig equation if possible and solving each factor
  • Hyperbolic functions solver

Solution in Integer domain

  • solveset can solve equaions in Real, Complex domain
  • Diophantine : To get soln in Integer domain
  • solveset_integer is defined to get soln in Z
  • Soln can be in FiniteSet, ImageSet, EmptySet

Other works

  • Improved `diophantine` method to get missing solution
  • Improved `factor` method for trig expressions
  • Worked on `eliminate` method

Contribution before GSoC period

  • Active contributor since Sept 2015
  • Worked on around 30+ issues of different SymPy modules
  • Opened 50+ patches till GSoC'16
  • Reported 15+ issues

More details

Thank You!

Github : @shekharrajak