Задача повышенной сложности (со звёздочкой).

Найти производную функции и упростить результат: $$ f(x) = 1 - x + \ln\sqrt{1+e^{2x}} - e^{-x}\,\mathrm{arcctg}(e^x). $$

Перепишем $\ln\sqrt{1+e^{2x}} = \dfrac12\ln(1+e^{2x})$.

$(1-x)' = -1$.

$$ \left(\frac12\ln(1+e^{2x})\right)' = \frac12\cdot\frac{2e^{2x}}{1+e^{2x}} = \frac{e^{2x}}{1+e^{2x}}. $$

Третье слагаемое — произведение $e^{-x}\cdot\mathrm{arcctg}(e^x)$: $$ (e^{-x})' = -e^{-x}, \qquad \bigl(\mathrm{arcctg}(e^x)\bigr)' = -\frac{e^x}{1+e^{2x}}. $$ $$ \bigl(e^{-x}\mathrm{arcctg}(e^x)\bigr)' = -e^{-x}\mathrm{arcctg}(e^x) - e^{-x}\cdot\frac{e^x}{1+e^{2x}} = -e^{-x}\mathrm{arcctg}(e^x) - \frac{1}{1+e^{2x}}. $$

Собираем всё вместе (знак «минус» перед третьим слагаемым в $f$): $$ f'(x) = -1 + \frac{e^{2x}}{1+e^{2x}} - \left[-e^{-x}\mathrm{arcctg}(e^x) - \frac{1}{1+e^{2x}}\right] = -1 + \frac{e^{2x}}{1+e^{2x}} + \frac{1}{1+e^{2x}} + e^{-x}\mathrm{arcctg}(e^x). $$

Так как $\dfrac{e^{2x}}{1+e^{2x}}+\dfrac{1}{1+e^{2x}} = \dfrac{e^{2x}+1}{1+e^{2x}} = 1$, получаем: $$ f'(x) = -1 + 1 + e^{-x}\mathrm{arcctg}(e^x) = e^{-x}\mathrm{arcctg}(e^x). $$

$$ \boxed{f'(x) = e^{-x}\,\mathrm{arcctg}(e^x)} $$