Let θ=π8 then 2θ=π4
tan2θ=2tanθ1−tan2θ
⇒tanπ4=2tanπ81−tan2π8⇒1=2 tanπ81−tan2π8
Let y=tanπ8
⇒1=2y1−y2⇒1−y2=2y
⇒y2+2y−1=0
The above equation is of the form ax2+bx+c=0
a=1,b=2,c=−1
∴y=−b±√b2−4ac2a
⇒y=−2±√(2)2−4(1)(−1)2×1⇒y=−2±√4+42×1
⇒y=−2±2√22⇒y=−1±√2
⇒tanπ8=−1±√2
But tanπ8=−1−√2 is not possible as π8 lies in the first quadrant and tan is positive in first quadrant.
∴tanπ8=−1+√2=√2−1