Fun:Mathematical fallacies

(Incorrect) proof that 1 = 2
assume:
 * $$A=B$$

multiply both sides by $$A$$ :
 * $$AA=AB$$

subtract $$B^2$$ from both sides:
 * $$A^2-B^2=AB-B^2$$

factor both sides:
 * $$(A-B)(A+B)=B(A-B)$$

divide both sides by $$A-B$$ :
 * $$A+B=B$$

as A and B are equal, substitute all $$A$$s with $$B$$s:
 * $$B+B=B$$

continuing:
 * $$2B=B$$
 * $$2=1$$

Q.E.D.

A good example of why dividing by zero is a bad move.

(Incorrect) proof that 0 = -1 (or 1 = 2 if you prefer)

 * $$\int\tan(x)dx=\int\tan(x)dx$$

substitute $$\tan(x)$$ :
 * $$\int\tan(x)dx=\int\sin(x)\sec(x)dx$$

Integrate by parts,

assume $$u=\sec(x),dv=\sin(x)dx$$ :
 * $$\int\tan(x)dx=-\sec(x)\cos(x)+\int\cos(x)\tan(x)\sec(x)dx$$

but $$\cos(x)\sec(x)=1$$ so:
 * $$\int\tan(x)dx=-1+\int\tan(x)dx$$

we substract both sides by $$\int\tan(x)dx$$ :
 * $$\int\tan(x)dx-\int\tan(x)dx =-1+\int\tan(x)dx-\int\tan(x)dx$$

then:
 * $$0=-1$$

(Incorrect) proof that 1 = -1
assume: $$\mathbf{-1}=\mathbf{-1}$$ rewrite -1 two different ways: $$\frac1{-1}=\frac{-1}{1}$$ take the square root of both sides: $$\sqrt{\frac1{-1}}=\sqrt{\frac{-1}{1}}$$ using laws of square roots, rewrite both sides: $$\frac{\sqrt1}{\sqrt{-1}}=\frac{\sqrt{-1}}{\sqrt1}$$ multiply both sides by $$\sqrt1\sqrt{-1}$$ and reduce: $$\sqrt1\sqrt1=\sqrt{-1}\sqrt{-1}$$ the square root of a number squared equals the number itself, so: $$\mathbf1=\mathbf{-1}$$

(Incorrect) proof that an elephant and a mosquito have the same mass
Let $$a$$ = mass of elephant in kg Let $$x$$ = mass of mosquito in kg Let $$y$$ = their combined mass in kg Then:
 * $$\begin{align}&a+x=y\\&a=y-x\\&a-y=-x\end{align}$$

multiplying the two latter equations:
 * $$a^2-ay=x^2-xy$$

adding $$\left(\frac{y}{2}\right)^2$$ to both sides:
 * $$a^2-ay+\left(\frac{y}{2}\right)^2=x^2-xy+(\frac{y}{2})^2$$

which can be rewritten:
 * $$\left(a-\frac{y}{2}\right)^2=\left(x-\frac{y}{2}\right)^2$$

from which derives:
 * $$a-\frac{y}{2}=x-\frac{y}{2}$$

and finally:
 * $$a=x$$

that is, mass of elephant = mass of mosquito.

The fallacy lies in the second to last step, when you take the square root of both sides. For all $$x\in\R$$, $$\sqrt{x^2}=|x|$$. So, the last line should not be $$a-\frac{y}{2}=x-\frac{y}{2}$$, but $$\left|a-\frac{y}{2}\right|=\left|x-\frac{y}{2}\right|$$. In essence, the "proof" is claiming that $$(-x)^2=(+x)^2$$ implies $$-x=+x$$.

Another proof
Consider the function $$f(x)=x$$, with domain the positive reals. Write
 * $$x=\underbrace{1+\cdots+1}_{x\text{ times}}$$

Then multiplying through by $$x$$ we obtain
 * $$x^2=\underbrace{x+\cdots+x}_{x\text{ times}}$$

Differentiating yields
 * $$2x=\underbrace{1+\cdots+1}_{x\text{ times}}=x$$

Since by assumption $$x>0$$ we may divide through by $$x$$, whence $$2=1$$.

(Incorrect) proof that I am the Pope
This is a classic by the mathematician G. H. Hardy.

The Pope and I are two. [That is, two people.]

By the previous theorem, 2 = 1.

Therefore, the Pope and I are one.

(Technically, this proof is valid, in the sense that the conclusion follows from the premise. It's just that the premise is wrong.)

Another (incorrect) proof that 1 = -1

 * $$\begin{align}

&\log\left((-i)^2\right)=\log\left((-i)^2\right)\\ &\log\left((-i)^2\right)=2\log(-i)\\ &\log(-1)=2\left(\frac{-\pi i}{2}\right)\\ &\pi i=-\pi i \end{align}$$

And dividing by $$\pi i$$ :


 * $$1=-1$$

This may be why assfly hates complex numbers.