online advertising

Sunday, December 4, 2016

Exercise from Quora

Problem:

Please find the problem here.

Solution:

$\begin{eqnarray*} (0! + 0! + 0!)! &=& 6 \\ (1 + 1 + 1)! &=& 6 \\ 2 + 2 + 2 &=& 6 \\ (3 + 3 - 3)! &=& 6 \\ (4 - 4 / 4)! &=& 6 \\ 5 + 5 / 5 &=& 6 \\ 6 + 6 - 6 &=& 6 \\ 7 - 7 / 7 &=& 6 \\ (\sqrt{8 + 8 / 8})! &=& 6 \\ (\sqrt{9 + 9 - 9})! &=& 6 \end{eqnarray*} $

Saturday, November 26, 2016

Exercise from 9gag.com?

Problem:


http://9gag.com/gag/aVDxn1O

Solution:

Denote bottle by $ b $

$ b + b + b = 30 $, therefore $ b = 10 $.

Denote the hamburger by $ h $

$ b + h + h = 20 $, therefore $ h = 5 $

Denote the beer by $ e $

$ h + e + e = 9 $, therefore $ e = 2 $.

Now here is the fun

$ \int\limits_{2h - b}^{\infty}{\frac{b\sin x}{ex}dx} = \int\limits_{0}^{\infty}{\frac{10\sin x}{2x}dx} = 5\int\limits_{0}^{\infty}{\frac{\sin x}{x}dx} = \frac{5\pi}{2} $

The last integral is well known, for example, see:
http://math.stackexchange.com/questions/5248/solving-the-integral-int-0-infty-frac-sinxx-dx-frac-pi2

This video explains the Feynman trick!
https://www.youtube.com/watch?v=3LsXWPzlOhQ

Have fun!

Wednesday, November 23, 2016

Mathematical Analysis - Exercise 1.3

Problem:


Solution:

Suppose $ n = ab $ is not prime, then we can write $ 2^{ab} = (2^{a})^b $. Applying the identity we just proved in the previous problem, we have:

$ 2^{ab} - 1 =  (2^{a})^b - 1 =  (2^{a})^b - 1^b = (2^a - 1)(\cdots) $.

Therefore if $ a \ne 1 $, we have a non-trivial factor for $ 2^{ab} - 1 $.

The contradiction show $ n $ has to be prime.

Tuesday, November 22, 2016

Mathematical Analysis - Exercise 1.2

Problem:

Solution:

The right hand side sounds like something we can telescope, let's see:

$ \begin{eqnarray*} & & (a - b)\sum\limits_{k = 0}^{n-1}{a^{k}b^{n-1-k}} \\ &=& a\sum\limits_{k = 0}^{n-1}{a^{k}b^{n-1-k}} - b\sum\limits_{k = 0}^{n-1}{a^{k}b^{n-1-k}} \\ &=& \sum\limits_{k = 0}^{n-1}{a^{k+1}b^{n-1-k}} - \sum\limits_{k = 0}^{n-1}{a^{k}b^{n-k}} \\ &=& (a^n + \sum\limits_{k = 0}^{n-2}{a^{k+1}b^{n-1-k}}) - (\sum\limits_{k = 1}^{n-1}{a^{k}b^{n-k}} + b^n ) \\ &=& (a^n + \sum\limits_{k = 1}^{n-1}{a^{k}b^{n-k}}) - (\sum\limits_{k = 1}^{n-1}{a^{k}b^{n-k}} + b^n ) \\ &=& a^n - b^n \end{eqnarray*} $

Mathematical Analysis - Exercise 1.1

Problem:


Solution:

Suppose there exists a largest prime, that means there is only finite number of primes. Consider the product of them plus 1. This number cannot be a prime number because it is larger than the largest prime.

Now consider its prime factorization. Note that when this number is divided by any prime, the remainder 1, therefore, there is just no way of prime factorizing it, contradicting the fundamental theorem of arithmetic, therefore there is no largest prime!

Monday, November 14, 2016

An exercise about Lagrange mean value theorem

Problem:


Solution:

This is a really bored after lunch hour, so I decided let's do a simple calculus exercise to wake my brain up.

The $ \frac{1}{1 + u^2} $ reminded me this has something to do with $ \tan $. So let's do this simple integration.

$ \int{\frac{du}{1+u^2}} = \int{\frac{\sec^2\theta d\theta}{1+\tan^2 \theta}} = \int{d\theta} = \theta = \tan^{-1}u $.

That's refresh my memory! $ \frac{1}{1 + u^2} $ is the derivative of $ \tan^{-1} u $.

Now we apply the Lagrange's mean value theorem to get:

$ \frac{\tan^{-1}v - \tan^{-1}u}{v - u} = \frac{1}{1 + \delta^2} $.

Where $ u < \delta < v $.

$ \tan^{-1}v - \tan^{-1}u= \frac{v - u}{1 + \delta^2} $.

Therefore we conclude (remember when you increase the denominator, the value decrease, and vice versa):

$ \frac{v-u}{1 + v^2} < \tan^{-1}v - \tan^{-1}u< \frac{v - u}{1 + u^2} $.

Last but not least, set $ u = 1 $ and $ v = \frac{4}{3} $ gives

$ \frac{\frac{4}{3}-1}{1 + \left(\frac{4}{3}\right)^2} < \tan^{-1}\frac{4}{3} - \tan^{-1}1< \frac{\frac{4}{3}-1}{1 + 1^2} $.

$ \frac{3}{25} < \tan^{-1}\frac{4}{3} - \tan^{-1}1< \frac{1}{6} $.

$ \frac{\pi}{4} + \frac{3}{25} < \tan^{-1}\frac{4}{3} < \frac{\pi}{4} + \frac{1}{6} $.

Friday, November 11, 2016

Minimizing sum of distances

Problem:

Find $ m $ such that $ \sum_{i = 1}^{n}{\left|x_i - n\right|} $ is minimized.

Solution:

The reaction is that the mean is going to minimize it, but it isn't true. The median will.

Consider a random $ m $, suppose there are $ a $ numbers in $ x_i $ are less than $ m $ and $ b $ numbers of $ x_i $ are larger than $ m $.

If we decrease $ m $ by 1, we change the sum by $ b - a $.
If we increase $ m $ by 1, we change the sum by $ a - b $.

Therefore, as long as $ a \ne b $, we can always reduce the sum, therefore, the only reasonable answer is the median.

This is for the case of odd number of elements, in case we have even number of element, any number between the two center elements would give the same minimal distance sum.

Thanks Sven for generalizing the problem, and Noah for the idea about median.