# How to find all the positive integral solutions of $5x+7y=100$?

How to find the number of all the positive integral solutions and the solutions itselves of $$5x+7y=100?$$

• $5|100$ what you may conclude from this observation? – Stephen Dedalus Jan 13 '14 at 11:31
• You said "positive integral values". Your equation tells a lot. What did you try ? – Claude Leibovici Jan 13 '14 at 11:33
• You should later post a question about solving $5x+7y=101$ so that we can explain the whole method of solving equations $ax+by=c$ in the integers. – user119256 Jan 13 '14 at 11:42
• Then $5 \cdot 3 + 7 \cdot (-2) = 1$ might help – Blah Jan 13 '14 at 12:41

positive integral means that positive and integer right?because $5$ and $7$ are coprime,that means that $100$ is represented by sum of two number,which one of them is divisible by $5$ and $7$,one of possible solution is $30+70$,which is equal to exactly $100$, or $x=6$ and $y=10$,could you found others?

EDITED:

second is just $35+65$

there $35$ is divisible by $5$ and $7$

that means that $y=5$ and $x=13$

generally $x=(100-7*y)/5$

how much positive integer of $y$ is so that $(100-7*y)$ is divisble by $5$ and leaves $x$ positive?

clearly $y$ is positive number,which is multiply of $5$

• Is there infinitely many such $x,y?$ – user113578 Jan 13 '14 at 11:40
• How to find all the positive integral solutions of:is there infinity positive numbers which satisfy it?also positive and integer? – dato datuashvili Jan 13 '14 at 11:41
• thanks very much,good lucks – dato datuashvili Jan 13 '14 at 11:45

Assume we have $5x+7y=100$. Let us solve for the variable with the smallest coefficient $x=20-\frac{7y}{5}$. This means that $\frac{7y}{5}$ is integer. Therefore $y=5y_2$ for some integer $y_2$.

Plugging this into the original equation we get $x=20-7y_2$. You see now, that for every integer you put in $y_2$ you get an integer value for $x$, and an integer value for $y=5y_2$ that satisfy the equation $5x+7y=100$.

Since we want positive solutions you can put $y_2>0$ such that $20-7y_2>0$, i.e. $20/7>y_2$. So, $0<y_2\leq 2$.

We have then two possibilities: $y_2=1$ or $y_2=2$, for which we get $y=5$, or $y=10$ respectively. The corresponding values for $x$ are $x=13$, or $6$.

Given $$5x+7y=100$$ also $x\ge0$ and $y\ge0$ie you get the inequalities $$5x\le100$$ or $$x\le20$$ similarly $$y\le14.28$$ Now $$x=\frac{100-7y}{5}$$ which means $5$ divides $7y$. The only values satisfying for $y$ are $$y=0,5,10$$ and is then bounded by the inequality.

• how do you insert greater than or equal to in latex. please help me. – Suraj M S Jan 13 '14 at 11:54
• I have edited your post to include $\le$, $\ge$. For some basic information about writing math at this site see e.g. here, here, here and here. I find personally the list of symbols on Wikipedia very useful when looking for a particular symbol. – Martin Sleziak Jan 13 '14 at 12:35
• You just type \le for $\le$ and \ge for $\ge$ 8for @surajM.S – Umberto Jan 13 '14 at 12:53

Hint $\$ Since $\,5x+7y\,$ is linear in $\,x,y,\,$ the general solution of $\,5x+7y=100\,$ is the sum of any particular solution, e.g. $\,(x,y)=(20,0),\,$ plus the general solution solution of the associated homogeneous equation $\,5x+7y = 0,\,$ which is $\,(x,y)=(-7n,5n).\,$ Summing them gives the general solution $\,(x,y) = (20,0)+(-7n,5n) = (20-7n,5n).\,$ Now $\,5n > 0\!\iff\! n\ge 1,\,$ and $20-7n>0\!\iff\! n\le2.$

$5x+7y=100~\implies 5|y$
$y$ is limited to 14 on the upper side. So, we are left with only $y=5,10$
When,$y=5$,we can have a solution,i.e.,$x=13$
Also,$y=10$,we can have a soluton,i.e.,$x=6$

$5x \gt0$ so $x=1,2,3,4,5,\ldots$ careful about $5x$ and 100 both are 5q ---> so 7y must be 5K too then put $y=0,5,10$ (not more because $7y$ must be less or equal to $100$)
so check them to find $x$

Since $5 \mid 100$, we know that $5$ must divide $5x +7y$ and that therefore $5$ must divide $7y$. Since $5$ and $7$ are coprime, only multiples of $5$ as $y$ will suffice, and since $15 \cdot 7>100$ and both $x,y$ are integral and positive, only $y=5,10$ are solutions.

We have now shown that $(13,5)$ and $(6,10)$ are the only solutions.

Edit: $(20,0)$ can also be a solution if you consider $0$ a positive number

As $(5,7)=1$ we would definitely have some $x,y\in \mathbb{Z}$ such that $5x+7y=1$

we see that $5(3)+7(-2)=1$ i.e., $5(300)+7(-200)=100$

Now if $ax_1+by_1 = c$ is any solution, then all solutions are of the form $$x = x_1 - r\frac{b}{\gcd(a,b)},\qquad y = y_1 + r\frac{a}{\gcd(a,b)}$$ we have $(5,7)=1$ so any solution would be of the form

$x=300-7r$ and $y=-200+5r$

We want solutions to be positive which means that we want $7r<300$ and $5r>200$

i.e., $r<43$ and $r>40$ i.e., $r\in \{41,42\}$

For $r=41$ we would have :

$x=300-287=13; y=-200+215=5$ i.e., $(x,y)=(13,5)$

For $r=42$ we would have :

$x=300-294=6; y=-200+220=10$ i.e., $(x,y)=(6,10)$

So, only positive solutions are $(13,5)$ and $(6,10)$.

If you consider $0$ to be positive then $(20,0)$ would also be a solution you are looking for

Thank you for pointing out my mistake, postmortem. Through diophantine equation, I get

$$x = 300 -7r,$$ for all $$r-$$ integers, $$y = -200 +5r$$

To solve the inequalities above. So, to get the positive solution, for the above inequalities,

we need to set certain boundaries such that, $$r\ge40$$ , and $$r<42$$,

sorry for my mistake, due to I am having fever. Thank you so much for pointing out my mistake.

• Welcome to Mathematics Stack Exchange! A quick tour will enhance your experience. Here are helpful tips to write a good question and write a good answer. For equations, please use MathJax. – dantopa Jun 4 at 16:34
• Okay thanks alot, dantopa. I will learn to use it. – Alyaa Ashraf Jun 4 at 16:58
• These edits should help. Again, welcome. – dantopa Jun 4 at 16:59