On Sat, Jan 7, 2012 at 5:29 AM, Hans W. Hofmann <hawe at chefmail.de> wrote:
> Hi,
>
> I want to find values x to make
>
> [p1=-(4*x-300)/11,p2=-(35*x-1800)/44]
>
> p1 and p2 integer. How to do this in maxima?
>
>
Not sure if this is the best approach, but here is one way.
solve(p1=(4*x-300)/11,x)
solve(p2=(35*x-1800)/44,x);
This gives two equations for x. Make them equal so we get an equation in
p1 and p2, where p1 and p2 are integers. This is a Diophantine equation.
A Google search shows that someone posted a Diophantine equation solver,
but I can't find the code right now. If I do it by hand, I get x =
44*r+64, where r is any integer. This gives p1 = 16*r+4 and p2 = 35*r+10.
Ray