Let y=xxcosx+x2+1x2−1
Also, let u=xxcosx and v=x2+1x2−1
∴y=u+v
⇒dydx=dudx+dvdx ...(1)
u=xxcosx
⇒logu=log(xxcosx)
⇒logu=xcosxlogx
Differentiating both sides with respect to x, we obtain
1ududx=ddx(x).cosx.logx+xddx(cosx).logx+xcosx.ddx(logx)
⇒dudx=u[1.cosx.logx+x.(−sinx)logx+xcosx.1x]
⇒dudx=xxcosx(cosx.logx−xsinxlogx+cosx)
⇒dudx=xxcosx[cosx(1+logx)−xsinxlogx] ...(2)
v=x2+1x2−1
⇒logv=log(x2+1)−log(x2−1)
Differentiating both sides with respect to x, we obtain
1vdvdx=2xx2+1−2xx2−1
⇒dvdx=v[2x(x2−1)−2x(x2+1)(x2+1)(x2−1)]
⇒dvdx=x2+1x2−1×[−4x(x2+1)(x2−1)]
⇒dvdx=−4x(x2−1)2 ...(3)
From (1), (2) and (3), we obtain
⇒dydx=xxcosx[cosx(1+logx)−xsinxlogx]−4x(x2−1)2