Let $f : C^1(a; b)$, such that $ \lim\limits_{x\to a^+} f(x) = +\infty$, $\lim\limits_{x\to b^-}f(x) = -\infty$ and $f'(x)+f^2(x) \ge -1 $ for $x \in (a; b)$.
Prove that $b-a\ge \pi $ and provide an example where $b-a= \pi $
For the second question the obvious example could be $f(x) = \cot(x)$ with $a=0$, and $b=\pi.$
Any hint for the first part? This queston is similar to this: How prove this inequality $b-a\ge \pi$