Let, the function is,
f( x )=( x+secx )( x−tanx )
Apply the formula of Leibnitz Product rule.
f ′ ( x )=( x+secx ) d dx ( x−tanx )+( x−tanx ) d dx ( x+secx ) =( x+secx )[ d dx ( x )− d dx tanx ]+( x−tanx )[ d dx ( x )+ d dx secx ] =( x+secx )[ 1− d dx tanx ]+( x−tanx )[ 1+ d dx secx ]
Assume f 1 ( x )=tanx and f 2 ( x )=secx.
Replace x with ( x+h ), then f 1 ( x+h )=tan( x+h ) and f 2 ( x+h )=sec( x+h ).
Use first principal of derivative,
f ′ 1 ( x )= lim h→0 ( f 1 ( x+h )− f 1 ( x ) h ) = lim h→0 ( tan( x+h )−tan( x ) h ) = lim h→0 ( tan( x+h )−tanx h ) = lim h→0 1 h ( sin( x+h ) cos( x+h ) − sinx cosx )
Further simplify.
f ′ 1 ( x )= lim h→0 1 h ( sin( x+h )cosx−sinxcos( x+h ) cos( x+h )cosx ) = lim h→0 1 h ( sin( h ) cos( x+h )cosx ) =( lim h→0 sinh h )( lim h→0 1 cos( x+h )cosx )
Further simplify,
f ′ 1 ( x )=1× 1 cos 2 x = sec 2 x
Again use first principal of derivative,
d dx tanx= sec 2 x(2)
f ′ 2 ( x )= lim h→0 ( f 2 ( x+h )− f 2 ( x ) h ) = lim h→0 ( sec( x+h )−sec( x ) h ) = lim h→0 1 h ( 1 cos( x+h ) − 1 cosx ) = lim h→0 1 h ( cosx−cos( x+h ) cos( x+h )cosx )
Further simplify,
f ′ 2 ( x )= lim h→0 1 h ( −2sin( x+x+h 2 )⋅sin( x−x−h 2 ) cos( x+h ) ) = 1 cosx lim h→0 1 h ( sin( 2x+h 2 )⋅( sin( h 2 ) h 2 ) cos( x+h ) ) =secx ( lim h→0 sin( 2x+h 2 ) )⋅( lim h 2 →0 sin( h 2 ) h 2 ) lim h→0 cos( x+h )
Further simplify,
f ′ 2 ( x )=secx sinx cosx =secxtanx d dx secx=sectanx (3)
Substitute the values from equation (2) and (3) into equation (1).
f ′ ( x )=( x+secx )[ 1− sec 2 x ]+( x−tanx )[ 1+secxtanx ]
Thus, derivative of ( x+secx )( x−tanx ) is ( x+secx )[ 1− sec 2 x ]+( x−tanx )[ 1+secxtanx ].