# Find the sum of the first n terms

#### anemone

##### MHB POTW Director
Staff member
Evaluate the sum $\displaystyle \sum_{i=0}^n \tan^{-1} \dfrac{1}{i^2+i+1}$.

#### MarkFL

Staff member
My solution:

We are given to evaluate:

$$\displaystyle S_n=\sum_{k=0}^n\left[\tan^{-1}\left(\frac{1}{k^2+k+1} \right) \right]$$

Using the identity:

$$\displaystyle \tan^{-1}(x)=\cot^{-1}\left(\frac{1}{x} \right)$$

we may write:

$$\displaystyle S_n=\sum_{k=0}^n\left[\cot^{-1}\left(k^2+k+1 \right) \right]$$

Now, using the fact that:

$$\displaystyle k^2+k+1=\frac{k(k+1)+1}{(k+1)-k}$$

and the identity:

$$\displaystyle \cot(\alpha-\beta)=\frac{\cot(\alpha)\cot(\beta)+1}{\cot(\beta)-\cot(\alpha)}$$

We may now write:

$$\displaystyle S_n=\sum_{k=0}^n\left[\cot^{-1}(k)-\cot^{-1}(k+1) \right]$$

This is a telescoping series, hence:

$$\displaystyle S_n=\cot^{-1}(0)-\cot^{-1}(n+1)=\frac{\pi}{2}-\cot^{-1}(n+1)$$

Using the identity:

$$\displaystyle \tan^{-1}(x)+\cot^{-1}(x)=\frac{\pi}{2}$$

We may also write:

$$\displaystyle S_n=\tan^{-1}(n+1)$$

And so we have found:

$$\displaystyle \sum_{k=0}^n\left[\tan^{-1}\left(\frac{1}{k^2+k+1} \right) \right]=\tan^{-1}(n+1)$$

#### anemone

##### MHB POTW Director
Staff member
My solution:

We are given to evaluate:

$$\displaystyle S_n=\sum_{k=0}^n\left[\tan^{-1}\left(\frac{1}{k^2+k+1} \right) \right]$$

Using the identity:

$$\displaystyle \tan^{-1}(x)=\cot^{-1}\left(\frac{1}{x} \right)$$

we may write:

$$\displaystyle S_n=\sum_{k=0}^n\left[\cot^{-1}\left(k^2+k+1 \right) \right]$$

Now, using the fact that:

$$\displaystyle k^2+k+1=\frac{k(k+1)+1}{(k+1)-k}$$

and the identity:

$$\displaystyle \cot(\alpha-\beta)=\frac{\cot(\alpha)\cot(\beta)+1}{\cot(\beta)-\cot(\alpha)}$$

We may now write:

$$\displaystyle S_n=\sum_{k=0}^n\left[\cot^{-1}(k)-\cot^{-1}(k+1) \right]$$

This is a telescoping series, hence:

$$\displaystyle S_n=\cot^{-1}(0)-\cot^{-1}(n+1)=\frac{\pi}{2}-\cot^{-1}(n+1)$$

Using the identity:

$$\displaystyle \tan^{-1}(x)+\cot^{-1}(x)=\frac{\pi}{2}$$

We may also write:

$$\displaystyle S_n=\tan^{-1}(n+1)$$

And so we have found:

$$\displaystyle \sum_{k=0}^n\left[\tan^{-1}\left(\frac{1}{k^2+k+1} \right) \right]=\tan^{-1}(n+1)$$
Aww...that is a fabulous way to tackle the problem! Bravo, MarkFL! (drink)

#### Random Variable

##### Well-known member
MHB Math Helper
A generalization is $$\sum_{k=0}^{n} \arctan \left( \frac{a}{a^{2}k^{2}+a(a+2b)k +(1+ab+b^{2})} \right) = \arctan \Big(a(n+1)+b \Big) - \arctan(b)$$

where $ak+b >0$

#### anemone

##### MHB POTW Director
Staff member
A generalization is $$\sum_{k=0}^{n} \arctan \left( \frac{a}{a^{2}k^{2}+a(a+2b)k +(1+ab+b^{2})} \right) = \arctan \Big(a(n+1)+b \Big) - \arctan(b)$$

where $ak+b >0$
Thanks for your input, Random Variable!