cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Diophantic linear Equations

vlehner
13-Aquamarine

Diophantic linear Equations

Good morning to all,

currently i'm dealing with the theory of numbers where i have to find the solutions of a linear diophantic equation in common.

Is there any way in MP4 to call up a function for this problem, does there exist an implemented function in Prime for this?

Thanks in Advance

Volker

Volker
6 REPLIES 6

The simplest linear Diophantine equation takes the form

ax + by = c,

where a, b and c are given integers, x, y — unknowns.

The solutions are completely described by the following theorem: This Diophantine equation has a solution (where x and y are integers) if and only if c is a multiple of the greatest common divisor of a and b. Moreover, if (x, y) is a solution, then the other solutions have the form (x + kv, y - ku), where k is an arbitrary integer, and u and v are the quotients of a and b (respectively) by the greatest common divisor of a and b.To find the solution one can use Extended Euclidean algorithm (except for a = b = 0 where either there are unlimited number of solutions or none).

 

Mathcad has a gcd function that will determine greatest common divisor.  gcd(a,b)

You can determine if c is a multiple by testing the mod function for zero return. mod(c,gcd(a,b))=0 is pass

You could program to search for them.

 

 

 

So in summary i have to programm a routine because of the fact that there is no special function in MP4 for this.

THX anyway.

 

Volker
ViktorKorobov
13-Aquamarine
(To:vlehner)


@vlehner wrote:

So in summary i have to programm a routine because of the fact that there is no special function in MP4 for this.

THX anyway.

 


File in Mathcad Prime 3.1 format attached.

Diophantine.png

 

Viktor
LucMeekes
23-Emerald III
(To:ViktorKorobov)

спасибо виктор,

In Mathacd 11:

LM_20170927_IntegerSolve.png

 

Luc

vlehner
13-Aquamarine
(To:LucMeekes)

Thanks Victor and Werner.

I tryed to run isolve() in MC15, and it will not work. Is it possible to run this function in MC15?

I have not the good old MC11.

 

Volker
ViktorKorobov
13-Aquamarine
(To:vlehner)

No, isolve not work in MC15. It was an undocumented symbolics command in Mathcad 11.

Viktor
Announcements

Top Tags