RE: Simplifying with assumptions

• To: mathgroup at smc.vnet.net
• Subject: [mg48980] RE: [mg48949] Simplifying with assumptions
• From: "Simons, F.H." <F.H.Simons at tue.nl>
• Date: Fri, 25 Jun 2004 17:52:23 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com
• Thread-topic: [mg48949] Simplifying with assumptions

```Mietek,

It does not look like a silly question! Maybe an analytical solution for this problem exists, but here are some Mathematica commands that will give you some solutions.

I rewrite your problem in the following form:

In[1]:=
eq  = 48 - n^2 + 8*x==m^2
Out[1]=
48 - n^2 + 8*x == m^2

Mathematica can rewrite the equation

In[2]:=
Reduce[eq,{n,m,x}]//Simplify
Out[2]=
m^2 + n^2 == 8*(6 + x)

So x has to be at least -6.

Here are some solutions:

In[3]:=
Table[{x,
Reduce[eq&& m\[GreaterEqual]0&&n\[GreaterEqual]0,
{n,m}, Integers]}, {x,-6, 10}];
DeleteCases[%, {_, False}]

Out[4]=
{{-6, n == 0 && m == 0},
{-4, n == 0 && m == 4 ||
n == 4 && m == 0},
{-1, n == 2 && m == 6 ||
n == 6 && m == 2},
{2, n == 0 && m == 8 ||
n == 8 && m == 0},
{4, n == 4 && m == 8 ||
n == 8 && m == 4},
{7, n == 2 && m == 10 ||
n == 10 && m == 2}}

Maybe this is of some help for you.

Regards,

Fred Simons
Eindhoven University of Technology

> -----Original Message-----
> From: Mietek Bak [mailto:mietek at icpnet.pl]
To: mathgroup at smc.vnet.net
> Sent: vrijdag 25 juni 2004 8:58
> To: mathgroup at smc.vnet.net
> Subject: [mg48980] [mg48949] Simplifying with assumptions
>
>
> 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?
>
> Mietek Bak.
>
>
> --
>     desp;
> }
>
>

```

• Prev by Date: Re: Fourier Transform with Differential Equation
• Next by Date: Re: Simplifying with assumptions
• Previous by thread: Re: Simplifying with assumptions
• Next by thread: Re: Simplifying with assumptions