0
$\begingroup$

This quadratic di equation has more results, as it came to them.

I can only think of this

FindInstance[(4 p + 3 q - 2) (p - 1) == (6 p + 2 q) q, {p,  q}, Integers]
$\endgroup$
1
  • $\begingroup$ You can add a number at the end of FindInstance to request more solutions: FindInstance[(4 p + 3 q - 2) (p - 1) == (6 p + 2 q) q, {p, q}, PositiveIntegers, 2] $\endgroup$
    – flinty
    Commented Jul 9, 2020 at 20:08

1 Answer 1

2
$\begingroup$

In version 12, assuming positive integers

sol1 = Solve[(4 p + 3 q - 2) (p - 1) == (6 p + 2 q) q, {p, q}, 
   PositiveIntegers] // Simplify

enter image description here

For earlier versions with the same assumption,

sol2 = Solve[{(4 p + 3 q - 2) (p - 1) == (6 p + 2 q) q, p > 0, q > 0}, {p, q},
    Integers] // Simplify

EDIT: Alternatively, set upper and lower bounds on p and q. For example,

sol3 = Solve[{(4 p + 3 q - 2) (p - 1) == (6 p + 2 q) q, -1000 < p < 
    1000, -1000 < q < 1000}, {p, q}, Integers]

(* {{p -> -143, q -> -123}, {p -> -143, q -> 336}, {p -> -76, 
  q -> -66}, {p -> -6, q -> 14}, {p -> -3, q -> -4}, {p -> -3, 
  q -> 7}, {p -> 0, q -> -2}, {p -> 1, q -> -3}, {p -> 1, q -> 0}, {p -> 5, 
  q -> -12}, {p -> 5, q -> 3}, {p -> 18, q -> 14}, {p -> 28, 
  q -> -66}, {p -> 105, q -> -247}, {p -> 105, q -> 88}, {p -> 621, q -> 527}} *)
$\endgroup$
3
  • $\begingroup$ in sol1, says positive integers, why do they appear real too? $\endgroup$
    – zeros
    Commented Jul 9, 2020 at 18:51
  • $\begingroup$ Why do you think they are not integers? Look at specific values for C[1], for example, Table[sol1 /. C[1] -> c1, {c1, 1, 3}] // Simplify $\endgroup$
    – Bob Hanlon
    Commented Jul 9, 2020 at 18:58
  • $\begingroup$ ,Sorry I didn't notice. Thanks $\endgroup$
    – zeros
    Commented Jul 9, 2020 at 23:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.