Answer
$y'=\frac{e^{-x}cos^{2}x}{x^{2}+x+1}[-2tanx-1-\frac{2x+1}{{x^{2}+x+1}}]$
or
$y'=-\frac{e^{-x}cos^{2}x}{x^{2}+x+1}[1+2tanx+\frac{2x+1}{{x^{2}+x+1}}]$
Work Step by Step
Use logarithmic differentiation to find the derivative of the function
$y=\frac{e^{-x}cos^{2}x}{x^{2}+x+1}$
$lny=ln[\frac{e^{-x}cos^{2}x}{x^{2}+x+1}]$
Use logarithmic properties $ln(xy)=lnx+lny$ , $ln(\frac{x}
{y})=lnx-lny$ and $ln(x^{y})=ylnx$.
$lny=ln[{e^{-x}cos^{2}x}]-ln[{x^{2}+x+1}]$
Differentiate with respect to $x$.
$\frac{y'}{y}=\frac{1}{{e^{-x}cos^{2}x}}\frac{d}{dx}({e^{-x}cos^{2}x})-\frac{1}{{x^{2}+x+1}}\frac{d}{dx}({x^{2}+x+1})$
$=\frac{(e^{-x}-2cosxsinx)-(e^{-x}cos^{2}x)}{{e^{-x}cos^{2}x}}-\frac{2x+1}{{x^{2}+x+1}}$
$=\frac{-sin2x-cos^{2}x}{{cos^{2}x}}-\frac{2x+1}{{x^{2}+x+1}}$
$=-2tanx-1-\frac{2x+1}{{x^{2}+x+1}}$
Thus, $y'=y[-2tanx-1-\frac{2x+1}{{x^{2}+x+1}}]$
Hence, $y'=\frac{e^{-x}cos^{2}x}{x^{2}+x+1}[-2tanx-1-\frac{2x+1}{{x^{2}+x+1}}]$
or
$y'=-\frac{e^{-x}cos^{2}x}{x^{2}+x+1}[1+2tanx+\frac{2x+1}{{x^{2}+x+1}}]$