Question: How do I solve a diophantine equation in Maple?

I'd like to solve 178x + 312y = 14

I tried:

a=178,b=312:
c=igcdex(a,b,'e','f');
14/c*e=x;14/c*f=y;

But Maple wouldn't solve this, so I did

c=igcdex(178,312,'e','f');
14/c*e=x;14/c*f=y;

This gave x = 145 en y = -103, while according to the answers it should be x = -49 en y = 28.

145*178-103*312 is NOT 14, so something does indeed go wrong.

 

Can Maple solve this even better? Like in one go, with 178,312,x,y and 14 in one argument?

 

 

Please Wait...