# Inverse Tangent Sums, Polynomial Roots and Complex Numbers

Recently, I have noticed a lot of problems posted on Brilliant that look a lot like this:

$\large 199x^5+800x^4+750x^3+18x^2-83x-12$

Let $x_1, x_2, x_3, x_4, x_5$ be the roots of the equation above.

If the value of $\tan \Bigg(\displaystyle \sum_{m=1}^5 \tan^{-1} (x_m) \Bigg)$ can be written as $\frac{a}{b}$ where $a$ and $b$ are coprime integers, what is $a-b$?

I greatly encourage that you try out this problem for yourself before reading how to find the solution below, the link for which can be found here.

I'll be honest, when I first saw this problem I had no idea what to do. I tried derivatives. I tried polar graphing. It took me a while to realize that there must be a formula for the sum of at least the sum of two inverse tangent functions, and this formula is pretty easy to derive. We start with the formula for $\tan(A+B)$ and let $A=\tan^{-1} (a)$ and $B=\tan^{-1} (b)$:

$\tan(A+B)=\frac{tan(A)+tan(B)}{1-\tan(A)\tan(B)}$

$\tan(\tan^{-1} (a)+\tan^{-1} (b))=\frac{tan(\tan^{-1} (a))+tan(\tan^{-1} (b))}{1-\tan(\tan^{-1} (a))\tan(\tan^{-1} (b))}=\frac{a+b}{1-ab}$

Okay, step one complete. Only problem is that this is for only two variables. And I don't know the roots of the equation. So I'm pretty far off. Let's at least work on the first part, generalizing it to $n$ variables. Let's get up to $3$ variables and see if we can start seeing some patterns.

$\tan\big([\tan^{-1} (a)+\tan^{-1} (b)]+\tan^{-1} (c)\big)=\frac{tan(\tan^{-1} (a)+\tan^{-1} (b))+tan(\tan^{-1} (c))}{1-\tan(\tan^{-1} (a)+\tan^{-1} (b))\tan(\tan^{-1} (c))}$

$=\frac{\frac{a+b}{1-ab}+c}{1-\bigg(\frac{a+b}{1-ab}\bigg)c}=\frac{a+b+c(1-ab)}{(1-ab)-(a+b)c}=\frac{a+b+c-abc}{1-(ab+ac+bc)}$

Now this is interesting! When I saw this I suddenly realized why there are so many problems like this. Take a look: Vieta's formulas for a $3$ degree monic polynomial are right there in the equation! And looking back at the equation for $2$ variables we can see Vieta's formulas for a $2$nd degree monic polynomial. For those of you who are unfamiliar with Vieta's formulas, these are equations that relate the roots of a polynomial to it's coefficients. For example, if we have the polynomial $A_0x^3+A_1x^2+A_2x+A_3=0$ and the roots to this equation are $a$, $b$ and $c$, Vieta's formulas give us the following equations:

$\frac{-A_1}{A_0} = a+b+c$

$\frac{A_2}{A_0} = ab+ac+bc$

$\frac{-A_3}{A_0} = abc$

These formulas look familiar? We can replace our values of $a$, $b$ and $c$ in our tangential sum formula with the coefficients $A_0$, $A_1$, $A_2$ and $A_3$ like so:

$\frac{a+b+c-abc}{1-(ab+ac+bc)}=\frac{\frac{-A_1}{A_0}+\frac{A_3}{A_0}}{1-\frac{A_2}{A_0}}=\frac{-A_1+A_3}{A_0-A_2}$

We can do the same thing with the $1$ and $2$ variable formulas. Here are the first $4$ formulas (as calculated by hand by me), substituting the coefficients of a polynomial expressing in for the roots of our equation:

$\tan\Bigg(\displaystyle\sum_{m=1}^1 tan^{-1}(x_m)\Bigg) = \frac{-A_1}{A_0}$

$\tan\Bigg(\displaystyle\sum_{m=1}^2 tan^{-1}(x_m)\Bigg) = \frac{-A_1}{A_0-A_2}$

$\tan\Bigg(\displaystyle\sum_{m=1}^3 tan^{-1}(x_m)\Bigg) = \frac{-A_1+A_3}{A_0-A_2}$

$\tan\Bigg(\displaystyle\sum_{m=1}^4 tan^{-1}(x_m)\Bigg) = \frac{-A_1+A_3}{A_0-A_2+A_4}$

It's clear that there's a pattern here, but what is it? It looks like the numerator of the fraction is the alternating sum of the even coefficients (negated) and the denominator is the alternating sum of the odd coefficients. Here it is, written in closed form:

$\boxed{\tan\Bigg(\displaystyle\sum_{m=1}^n tan^{-1}(x_m)\Bigg) = \frac{-\displaystyle\sum_{k=0}^{\lfloor \frac{n-1}{2} \rfloor} A_{2k+1}(-1)^{k}}{\displaystyle\sum_{k=0}^{\lceil \frac{n-1}{2} \rceil} A_{2k}(-1)^{k}} = \frac{-(A_1-A_3+A_5-...)}{A_0-A_2+A_4-...}}$

This is great!! We now have a formula that will help us solve this type of problem for any degree polynomial, but how do we really know that it works for any degree? We know that it works for the first $4$ cases, but we need to prove it for the case of $n$ roots. To do this, I provide a proof by induction.

For those of you unfamiliar with this method of proof, here's the general idea. We'll call the left-hand side (LHS for short) of our formula $f(n)$. We want to prove that for all $n$, $f(n)$ equals the right-hand side (RHS) of the equation, which we'll denote by $g(n)$, for a given $n$. First, we prove what is known as a "base case". Usually this means that proving that $f(1)=g(1)$. Then, we ask the question, if $f(n)=g(n)$ is true, is $f(n+1)=g(n+1)$ true? Since we proved that $n=1$ is true, this would prove that $n=2$ is true, then $3$ and so on for all $n$!

We've already proved the base case (we proved the first $4$ in fact). We now assume that our formula is true for $n$, and using this information, we must prove that it's true for $n+1$ as well. That proof is as follows:

$f(n+1)=\tan\Bigg(\displaystyle\sum_{m=1}^{n+1} tan^{-1}(x_m)\Bigg) = \tan\Bigg(\tan^{-1} (x_{n+1})+\displaystyle\sum_{m=1}^{n} tan^{-1}(x_m)\Bigg)$

Using our formula for $\tan (tan^{-1}(a)+tan^{-1}(b))$ from before:

$\tan\Bigg(\tan^{-1} (x_{n+1})+\displaystyle\sum_{m=1}^{n} tan^{-1}(x_m)\Bigg) = \frac{\frac{-(A_1-A_3+A_5-...)}{A_0-A_2+A_4-...}+x_{n+1}}{1-\Bigg(\frac{-(A_1-A_3+A_5-...)}{A_0-A_2+A_4-...}\Bigg)x_{n+1}}$

$= \frac{-(A_1-A_3+A_5-...)+x_{n+1}(A_0-A_2+A_4-...)}{(A_0-A_2+A_4-...)+x_{n+1}(A_1-A_3+A_5-...)}$

$= \frac{-((A_1-A_0x^{n+1})-(A_3-A_2x^{n+1})+(A_5-A_4x^{n+1})-...)}{A_0-(A_2-A_1x^{n+1})+(A_4-A_3x^{n+1})-(A_6-A_5x^{n+1})+...}$

This may look a bit confusing, but it's exactly what we need. We need to turn this result, which is in terms of the coefficients $A_k$ of the $n$th degree equation, into an expression in terms of the coefficients (which we'll denote as $B_k$) of the $(n+1)$th degree equation. If our $n$th degree polynomial is of the form $A_0x^n+A_1x^{n-1}+A_2x^{n-2}+...$, then our $(n+1)$th degree polynomial, which contains all the same roots as the $n$th degree plus the extra root $x_{n+1}$, must be just the $n$th degree polynomial times the factor $(x-x_{n+1})$. We can use this fact to create a formula for $B_k$

$(A_0x^n+A_1x^{n-1}+A_2x^{n-2}+...)(x-x_{n+1})$

$=A_0x^{n+1}+(A_1-A_0x_{n+1})x^n+(A_2-A_1x_{n+1})x^{n-1}+...$

$=B_0x^{n+1}+B_1x^n+B_2x^{n-1}+...$

This gives us the formula for $B_k$ that we desire:

$B_k=A_k-A_{k-1}x_{n+1}$, where $B_0=A_0$

Finally, let's replace our values of $A_k$ with with $B_k$ using our formula:

$\frac{-((A_1-A_0x^{n+1})-(A_3-A_2x^{n+1})+(A_5-A_4x^{n+1})-...)}{A_0-(A_2-A_1x^{n+1})+(A_4-A_3x^{n+1})-...}=\frac{-(B_1-B_3+B_5-...)}{B_0-B_2+B_4-...}$

As you can see, the form of $g(n+1)$ is the same as the form of $g(n)$. And that's it! We have proven that if $f(n)=g(n)$, then $f(n+1)=g(n+1)$, meaning that this formula is true for all values of $n$!

Perfect, we have a formula that can answer this type of question for any polynomial! But can we improve it? Let's say instead of being given a polynomial, we were just given the values of the roots? One way to solve this would be to create a polynomial by multiplying the factors $(x-x_m)$ together and using the coefficients. While calculating the coefficients of a polynomial for $3$ or $4$ roots wouldn't be too difficult, but what if you were given $10$? I knew that this might be a tough problem to solve, so I recently posted this.

Is there a way to calculate the alternating sums in the numerator and denominator without actually calculating the coefficients? For this I would like to draw your attention to the wonderful world of complex numbers. Where the imaginary number $i=\sqrt{-1}$:

$i^0=1$

$i^1=i$

$i^2=-1$

$i^3=-i$

$i^4=1$

Now what would happen if we had the desired polynomial and plugged in $i$ for $x$?

$A_0i^n+A_1i^{n-1}+A_2i^{n-2}+A_3i^{n-3}...=i^n(A_0-A_1i-A_2+A_3i+...)$

$=i^n((A_0-A_2+A_4-...)-(A_1-A_3+A_5-...)i)$

Well doesn't this look familiar! Ignoring the $i^n$ on the outside for now, it seems that on the inside we have a complex number where the real part is our denominator and the imaginary part is our denominator! All we have to do is find this complex number and we're set, but how do we find it?

Let's return to the idea of multiplying factors together to get a polynomial. In this case we are multiplying the factors $(x-x_m)$ together. But didn't we plug in $i$ for $x$? Multiplying these factors of the form $(i-x_m)$ together gave us our result above, but we don't want the result with the $i^n$ in front. There are $n$ factors, so if we divide each factor by $i$ we should get the result we desire:

$\frac{(i-x_m)}{i}=-i(i-x_m)=1+x_mi$

$∴\displaystyle\prod_{m=1}^n (1+x_mi)=(A_0-A_2+A_4-...)-(A_1-A_3+A_5-...)i$

Finally, we manipulate this number such that we can substitute it into our original formula:

$\boxed{\tan \Bigg(\displaystyle\sum_{m=1}^n \tan^{-1} x_m\Bigg) = \frac{\large Im\Bigg[\displaystyle\prod_{m=1}^n (1+x_mi)\Bigg]}{\large Re \Bigg[\displaystyle\prod_{m=1}^n (1+x_mi)\Bigg]}}$

And we're done. Multiplying $10$ complex numbers together of this form is a lot easier than finding a $10$th degree polynomial. As far as I know there's no simpler way to do this kind of problem, but if there is PLEASE let me know!

I feel that these two formulas will definitely help people to solve a number of very difficult problems like the ones mentioned above. Let me tell you that working through all of this math has been a real journey for me, and I believe that the mathematics behind this is incredibly beautiful. If you feel that there is something else to be said about these problems, my formulas or possibly your own, please leave a comment, I would be honored to discuss this topic with you. Note by Garrett Clarke
5 years, 11 months ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
• Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

## Comments

Sort by:

Top Newest

One could simply argue that multiplication of complex numbers result in addition of their argument, hence ;

$\displaystyle Arg(\prod_{m=1}^n(1+x_im)) = \sum_{m=1}^n Arg(1+x_im)$

Taking tan both sides we have :

$\displaystyle tan(Arg(\prod_{m=1}^n(1+x_im))) = tan(\sum_{m=1}^n Arg(1+x_im))$

Thus proving the result.

- 5 years, 11 months ago

Log in to reply

Yes! A beautiful connection.

$Arg(a+bi)=\tan^{-1} \big(\frac{b}{a}\big) \Longrightarrow Arg(1+x_mi)=tan^{-1} (x_m)$

The result is the same, therefore the statement is proved. I love it! Thanks for adding it!

- 5 years, 11 months ago

Log in to reply

This looks really interesting! I'll save it for later when I get the time to pursue it properly.

- 5 years, 11 months ago

Log in to reply

Mesmerizing! :)

- 5 years, 11 months ago

Log in to reply

I knew the formula and was looking for a proof. Really thanks for it!

- 5 years, 11 months ago

Log in to reply

No problem, glad to supply it!

- 5 years, 11 months ago

Log in to reply

×

Problem Loading...

Note Loading...

Set Loading...