Verify Rolle's theorem for the following functions:-
i. $\quad f(x)=2 x^{3}+x^{2}-4 x-2$ in $[-\sqrt{2}, \sqrt{2}]$.
ii. $f(x)=\sin x$ in $[0, \pi]$.
iii. $f(x)=\tan x$ in $[0, \pi]$.
iv. $f(x)=\cos \frac{1}{x}$ in $[-1,1]$.
v. $\quad f(x)=x(x+3) e^{-\frac{x}{2}}$ in $[-3,0]$.
vi. $\quad f(x)=e^{x}(\sin x-\cos x)$ in $\left[\frac{\pi}{4}, \frac{5 \pi}{4}\right]$.
vii. $f(x)=|x|$ in $[-1,1]$.
viii. $f(x)=3+(x-2)^{\frac{2}{3}}$ in $[1,3]$.
ix. $\quad f(x)=\ln \left(\frac{x^{2}+a b}{(a+b) x}\right)$ in $[a, b], a>0 .$
x. $f(x)=(x-a)^{m}(x-b)^{n}$ in $[a, b]$, where $m$ and $n$ are positive integers.