Set v=yx, so x=yv and dydx=v+dyydv. Consequently x−dyydx=−dyy2dv.
Substitution gives y=−dyy2sinv⋅dv. Because y>0, this is −sinvdv=ydy. Integrating yields cosv=logy+C.
At y=1,v=1x(1)=2π, so 0=0+C and C=0. Thus cos(yx(y))=logy.
At y=2,cos(2x(2))=log2. Apply the double-angle identity to obtain cos(x(2))=2cos2(2x(2))−1=2(log2)2−1.