## Task Condition

Find the derivative.

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

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