-sign(cos(x))*sin(x) + cos(x)
$$- \sin{\left(x \right)} \operatorname{sign}{\left(\cos{\left(x \right)} \right)} + \cos{\left(x \right)}$$
2
-sin(x) - cos(x)*sign(cos(x)) + 2*sin (x)*DiracDelta(cos(x))
$$2 \sin^{2}{\left(x \right)} \delta\left(\cos{\left(x \right)}\right) - \sin{\left(x \right)} - \cos{\left(x \right)} \operatorname{sign}{\left(\cos{\left(x \right)} \right)}$$
3
-cos(x) + sign(cos(x))*sin(x) - 2*sin (x)*DiracDelta(cos(x), 1) + 6*DiracDelta(cos(x))*cos(x)*sin(x)
$$- 2 \sin^{3}{\left(x \right)} \delta^{\left( 1 \right)}\left( \cos{\left(x \right)} \right) + 6 \sin{\left(x \right)} \cos{\left(x \right)} \delta\left(\cos{\left(x \right)}\right) + \sin{\left(x \right)} \operatorname{sign}{\left(\cos{\left(x \right)} \right)} - \cos{\left(x \right)}$$