Re: Simplifying with assumptions

*To*: mathgroup at smc.vnet.net*Subject*: [mg48986] Re: [mg48949] Simplifying with assumptions*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>*Date*: Fri, 25 Jun 2004 17:52:33 -0400 (EDT)*References*: <200406250658.CAA12398@smc.vnet.net> <9198ADAD-C6AD-11D8-8C1E-000A95B4967A@mimuw.edu.pl>*Sender*: owner-wri-mathgroup at wolfram.com

In my first reply I did not describe how I obtained my answer x = 43; n = 14, because Mathematica played only a fairly minor role in it, but on second thoughts I decided it might be interesting to do so. So here is the mathematical argument with a bit of Mathematica at the end. We are looking for solutions of the Diophantine equation 48 - n^2 + 8*x == m^2 This can be re-written in the form 48+8x ==8(6+x) ==m^2+n^2 There is a following well known theorem: A positive integer is a sum of two squares if an only if all of its prime divisors of the form 4k+3 appear in its prime factorization with even exponents. (e.g. K. Chandrasekharan "Introduction to Analytic Number Theory"). This means that 6+x must have this property. I simply took 6+x = 7^2 ==49 so x =43. So now we need to find integers n and m such that 8*49= n^2 + m^2. Now we can use Matheamtica. Load in the package << NumberTheory`NumberTheoryFunctions` and evaluate: SumOfSquaresRepresentations[2, 8*49] {{-14, -14}, {-14, 14}, {14, -14}, {14, 14}} You can also see at one that there are infinitely many solutions that can be obtained with this method. Andrzej Kozlowski On 25 Jun 2004, at 22:42, Andrzej Kozlowski wrote: > On 25 Jun 2004, at 15:58, Mietek Bak wrote: > >> Hello, >> >> I'm a complete newcomer to Mathematica, so please excuse this possibly >> silly question. >> >> I'm trying to determine if a formula will ever give an integer result, >> assuming that all variables used in it are integer. I've been >> searching >> through the built-in documentation, but my best guess didn't really do >> anything: >> >> Simplify[Element[Sqrt[48 - n^2 + 8*x],Integers],Element[{n, >> x},Integers]] >> >> It would be best if I could somehow determine the set of combinations >> of >> variables that would give an integer result -- if there are any. Is >> there a way to do that in Mathematica? >> >> Thanks in advance, >> Mietek Bak. >> >> >> -- >> desp; >> } >> > > If you want to find just a single solution it is easy: take > x = 43; n = 14; > then > > 48 - n^2 + 8*x > > 196 > > which is just 14^2. I can also prove that there are infinitely many > such solutions. However, I don't think there is any way to solve such > problems in general with Mathematica or any other computer program. > > > Andrzej Kozlowski > Chiba, Japan > http://www.mimuw.edu.pl/~akoz/ >

**References**:**Simplifying with assumptions***From:*"Mietek Bak" <mietek@icpnet.pl>

**Re: Simplifying with assumptions**

**Re: Fourier Transform with Differential Equation**

**Re: Simplifying with assumptions**

**Re: Simplifying with assumptions**