y= |sin(x)| = sgn(sin(x)) sin(x)

Where sgn(u)=1 if u>=0 and sgn(u)=-1 if u<0

so between the zeros of sin(x) sgn(sin(x)) is a constant so:

dy/dx = sgn(sin(x)) d/dx sin(x) = sgn(sin(x)) cos(x).

Now we need to check if the derivative exists when sin(x)=0, but we

know that |sin(x)| has corners at these points so the derivative does

not exist;

so:

d/dx[|sin(x)| = sgn(sin(x)) cos(x) for x in R-{k*pi, k in Z}

This may now be simplified by observing that when u!=0 we may

write:

sgn(u) = u/|u|,

so we may write:

d/dx[|sin(x)| = [sin(x)/|sin(x)|] cos(x) for x in R-{k*pi, k in Z}

RonL