+c On differentiating both sides w.r.t. x, we get (‌
x(cos‌x−sin‌x)
ex+1
+‌
g(x)(ex+1−xex.
(ex+1)2
) =‌
(ex+1)(g(x)+xg′(x))−ex⋅x⋅g(x)
(ex+1)2
(ex+1)x(cos‌x−sin‌x)+g(x)(ex+1−xex) =(ex+1)(g(x)+xg′(x))−ex⋅x⋅g(x) ⇒g′(x)=cos‌x−sin‌x ⇒g(x)=sin‌x+cos‌x+C g(x) is increasing in (0,π∕4) g′′(x)=−sin‌x−cos‌x<0 ⇒g′(x) is decreasing functionlet h(x)=g(x)+g′(x)=2‌cos‌x+C⇒h′(x)=g′(x)+g′′(x)=−2‌sin‌x<0 ⇒h is decreasing let φ(x)=g(x)−g′(x)=2‌sin‌x+C⇒φ′(x)=g′(x)−g′′(x)=2‌cos‌x>0⇒φ is increasing