Solving Equation of form: *num* = $x^3 + ax^2 + bx + c$.

154 Views Asked by At

The solution to the following: $$ 45113 = x^3 + ax^2 + bx + c $$ is: $$ 45113 = 31^3 + 15 · 31^2 + 29 · 31 + 8 $$

My question is how does one go about solving this set of equation, I'd like to write a program that solves this but need to know what kind of equation I'm looking at and what steps are involved at getting to the solution. I'm familiar with Linear Diophantine and Chinese Remainder Theorem solving but not sure where, to begin with, this one. I just need to find a guide or know how to step by step solve this equation, but google searches aren't coming up with anything.

Any papers or guides on how to do this would be helpful, thank you.

Ok, here is how to solve, choose a value below the cube root of 45113. Then perform the following steps:

If there are restrictions on x apply them in selecting the integer x. For example select a positive integer less than the cube root of 45113, ie ≤ 35, for x.

  1. Subtract x³ from 45113
  2. Divide the result by x². The integer result is the coefficient “a” .
  3. Subtract ax² from the result of step 1.
  4. Divide this amount by x. The integer amount is the coefficient “b” .
  5. Subtract bx from the result of step 3. The new result is “c” . This will work, no matter the integer value of x.
1

There are 1 best solutions below

0
On BEST ANSWER

You have some degrees of freedom here. Assuming you want a solution or some solutions and not all solutions, I would do something like this based on Vieta's formulas

$$\begin{align*} 0 &= x^3+ax^2+bx+(c-n) \\ \\ &= x^3-(r_1+r_2+r_3)x^2+(r_1r_2+r_2r_3+r_1r_3)x-r_1r_2r_3 \end{align*}$$

  1. Choose a $c$. $ (n-c)=r_1r_2r_3$ is the product of the roots of the cubic equation.
  2. Factor an integer factor out of $n-c$, and call that root $r_1$.
  3. Choose the 2 other roots, $r_2$ and $r_3$, such that $r_2r_3 =\dfrac{n-c}{r_1}$. They need not be integers, and they can be complex conjugates if you want. They should sum to an integer, and things are easier to manage if the real parts of their individual products with $r_1$ are also integers.
  4. Set the values of $a = -(r_1+r_2+r_3)$, and $b=(r_1r_2+r_2r_3+r_1r_3)$ from Vieta's formulas.

Now you should have integer $c, r_1, a, b$ so you can write

$$n=r_1^3+ar_1^2+br_1+c$$