Answer the question
In order to leave comments, you need to log in
Who knows algorithms well?
There is this expression:
a + b = a * b
What are the values of a and b?
The answer can be seen immediately - it's two and two. Since a and b are integers, and if we take just a search, then the only value is 2.
2 + 2 = 2 * 2
It doesn’t even take 10 seconds to answer.
But how to write it mathematically? And how to write a iteration cycle programmatically?
Answer the question
In order to leave comments, you need to log in
This is solved analytically.
a + b = a b
a + b - a b = 0
a (1 - b) + b = 0
a = b / (b - 1)
Obviously, this fraction will be an integer only in two cases,
b - 1 = -1, b = 0, a = 0
b - 1 = 1, b = 2, a = 2
The graphical calculator suggests that there are infinitely many solutions, and they lie on two parabolas.
The inclined plane is the sum, the "saddle" is the product. Their intersection is where they are equal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question