# Solve system of equations with additional conditions in sage

Hi Sage users,

I've got a system of equations like the following example:

**eq1 = a + b == n * (c + d)****eq2 = b == k * d**

with n and k must be integers.

for the other variables, there are additional conditions like

**a >= 80****b >= 1000****c >= 20****d >= 40****a + b <= 2000****c + d <= 90**

I want to get all solutions of this system where n and k are integers. Is there a way to find these with sage?

Would be great to get any possible hint to do this!

Thanks for your suggestions, Tobi

For eqn1, there is an obvious upper and lower bound for n, and for each choice of n in this range, you will have 1 equation in four unknowns to determine a,b,c,d (in addition to the constraints). Once you decide on b, you can choose k freely, and this will determine e. What sort of answer are you hoping to get?

Hi, sorry- my mistake - I wrote eq2 = b == k * e where eq2 = b == k * d should stand. Does it make more sense for you this way? Thanks, Tobi