Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2021-01-28 21:34:06

sonu1997
Guest

Brute force for diophantine equation

Hey bro can you plz help me to find out a solution to the following equation
                 2x³+6xy²-114=z³
I tried many ways but failed only way left is using brute force.
And unfortunately I'm not a coder? so asking your help.
So plz help me

#2 2021-01-31 09:53:37

irspow
Member
Registered: 2005-11-24
Posts: 1,055

Re: Brute force for diophantine equation

Don’t feel bad. I was leery when I saw the trailing constant of 114 which has no rational cube root. Just for kicks I threw that equation into mathway and wolfram alpha, the two giants of online calculators. Neither of them could produce any rational solutions for z much less an integer.


I am at an age where I have forgotten more than I remember, but I still pretend to know it all.

Offline

#3 2021-02-01 15:46:04

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,866

Re: Brute force for diophantine equation

Hi sonu1997 & irspow;

I also tried, and failed...but that doesn't mean much! dizzy

I wonder if the equation's been entered correctly, though.

The reason I ask is that in case the trailing constant (which I'll call 'c') happens to be wrong, I tried a range of alternatives for c...with some success:

Using Mathematica, I found 31 solutions for {x,y,z}, subject to the following constraints:

1. x = between -100 & 100
2. y = between -100 & 100
3. c = between 100 and 999, containing at least two digits of the OP's '114' in their correct positions (in case c contains just one incorrect digit).

Three examples of my solutions:
(a) x = 7, y = ±48, z = 46, c = 118
(b) x = 10, y = ±69, z = 66, c = 164
(c) x = 5, y = ±4, z = 6, c = 514


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#4 2021-02-01 22:27:03

sonu1997
Member
Registered: 2021-01-28
Posts: 6

Re: Brute force for diophantine equation

irspow wrote:

Don’t feel bad. I was leery when I saw the trailing constant of 114 which has no rational cube root. Just for kicks I threw that equation into mathway and wolfram alpha, the two giants of online calculators. Neither of them could produce any rational solutions for z much less an integer.

No it's ok atleast you tried though. The solution happens to be very difficult

Offline

#5 2021-02-01 22:30:26

sonu1997
Member
Registered: 2021-01-28
Posts: 6

Re: Brute force for diophantine equation

phrontister wrote:

Hi sonu1997 & irspow;

I also tried, and failed...but that doesn't mean much! dizzy

I wonder if the equation's been entered correctly, though.

The reason I ask is that in case the trailing constant (which I'll call 'c') happens to be wrong, I tried a range of alternatives for c...with some success:

Using Mathematica, I found 31 solutions for {x,y,z}, subject to the following constraints:

1. x = between -100 & 100
2. y = between -100 & 100
3. c = between 100 and 999, containing at least two digits of the OP's '114' in their correct positions (in case c contains just one incorrect digit).

Three examples of my solutions:
(a) x = 7, y = ±48, z = 46, c = 118
(b) x = 10, y = ±69, z = 66, c = 164
(c) x = 5, y = ±4, z = 6, c = 514


Hlo phrontister,
Thanks for your efforts but let me tell you it is suspected that the magnitude of the solution is extremely large may be more than 15 digits so I'm sure you will never find any solution in between the range -100 ad 100 or even millions?
If you don't mind can I mail you?

Last edited by sonu1997 (2021-02-01 22:35:15)

Offline

#6 2021-02-02 00:09:25

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,866

Re: Brute force for diophantine equation

Thanks, sonu1997, but I'll quit now.

I ran my brute force Mathematica code all last night and most of today for no results with x=0 to 1,000,000, y=0 to 1,000,000, c=114.

That was enough for me, and so I put the computer out of its misery and aborted the process midstream. I don't know how far into the computation I did that.

The whole exercise was taking up too much processing time with no reward to maintain my interest - sorry.

Btw, to find z, I was testing whether or not (2x³+6xy²-114)^(1/3) was an integer.

With my clunky nested 'For' loop code, that strategy worked quite well for smallish values of x and y, so I thought I'd try it on the above-mentioned larger x and y, not realising it would take forever.

I don't know Mathematica well enough to write efficient code, which it seems is needed to solve your problem in a reasonable time.

I hope someone can help you more!

Last edited by phrontister (2021-02-06 10:41:51)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#7 2021-02-02 04:08:45

sonu1997
Member
Registered: 2021-01-28
Posts: 6

Re: Brute force for diophantine equation

Thanks a lot
But can I send you a msg in your mail to discuss more about coding and brute force? If you don't mind

Offline

#8 2021-02-02 12:06:20

phrontister
Real Member
From: The Land of Tomorrow
Registered: 2009-07-12
Posts: 4,866

Re: Brute force for diophantine equation

sonu1997 wrote:

But can I send you a msg in your mail to discuss more about coding and brute force? If you don't mind

Sorry, sonu1997, but I'll decline your invitation.

I suggest you provide some more info for general discussion here, which could generate more interest in the thread and maybe even an outcome.

Btw, here's my code:

My clunky general code just uses Mathematica as the vehicle...

EDIT: Included a True/False check in my second code

Last edited by phrontister (2021-02-10 14:00:38)


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." - Ted Nelson

Offline

#9 2021-02-02 20:42:40

sonu1997
Member
Registered: 2021-01-28
Posts: 6

Re: Brute force for diophantine equation

Thank you for your kind reply ?

Offline

#10 2022-04-10 13:55:58

pi_cubed
Member
From: A rhombicosidodecahedron
Registered: 2020-06-22
Posts: 115

Re: Brute force for diophantine equation

This is an old thread, but maybe the methods in these posts that I found could help (basically transforming the equation into a elliptic curve, and using rational points on the curve to find other rational points which will eventually lead to a integral point).
https://mlzeng.com/an-interesting-equation.html
https://www.quora.com/How-do-you-find-t … Alon-Amit/

Last edited by pi_cubed (2022-04-11 02:10:50)


pi³

Offline

#11 2023-02-04 21:34:08

fakal
Novice
Registered: 2023-02-04
Posts: 2

Re: Brute force for diophantine equation

Yes why not if you would like to find out a solution to the following equation
                 2x³+6xy²-114=z³
Use Mathway to solve it
Thanks me later

Offline

Board footer

Powered by FluxBB