Am I differentiating this wrong? Differentiation is the opposite of Integration
$$\begin{align}\int \cos^2x dx\end{align}$$
$$\begin{align}-\frac{\cos^3x}{3\sin x}\end{align}$$
Now if we differentiate $-\frac{\cos^3x}{3\sin x}$ we should get $\cos^2x$. But I have always thought the differentiation goes like (and works out fine).
$$\begin{align}\frac{d}{dx}(-\frac{\cos^3x}{3\sin x})=  \frac{-3 \cos^2x (\frac{d}{dx}\cos x)}{3\sin x}=\cos^2x\end{align}$$
And Tarda we get the answer as expected ($\cos^2x$). I normally never thought about it, but today this came to my mind. How come this isn't wrong. And it should be wrong I think. Why? 
$$\begin{align}\frac{d}{dx}(-\frac{\cos^3x}{3\sin x})\end{align}$$
This is in the form $u/v$ , so we we need to use the chain rule/quotient rule, right? But here we havent used Quotient Rule which should be:
$$\begin{align}\frac{d}{dx}\frac{-\cos^3x}{3\sin x}=\frac{-9\sin x\cos^2x \sin x+3\cos^4x}{9\sin^2x}\end{align}$$
But Stilll even without using Quotient rule, I end u with the correct answer. Why is that ? we totally forget about the $3\sin x$ in denominator and differentiate only the top which is $-\cos^3x$ and still gets it right.

You are wrong in $\int \cos^2 x dx = -\frac{\cos^3 x}{3\sin x}$. You seem to be confused with power rule ($\int x^n dx = \frac{x^{n+1}}{n+1} + c $, for $n \neq -1$), which is only valid for powers of $x$, not $f(x)$. Also, there's an extra $\sin x$ in denominator...
The correct way to evaluate $\int \cos^2 x dx$ is:
$\int \cos^2 x dx = \int \frac{1+\cos 2x}{2} dx = \int \frac12 (1 + \cos 2x) dx = \frac 12(x + \frac{\sin 2x}{2}) + c$.
Now, if you differentiate this, you do get $\frac{1 + \cos 2x}{2}$ back, which equals $\cos ^2 x$.
Proof of $\cos^2 x = \frac{1+\cos 2x}{2}$:
Now, $1 + \cos 2x = \cos 0 + \cos 2x = 2\cos(\frac{0+2x}{2})\cos(\frac{0-2x}{2}) = 2\cos(x)\cos(-x) = 2\cos^2 x$, because $\cos (-x) = \cos x$.

Also, we know that $\cos2x=2\cos^2x-1$, then $\cos2x+1=\cos^2x$.
