When 0<x+1<1, that is, -1<x<0, ln(x+1)<0 so |ln(x+1)|=ln(1/(x+1)) or -ln(x+1).
When x≥0 ln(1+x)≥0, that is, |ln(x+1)|=ln(x+1).
So there are two derivatives depending on x.
(1) -1<x<0:
-cos(ln(x+1))/(x+1). [Note that cos(-θ)=cos(θ).]
(2) x≥0:
cos(ln(x+1))/(x+1).
Note that when x=0, the derivative is 1 in each case.