What is the derivative of # y = (cosx-sinx)/(cosx+sinx)#?

2 Answers
Feb 8, 2018

#y=frac{cosx-sinx}{cosx+sinx}#

Use the quotient rule:
#dy/dx = frac{(cosx+sinx)(-sinx-cosx)-(cosx-sinx)(-sinx+cosx)}{(cosx + sinx)(cosx+sinx)}#

Distribute the terms to simplify
# = frac{-sinxcosx-cos^2x-sin^2x-sinxcosx -(-sinxcosx+cos^2x+sin^2x-sinxcosx)}{cos^2x+2sinxcosx+sin^2x}#

# = frac{-2sinxcosx-1-(-2sinxcosx+1)}{2sinxcosx+1}#

# = frac{2(2sinxcosx-1)}{2sinxcosx+1}#

Multiply by the conjugate of the denominator over itself:
# = frac{2(2sinxcosx-1)}{2sinxcosx+1}*frac{2sinxcosx-1}{2sinxcosx-1}#

# = frac{2(2sinxcosx-1)^2}{4sin^2xcos^2x-1}#

Feb 8, 2018

# dy/dx = 2sec2x(tan2x - sec 2x) #

Explanation:

We have:

# y = (cosx-sinx)/(cosx+sinx)#

We can write:

# y = (cosx-sinx)/(cosx+sinx) * (cosx-sinx)/(cosx-sinx)#

# \ \ = (cos^2x-2sinxcosx+sin^2x)/(cos^2x-sin^2x)#

# \ \ = (1-sin2x)/(cos2x)#

# \ \ = sec2x-tan2x#

Then differentiating wrt #x#:

# dy/dx = 2sec2xtan2x - 2sec^2 2x #
# \ \ \ \ \ = 2sec2x(tan2x - sec 2x) #