Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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
The simplest linear Diophantine equation takes the form
,
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.
@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.
спасибо виктор,
In Mathacd 11:
Luc
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.
No, isolve not work in MC15. It was an undocumented symbolics command in Mathcad 11.