# Lets push trigonometry to limits

**Calculus**Level 5

\[\displaystyle{{ f^{ k }\left( \theta \right) =\sum _{ r=1 }^{ n }{ { \left( \cfrac { \tan { \left( \cfrac { \theta }{ { 2 }^{ r } } \right) } }{ { 2 }^{ r } } \right) }^{ k } } }+\cfrac { 1 }{ 3 } \sum _{ r=1 }^{ n }{ \left( \cfrac { \tan { \left( \cfrac { \theta }{ { 2 }^{ r } } \right) } }{ 8^{ r } } \right) } }\]

Consider a function \(f\) defined as above. And we again define a function \(L\) below.

\[\displaystyle{L(\theta )=\lim _{ n\rightarrow \infty }{ \left( \sum _{ k=1 }^{ 3 }{ f^{ k }\left( \theta \right) } \right) } }\]

If \[\displaystyle{{ { L\left( \cfrac { \pi }{ 6 } \right) =\cfrac { a }{ { \pi }^{ 3 } } -\cfrac { b }{ { { \pi } }^{ 2 } } +\cfrac { c }{ { \pi } } -\cfrac { 1 }{ d } +p(1-\sqrt { q } ) }-\sqrt { q } }}\]

Find \(a+b+c+d+p+q\).

**Details and assumptions**:

Here \(a,b,c,d,p,q\) are positive integers .

\(\text{Hint: Do you know how to convert product into sum?}\)