Given,
∫(ex+1x(cosx−sinx)+(ex+1)2g(x)(ex+1−xex))dx=ex+1xg(x)+C
Differentiating both sides with respect to x,
ex+1x(cosx−sinx)+(ex+1)2g(x)(ex+1−xex)=dxd(ex+1xg(x))
Using quotient rule on the RHS,
dxd(ex+1xg(x))=(ex+1)2(ex+1)(g(x)+xg′(x))−xexg(x)
Therefore,
ex+1x(cosx−sinx)+(ex+1)2g(x)(ex+1−xex)=(ex+1)2(ex+1)(g(x)+xg′(x))−xexg(x)
Multiplying throughout by (ex+1)2,
x(cosx−sinx)(ex+1)+g(x)(ex+1−xex)=(ex+1)(g(x)+xg′(x))−xexg(x)
Now expand the RHS,
=(ex+1)g(x)+x(ex+1)g′(x)−xexg(x)
Observe that the terms containing g(x) cancel from both sides. Hence,
x(cosx−sinx)(ex+1)=x(ex+1)g′(x)
Since x>0 and ex+1>0, dividing throughout gives
g′(x)=cosx−sinx
Integrating,
g(x)=sinx+cosx+C
Now consider
ϕ(x)=g(x)−g′(x)
Substituting the values of g(x) and g′(x),
ϕ(x)=(sinx+cosx+C)−(cosx−sinx)
ϕ(x)=2sinx+C
Differentiating,
ϕ′(x)=2cosx
For 0<x<2π,
cosx>0
Hence,
ϕ′(x)>0
Therefore, ϕ(x)=g(x)−g′(x) is increasing in (0,2π).