How to Solve Equations with Positive Integer Solutions?

  • Thread starter Thread starter aravindsubramanian
  • Start date Start date
Click For Summary
To solve the equation x^2 - y^2 + ax - by = c for positive integer solutions, one can complete the square for both x and y, revealing that the solutions form an ellipse or hyperbola based on the values of a, b, and c. The equation can be rearranged into a product of factors, allowing for the determination of x and y in terms of each other. When both a and b are odd, the factors must be of opposite parity, leading to specific conditions for integer solutions. If a and b are even, x and y must share the same parity, while if they are of opposite parity, the equation can be manipulated to find integer solutions through factoring. Ultimately, verifying that both x and y remain positive is essential in the solution process.
aravindsubramanian
Messages
23
Reaction score
0
I need to solve this kind of equqtions

x^2-y^2+ax-by = c

a,b,c are know.I want to find out x & y.

note:
a,b & c are positive integers

I need only positive x & y pairs in integers.
 
Last edited:
Physics news on Phys.org
Complete the square for both x and y and you will see that the set of points satisfying the equation form either an ellipse or hyperbola depending on the values of a, b and c.If you need to you can compare the equation with one of the standard forms to determine foci, major & minor radii and so forth.

In any case, you can simply solve the given equation or a simplified version of it for either x or y in terms of the other variable and substitute values of one into the solution to find the corresponding values of the other variable.
 
Tide said:
Complete the square for both x and y and you will see that the set of points satisfying the equation form either an ellipse or hyperbola depending on the values of a, b and c.If you need to you can compare the equation with one of the standard forms to determine foci, major & minor radii and so forth.

In any case, you can simply solve the given equation or a simplified version of it for either x or y in terms of the other variable and substitute values of one into the solution to find the corresponding values of the other variable.
Thus we have
(x+a/2)^2 -(y+b/2)^2 = c + (a^2-b^2)/4
(x+a/2-y-b/2)*(x+a/2+y+b/2) = c + (a^2 -b^2)/4
These two factors differ by 2y+b
To reduce typing let s= x+a/2-y-b/2 and t = x+a/2+y+b/2
then t-s=2y+b

Case 1 = b and a are both odd. Then the two factors must be of opposite parity, i.e. x and y are of opposite parity. Let P = the odd part of c+(a^2-b^2)/4 then c+(a^2-b^2) = 2^k*P where k>1. From Euclid's lemma and the fact that the above factors are both integers of opposite parity, there are only two possibilities.
1a s = 2^k*N where N divides P and t = P/N or
2a t = 2^k*N where N divides P and s = P/N
We need only to factor P. As an example, let P = 15 = 1*3*5 then for each of 1a and 2a there are 4 possibilities that have to be eliminated: N=1,3,5,or 15. With each choice y = (t-s-b)/2 from which x can be calculated and we can varify whether or not x and y are both positive.

I think the case where a and b are both even is similar to case 1. However, s and t, i.e. x and y, must be of the same parity

Case 2, a and b are of opposite parity
Multiply both sides by 4 to get
(2x+a-2y-b)*(2x+a+2y+b) = 4c+a^2-b^2 = s*t
here t-s = 4y-2b

This can be rewritten as s*t = P where P is odd, Factor P as N and P/N. For instance let s= 1,3,5,or 15 and t equal 15,5,3,1 respectively for P = 15. The solution continues as for case 1: first solving y = (t-s-2b)/4 and then solving t= 2x+a+2y+b for x.
 
Thread 'How to define a vector field?'
Hello! In one book I saw that function ##V## of 3 variables ##V_x, V_y, V_z## (vector field in 3D) can be decomposed in a Taylor series without higher-order terms (partial derivative of second power and higher) at point ##(0,0,0)## such way: I think so: higher-order terms can be neglected because partial derivative of second power and higher are equal to 0. Is this true? And how to define vector field correctly for this case? (In the book I found nothing and my attempt was wrong...

Similar threads

  • · Replies 23 ·
Replies
23
Views
917
Replies
48
Views
4K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K