Prove that: tan−1(√1+x−√1−x√1+x+√1−x)=π4−12cos−1x;−1√2≤x≤1.
OR If tan−1(x−2x−4)+tan−1(x+2x+4)=π4, find the value of x.