Let y=xsinx+(sinx)cosx
Also, let u=xsinx and v=(sinx)cosx
∴y=u+v
⇒dydx=dudx+dvdx ...(1)
u=xsinx
⇒logu=log(xsinx)
⇒logu=sinxlogx
Differentiating both sides with respect to x, we obtain
1ududx=ddx(sinx).logx+sinx.ddx(logx)
⇒dudx=u[cosxlogx+sinx.1x]
⇒dudx=xsinx[cosxlogx+sinxx] ...(2)
v=(sinx)cosx
logv=log(sinx)cosx
logv=cosxlog(sinx)
Differentiating both sides with respect to x, we obtain
1vdvdx=ddx(cosx)×log(sinx)+cosx×ddx[log(sinx)]
⇒dvdx=v[−sinxlog(sinx)+cosx.1sinx.ddx(sinx)]
⇒dvdx=(sinx)cosx[−sinxlogsinx+cosxsinxcosx]
⇒dvdx=(sinx)cosx[−sinxlogsinx+cotxcosx]
⇒dvdx=(sinx)cosx[cotxcosx−sinxlogsinx] ...(3)
From (1), (2) and (3), we obtain
dydx=xsinx[cosxlogx+sinxx]+(sinx)cosx[cotxcosx−sinxlogsinx]