## Task Condition

Find the derivative.

$$
y=x-\ln \left(1+e^{x}\right)-2 e^{-\frac{x}{2}} \cdot \operatorname{arctg} e^{\frac{x}{2}}-\left(\operatorname{arctg} e^{\frac{x}{2}}\right)^{2}
$$
## Solution

$$
\begin{aligned}
& y^{\prime}=\left(x-\ln \left(1+e^{x}\right)-2 e^{-\frac{x}{2}} \cdot \operatorname{arctg} e^{\frac{x}{2}}-\left(\operatorname{arctg} e^{\frac{x}{2}}\right)^{2}\right)^{\prime}= \\
& =1-\frac{1}{1+e^{x}} \cdot e^{x}-2 \cdot\left(e^{-\frac{x}{2}} \cdot\left(-\frac{1}{2}\right) \cdot \operatorname{arctg} e^{\frac{x}{2}}+e^{-\frac{x}{2}} \cdot \frac{1}{1+e^{x}} \cdot e^{\frac{x}{2}} \cdot \frac{1}{2}\right)-2 \operatorname{arctg} e^{\frac{x}{2}} \cdot \frac{1}{1+e^{x}} \cdot e^{\frac{x}{2}} \cdot \frac{1}{2}= \\
& =1-\frac{1}{1+e^{x}} \cdot e^{x}+e^{-\frac{x}{2}} \cdot \operatorname{arctg} e^{\frac{x}{2}}-\frac{1}{1+e^{x}}-\operatorname{arctg} e^{\frac{x}{2}} \cdot \frac{1}{1+e^{x}} \cdot e^{\frac{x}{2}}= \\
& =\frac{1+e^{x}}{1+e^{x}}-\frac{e^{x}}{1+e^{x}}-\frac{1}{1+e^{x}}+\operatorname{arctg} e^{\frac{x}{2}} \cdot\left(e^{-\frac{x}{2}}-\frac{1}{1+e^{x}} \cdot e^{\frac{x}{2}}\right)= \\
& =\operatorname{arctg} e^{\frac{x}{2}} \cdot\left(\frac{e^{-x / 2}+e^{x / 2}-e^{x / 2}}{1+e^{x}}\right)=\frac{\operatorname{arctg} e^{x / 2}}{e^{x / 2} \cdot\left(1+e^{x}\right)}
\end{aligned}
$$

Kuznetsov Differentiation Problem 7-19