Consider the given integral.
I=∫xdx1+xtanx
I=∫xdx1+xsinxcosx
I=∫xcosxdxxsinx+cosx
Let t=xsinx+cosx
dtdx=xcosx+sinx−sinx
dt=xcosxdx
Therefore,
I=∫dtt
I=ln(t)+C
On putting the value of t, we get
I=ln(xsinx+cosx)+C
Hence, this is the answer.