3

I am using the quadratic formula to turn $ax^2 + bx +c$ into $a(x-x_1)(x-x_2)$. However, I am having difficulty finding a mathematical way to distribute the $a$ into $(x-x_1)$ and $(x-x_2)$ like $(a_1x-a_1x_1)(a_2x-a_2x_2)$ in such as to satisfy $a=a_1\times a_2$, $a_1\in\mathbb{W}$, $a_2\in\mathbb{W}$, $x_{int}a_1\in\mathbb{W}$, and $x_{int}a_2\in\mathbb{W}$ only if possible. I am attempting to do this using only basic math (i.e. addition, subtraction, multiplication, division, exponentiation (including roots), modulo, unary negative, and unary positive (absolute value)), minimal if/then statements, GCF, GCD, and the ability to turn a decimal into a (potentially "improper") fraction and get the numerator and the denominator. For a very simple example, I would want to turn this:

$$f(x) = 12\times(x + \frac{5}2)\times(x + \frac{1}3)$$

Into this:

$$f(x) = (4\times{x} + 10)\times(3\times{x} + 1)$$

Yes, I can easily do the simple example above in my head. But, the actual numbers I am dealing with are much much bigger. Thus, I need a mathematical way to punch it into a calculator and calculate it.

So far, I have made not much progress in my attempts to devise a way to distribute $A$. So, how would I go about distributing A to meet all of the criteria if the criteria are attainable? Any any all constructive advice/criticism is welcome.

Jack G
  • 224
  • 2
  • 17
  • 1
    What is $\Bbb W$? – Robert Lewis Nov 10 '17 at 06:19
  • 1
    It is a very unusual notation. I believe that he would mean the set of "whole numbers", a definition that is sometimes used - with no universal agreement - to indicate either the set of natural or that of integer numbers (see for example https://texblog.org/2007/08/27/number-sets-prime-natural-integer-rational-real-and-complex-in-latex/). In my answer I interpreted it as the set of integers. Also see https://math.stackexchange.com/questions/138633/what-are-the-whole-numbers – Anatoly Nov 10 '17 at 07:47

1 Answers1

2

A rather simple way to check whether this is possible may be as follows. The possibility to "distribute" $A $ in such a way, considering that $a $, $a_1$, $a_2$, $a_1x_1$, and $a_1x_2$ have all to be integer, exists if:

  • $x_1$ and $x_2$ are both rational numbers;

  • expressing $x_1$ and $x_2$ as irreducible fractions, calling $d_1$ and $d_2$ the corrisponding denominators and $d $ their product $d_1d_2\,$, $a $ is divisible by $d $. If these conditions are satisfied, setting $a=kd \,$ with $k $ integer, the resulting expression becomes

$$a(x−x1)(x−x2) \\=k (d_1x-d_1x_1)(d_2x-d_2x_2)$$

where the factor $k $ can then be incorporated - if one wants to avoid it in the final expression - in any of the two quantities in brackets.

For the very simple example reported in the OP, $x_1=5/2\,\,$ and $x_2=1/3\,\,$ are both rational, already expressed as irreducible fractions. Their denominators are $d_1=2\,\,$ and $d_2=3\,\,$, with a product $d=2 \cdot 3=6\,\,\,$. Since $a =12=2 \cdot 6\,\,\,$, taking $k=2\,$ we get

$$12 \left( x+\frac {5}{2} \right) \left (x+\frac {1}{3} \right) \\= 2 \left(2x+2\frac {5}{2} \right) \left(3x+3\frac {1}{3} \right) \\ =2 (2x+5)(3x+1) $$

which can be written, if one wants to eliminate the factor outside the brackets, as $ (4x+10)(3x+1) \,\,\,$ or $ (2x+5)(6x+2) \,\,$.

This approach should allow you to rapidly check the feasibility of the trasformation, even for large values of $a $, $x_1$, and $x_2$.

Anatoly
  • 17,079
  • I really appreciate your answer. You are very helpful. However, I am still curious about 2 things. The first is the best approach to take if $d > a$ to try to make this fraction as distributed as possible. The second thing is if $a \div d \notin \mathbb{W} $ – Jack G Nov 10 '17 at 14:18
  • 1
    In both cases, the procedure above gives again an expression of the form $$k(d_1x−d_1x_1)(d_2x−d_2x_2)$$ but where $k$ is a fraction (in the first case $k$is also $<1$). To distribute this fracional factor in the two quantities in brackets, you can: a) directly move its numerator to one or both the quantities in brackets (this keeps the terms in the brackets as integer values); b) for its denominator, you have to check the numerators of the initial irreducible fractions, and see whether some simplification is possible. Note, however, that this could produce fractions in the $x$ terms. – Anatoly Nov 10 '17 at 15:31