1 equation, 2 unknowns, need integer solution

In summary, Wolfram Alpha provided an integer solution for a single equation with two unknowns when typed into the program. x and y can be found by various methods, and the -5x + -5y = -5 is the only solution that is within the acceptable range.
  • #1
Fellowroot
92
0

Homework Statement



I needed to solve this single equation with two unknowns.

199x - 98y = -5

0< x <=99
0< y <=99

I typed the equation into Wolfram Alpha and got an integer solution of:

x = 98n + 31
y = 199n +63 when n is an integer

Since I know my restriction on x and y I can conclude that my solution is:

x = 31
y = 63 when n = 0

My question is, how do I obtain that integer solution that Wolfram Alpha gave me?

[edit, changed the + to a - sign from an error Ray Vickson pointed out, thanks.]
 
Last edited:
Physics news on Phys.org
  • #2
Fellowroot said:

Homework Statement



I needed to solve this single equation with two unknowns.

199x + 98y = -5

0< x <=99
0< y <=99

I typed the equation into Wolfram Alpha and got an integer solution of:

x = 98n + 31
y = 199n +63 when n is an integer

Since I know my restriction on x and y I can conclude that my solution is:

x = 31
y = 63 when n = 0

My question is, how do I obtain that integer solution that Wolfram Alpha gave me?

There is something wrong with your question. If x and y are integers >= 1, then 199x + 98y is >= 207, so can't be equal to -5.

RGV
 
  • #3
Ray Vickson said:
There is something wrong with your question. If x and y are integers >= 1, then 199x + 98y is >= 207, so can't be equal to -5.

RGV

Sorry, it was supposed to be:

199x - 98y = -5
 
  • #4
How about solving for y and then graphing it, and looking for where the line crosses two integers?
 
  • #6
Since the GCD of 99 and 198 is 1, there are integers x and y such that

99 x + 198 y = 1

You can find x and y by several methods, such as the Extended Euclidean Algorithm

http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm

Then 99 (-5x) + 198 (-5y) = -5

That gives you one solution, not necessarily in the acceptable range, but maybe you can use that to find others.
 
  • #7
Its a common linear diophantine equation. Go search for it :)
 

1. What is the equation for finding a solution with one equation, two unknowns, and an integer solution?

The equation for finding a solution with one equation, two unknowns, and an integer solution is typically a linear equation in the form of Ax + By = C, where A and B are coefficients and x and y are the unknown variables.

2. How do you solve an equation with one equation, two unknowns, and an integer solution?

To solve an equation with one equation, two unknowns, and an integer solution, you can use a variety of methods such as substitution, elimination, or graphing. The most appropriate method will depend on the specific equation and the given information.

3. What is the significance of having an integer solution in this type of equation?

An integer solution in this type of equation means that the values for the unknown variables will be whole numbers, rather than fractions or decimals. This can often make the solution more meaningful and easier to work with in real-world situations.

4. Are there any special techniques for solving equations with one equation, two unknowns, and an integer solution?

Yes, there are some specific techniques that can be used for solving equations with one equation, two unknowns, and an integer solution. For example, the method of diophantine equations is commonly used for finding integer solutions to linear equations.

5. Can an equation with one equation, two unknowns, and an integer solution have multiple solutions?

Yes, an equation with one equation, two unknowns, and an integer solution can have multiple solutions. In fact, there can be an infinite number of solutions if the equation is not fully constrained. This means that there are multiple combinations of integer values for the variables that will satisfy the equation.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
6
Views
465
  • Precalculus Mathematics Homework Help
Replies
20
Views
1K
  • Precalculus Mathematics Homework Help
Replies
20
Views
1K
  • Precalculus Mathematics Homework Help
Replies
10
Views
1K
  • Precalculus Mathematics Homework Help
2
Replies
35
Views
4K
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • General Math
Replies
3
Views
1K
  • Precalculus Mathematics Homework Help
Replies
12
Views
2K
Replies
2
Views
1K
Back
Top