I have a linear equation of the form $m*x - n*y = 0$, where $m, n$ are known rational numbers (integers, terminating decimals, and repeating decimals). How to find the values of $x, y$ that solves the above equation such that they are strictly integers.
If $m = 10, n = 2$, then it is very easy to find $x, y$ whose values will be 1 & 5 respectively. But I don't know how to solve this equation for large numbers, fractional numbers. I used matlab to write a small code to find this using trial & error
length = 100; m = 1440; n = 115.2; x = 1:1:length; mx = m*x; y = mx/n;
Then i look through y array to find the first integer number & that becomes my solution. But how do i do solve it mathematically without this matlab trial & error