# Integral of Sinx with absolute value

Which one is correct?

in Microsoft Mathematics :

in Wolfram Alpha :

and what does $\mathrm{sgn} (\sin x)$ mean ?

Finally, what is the answer to this integral?

-
Microsoft doesn't know that you meant the same thing by $X$ as you meant by $x$. – Gerry Myerson Mar 9 '14 at 10:47
Note that the input to Microsoft Mathematics has an uppercase $X$ as the argument to the sine, but a lowercase $x$ as the integration variable. – Daniel Fischer Mar 9 '14 at 10:47
Alpha's answer is only correct if you consider each interval $n\pi < x < (n+1)\pi$ separately. If you want an antiderivative valid on the whole real line, you must piece together these functions with different constants of integration on each interval, so that you get a single continuous function. – Hans Lundmark Mar 9 '14 at 13:04

In the first case, the integrand was $\sin X$ (note the uppercase) which is independent of $x$. In the second case, the integrand was $\sin x$ which is a function of $x$.
$sgn(x)$ is the sign function. sgn(x) = \begin{cases} \begin{align} 1 &: x > 0 \\ 0 &: x = 0\\ -1 &: x < 0 \end{align} \end{cases}