Let y=xx−2sinx
Also, let xx=u and 2sinx=v
∴y=u−v
⇒dydx=dudx−dvdx
u=xx
Taking logarithm on both the sides, we obtain
logu=xlogx
Differentiating both sides with respect to x, we obtain
1ududx=[ddx(x)×logx+x×ddx(logx)]
⇒dudx=u[1×logx+x×1x]
⇒dudx=xx(1+logx)
v=2sinx
Taking logarithm on both the sides with respect to x, we obtain
logv=sinxlog2
Differentiating both sides with respect to x, we obtain
1v.dvdx=log2.ddx(sinx)
⇒dvdx=vlog2cosx
⇒dvdx=2sinxcosxlog2
∴dydx=xx(1+logx)−2sinxcosxlog2