\(\frac{1}{1+tanx}=\frac{cosx}{cosx+sinx}=\frac{1}{2}\left(\frac{cosx+sinx}{cosx+sinx}+\frac{-sinx+cosx}{cosx+sinx}\right)\)
\(\Rightarrow\int\limits^{\frac{\pi}{4}}_0\frac{1}{1+tanx}dx=\frac{1}{2}\int\limits^{\frac{\pi}{4}}_0\left(1+\frac{-sinx+cosx}{cosx+sinx}\right)dx=\int\limits^{\frac{\pi}{4}}_0\frac{1}{2}dx+\frac{1}{2}\int\limits^{\frac{\pi}{4}}_0\frac{d\left(cosx+sinx\right)}{cosx+sinx}\)
\(=\frac{1}{2}x|^{\frac{\pi}{4}}_0+\frac{1}{2}ln\left(sinx+cosx\right)|^{\frac{\pi}{4}}_0=\frac{\pi}{8}+\frac{1}{2}ln\sqrt{2}=\frac{\pi}{8}+\frac{1}{4}ln2\)
\(\Rightarrow a=\frac{1}{8}\) ; \(b=\frac{1}{4}\)