Can't argue with success? Looking for "bad math" that "gets away with it" I'm looking for cases of invalid math operations producing (in spite of it all) correct results (aka "every math teacher's nightmare").
One example would be "cancelling" the 6's in
$$\frac{64}{16}.$$
Another one would be something like
$$\frac{9}{2} - \frac{25}{10} = \frac{9 - 25}{2 - 10} = \frac{-16}{-8} = 2 \;\;.$$
Yet another one would be
$$x^1 - 1^0 = (x - 1)^{(1 - 0)} = x - 1\;\;.$$
Note that I am specifically not interested in mathematical fallacies (aka spurious proofs).  Such fallacies produce shockingly wrong ends by (seemingly) valid means, whereas what I am looking for all cases where one arrives at valid ends by (shockingly) wrong means.
Edit: fixed typo in last example.

Does this count? It can be shown that following the steps will give the correct answer, but the steps themselves are sometimes questionable. 
Let $y=(x-1)^3(x-2)^5(x-3)^7$. Find $\dfrac{dy}{dx}$.
Take the log of both sides. We get
$$\log y=3\log(x-1)+5\log(x-2)+7\log(x-3).$$
Thus 
$$\frac{1}{y}\frac{dy}{dx}=\frac{3}{x-1}+\frac{5}{x-2}+\frac{7}{x-3},$$
and therefore 
$$\frac{dy}{dx}=3(x-1)^2(x-2)^5(x-3)^7 + 5(x-1)^3(x-2)^4(x-3)^7+7(x-1)^3(x-2)^5(x-3)^6.$$
Simple, generalizes, true for all $x$, including many $x$ at which log is not defined. 
Remark: One can find many examples in Euler: formal manipulations that lead to the correct answer through in principle unjustified steps. About this, Euler wrote something like "Sometimes my pencil is more clever than I am."
