Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which is the fastest paper-pencil approach to compute the product $$ \prod \limits_{i=1}^{45}(1+\tan i^\circ) $$

share|cite|improve this question
up vote 56 down vote accepted

Using $$ 1+\tan x = \frac{\sin x + \cos x}{\cos x} = \frac{\sqrt{2} \cos (45^{\circ} - x)}{\cos x}, $$ the product can be written as: $$ \prod_{x=1}^{45}(1+\tan x^\circ) = 2^{45/2} \prod_{x=1}^{45} \frac{\cos (45 - x)^{\circ}}{\cos x^{\circ}} \stackrel{(1)}{=} 2^{45/2} \cdot \frac{\prod\limits_{x=0}^{44} \cos x^{\circ}}{\prod\limits_{x=1}^{45} \cos x^{\circ}} \stackrel{(2)}{=} 2^{45/2} \cdot \frac{\cos 0}{\cos 45^{\circ}} = 2^{23}, $$ where we

  1. reindexed the product in the numerator, and
  2. cancelled the common factors.

Another approach. If $x+y = 45^{\circ}$, then $$ 1 = \tan(x+y) = \frac{\tan x + \tan y}{1 - \tan x \tan y}, $$ which rearranges to $$ \tan x \tan y + \tan x + \tan y = 1 \quad \implies \quad (1+\tan x)(1+\tan y) = 2. $$ Now plug in $x = 0^{\circ}, 1^{\circ}, 2^{\circ}, \ldots, 45^{\circ}$, so that $y$ takes the same values but in the opposite order. Multiplying all these equations, we get $$ \left[ \prod_{x=0}^{45} (1+\tan x^\circ) \right]^2 = 2^{46}. $$ Taking square-roots and noting that $1+\tan 0^\circ = 1$, we get the answer.

share|cite|improve this answer
I like the second answer even better. I wish I could vote up again! – JavaMan Oct 25 '11 at 20:39
+1. Quite nice. – Did Oct 25 '11 at 20:42
@DJC:Second answer is nice,but I guess not much of intuitive under exam constraints if you haven't did something very similar to this before. – VelvetThunder Oct 25 '11 at 21:24
Amazing idea - Very neat! – NoChance Oct 26 '11 at 7:46

Using this, $$(\cot A + \tan y)(\cot A+ \tan(A-y))=\csc^2A \text{ if } A\ne m\pi\text{ where }m\text{ is any integer}$$

Putting $A=45^\circ, (1 + \tan y)(1+ \tan(45^\circ-y))=\csc^245^\circ=2$

Now, putting $y=1^\circ,2^\circ,3^\circ,\cdots,\lfloor\frac{45}2\rfloor^\circ=22^\circ$ and multiplying them we get, $$\prod_{1\le r\le 22}(1+\tan r^\circ)(1+\tan(45-r)^\circ)=2^{22}$$

$$\implies \prod_{1\le r\le 44}(1+\tan r^\circ)=2^{22}$$

The unpaired $1+\tan45^\circ=1+1=2$

share|cite|improve this answer

Just tell a computer to calculate them. For example in R this runs almost instantly

> prod(1+tan((1:45)*pi/180))
[1] 8388608
share|cite|improve this answer
This is actually quantitative aptitude question,which requires pencil-paper approach only. – VelvetThunder Oct 25 '11 at 19:51
Perhaps you should have put that in the question at the start – Henry Oct 25 '11 at 21:03
@Henry: It was kind of obvious. – TonyK Oct 25 '11 at 21:09
No matter what others say, this is the fast way – Norbert Jan 2 '12 at 17:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.