Writing the given eqn. as, #2cosy=e^(x-y)#
#:. ln(2cosy)=ln(e^(x-y)).# Using the Rules of Log., we have,
#:. ln2+lncosy=(x-y)lne,# i.e., #ln2+lncosy=x-y#
Now we diff. both sides w.r.t. #x,#
#d/dxln2+d/dx(lncosy)=d/dx(x)-d/dx(y)#
:. #0+d/dy(lncosy)*dy/dx=1-dy/dx#..................... [Chain Rule]
#:.1/cosy*d/dy(cosy)*dy/dx=1-dy/dx#
#:.(1/cosy)(-siny)dy/dx=1-dy/dx#
#:.-tanydy/dx=1-dy/dx#
#:.(1-tany)dy/dx=1#
#:. dy/dx=1/(1-tany).#
Alternatively, #2cosy=e^(x-y)...(1) rArr 2cosy*e^y=e^x#
Diif.ing both sides, w.r.t. #y#, we have,
#2{e^y*cosy-e^y*siny}=d/dye^x=d/dxe^x*dx/dy=e^x*dx/dy#
#:. 2e^y(cosy-siny)=e^x*dx/dy#
#:. 2(cosy-siny)=e^(x-y)dx/dy=2cosydx/dy,#.........[.by #(1)#]
Therefore, #dy/dx=1/(dx/dy)=cosy/(cosy-siny)#, or, #=1/(1-tany),#
as obtained earlier!
Don't you find it enjoyable?, Well, I do!