A question says to find the derivative of
$\displaystyle e^3/(sin(x)+1)$
The answer I got was $\displaystyle -e^3cosx/(sinx+1)^2$
My friend got
$\displaystyle (e^3sinx+e^3 - e^3cosx)/(sinx+1)^2$
The online calculators all agree with me, but he used the quotient rule (so did I), but I pulled e^3 out of it and used 1/sinx+1 to perform the quotient rule.
Which is the correct method?