Titan97 said:
Thank you for pointing out the error. So,
$$f'(cos\phi)=\frac{2}{\sin\phi}\cdot(\arctan\cot\phi-\arctan\tan\phi)=\frac{\pi}{\sin\phi}$$
Integrating ##d(f(\cos\phi))=g(\phi)d\phi##,
$$f(\cos\phi)=\pi\log\tan\frac{\phi}{2}+C$$
$$f(b)=\pi\log\sqrt{\frac{1-b}{1+b}}$$
Now I get a different answer.
Finally, deciphered. Yet another mistake in calculation and hopefully this will be my last thread to this post.
Mistake -1. ##f'(cos\phi)=\frac{2}{\sin\phi}\cdot(\arctan\cot\phi-\arctan\tan\phi)=\frac{\pi}{\sin\phi}##. Since R.H.S. is correct so you made a typo on computer here (started nitpicking again, sorry

) It is ##f'(cos\phi)=\frac{2}{\sin\phi}\cdot(\arctan\cot\phi+\arctan\tan\phi)=\frac{\pi}{\sin\phi}## Notice the plus sign after tan inverse of cot of phi.
Mistake -2(Actual one)
Titan97 said:
This is my confusion:
$$f'(\cos\phi)=\frac{\pi}{\sin\phi}d\phi$$
Integrating with respect to ##d\phi## I get wrong answer. But in the quoted message, why did you take ##f'(b)## when the function is ##f'(\cos\phi)##?
Can't you integrate directly?
I was typing while you posted this message but thanks to it I can clearly tell you where you made the mistake, otherwise it was getting very hard to do so with
Titan97 said:
##d(f(\cos\phi))=g(\phi)d\phi##
You can do it with cos as function too
Note: In the quote you have written incorrectly ##f'(\cos\phi)=\frac{\pi}{\sin\phi}d\phi## no ##d\phi##
$$f'(\cos\phi)=\frac{\pi}{\sin\phi}$$
$$\rightarrow f'(\cos\phi)d(cos\phi)=\frac{\pi}{\sin\phi}d(cos\phi)$$
$$\rightarrow \int f'(\cos\phi)d(cos\phi)= \int \frac{\pi}{\sin\phi}d(cos\phi)$$
$$\rightarrow \int f'(\cos\phi)d(cos\phi)= \int \frac{\pi}{\sin\phi} \times (-\sin\phi)d(\phi)$$
$$\rightarrow f(cos\phi) = -\pi (\phi) +c$$
$$\rightarrow f(b)=-\pi (\cos^{-1}b) +c$$
$$\rightarrow f(b)=-\pi (\frac {\pi}{2} - \sin ^{-1}b) +c$$
$$\rightarrow f(b) =-\frac {\pi^2}{2}+ (\pi\sin^{-1}b) +c$$ and
##f(0)=0##But there is more to it. We both made a common mistake which does not interfere with answer.
We both got $$\arctan cot\phi + \arctan tan\phi$$ It should be $$\arctan cot\frac{\phi}{2} + \arctan tan\frac{\phi}{2}$$.
Though summation remains same but a we will have to accept that we got lucky and in some other place in some other question we will face the consequence if this mistake is not eradicated. We both got to work on it.
I hope I answered your question, so please this question Why were you confused that I wrote $$\arctan cot\phi + \arctan tan\phi = \arctan tan (\frac{\pi}{2} - \phi)+ \arctan tan\phi$$.
And how did you quote me your last reply, you have quoted me entirely wrong. It was 2/sin(##\phi##) not 2sin(##\phi##) same with (##\pi##)/2