0
$\begingroup$

Let $k$, $p$ and $r$ be constant values

Find the $x$ with the smallest absolute value so that $$ \frac{k - r - x}{p + r + x}\in\mathbb{Z} $$

  • 2
    Welcome to Math.SE. Since you're new here, let me tell you a few things people who frequent this site likes to see in a question: 1) We want it to be a question. Possibly a very polite request. Commands ("Find", "Solve" etc.) are frowned upon. You are, after all, asking for help, not assigning homework. 2) Show us some of your own work on the problem. It helps us to help you exactly where you're stuck. It could also help if you told us what kind of constants $k$, $p$ and $r$ are. Are they real? Rational? Integer? Natural? Something else entirely? What is $x$ allowed to be?2012-11-09
  • 0
    Ah sorry, I understand. Basically I am having trouble solving the above problem and I am now asking help how to solve it. I can find it by iterating but I am interested if there is a faster way to solve it. k, p, r and x are all rational values. I had example values for k, p and r (100, 10, 5) but the this system said that the question didn't match some quality requirements so I removed them.2012-11-09

1 Answers 1

1

Hint: To look for integer solutions of $$ \frac{a-x}{b+x}=c\tag{1} $$ it might be useful to look at the factorizations of $a+b$ since $$ a+b=(b+x)(c+1)\tag{2} $$ Example: $k=100,p=10,r=5\Rightarrow a=k-r=95,b=p+r=15$.

$a+b=110=2\cdot5\cdot11$: to find the absolutely smallest $x$ (which I assume means the smallest in absolute value), find the factor of $a+b=110$ closest to $b=15$. That would be $11$. So let $(b+x)=11$ and $(c+1)=10$. This yields $x=-4$ to be the absolutely smallest $x$: $$ \frac{100-5+4}{10+5-4}=\frac{99}{11}=9 $$ Extension: due to explanation by Graymat.

Graymat has clarified that the question is to find the smallest $x$ so that $(1)$ is satisfied for $c\in\mathbb{Z}$. Consdiering $(2)$, we would be looking for the $x$ closest to $0$ so that $$ \frac{a+b}{b+x}\in\mathbb{Z}\tag{3} $$ To find this $x$, let $$ c=\left\lfloor\frac{a+b}{b}\right\rfloor\tag{4} $$ The $x$ we are looking for would be the absolutely smaller of $$ \frac{a+b}{c}-b\qquad\text{and}\qquad\frac{a+b}{c+1}-b\tag{5} $$ Application to previous example:

Computing $c=\left\lfloor\frac{110}{15}\right\rfloor=7$, $x$ is the absolutely smaller of $\frac{110}{7}-15=\frac57$ and $\frac{110}{8}-15=-\frac54$. Therefore, $x=\frac57$, and $$ \frac{95-\frac57}{15+\frac57}=6 $$

  • 0
    a+b=(b+x)(c+1) ? (b+x)(c+1) = bc + b + xc + x2012-11-09
  • 0
    @Graymat: multiply both sides by $b+x$, then add $b+x$ to both sides. This gives $a+b=(b+x)(c+1)$.2012-11-09
  • 0
    Ok, but I do not quite follow. What to do with the factorizations?2012-11-09
  • 0
    @Graymat: I have added an example, but I am not certain of what you mean by "absolutely smallest". Do you mean the least integer, or the integer which has the smallest absolute value, or possibly the smallest positive integer?2012-11-09
  • 0
    btw, your example is an integer solution. How about non-integer values? With the absolutely smallest I meant actually the nearest value to 0 (which can be non-integer too)2012-11-09
  • 0
    @Graymat: If you are looking for non-integer solutions, what do you mean by "remainder"?2012-11-09
  • 0
    Is modulo the correct term? I mean what's "left" after division. E.g, 2.5/2.4 = 1,04166666... remainder is 0,04166666.... So I am looking for x so that that remainder is 0.2012-11-09
  • 0
    @Graymat: does the extension cover what you were looking for?2012-11-09
  • 0
    Wow, works perfectly. HUGE thanks! I was totally stuck trying to solve this. You are extremely talented :)2012-11-09