# Quotient rule, one sign wrong

After using the quotient rule on

$$y=\frac{\cos x}{x}$$

I got

$$\frac{-x\sin x -\cos x}{x^2}.$$

However the answers says it should be

$$\frac{-x\sin x + \cos x}{x^2}.$$

So who's right?

-
It's always fun finding a mistake in a book. wolframalpha.com/input/?i=d%2Fdx%28cos%28x%29%2Fx%29 – Quang Hoang Aug 24 '14 at 19:08
So both forms are correct then? – Paul Aug 24 '14 at 19:09
@Paul Nope, you are correct, and the book answer is wrong. – m0nhawk Aug 24 '14 at 19:10

## 3 Answers

Paul, we meet again. I see you followed my previous answer and got the right answer. However, all your book did is a little bit of algebra:

$$\frac{-x\sin x -\cos x}{x^2} =\frac{(-1)(x\sin x +\cos x)}{x^2}= -\frac{x\sin x +\cos x}{x^2}$$

I'm assuming that's what it says in the book (and you wrote it wrong in your post). If not, then the book is wrong.

-
That's what I have just noticed, when I typed It in the mins should be like your last one. So everyone's right :) – Paul Aug 24 '14 at 19:15
Can't seem to edit that last comment, so to avoid confusion I should of said "minus" instead of "mins" – Paul Aug 24 '14 at 19:29

$y=\dfrac{\cos x}{x}$

$y'=\dfrac{\cos x'\cdot x-\cos x\cdot x'}{x^2}=\dfrac{-x\sin x\color{red}-\cos x}{x^2}$

You are right. :-)

-

Sometimes I find it easier to rewrite in a way that allows use of the product rule.

$$y(x) = x^{-1}cos(x)$$ Now applying the power rule we have $$y'(x)=(-1)*x^{-2}cos(x)+x^{-1}(-sin(x))$$ which simplifies to $$y'(x)=-x^{-2}cos(x)-x^{-1}sin(x)$$ $$=\frac{-cos(x)}{x^{2}}-\frac{sin(x)}{x}$$ $$=\frac{-cos(x)}{x^{2}}-\frac{xsin(x)}{x^{2}}$$ $$=\frac{-cos(x)-xsin(x)}{x^{2}}$$ So as many users have already pointed out to you, you are indeed correct.

-
\cos(x) makes $\cos(x)$, which looks better than $cos(x)$. Similarly for $\sin(x)$. – Jonas Meyer Aug 24 '14 at 19:29
Good to know. Thanks! – graydad Aug 24 '14 at 19:30