Monday, 8 July 2019

Find the probability mass function of opening boxes

There are five closed boxes on a table. Three of the boxes have
nice prizes inside. The other two do not. You open boxes one at a time until you
find a prize. Let X be the number of boxes you open.

a) Find the probability mass function of X.



I'm stuck on this question. Do I need to find the probability of all possible outcomes? Let E be empty and let F be a prize. Find P(F), P(EF), P(EEF)?

calculus - How to prove $f(x)=ax$ if $f(x+y)=f(x)+f(y)$ and $f$ is locally integrable




Suppose $f(x)$ is integrable in any bounded interval on $\mathbb R$, and it satisfies the equation $f(x+y)=f(x)+f(y)$ on $\mathbb R$. How to prove $f(x)=ax$?


Answer



Integrate the functional equation with respect to $x$ between 0 and 1. The result is the equation
$$
\int_y^{y+1} f(u) du = \int_0^1 f(x) dx + f(y).
$$
The integral on the left side exists and is continuous in $y$ because $f$ is locally integrable. Therefore the right side is also continuous in $y$; that is, $f$ is continuous! The rest is clear sailing.


trigonometry - Why is this derivative incorrect?




We have to find the derivative of $$f(x) = \dfrac{\tan(2x)}{\sin(x)}$$



I would like to know why my approach is incorrect:



$$f'(x) = \dfrac{\sin(x) \cdot \dfrac{2}{\cos^2(2x)} - \tan(2x) \cdot \cos(x)}{\sin^2(x)}$$



$$ = \dfrac{ 2 \sin(x) - \tan(2x) \cdot \cos(x)}{\cos^2(2x) \cdot \sin^2(x)}$$



$$ = \dfrac {2 \sin(x) - \sin(2x) \cdot \cos(x)}{\cos^3(2x) \cdot \sin^2(x)}$$




p.s. - To avoid confusion ; I wanted to get rid of the $\tan$. I'm sure there is a shorter method than this but I don't want it; I just want to know why this is wrong.


Answer



Third line is: $ \dfrac{ 2 \sin(x) - \tan(2x) \cdot \cos(x)\cdot\cos^2(2x)}{\cos^2(2x) \cdot \sin^2(x)}$
instead of $\\\\ \dfrac{ 2 \sin(x) - \tan(2x) \cdot \cos(x)}{\cos^2(2x) \cdot \sin^2(x)}$


Sunday, 7 July 2019

calculus - Evaluating $int_0^inftyfrac{log^{10} x}{1 +x^3}dx$



How one would evaluate the following integral?




$$\int_{0}^{\infty}\frac{\log^{10}(x)}{1+x^3} \, \mathrm{d}x$$




I have tried substitution with no success as well as differentiation under integral sign.
Can anyone help me please. I prefer not to use contour integration.



Answer



Caveat. I wrote the following answer not having seen the request
by the OP that he would prefer not to use contour integration. Perhaps
what follows can help make the case for and showcase contour
integration for this integral which belongs to a class that has
frequently appeared here at MSE.



Observe that if we are allowed to use a CAS (which would appear
necessary for this problem) then we may compute




$$Q_n = \int_0^\infty \frac{\log^n x}{x^3+1}\; dx
= \int_0^\infty f_n(x) \; dx$$



where



$$f_n(z) = \frac{\log^n z}{z^3+1}$$



by computing all $Q_n$ recursively by integrating $f_{n+1}(z), f_n(z),
\ldots$ and so on around a keyhole contour with the slot on the
positive real axis and the branch cut of the logarithm on that axis as

well, with argument from $0$ to $2\pi.$ The poles of $f_n(z)$ are at
$\rho_k = \exp(\pi i/3 + 2\pi ik /3)$ with $k=0,1,2.$ We obtain for
the residues



$$\mathrm{Res}_{z=\rho_k} f_n(z)
= \mathrm{Res}_{z=\rho_k} \frac{\log^n z}{z^3+1}
\\ = \left. \frac{\log^n z}{3z^2} \right|_{z=\rho_k}
= \left. z \frac{\log^n z}{3z^3} \right|_{z=\rho_k}
= - \left. \frac{1}{3} z \log^n z \right|_{z=\rho_k}
\\ = - \frac{1}{3} \exp(\pi i/3 + 2\pi ik /3)

(\pi i/3 + 2\pi i k/3)^n = \alpha_{n,k}.$$



We obtain by integrating $f_n(z)$



$$\int_0^\infty \frac{\log^n z}{z^3+1} \; dz +
\int_\infty^0 \frac{(2\pi i + \log z)^n}{z^3+1} \; dz
\\ = 2\pi i \sum_k \mathrm{Res}_{z=\rho_k} f_n(z)
= 2\pi i \sum_k \alpha_{n,k}.$$



This yields




$$ \sum_{p=0}^{n-1} {n\choose p} (2\pi i)^{n-p}
\int_0^\infty \frac{\log^p z}{z^3+1} \; dz
= - 2\pi i \sum_k \alpha_{n,k}$$



which is



$$ \sum_{p=0}^{n-1} {n\choose p} (2\pi i)^{n-p-1} Q_p
= - \sum_k \alpha_{n,k}$$




or



$$\sum_{p=0}^{n} {n+1\choose p} (2\pi i)^{n-p} Q_p
= - \sum_k \alpha_{n+1,k}$$



Therefore to compute $Q_n$ we use the recurrence



$$Q_n = - \frac{1}{n+1} \sum_k \alpha_{n+1,k}
- \frac{1}{n+1}
\sum_{p=0}^{n-1} {n+1\choose p} (2\pi i)^{n-p} Q_p$$




We just need the base case $Q_0$ which we compute using a pizza slice
resting on the positive real axis and having argument $2\pi/3$ so that
it only contains $\alpha_{0,0}.$ Parameterizing with $z=\exp(2\pi i/3)
t$ we get



$$Q_0 - \exp(2\pi i/3) Q_0 = 2\pi i \alpha_{0,0} $$



which yields




$$Q_0 = - \frac{1}{3} 2\pi i \frac{\exp(\pi i/3)}{1-\exp(2\pi i/3)}
= - \frac{1}{3} 2\pi i \frac{1}{\exp(-\pi i/3)-\exp(\pi i/3)}
\\ = \frac{1}{3} \pi \frac{1}{\sin(\pi/3)}
= \frac{2}{9}\sqrt{3}\pi.$$



With everything in place we obtain e.g. the sequence up to $n=10$



$$-{\frac {2\,{\pi }^{2}}{27}},{\frac {10\,{\pi }^{3}
\sqrt {3}}{243}},-{\frac {14\,{\pi }^{4}}{243}},{\frac
{34\,{\pi }^{5}\sqrt {3}}{729}},\\-{\frac {806\,{\pi }^{6

}}{6561}},{\frac {910\,{\pi }^{7}\sqrt {3}}{6561}},-{
\frac {10414\,{\pi }^{8}}{19683}},{\frac {415826\,{\pi
}^{9}\sqrt {3}}{531441}},\\-{\frac {685762\,{\pi }^{10}}{
177147}},{\frac {3786350\,{\pi }^{11}\sqrt {3}}{531441}},
\ldots$$



The Maple code for this is extremely simple, consisting of a few
lines.





alpha := (n,k) ->
-1/3 * exp(Pi*I/3+2*Pi*I*k/3) * (Pi*I/3 + 2*Pi*I*k/3)^n;

Q :=
proc(n)
option remember;
local res;

if n = 0 then return 2/9*sqrt(3)*Pi fi;


res :=
-1/(n+1)*add(alpha(n+1,k), k=0..2)
-1/(n+1)*add(binomial(n+1, p)*(2*Pi*I)^(n-p)*Q(p),
p=0..n-1);

simplify(res);
end;

VERIF := n -> int((log(x))^n/(x^3+1), x=0..infinity);



Observe that this method generalizes quite nicely. Suppose we are
interested in



$$K_n = \int_0^\infty \frac{\log^n x}{x^3-2x+4} \; dx.$$



The same computation goes through except now we have the following
three poles and their logarithms



$$\begin{array}{|l|l|} \hline

\text{pole} & \text{logarithm} \\ \hline
\rho_0 = 1+i
& \log \rho_0 = \frac{1}{2} \log 2 + \frac{1}{4}i\pi \\ \hline
\rho_1 = 1-i
& \log \rho_1 = \frac{1}{2} \log 2 + \frac{7}{4}i\pi \\ \hline
\rho_2 = -2
& \log \rho_2 = \log 2 + i\pi.\\ \hline
\end{array}$$



The rest is unchanged. We obtain e.g.




$$K_4 = {\frac {357\,{\pi }^{5}}{10240}}-{\frac {31\, \left( \ln
\left( 2 \right) \right) ^{5}}{1600}}-{\frac {139\,
\left( \ln \left( 2 \right) \right) ^{3}{\pi }^{2}}{1920
}} \\ -{\frac {4897\,\ln \left( 2 \right) {\pi }^{4}}{76800}}+
{\frac {9\, \left( \ln \left( 2 \right) \right) ^{4}\pi
}{640}}+{\frac {63\, \left( \ln \left( 2 \right) \right)
^{2}{\pi }^{3}}{1280}}.$$



The Maple code is very similar to the first version.





alpha_sum :=
proc(n)
local poles;

poles :=
[[1+I, 1/2*log(2) + I*Pi/4],
[1-I, 1/2*log(2) + 7*I*Pi/4],
[-2, log(2) + I*Pi]];


add(residue(1/(x^3-2*x+4), x=p[1])*p[2]^n,
p in poles);
end;

Q :=
proc(n)
option remember;
local res;


if n = 0 then
return
simplify(int(1/(x^3-2*x+4), x=0..infinity));
fi;

res :=
-1/(n+1)*alpha_sum(n+1)
-1/(n+1)*add(binomial(n+1, p)*(2*Pi*I)^(n-p)*Q(p),
p=0..n-1);


simplify(res);
end;

VERIF := n -> int((log(x))^n/(x^3-2*x+4), x=0..infinity);

education - Is there a sufficiently reachable plausibility argument that $pi$ is irrational?

I was teaching someone earlier today (precisely, a twelve-year-old) and we came upon a problem on circles. Little did I know in what direction it would lead. I was able to give a quick plausibility argument that all circles are similar and that they are related by some constant (most conventionally $π$). We came to the actual computation of $π$ and there was no way I could escape mentioning its irrationality. Indeed, being a somewhat bright student, this person asked, after I had written out the partial expansion $3.141592...$ whether she could not continue computing the digits, and how she could do this. Although I mentioned approximation by polygons as one possible approximation algorithm, she assured me that she would continue to find more digits, to which I asked, To what end? Indeed, I went on, it is impossible to finish computing the digits. But it must start to repeat after some digit, no matter how large, she retorted. No, I said. It is an irrational number (we had earlier talked about irrationality and it was easy enough showing a variant of the classic proof of the irrationality of $\sqrt 2,$ being a simple algebraic number). She then asked for reasons why this is the case. Suddenly, I found myself short of explanation as I had myself never bothered to study any of the known proofs in detail. I tried telling her that the known proofs were impossible for her to understand now, but she persisted nevertheless. Then I promised that I would come with it when next we met.



However, I am sure that this would not benefit her in any way. Therefore, I sought for a simple explanation (not necessarily a proof in the usual sense) that was sufficiently convincing, but so far I have found none. All I have found are variants on Lambert's or Hermite's proofs, and those are far from what I'm looking for.




In consequence, I thought to ask here. Perhaps someone has come across a similar situation and had found an argument sufficiently enlightening at that level (that is, a sketch of ideas or plausibility argument that can lead to a proof -- ideas can always be grasped by anyone, after all). In short, do you know any argument that I could present to this person that could at least slake their curiosity for now until they are ready for the classic proofs (if they continue to be interested)? If so please present them.



Thank you.

elementary number theory - How to prove that gcd(m+1, n+1) divides (mn-1)



I'm learning about divisors and the gcd, but now I'm stuck at proving:





gcd(m+1, n+1) divides (mn-1) for all m,n in the set of Integers




Help is appreciated on how to prove this!
Thanks


Answer



A common strategy to solve this type of problem is using the following simple fact:



If $d$ divides $a$ and $b$, then d divides

$$a\cdot r+b\cdot s$$
for all $r,s \in \mathbb{Z}$.



Thus if $d=\gcd(m+1,n+1)$, then obviously $d$ divides $m+1$ and $n+1$,
and so d divides
$$(m+1)\cdot r+(n+1)\cdot s$$
for all $r,s \in \mathbb{Z}$.
In particular, for $r=n$ and $s=-1$, we have that $d$ divides
$$(m+1)\cdot n+(n+1)\cdot (-1)=mn-1.$$


Saturday, 6 July 2019

divisibility - power of ten modulo prime

In a mathematical quiz (that I solved by computational means), I came across the problem of finding powers k of ten with a given congruence to a given prime number,
$$10^k \equiv q \text{ mod } (p)$$
as eg
$$10^k \equiv 46 \text{ mod } (47)$$
and I wonder if there is a generic approach to this problem.

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...