I have this question:

Known that: $$3pq-5p+4q=22$$ Find the value of $p + q$

I have solved 2 variables with 2 equations or more, but I have never encountered 1 equation with 2 variables. The answer is a positive integer. Can I have a hint or a guide?



closed as unclear what you're asking by Dietrich Burde, астон вілла олоф мэллбэрг, Adam Hughes, S.C.B., user223391 Jan 30 '17 at 7:34

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    $\begingroup$ What is the nature of $p,q$ $\endgroup$ – lab bhattacharjee Jan 29 '17 at 12:27
  • $\begingroup$ Are $p$ & $q$ integers? $\endgroup$ – Anonymous_original Jan 29 '17 at 12:28
  • $\begingroup$ Yes, they are integers $\endgroup$ – Adola Jan 29 '17 at 12:30
  • 2
    $\begingroup$ @A---B When you spot an obviously errorneously used tag, you can just remove it (possibly but not necessarily also add a more appropriate one). Well spotted anyway! $\endgroup$ – Jyrki Lahtonen Jan 29 '17 at 12:47

The given equation can be written as $$(3p+4)(3q-5)=46$$ Since $p$ and $q$ are both integers (as what OP has mentioned in the comments). Therefore, we want factors of $46=ab$ such that \begin{align*} 3p+4 & =a \\ 3q-5 & =b \end{align*} Thus $$3(p+q)=a+b+1 \implies a+b+1 \equiv 0 \pmod{3}.$$ But the only possible values for $a,b \in \{\pm 1, \pm 2, \pm 23, \pm 46\}$ (of course with $ab=46)$. However the solutions that satisfy $a+b+1 \equiv 0 \pmod{3}$ are $(a,b) \in \{(1,46), (46,1),(-2,-23),(-23,-2)\}$.

Hence $p+q \in \{16,-8\}$.

  • $\begingroup$ the rhs should be $46$, not $86$. In that case there are solutions, like $(14,2)$. $\endgroup$ – themaker Jan 29 '17 at 13:08
  • $\begingroup$ @themaker I have fixed the error. It should be $16$ and $-8$. $\endgroup$ – Anurag A Jan 29 '17 at 13:16

Multiply with $3$, add a constant term and factorize to get $$ (3p+4)(3q-5)=3(3pq−5p+4q)-20=46 $$

If the quadratic equation $$0=z^2-az+46$$ has the solutions $z_1=(3p+4)$, $z_2=(3q−5)$ then by the Viete rules $$a=z_1+z_2=(3p+4)+(3q−5)=3(p+q)-1$$ which is independent of the order of the roots.

As $46=z_1·z_2=1·46=2·23=(-2)·(-23)=(-1)·(-46)$ only has that many integer factorizations, one quickly finds the only solutions \begin{align} 3(p+q)-1&=47:&p+q&=16;\\ 3(p+q)-1&=25:&not~&possible\\ 3(p+q)-1&=-25:&p+q&=-8\\ 3(p+q)-1&=-47:&not~&possible\\ \end{align}

  • $\begingroup$ if you multiply by $3$, the right side is $66$, not $46$. See my solution. $\endgroup$ – Anurag A Jan 29 '17 at 13:06
  • $\begingroup$ Yes, and $66-20=46$. You need to do both, multiply with 3 and factorize, to get that result, as you did (but somehow got a sign wrong). $\endgroup$ – LutzL Jan 29 '17 at 13:08
  • $\begingroup$ you are right my mistake. Thanks, $\endgroup$ – Anurag A Jan 29 '17 at 13:11

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