Johnson's theorem proof as it is in the title. I am have problems with proving the Johnsons Theorem.

The circles $O_1,O_2,O_3$ are all congruent. I am supposed to show that the circle passing though point A,B,C is also congruent. I am supposed to use the fact that i can draw parallelograms here, rhombi in particular.I see four rhombi but i cannot see where to go from here. I also only know the basic facts about parallelograms so please no intricate theorems.

One proof. A direct, brute force angle chasing is one way to do the job.
Observe that the line through point $O_1$ orthogonal to $AB$ is the orthogonal bisector of $AB$ (because $AB$ is a chord of the circle with center $O_1$). Analogously, the perpendiculars from points $O_2$ and $O_3$ to the edges $CA$ and $BC$ respectively are orthogonal bisectors of $CA$ and $BC$ respectively. These three orthogonal bisectors intersect at a common point $Q$ which is the center of the circumcircle of triangle $ABC$. Let $\angle \, ACO = \alpha$ and $\angle \, OCB = \beta$. Then in the circle with center $O_3$
$$\angle \, AO_3O = 2 \, \angle \, ACO = 2\alpha$$
Quad $OO_3AO_1$ is a rhombus (or if you prefer $AO_3O$ and $AO_1O$ are congruent triangles) so $\angle \, AO_1O = \angle \, AO_3O = 2 \alpha$.
In the circle with center $O_2$ $$\angle \, OO_2B = 2 \, \angle \, OCB = 2\beta$$
Quad $OO_2BO_1$ is a rhombus (or if you prefer $BO_2O$ and $BO_1O$ are congruent triangles) so $\angle \, OO_1B = \angle \, OO_2B = 2 \beta$. Consequently, $$\angle \, AO_1B = \angle \, AO_1O + \angle \, OO_1B = 2 (\alpha + \beta)$$ Therefore $$\angle \, AO_1Q = \frac{1}{2} \, \angle \, AO_1B = \alpha + \beta$$ However, in triangle $ABC$ point $Q$ is a circmcenter, so $\angle \, AQO_1 = \frac{1}{2} \, \angle \, AQB = \angle \, ACB = \alpha + \beta$. Thus we conclude that
$$\angle \, AQO_1 = \alpha + \beta = \angle \, AO_1Q$$  which yields that triangle $AQO_1$ is isosceles and $AQ = AO_1$. Since $Q$ is the circumcenter of $ABC$, the segment $AQ$ is the radius of the circumcircle and is therefore equal to the radius $AO_1$ of the circle with center $O_1$ which is what you want to prove.

Comment: On a side note, one can easily show that $O$ is the orthocenter of triangle $ABC$, i.e. $AO$ is orthogonal to $BC$, $\, BO$ is orthogonal to $CA$ and $CO$ is orthogonal to $AB$.

Another proof. Another way to prove the theorem is by proving that triangles $ABC$ and $O_1O_2O_3$ are congruent (in fact central symmetric to each other) and since $O$ is the circumcenter of $O_1O_2O_3$  the radius of its circumcircle $OO_1 = OO_2=OO_3$ must be equal to the radius of the circumcircle of $ABC$.

The congruence can be proven as follows: Look at quad $BCO_2O_3$. Segment $BO_3$ is equal and parallel to segment $OO_1$ because $BO_1OO_3$ is a rhombus. Similarly, $CO_2$ is equal and parallel to $OO_1$ because $CO_1OO_2$ is a rhombus. Therefore $BO_3$ is equal and parallel to $CO_2$ so $BCO_2O_3$ is a parallelogram and $BC$ is equal an parallel to $O_3O_2$  (and by the way $O_3O_2$ is orthogonal to $AO$ because $AO_3OO_2$ is a rhombus so $BC$ is orthogonal to $AO$). Analogously, one shows that $CA$ is equal an parallel to $O_1O_3$, and $AB$ is equal an parallel to $O_2O_1$. Therefore triangles $ABC$ and $O_1O_2O_3$ are congruent and the radii of their circumcircles are equal. The curcumradius of $O_1O_2O_3$ is $OO_1 = OO_2 = OO_3$.

Johnson's Theorem Diagram

Consider congruent circles, centres $O_1$ $O_2$ $O_3$ arranged clockwise. O is their common point of intersection.
Circle $O_1$ and $O_3$ intersect at A; $O_1$ and $O_2$ intersect at B, and C is third intersection.

The nine radii form three dotted rhombi (with O as the common point).
Each of the three different sets of three parallel lines has matching dots.
Draw AP // and = $O_3$C.
APC$O_3$ is a parallelogram, so A$O_3$ = PC.
Therefore APC$O_3$ is a rhombus.
Similarly, A$O_1$BP and PB$O_2$C are rhombi.
Therefore, P is the centre of circle ABC.


Why does an integral change signs when flipping the boundaries? Let us define a very simple integral:

$f(x) = \int_{a}^{b}{x}$

for $a,b\ge 0$.

Why do we have the identity $\int_{a}^{b}{x} = -\int_{b}^{a}{x}$?

I drew the graphs and thought about it but to me integration, at least in two-dimensions, is just taking the area underneath a curve so why does it matter which direction you take the sum?

Here's another intuitive justification. The obvious graphical intuition says that when $a \leq b \leq c$, then $\int_a^b f(x) dx + \int_b^c f(x) dx = \int_a^c f(x) dx$. If we want this formula to hold for arbitrary $a,b,c$, then we should be able to take $a=c$, so that $\int_a^b f(x) dx + \int_b^a f(x) dx = \int_a^a f(x) dx$. But $\int_a^a f(x) dx = 0$, so if we want this formula to hold, we need $\int_a^b f(x) dx = -\int_b^a f(x) dx $.

The change in $x$, $dx$ becomes negative. So the integral sums over negative quantities.

This is useful for when both coordinates of a curve are functions, and you find the area under the curve by $\int_{t_1}^{t_2}y(t) \, dx(t)$. When the $x(t)$ path travels in the negative direction, $dx(t)$ is negative and so the integral decreases.


Show that $[2x]+[2y] \geq [x]+[y]+[x+y]$ Prove that $[2x]+[2y] \geq [x]+[y]+[x+y]$ whenever $x$ and $y$ are real numbers.

The $[]$ symbol is the greatest integer or floor function.

I have proved this fact by cases, but I stumbled upon what I believe to be another way to prove the above inequality, and I was wondering if my sequence of statements are legitimate.

I make use of two lemmas that I have proved

Lemma 1.   If $x$ is a real number and m is an integer, then $[x+m] = [x]+m$.

Lemma 2.   $\displaystyle [x]+\left[x+\frac{1}{2} \right] = [2x]$.

My proof begins with an "obvious" statement

$$x+y \leq x+y+1$$

I then take the floor of the inequality to get

$$[x+y] \leq [x+y]+1$$             (1)

which is true in virtue of lemma 1.

Furthermore, if I add the following statements

$$[x+1/2] \leq x + 1/2$$
$$[y+1/2] \leq y + 1/2$$

I procure

$$\left[x+\frac{1}{2} \right]+\left[y+\frac{1}{2}\right] \leq x+y+1$$

which by definition of the floor function renders the equation

$$[x+y]+1 = \left[x+\frac{1}{2} \right]+\left[y+\frac{1}{2} \right]$$        (2)

Substituting (2) for (1), I have

$$[x+y] \leq \left[x+\frac{1}{2} \right]+\left[y+\frac{1}{2} \right]$$

I then add $[x]$ and $[y]$ to the above inequality to produce

$$[x]+[y]+[x+y] \leq [x]+\left[x+\frac{1}{2} \right]+[y]+\left[y+\frac{1}{2} \right]$$

And in virtue of Lemma 2, the right hand side of the inequality becomes

$$[x]+[y]+[x+y] \leq [2x]+[2y].$$

I personally don't see anything wrong, except maybe for the implication made to establish (2).

Solving these kinds of problems is solely for personal gratification, so I will greatly appreciate feedback.

Thanx.

Your proof is flawed for the reason described by Adam Hughes in his comment.  It is not the case that $$\lfloor x+y \rfloor + 1 = \lfloor x + 1/2 \rfloor + \lfloor y + 1/2 \rfloor$$ from the given inequality, because simply taking the floor of the inequality $$\lfloor x + 1/2 \rfloor + \lfloor y + 1/2 \rfloor \le x + y + 1$$ does not automatically turn the inequality into an equality.  A simple counterexample is $x = y = 1/4$.  Another counterexample is $x = 3/4$, $y = 1/4$.

If you want to prove it that way, first you need to prove
[x+y]≤[x+1/2]+[y+1/2] again as your proof is flawed.

Simply think of [x]+[y] and [x+y]

If {x}+{y} < 1 then [x] + [y] = [x+y]

If {x}+{y} >= 1 then [x] + [y] = [x+y] - 1

So, [x]+[y] is at least [x+y] - 1.

-> [x+y+1]-1 = [x+y] =< [x+1/2] + [y+1/2]


Intuition for $\int_{-\infty}^\infty f(x) f'(x) \,dx=0$ where $f(x) \to 0$ when $x \to \pm \infty$ Assume $$\lim_{x\rightarrow \pm\infty}f(x) = 0,\:\:\: f(x)\in C^{1}(\mathbb{R})$$
For this case, I saw a theorem that says that: $$\int_{-\infty}^{{\infty}}f(x)\cdot \frac{d}{dx}f(x)\:dx = 0$$ (not hard to prove with integration by parts)
Is there any intuition for this result? I can see the intuition only in the case where f(x) is symmetric. We have: $$df \approx \frac{d}{dx}f(x)\:dx,$$ so the integrand is the product of f(x) and the infinitesimal addition to f at x's neighborhood, df(x). Thanks to the symmetry we have: $$df(-x)f(-x)=df(-x)f(x)=-df(x)f(x)$$ so the values of the integrand at x,-x cancel out and we have a total sum of 0.
Thanks!

The conditions imply that $f$ is smooth enough to use integration by parts, for which we find that
$$
\int_{-\infty}^\infty f(x)f'(x)dx = [f^2(x)]_{x=-\infty}^{x=\infty} - \int_{-\infty}^\infty f'(x)f(x)dx = -\int_{-\infty}^\infty f(x)f'(x)dx
$$
so the integral is equal to the negative of itself, and hence it is zero. Note here that you really need to replace all the $\pm \infty$ with finite limits and then take the limit at the end.


continues function and sequence given that $f : D \to \mathbb{R}$ such that $D \subseteq \mathbb{R}$

and $a_n$ is convergent sequence such that for all $n$ , $a_n \in D$

then $f(a_n)$ is also a convergent sequence ?!

I think this is not true, for a counter-example i have $a_n = \frac{1}{n}$ and $f : (0,1] \to \mathbb{R}$ such that $f(x)=\frac{1}{x}$

$f$ is continues and $a_n$ is convergent but $\lim f(a_n) = \infty$

is my example false ?

if it's wrong, please give a proof or hint !

Consider the step function $f(x)=\lfloor{x}\rfloor$.$D=[-10,10]$. Consider the point $x=2$. Obviously, $f$ is not continuous. consider the sequence $x_n=2-\frac{1}{n}$, $f(x_n)=1$.

There are (at least) two equivalent definitions for continuity:

  A function $f$ is continuous at $x_0$ if for all $\varepsilon>0$ there exists $\delta >0$ such that for all $x\in (x_0-\delta,x_0+\delta)$, $|f(x)-f(x_0)|<\varepsilon$

  A function $f$ is continuous at $x_0$ if for every sequence $x_n$ such that $x_n\to x_0$, $f(x_n)\to f(x_0)$

Your example is correct in the sense that it is a proof for the non-continuity of $f(x)=\frac{1}{x}$ at $x = 0$, assuming you define
$$
f(x) = \begin{cases}\frac{1}{x} & x\neq 0 \\
L & x = 0\end{cases}
$$
where $L<\infty$, for else if your domain is $(0,1]$, then $\frac{1}{x}$ is continuous everywhere.


If $[x+0.19] +[x+0.20] +[x+0.21] +\cdots [x+0.91] =546$ find the value of $[100x]$.. Problem :

If $[x+0.19] +[x+0.20] +[x+0.21] +\cdots [x+0.91] =546$ find the  value of $[100x]$ where [.] represents the greatest integer function less than equal to x.

My approach :

$x +1.19 = x + \frac{19}{100} = \frac{100x+19}{100}$

Similarly other terms

Not getting any clue further please suggest will be of great help.

First note that the number of terms is $73$. Also, if we look at $[x+a]$ where $a$ ranges from $0.19$ to $0.91$, then we see it can only reach two values; those are $n=[x+0.19]$ and possibly, but not necessarily, $n+1$. We know though that $$73n\leq [x+0.19]+[x+0.20]+\cdots+[x+0.91]<73(n+1)$$ and so we deduce $n=7$. We can also find exactly where the value of $[x+a]$ changes from $n$ to $n+1$ - since, $546-73\cdot 7=35$, so there are $35$ terms $[x+a]=n+1$, so the last $a$ such that $[x+a]=n$ is $a=0.56$. So, $[x+0.56]=7$ but $[x+0.57]=8$. This means that $7.43\leq x<7.44$. So, $743\leq 100x<744$, so $[100x]=743$.

Hope this helped!

There's a way to solve this ( for positive x ) by first observing that your sum is the difference of two sums of the same form :

$$S_n=\sum_{k=0}^{n}\lfloor x+ak\rfloor$$

Let's start by defining $x_0=\lfloor x\rfloor$ and $f!=x-x_0$ so we have the integer and fractional part of $x$ handy.

Now we can see that :

$$|x+ak|=x_0+\lfloor f+ak \rfloor$$

Let's assume $an < 1$ for convenience ( as it suffices in this problem ).

There is some $k_0$ where $f+ak >= 1$ that contributes $+1$ to the sum and that other values contribute nothing.  This $k_0$ is given by :

$$k_0=\left\lceil \frac{1-f}{a} \right\rceil$$

And we can write the sum $S_n$ easily as :

$$S_n = nx_0 + ( n+1-k_0)$$

when $n >= k_0$ and

$$S_n = nx_0$$

when $n < k_0$

And now we have a way to solve the problem at hand.

We can see that, for $a=0.01$ either $S_{91}-S_{18}=(91-18)(x_0+1)=546$ which is not the case as $73$ does is not a factor of $546$ or :

$$S_{91}-S_{18}=x_0(91-18)+(91-18)-k_0+1=546$$

We get :

$$545=73(x_0+1)-k_0$$

Taking the modulus 73 we get :

$$k_0\,mod\,73 =73-( 545\, mod\, 73 )=39$$

And as this is the only possible value in the range $18$ to $91$ we can say $k_0=39$.

Using this we get for $f=1-ak_0=1-(0.01)(39)=0.61$ and using this in our formula for the sum we can get :

$$546=73(x_0+1)-k_0+1=73(x_0+1)-38$$

So finally :

$$x_0=\frac{546+38}{73}=8$$

An so $x=(8-1)+0.61=7.61$ and the final result for $\lfloor 100x\rfloor=761$


Find the value of $4\tan(\theta _1)\tan(\theta _2)$ if $\theta _1$ and $\theta _2$ are the solutions of the given equation Find the value of $4\tan(\theta _1)\tan(\theta _2)$ if $\theta _1$ and $\theta _2$ are the solutions of the given equation:
$$\frac 3{\sec2\theta}+\frac 4{\operatorname {cosec}2\theta}=5$$(1) $0$ (2) $1$ (3) $4$ (4) $16$

Answer (2)

My solution

$$\frac 3{\sec2\theta}+\frac 4{\operatorname {cosec}2\theta}=3\cos2\theta+4\sin2\theta=5\implies \theta _1=\theta_2$$ dividing 5 $$\frac 35\cos2\theta+\frac 45\sin2\theta=1=\sin(37+2\theta)=1=\sin90\implies \theta=\theta_1=\theta_2=\frac{53}{2}$$

so putting the value of $\theta_1$ then $$4\tan(\theta _1)\tan(\theta _2)=4\times \tan^2\theta_1=4\times \tan^2\frac{53}{2}=0.99\approx 1$$(calculated from scientific calculator because I don't know the value of $ \tan(53/2) $

OK, if I were at an exam and this question were there, how would I solve this without knowing the value of $ \tan(53/2) $? What is another method?

For $\tan(\theta)=t$
$$\cos(2\theta)=\frac{1-t^2}{1+t^2}$$

$$\sin(2\theta)=\frac{2t}{1+t^2}$$

Then we have $$\frac 3{\operatorname{sec}2\theta}+\frac 4{\operatorname {cosec}2\theta}=5 \Rightarrow 3(1-t^2)+4(2t)=5(1+t^2)$$

Now we get a quadratic equation of $t$ ,

$$8t^2+(-8)t+2=0$$

Now suppose that $t_1=\tan(\theta_1) $ and $t_2=\tan(\theta_2)$

Thus by the product of roots we get , $t_1 \cdot t_2=\frac{2}{8}$

So $4t_1 \cdot t_2=1$

HINT:

$$\frac 3{\operatorname{sec}2\theta}+\frac 4{\operatorname {cosec}2\theta}=5$$

Let $$ \frac35 = \sin t , \frac45 = \cos t  $$

$$ \sin (t + 2 \theta) = 1 $$

Can find  two trig angles and take it from there?


How can I solve $\langle \sin(pt),\cos(pt)\rangle = \langle \cos(qt),\sin(qt)\rangle$ How can I solve this vector equality where $p$ and $q$ are integers and $0\leq t\leq 2\pi$? $\langle \sin(pt),\cos(pt)\rangle = \langle \cos(qt),\sin(qt)\rangle$ I am trying to figure out how many times in a period they intersect.

Solution is now edited to contain both versions of the question you've asked

Version 1: $⟨sin(pt),cos(qt)⟩=⟨cos(pt),sin(qt)⟩$

You need the $x$ and $y$ components to be equal so you are solving the simultaneous equations:

$\sin(pt)=\cos(pt)$ and $\cos(qt)=\sin(qt)$

These become: $\tan(pt)=1$ and $\tan(qt)=1$

So $pt=\frac{pi}{4}+\pi n_1,n_1\in\mathbb{N}$ and $qt=\frac{\pi}{4}+\pi n_2,n_2\in\mathbb{N}$

So $t=\frac{pi+4\pi n_1}{4p}=\frac{pi+4\pi n_2}{4q}$

This will only have solutions for some values of $p$ and $q$. Cross multiplying and dividing by $\pi$ gives:

$q+4n_1=p+4n_2$

As $p$ and $q$ are integers this will have no solutions unless $p-q=4m,m\in\mathbb{Z}$.

Version 2: $⟨sin(pt),cos(pt)⟩=⟨cos(qt),sin(qt)⟩$

Here each vector represents a rotation by $pt$ and $qt$ respectively. As $p$ and $q$ are integers they will obviously be equal when $t=2\pi n,n\in\mathbb{Z}$. They will also be equal before then if $p$ and $q$ have a common factor. So the solution is:

If $p=q$ then $t\in\mathbb{R}$

If $p\neq q$ then $t=\frac{2\pi}{\gcd(p,q)}$


$I[X,Y] :=- \sum_{x,y} p(x,y)\ln{p(x,y)}$, Show that $I[X, Y] \le I[X]+I[Y]$ Let $x,y$ be stochastic variables and $p$ be a probability measure.

$I[X,Y] :=- \sum_{x,y} p(x,y)\ln{p(x,y)}$ with $p(x,y) := P(X=x, Y=y)$

I have to show that $I[X,
Y] \le I[X]+I[Y]$

I mustn't assume that $X$ and $Y$ are independent. My problem is how to write $p(x,y)$ into $p(x)$ and $p(y)$.

Any tipps or ideas on how to separate the p(x,y) and show the inequality? Thanks in advance!

Conditional Entropy is less than entropy is similar, but it doesn't fully answer my question (their definition of $I$ is different: over there: $I[X,Y] = \sum_{x,y} p(x,y) \ln \frac{{p(x,y)}}{p(x)p(y)}$

By the chain rule for entropy, $$ I[X,Y] = I[X] + I[Y|X] $$

Conditioning reduces entropy, so $$ I[Y|X] \leq I[Y] $$

Thus, $$ I[X,Y] \leq I[X] + I[Y] $$


Does $\log(ab)^n$ equal $(\log(a)+\log(b))^n$ or $n\log(a)+n\log(b)$? I think this might be a case of slight ambiguity in notation, but here goes:

On a test question, I was required to expand the expression $\log (ab)^n$. Since the logarithm is a function, I reasoned as follows:

\begin{align*}
\log(ab)^n &= (\log(ab))^n\\
&= (\log(a)+\log(b))^n
\end{align*}

However, after having our tests returned, I found that the teacher reasoned as follows:

\begin{align*}
\log(ab)^n &= \log((ab)^n)\\
&= \log(a^nb^n)\\
&= \log(a^n)+\log(b^n)\\
&= n\log(a)+n\log(b)
\end{align*}

I thought about asking, but decided to look in the textbook first, and found that the textbook does something like $\log(a+b)^n =n\log(a+b)$, so here I am.

My question is, which expansion is correct? Is one of them more standard than the other, or are they both acceptable interpretations? If you can link to some sources using one way or the other, that would also be appreciated.

As I mentioned in my comment, there is no conceptual misunderstanding at play here, but one of notational convention. I do not like the notation $\log x^n$ myself, precisely because of the confusion that the OP outlined: does it mean $(\log x)^n$ or $\log (x^n)$?  It is best to disambiguate the expression by providing more context -- using an extra pair of parenthesis.

However, if we really must make sense out of that expression -- let’s say it appears in a test -- this is usually decided based on an “order of precedence” of logarithm and exponentiation. Of course, this order is again arbitrary, but for the sake of giving a more concrete answer:

  I think the “usual” practice is to assign exponentiation a higher precedence than operations like log, sin, cos etc. For instance, according to this order, $\sin x^{-3}$ means $\sin (x^{-3})$ and $\log x^2$ means $\log (x^2)$, which agrees with your textbook/teacher and differs from your interpretation. (Sorry! :-))

However I will be quick to add that while the rule I just mentioned might be one convention, I do not know if this is the only one. Even if that is the case, the notation seems ambiguous enough that you should avoid it whereever possible.

I think your answer was wrong, as your assumption would be correct having either $\log^n(ab)$  or $(\log(ab))^n$.

The right answer matches the one of your professor:

$$ \log((ab)^n) = n \log(ab) = n(\log(a) + \log(b)) = n\log(a) + n\log(b) $$


A Tribonacci numbers identity for Pythagorean quadruples $a^2+b^2+c^2 =d^2$? We have the known Fibonacci identity for Pythagorean triples,

$$(F_n F_{n+3})^2+(2F_{n+1}F_{n+2})^2 = (F_{2n+3})^2$$

and for Lucas numbers,

$$(L_n L_{n+3})^2+(2L_{n+1}L_{n+2})^2 = (L_{2n+2}+L_{2n+4})^2 = (5F_{2n+3})^2$$

But given the tribonacci numbers,

$$T_n = 0, 1, 1, 2, 4, 7, 13, 24, 44, 81, 149, 274, 504, 927, 1705, 3136,\dots$$

where we set $T_0 = 0,\; T_1 = 1$, etc, it seems they obey the analogous Pythagorean quadruples,

$$(-T_{n+3}^2+T_{2n+3}+T_{2n+4})^2+(2\,T_n\,T_{n+1})^2+(2\,T_n\,T_{n+2})^2 = (T_{n-1}^2+\,T_{2n+1}+T_{2n+2})^2$$

Some questions:

This relation was discovered empirically and holds true for $n$ up to the hundreds, but it would be good to know a proof that it is true for all $n$.
Any tribonacci analogue for higher powers, like (eq.30) $F_{n+1}^3+F_n^3-F_{n-1}^3 = F_{3n}$?

An "arithmetic" subsequence of a linear recurrent sequence is again a linear recurrent sequence, of the same order.

A product of linear recurrent sequences (of order $a$ and $b$) is again a linear recurrent sequence, of order at most $ab$.

A sum of linear recurrent sequences (of order $a$ and $b$) is again a linear recurrent sequence, of order at most $a+b$.

Hence, the difference $(-T_{n+3}^2+T_{2n+3}+T_{2n+4})^2+(2\,T_n\,T_{n+1})^2+(2\,T_n\,T_{n+2})^2 - (T_{n-1}^2+\,T_{2n+1}+T_{2n+2})^2$ is a linear recurrent sequence, of order at most $702$. So in order to prove that it is the zero sequence, you can just compute the first $702$ values.

You can cut down on the order (because $T_{1400}$ is not really a small number, right ?) by keeping track at each step of the roots of the characteristic polynomial of the recurrence.

Here is another way to express

$x^2+y^2+z^2=g^2$

x=a+pk
y=b+pk
z=c+pk
g=a+b+c+2pk

and

$a == (-2 b c - 2 b pk - 2 c pk - pk^2)  /  (2 (b + c + pk))$

Its handy because

a=g-z-y
b=g-z-x
c=z-x-y
pk=x+y+z-g

So you can map your equation into this which is a general proof.

2 more useful equations that satisfy
$x^2+y^2+z^2=g^2$
The equation exploiting the reversibility of 2nd order equations like this is slightly different so I am using aa instead of a and  k instead of pk etc to avoid confusion

$2k=x_2+y_2+z_2-g_2$

$x_2 = aa + k$
$y_2 = bb + k$
$z_2 = cc + k$
$g_2 = aa + bb + cc + k$

$aa = (-bb cc + k^2)/(bb + cc)$

$x_3 = k-aa$
$y_3 = k-bb$
$z_3 = k-cc$
$g_3 = k-aa-bb-cc$

so using your original equations
$x_2$=$(−(T_n_+_3)^2+(T_n_+_3)+(T_n_+_4))$

$y_2$ =$2(T_n)(T_n_+_1)$

$z_2$ =$2(T_n)(T_n_+_2)$

$g_2$ =$(T_n_−_1)^2+(T_2_n_+_1)+(T_2_n_+_2)$

then
$2k=x_2+y_2+z_2-g_2$

$aa = k + g_2 - z_2 - y_2$
$bb = k + g_2 - z_2 - x_2$
$cc = k + g_2 - x_2 - y_2$

Then prove that you meet the condition

$aa = (-bb cc + k^2)/(bb + cc)$

which will prove that both equations are true and one of them will be exactly your starting equation and the other will be different and possibly trivial.  If you can show that your equation meets the condition for all n then you are done.

If you cannot there is a second possibility to show that your equation is true for a specific n and that the 2nd equation is your equation for a n+t value and as such your single instance proves a 2nd unique answer that proves a 3rd etc.  You will need to deal with avoiding trivial solutions if you go that route.  This could prove infinite solutions but wouldn't necessarily give ALL solutions.

If you map your equation into $x_3,y_3,z_3,g_3$ instead of $x_2,y_2,z_2,g_2$ you should avoid all trivial solutions because you are ascending in value and will never reach zero.

To restate simply using ascending values which you need for inductive proof.

Your statement $a^2+b^2+c^2=d^2$  stated as you did in Tribonacci numbers depends on

$a_2^2+b_2^2+c_2^2=d_2^2$

Formed from the absolute value of your original Tribonnaci numbers
EDITED to fix math error:
Corrected to -a+2k, -b+2k, -c+2k, -d+2k
$a_2= - b - c + d$
$b_2= - a - c + d$
$c_2= - a - b +  d$
$d_2= a + b + c - 2 d$

Also expressed exclusively in Tribonacci numbers

If you can show that increasing your n value by 1 will produce the same values then its a complete proof of your conjecture.

It is possible this is just another statement and doesn't help you at all but this is a way for you to generate an infinite number of equations any 1 of which can prove your statement provided you can express it with your original equation with n increased by 1.


Simple Complex Dilation If $a>0$ and $$w = f(z) = az \text{, where }(a,z)\in \mathbb{C}$$ how is it that, in general, $$|w| = a|z|, Arg(w) = Arg(z)$$

It's written in my teacher's notes. Why do w and z have to like on the same ray? I thought multiplying complex numbers meant multiplying moduli and adding the args.

Multiplying complex numbers does scale the moduli and add the arguments. But the argument of a positive real number is $0$. Hence Multiplying any complex number by a positive real will only scale it, while keeping it on the same ray (i.e. argument).


How to prove that: let $n$ a natural odd, then prove that $x^n<y^n$ iff $x<y$ I tried it in many ways but I couldn't prove it.
  TASK:
 Let $n$ a natural odd, $\ \ x,y\in\mathbb{R},$ then prove that $x^n<y^n$ iff $x<y$

My Attempt(s): $$\begin{align} & x^n<y^n \\ \Longleftrightarrow{} &  x^n-y^n<0 \\ \Longleftrightarrow{} & (x-y)\sum_{k=0}^{n-1}x^{n-k-1}y^k<0 \end{align}$$ And I'm stuck here.

Thus, I can't solve it with induction either. Any help would be appreciated :)

It is better to prove that $f(x) = x^{n}$ (where $n$ is odd positive integer) is strictly increasing on both intervals $(-\infty, 0]$ and $[0, \infty)$ and this will imply that it is strictly increasing on whole of $\mathbb{R}$. The fact that $f(x)$ is strictly increasing on $[0, \infty)$ is obvious for the very reason that if $x, y \in [0, \infty)$ and $x < y$ then $y$ is strictly positive and $x$ is non-negative so that $$f(x) - f(y) = (x - y)\sum_{k = 0}^{n - 1}x^{n - 1 - k}y^{k} < 0$$ Let's check what happens on interval $(-\infty, 0]$. If $x, y \in (-\infty, 0]$ and $x < y$ then $x$ is strictly negative whereas $y$ is non-positive. Again we have $$f(x) - f(y) = (x - y)\sum_{k = 0}^{n - 1}x^{n - 1 - k}y^{k}$$ Note that the sum $\sum x^{n - 1 - k}y^{k}$ has terms where powers of $x, y$ have same parity (because their powers add up to $(n - 1)$ which is even). So if both the powers are even then the term is obviously non-negative. And if both the powers are odd then the term is product of two non-positive numbers and hence it is again non-negative. Thus each term in the sum $\sum x^{n - 1 - k}y^{k}$ is non-negative. Moreover first term $x^{n - 1}$ is positive because $x$ is negative and $n - 1$ is even. So the whole sum is positive and therefore $$f(x) - f(y) = (x - y)\sum_{k = 0}^{n - 1}x^{n - 1 - k}y^{k} < 0$$

What about considering function f(x) = x^n which is increasing function.

It means that for x < y -> f(x) < f(y).

So x^n < y^n


Trigonometry (value of expression) I have been revising trigonometry and I couldn't solve this particular one from my book.
One has to find the value of given expression
$\frac{tan\alpha}{1-cos\alpha}$, if $sin\alpha=-\frac{2}{3}$ and $ctn\alpha>0$.

I tried expressing every trigonometric function through $sin\alpha$ by multiplying numerator and denominator by $cos\alpha$. That would yield $sin\alpha$ in numerator and $cos\alpha$ functions in denominator.

Then I tried expanding further:

Since it was given that $ctan\alpha$>0, then $ctn\alpha=\frac{cos\alpha}{sin\alpha} \Rightarrow cos\alpha=ctn\alpha \times sin\alpha \Rightarrow \pm \sqrt{\frac{1}{sin^2\alpha}-1} \times sin\alpha= \sqrt{\frac{1}{sin^2\alpha}-1} \times sin\alpha$

I suppose that the value of $ctn\alpha$ will have to be positive.

$\frac{sin\alpha}{cos\alpha+cos^2\alpha}=\frac{sin\alpha}{\sqrt{\frac{1}{sin^2\alpha}-1} \times sin\alpha-1+sin^2\alpha}$

When I input initial condition for sine value, I still somehow can't get the result stated in my book (answers are given in random order; my answer doesn't quite match any of them)

I would appreciate any help with this!

HINT:

As $\dfrac{\cos\alpha}{\sin\alpha}=\cot\alpha>0,\cos\alpha<0\implies\cos\alpha=-\sqrt{1-\sin^2\alpha}$

$\tan\alpha=\dfrac{\sin\alpha}{\cos\alpha}=?$

Thanks, both respondents!
I don't know why I've overcomplicated this so much for myself.
With both methods, I finally managed to get the result of $\frac {3(3 \sqrt {5}+5)}{10}$, which matches the given set of answers.


Does multivariate polynomial over a finite field always have a solution (in the field)? Let $K = F_{p^e}$ be a finite field. Say I have a single polynomial $f \in K[x_1,\ldots, x_n]$ of degree $d$.
Under what conditions on $n$ and $d$ can I claim that a root to $f$ always exists? In other words, do there exist polynomials over finite fields with an arbitrary number of variables and bounded degree that have no roots in the field?
If a root exists, can I compute it efficiently?

The polynomial
$$
f=(x_1+x_2+\cdots +x_n)^2−k
$$
where $k$ is not a quadratic residue modulo $q$ has no roots in  the finite field $\Bbb F_{q}$.

Even with $n=1$, this would mean the field is algebraically closed, and an algebraically closed field cannot be finite.


Inverse of identity minus matrix exponential I am trying to analytically find the inverse of a matrix given by:
\begin{align}
   W = \left( I - \alpha e^A \right)^{-1},
\end{align}
where $I$ is the identity matrix of appropriate size, $e^A$ denotes matrix exponential of $A$ and

\begin{align}
    A = \begin{bmatrix}
           \frac{ (1-1)^2 }{ \sigma^2 } & \frac{ (2-1)^2 }{ \sigma^2 } &
           \frac{ (3-1)^2 }{ \sigma^2 } & \dots  & \frac{ (n-1)^2 }{ \sigma^2 } \\
           \frac{ (1-2)^2 }{ \sigma^2 } & \frac{ (2-2)^2 }{ \sigma^2 } &
           \frac{ (3-2)^2 }{ \sigma^2 } & \dots  & \frac{ (n-2)^2 }{ \sigma^2 } \\
            \vdots & \vdots & \vdots & \ddots & \vdots \\
           \frac{ (1-N)^2 }{ \sigma^2 } & \frac{ (2-N)^2 }{ \sigma^2 } &
           \frac{ (3-N)^2 }{ \sigma^2 } & \dots  & \frac{ (N-N)^2 }{ \sigma^2 } \\
        \end{bmatrix}
\end{align}

Any help would be much appreciated!

Thank you very much,

Katie

Define the variables
$$\eqalign{
\lambda &= \log(\alpha) &\implies \alpha = e^\lambda \cr
X &= -\tfrac{1}{2}(A+\lambda I) \cr
}$$
Then
$$\eqalign{
W^{-1} &= \Big(I-e^{-2X}\Big) &= 2e^{-X}\sinh(X) \cr
W &= \Big(I-e^{-2X}\Big)^{-1} &= \tfrac{1}{2}e^{X}{\,\rm csch}(X) \cr
}$$

You can take out $\frac{1}{\sigma^2}$. Notice also that your matrix is symmetric, and of the form: Find rank of the matrix $a_{ij}=(i-j)^2$, $i,j=1,\dots, n$
You can make it upper triangular by a few transformations (after which it's easy to transform to identity).


Complex line integral - where the length of the complex number is given I'm trying to study ahead of class so I alleviate some upcoming stress in the semester. I have currently read the chapters on line integrals of complex numbers and am currently trying to deepen the content with some problems given in the workbook.

a)$$\oint_{|z|=1}\frac{dz}{z(z+2)}$$
b) $$\oint_{|z|=3}\frac{dz}{z(z+2)}$$

My general approach on this was to first use partial fraction decomposition to make it a bit easier on the integral.
Meaning that $\frac{1}{z(z+2)}$ becomes $\frac{1}{2z}-\frac{1}{2(z+2)}$ if I didn't make any mistake. The integral would then be $\frac{1}{2}(\ln (2z)-\ln(2(z+2))$. But how do I evaluate that?

I'll consider the integral $\oint_{|z|=1}\frac{dz}{z(z+2)}$. The second one can be done in the similar way (but you need some trick there). I will use Cauchy Integral Theorem (CIT) then.

From CIT we know that if some function $f$ is holomorphic on an open subset $U$ containing a closed disk $D$, then

$$f(a)=\frac{1}{2\pi i}\int_{\partial D}\frac{f(z)}{z-a}dz$$

for any $a$ inside disk $D$. (Note that i didn't formulate the strongest version of this theorem)

Now look at your integrand. If you take $f(z)=\frac{1}{z+2}$, you will see that it is holomorphic in some open neighbourhood of a disk $\{z\in\mathbb{C}:|z|\le1\}$ (for example open disk $\{z\in\mathbb{C}:|z|< \frac{3}{2}\}$).

From CIT you have:

$$f(0)=\frac{1}{2 \pi i} \int_{|z|=1} \frac{f(z)}{z-0}dz=\frac{1}{2 \pi i} \int_{|z|=1} \frac{\frac{1}{z+2}}{z-0}dz=\frac{1}{2 \pi i} \int_{|z|=1} \frac{1}{z(z+2)}dz$$

Thus

$$\oint_{|z|=1}\frac{dz}{z(z+2)}=2\pi i f(0)=\pi i$$

Do you understand that, in the complex plane (real part on the x-axis, imaginary part on the y-axis) the set of points such that |z|= 3 is the circle with center at (0, 0) and radius 3?  Further, you can write $z= 3e^{i\theta}$ or, equivalently $x= 3 cos(\theta)$, $y= 3sin(\theta)$ on that circle and do the integration with those parametric equations.


Is the map $x\mapsto\|x\|_p^p$, defined in $L^p[0,1]$ ($1<p<\infty$), strictly convex? Is the map $x\mapsto\|x\|_p^p$, defined in $L^p[0,1]$ (for $1<p<\infty$), strictly convex?

Maybe there is a classic inequality that can give the conclusion easily. Let me know if this is the case.

Edit: In the case it is not strictly convex, if we restrict the domain of $x\mapsto\|x\|_p^p$ to be the unit ball in $L^p[0,1]$, the map is strictly convex?

We have for all $x,y$ and $\lambda\geq 0$, by the triangle (Minkowski) inequality:
$$|\!|\lambda x+(1-\lambda) y)|\!|_p^p\leq\left(\lambda|\!|x|\!|_p+(1-\lambda)|\!|y|\!|_p\right)^p$$
and the result follows from the strict convexity of the function $t\to t^p$ for $p>1$ and $t\geq 0$.

Minkowski's inequality works:
$$\begin{align}||\lambda g+(1-\lambda)f||_p=\left(\int_X (|\lambda g+(1-\lambda) f|)^p \text{d}\mu \right)^{\frac 1p} &\le \left(\int_X (\lambda |g|)^p \text{d}\mu \right)^{\frac 1p}+\left(\int_X ((1-\lambda) |f|)^p \text{d}\mu \right)^{\frac 1p}\\ &=\lambda ||g||_p+(1-\lambda)||f||_p \end{align}$$


How to summarize the sigma signs I really don't know how to summarize the sigma signs in the best way, I know how to calculate with them, but to  summarize them to just one sigma sign is quite new for me and I don't quite understand it, I don't really get the right answer.
Thank you for helping!

$$\sum \limits _{n=1} ^k \frac {\cos (n+2)} {(n+1)^2 - 1} + \sum \limits _{l=k} ^{k+7} \left( \frac {\cos (l+3)} {(l+2)^2 - 1} -1 \right) + 8$$

Cathy

Your problem reminds me of the arabic language rooting of the word algebra, related to the  medicine term mening "bone-setting" (still alive in Castillan as algebrista). You have a formula  broken in three terms, and you can set them again into one.

Like the  physician, before you operate, you have to look. First, the minus  eight term does  not seem to belong to the  sums. But wait, in the second term, you get a $-1$ term, from $k$ to $k+7$, hence $(k+7) - k+1 =8$ times. Cancelled!

Now check if the bone can be set. The  last term of the  first expression is:
$$ \frac{\cos(k+2)}{(k+1)^2-1}\,.$$
The  first term of the  "eight-cancelled" term is:
$$ \frac{\cos(k+3)}{(k+2)^2-1}\,.$$
The  two last terms are consecutive. They could be incorporated into  the  same series as the  first term.

Its last item would be, rewritten into the  first sum fashion:
$$ \frac{\cos((k+7)+3)}{((k+7)+2)^2-1} =  \frac{\cos((k+8)+2)}{((k+8)+1)^2-1} = \frac{\cos(n+2)}{(n+1)^2-1}\,,$$
with $n=k+8$, now that looks a lot like the first sum. Hence you get:
$$ \sum_{n=1}^{k+8}\frac{\cos(n+2)}{(n+1)^2-1}\,.$$

You get even go a little further, noticing that the  $n+1$ and $n+2$ can be incorporated into the  sum:
$$ \sum_{n=2}^{k+9}\frac{\cos(n+1)}{n^2-1}\,.$$
Now your  mathematical bone is  fully  fixed.

In addition to the  summary, you have just saved another $+$ sign and two parentheses. The curious will look at the  history of the  plus and  the  parenthesis signs at the  History of mathematical notation. The history of the dagger, which looks like a $+$, is detailed in Cross footnote marker for people.

Some things to consider:

The notation just means summing. Don't think of it as anything exotic. It is a short-hand for writing out a sum term-by-term:$$\sum_{n=1}^k \frac {\cos (n+2)} {(n+1)^2 - 1} = \frac {\cos (1+2)} {(1+1)^2 - 1} + \frac {\cos (2+2)} {(2+1)^2 - 1} + \ldots + \frac {\cos (k+2)} {(k+1)^2 - 1}$$
Note in the above that $n$ does not occur anywhere on the right-hand-side of the equation. $n$ is a "dummy variable". It is just there to explain the notation. The value does not actually depend in any way on the value of $n$. (In fact, if $n$ has a value elsewhere in your calculation, then you really need to use a different variable than $n$ for the index.) This frees us up to use different variables for the index. As long as the function of $n$ is being summed over the same values, we can make pretty much any changes to the index we like. Note that all three sigma summations below expand out to the exact same sum of terms in a function $f$:
$$\sum_{l=k}^{k+7} f(l) = \sum_{m=k}^{k+7} f(m) = \sum_{n=k+1}^{k+8} f(n-1)\\=f(k) + f(k+1)+ f(k+2)+ f(k+3)+ f(k+4)+ f(k+5)+ f(k+6)+ f(k+7)$$
Summation is associative and commutitive, so you can rearrange a summation in any order. (I add the term "finite" because there is a concept of infinite summation that uses sigma notation in calculus. The order of summation can sometimes make a difference for it.) In particular you can break a summation up over an inner sum:$$\sum_{l=k}^{k+7} (f(l) + g(l)) = \sum_{l=k}^{k+7} f(l) + \sum_{l=k}^{k+7}g(l)$$I.e.,$$(f(k) + g(k)) + \ldots + (f(k+7) + g(k+7)) \\= (f(k) + \ldots f(k+7)) + (g(k) + \ldots + g(k+7))$$
Simply for completeness (you don't need it here), let me also mention the distributive property: $$\sum_{l=k}^{k+7} af(l) = a\sum_{l=k}^{k+7} f(l)$$where $a$ is a constant (any expression that does not depend on the index variable $l$). This is just an application of the familiar distributive law $ab+ac = a(b + c)$.
You can break sums up over ranges: $$\sum_{l=k}^{M} f(l) = \sum_{l=k}^{N} f(l) + \sum_{l=N+1}^{M} f(l)\\
f(k) + \ldots + f(N) + f(N+1) + \ldots + f(M) \\= (f(k) + \ldots + f(N)) + (f(N+1) + \ldots + f(M))$$where $k \le N < M$.

Except for the distributive property, you will need to use each of the concepts I've mentioned.

And I see Gerry Myerson has gone through the calculation for you while I was writing this up. I'm still posting it though, because these are concepts you should familiarize yourself with.


Getting incorrect answer using Burnside's lemma. Suppose I have a $3 \times 3$ grid where:

The corner squares can have one of $3$ unique values.
The edge squares can have one of $5$ unique values.
The center square can have one of $7$ unique values.

Thus, there are $3^4 \times 5^4 \times 7 = 354375$ possible configurations of this grid. However, since a square has $8$ symmetries the number of unique configurations is far less. To compute the number of unique configurations I used Burnside's lemma:

$$\frac{354375 + 15 + 15 + 225 + 45 + 45 + 75 + 75}{8} = 44358.75$$

I double checked my working. However, I don't understand why I don't get an integer result. Clearly, I must have done something wrong. Here's how I got the numbers:

We have the identity operation. All grids remain unchanged. Thus, $a = 354375$.
We have the $90^\circ$ rotation. The corners and edges must be equal for the grid to remain unchanged. Thus, $b = 3 \times 5 = 15$.
We have the $270^\circ$ rotation. The corners and edges must be equal for the grid to remain unchanged. Thus, $c = 3 \times 5 = 15$.
We have the $180^\circ$ rotation. Diametrically opposite elements must be equal for the grid to remain unchanged. Thus, $d = 3^2 \times 5^2 = 225$.
We have the horizontal flip. The first column must be equal to the third column for the grid to remain unchanged. Thus, $e = 3^2 \times 5 = 45$.
We have the vertical flip. The first row must be equal the third row for the grid to remain unchanged. Thus, $f = 3^2 \times 5 = 45$.
We have the diagonal flip. Corresponding elements not on the main diagonal must be equal for the grid to remain unchanged. Thus, $g = 3 \times 5^2 = 75$.
We have the anti-diagonal flip. Corresponding elements not on the anti-diagonal must be equal for the grid to remain unchanged. Thus, $h = 3 \times 5^2 = 75$.

What am I doing wrong here?

You seem to be missing a factor $7$, from the central square's colors, in all except the first item on your list.  Some of the later items are missing more factors. For example, the diagonal flip needs another factor $9$ for the colors of the two corner squares that are on the diagonal.

When done right, and in the order of your cases for the numerator, the answer by Burnside's lemma is
$$
\frac{34375+105+105+1575+7875+7875+3725+3725}{8} = 7420
$$


Juxtapose two triangles with a common edge I'm not experto in geometry but I'm trying to do a software that handle triangles in various way. And I'm trying to learn geometry, of course : )

I have one fixed triangles $T1 = \hat{ABC}$ and a second triangle $T2 = \hat{DEF}$. I want to translate and rotate the second triangle so that the edge $AB$ overlaps the edge $DE$.

I think the right war is to handle the ray that goes from the middle point of BC and goes into the direction of the centroid of the second triangle. If I have the direction of that ray I can easily translate $T2$ and rotate it to the angle between BC and DE.

But I can't understand how do it even after a day of facing it. So I'm asking some helps. In particular when I'm doing it fine for one of the test case above in the other test case the ray is not facing in the right direction.

Here some numbers (I'm coding with Java but just to give numbers), and the respective visual result I'm expecting:

void initializeTriangle0() {
    a = new Vec2D(-100, -100);
    b = new Vec2D(100, -100);
    c = new Vec2D(0, 100);
    t1 = new Triangle2D(a,b,c);
    edgeABC = new Line2D(b,c);

    d = new Vec2D(-100, -200);
    e = new Vec2D(100, -100);
    f = new Vec2D(0, 100);
    t2 = new Triangle2D(d,e,f);
    edgeDEF = new Line2D(d,e);
}

void initializeTriangle1() {
    a = new Vec2D(229.28932f, 300.0f);
    b = new Vec2D(335.35535f, 406.27783f);
    c = new Vec2D(335.35535f, 193.72217f);
    t1 = new Triangle2D(a,b,c);
    edgeABC = new Line2D(b,c);

    d = new Vec2D(-35.355347f, -106.27784f);
    e = new Vec2D(-35.35533f, 106.27784f);
    f = new Vec2D(70.71068f, 5.0964204E-6f);
    t2 = new Triangle2D(d,e,f);
    edgeDEF = new Line2D(d,e);
}

void initializeTriangle2() {
    a = new Vec2D(433.5996f, 233.33334f);
    b = new Vec2D(233.2002f, 233.33334f);
    c = new Vec2D(233.2002f, 433.33334f);
    t1 = new Triangle2D(a,b,c);
    edgeABC = new Line2D(b,c);

    d = new Vec2D(-66.666664f, 66.666664f);
    e = new Vec2D(133.33334f, 66.666664f);
    f = new Vec2D(-66.666664f, -133.33334f);
    t2 = new Triangle2D(d,e,f);
    edgeDEF = new Line2D(d,e);
}

EDIT:

the last image is actually wrong because I'm expecting C===D && B===E

There are some inconsistencies in the question (e.g. talking about the edge $AB$, but using (b,c) in the code), but I think that the general intention became clear.

Admittedly, I did not fully understand your ray+centroid approach. However, here's a suggestion about how I would do it:

Given the edges that you want to align, compute the angle between these edges, and the centers of the edges. Then you can rotate the second triangle around the edge center about the angle that is required to make the edges parallel. Then, move the triangle, so that the edge center is at the same location as the center of the other edge.

You must be careful about the direction of the edges and the orientation of the triangles. Depending on wheter both triangles are oriented equally (both clockwise or both counterclockwise), and depending on whether you chose the edge $DE$ or $ED$, you'll have to add another rotation about $\pi$ - but it should be easy to figure this out for the particular case.

I just implemented this, using plain Java2D. So I'm using Point2D instead of the unknown Vec2D class etc - but the idea should become clear. The program allows dragging the corners of the right (pale blue) triangle, and it displays the aligned (dark blue) triangle.

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.geom.AffineTransform;
import java.awt.geom.Line2D;
import java.awt.geom.Path2D;
import java.awt.geom.Point2D;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;

public class TriangleAlignTest
{
    public static void main(String[] args) throws IOException
    {
        SwingUtilities.invokeLater(new Runnable()
        {
            @Override
            public void run()
            {
                createAndShowGUI();
            }
        });
    }

    private static void createAndShowGUI()
    {
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.getContentPane().add(new TriangleAlignTestPanel());
        f.setSize(900,500);
        f.setLocationRelativeTo(null);
        f.setVisible(true);
    }
}

class Triangle2D
{
    private final Point2D p0;
    private final Point2D p1;
    private final Point2D p2;

    Triangle2D(List<Point2D> points)
    {
        this(points.get(0), points.get(1), points.get(2));
    }

    Triangle2D(Point2D p0, Point2D p1, Point2D p2)
    {
        this.p0 = new Point2D.Double(p0.getX(), p0.getY());
        this.p1 = new Point2D.Double(p1.getX(), p1.getY());
        this.p2 = new Point2D.Double(p2.getX(), p2.getY());
    }

    public Point2D getPoint(int index)
    {
        if (index == 0)
        {
            return p0;
        }
        if (index == 1)
        {
            return p1;
        }
        return p2;
    }

    Shape getShape()
    {
        Path2D path = new Path2D.Double();
        path.moveTo(p0.getX(), p0.getY());
        path.lineTo(p1.getX(), p1.getY());
        path.lineTo(p2.getX(), p2.getY());
        path.closePath();
        return path;
    }

    Triangle2D transformed(AffineTransform at)
    {
        Point2D tp0 = at.transform(p0, null);
        Point2D tp1 = at.transform(p1, null);
        Point2D tp2 = at.transform(p2, null);
        return new Triangle2D(tp0, tp1, tp2);
    }

}

class TriangleAlignTestPanel extends JPanel
    implements MouseListener, MouseMotionListener
{
    private final List<Point2D> points0;
    private final List<Point2D> points1;
    private Point2D draggedPoint = null;

    TriangleAlignTestPanel()
    {
        Point2D a = new Point2D.Double(-100, -100);
        Point2D b = new Point2D.Double(100, -100);
        Point2D c = new Point2D.Double(0, 100);

        Point2D d = new Point2D.Double(-100, -200);
        Point2D e = new Point2D.Double(100, -100);
        Point2D f = new Point2D.Double(0, 100);

        AffineTransform at0 = AffineTransform.getTranslateInstance(150, 150);
        a = at0.transform(a, null);
        b = at0.transform(b, null);
        c = at0.transform(c, null);

        AffineTransform at1 = AffineTransform.getTranslateInstance(550, 250);
        d = at1.transform(d, null);
        e = at1.transform(e, null);
        f = at1.transform(f, null);

        points0 = new ArrayList<Point2D>();
        points0.add(a);
        points0.add(b);
        points0.add(c);

        points1 = new ArrayList<Point2D>();
        points1.add(d);
        points1.add(e);
        points1.add(f);

        addMouseListener(this);
        addMouseMotionListener(this);
    }

    @Override
    protected void paintComponent(Graphics gr)
    {
        super.paintComponent(gr);
        Graphics2D g = (Graphics2D)gr;
        g.setRenderingHint(
            RenderingHints.KEY_ANTIALIASING,
            RenderingHints.VALUE_ANTIALIAS_ON);
        g.setColor(Color.WHITE);
        g.fillRect(0, 0, getWidth(), getHeight());

        // Create the triangles
        Triangle2D t0 = new Triangle2D(points0);
        Triangle2D t1 = new Triangle2D(points1);

        // Obtain the edges
        Line2D e0 = new Line2D.Double(t0.getPoint(1), t0.getPoint(2));
        Line2D e1 = new Line2D.Double(t1.getPoint(0), t1.getPoint(1));

        // Compute the centers of the edges
        Point2D center0 = at(e0, 0.5);
        Point2D center1 = at(e1, 0.5);

        // Compute the angle of the edges to the x-axis
        double a0 = angle(e0);
        double a1 = angle(e1);

        // Compute the alignment transformation:
        // Second: Translate the triangle so that the edge centers match
        AffineTransform at = new AffineTransform();
        at.concatenate(AffineTransform.getTranslateInstance(
            center0.getX()-center1.getX(), center0.getY()-center1.getY()));
        // First: Rotate the triangle so that the angles are equal
        at.concatenate(AffineTransform.getRotateInstance(
            Math.PI+a0-a1, center1.getX(), center1.getY()));
        Triangle2D tt1 = t1.transformed(at);

        g.setColor(Color.RED);
        draw(g, t0);
        g.setColor(new Color(0,0,255,32));
        draw(g, t1);
        g.setColor(Color.BLUE);
        draw(g, tt1);

    }

    private static double angle(Line2D line)
    {
        double x0 = line.getX1();
        double y0 = line.getY1();
        double x1 = line.getX2();
        double y1 = line.getY2();
        double x = x1-x0;
        double y = y1-y0;
        return Math.atan2(y, x);
    }

    private static Point2D at(Line2D line, double position)
    {
        double x0 = line.getX1();
        double y0 = line.getY1();
        double x1 = line.getX2();
        double y1 = line.getY2();
        double x = x0 + position * (x1-x0);
        double y = y0 + position * (y1-y0);
        return new Point2D.Double(x, y);
    }

    private static void draw(Graphics2D g, Triangle2D t)
    {
        g.draw(t.getShape());
        for (int i=0; i<3; i++)
        {
            Point2D p = t.getPoint(i);
            int x = (int)p.getX();
            int y = (int)p.getY();
            g.drawString(String.valueOf(i), x, y);
        }
    }

    @Override
    public void mouseDragged(MouseEvent e)
    {
        if (draggedPoint != null)
        {
            draggedPoint.setLocation(e.getPoint());
            repaint();
        }
    }

    @Override
    public void mouseMoved(MouseEvent e)
    {
    }

    @Override
    public void mouseClicked(MouseEvent e)
    {
    }

    @Override
    public void mousePressed(MouseEvent e)
    {
        draggedPoint = null;
        double thresholdSquared = 10*10;
        double minDs = Double.MAX_VALUE;
        for (Point2D point : points1)
        {
            double ds = point.distanceSq(e.getPoint());
            if (ds < thresholdSquared && ds < minDs)
            {
                minDs = ds;
                draggedPoint = point;
            }
        }
    }

    @Override
    public void mouseReleased(MouseEvent e)
    {
        draggedPoint = null;
    }

    @Override
    public void mouseEntered(MouseEvent e)
    {
    }

    @Override
    public void mouseExited(MouseEvent e)
    {
    }

}

can you prouved my thAT

if we divide a rectangle into 2 right triangles, the 2 triangles have the same measures


Probability that your friend's password has no repeated characters You try to guess your friend's password, which is $8$ characters long, chosen from numbers the $0 \to 9$, letters a $\to$ z and letter A $\to $Z [caps]. But Your friend is lazy, and only choses from "a, s, d, f" and "A, S, D, F" and the number "$1$". What is the probability that your friend's password has no repeated characters?

total possibilities: $9^8$

event possibilities: $9^{(8)}$ (9 permute 8)

$P = \frac{9^{(8)}}{9^8} - 0.008$?

But the answer the text gives is: $0.012$?

A possibility to explain the answer $0.012$ could be that the password has to be alphanumeric, i.e.  it is not allowed to be all letters or all numbers. Under this restriction, the total number of possible passwords is
given by $$9^8-8^8-1=   26.269.504$$

where $9^8$ is the total number of possibilities of filling $8 $places with $9$ characters, $8^8$ is the number of passwords containing only letters, and $1$ refers to the unique password containing only numbers $1$.

Considering then the passwords with no repeated characters, we can note that, to meet the condition of being alphanumeric, they all must contain the number $1$ one and only one time. As a result, they must also contain exactly $7$ letters. So their number is given by
$$ \binom{8}{7} \cdot 7! \cdot 8=322.560$$

where $ \binom{8}{7} $ is the number of possibilities to choose $7$ letters from the group of available $8$ letters, $7! $ are the permutations of the chosen letters, and $8$ refers to the fact that the number  $1$ can be in any position within the password.

Therefore, the resulting probability is

$$\frac {322.560}{26.269.504} \approx 0.012$$

There has to be a repetition because the set of possible characters is smaller than the password length.
This is called the Pigeonhole Principle

EDIT: This is outdated due to an edit to the original question, this was true for the character set "a","s","d","f","1" but not when "A","S","D","F" is added.


Question about integral $$
\int_{-\infty}^{+\infty} \frac{x\sin x}{4+x^2}dx.
$$
How  can  we  calculate  this  integral  by  Feynman  integration  method?

Let for $t>0$
$$
F(t)=\int_{-\infty}^{\infty}\frac{x\sin(xt)}{4+x^2}{\rm d}x\tag 1
$$
so that
$$
F(1)=\int_{-\infty}^{\infty}\frac{x\sin x}{4+x^2}{\rm d}x\tag{$\star$}
$$
Fixing $t > 0$, set $y = xt$, so ${\rm d}y = t \,{\rm d}x$ and
$$
F(t)=\int_{-\infty}^{\infty}\frac{y\sin y}{4t^2+y^2}{\rm d}y\tag 2
$$
This new integral will be accessible to differentiation under the integral sign. Differentiating under the integral sign we obtain
$$
F'(t)=\int_{-\infty}^{\infty}\frac{\partial}{\partial t}\left(\frac{y\sin y}{4t^2+y^2}\right){\rm d}y=\int_{-\infty}^{\infty}\frac{-8t\, y\sin y}{(4t^2+y^2)^2}{\rm d}y\tag 3
$$
We want to compute $F''(t)$ using differentiation under the integral sign.
We obtain
$$
F''(t)=\int_{-\infty}^{\infty}\frac{\partial^2}{\partial t^2}\left(\frac{y\sin y}{4t^2+y^2}\right){\rm d}y=\int_{-\infty}^{\infty}\frac{\partial^2}{\partial y^2}\left(\frac{-4y}{4t^2+y^2}\right)\sin y\ {\rm d}y\tag 4
$$
and integrating by parts twice we obtain
$$
F''(t)=-\int_{-\infty}^{\infty}\cos y\frac{\partial}{\partial y}\left(\frac{-4y}{4t^2+y^2}\right)\ {\rm d}y=\int_{-\infty}^{\infty}\frac{4y\sin y}{4t^2+y^2}\ {\rm d}y\tag 5
$$
that is
$$
F''(t)=4F(t)\tag 6
$$
The equation (6) is a second order linear ODE whose general solution is
$$
F(t)=A{\rm e}^{2t}+B{\rm e}^{-2t}\tag 7
$$
for all $t > 0$ and some real constants $A$ and $B$.

To determine $A$ and $B$ we look at the behavior as $t\to 0^+$ and as $t\to\infty$.
For $t\to 0^+$, from (2) we have
$$
F(0)=A+B=\int_{-\infty}^{\infty}\frac{\sin y}{y}{\rm d}y=\pi
$$
that is $B=\pi-A$ and the (7) becomes
$$
F(t)=A{\rm e}^{2t}+(\pi-A){\rm e}^{-2t}.
$$
For $t\to \infty$, from (1) integrating by parts we have
$$
F(t)=\int_{-\infty}^{\infty}\frac{x\sin(xt)}{4+x^2}{\rm d}x=\left[-\frac{\cos(xt)}{t}\frac{x}{4+x^2}\right]_{-\infty}^{\infty}+\frac{1}{t}\int_{-\infty}^{\infty}\cos(xt)\frac{4-x^2}{(4+x^2)^2}{\rm d}x
$$
from wich we obtain
$$
\lim_{t\to \infty}F(t)=0
$$
and then $A=0$.

Finally we have
$$
F(t)=\pi{\rm e}^{-2t}\tag 8
$$
and for $t=1$ we find
$$
F(1)=\int_{-\infty}^{\infty}\frac{x\sin x}{4+x^2}{\rm d}x=\frac{\pi}{{\rm e}^2}.\tag{$\star\star$}
$$

Without Feyman (go guess the parameter that will work!), but with complex analysis

Define

$$f(z)=\frac{ze^{iz}}{4+z^2}\;,\;\;C_R=[-R,R]\cup\gamma_R:=\{z\in\Bbb C\;z=Re^{it}\;,\;0<\le t<\pi\}\;$$

The only residue of $\;f\;$ within the domain enclosed by $\;C_R\;$ , with $\;R\;$ big enough, is $\;2i\;$ , so

$$\text{Res}_{z=2i}(f)=\lim_{z\to 2i}(z-2i)f(z)=\frac{2ie^{-2}}{4i}=\frac1{2e^2}$$

so by the Cauchy's RT

$$\oint\limits_{C_R}f(z)dz=2\pi i\frac1{2e^2}=\frac{\pi i}{e^2}$$

Now

$$\left|\int\limits_{\gamma_R}f(z)dz\right|\le\pi \max_{z\in\gamma_R}\frac{|z||e^{iz}|}{|4+z^2|}\le\pi\frac{Re^{-R\sin t}}{4-R^2}\xrightarrow[R\to\infty]{}0$$

so

$$\frac{\pi i}{e^2}=\lim_{R\to\infty}\oint\limits_{C_R}f(z)dz=\int\limits_{-\infty}^\infty \frac{xe^{ix}}{x^2+4}dx$$

and now just compare imaginary parts.


$f^n(x)$ where $n \in \mathbb{R}^+$ Given a function $f(x)$ whose image is a subset of its domain, we can define
$$
f^n(x) = \underbrace{f(f(f(\dots f(x) \dots )))}_{n \text{ times}}
$$

This makes sense when $n$ is a nonnegative integer.

Can we extend this definition to continuous values of $n$? Such as $f^{\frac{1}{2}}(x)$?

Let $f(x)=x$. You would want $f^{1/2}$ defined so that $$\left(f^{1/2}\circ f^{1/2}\right)(x)=f(x)=x$$

Here are five options, for starters:

$f^{1/2}(x)=x$
$f^{1/2}(x)=-x$
$f^{1/2}(x)=\sqrt[3]{1-x^3}$
The implicit solution to
$x+f^{1/2}(x)=e^{-\left(x-f^{1/2}(x)\right)^2}$
The implicit solution to
$x+f^{1/2}(x)=\frac12\cos\mathopen{}\left(x-f^{1/2}(x)\right)\mathclose{}$

What would be the basis to choose one of these? I could understand a preference for the first option here. But with general $f$, if this is evidence that there are many possibilities for $f^{1/2}$, you might want to have a definition that somehow picks one canonically.

Or maybe you just let $f^{1/2}$ stand for the class of all functions that meet the condition $f^{1/2}\circ f^{1/2}=f$.

You see here $n$ is a whole number. If you take it as 0.5 then problems will arise. For example is $n=2$ then that means we input function into itself two times but what $n=0.5$ would mean. Would it mean that we only input half of f or the first term of f or the last term.This becomes ridiculous when n goes out of range


Ranking System on Multiple Choice Tests Suppose we have a Multiple Choice Test with the following characteristics:

There are M available multiple choice Questions on the system
There are N users participating
Each user replies to K questions, for convenience let's assume K < M
Eventually, we can define the difficulty level of each question by computing the population's probability of answering correctly eg

P(correct) = CorrectAnswers/TotalAnswers

I need to create an alternative to ELO Rating System for each player. I could just use the Total P(correct) for each user, but this is not indicative of user's skills, because each question set is random and some users may be given easier questions than others.

Till now, I just grouped the questions based on their difficulty P(correct) and used each 10% percentile to create 10 different sets. So, I now have 10 ranking lists that somehow estimate users skills on each of the 10 question levels. Users with better accuracy in each list are ranked higher.

But, I need a generic single Ranking List algorithm; I wonder if there is a general formula that applies to the whole set of questions, but on the same time it uses the difficulty level P(correct).

FYI: the problem has some similarities to creating a Ranking List on basketball players by merging accuracy of both 2-points and 3-points shots. Is there a joint Ranking formula for that?

I believe you should sum the inverses of $P_{i \mathrm{correct}}$.
So the score of each player will be:
score $\sum_{i=0}^N \left(\cfrac{1}{P_{i \mathrm{correct}}}\right)$ for $i = 1..N$


Find a regular graph in which $\kappa(G) \neq \lambda(G)$ The vertex-connectivity, $\kappa(G)$, is the minimum number of nodes whose deletion from a graph G disconnects it.

The edge-connectivity of G, $\lambda(G)$, is the minimum cardinal of the cuts in G.

Now can you find a regular graph in which $\kappa(G) \neq \lambda(G)$ ?

Note: I know this graph is not 3-regular.

The following graph is 4-regular with $\kappa =1$ , and $\lambda =2$. Note that for any graph $G$, $\kappa(G)\leq \lambda(G)$.


What is the purpose of random variable functions within probability theory? This is a rewrite of the question. See the original here.

For a given probability field $(\Omega, A, P)$, a random variable defined on that field would be this (I'll use a real-valued random variable for simplicity):
$$X : \Omega \mapsto \mathbb{R}$$

As I understand it from the comments, this should be interpreted as this: having observed a random outcome $\omega \in \Omega$, what are the consequences of that outcome?

As an example given by Dilip Sarwate, if I toss a coin and heads comes up, I win \$1.00; if tails comes up, I lose \$0.50. In that case, the random variable would be $X(H) = 1.00,\ X(T) = -0.50$.

If I got all of the above right, here's my question. Random variables (ie. consequences of a random outcome) seem like a very high-level concept. Why are they necessary within an abstract mathematical theory such as probability theory?

Kolmogoroff's probability axioms and the notion of random variable are a prime paradigm of $20^{\rm th}$ century mathematics. To compute probabilities connected with coins and urns you maybe could do without random variables; but if you want to go at complicated stochastic phenomena like the weather you absolutely need them.

A random variable has a priori nothing "random" about it: It is a well defined function on a maybe huge "probability space" $\Omega$. An individual point $\omega\in\Omega$ may be the possible "world weather during  24 consecutive hours" and entail information about temperature, clouds, humidity etc. at all points of the earth at all times of a day. Contrasting this ocean of possibilities a real valued random variable $T$ could be the temperature at Kennedy Airport, New York, at 12.00 p.m., on a given day. Given $\omega$, the value of $T$ is well defined, but "chance" or "fate" chooses the point $\omega$ where $T$ is evaluated. Note that it is absolutely impossible to "observe" the point $\omega\in\Omega$ in its totality, but we can observe $T$ on any given day, and we are even able to observe the function $t\mapsto T(t)$.

Kolmogoroff's axioms allow to talk coherently about the "probability that it rains on three consecutive days at Kennedy airport" or about the probability that the temperature is $\leq 31^\circ$ Celsius there at $09.00$ a.m. tomorrow, without really dealing with the intricacies of the space $\Omega$.

I think that we need a random variable just because it is a number. The thing which we all have experience to deal with from the moment we start counting change at a grocery store.


Why can't a perpetual motion polyhedron exist? I've been thinking about polyhedrons, when placed on a table on a certain face, will tip over and keep tipping over infinitely. I'm trying to prove mathematically that such a polyhedron doesn't exist.

Rules: the polyhedron does not need to be uniform nor convex, but at any point the mass there is non-negative. this means you can have holes and caves and points and fun stuff.

Right now I'm stuck because I'm not sure what determines if the polyhedron tips over. Either it's 1. The COM of the polyhedron, when projected onto the table, lies outside of the polygon face touching the table, and 2. The gravitational potential energy, mgh, is lowered by tipping over.

I understand with some basic geometry that 1 implies 2, but condition 2 does not necessarily imply that it will tip over.

How do I proceed to prove that such a perpetual polyhedron doesn't exist?

Edit: Thought about it some more and solved my question. 1 and 2 are equivalent in the real world because if the COM was above the base face, then tipping over would require that mgh first increase before finally adopting its final value after tipping over. If the COM is not above the face then there is no necessary activation energy. Therefore, the polyhedron tips over if and only if the energy strictly decreases, which happens if and only if the COM lies outside the face. After this process the potential energy decreases.

Now assume that the polyhedron spontaneously remains in perpetual motion. Then the energy is strictly decreasing; but the potential energy clearly has a minimum value, so it can't go on forever.

The convex hull of the polyhedron will roll on a horizontal plane spontaneously, from being seated on one face to being seated on another, only if (not necessarily if) the centre of mass of the polyhedron is lowered in doing so. Since the convex hull of the polyhedron has only a finite number of faces, there can be only a finite number of such lowerings, and so the process must terminate in a finite number of steps.

Edit: The above answer considers only the static aspects of the problem. If we allow dynamics into the picture (which is realistic), while (unrealistically) assuming zero friction or other resistance, then a polyhedron can indeed rock backwards and forwards, or roll, forever. If we are fully realistic, perpetual motion cannot occur, for reasons of friction alone.

I have studied philosophy of physics and dimensions within logic. My answer is dependent on that type of basis.

I find some of the mathematical questions a bit silly in this case. Isn't the movement of a polyhedron a physical problem?

For the sake of imagination, I can imagine cases where mathematically-physically a polyhedron would tip, for example:

Timeless force applied to the object.
An assumption of continued motion, for example, a vector, which may not require force if no force is implied.
A sequential operation implicated in the object, as the others seemed to be saying, for example, numeric or categorical inversion, extrusion, etc.
An assumption that imbalance creates force, which may be a matter of how the program running the object handles imbalances. To me this would seem like an added timeless force or sequence, or some other type of vector.

All in all, it seems to me to call a polyhedron a perpetual motion machine in mathematical space implies mathematical assumptions about the use of vectors.


Why is $\frac{987654321}{123456789}$ almost exactly $8$? I just started typing some numbers in my calculator and accidentally realized that $\frac{123456789}{987654321}=1/8$ and vice versa $\frac{987654321}{123456789}=8.000000072900001$, so very close to $8$.

Is this just a coincidence or is there a pattern behind this or another explanation? I tried it with smaller subsets of the numbers but I never got any similar pattern.

There does not seem to be an explanation that makes it easy to explain why $\frac{987654321}{123456789}$ is so close to $8$ other than a Mathematical coincidence.

However, since it is not exactly $8$, this does not count as a mathematical coincidence. Maybe the best way to rewrite it that shows why it is close to $8$ is:

$8\cdot123456789 + 9 = 987654321$

But the thing that is not hard to explain is the basic algebra that given:

$$\frac{123456789}{987654321} \approx \frac{1}{8}$$

Taking the inverse results in:

$$\frac{987654321}{123456789} \approx \frac{8}{1} (= 8)$$


Proving that $x^2 + 4$ is not divisible by $3$ I need to show the following:

For any integer $x$, $x^2 + 4$ is not divisible by $3$.

I was trying proof by contraposition, but I do not believe that is the most efficient way to go about this.  Can anybody point me in the right direction, please?

Assume that $x^4 +4$ is divisible by $3$. Then $x^2 + 1 = (x^2 +4) -3$ is divisible by $3$.

Now (following https://math.stackexchange.com/a/630761/26188) you have that one of the following is divisible by $3$:

$x-1$
$x$
$x+1$.
If $x$ is divisible by $3$, then so is $x^2$ and so $x^2 + 1$ would not be divisible by $3$.

If $x$ is not divisible by $3$, then $x-1$ or $x+1$ would be divisible by $3$. So $(x-1)(x+1) = x^2 -1$ is divisible by $3$. And so then $x^2 + 1 = (x^2 -1) +2$ can't be divisible by $3$.

$$x \equiv 0 \equiv 1 \equiv -1 \pmod{3} \space \text{for all cases}$$

Then:

$$x^2 \equiv 0 \equiv 1 \equiv 1 \pmod{3}$$

In any of the cases,

$$4 \equiv 1 \pmod{3}$$

$$x^2 + 4 \equiv 1 \equiv 2 \equiv 2 \pmod{3}$$

ALSO:

$$x^2 + 4 = (x + 2)^2 - 4x$$

Suppose it is divisible by $3$ then,

$$x + 2 \equiv 2\sqrt{x} \pmod{3}$$

But $\sqrt{x}$ isn't necessarily an integer, but a remainder is always an integer.


Balls and vase $-$ A paradox? Question

I have infinity number of balls and a large enough vase. I define an action to be "put ten balls into the vase, and take one out". Now, I start from 11:59 and do one action, and after 30 seconds I do one action again, and 15 seconds later again, 7.5 seconds, 3.75 seconds...

What is the number of balls in the vase at 12:00?

My attempt

It seems like that it should be infinity (?), but if we consider the case:

Number each balls in an order of positive integers. During the first action, I put balls no. 1-10 in, and ball no.1 out, and during the $n^{\text{th}}$ action I take ball no. $n$ out.

In this way, suppose it is at noon, every ball must have been taken out of the vase. So (?) the number of balls in the vase is

Zero???

My first question: if I take the ball randomly, what will be the result at noon? (I think it may need some probability method, which I'm not familiar enough with.)

Second one: is it actually a paradox?

Thanks in advance anyway.

What you just discovered is that the cardinality of a set (the number of elements) is not a continuous function, that is, for a convergent sequence $S_n$ of sets you may have
$$\lim_{n\to\infty}\left|S_n\right|\ne \left|\lim_{n\to\infty} S_n\right|$$
where $\left|S_n\right|$ is the cardinality of $S_n$ (e.g. $\left|\{2,3,4,5\}\right|=4$). In your case, the left hand side diverges (giving you the infinite number of balls), while the right hand side gives $0$ (the cardinality of the empty set).

This is not a paradox, but a warning that you have to be careful with such limits.

From a physics point of view, not more than 72 balls (maybe 81).

Otherwise, imagine somebody putting ten and taking out 1 balls in less than 1 second!!


Exponentiation of a diagonal matrix By the definition of matrix exponentiation,

$$A^k = \begin{cases}
I_n, & \text{if } k=0  \\[1ex]
A^{k-1}A, & \text{if } k\in \mathbb {N}_0  \\
\end{cases}$$

In my book, there's an exercise to do $D^k$, where $D$ is a diagonal matrix.
In the solutions, though, they wrote

$$D^k=\operatorname{diag}(d_1^k, \dots , d_n^k)$$

Which one is correct?

Both are correct but they are two different topics.

$$A^k=\left\{
\begin{array}{c}
I_n, if\, k=0  \\
A^{k-1}A, if\, k\in {\displaystyle \mathbb {N} }_0  \\
\end{array}
\right.$$
is the definition of the matrix power $A^k$ in general.

On the other hand $$D^k=diag(d_1\,^k, ... , d_n\,^k)$$ is a special case where your matrix is a diagonal matrix.

There is no conflict because the second one is just the application of the first one to the diagonal matrix $$D=diag(d_1,d_2, ... , d_n)$$

Let $$D=\begin{bmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{bmatrix}.$$ then by the property of diagonal matrix
$$f(D)=\begin{bmatrix} f(a) & 0 & 0 \\ 0 & f(b) & 0 \\ 0 & 0 & f(c) \end{bmatrix}$$ So  $$D^k= \begin{bmatrix} a^k & 0 & 0 \\ 0 & b^k & 0 \\ 0 & 0 & c^k \end{bmatrix}$$ and $$D^0 =\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$


How to solve $x \equiv 2^{2999999} \pmod {17}$? What trick can I use to solve the question (in the title)?

I need to solve it by hand, wihtout the help of a computer or calculator. And the trick shouldn't just work with my example but also with $3^{123456789}$ for example.

Write down the first few numbers. $2^0 \mod 17 = 1$. $2^1 \mod 17 = 2$. $2^2 \mod 17 = 4$. $2^3 \mod 17 = 8$. $2^4 \mod 17 = 16$. $2^5 \mod 17 = 15$. $2^6 \mod 17 = 13$. $2^7 \mod 17 = 9$. $2^8 \mod 17 = 1$.

Now if we go on with this, then the results will repeat. We will find that $2^8 = 2^{16} = 2^{24} ... \mod 17 = 1$. Every time the power is a multiple of eight, the modulo is 1. Therefore $2^{2999992} \mod 17 = 1$. And 7 steps further, $2^{2999999} \mod 17 = 9$.


Evaluation of $\int_0^1 \frac{x^3}{2(2-x^2)(1+x^2) + 3\sqrt{(2-x^2)(1+x^2)}}\,\mathrm dx$ How does one evaluate the following integral?

$$\int_0^1 \frac{x^3}{2(2-x^2)(1+x^2) + 3\sqrt{(2-x^2)(1+x^2)}}\,\mathrm dx$$

This is a homework problem and I have been evaluating this integral for hours yet no success so far. I have tried to rationalize the integrand by multiplying it with
$$\frac{2(2-x^2)(1+x^2) - 3\sqrt{(2-x^2)(1+x^2)}}{2(2-x^2)(1+x^2) - 3\sqrt{(2-x^2)(1+x^2)}}$$
but the integrand is getting worse. I have tried to use trigonometric substitutions like $x=\tan\theta$ and $x=\sqrt{2}\sin\theta$, but I cannot rid off the square root form. I have also tried to use hyperbolic trigonometric substitutions but the thing does not get any easier neither also substitution $y=x^2$ nor $y=\sqrt{(2-x^2)(1+x^2)}$. Using integration by parts is almost impossible for this one. I have also tried to use the tricks from this thread, but still did not get anything. No clue is given. My professor said, we must use clever substitutions but I cannot find them. Any idea or hint? Any help would be appreciated. Thanks in advance.

Edit :

The answer I got from my Prof is $\dfrac{3-2\sqrt{2}}{6}$.


Remainder with congruences I'm having some trouble understading how to use congruence to solve this type of exercises:

a) Determinate the remainder of the division of $2173451$ with $17$
b) Determinate the remainder of the division of $1522^{1000}$ with $19$

For example, in b) I know that $1522=80\times19+2$, so $1522 \equiv 2(mod19)$ , so  $1522^{1000} \equiv 2^{1000}(mod19)$. What now?

In exercise $b)$ , reduce the exponent modulo $\phi(19)=18$


How to evaluate inverse trigonometric functions in exponents? I recently started working on inverse trigonometry, I have done many problems that include conversion of inverse functions and many more formulas but how should we approach a question when the inverse functions are given in exponents.
For example, I came to a question,

  $12^{\arcsin(x)} + 12^{\arccos(x)} + 12^{\arctan(x)} >3\cdot k^{\pi/k}$

  Find $k$?

Can you please provide me a start. I will solve the rest on my own.
Thanks.

I know no general method to approach a question when the inverse functions are given in exponents, but I guess that in general such questions hide simple ideas under a cumbersome form with artificially chosen functions and coefficients.. For instance, in this question the inequality holds for all positive $k$. We can show this as follows.

Since $\operatorname{arcsin} x+\operatorname{arccos} x=\pi/2$ for each $x$,

$$12^{\operatorname{arcsin} x}+12^{\operatorname{arccos} x}+12^{\operatorname{arctan} x}>$$
$$12^{\operatorname{arcsin} x}+12^{\operatorname{arccos} x}\ge \mbox{ (by AM-GM) }$$ $$
12^{(\operatorname{arcsin} x+\operatorname{arccos} x)/2}=2\cdot 12^{\pi/4}\approx 14.080.$$

On the other hand, the derivative of the function $3k^{\pi/k}$ is $\frac{3\pi k^{\pi/k}}{k^2}(1-\ln k)$. Therefore the function increases when $0<k<e$, attains its maximum $3e^{\pi/e}\approx 9.529$ at $k=e$, and decreases when $k>e$.

PS. The following graph (drawn by Mathcad) suggests that the minimum value of a function
$f(x)=12^{\operatorname{arcsin} x}+12^{\operatorname{arccos} x}+12^{\operatorname{arctan} x}$
is about $18.5237$ and is attained when $x$ is a solution of a transcendental equation $f’(x)=0$, that is when

$$(12^{\operatorname{arccos} x}-12^{\operatorname{arcsin} x})(1+x^2)=12^{\operatorname{arctan} x}\sqrt{1-x^2}.$$

You can try also to convert arcsin and arccos to their complex log expressions. If do that, the x goes down, out of the exponents.


Do all $2$-dimensional parametric equations have a Cartesian form? Question as in the title. Also, if a $2$-dimensional parametric equation does not have a Cartesian form, how would one go about proving this?

Two particular parametric equations I believe do not have a Cartesian form. (Or at least, I was unable to find the Cartesian form.)

First set of equations: (The square roots are difficult to eliminate.)

$x = \sqrt{60t} - t$

$y = (\sqrt{60t} - t)\left(\frac{60}{\sqrt{60t}}-1\right)$

Second set of equations: (The term $f(t)$ is difficult to eliminate.)

Let $f$ be some differentiable relation and let $r \in \mathbb{R}$. Define

$x = t - r\sin(\arctan(f'(t)))$

$y = f(t) + r\cos(\arctan(f'(t)))$

One interesting thing to note about the second set of parametric equations is that the set of points $(x,y)$ is an exact duplicate of $f(t)$, but $r$ units away along the normal through $(t,f(t))$.

I believe that you can always make one variable in an equation of two variables the "subject" of the equation. Maybe not in terms of elementary functions in very specific cases, but I'm pretty sure it's always possible. (And then substituting what you found for $t$ into the other equation is trivial.)

So, for instance, with your first set:

$$\sqrt{60t} - t = x$$
$$\sqrt{60t} = x + t$$
$$60t = (t+x)^2$$
$$60 t-t^2-2 t x-x^2 = 0$$
Solve this quadratic in $t$ to get
$$t = 30 - x \pm \sqrt{900-60x}$$

Plugging in is the easy part. Replace $t$ with $30 - x \pm \sqrt{900-60x}$ to get

$$y = \sqrt{60} \, \Bigg(-1 + \frac{\sqrt{60}}{\sqrt{30 \pm \sqrt{900 - 60 x} - x}} \Bigg) \sqrt{30 \pm \sqrt{900 - 60 x} - x}$$
which looks like

Let x=f(t) and y=g(t). Let F(f(t))=t, in other words, F is the inverse of f, supposing f is invertible. Then y = g(F(x)) will give you y in terms of x.

Additionally, principles of differential equations can be used.

dy/dx = g'(t)/f'(t). If that is continuous and it's derivative with respect to t divided by g'(t) is also continuous, then there exists a unique solution of y in terms of x. Mind the points where the functions are not defined, i.e. avoid division by 0.

http://faculty.sfasu.edu/judsontw/ode/html/firstlook06.html


The minimum number of variables to represent a 3D line in a unique way To my best understanding, the minimum number of variables to represent a line in 3D space is four. It means you need at least four values to identify a 3D line. For example from here

$$a x + b y + c z = d \tag{1}$$

defines a line with four variables. However, this is not a unique representation of the line, and by scaling the equation you may still represent the same line:

$$k a x + k b y + k c z = k d \, , \{k \neq 0\} \tag{2}$$

So my question is that what is the minimum number of variables to represent a line in a unique way? In other words, if

$$l_1 \equiv L\{ a_1, a_2, \cdots , a_n \} \tag{3}$$

and

$$l_2 \equiv L\{ b_1, b_2, \cdots , b_n \} \tag{4}$$

then

$$l_1 \equiv l_2 \tag{5}$$

only and if only

$$ \{a_i = b_i, \forall i \in 1,\cdots,n\} \tag{6}$$

Or, if I want to ask my question differently, what is the best way to mathematically represent a line in a 3D space, in a unique way, with the minimum number of degrees of freedom?

P.S.1. I think I have my answer, and it is shamefully simple. Just divide the first equation by $d$. So it seems the minimum number of variables to represent a line (or DOF) in a 3D space in a unique way should be 3:

$$a' x + b' y + c' z = 1 \tag{7}$$

where $\alpha' = \frac{\alpha}{d}$!

P.S.2. The above method doesn't work if $d = 0$, so one needs at least a boolean variable $d' = 0 \, or \, 1$:

$$a' x + b' y + c' z = d' \tag{8}$$

to represent all possible lines in a 3D space.

P.S.3. I made a very silly mistake. Eq.1. represents a plane, not a line!

An answer to the question the user really meant to ask, according to the comments

I'm actually writing a code where I want to define a 3D line class.
and I want to have an equality method. So I need literal uniqueness.

This is the real problem.
You're mistaken about uniqueness and equality testing.
Representational uniqueness is neither required for equality testing nor universally the best way to do equality testing.
Suppose you specify a line using a pair of distinct points on the line. Now you need to test whether $(P, Q)$ is the same line as $(A, B)$. Here's a solution: test whether $A$ is on the line $PQ$, and $B$ is on the line $PQ$. If so (and only if so), the lines are the same, even though their representations are different. Just to close the loop here, you can test whether $A$ is on $PQ$ by checking whether
(i) $A = P$ or
(ii) $A \ne P$, but $A-P$ and $Q-P$ are proportional (nonzero) vectors.
At this point, there's likely to be some muttering about how this is bad because of numerical issues and IEEE floating point standards and you can't test equality of floats, etc. You really need uniqueness of representation.
Well, consider this: I can write down pairs of distinct points in the plane (or 3-space, but the plane is simpler) $A,B$ and $P, Q$ that mathematically characterize the same line, but which, when mapped into any "unique" representation like @Empy2's excellent one, will produce different results, if the mapping is carried out with any standard floating point representation. So your floating point nightmare is present from the very moment you compute your "unique" representation.
Deep in the heart of things, the problem is that you're hoping to represent a line in 3-space using a computer, and the pigeonhole principle says you're going to lose: there are uncountably many lines, and only countably many representation options. Even if you restrict to line that contain two representable points, you're going to need to use floating-point equality testing to determine whether some point $P$ lies on the line $L$, and that's going to give the wrong answer some of the time. It's probably best (but very difficult) to decide what properties of lines-in-3-space you really like and want to preserve in your representation, and then prove that your representation actually preserves those properties. As I say, that's really hard. Then again, so is debugging programs with numerical errors in the 14th digit. I've been there. "Proving" turns out to actually be easier. :(

Maybe $5$? $x,y,z$ of the reference point and a unit vector, which needs $\theta$ and $\phi$?


Taking the automorphism group of a group is not functorial. Once upon a time I proved that there is no functorial 'association'
$$F:\ \mathbf{Grp}\ \longrightarrow\ \mathbf{Grp}:\ G\ \longmapsto\ \operatorname{Aut}(G).$$
A few days ago I casually mentioned this to someone, and was asked for a proof. Unfortunately I could not and still can not recall how I proved it. Here is how much of my proof I do recall:

Suppose such a functor does exist. Choose some group $G$ wisely, and let $f\in\operatorname{Hom}(V_4,G)$ and $g\in\operatorname{Hom}(G,V_4)$ be such that $g\circ f=\operatorname{id}_{V_4}$. Then, because $F$ is a co- or contravariant functor we have
$$F(g)\circ F(f)=F(g\circ f)=F(\operatorname{id}_{V_4})=\operatorname{id}_{\operatorname{Aut}(V_4)},$$
or
$$F(f)\circ F(g)=F(g\circ f)=F(\operatorname{id}_{V_4})=\operatorname{id}_{\operatorname{Aut}(V_4)},$$
where $\operatorname{Aut}(V_4)\cong S_3$. In particular $\operatorname{Aut}(G)$ contains a subgroup isomorphic to $S_3$. Then something about the order of $\operatorname{Aut}(G)$ leads to a contradiction.

I cannot for the life of me find which goup $G$ would do the trick. Any ideas?

Though the question has effectively been answered by the combined comments of Martin Brandenburg and Derek Holt, I thought I'd write up a complete answer for completeness' sake.

Let $N:=\Bbb{F}_{11}$ the finite field of $11$ elements and $H:=\Bbb{F}_{11}^{\times}$ its unit group. Let $G:=N\rtimes H$ the semidirect product of $N$ and $H$ given by the multiplication action of $H$ on $N$. Note that $G$ is isomorphic to the group of affine transformations of $\Bbb{F}_{11}$. Then the maps
$$f:\ H\ \longrightarrow\ G:\ h\ \longmapsto\ (0,h)\qquad\text{ and }\qquad g:\ G\ \longrightarrow\ H:\ (n,h)\ \longmapsto\ h,$$
are group homomorphisms and satisfy $g\circ f=\operatorname{id}_H$. Now suppose there exists a covariant functor
$$F:\ \mathbf{Grp}\ \longrightarrow\ \mathbf{Grp}:\ X\ \longmapsto\ \operatorname{Aut}(X).$$
Then we have group homomorphisms
$$F(f):\ \operatorname{Aut}(H)\ \longrightarrow\ \operatorname{Aut}(G)\qquad\text{ and }\qquad F(g):\ \operatorname{Aut}(G)\ \longrightarrow\ \operatorname{Aut}(H),$$
satisfying
$$F(g)\circ F(f)=F(g\circ f)=F(\operatorname{id}_H)=\operatorname{id}_{\operatorname{Aut}(H)},$$
so the identity on $\operatorname{Aut}(H)$ factors over $\operatorname{Aut}(G)$, i.e. $\operatorname{Aut}(G)$ has a subgroup isomorphic to $\operatorname{Aut}(H)$.

We have $\operatorname{Aut}(H)\cong\Bbb{Z}/4\Bbb{Z}$ because $H$ is abelian of order $10$. By this question we have $\operatorname{Aut}(G)\cong G$. But $|\operatorname{Aut}(G)|=|G|=11\times10=110$ is not divisible by $|\operatorname{Aut}(H)|=|\Bbb{Z}/4\Bbb{Z}|=4$, a contradiction. This shows that no such covariant functor exists. The contravariant case is entirely analogous.

Maybe, you can consider $G_1=G$ and $G_2=G\oplus H$

Clearly, there are two canonical morphisms, the injection $i:G_1\rightarrow G_2$ and the projection $\pi:G_2\rightarrow G_1$

Now if $Aut$ is a functor, no matter it's contravariant or covariant, a contradiction easily follows if you can construct $G, H$ satisfying

$Aut(G)$ has a generator $g_1$ of order $n$
$Aut(G\oplus H)$ has a generator $g_2$ of order $m$
$(n,m)=1$

Then the Lagrange Theorem provides for contradiction

As $\pi\circ i=1_G$, we get

1) covariant case

$\mathrm{ord}(Aut(i)(g_1))|\mathrm{ord}(g_1)=n$, $\mathrm{ord}(Aut(i)(g_1))|m$

Thus, $Aut(i)(g_1)=g_2^0=e_{Aut(G_2)}$, which contradicts to

$Aut(\pi)\circ Aut(i)=1_{Aut(G)}$

2) contravariant case

Change $Aut(i)(g_1)$ to $Aut(\pi)(g_1)$ and it's OK !


Commutative quantifiers If I have a proposition of the form $$(\forall x \in X) (\exists y \in Y) (\forall r \in R) \, P(x,y,r)$$ where at least any number of $X$, $Y$ and $R$ can be the same. Is that logically equivalent to the following?

$$(\forall r \in R) (\forall x \in X) (\exists y \in Y) \, P(x,y,r)$$

where $P(x,y,r)$ is any proposition (possibly an implication). How would I prove it, if it's possible? Properties of quantifiers can't be proven through truth tables, so how would I start to approach this sort of problem?

No, the statements are not equivalent. In general, quantifiers of the same type are commutative ($\forall x \forall y \phi \equiv \forall y \forall x \phi$;  $\exists x \exists y \phi \equiv \exists y \exists x \phi$), but quantifiers of two different types are not ($\forall x \exists y \phi \not \equiv \exists y \forall x \phi$).

To illustrate this, consider the simple example:

  For all tupperware boxes there is a lid that fits it.

This can be formalized as

  (1) $\forall x (Box(x) \to \exists y (Lid(y) \land Fit(y,x)))$

Or, using the abbreviations you made use of in your formula$^1$,

  $\forall x \in Box \exists y \in Lid, Fit(y,x)$

Unfortunately, from this we can not conclude that there is a magical lid that fits all tupperware boxes:

  (2) $\not \vDash \exists y \forall x (Box(x) \to (Lid(y) \land Fit(y,x)))$

(Usually, the case is rather that there are alwyays somehow more lids than tupperware boxes, but still you can't find a suitable lid for all your boxes...)

So $\forall x \exists y \phi \not \vDash \exists y \forall x \phi$. This can be shown by providing a simple model that satisfies that first but not the second formula.

The reverse direction does hold: If there were a magical lid that is compatible with all tupperware boxes, then of course every tupperware box would have a matching lid.

So $\exists y \forall x \phi \vDash \forall x \exists y \phi$. You can prove this by making an argument about about how quantified formulas are satisfied semantically, or by a formal proof in some system like natural deduction for predicate logic, employing soundness of this system.

That (1) $\not \vDash$ (2) but (2) $\vDash$ (1) means that (2) is a stronger statement: Any situation in which (2) holds is one where (1) is also true, but there are situations in which (1) is true but (2) is not, because (2) is a stronger constraint on the valid models.

The same reasoning now applies to your formula that involves three quantifications: While it is okay to swap the order of $\forall x$ and $\forall r$, moving $\forall r$ in front of $\exists y$ is not. This makes for a weaker statement: Saying that for all $r \in R$ we can find some $y \in Y$ that satisfies $P(x,y,r)$ is a less strict requirement and will hence have models that don't satisfy the original stronger claim that there must be a particular $y \in Y$ that works for all $r \in R$.

Since $\forall r \in R \forall x \in X \exists y \in Y  ,P(x,y,r) \not \models \forall x \in X \exists y \in Y \forall r \in R ,P(x,y,r)$ but $\forall x \in X \exists y \in Y \forall r \in R ,P(x,y,r) \models \forall r \in R \forall x \in X \exists y \in Y  ,P(x,y,r)$, if you are convinced that your second formulation does the job, you can use this one, and all the models that were compatible with your first formalization will also be permitted by your second formalization. But they are not logically equivalent: Depending on what you want to describe/to which models you want to restrict yourself to with your proposition, your second formalization might be too weak, in that it in addition permits models that would contradict the first formalization - at least it is in the general case. (I would have to get a better understanding of your predicate to be able to tell whether your second, weaker version is still strong enough for what you want to express).

To show that the two formulas are not equivalent, consider a simple model:

$$\mathfrak{A} = \langle \mathcal{A}, \mathcal{I} \rangle$$ with
$$\mathcal{A} = \{x1, y1, y2, r1, r2\}$$
$$\mathcal{I}(X) = \{x1\};\\
\mathcal{I}(Y) = \{y1, y2\};\\
\mathcal{I}(R) = \{r1, r2\};\\
\mathcal{I}(P) = \{\langle x1, y1, r1 \rangle, \langle x1, y2, r2 \rangle\}$$

$\mathfrak{A} \models \forall r \in R \forall x \in X \exists y \in Y P(x,y,r)$ (your second formalization): For each r and for each thing in x (there is just one, to make things simpler) we can find find some element y that goes in the triple: For $r1$, we have $y1$, and for $r2$, we find $y2$.
But $\mathfrak{A} \not \models \forall x \in X \exists y \in Y \forall r \in R P(x,y,r)$ (your first formalization), because for our one $x$, there is no thing in $Y$ that works for all the $r$.

Since there is a model that satisfies the second but not the first formula, they are not equivalent.

$^1$ Technically, $\forall x \in X \exists y \in Y \phi$ is not a syntactically valid first-order formula, but it's a very common abbrevation for $\forall x (x \in X \to \exists y (y \in Y \land \phi))$. I'm using this latter explicit syntax to hopefully give a better understanding of why a formula is or is not satisfied by a model.

ADDED LAST

The final word is that lemontree's answer was right and mine was wrong; I have left the original in place below.

A good example of the in-equivalence, is to let the domains of discourse
$X$, $Y$, and $R$ be the reals, and consider the proposition $P(x,y,z)$ to be
$$ (x=0) \vee
((y \in \Bbb Q) \wedge (|y-\sqrt{2}| \lt |x|) \wedge (|ry-r\sqrt{2}| \lt |rx|))
$$
Then the first statement $\forall x\left( \exists y \forall r P(x,y,r) \right)$
reads in English as "for any given real non-zero $x$ there exists some rational $y$ such that for all real $r$ the absolute difference between $y$ and $\sqrt{2}$ is less than $|x|$ (and when both sides of that inequality are multiplied by $R$ it still holds).   This is obviously true, since arbitrarily good rational approximations to $\sqrt{2}$ can be found.

But the second statement $\forall r\left( \exists y \forall x P(x,y,r) \right)$
reads "for every real $r$, there exists some rational $y$ such that for any arbitrary non-zero $x$ the absolute difference between $y$ and $\sqrt{2}$ is less than $|x|$ (and another clause)."  That is obviously not true, because there is no rational approximation to $\sqrt{2}$ that is closer than any arbitrarly chosen $x$.

Thus the two statements are not logically equivalent.

ORIGINAL ANSWER

In a logic system that allows Skolemization, you can apply this second-order equivalence (see https://en.wikipedia.org/wiki/Skolem_normal_form):
$$
\forall x\left( R(g(x)) \vee \exists yR(x,y)\right) \Longleftrightarrow \exists f\forall x \left( R(g(x)) \vee R(x,f(x))\right)
$$
where $f(x)$ is a function that maps $x$ to $y$.

Our application of this is a specialization which is a considerable simplification:  Let
$R(g(x)) = F$ (False) and $F(x,f(x)$ be $\forall r P(x,f(x),r)$.  Then the equivalence reads
$$
\forall x\left( \exists y \forall r P(x,y,r) \right) \Longleftrightarrow \exists f\forall x \left( \forall r P(x,f(x),r)\right)
$$
Here I have omitted the domain designations, that is, $\forall x$ means $\forall x \in X$ and $\exists y$ means $\exists y \in Y$.

And now we can commute $\forall x \forall r$ because an axiom says that
$\forall x \forall r\, P$ is identical to $\forall r \forall x\, P$, thus
$$\exists f\forall x  \forall r P(x,f(x),r)  \Longleftrightarrow
\exists f\forall r  \forall x P(x,f(x),r) \Longleftrightarrow
\forall r\left( \exists y \forall x P(x,y,r) \right)
$$

Added later:

OMG, I didn't have to go into this detail, because (assuming the Skolem_normal_form page is correct) they give an example that is precisely the case in the problem!  To quote:

  As an example, the formula $\forall x \exists y \forall z P(x,y,z)$ is not in Skolem normal form because it contains the existential quatifier $\exists y$.
  Skolemization replaces $y$ with $f(x) \ldots$ and removes the quantification over $y$.  The resulting formula is $\forall x \forall z P(x,f(x),z)$.  $\ldots$ The formula obtained by this transformation is satisfiable if and only if the original formula is.

(Emphasis mine).  So we can now go over to  $\forall x \forall z P(x,f(x),z)
\equiv  \forall z \forall x P(x,f(x),z)$ and from there, use the "if and only if" property to go to the equivalent $\forall z \exists y \forall x P(x,y,z)$

The use of the function $f(x)$ might imply that this reasoning depends on having the axiom of choice.

To extend/use the @lemontree example:

Let $P(x,y,r)$ be "lid $r$ fits every tupperware that is in the same house ($x$) as this tupperware box $y$.

Then the question becomes whether these statements are identical:

For all houses, there is some lid that fits every tupperware in the house.
For every tupperware, there exists some lid that fits (it and) every tupperware in the same house.

I claim they are logically equivalent.


Show that $e^{-t}\int_{0}^{t}\frac{e^{x}}{\sqrt{x}}dx$ is strictly decreasing for $t\geq1$ I want to prove that $e^{-t}\int_{0}^{t}\frac{e^{x}}{\sqrt{x}}dx$ is decreasing
on $[1,\infty[$.

First of all numerical experiments verify this.

I am trying the first derivative test, but stuck with showing that
the sign of the derivative is negative, which is equivalent to showing that
$$\int_{0}^{t}\frac{e^{x}}{\sqrt{x}}dx> \frac{e^{t}}{\sqrt{t}},\qquad t\geq 1$$.

Any ideas?

I think I solved it.

Let $f(t):=e^{-t}\int_{0}^{t}\frac{e^{\xi}}{\sqrt{\xi}}$.

We need to show that
$f^{\prime}(t)=\frac{\frac{e^t}{\sqrt{t}}-\int_{0}^{t}\frac{e^{\xi}}{\sqrt{\xi}}}{e^{t}}<0$ for $t>1$.
The latter follows if we show that the function $g$ where

$$g(t):=\int_{0}^{t}\frac{e^{\xi}}{\sqrt{\xi}}-\frac{e^t}{\sqrt{t}}$$
is positive for $t>1$.

Now
$$g(1):=\int_{0}^{1}\frac{e^{\xi}}{\sqrt{\xi}}-e$$
It turns out that $g(1)=\sqrt{\pi}\,\mathrm{erfi}(1)-e>2.9-e>0$
(Can we do the latter estimate analytically ?)

Finally,

$$g^{\prime}(t):=\frac{e^{t}}{\sqrt{t}}-\frac{e^t}{\sqrt{t}}+
\frac{e^t}{2t^{\frac{3}{2}}}>0$$
So, $g$ is increasing and positive at $t=1$.

Hint: The first derivative with respect to $t$ is given by
$$f'(t)-{{\rm e}^{-t}}\sqrt {\pi}{\it erfi} \left( \sqrt {t} \right) +{\frac
{{{\rm e}^{-t}}{{\rm e}^{t}}}{\sqrt {t}}}
$$


Choosing the Permutation Which Maximizes a Weighted Sum Prove

Consider ordered real numbers $x_1 \le x_2 \le \dots \le x_n$ and $y_1 \le y_2 \le \dots \le y_n$.

Let $ \sigma : \{ 1,2,\dots,n\} \rightarrow \{ 1,2,\dots,n\}$ be a permutation on the integers $1,2,\dots,n$.

Show that $\sum\limits_{k=1}^n x_ky_{\sigma(k)} \le \sum\limits_{k=1}^n x_ky_k$.

My Intuition

Algebraically, to maximize a weighted sum, we want to put the heaviest weights $x_k$ on the heaviest values of $y_{\sigma(k)}$.  The easiest way to do that is to order them in the same way.  In other words,

$max\{ \sum\limits_{k=1}^n x_ky_{\sigma(k)} \} = \sum\limits_{k=1}^n x_ky_k$

Geometrically, the permutation of $y_{\sigma(k)}$ which satisfies this condition would be the one which is ordered in the same direction as $x_k$.  To maximize the dot product, we maximize the cosine or minimize the angle between these two vectors.  Since permutations would only change the direction of the vector, not its length, we pick the permutation which points in the same increasing direction as $x_k$.

I'm having trouble formalizing a proof for these observations.

Any hints on either a geometric or algebraic approach for a proof would be appreciated.

First Attempt

Using Steve Kass' comment as a guide, I will attempt a proof by contradiction.

Suppose we choose a $\sigma(k)$ that is out-of-order.  For example, $y_2$ and $y_1$ are switched.

We claim that $\sum\limits_{k=1}^nx_ky_{\sigma(k)} \color{red}{>} \sum\limits_{k=1}^nx_ky_k$

Common terms on rhs/lhs cancel out giving us,

$(x_1y_2 + x_2y_1) \color{red}{>} (x_1y_1 + x_2y_2)$

$y_2(x_1-x_2) + y_1(x_2-x_1)\color{red}{>} 0$

$y_2(x_1-x_2) - y_1(x_1-x_2)\color{red}{>} 0$

$(y_2-y_1)(x_1-x_2)\color{red}{>} 0$

but this is a contradiction, because the product of a positive number and a negative number cannot be greater than zero.

Therefore, our original assumption was wrong.  We are left with:

$\sum\limits_{k=1}^nx_ky_{\sigma(k)} \le \sum\limits_{k=1}^nx_ky_k$.

Similar arguments can be made for any $\sigma(k)$ that is out-of-order.

Second Attempt (Proof By Induction)

We will generalize the proof for any out-of-order weightings.  We want to prove

$max\{ \sum\limits_{k=1}^n x_ky_{\sigma(k)} \} = \sum\limits_{k=1}^n x_ky_k$

given

$x_1 \le x_2 \le \dots \le x_n$

$y_1 \le y_2 \le \dots \le y_n$

Note that any permutation can be decomposed into a series of transpositions, or a permutation of two elements.  Any transposition can be ordered in two ways, with the coordinates in the same (increasing or decreasing) direction or in the opposite directions.

We start by defining indexes $i<j$ and $k<l$.  So $x_iy_l + x_jy_k$ is ordered in opposite directions, while $x_iy_k + x_jy_l$ is weighted in the same direction.  We make the assumption that the former sum is larger than the latter.

$(x_iy_l + x_jy_k) \color{red}{>} (x_iy_k + x_jy_l)$

$(x_iy_l + x_jy_k) - (x_iy_k + x_jy_l) \color{red}{>} 0$

$x_i(y_l - y_k) - x_j(y_l - y_k) \color{red}{>} 0$

$(x_i-x_j)*(y_l - y_k) \color{red}{>} 0$

Again, we have a contradiction, because the product of a negative number and a positive number cannot be greater than zero.  So the correct expression is

$(x_iy_l + x_jy_k) \le (x_iy_k + x_jy_l)$

The transposition with the matched order produces the greater sum.

From here, one step at a time, we can then increase the value of the weighted sum by applying transpositions until the two vectors are entirely matched up in ordering.  Any further transposition would only decrease the sum, so at this point, we have reached the ordering for the maximal sum.


Let $f(m,1) = f(1,n) = 1$ for $m \geq 1, n \geq 1,$ and let $f(m,n) = f(m-1,n) + f(m,n-1) + Let $f(m,1) = f(1,n) = 1$ for $m \geq 1, n \geq 1,$ and let $f(m,n) = f(m-1,n) + f(m,n-1) + f(m-1,n-1)$ for $m > 1$ and $n > 1.$ Also, let

$$S(n) = \sum_{a+b=n} f(a,b), \text{ for } a \geq 1, b \geq 1.$$

Note: The summation notation means to sum over all positive integers $a,b$ such that $a+b=n.$

Given that

$$S(n+2) = pS(n+1) + qS(n) \text{ for all } n \geq 2,$$

for some constants $p$ and $q$, find $pq.$

This was easy, but intimidating. I substituted in my values of $f(m,n)$ int the function, and found all the values of $$S(k) = \sum_{a+b=k} f(a,b), \text{ for } a \geq 1, b \geq 1$$ up to $k=5$, then wrote a system of equations, and solved for $p$ and $q$. Easy