Math Is Fun Forum

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

You are not logged in.

#1 2016-09-28 15:56:49

evene
Member
Registered: 2015-10-18
Posts: 272

Solving a Diophantine Equation

I wound up with this Diophantine equation to solve:

And I would really like to know the solutions

. I would prefer that you list all of the possible answers, because I'm trying out an equation and the more solutions, the better.

Offline

#2 2016-09-28 16:36:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

When you say Diophantine there are two meanings. One, the solutions are are all integers. Two, the solutions are all rational ( fractions and integers ). Which do you mean?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2016-09-29 11:31:25

evene
Member
Registered: 2015-10-18
Posts: 272

Re: Solving a Diophantine Equation

Oh, right. I am looking for integer solutions.

Offline

#4 2016-09-29 11:44:43

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

Hi;

After finding 100000 solutions, I became convinced that there were an infinite number of solutions that have a simple form. This has been verified at least enough to be very sure.  The proof will require a bit of algebra and will come later if you require it.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2016-09-29 14:37:33

evene
Member
Registered: 2015-10-18
Posts: 272

Re: Solving a Diophantine Equation

Can you list some though? I just want a couple of the infinite solutions.

This (I think) is an elliptical curve, so there should be an infinite number of solutions.

Offline

#6 2016-09-29 15:48:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

HI;

You can generate as many as you like

With n = 1, 2, 3, 4...

a = 2 n - 1

b = 0

c = (1/2) (3 + (-1)^( n + 1 ) - 6 n)

There is a closed form for n < 0 too. Also, there is another set for n > 0.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2016-09-29 22:49:34

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

I tried it on C++ for values -200<a,b,c,<200 and got following results.
Surprisingly b has taken only value of 0 in all.

 a      b    c  

   -133    0    199
   -131    0    196
   -131    0    197
   -129    0    193
   -129    0    194
   -127    0    190
   -127    0    191
   -125    0    187
   -125    0    188
   -123    0    184
   -123    0    185
   -121    0    181
   -121    0    182
   -119    0    178
   -119    0    179
   -117    0    175
   -117    0    176
   -115    0    172
   -115    0    173
   -113    0    169
   -113    0    170
   -111    0    166
   -111    0    167
   -109    0    163
   -109    0    164
   -107    0    160
   -107    0    161
   -105    0    157
   -105    0    158
   -103    0    154
   -103    0    155
   -101    0    151
   -101    0    152
   -99    0    148
   -99    0    149
   -97    0    145
   -97    0    146
   -95    0    142
   -95    0    143
   -93    0    139
   -93    0    140
   -91    0    136
   -91    0    137
   -89    0    133
   -89    0    134
   -87    0    130
   -87    0    131
   -85    0    127
   -85    0    128
   -83    0    124
   -83    0    125
   -81    0    121
   -81    0    122
   -79    0    118
   -79    0    119
   -77    0    115
   -77    0    116
   -75    0    112
   -75    0    113
   -73    0    109
   -73    0    110
   -71    0    106
   -71    0    107
   -69    0    103
   -69    0    104
   -67    0    100
   -67    0    101
   -65    0    97
   -65    0    98
   -63    0    94
   -63    0    95
   -61    0    91
   -61    0    92
   -59    0    88
   -59    0    89
   -57    0    85
   -57    0    86
   -55    0    82
   -55    0    83
   -53    0    79
   -53    0    80
   -51    0    76
   -51    0    77
   -49    0    73
   -49    0    74
   -47    0    70
   -47    0    71
   -45    0    67
   -45    0    68
   -43    0    64
   -43    0    65
   -41    0    61
   -41    0    62
   -39    0    58
   -39    0    59
   -37    0    55
   -37    0    56
   -35    0    52
   -35    0    53
   -33    0    49
   -33    0    50
   -31    0    46
   -31    0    47
   -29    0    43
   -29    0    44
   -27    0    40
   -27    0    41
   -25    0    37
   -25    0    38
   -23    0    34
   -23    0    35
   -21    0    31
   -21    0    32
   -19    0    28
   -19    0    29
   -17    0    25
   -17    0    26
   -15    0    22
   -15    0    23
   -13    0    19
   -13    0    20
   -11    0    16
   -11    0    17
   -9    0    13
   -9    0    14
   -7    0    10
   -7    0    11
   -5    0    7
   -5    0    8
   -3    0    4
   -3    0    5
   -1    0    1
   -1    0    2
   1    0    -2
   1    0    -1
   3    0    -5
   3    0    -4
   5    0    -8
   5    0    -7
   7    0    -11
   7    0    -10
   9    0    -14
   9    0    -13
   11    0    -17
   11    0    -16
   13    0    -20
   13    0    -19
   15    0    -23
   15    0    -22
   17    0    -26
   17    0    -25
   19    0    -29
   19    0    -28
   21    0    -32
   21    0    -31
   23    0    -35
   23    0    -34
   25    0    -38
   25    0    -37
   27    0    -41
   27    0    -40
   29    0    -44
   29    0    -43
   31    0    -47
   31    0    -46
   33    0    -50
   33    0    -49
   35    0    -53
   35    0    -52
   37    0    -56
   37    0    -55
   39    0    -59
   39    0    -58
   41    0    -62
   41    0    -61
   43    0    -65
   43    0    -64
   45    0    -68
   45    0    -67
   47    0    -71
   47    0    -70
   49    0    -74
   49    0    -73
   51    0    -77
   51    0    -76
   53    0    -80
   53    0    -79
   55    0    -83
   55    0    -82
   57    0    -86
   57    0    -85
   59    0    -89
   59    0    -88
   61    0    -92
   61    0    -91
   63    0    -95
   63    0    -94
   65    0    -98
   65    0    -97
   67    0    -101
   67    0    -100
   69    0    -104
   69    0    -103
   71    0    -107
   71    0    -106
   73    0    -110
   73    0    -109
   75    0    -113
   75    0    -112
   77    0    -116
   77    0    -115
   79    0    -119
   79    0    -118
   81    0    -122
   81    0    -121
   83    0    -125
   83    0    -124
   85    0    -128
   85    0    -127
   87    0    -131
   87    0    -130
   89    0    -134
   89    0    -133
   91    0    -137
   91    0    -136
   93    0    -140
   93    0    -139
   95    0    -143
   95    0    -142
   97    0    -146
   97    0    -145
   99    0    -149
   99    0    -148
   101    0    -152
   101    0    -151
   103    0    -155
   103    0    -154
   105    0    -158
   105    0    -157
   107    0    -161
   107    0    -160
   109    0    -164
   109    0    -163
   111    0    -167
   111    0    -166
   113    0    -170
   113    0    -169
   115    0    -173
   115    0    -172
   117    0    -176
   117    0    -175
   119    0    -179
   119    0    -178
   121    0    -182
   121    0    -181
   123    0    -185
   123    0    -184
   125    0    -188
   125    0    -187
   127    0    -191
   127    0    -190
   129    0    -194
   129    0    -193
   131    0    -197
   131    0    -196
   133    0    -200
   133    0    -199

{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#8 2016-09-29 23:29:04

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

Hi bobbym,
You could get a closed form which I could not.Can you make it a bit tighter because in many case I get  2 values of c for 1 value of a (b being 0)like (51,0,-77) and (51,0,-76)?


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#9 2016-09-29 23:55:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

Hi;

pappym wrote:

Never bite off more than you can chew.

evene wrote:

Can you list some though? I just want a couple of the infinite solutions.

I gave a closed form for one particular set of solutions. There are other sets. Trying to get a single closed form that describes all the solutions together is going to complicate the structure and might not be possible.
In view of the above quotes...

Can you make it a bit tighter

You mean one parametric equation for all the solutions?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2016-09-29 23:56:51

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

I think

fits well.


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#11 2016-09-30 00:00:29

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

Hmmm, many questions...

You think?
Have you tested that?
Does it get all the solutions?
And why are you asking (post #8) if you think you have the answer already?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2016-09-30 00:37:45

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

I got it after I posted previous one.Somehow one and half times of a + or - 1/2 with sign changed looked fitting the bill.I did not dream of closed solution until I saw your post #6.My output from C++ was blindly posted after checking 2 to 3 values.Your a=2n-1 made me look at the results where a was odd all the time but 2 values of c for same value of a baffled me.Immediately I posted #8 and looked further and managed to get it.Can you see 25 minutes difference between my 2 posts?


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#13 2016-09-30 00:41:30

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

25 minutes is not a lot of time. But I still have the same two questions.

Have you tested that?
Does it get all the solutions?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2016-09-30 00:48:49

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Solving a Diophantine Equation

Hello:

Have you tested that?
Does it get all the solutions?

You are doing what he did. You know the answer before you asked the questions.

The first thing I ever taught you was to never ask a question you didn't already have the answer to. - The Verdict

The verification you showed me 2 hours ago:

b=0;FindInstance[{81a^4-420a^3*b+216a^3*c+882a^2*b^2-756a^2*b*c+216a^2*c^2-732a*b^3+1260a*b^2*c-252a*b*c^2+96a*c^3+271b^4-404b^3+546b^2*c^2+196b*c^3+16c^4-1==0,c!=(-1-3a)/2,c!=(1-3a)/2},{a,c},Integers]

Last edited by ElainaVW (2016-09-30 01:00:59)

Offline

#15 2016-09-30 00:51:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

Hi;

I did not see you there...

You knew the answer before you asked the questions.

Maybe and maybe not.

Nifty code, ain't it?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2016-09-30 00:54:44

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Solving a Diophantine Equation

smile You should like it, it's yours! sad

I'm hungry. sad

Offline

#17 2016-09-30 00:56:38

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

I suppose that code up there yields {}?

I am hungry too and I must go shopping.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#18 2016-09-30 00:59:41

ElainaVW
Member
Registered: 2013-04-29
Posts: 580

Re: Solving a Diophantine Equation

The old man in the forum wrote:

I suppose that code up there yields {}?

You know it!

Offline

#19 2016-09-30 01:03:58

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

EVW wrote:

You know it!

happy-jump-happy-animation-animated-smiley-emoticon-000360-large.gif

Nice solution thickhead.

123518lvuy3rkxxr.gif


@EVW, I am almost done with my new stylesheet, I have emailed it to you.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#20 2016-09-30 02:27:21

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

bobbym wrote:

25 minutes is not a lot of time. But I still have the same two questions.

Have you tested that?
Does it get all the solutions?

From C++ I have only tried a,b,c from -200 to >200 i.e. whatever data I have shown from the output file.
I have not tested all the data for the formula.As I told you I glanced over the data for  c to be 3/2 times a and +/- 1/2 with changed sign. True for -ve n also.When you get the idea it does not take even 5 minutes but the question is when? I got the results from C++ yesterday itself but could not post the data because I had to revisit the operation of output files.cout<< results could not be copied.Instaed of "int" I had to use "long" not only for the total but also for a,b and c after encountering some spurious results some of which I could test in excel.

Last edited by thickhead (2016-09-30 02:32:05)


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#21 2016-09-30 05:05:53

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

Hi bobbym,
I tried larger values in excel sheet.n>1234 does not work. I can not go in detail now.Already too late for bed.


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#22 2016-09-30 11:46:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

I can not go in detail now

It is working fine for numbers that size and larger. It has already been proved in post #14 with M.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2016-09-30 16:25:45

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

I was checking in microsoft excel and encounterd the following. The last column is the value of expression when a,b,c values are substituted.

a	b	c=(1-3a)/2 and (-1-3a)/2 alternately.	81a^4-420a^3b+216a^3c+882a^2b^2-756a^2bc+216a^2c^2-732ab^3+1260ab^2c-252abc^2+96ac^3+271b^4-404b^3+546b^2c^2+196bc^3+16c^4-1
2463	0	-3694	0
2463	0	-3695	0
2465	0	-3697	0
2465	0	-3698	0
2467	0	-3700	0
2467	0	-3701	0
2469	0	-3703	-1
2469	0	-3704	-1
2471	0	-3706	-1
2471	0	-3707	-1
2473	0	-3709	-1
2473	0	-3710	-1
2475	0	-3712	-1
2475	0	-3713	-1
2477	0	-3715	-1
2477	0	-3716	-1
2479	0	-3718	-1
2479	0	-3719	-1
2481	0	-3721	-1
2481	0	-3722	-1
2483	0	-3724	-1
2483	0	-3725	-1
2485	0	-3727	-1
2485	0	-3728	-1
2487	0	-3730	-1
2487	0	-3731	-1
2489	0	-3733	-1
2489	0	-3734	-1
2491	0	-3736	-1
2491	0	-3737	-1
2493	0	-3739	-1
2493	0	-3740	-1
2495	0	-3742	-1
2495	0	-3743	-1
2497	0	-3745	-1
2497	0	-3746	-1
2499	0	-3748	-1
2499	0	-3749	-1
2501	0	-3751	-1
2501	0	-3752	-1
2503	0	-3754	-1
2503	0	-3755	-1
2505	0	-3757	-1
2505	0	-3758	-1
2507	0	-3760	-1

However C++ gave no problem. Probably it has something to do with the precision of excel limited to 15 digits.

Last edited by thickhead (2016-09-30 16:59:33)


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#24 2016-09-30 17:51:14

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Solving a Diophantine Equation

excel limited to 15 digits.

(2469,0,-3703) and (2469,0,-3704) are both correct. Excel is not for serious work.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2016-09-30 19:49:47

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Solving a Diophantine Equation

Yes bobby. You are right.
After putting b=0 I got


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

Board footer

Powered by FluxBB