Problem Solving: Using Math and Brute Force
By “brute force”, I mean, of course, the power of computers. From my experience, brute force can help solve many mathematical problems, and I have even wondered whether all mathematical problems can be solved using computational power. Today, I present a small example showing that, although computers nowadays are powerful enough to help solve many problems, we should still appreciate the power and elegance of mathematics itself.
My example comes from this Quora post: If
\begin{align} a + b + c & = 1,\\ ab + bc + ca & = -2,\\ abc & = -3, \end{align}
then what is the value of
$$ \frac{1}{a+bc} + \frac{1}{b+ca} + \frac{1}{c+ab}\hbox{?} $$
The Quora post provides a beautiful solution, in which the key step is the equation:
$$ x^3-x^2-2x-abc = 0, $$
which is based on Vieta’s Formulas.
Inspired by the solution in the Quora post, I will present
- another solution, which uses algebra;
- a third solution, which uses computer power.
Another solution:
Notice that
\begin{align} 1 & = -2 - (-3)\\ & = ab + bc + ca - abc \end{align}
Also observe that $ab + bc + ca - abc$ can be expressed as
$$ (1-a)(a+bc), $$
or
$$ (1-b)(b+ca), $$
or
$$ (1-c)(c+ab). $$
Therefore,
$$ \frac{1}{a+bc} + \frac{1}{b+ca} + \frac{1}{c+ab} = (1-a) + (1-b) + (1-c) = 2. $$
A third solution:
Note that we want to find the value of
$$ \frac{a}{a^2-3} + \frac{b}{b^2-3} + \frac{c}{c^2-3}, $$
where $a$, $b$ and $c$ are roots of$$ f(x) = x^3-x^2-2x+3 $$
coefficients <- c(3, -2, -1, 1)
roots <- polyroot(coefficients)
a_func <- function(x)
{x / (x^2 -3)
}
(re <- sum(a_func(roots)))
## [1] 2+1.024003e-13i