Hi, I would like to implement a Diophantine equations module for Sympy.
You can find my pull request here <https://github.com/sympy/sympy/pull/2024>. 
It's still not merged.

I hope to solve following classical Diophantine equations. All the 
variables and constants
used here are integers.

1)* **a1x1 + a2x2 + a3x3  + ...+ anxn = b* (Linear diophantine equation)
Here *a1, **a2, ... **an* and b are constants.If solvable (there is a 
condition to determine this), 
solving this equation means expressing any two variables using other 
variables and an 
arbitrary integer* *n. i.e. solution is given by
x1 = x1, x2 = x2, ... xn-2 = xn-2 , xn-1 = f( x1, x2, ... xn-2, n), xn-1 = 
g( x1, x2, ... xn-2, n)
f and g are functions to be determined. 

2) x12 + x22 + x32 + ... xn2 = k
Here k is a non-negative constant. There will be a number of solutions 
depending on
n and k. Solving this means assigning constants  *a1, **a2, ... **an* to x*i
*'s respectively.                   

3) x12 + x22 + x32 + ... xn2 = xn+12 (extension of Pythogorean equation)
Solving this is pretty standard. There is a general primitive solution set 
using n relatively
prime integers. All other solutions can be obtained by multiplying those 
equations by 
an arbitrary integer.

4) x2 + axy + y2 = z2
Here a is a constant. If z is a variable, a general solution can be given 
to this equation
using a and three arbitrary integers. If z is a constant actual solutions 
can be given.

5) x2 - Dy2 = m2 (Pell's equation)   
Here D and m are constants. This has either no solution or infinitely many 
solutions.
ax2 - by2 = 1 and ax2 + bxy + cy2 + dx + ey + f = 0 can also be solved with the 
light
of Pell's equation.

Lot of Diophantine equations can be converted to one of these forms. Addition 
of this kind
a module will be a huge enhancement for Sympy. I would like to know how I 
can improve
this. Thanks in advance.
                              
                   

References
[1] An Introduction to Diophantine Equations*,  Andreescu*, Titu, *Andrica*, 
Dorin, *Cucurezeanu*, Ion 
[2] http://mathworld.wolfram.com/DiophantineEquation.html 
[3] http://en.wikipedia.org/wiki/Diophantine_equation

Regards,
Thilina Rathnayake.

-- 
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?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to