About a proof of the Adequacy of Natural Deduction for Propositional Logic In Mathematical Logic by Chiswell and Hodges, section 3.10 page 89 proves the following theorem:

Theorem 3.10.1 (Adequacy of Natural Deduction for Propositional Logic)
Let $\Gamma$ be a set of formulas of $\text{LP}(\sigma)$ and $\psi$ a formula of $\text{LP}(\sigma)$. If $\Gamma\models_\sigma\psi$ then $\Gamma\vdash_\sigma\psi$.

Before moving to the proof of the lemmas for the theorem as well as the theorem itself, the authors said:

Although what was said looks natural to me by intuition, I tried to find a mathematical justification: Why is it true that if $\Gamma\vdash_\sigma\psi$ and $\psi \,\,eq\,\,\phi$ (which means $\psi$ is logically equivalent to $\phi$) then $\Gamma\vdash_\sigma\phi$ ?
Proving this property (call it (*)) would justify that we can indeed use the stripped-down version of $\text{LP}$, because in this case, if we prove Theorem 3.10.1 for formulas of $\text{LP}$ which contains only $\land$,$\lnot$ and $\perp$ as truth functions, then if $\psi\in\text{LP}(\sigma)$ then we can take a logically equivalent formula to it, call it $\phi$, which contains only $\land$,$\lnot$ and $\perp$ as truth functions, and then apply Theorem 3.10.1 to $\phi$ (note that since $\psi\,\,eq\,\,\phi$, we have $\Gamma\models_\sigma\psi$ if and only if $\Gamma\models_\sigma\phi$), we would have $\Gamma\vdash_\sigma\phi$ and thus, using (*), we would conclude that $\Gamma\vdash_\sigma\psi$.
Note that (*) is correct as it's easy to see that it's a corollary of Theorem 3.10.1 along with the Soundness of Natural Deduction for Propositional Logic Theorem, which was already proven in section 3.9. To avoid a circular proof, I have to prove (*) without using that theorem. I wrote an argument that I couldn't complete unless I prove that any tautology $\phi\in\text{LP}(\sigma)$ satisfies $\vdash_\sigma\phi$ (again that's a corollary of Theorem 3.10.1), which I failed to prove using induction on the complexity of $\phi$.
As the authors said, we can leave the other truth function symbols of $\text{LP}$ and enlarge the proof to take them into consideration, but I'm curious about how we can rigorously avoid that. Could you please help me?

To avoid circularity, you have to take the "longer way", i.e. enlarge Definition 3.10.4 of Hintikka set to consider all the connectives, and consider all cases in Lemma 3.10.5 and Lemma 3.10.6: it is longer but straightforward.

A "standard" approach in many textbook would be: avoiding the shortcut, consider only some "typical" cases (like $\land$, $\lnot$ and $\bot$) and leave the others to the reader as an exercise.

The alternative, but not in the "spirit" of natural deduction, is to start with a restricted set of connectives and introduce the others as abbreviation: $P \lor Q$ as $\lnot (\lnot P \land \lnot Q)$, etc.

Of course, the rules for the defined connectives must be derived from the primitive rules.

If |=($\psi$ eq $\phi$), and ($\Gamma$ $\vdash$ $\psi$), then

|=($\psi$ eq $\phi$) and ($\Gamma$ |= $\psi$) by soundness.

|=($\psi$ eq $\phi$) implies that |=($\psi$ $\rightarrow$ $\phi$).

|=($\psi$ $\rightarrow$ $\phi$) implies ($\psi$ |= $\phi$).

Thus can infer that ($\Gamma$ |= $\psi$) and ($\psi$ |= $\phi$).

So, we can infer ($\Gamma$ |= $\phi$).

Now by completeness ($\Gamma$ |- $\phi$).

As another argument, note that you have the rule of inference

($\phi$ <-> $\psi$) $\vdash$ ($\phi$ -> $\psi$).

If we have two formulas logically equivalent we have |=($\phi$ <-> $\psi$).  By completeness we have $\vdash$($\phi$ <-> $\psi$).  And thus we can obtain ($\phi$ -> $\psi$ and the result you mentioned above.


Prove that a group of order 42 has a non trivial normal subgroup I know there are various solutions to this problem. We are to use Cauchy theorem. I am doing my best to understand the proof but am missing some key logic points. The parts that lose me are the following author's claims:

“... $|S| \le 6$ since if $H_1, H_2$ are any two different subgroups of G of order 7 then $H_1 \cap H_2 = (e)$
and so $\cup_{H\in S} H = 6 |S| + 1$...”
I understand why it has to be $\leq 6$, I just don’t understand the  rationale.
And the claim that $\varphi$ is not injective:
”Now, $\varphi$ is not injective since otherwise, by Lagrange’s Theorem, $42 | n!$ for some $n \le 6$, and so $7 | n!$ for some $n \le 6$ which is obviously impossible...”
This part confuses me because other proofs I’ve read claim the opposite, that it is indeed injective. What am I missing here?

Could someone clear up those arguments for me?

Here’s Author's proof:
By Cauchy’s Theorem there are subgroups of $G$ of order $7$.

Let $S = \{H \le G : |H| = 7\}$. Observe that $|S| \le 6$ since if $H_1, H_2$ are any two different subgroups of $G$ of order $7$ then $H_1 \cup H_2 = (e)$ and so $\cup_{H\in S} H = 6 |S| + 1$.

Define $\varphi :G\to A(S)$ by $\varphi(x)(H)=xHx^{−1}$ for each $H \in S$.

Note that $\varphi$ is well-defined since for each $x\in G$, $H_1, H_2 \in S$, we have that $\varphi(x)(H_1) = \varphi(x)(H_2)$ iff $xH_1x^{−1} = xH_2x^{−1}$ iff $H_1 = H_2$ and so $\varphi(x)$ is a well-defined injection from $S$ into $S$ and because $S$ is finite, $\phi (x) \in A (S)$.

Furthermore $\varphi$ is a group homomorphism, since for $x, y \in G$ and $H \in S$ we have
$$
\varphi (xy) (H) = xyHy^{−1}x^{−1} = \varphi (x) yHy^{−1} =
\big(\varphi (x) \circ \varphi (y)\big) (H).$$

Now, $\varphi$ is not injective since otherwise, by Lagrange’s Theorem, $42 | n!$ for some $n \le 6$, and so $7 | n!$ for some $n \le 6$ which is obviously impossible.

Observe that if $\varphi (x) = iS$ for all $x\in G$ then $xHx^{−1} = H$ for all subgroups $H$ of $G$ of order $7$. Hence, in this case, every subgroup of $G$ of order $7$ is normal.

On the other hand, if $\varphi (x)\neq iS$ for all $x\in G$ then $(e)\neq \ker(\varphi)\rhd G$ and we are done. $\blacksquare$

I tried to clean up the formatting as best I knew how. Thanks

For the first part, a group of order $7$ has $6$ nonidentity elements, and two different subgroups of order $7$ intersect only in the identity, so the number of elements accounted for by all subgroups of order $7$ is $6n+1$, where $n$ is the number of subgroups. This must be less than or equal to $42$, so $n\leq 6$.

The action of $G$ on the set of subgroups of order $7$ by conjugation induces a homomorphism into $S_n$, where $n\leq 6$. The source you found that says it is injective is mistaken, because $S_n$ for $n\leq 6$ has no element of order $7$ because its order is not divisible by $7$. If $n>1$, this implies that there is a proper nontrivial normal subgroup.

|G| =42=2×3×7
The prime 7/|G|
So,there exist a subgroup of order 7.
Now, Nomber of 7-SSG=1+7k/6. For k=0,1,2,.......
                                         =1 ,for k=0
So 7-SSG is unique.So, the subgroup of order 7 is normal in G.
That's the proof.
THANKS.


Sums of pairwise different prime numbers I'm interested in all natural numbers, that are the sum of pariwise different prime numbers. For example 10 is such a number, since

$10 = 7 + 3$

My suspicion is that almost every natural number is the sum of pairwise different prime numbers. Actually by my pen & paper calculations, I did not find a natural number larger than 6 that is not such a sum, but I did not calculate much, so maybe there are even small numbers that are not a sum of pairwise different primes.

So my questions are these:

Is there any natural number larger than 6, which is not the sum of pairwise different primes? If not, any idea how to prove this?

And what's about the natural numbers, that are the sum of at least n natural prime numbers, with $n \in \mathbb{N}$? Is there any knowledge about these numbers?

Regards,
S. M. Roch

Edit: I'm sorry, I forgot to say for my first question, that I also accept the sum of not only two prime numbers. So for example

$20 = 11 + 7 + 2$

is also such a sum, and for every prime number the number is its sum itself.

There are lots of numbers greater than $6$ that are not the sum of pairwise different primes, like all the odd primes greater than $5$ that are not the larger part of a twin prime pair. If $n$ is odd, then so is $n - 2$. Remember that two odd primes add up to an even number.

In the case of $11$, we see that $11 - 2 = 9$, $11 - 3 = 8$, $11 - 5 = 6$ and $11 - 7 = 4$. Clearly $9$ is the square of an odd prime, and the rest are even numbers other than $2$. Look at Sloane's A014092 for plenty more examples.

For even $n$, you're talking about the Goldbach conjecture, as the commenters have already mentioned. For odd $n$, there is what is sometimes called the "weak" Goldbach conjecture, that every sufficiently large odd $n$ can be represented as the sum of three odd prime numbers.

Mathematicians have been able to prove both versions of the Goldbach conjecture for some numbers so large they are almost beyond the reach of our computers. But that doesn't disprove the possibility that a counterexample could exist just a little beyond your computer's ability.

Let me prove that ANY natural number n>6 can be written as the sum of two integers greater than 1,each of the summands being relatively prime.
PROOF:
First note that if d divides two integers a and b,then d must also divide their difference a-b.Therefore consecutive numbers are always relatively prime.Likewise,if a and b are both odd with difference 2 or 4,then a and b are relatively prime.
Now let n be greater than 7.
If n is odd,then n has the form n=2k+1,where k>3 is an integer.Thus we write the sum n=k+(k+1)
If n is even,then n has the form n=2k,where k>4 is an integer
-if k is even,we write n=(k-1)+(k+1);
-if k is odd,we write n=(k-2)+(k+2).
So we proved that  ANY natural number n>6 can be written as the sum of two integers greater than 1,each of the summands being relatively prime!


Sufficient statistics, how compute it. Guys can you help me with this? I’ve tried to apply the definition of sufficient statistics but the professor only gave us simple examples so I don’t know how to compute it.

$$X\sim f_θ$$

$$f_θ(x)=\frac{θ}{2}(θx)^2\exp\{−θx\}\text{ for }x>0$$

Moreover, let $X_1,…,X_n$ be a sample from $X$. a) Find a sufficient statistic for the model b) Find the MLE of $θ$ and the MLE of $E(X)=\frac{3}{θ}$

\begin{align}
\prod_{i=1}^n f_\theta(x_i) & = \left(\frac \theta 2\right)^n ((\theta x_1) \cdots (\theta x_n))^2 \exp\{−\theta (x_1+\cdots+x_n)\} \\[10pt]
& = \Big(\, \overbrace{\theta^{3n} \exp(-\theta(x_1+\cdots + x_n))}^\text{first factor}\,\Big) \cdot \Big(\, \overbrace{ \frac{x_1\cdots x_n}{2^n}}^\text{second factor} \, \Big) \tag 1
\end{align}

Fisher's factorization theorem says that if this can be written as a product of two factors in which

one factor depends on $x_1,\ldots,x_n$ only through some specified function of $x_1,\ldots,x_n$ and
the other factor does not depend on $\theta,$

then that specified function, evaluated at the sample, is a sufficient statistic.

Therefore $X_1+\cdots+X_n$ is a sufficient statistic.

If $L(\theta) = $ the expression on line $(1)$ above, then
$$
\ell(\theta) = \log L(\theta) = 3n\log\theta - \theta(x_1+\cdots+x_n) + \text{constant}
$$
so
$$
\ell\,'(\theta) = \frac{3n}\theta - (x_1+\cdots+x_n) \quad \begin{cases} >0 & \text{if } 0 \le \theta < 3/\overline{x}, \\[6pt] <0 & \text{if } \theta>3/\overline{x}. \end{cases}
$$
Therefore $\widehat \theta = 3/\overline x.$

By equivariance of MLEs, the MLE of $3/\theta$ is $\overline x.$


Why am I getting two different answers (and the textbook a third) on this 3D trig problem? Simone is facing north and facing the entrance to a tunnel through a mountain.  She notices that a $1515$ m high mountain is at a bearing of $270^\circ$ from where she is standing and its peak has an angle of elevation of $35^\circ$.  When she exits the tunnel, the same mountain has a bearing of $258^\circ$ and its peak has an angle of elevation of $31^\circ$.

  Assuming the tunnel is perfectly level and straight, how long is it?

I had two problems with this question. I was getting two different answers using methods that should give the same answer and neither of those answers matched with the answer in the textbook.

Attempt 1:

What we want to figure out is the value for $d$. If we can figure out the values for $x$ and $y$, then we can use Pythagorean theorem to figure out the value for $d$.

In this case,

$$x = \frac{1515}{\tan 35^\circ} \qquad\text{and}\qquad y = \frac{1515}{tan 31^\circ}$$

We also know that $d =\sqrt{y^{2}-x^{2}}$, so

$$d = \sqrt{\left(\frac{1515}{\tan 31^\circ}\right)^{2}- \left(\frac{1515}{\tan 35^\circ}\right)^{2}}$$

  This makes the value of $d$ about 1294 meters.

Attempt 2:

We can figure out the value for $\theta$. In the ground level triangle $\theta = 258^\circ -180^\circ = 78^\circ$. This also means $\gamma = 90^\circ - 78^\circ = 12^\circ$. In the solution above, we figured out the value for $x$ and $y$. We can use trig ratios to figure out the value for $d$.

$$\tan\gamma = \frac{d}{x} \qquad\to\qquad d = x \tan 12^\circ = \frac{1515 \tan 12^\circ}{\tan 35^\circ}$$

  This gives a value for $d$ equal to about $460$ meter.

  In my textbook, the answer for the length of the tunnel is actually $650$ meters. I was wondering what am I doing wrong. Also: Why are my two answers not matching?

Notice that in your first solution you do not need the asserted angle of $258^\circ$.

In fact, from the information given you can conclude that the angle must actually be $239.1^\circ$.

So those who said the information was inconsistent were correct. The $258^\circ$ is bogus.

You should have been asked to find the angle since enough information is given to find it.

But it is $239.1^\circ$ not $258^\circ$ as claimed in the problem.

From the right angled triangle directly, connect two triangles in horizontal plane:

$$ 1515 \sqrt{ \cot ^2 31^0 - \cot^2 35^0} \approx 1294  $$


Creating a function from graph I'm trying to create a function that will generate a graph similar to this awesome paint gif:

This is my attempt thus far: f(x)=-0.0040*(x+200)*(x-200)

I can't figure out how to get my graph to "turn" and go to 0 like in the picture. I've tried different types of absolute values and I guess I could make two separate functions. If it is possible, I really would love to be able to express it in a single function though. Note that the exact values are not that important, I can tweak them later. The shape of the graph is really what I'm looking for (disregarding my artistery with uneven lines).

Two possible guesses.

Probability Density: $\large y=ce^{-\left(\frac{x-k}{h}\right)^2}$

I don't know what a name for this is, but another similar graph is $\displaystyle y=\frac{c}{1+(h(x-k))^2}$.

This looks like an inverse Cosine graph translated vertically by 1 unit. It also looks quite dilated as (x E [-200,200]), therefore its dilation factor should be π/200.
f(x) = cos(π/200 x)+1
Since you didn't mention the y-intercept, I cannot be sure of its amplitude.


Baby rudin chapter 6 exercise 14 ---Isn't it a typo? $$
f(x) \ = \ \int_{x}^{x+1} \sin(e^t) \, dt.
$$
Show that
$$
e^x | f(x) | \ < \ 2
$$
and that
$$
e^x f(x) = \cos(e^x) - e^{-1} \cos(e^{x+1}) + r(x),
$$
where $|r(x)|< C e^{-x}$ for some constant $C$.

Using Integration by parts, I showed that
$$
f(x) = \frac{\cos(e^x)}{e^x} - \frac{\cos(e^{x+1})}{e^{x+1}} - \int_{e^x}^{e^{x+1}} \frac{\cos u}{u^2} \, du .
$$
Thus, in my calculation,
$$
r(x) \ = \ -e^x \int_{e^x}^{e^{x+1}} \frac{\cos u}{u^2} \, du .
$$
But I can't prove that $|r(x)| < C r^{-x}$ for some $C$.

Is it typo????
(We can show that $|r(x)| < 2 e^{-1}$.)


Intuitive explanation of CDF of a Binomial distribution in the volume of a Hyperspherical Cap Note: This is my first question ever in stackexchange, I apologize for any mistakes in formatting, on the appropriateness of the question and tags.

From Wikipedia, I know the regularized incomplete beta function is related to the CDF of a random variable $X$ from a Binomial distribution:
$$\mathcal{F} \left(k; n, p\right) = 1 - I_{p} \left( k+1, n-k \right). $$
(https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function)
Also from Wikipedia, the expression of a hyperspherical cap in $D$ dimensions is given by
$$ V_{D\text{-cap}} = \frac{1}{2}V_{D\text{-ball}} \, I_{(2Rh-h^2)/R^2} \left(\frac{D+1}{2}, \frac{1}{2} \right),$$
where $V_{D\text{-ball}}$ is the the volume of the the $D$-ball with radius $R$ and $h$ is its height.
(https://en.wikipedia.org/wiki/Spherical_cap)
I re-expressed the previous expression to incorporate heights larger than $R$ and considered the cap is cut at the hyperplane $x=0$ and the ball is centered at $x=x_0$ (See image).
Then, $R = h-x_0$, and
$$ \frac{V_{D\text{-cap}} (x_0)}{V_{D\text{-ball}}} = -\frac{1}{2} \text{sgn}\left(\frac{x_0}{R} \right) I_{1-\left( \frac{x_0}{R} \right)^2} \left( \frac{D+1}{2}, \frac{1}{2} \right) + \Theta \left(\frac{x_0}{R}\right),$$
where $\text{sgn}(x)$ is the sign operator, $I_x \left(a,b \right)$ the regularized incomplete beta function and $\Theta(x)$ the Heaviside function.
Considering the property from point 1 and $\Theta (x) = \frac{1}{2} + \frac{1}{2} \text{sgn} (x)$, this can be re-expressed as:

$$\frac{V_{D\text{-cap}} (x_0)}{V_{D\text{-ball}}} =\frac{1}{2} + \frac{1}{2} \text{sgn}\left(\frac{x_0}{R}\right) \mathcal{F} \left( \frac{D-1}{2}; \frac{D}{2}, 1-\left( \frac{x_0}{R} \right)^2 \right).$$

So here comes my question: What is the meaning of the CDF of the Binomial distribution in this context? That is, which random variable is associated to this problem that has probability $1- \left( \frac{x_0}{R} \right)^2$ of having $\frac{D-1}{2}$ successes out of $\frac{D}{2}$ trials?

EDIT:
After some plots I see the expression from step 1 is never true for $k=\frac{D-1}{2}$ and $n=\frac{D}{2}$. For odd $D$ the Binomial CDF appears to not be defined, I guess a fractional number of experiments $n$ is not well-defined; and for even $D$ the two sides give different values, I imagine a fractional number of successes $k$ is neither well-defined. So as pointed by @fedja this interpretation may be ill-posed.

Assume vlog that $R=1$. The problem is equivalent to proving that the probability that the random point inside a hypersphere has $x$-coefficient less than $x_0$ is equal to:
$$\mathcal{F} \left( \frac{D-1}{2}; \frac{D}{2}, 1-x_0^2 \right)=I_{x_0^2}(\frac{1}{2},\frac{D+1}{2})$$
To do this we have to ask how we can draw random points from the inside of a hypersphere uniformly at random. Notice that if $N_1$, $N_2$, ..., $N_D$ are independent standard normal random variables, the vector:
$$(N_1, N_2, ..., N_D)$$
Points to a point on a hemisphere uniformly at random. The same would be true for:
$$(\frac{N_1}{X}, \frac{N_2}{X}, ..., \frac{N_D}{X})$$
For any random variable $X$. If we choose:
$$X=\sqrt{N_1^2+N_2^2+...+N_D^2+Y}$$
Where $Y \sim Exp(2)=\Gamma(1,2)$ we see that the radius squared is equal to:
$$r^2=\frac{N_1^2+N_2^2+...+N_D^2}{N_1^2+N_2^2+...+N_D^2+Y}=\frac{Z}{Z+Y}$$
Where $Z \sim \Gamma(\frac{D}{2},1)$. It follows that $r^2 \sim B(\frac{D}{2},1)$ which is exactly the distribution of a squared distance of a uniformly random point inside a hypersphere (which can be easily seen from the CDF of a radius which is $P(r \le x)=x^D$). So the distribution of the square of the first coordinate of a random point inside a hypersphere is the same as the distribution of:
$$\frac{N_1^2}{X^2}=\frac{N_1^2}{N_1^2+N_2^2+...+N_D^2+Y}=\frac{A}{A+B}$$
Where $A \sim \Gamma(\frac{1}{2},2)$ and $B \sim \Gamma(\frac{D+1}{2})$ from which it follows that $x_0^2$ has a distribution $B(\frac{1}{2},\frac{D+1}{2})$ which concludes the proof.

I'd think the volume ratio is tied to Binomial distribution if you consider computing it via a Monte Carlo method where you pick random points inside a hypercube completely containing the sphere (and thus the cap) and tally up how many such points lie in the cap region vs entire sphere itself
like computing pi by filling up a square with random points and recording which fraction lie inside a circle ...


Parametrization of $x^2+ay^2=z^k$, where $\gcd(x,y,z)=1$ $x,y,z$ be three coprime integers, $a \in \mathbb{Z}>0$ and $k$ an odd integer. How do I find all the non-trivial solutions of the diophantine equation? $$x^2+ay^2=z^k$$
Does the method which consists in assuming that: $$x^2+ay^2=(p^2+aq^2)^k$$ (where $p,q$ are two coprime integers) provide the general parametrization?

well, no. If $k$ divides the order of the class group, there will be others. For example, along with $x^2 + 11 y^2,$ we also have $3x^2 + 2xy+4y^2$ and $3x^2 - 2xy+4y^2.$ The class group has order 3, and any number $n,$ including but not limited to primes, that has a primitive expression $n = 3 x^2 + 2xy+4y^2,$ also has a primitive expression $$ n^3 = x^2 + 11 y^2. $$
The first few primes represented by $3x^2 + 2xy + 4 y^2$ are
$$    3,      5,     23,     31,     37,     59,     67,     71,     89,     97, $$
other numbers primitively represented include $4$ and $9.$

We find
$$ 27 = 16 + 11, $$
$$ 125 = 81 + 11 \cdot 4, $$
$$ 12167 = 54^2 + 11 \cdot 29^2, $$
$$ 64 = 16 + 11 \cdot 4, $$
$$ 729 = 25 + 11 \cdot 64, $$

Tuesday afternoon. Finding individual parametrizations can be left to Dirichlet's version of Gauss composition for binary quadratic forms. If I have a binary form $A x^2 + B xy + A^{k-1}y^2,$ it has order $k$ in its class group.  For example, using $3 x^2 + 8 y^2 + 9 y^2,$ we construct
$$  r = x^3 - 9 x y^2 - 8 y^3, $$
$$  s = 27 x^2 y + 72 x y^2 + 37 y^3, $$ the result (not the most appealing way to write it, I admit)
$$  27 r^2 + 8 rs + s^2 = (3x^2 + 8xy+9 y^2)^3. $$
One may adjust the left hand side by $s = t - 4 r,$ or $t = s+4r,$ to get $t^2 + 11 r^2.$ Not pretty, but deriving it is algorithmic and deterministic.

For $t^2 + 47 r^2 = k^5,$ we may proceed with $3 x^2 + 28 xy + 81 y^2$ of order $5$ in its class group.

Went through it,
$$ (14x^5 + 405yx^4 + 3780y^2x^3 + 13410y^3x^2 + 11550y^4x - 14647y^5)^2 + 47  ( x^5 - 270y^2x^3 - 2520y^3x^2 - 8115y^4x - 8344y^5)^2 = (3   x^2 + 28  x  y + 81  y^2 )^5 $$

Below as it actually is done in gp-pari:

a=3; a1=3; b=28; c=27; z = x; w = y;

zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;

? a=3; a1=3; b=28; c=27; z = x; w = y;
? zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;
? z
%3 = x^2 - 27*y^2
? w
%4 = 6*y*x + 28*y^2

a1 = 9; c = 9; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;

? a1 = 9; c = 9; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;
? z
%6 = x^3 - 81*y^2*x - 252*y^3
? w
%7 = 27*y*x^2 + 252*y^2*x + 541*y^3

a1 = 27; c = 3; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;
? a1 = 27; c = 3; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;
?
? z
%9 = x^4 - 162*y^2*x^2 - 1008*y^3*x - 1623*y^4
? w
%10 = 108*y*x^3 + 1512*y^2*x^2 + 6492*y^3*x + 8344*y^4

a1 = 81; c = 1; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;

? a1 = 81; c = 1; zz = x * z - c * y * w  ;  ww = a * x * w + a1 * y * z + b * y * w; z = zz; w = ww;
?
? z
%12 = x^5 - 270*y^2*x^3 - 2520*y^3*x^2 - 8115*y^4*x - 8344*y^5
? w
%13 = 405*y*x^4 + 7560*y^2*x^3 + 48690*y^3*x^2 + 125160*y^4*x + 102169*y^5
?
? 243 * z^2 + 28 * z * w + w^2
%14 = 243*x^10 + 11340*y*x^9 + 244485*y^2*x^8 + 3200400*y^3*x^7 + 28137390*y^4*x^6 + 173498248*y^5*x^5 + 759709530*y^6*x^4 + 2333091600*y^7*x^3 + 4812198255*y^8*x^2 + 6026540940*y^9*x + 3486784401*y^10
? 243 * z^2 + 28 * z * w + w^2 - (3 * x^2 + 28 * x * y + 81 * y^2)^5
%15 = 0
?

t = w + 14 * z

? t = w + 14 * z
%16 = 14*x^5 + 405*y*x^4 + 3780*y^2*x^3 + 13410*y^3*x^2 + 11550*y^4*x - 14647*y^5
? z
%17 = x^5 - 270*y^2*x^3 - 2520*y^3*x^2 - 8115*y^4*x - 8344*y^5
?

t^2 + 47 * z^2
?
? t^2 + 47 * z^2
%18 = 243*x^10 + 11340*y*x^9 + 244485*y^2*x^8 + 3200400*y^3*x^7 + 28137390*y^4*x^6 + 173498248*y^5*x^5 + 759709530*y^6*x^4 + 2333091600*y^7*x^3 + 4812198255*y^8*x^2 + 6026540940*y^9*x + 3486784401*y^10
?
? t^2 + 47 * z^2 -  (3 * x^2 + 28 * x * y + 81 * y^2)^5
%19 = 0
?

One approach is to write the General formula.  For the equation.

$$x^2+ay^2=z^{k}$$

The formula looks for simplicity without coprime solutions.

$$x=(p^2-as^2)(p^2+as^2)^{k-1}$$

$$y=2ps(p^2+as^2)^{k-1}$$

$$z=(p^2+as^2)^2$$

After substituting numbers  $p,s - $  to reduce common divisor.

$x,y - $ in such a number. $d^k$

$z - $ in such a number. $d^2$


"Simple way" of finding number of integer solutions to $y^3=129-x^2$? A problem appeared in an ICAS math competition paper G (for approximately 15 years olds) in  2010.
The problem was:

37.A student uses trial and error to find all solutions to the question
$$y^3=129-x^2$$
x and y can only be integers. How many solutions are there for this equation?

This was one of the "free response" questions at the end, with no multiple choice.
Using brute force search by listing (y,x) pairs for all y: $0 \le y \le 5$ (5 because greater than 5 will result in making $x$ complex, but greater or equal to 0 because there isn't any other lower bound!) gives me only 4 solutions.
Same result occurs when you list (x,y) pairs for all $|x|$ less than 12, since 12 and greater causes $y^3$ to be negative, although it can be.
My four solution pairs of $(x,y)$ were $(2,5)$, $(-2,5)$, $(11,2)$ and $(-11,2)$.
The answer sheet says there are 6 solutions, so there must be a solution where y is negative. After searching the internet, I found this (math help forum) and this (yahoo answers), giving another pair of solutions: $(65,-16)$ and $(-65,-16)$.
65 is a long way away from 12, and -16 is still quite far from 0, so this solution is very easy to miss out (who would list values of x all the way to 60?)
Question:
So knowing that most of us sitting this ICAS math competition paper g would not know anything about diophantine equations, and "other advanced" mathematics, how would you arrive to this answer of 6? Is there any reasoning that can give the minimum y value?

Another (but easy) problem in the same paper to give you an idea of the difficulty of this competition:

22.Which statement is true? A) $\frac{6}{7}<\frac{7}{9}<\frac{9}{11}$ B) $\frac{6}{7}<\frac{9}{11}<\frac{7}{9}$ C) $\frac{9}{11}<\frac{7}{9}<\frac{6}{7}$ D) $\frac{7}{9}<\frac{9}{11}<\frac{6}{7}$

Thank you!

The usual way to try a Mordell equation using elementary means is by adding or subtracting a constant from both sides to get the sum or difference of squares on one side, the sum or difference of cubes on the other, and compare factorizations. With different letters, here we could try
$$  w^2 - 4 = v^3 + 125  $$ and see how far that takes us. Here you can immediately see $v = -5, w = \pm 2.$

http://en.wikipedia.org/wiki/Mordell_curve

http://tnt.math.se.tmu.ac.jp/simath/MORDELL/

http://tnt.math.se.tmu.ac.jp/simath/MORDELL/MORDELL+

E_+00129: r = 2   t = 1   #III =  1
          E(Q) = <(-2, 11)> x <(-5, 2)>
          R =   3.1316041389
           6 integral points
            1. (-2, 11) = 1 * (-2, 11)
            2. (-2, -11) = -(-2, 11)
            3. (-5, 2) = 1 * (-5, 2)
            4. (-5, -2) = -(-5, 2)
            5. (16, 65) = -1 * (-2, 11) - 1 * (-5, 2)
            6. (16, -65) = -(16, 65)

This is only a note on a fact which simplifies in part the checking.

Notice that looking at the equation modulo $2$ we get:
$$y^3 + x^2\equiv 1\ \mathrm{mod}\ 2$$
Thus exactly one of $x$ and $y$ is in $2\mathbb{Z}$.

If I get other ideas, I will edit my answer.


Properties of the Solutions of $y' = y$ In this section of my notes we take $E(x)$ as a solution of the initial value problem $y'=y , y(0)= 1 $
We show that $E(x+r)$ is also a solution to this problem and show $E(x+r)=E(x)E(r)$.
The notes then go on to prove that $E(x)>0$. It is done as the following:
Suppose $E(s) = 0$ for some
$s  \in \mathbb{R}$. Then, for arbitrary $x$, we have $E(x + s) = E(x)E(s) = 0$, so $E(x) ≡ 0$.
This contradicts $E(0) = 1$.
My question is, surely $E(x)$ doesn't have to be $0$, surely it could be anything because for whatever value of $E(x)$, since we've said $E(s)=0$ then $E(x)E(s)$ will always be $0$ no matter what the value of $E(x)$. Also I'm a little confused why $E(0)=1$. How do we know this?
Thanks in advance!

I think you are correct that the inference doesn't follow as stated.
However the notes can be fixed by adding an extra step at the end:
Since $x$ was arbitrary, we can choose $x=-s$, then we get:
\begin{align}
E(x+s)&=E(-s+s)
\\&=E(-s)E(s)
\\&=E(-s).0
\\&=0
\end{align}
But $-s+s=0$, so $E(-s+s)=E(0)=1$ Contradiction.
Notice how the value of $E(-s)$ is irrelevant.
I hope this helps.

Not an answer but too long for a comment and semi useful
Here's a fun argument. Assume that $f$ is a real differentiable function that satisfies the equation $f'=f$. Assume $g$ is another such function. Then $(\frac{f}{g})'=\frac{f'g-g'f}{g^2}=\frac{fg-gf}{g^2}=0$ and thus there exists a $c\in \mathbb{R}$ such that $f=cg$.
This shows that up to real multiples, there is only one real differentiable function $f$ satisfying $f'=f$. As you know that the function $e^x$ satisfies this equation, you know that all solutions are of the form $ce^x$. Only one of these functions further satisfies $f(0)=1$, namely $1\cdot e^x$.


Proof of $\exists x \exists y (\varphi(x)\rightarrow \psi(y)) \rightarrow \exists x (\varphi(x)\rightarrow \psi(x))$ in natural deduction How to show the following trivial implication with natural deduction?

$\exists x \exists y (\varphi(x)\rightarrow \psi(y)) \rightarrow \exists x  (\varphi(x)\rightarrow \psi(x))$

Thx.

It's a conditional. So the shape of the proof, we know, is going to look like this:

$\quad\quad|\quad \exists x \exists y(\phi(x) \to \psi(y))\\
\quad\quad|\quad \ldots\\
\quad\quad|\quad \exists x(\phi(x) \to \psi(x))\\
\quad \exists x \exists y(\phi(x) \to \psi(y)) \to \exists x(\phi(x) \to \psi(x))
$

where we  use conditional proof.

If in doubt, a good strategy is to try reductio: and assuming the negation of our target in the subproof is nice as it is equivalent to a universal from which we can extract lots of info. Good! So this should work:

$\quad\quad|\quad \exists x \exists y(\phi(x) \to \psi(y))\\
\quad\quad|\quad\quad|\quad \neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad \forall x\neg(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad  \ldots\\
\quad\quad|\quad\quad|\quad  \bot\\
\quad\quad|\quad \neg\neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad \exists x(\phi(x) \to \psi(x))\\
\quad \exists x \exists y(\phi(x) \to \psi(x)) \to \exists x(\phi(x) \to \psi(x))
$

Right! So now we need to use the initial assumption. The only thing we can do with an existential is start off on an existential quantifier elimination proof .... so we know we need to fill in this:

$\quad\quad|\quad \exists x \exists y(\phi(x) \to \psi(y))\\
\quad\quad|\quad\quad|\quad \neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad \forall x\neg(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad\quad|\quad  \exists y(\phi(a) \to \psi(y))\\
\quad\quad|\quad\quad|\quad\quad|\quad   \ldots\\
\quad\quad|\quad\quad|\quad\quad|\quad \bot \\
\quad\quad|\quad\quad|\quad  \bot\\
\quad\quad|\quad \neg\neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad \exists x(\phi(x) \to \psi(x))\\
\quad \exists x \exists y(\phi(x) \to \psi(y)) \to \exists x(\phi(x) \to \psi(x))
$

Do you see that the initial assumption at line 1, and the sup-proof from lines 4 to 6 entitle to the conclusion at line 7 where we discharge the temporary assumption at line 4? This is an application of existential quantifier elimination.

So how do we get from line 4 to line 6. Drat! Another existential. Same trick, then ...

$\quad\quad|\quad \exists x \exists y(\phi(x) \to \psi(y))\\
\quad\quad|\quad\quad|\quad \neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad \forall x\neg(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad\quad|\quad  \exists y(\phi(a) \to \psi(y))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad  (\phi(a) \to \psi(b))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad   \ldots\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad \bot\\
\quad\quad|\quad\quad|\quad\quad|\quad \bot \\
\quad\quad|\quad\quad|\quad  \bot\\
\quad\quad|\quad \neg\neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad \exists x(\phi(x) \to \psi(x))\\
\quad \exists x \exists y(\phi(x) \to \psi(y)) \to \exists x(\phi(x) \to \psi(x))
$

Now, we haven't used the universal quantifier, and we have two names to instantiate it with. Do it!!

$\quad\quad|\quad \exists x \exists y(\phi(x) \to \psi(y))\\
\quad\quad|\quad\quad|\quad \neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad \forall x\neg(\phi(x) \to \psi(x))\\
\quad\quad|\quad\quad|\quad\quad|\quad  \exists y(\phi(a) \to \psi(y))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad  (\phi(a) \to \psi(b))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad  \neg(\phi(a) \to \psi(a))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad  \neg(\phi(b) \to \psi(b))\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad   \ldots\\
\quad\quad|\quad\quad|\quad\quad|\quad\quad | \quad \bot\\
\quad\quad|\quad\quad|\quad\quad|\quad \bot \\
\quad\quad|\quad\quad|\quad  \bot\\
\quad\quad|\quad \neg\neg\exists x(\phi(x) \to \psi(x))\\
\quad\quad|\quad \exists x(\phi(x) \to \psi(x))\\
\quad \exists x \exists y(\phi(x) \to \psi(y)) \to \exists x(\phi(x) \to \psi(x))
$

Ahah! The remaining bit of proof to fill in the dots is just propositional calculus reasoning. Can you do it???

And if you prefer your ND proofs laid out Gentzen style, you'll have to massage this proof idea into a spreading tree.

Using proof by contradiction:

$$\forall x \colon (\varphi (x) \wedge \neg \psi(x)$$

It follows:

$$\forall x \colon \varphi(x)$$

$$\forall x: \neg \psi(x)$$

Renaming variables:

$$\forall y \colon \neg \psi (y)$$

Using modus tollens:

$$\exists x \colon \neg \varphi(x)$$

This is a contradiction. We're done.


How do you find variance? Let $\{X_n\}$ be a sequence of independent identically distributed random variables with mean $\mu$ and finite variance.

$$T_n= \binom{n}{2}^{-1} \sum_{1\leq i< j\leq n} {X_{i}X_{j}} $$

  I have to calculate $Var(T_{n})$.


Show that $lim_{n \rightarrow \infty}m(O_n)=m(E)$ when $E$ is compact. Below is an attempt at a proof of the following problem. Any feedback would be greatly appreciated. Thx!

Let $E$ be a set and $O_n = \{x: d(x, E) < \frac{1}{n}\}$.
Show

If $E$ is compact then $m(E) = lim_{n \rightarrow \infty} m(O_n)$.

This is false for $E$ closed and unbounded or $E$ open and bounded.

Note that all sets are real and measurable refers to Lebesgue measurable.

Suppose $E$ is compact. Then $m(E) < \infty$. Also, since each $O_n$ is an open set of $\mathbb{R}^d$, $m(O_n) < \infty$. If either of the following is true, we have that $lim_{n \rightarrow \infty}m(O_n)=m(E)$:
$O_n \nearrow E$
$O_n \searrow E$
Now  $\bigcap_{n=1}^{\infty} O_n = \{ x:d(x,E) = 0\}$.
That is, $x \in \bigcap_{n=1}^{\infty}O_n \iff \exists n> \frac{1}{\epsilon},\ n \in \mathbb{N} \iff x\in \{x \mid d(x,E) =0\}$.
Then we have that $\bigcap_{n=1}^{\infty}O_n = E$ and $O_n \searrow E$. Thus $ \ m(E) = lim_{n \rightarrow \infty} m(O_n)$.
Suppose $E$ is closed and unbounded. Let $E = \{(x,y): y = 2 \}$ and $O_n = \{(x,y): d(x,E) < \frac{1}{n}\}$.
Since $E$ is a line in $\mathbb{R}^2$, $m(E) = 0$.
Also, since the measure of a rectangle in $\mathbb{R}^d$ is its volume, $m(O_n) = \left| O_n \right| = \infty$, since the rectangle $O_n$ is unbounded.
It is therefore apparent that $m(E) \not = lim_{n \rightarrow \infty} m(O_n)$.
Suppose $E$ is open and bounded.
Let $E=(0,1)$ and $O_n = \{x \mid d(x,E) < \frac{1}{n}\}$.
$\mathbb{R}-E$ is closed and $O_n \in \mathbb{R}-E$.
Since $\mathbb{R}-E$ contains all its limit points $lim_{n \rightarrow \infty}O_n = O \in \mathbb{R}-E$.
Thus $lim_{n \rightarrow \infty} m(O_n) \neq m(E)$.

Your example for $E$ open and bounded is not correct. I really can't tell what you are doing, but it should be clear that $m((0,1)) = \lim_{n\to \infty}m(O_n)$ in this case.

Hint for an example: Let $E$ be an open dense subset of $(0,1)$ such that $m(E)<1/2.$,

This is a consequence of the fact that Lebesgue measure is a regular measure.

This means that, if $E$ is measurable, then
$$
\mu(E)=\inf\{\mu(U): E\subset U\,\,\&\,\,U\,\,\,\text{open}\}.
$$
So, if $\varepsilon>0$, then there exists a $U$ open, $E\subset U$ and $\mu(U)-\mu(E)<\varepsilon)$. If
$$
d=\mathrm{dist}\,(E,U^c),
$$
and $1/n<d$, then $E\subset O_n\subset U$.


Why write $\exp(x)$, instead of $e^x$? Why write $\exp(x)$, instead of $e^x$?

I would have thought that if $x$ is a long expression, $\exp(x)$ would be preferred, so that it is clear? But I have seen that this is not the case.

I use $\exp$ pretty often but I'm also often converting my stuff into programming, where $\exp(blah)$ is literally how I'd write exponentials.  It also helps when considering derivatives; converting generic exponentials $a^b$ into $\exp(b\ln a)$ makes it much more obvious what you're doing.

But on the other hand:  one of the major advantages of mathematical typesetting is that things in different contexts can have different sizes and baselines.  So in relatively complex expressions it can actually be harder to read $\exp((b+l)a)h$ as opposed to $e^{(b+l)a}h$, because you can tell when the exponent ends very easily but the parentheses can get lost in among the other parentheses.

On the other other hand, when it gets very complicated in the exponent and a lot of it isn't parentheses-based, the superscript form can get bad too.  Check out this monster excerpted from the Feynman-Kac formula:

$$e^{-\int_t^TV\left(X_\tau,\tau\right)d\tau}$$
$$\exp\left(-\int_t^TV\left(X_\tau,\tau\right)d\tau\right)$$

In this case I'd probably prefer the $\exp$ form, not least because my first reading misinterpreted the subscript on $X$ as $r$!  Thanks to @anomaly in the question comments for this particular example.

The two notations are equivalent :

the $exp(x)$ notation represents the exponential as a function,
the $e^x$ notation shows the exponential as powers of Napier's constant.

There is no preference; the first one is better if you want to put a big expression as argument. Still if you use LaTeX you do not really care ...


Finding the number of solutions of the equation $c_1 + c_2 + c_3 = 20$ in the nonnegative integers if $c_2$ is even and $c_3$ is odd Find the number of nonnegative integer solutions to the equation $c_1 + c_2 + c_3 = 20$, where $c_2$ is even and $c_3$ is odd.
I started with finding the total number of solutions, $C(22,20)=231$. Then I tried to apply the inclusion-exclusion principle. Let $P_1$ be the number of solutions that do not satisfy the condition for $c_1$, $P_2$ for $c_2$ and so on.
$N-P_1-P_2-P_3+P_1P_2+P_2P_3+P_1P_3-P_1P_2P_3$ gives us the desired number of solutions. $P_1, P_1P_2, P_1P_3$ and $P_1P_2P_3$ are all zero because there is no condition for $P_1$. To find $P_2$, I assigned odd numbers to the $c_2$ and then calculated the number of solutions which is $110$. $P_3$ is also $110$. If I'm right up to this point, I'm stuck at finding $P_2P_3$.
To find the number of solutions that do not satisfy $c_2$ and $c_3$, I assigned $c_2$ odd numbers and $c_3$ even numbers. Adding an even and an odd number gives us an odd number. From what I previously calculated, I think there is a total of $110$ solutions again.
Thus, $231-110-110+110=121$. Is this true?

For reasons I will explain below, it is easier to solve this problem directly than to use the Inclusion-Exclusion Principle.
A direct approach:
Since $20$ is an even number, $c_2$ is odd, and $c_3$ is even, $c_1 = 20 - c_2 - c_3$ is also an odd integer.  Thus, there exist nonnegative integers $x_1, x_2, x_3$ such that $c_1 = 2x_1 + 1$, $c_2 = 2x_2$, and $c_3 = 2x_3 + 1$.
\begin{align*}
c_1 + c_2 + c_3 & = 20 \tag{1}\\
2x_1 + 1 + 2x_2 + 2x_3 + 1 & = 20\\
2x_1 + 2x_2 + 2x_3 & = 18\\
x_1 + x_2 + x_3 & = 9 \tag{2}
\end{align*}
Equation 2 is an equation in the nonnegative integers which has the same number of solutions as equation 1 subject to the stated constraints.  A particular solution of equation 2 corresponds to the placement of two addition signs in a row of nine ones.  For instance,
$$++ 1 1 1 1 1 1 1 1 1$$
corresponds to the solution $x_1 = x_2 = 0$, $x_3 = 9$ (and $c_1 = 1, c_2 = 0, c_3 = 19$), while
$$1 1 1 1 + 1 1 1 + 1 1$$
corresponds to the solution $x_1 = 4$, $x_2 = 3$, $x_3 = 2$ (and $c_1 = 9, c_2 = 6, c_3 = 5$).  The number of solutions to Equation 2 is
$$\binom{9 + 3 - 1}{3 - 1} = \binom{11}{2}$$
since we must select which two of the eleven positions required for nine ones and two addition signs will be filled by addition signs.
Remarks about your approach:
If you define $P_i$ to be the number of solutions that violate the constraint on $c_i$, then $P_iP_j$ is the product of $P_i$ and $P_j$.  Presumably, you meant $P_iP_j$ is the intersection of the sets of solutions that violate the constraint on $c_i$ and the constraint on $c_j$.
If you wish to the Inclusion-Exclusion Principle, you should define $A_i$ to be the set of solutions that violate the constraint on $c_i$, in which case the number of admissible solutions is
$$N - |A_1 \cup A_2 \cup A_3|$$
where
\begin{align*}
|A_1 \cup A_2 \cup A_3| & = |A_1| + |A_2| + |A_3|\\
                        & \quad - |A_1 \cap A_2| - |A_1 \cap A_3| - |A_2 \cap A_3|\\
                        & \qquad + |A_1 \cap A_2 \cap A_3|
\end{align*}
As stated above, the constraint that $c_2$ is even and $c_3$ is odd imposes the additional constraint that $c_1$ is odd.
Let's examine $|A_1|$.  If the condition that $c_1$ is odd is violated, then we need to find the number of solutions of the equation
$$c_1 + c_2 + c_3 = 20$$
subject to the constraint that $c_1$ is even.  If $c_1$ is even, then either $c_2$ and $c_3$ are both even or they are both odd.  If $c_2$ and $c_3$ are both odd, we need to find the number of solutions of the equation $c_1 + c_2 + c_3 = 20$ in which exactly two of the variables are odd, that is, we need to solve the original problem in order to use the Inclusion-Exclusion Principle. Therefore, it makes more sense to solve the problem directly.

Alternative approach:
Any solution to $c_1 + c_2 + c_3 = 20$ where $c_2, c_3$ are of opposite parity (i.e. one odd, the other even) will occur if and only if $c_1$ is odd.  Further, for each of these solutions, you know by symmetry, that exactly $(1/2)$ of them will represent $c_2$ even and $c_3$ odd.
So, you may assume that $c_1 \in \{1,3,5,\cdots, 19\}.$
Further, for each such value of $c_1$, the problem will be represented by :
$c_2 + c_3 = (20 - c_1)$, which will have
$\displaystyle \binom{[20 - c_1] + [2-1]}{[2-1]} = (21 - c_1)$ solutions.
Therefore, the desired tally is
$$\left(\frac{1}{2}\right) \times \sum_{k = 1}^{10} (21 - [2k-1]) ~=~ \left(\frac{1}{2}\right) \times \sum_{k = 1}^{10} (22 - [2k]).$$
The right hand factor above is $220 - 2(55) = 110$.
Therefore, the final computation is $(110/2) = 55.$


Prove or Disprove: If $a_n$ was positive and its limit is positive then the limit of the $\sqrt[n]{a_n}$ is $1$ If $a_n$ was positive and its limit is positive then the limit of the $\sqrt[n]{a_n}$ is $1$. I think it has to do with multiplication to start here,but I couldnt figure it out.

If $a_n \to a >0$, then $\log a_n \to \log a$ by continuity of log (and $\log a$ is finite). Also, $\frac{1}{n} \to 0$, so $\frac{1}{n} \log a_n \to (0) \log a = 0$. By continuity of exponentiation, we have $(a_n)^{1/n} = e^{\frac{1}{n} \log a_n } \to e^0 = 1$, as desired.

Here is an approach. Assuming $\lim_{n\to \infty}a_n = L>0 $ and recalling the fact

  $$ \lim_{n\to \infty} (a_n)^{1/n} = \lim_{n\to \infty} \frac{a_{n+1}}{a_n} = \frac{L}{L} = 1.$$


Geometric interpretation of hyperbolic functions When proving identities like
$$\cosh(2x)=\cosh^2(x)+\sinh^2(x)$$
$$\cosh^2(x)=\sinh^2(x)+1$$
algebraically, I am beset by the feeling that there should be a geometrical interpretation that makes them immediately obvious. Most of the analogous identities involving $\sin,$ $\cos$ have such interpretations.

Is it possible to use hyperbolic geometry to prove identities in hyperbolic trigonometry geometrically? Any examples would be greatly appreciated (if this is in fact possible).

Addendum: If there is no analogy in hyperbolic trigonometry, could the complex plane and the relationship between hyperbolic and non-hyperbolic functions be used instead (i.e. $\cos(x)= \cosh(ix), \sin(x)=-i\sinh(ix))$?

The second identity is equivalent to saying that for all $x\in\mathbb{R}$ there is a triangle with hypotenuse $\cosh(x)$ and sides $\sinh(x),1$. Is there a geometric interpretation of $x$?

The answer to your question is yes - by now you've probably already seen this and moved on, but I post this anyway for the benefit of other readers.  The hyperbolic functions, such as
$\sinh$ and $\cosh$,
are one of those topics that is almost always skipped right over in undergraduate math, then if it happens to pop up after that everyone acts like you must have seen it a million times.  As a result there seem to be a lot of questions like this on the web, often with overly complicated answers.  Anyway, here's my attempt at aiding that situation.

The hyperbolic functions are so called because they arise from the hyperbola
$x^2-y^2=1$, analogously to how the ordinary trigonometric functions relate to the circle
$x^2+y^2=1$
(but not quite in the way you might think).
Recall how if
$\theta$ is an angle off the positive $x$-axis in $\mathbb{R}^2$, going counterclockwise, then the point on the unit circle intercepted by $\theta$ will be $(\cos\theta, \sin\theta)$.  We want to do something similar, replacing the circle with the hyperbola as mentioned, but for the analogy to work we need to describe the unit circle scenario a little differently.

First of all, get a good picture in your head (or draw one, or look one up) of the hyperbola
$x^2-y^2=1$.
It has two components: one on either side of the $y$-axis, and if we consider the places where an angle $\theta$ as above would intercept a point on it, we would be limited to
$\theta\in(-\frac{\pi}{4},\frac{\pi}{4})\cup(\frac{3\pi}{4},\frac{5\pi}{4})$
plus multiples of
$2\pi$.
But as you can see from the exponential definition of these functions, $\cosh$ and $\sinh$ have domain $\mathbb{R}$.

So, instead of thinking about the angle $\theta$, think about the area $\alpha$ bounded by its initial ray (the $x$-axis), its terminal ray, and the circle.  Putting $\theta$ in radians, this area is $\alpha=\theta/2$ (for instance, the area of the whole circle is $\pi$, which is traversed by the full rotation $2\pi$).  Looking now at the point intercepted by $\theta$ on the circle in terms of $\alpha$, we have $(\cos 2\alpha,\sin 2\alpha)$.

This is the correct setup for moving to the hyperbolic setting.  Suppose $\alpha$ is now the area bounded by the $x$-axis, some other ray $\rho$ coming out of the origin, and the hyperbola $x^2-y^2=1$.  Now identify the point on the hyperbola intercepted by $\rho$.  The coordinates of this point will be $(\cosh 2\alpha, \sinh 2\alpha)$.  Note that the $\alpha$ values you can get in this way are arbitrarily large, even though to bound an area $\rho$ can't pass (or hit) $\frac{\pi}{4}$ off the $x$-axis - using some calculus (and probably an integral table - the integral is ugly) you can see that the area between the diagonal line and the hyperbola, in the first quadrant, is infinite.  If you want negative $\alpha$, just move your ray down and call the area negative.

This gives your second identity easily.  The first one takes a little more work.

Of course, they admit just the same interpretation in 1+1-dimensional pseudo-Euclidean space (with “dx2 − dv2” vector magnitude form) as trigonometric functions have in 2-dimensional Euclidean space. That pseudo-Euclidean space is also known as (the plane of) split-complex numbers and has its “trigonometric circle” with equation “x2 − v2 = 1” and hyperbolic angles. One minor difference: the “x > 0” inequality should be added to aforementioned equation to restrict trigonometric eh… hyperbola only to polar angles from −∞ to +∞.

Explanation with analytic functions on (standard) complex numbers is not mutually exclusive with metric signature argument presented above. If you consider ℂ2 = {(z, w)} where z = x + iy, w = u + iv, x, y, u, v ∈ ℝ, with quadratic form dz2 + dw2, then restriction to
a totally real subspace of {(x, u)} with y = v = 0 gives Euclidean geometry with standard trigonometry, whereas restriction to the one of {(x, v)} with y = u = 0 gives aforementioned pseudo-Euclidean geometry with hyperbolic trigonometry. In other words, complexification of both 2-dimensional real spaces gives the same thing. Now you can write a parametric presentation of a line:
$$
z = \frac{e^α + e^{-α}}2 t\\
w = i\frac{e^α - e^{-α}}2 t
$$
and say that real α are hyperbolic angles (with corresponding lines lying in the pseudo-Euclidean plane for real t) and imaginary α are standard (circular) angles (likewise, in Euclidean plane). Note an identity
$$(\frac{e^α + e^{-α}}2)^2 + (i\frac{e^α - e^{-α}}2)^2 = 1,$$
so t is (generally, complex) natural parameter: t2 = z2 + w2.


Is there a clean non-contrived theorem that can only be proven by contradiction? I know (see Can every proof by contradiction also be shown without contradiction? that there are some theorems that can be proven by contradiction (relying on the law of the excluded middle, that for any proposition $A$, the axiom "either $A$ or not $A$ must hold" is available, but cannot be proven without that axiom schema.

I'm looking for the simplest, cleanest theorem that can't be proven without resorting to proof by contradiction (but has been proven by contradiction).

I'm looking for some theorem that might occur to somebody whose purpose in life was not just to demonstrate that proof by contradiction is sometimes necessary.

I'd be particularly impressed if somebody explains why they know that this theorem can't be proven with just "intuitionist" logic (which does not use the laaw of the excluded middle).

There are two implicit issues with this question.  Because this is the second time in the last few days that a question of this kind has been asked, I want to explain the issues in detail, which can't be done in a comment.

Issue 1: Breaking up is hard to do

In most of the standard classical foundational systems, it isn't simple to break up with the law of the excluded middle.

For example, if you take ZFC with a typical deductive system, and then just remove the law of the excluded middle from the deductive system, the rest of the system will still prove the law of the excluded middle, and so in this sense you never need to directly use the law of the excluded middle in a proof, because you can just prove the cases you need directly from the other axioms and deductive rules.

One formal reflection of this phenomenon is called Diaconescu's theorem (also called the Goodman–Myhill theorem). The fundamental issue is that systems like ZFC are so steeped in classical logic that is it very hard to cut out the classical logic while leaving the rest of the axioms unchanged.

So, you really need to start with a system that is built from the ground up to be "constructive", rather than starting with a classical system and cutting out the law of the excluded middle. These "constructive" systems are also somewhat often called "intuitionistic", by the way.

For example, you could ask "What theorem is provable in ZFC set theory but not IZF set theory?" or "What theorem is provable in Peano arithmetic but not Heyting arithmetic?". Each of those is a much more meaningful question which can have specific and precise answers.

Issue 2: Proof by Contradiction is not the same as Proof by Excluded Middle

Many systems that do not include the law of the excluded middle do include the rule of proof by contradiction. That rule says that if we can prove $A \land \lnot A$ for some sentence $A$, then we can conclude any other sentence $B$ that we like. This rule is included, for example, in Heyting arithmetic, which is a well established foundational system for constructive mathematics, and which does not include the law of the excluded middle.

To get a sense of how the law of the excluded middle works, it may be better to think of the law of the excluded middle as allowing for proof by cases. In this form, the law of the excluded middle says that if you can prove $A \to B$ and also prove $\lnot A \to B$ then you can conclude $B$, even without knowing whether $A$ or $\lnot A$ is provable on its own. (This is equivalent over a very weak constructive logic to the usual statement that $C \lor \lnot C$ is provable for every sentence $C$.) This way of looking at excluded middle helps show how it differs from proof by contradiction.

Here is another way to see a difference. In classical mathematics, if we assume $C$, derive a contradiction, and then conclude $\lnot C$, we call that a "proof by contradiction". Similarly, if we assume $\lnot C$, derive a contradiction, and then conclude $C$, we also call that "proof by contradiction". However, only the second of those conclusions requires the law of the excluded middle relative to constructive reasoning. The first example in this paragraph is actually a direct constructive proof of $\lnot C$, because in constructive systems $\lnot C$ is shorthand for "$C$ implies a contradiction".  So not everything that we call a "proof by contradiction" in classical mathematics actually uses the proof rule of "proof by contradiction". Some usual ways that we think about classical logic, though, can hide this issue. There is a nice blog post by Andrej Bauer on this topic.

Theorem:
$\sqrt{2}$ is irrational.

Proof:
Assume that
$\sqrt{2}$
is rational.
Then ....


Average Distances From The Origin Consider all points $(m,n)$ where $m$ and $n$ are natural numbers,
  $m\leq10$, and $n\leq5$. What is the average distances from each point
  to the origin $(0,0)$?

I know how to find the distance $d$ between the points $(x_1,y_1)$ and $(x_2,y_2)$;
$d=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$.

In this case, the first point is $(m,n)$ and the second point is the origin, therefore the distance, $d=\sqrt{m^2+n^2}$.

It is annoying to find all distances, summing them, and dividing them by the number of distances, is not it annoying?

What if the given conditions, $m\leq10$ and $n\leq5$, were changed to $m\leq49$ and $n\leq36$?!

There is a quick solution for a related problem, even though it's not quite what you are asking. If you are willing to compute squares of distances of all points, then you get
$$
\begin{split}
f(m,n)
 &= \sum_{i=1}^m \sum_{k=1}^n \left(i^2 + k^2\right) \\
 &= \sum_{i=1}^m \sum_{k=1}^n i^2 + \sum_{i=1}^m \sum_{k=1}^n k^2 \\
 &= n \sum_{i=1}^m i^2 + m \sum_{k=1}^n k^2 \\
 &= n \frac{m(m+1)(2m+1)}{6} + m \frac{n(n+1)(2n+1)}{6} \\
 &= \frac{mn}{6} \left[(m+1)(2m+1) + (n+1)(2n+1)\right]
\end{split}
$$

As expected, $f(m,n)$ is symmetric in $m,n$, in other words, $f(m,n) = f(n,m)$...


The midpoints of an isosceles tetrahedron I recently came across this geometric property:

If the tetrahedron $ABCD$ is isosceles (all faces are congruent), and $F,E$ are the midpoints of $AD,BC$ respectively, then $FE\perp BC$ (the same can be said for all opposite edges).

Can someone help explain why this is the case?

Because $BF$ and $CF$ they are similar medians of congruent triangles, which gives $$BF=CF$$ and
$$FE\perp BC.$$

The line FE is contained in the plane of symmetry DAE and therefore FE is orthogonal to BC.


The connection between the supremums of a function sequence, and the supremum of the limit fumction Suppose we have a function series $\mathbb f_n(x)$ that converge uniformly to $\mathbb f(x)$ for every $x \in [a,b]$ , and suppose that for each $n \in \mathbb N$ and for every $x \in [a,b]$  : $\lvert \mathbb f_n(x)\rvert \le M_n$, i.e $\mathbb f_n(x)$ is bounded for each $n \in \mathbb N$.

I can also prove that $f(x)$ is bounded by some $M_0 \in \Bbb R$.

I am wondering however - does all of the above is enough to prove that the sequence $M_n$ converge to $M_0$?

If the statement is just not true, can someone give me a counter example?

Suppose, by contradiction,that $(M_n)_n$ does not converge to $M_0$. Then for some $r>0$ the set $$S=\{n:|M_0-M_n|>r\}$$ is infinite.  And $\{n:\sup_x|f(x)-f_n(x)|\geq r/2\}$ is finite .So there exists $n\in S$ with $\sup_x |f_n(x)-f(x)|<r/2$.  For such $n$ we have $$(1)\quad M_0\leq M_n+r/2.$$ But there exists $x_n$ with $|f_n(x_n)|>M_n-r/2$. This gives $$M_0\geq |f(x_n)\geq|f_n(x_n)|-|f_n(x_n)-f(x_n)|>   |f(x_n)|-r/2>(M_n-r/2)-r/2=M_n-r$$  from which we have$$(2)\quad M_0\geq M_n -r.$$ From $(1)$ and $(2)$ we have $ M_n+r/2\geq M_0\geq M_n-r,$ so $|M_0-M_n|\leq r,$ a contradiction, because $n\in S.$

Hint : you may prove that in general if $f$ and $g$ are bounded functions then $$| \,||f||_\infty - ||g||_\infty | \leqslant ||f - g||_\infty$$
where as usual $||f||_\infty = \sup |f(x)|$. You can take your inspiration in the proof of the basic inequality $|\, |x|-|y|\,| \leqslant |x-y|$.

Then apply to $g=f_n$.


Reason for reversing the order when transpose and inverse of a group of matrices Whenever there is a transpose or inverse of a  group of matrices, I just reverse their order. For eg: $(ABC)^{-1} = C^{-1}B^{-1}A^{-1}$ and $(ABC)^{T} = C^{T}B^{T}A^{T}$

But usually, I am taking this reverse "rule" for granted without really knowing why I have to reverse their order whenever there is an inverse or transpose.

What is the reason for reversing their order?

For the inverse, you can just apply the definition and compute:

$(ab)(b^{-1}a^{-1})=a(bb^{-1})a^{-1}=aa^{-1}=id$

and similarly $(b^{-1}a^{-1})(ab)=id$. Hence $b^{-1}a^{-1}$ is an (and by uniqueness of inverses, the) inverse of $ab$.

A popular way to 'explain' this, is by saying "the inverse of 'putting on socks and then shoes', is 'taking off shoes and then socks'".

For the transpose, you can also apply the definition: if $A$ has matrix elements $(a_{ij})_{ij}$, then $A^T$ has matrix elements $(a_{ji})_{ij}$. Then compute the matrix elements of $(AB)^T$ and of $B^TA^T$ and see that they are equal.

A more conceptual way however is the following: taking the dual is a contravariant functor. That is, a linear map $A:V\to W$ has dual map $A^*:W^*\to V^*$ between the dual spaces (in the other direction!), and this is compatible with composition: $(A\circ B)^*=B^*\circ A^*$. The definition is $A^*=-\circ A$, so just precompose the linear functional with $A$; the composition property is then immediate. Now if $A$ has matrix $a_{ij}$ with repsect to some bases of $V,W$, then the matrix of $A^*$ w.r.t. the corresponding dual bases of $V^*,W^*$ is $a_{ji}$ (this is an easy check by writing out the definitions).

(AB)^-1=B^-1 A^-1
multiply AB on both sides and dividing by AB the value will not change so..
AB (AB)^-1= B^-1 A^-1 (AB)
(AB)^-1= B^-1 A^-1 (AB)/AB
(AB)^-1= B^-1 A^-1


Inequality in Algebra: $1 \leq x_1 x_2 \cdots x_n$ implies that $2^{n} \leq (1 + x_1)(1+x_2) \cdots (1 + x_n).$ How do I prove that if $x_1, \ldots, x_n$ are positive real numbers, then
$$1 \leq x_1 x_2 \cdots x_n \text{ implies that } 2^{n} \leq (1 + x_1)(1+x_2) \cdots (1 + x_n).$$

I attempted a proof by induction but am not able to nail the inductive step. Any help would be appreciated!

We are given that $x_1, x_2, \cdots, x_n$ are positive real numbers and $x_1x_2\cdots x_n\geq 1\forall n\in \mathbb N$.

We have to show $(1+x_1)(1+x_2)\cdots (1+x_n)\geq 2^n$.

For $n=1$ the result is trivial as $x_1\geq 1\Rightarrow (1+x_1)\geq 1+1=2^1.$

Let the result be true for $n=m$ viz $x_1x_2\cdots x_m\geq 1$ implies
$$(1+x_1)(1+x_2)\cdots (1+x_m)\geq 2^m$$
Multiplying both sides by the inequality $1+x_{m+1}\geq 2$ we see that
$$(1+x_1)\cdots(1+x_m)(1+x_{m+1})\geq 2^{m+1}$$ which shows that the inequality is true for $n=m+1$ whenever it is true for $n=m$.

Induction now completes.


How can i prove that this integral is convergent/divergent This is my equation:

$$\int_0^{\pi/4} \frac{dx}{x\sin2x}$$

I wish to prove that it's convergent or divergent, by $P$ test and/or comparison test, but it does not seem to be applicable...

Is it correct, that $1/x$ is smaller or equal to $\frac {1}{x\sin2x}$?

That would mean, $\frac 1x$ is divergent by $p$ test... since it's divergent by $p$ test, and $\frac {1}{x\sin2x}$ is bigger, $\frac {1}{x\sin2x}$ is divergent as well.

Is this correct?

Over the interval $I=\left(0,\frac{\pi}{2}\right)$, $0<\sin x<x$, hence for any $\varepsilon\in I$:
$$\int_{\varepsilon}^{\pi/4}\frac{dx}{x\sin(2x)}\geq\int_{\varepsilon}^{\pi/4}\frac{dx}{2x^2}=\frac{1}{2\varepsilon}-\frac{2}{\pi}$$
and your integral is clearly divergent.

You can bring it to $\int \frac{dx}{x\sin x}$ integral with some replacements which doesn't converge.


WolframAlpha wrong evaluate: $\lim\limits_{x \rightarrow a}\frac{x^m - a ^m}{ x^n-a^n}$ Let $a \in \mathbb{R}$ and $m,n\in \mathbb{N}$. If i let evaluate WolframAlpha this:  $\lim\limits_{x \rightarrow a}\frac{x^m - a ^m}{ x^n-a^n}$ i get $\frac{ma^{m-n}}{n}$. In my opinion this is not true for $a = 0 $ and $n >m$.

wolfram alpha is right:$$\lim\limits_{x \rightarrow a}\frac{x^m - a ^m}{ x^n-a^n}=\lim\limits_{x \rightarrow a}\frac{mx^{m-1}}{nx^{n-1}}=\lim\limits_{x \rightarrow a}\frac{mx^{m-1-(n-1)}}{n}=\lim\limits_{x \rightarrow a}\frac{mx^{m-n}}{n}=\frac{ma^{m-n}}{n}$$
in the case where $n>m$ we get $\LARGE\frac{ma^{c}}{n}=\frac{m}{na^{-c}}$ where $c$ is a negative number. if you take this limit you get $\infty$ if $2\mid n-m$ and $\pm\infty$ elsewhere

If you include $\infty$ as a possible limit the Wolfram answer is Ok.
The factor $m/n$ has no influence on the answer in the case $a=0$ as it is either $0,1$ or $\infty$.

(I presume you are looking at the limit:
$\lim_{x\rightarrow a} \frac{x^m-a^m}{x^n-a^n}$)


Are rational points dense on every circle in the coordinate plane? Are rational points dense on every circle in the coordinate plane?

First thing first I know that rational points are dense on the unit circle.
However, I am not so sure how to show that rational points are not dense on every circle.

How would one come about answering this.
Any hits are appreciate it.

They're not. No two different circles centered at the origin contain any of the same points. There are uncountably many circles (specifically, one for each real number, corresponding to the radius) , so most circles contain no rational points at all.

We can find some more specific examples. Specifically, any rational point $(a, b)$ on a circle of radius $r$ centered at the origin satisfies $a^2+b^2=r^2$. In particular, $r^2$ must be rational. There are also radii whose squares are rational where there are no rational points. Clearing denominators, say multiplying by some $c^2$ to do so, we have that $c^2r^2$ is a sum of two squares. If $r^2$ is an integer, then $r^2$ must be a sum of two squares, since an integer is a sum of two squares if and only if its prime factorization doesn't contain an odd power of a prime congruent to $3$ mod $4$. $r^2$ was arbitrary, so if we choose it not to be a sum of two squares we get circles with no rational points.

First of all, I want to thank @Hidaw for having answered such an interesting question, which was swirling around in my head some days ago. After reading all the answers to this post with great pleasure, I discovered that Humke and Krajewski completely solved the problem in a very simple and beautiful article on the American Mathematical Monthly in 1979 (a few years before I was born!) called A Characterization of Circles Which Contain Rational Points.
In particular they establish the very relevant result that if the radius $r$ is irrational, but $r^2=p/q$, with $p, q \in \mathbb{Q}$, then the circle $C$ of equation $x^2+y^2=r^2$ contains no rational point if $pq$ is not the sum of two square integers, while $\mathbb{Q}$ is dense on $C$ if $pq$ is the sum of two square integers.


l'Hospital's rule vs limit definition of the derivative If I have $\lim_{h \to 0} \frac{\ln\left(e+h\right)-1}{h}$, should I recognize this at the limit definition of the derivative where it's $f'\left(e\right)$ where $f\left(x\right)=\ln\left(x\right)$ and get $\frac{1}{e}$, or should I use l'Hopital's rule's repeatedly until I get $\frac{1}{e}$
The reason I ask is because I don't want to be engage in circular logic as how many questions involving $\lim_{x \to 0} \frac{\sin\left(x\right)}{x}$ seem to be concerned about.

Well, you could use l'Hôpital's rule – one application gets you $\lim_{h\to0}\frac{1/(e+h)}1$ – but recognising the derivative form is faster.

In this case the best way is to use the definition of derivative which is more elementary with respect to l'Hospital's rule which can be useful for limits not directly solveable by other elementary methods as for example
$$\lim_{h \to 0} \frac{\ln\left(1+h\right)-h}{h^2}$$


Prove sequence $S_n$ converges If $S_1 = \sqrt{2}$, and

  $S_{n+1} = \sqrt{2 + \sqrt{S_n}}$ (n = 1,2,3....),

  prove that $\{S_n\}$ converges, and that $S_n < 2$ for all $n \in \Bbb{N}$

  This is one the questions from Principles of Mathematical Analysis by Rudin. I am not sure how to proceed with the solution.

Well if we prove that $S_n<2$ for $n=1,2,3,\ldots$ then the first part comes easily as $S_n$ is a sequence in $\mathbb{R}$ which is complete. Since $S_n$ is a monotone increasing sequence with an upper bound (namely 2), it converges. We can prove $S_n<2$ for $n \ge 1$ via induction as follows:

$\textbf{I:}$ $ S_1 < 2 $, i.e. $\sqrt{2} < 2$, can be checked by direct computation.

$\textbf{II:}$ Suppose $S_{n-1}<2$ but that $S_n \ge 2$. But then we have $\sqrt{2 + \sqrt{S_{n-1}}} \ge 2 \Rightarrow \sqrt{S_{n-1}} \ge 2$, a contradiction. Thus $S_n < 2$.

$\textbf{III:}$ Thus $S_n<2$ for all $n = 1,2,3,\ldots$.


Is it possible to calculate consecutive digits of $\pi^{1/\pi}$ This question is inspired by a challenge on codegolf.stackexchange.com, where the task is to:

  Output consecutive digits of $x = \pi^{1/\pi}$ forever.

That is, calculate digits of $x$, and output one by one forever (in theory). As this should go on forever, you must continuously calculate new digits of $\pi$ and $x$. There are known ways to calculate individual digits of $\pi$, but as far as I can tell, digit $n$ of $\pi^{1/\pi}$ may rely on digit $n+m$ of $\pi$.

At some point, you'll encounter something like $...31999999999999999...$ if you calculate $x$ with a given accuracy for $pi$. However, if you had a higher accuracy, this might result in $...3200000000000...$ instead.

I'm fairly certain that it can be proven/shown that digit $n$ may rely on digit $n+m$ of $\pi$ for some $n$ and $m$ (but I can't). What I'm not sure of is, can an upper bound of $m$ be proven? Is it possible to say, with absolute certainty, that the $n$th digit of $x$ is correct if we have calculated for instance $n+10$ digits of $\pi$?

If you do come across $\ldots3199999999\ldots$, then you just have to keep going until the issue resolves itself as either $x\le\ldots3199999999$ or $x\ge\ldots32$. If $x$ is known to be irrational, then you can be sure that this procedure will eventually terminate.

It can be difficult to predict in advance how much look-ahead you will need. In practice, however, unless $x$ has been specially chosen to be awkward, you will only need to calculate a few more decimal places.

But if $x$ is not known to be irrational, then you have a genuine problem on your hands. I am pretty sure that $\pi^{1/\pi}$ is irrational, but I wouldn't know how to prove it.

The answer is not different for $\pi$ or $\pi^{1/\pi}$ (nothing mandates to compute $\pi^{1/\pi}$ in terms of partial evaluations of $\pi$).

This situation occurs when there are repeated nines or zeroes, but not elsewhere. There are indeed such repetitions, with increasing length as you go farther and farther in the decimals. These are isolated events that in no way impair the computation of exact decimals.

For other digits, error bounds can be computed that allow to validate them absolutely.


Examples of non-cyclic group with a cyclic automorphism group In introduction to algebra we got the exercise:

  Let $G$ be a group. Show that when $\operatorname{Aut}(G)$ is cyclic $G$ is abelian.

This doesn't make that much trouble. Denote the center (all commuting elements) with $Z$.
Then $G/Z$ is isomorphic to $\operatorname{Int}(G)$ where $\operatorname{Int}(G)$ denotes the subgroup of inner automorphisms. As every subgroup of a cyclic group is cyclic we have $G/Z$ is cyclic and hence $G$ is abelian (As a group which is cyclic of the center is abelian).

So the question is:

  Is there a non cyclic group with a cyclic automorphism group?

We discussed the question already in chat and I found (thanks to google) a solution there, but I would enjoy other Examples.

Whenever $G$ is finite and its automorphismus is cyclic we can already conclude that $G$ is cyclic.

Because as we already saw $G$ is abelian and finite, we can use the fundamental theorem of finitely generated abelian groups and say that wlog
$G=\mathbb{Z}/p^k\mathbb{Z} \times \mathbb{Z}/p^j \mathbb{Z}$. But the automorphismgroup isn't abelian and hence isn't cyclic.

  For non finite groups the implication isn't true.

The following is from this link and only slightly reworded.

Let $G$ be the subgroup of the additive group of rational numbers comprising those rational numbers that, when written in reduced form, have denominators that are square-free numbers, i.e., there is no prime number $p$  for which $p^2$  divides the denominator.

Then:
The only non-identity automorphism of  is the negation map, so the automorphism group is  $\mathbb{Z}/2\mathbb{Z}$, and is hence cyclic.

The group $G$ is not a cyclic group. In fact, it is not even a finitely generated group because any finite subset of  can only cover finitely many primes in their denominators. It is, however, a locally cyclic group: any finitely generated subgroup is cyclic.

$\mathbb{Q}^*$ is non cyclic, but the only automorphism is the identity.


Question about a Cauchy sequence. prove that if $a_n$ is a Cauchy sequence, and the set {${ a_n | n\in \mathbb{N} }$} (which means the set of all values the seuqnece $a_n$ can have) is finite, then there is $N_0$ s.t for each $n>N_0$ the sequence $a_n$ is constant.

can someone give me a hint?

Since the given sequence is a Cauchy sequence, you have that for every positive number $\epsilon$, there is a positive integer $N$ s.t. for all natural numbers $m, \, n > N$:
$$
|a_m - a_n| < \epsilon
$$

Take $\epsilon$ to be the minimum distance between two distinct points, which exists because the set of pairs of distinct points is also finite. Now, take $N$ such that when $m, \, n > N$, it is true that $|a_m - a_n| < \frac{\epsilon}{2}$. But this means that $a_m = a_n$ by the way $\epsilon$ is defined.


Are subspaces always enumerable with an order? I'm not quite sure how to ask this question so bear with me.

I know that $\mathbb{R}^0$ is a subspace of $\mathbb{R}^1$ which is a subspace of $\mathbb{R}^2$ ... etc.

And similarly, there is an isomorphism from $\mathbb{R}^n$ to polynomials of (n-1)th degree.

But now I've just read that the set of all functions from $\mathbb{R}$ to $\mathbb{R}$ forms a vector space, and moreover the subset of those functions that are continuous is a subspace of those functions, and the subset of differentiable functions lies within the subset of continuous ones as another subspace.

Since these function spaces are from $\mathbb{R}$ to $\mathbb{R}$, should I imagine the subspaces somehow lying between $\mathbb{R}^0$ and $\mathbb{R}^1$? Or are these function spaces isomorphic to $\mathbb{R}$ of infinite dimensions? I'm guessing the latter since polynomials can go up to any degree, and polynomials are a subset of differentiable functions.

If I'm on the right track with all of this so far, my final question I'm building up to is, can these vector spaces be enumerated?

These function spaces are absolutely gigantic. For instance, the space of polynomial functions - which is relatively tiny part of the space of (say) all differentiable functions - is already infinite-dimensional, since the following set of polynomials is linearly independent: $$1, x,x^2, x^3,x^4, ...$$ Now, as to how we can enumerate vector spaces, remember the following fact:

  Two vector spaces $V_1, V_2$ over a field $k$ (say, $k=\mathbb{R}$) are isomorphic iff they have the same dimension, that is, if there are bases $B_1,B_2$ of $V_1, V_2$ respectively with $\vert B_1\vert=\vert B_2\vert$.

In particular, this holds for infinite-dimensional vector spaces as well as finite-dimensional ones, by exactly the same proof (any bijection between bases induces an isomorphism in the usual way). So up to isomorphism, vector spaces are enumerated by their dimension.

Calculating the dimension of an infinite-dimensional vector space requires knowing a bit of set theory, but assuming that background knowledge here are some specific numbers:

The set of polynomials above (= monic monomials) is a basis for the space of all polynomial functions, and is countably infinite. So the dimension of the space of polynomial functions is $\aleph_0$.
By contrast, the dimension of the space of all differentiable functions is $2^{\aleph_0}$. To see that this is a lower bound, note that for each positive real number $r$ the function $(x^2)^r$ (note that this is different in general from $x^{2r}$ - think about $x=-1$ and $r={1\over 4}$...) is differentiable, and the set of such functions is linearly independent. To see that it's an upper bound, it's a good exercise to show that there are only $2^{\aleph_0}$-many continuous functions, hence only $2^{\aleph_0}$-many differentiable functions, and the dimension of the space clearly can't be bigger than the number of points.
Perhaps surprisingly, the space of all continuous functions has the same dimension, $2^{\aleph_0}$! This follows since it contains the space of differentiable functions, hence has dimension at least $2^{\aleph_0}$ since that's the dimension of the space of differentiable functions, but (as said above) there are only $2^{\aleph_0}$-many continuous functions at all. This is true even though the space of differentiable functions is of course a proper *(indeed, very proper - and see below for what I mean by this)* subspace of the space of all continuous functions. This sort of thing happens whenever we think about infinite sets, the ur-example being Hilbert's hotel.
Finally, the space of all functions has dimension $2^{2^{\aleph_0}}$. Roughly speaking, this is because the number of functions is $2^{\aleph_0}$ times the dimension of the space of functions, and the number of functions is $2^{2^{\aleph_0}}$. (Making this precise takes a bit of thought.)

There is, however, still a problem with enumerating subspaces. In a vector space $V$, if $W_1,W_2$ are subspaces of $V$ with $dim(W_1)=dim(W_2)$ finite, then there is an automorphism of $V$ swapping $W_1$ and $W_2$; that is, any two subspaces with the same finite dimension don't just look the same "on their own," they "sit inside $V$" in the same way.

What do I mean intuitively by "sit inside $V$ in the same way"? Well, take $V=\mathbb{R}^2$, $W_1=$ the $x$-axis, and $W_2=$ the $y$-axis. Obviously $W_1$ and $W_2$ are different subspaces, but just as obviously they "look the same" - I can distort the plane via a bijective linear transformation (= automorphism) and swap the $x$-axis and the $y$-axis. This is what I'm getting at, above.

This fails for infinite-dimensional vector spaces: just like the set of even numbers has the same cardinality as the set of natural numbers, but is a proper subset of the naturals, if $V$ is an infinite-dimensional vector space we can find a proper subspace $W\subsetneq V$ of the same dimension; taking $W_1=W, W_2=V$ yields a counterexample to the situation above, in the infinite-dimensional case (since there can be no automorphism of $V$ which takes all of $V$ to a proper subset of $V$). For a concrete example of this, think about the continuous vs. differentiable case above: the space of continuous functions, and the subspace of differentiable functions, have the same dimension, but clearly the way the space of all continuous functions sits inside the space of all continuous functions is different from the way the space of all differentiable functions sits inside the space of all continuous functions (the former "covers everything," the latter doesn't). So subspaces of a given vector space, in general, can't be classified by their dimension alone if we care about how they "sit inside" the big space.

This is resolved by the concept of codimension - basically, this measures how many dimensions a subspace "misses." Specifically, the codimension of a subspace $W$ of $V$ is the unique dimension of a subspace $W'$ such that $W\cap W'=\{0\}$ (they don't overlap nontrivially) but $W\oplus W'=V$ (together they get you all of $V$ - so, $W'$ is in some sense exactly what $W$ misses). The fact that codimension is well-defined is nontrivial, and a good exercise. (The definition I've given isn't the same as the definition in the wiki page, which for a lot of reasons turns out to be better - but the one I've given is in my opinion more concrete, and they turn out to be equivalent.)

Codimension is really a different thing from dimension: we saw above that we can have two subspaces with the same dimension but different codimensions, and similarly it's not hard to find examples with different dimensions but the same codimensions. It turns out, though, that codimension is the only new idea we need:

  Suppose $W_1, W_2$ are subspaces of $V$ with the same dimension and the same codimension. Then there is an automorphism of $V$ swapping $W_1$ and $W_2$. (The converse also holds.)

So to classify subspaces up to "sit inside the big space in the same way," I need to look at two different numbers - dimension and codimension - but these are the only two numbers I need to look at.

Hint:

$\mathbb{R}$ is a vector space over $\mathbb{Q}$. Think about the Hamel basis of $\mathbb{R}$ over $\mathbb{Q}$. You will get some idea.


Understanding proof that a contour integral along a closed path of a holomorphic function is zero One of our tutorial questions in complex analysis asked us to prove that: $\int_\gamma g = 0$ for any holomorphic function $g$ on $\Omega$, and $\gamma: [a,b] \rightarrow \Omega$, which is simple and positively oriented.
The proof was really a one liner, noting that if $g$ is holomorphic on $\Omega$, then so is $g(z) = g(z)(z-a)$ for any interior point, $a$, of the path. Then we just say since $\int_\gamma g = \int_\gamma \frac{g(z)(z-a)}{z-a}dz$ (*), then $\int_\gamma g = 0$ by the CIF.
Looking over the problem again I am hoping to clarify my actual understanding of why the (*) step is valid. I initially thought the step was trivial; I just took $g(z) = \frac{g(z)(z-a)}{z-a}$. But a moment of reflection when I reviewed the problem made me realise it's not so straightforward, because these two functions are not actually equal; the function defined by the latter has an undefined point in $\Omega$, namely at $z = a$.
Is my new reasoning below the correct justification?:
The functions given by $g(z)$ and $g(z)(z-a)$ differ at a single point $z=a$. Suppose that $\gamma (t_a) = a$, and note by definition $\int_\gamma g := \int_a^b g(\gamma(t))\gamma'(t)dt$.
Then since $\int_\gamma g(z)dz$ can be written as a real integral, and since $\frac{g(z)(z-a)}{z-a}$ differs at just a single point from $g(z)$, the real integral given by $\int_a^b g(\gamma(t))\gamma'(t)dt$, is equal to the contour integral $\int_\gamma \frac{g(z)(z-a)}{z-a}dz$, since the value of integrals remain unchanged for any countable difference of points in the function.
I am just wondering of this makes sense since we have to change the domains, i.e. the undefined point becomes the real number $\gamma(t_a)$ in the real integral, rather than the complex number $a$ (although I hope it is fine, and I don't see an issue currently).

The result you say you want to prove is false (the proofs that have appeared require more assumptions than what's given).
Let $\Omega=\{z:z\ne0\}$, $g(z)=1/z$, $[a,b]=[0,2\pi]$ and $\gamma(t)=e^{it}$. Then $$\int_\gamma g(z)\,dz=2\pi i.$$
Note
This is a hugely important example, worth keeping in mind: (i) It explains where the Residue Theorem comes from (ii) in a sense the function $1/(z-a)$ for $a\notin\Omega$ is the only counterexample (or rather if none of those functions is a counterexample then there is no counterexample):
Theorem. Suppose $\gamma$ is a (smooth) closed curve in the open set $\Omega\subset\Bbb C$. TFAE:
(i) $\int_\gamma f=0$ for all $f\in H(\Omega)$.
(ii) $\int_\gamma f=0$ if $f(z)=1/(z-a)$ for some $a\in\Bbb C\setminus\Omega$.
(iii) $Ind(\gamma, a)=0$ for all $a\in\Bbb C\setminus\Omega$.
Proof: (ii) is a special case of  (i). If you write $Ind$ as an integral it's clear that (ii) and (iii) are equivalent. And CT says precisely that (iii) implies (i).

The proof I know using Green's theorem.
If $f(z)$ is holomorphic on $D$ and $\gamma$ is a closed contour on this domain $\oint_\gamma f(z)\ dz = 0$
$f(z) = u(x,y) + iv(x,y)\\
dz = dx + i\ dy\\$
$\oint_\gamma f(z)\ dz\\ = \int (u+iv)(dx + i\ dy)$
Which we multiply out and break into real and imaginary parts.
$\int u\ dx - v\ dy + i\int v\ dx + u\ dy$
Greens theorem says over any closed contour.
$\oint P\ dx + Q\ dy = \iint \left(\frac {\partial Q}{\partial x} -\frac {\partial P}{\partial y}\right) \ dx\ dy$
And if we apply it to each of the integrals above.
$\int -\left(\frac {\partial v}{\partial x} + \frac {\partial u}{\partial x}\right) \ dx \ dy + i\int \left(\frac {\partial u}{\partial x} - \frac{\partial v}{\partial y}\right) \ dx \ dy$
But the Cauchy-Riemann equations say that for a holomorphic function
$\frac {\partial u}{\partial x} = \frac{\partial v}{\partial y}\\
\frac {\partial v}{\partial x} = - \frac {\partial u}{\partial x}$
Making both integrals equal to zero.


Use inference rules to prove distributive law I'm taking an intro logic course this semester and my prof is hard to follow and not really great at clarifying things. I'm stuck on this question in my assignment, I'm just not sure how to start. I think I just need a jump start on how to tackle this sort of question.

So the question is, using basic inference rules, provide derivation to prove distributivity of $\lor$ over $\land$:

$P \lor (Q \land R) \vDash (P \lor Q) \land (P \lor R)$

$(P \lor Q) \land (P \lor R) \vDash P \lor (Q \land R)$

You can prove them with Natural Deduction.

For $P∨(Q∧R) \vDash (P∨Q)∧(P∨R)$ :

1) $P∨(Q∧R)$ --- assumed

2) $P$ --- assumed [a] for $\lor$-elimination (or proof by cases)

3) $P \lor Q$ --- from 2) by $\lor$-introduction

4) $P \lor R$ --- from 3) by $\lor$-introduction

5) $(P∨Q)∧(P∨R)$ --- from 3) and 4) by $\land$-introduction

6) $Q \land R$ --- assumed [b] for $\lor$-elimination

7) $Q$ --- from 6) $\land$-elimination

8) $P \lor Q$ --- from 7) by $\lor$-introduction

9) $R$ --- from 6) $\land$-elimination

10) $P \lor R$ --- from 9) by $\lor$-introduction

11) $(P∨Q)∧(P∨R)$ --- from 8) and 10) by $\land$-introduction

Now, having derived $(P∨Q)∧(P∨R)$ from $P$ (see 2-5) and from $Q \land R$ (see 6-10) we can derive it from $P∨(Q∧R)$ by $\lor$-elimination, discharging assumptions [a] and [b] :

  12) $(P∨Q)∧(P∨R)$ --- from 2), 5), 6) and 11) by $\lor$-elimination.

The above proof shows that :

    $P∨(Q∧R) \vdash (P∨Q)∧(P∨R)$;

by completeness, we conclude with : $P∨(Q∧R) \vDash (P∨Q)∧(P∨R)$.

In the same way, we can proceed for : $(P∨Q)∧(P∨R) \vDash P∨(Q∧R)$.

You can easily modify the above proof according to this List of rules of inference :

steps 3 and 4 are Addition (or Disjunction Introduction)
step 5 is Adjunction (or Conjunction Introduction)
after step 5 we need Deduction theorem (or Conditional Introduction)
the same set of rules must be used for steps 6-11
finally, we have to apply in step 12 Case analysis.

Proving the Distributive Rule

x & (y V z) :: (x & y) V (x & z)

In order to prove the Distributive Rule, you must show that BOTH of the following statements are true:

                 Statement #1:     x  & (y V z) → (x & y) V (x & z)

                                         AND

                   Statement #2:   (x & y) V (x & z) → x  & (y V z)

I show a separate proof for each of these statements:

Proof of Statement #1:    x  & (y V z) → (x & y) V (x & z)

x  & (y V z)                                       P
  x                                                      1 Simp
  y V z                                                1 Simp
  ~ (x & y)                                           AP
  ~ x V ~ y                                           4 DeM
  ~ y                                                    2, 5  DS
  z                                                       3, 6  DS
 x & z                                                  2, 7  Conj
 ~ (x & y) → (x & z)                             4-8  CP
  (x & y) V (x  & z)                             9 DeM

Proof of Statement #2:   (x & y) V (x & z) → x  & (y V z)

(x & y) V (x & z)                                  P
 ~ x                                                      AP
 ~ x V ~ y                                             2 Add
 ~ x V ~ z                                             2 Add
 ~ ( x & y)                                             3 DeM
 ~ ( x & z)                                             4 DeM
 ~ ( x & y) &  ~ ( x  & z)                        5, 6 Conj
 ~ ( ( x & y) V ( x & z) )                         7 DeM
 ~ (( x&y) V (x&z))  &  ((x&y) V (x&z))  1, 8 Conj
 x                                                          2-9  IP
 ~ ( y V z)                                             AP
 ~  y  & ~ z                                               11 DeM
 ~ y                                                          12 Simp
 ~ z                                                          12 Simp
 ~ z V ~ x                                                 14 Add
 ~ ( x & z)                                                 15 DeM
 x & y                                                        1 DS
 y                                                               17 Simp
 y V z                                                         18 Add
 ~ ( y V z) & ( y V z)                                   11, 19  Conj
 y V z                                                          11 - 20  IP
 x & ( y V z)                                                 10, 21 Conj

We can also prove the other Distributive Rule:

x V (y & z) :: (x V y) & (x V z)

In order to prove this Distributive Rule, you must show that BOTH of the following statements are true:

                 Statement #1:     x  V (y & z) → (x V y) & (x V z)

                                         AND

                   Statement #2:   (x V y) & (x V z) → x  V (y & z)

I show a separate proof for each of these statements:

Proof of  Statement #1:     x  V (y & z) → (x V y) & (x V z)

x  V (y & z)                                                                P
~ ( x V y)                                                                   AP
~ x & ~ y                                                                   2 DeM
~ x                                                                            3 Simp
~ y                                                                            3 Simp
y & z                                                                        1, 4 DS
y                                                                               6 Simp
y & ~ y                                                                      5, 7 Conj
 x V y                                                                     2 - 8 IP
 ~ ( x V z)                                                               AP
 ~ x & ~ z                                                               10 DeM
 ~ x                                                                         11 Simp
 ~ z                                                                         11 Simp
 y & z                                                                      1, 12 DS
 z                                                                             14 Simp
 z & ~ z                                                                    13, 15 Conj
 x V z                                                                        10 - 16 IP
 ( x V y ) & ( x V z)                                                    9, 17 Conj

Proof of Statement #2:   (x V y) & (x V z) → x  V (y & z)

( x V y ) & ( x V z )                                                 P
 x V y                                                                      1  Simp
 x V z                                                                      1 Simp
 ~ x                                                                         AP
 y                                                                            2, 4 DS
 z                                                                            3, 4 DS
 y & z                                                                      5, 6 Conj
  ~ x → ( y & z )                                                      4 - 8 CP
  x V ( y & z )                                                           8 Impl


Any class of a nonempty $X$ generates a base for a topology on $X$. Theorem Any class $\mathcal{A}$ of subsets of a nonempty set $X$ is the subbase for a unique topology $\tau$ on $X$. That is to say, the finite intersections of members of $\mathcal{A}$ form a base for the topology $\tau$ on $X$.
Example Consider $X=\{a,b,c,d\}$
Let $\mathcal{A}=\{\{a,b\},\{b,c\},\{d\}\}$
The finite intersection of members of $\mathcal{A}$ give us:
$$\mathcal{B}=\{\{a,b\},\{b,c\},\{d\},\{b\},\varnothing,X\}$$

How is it true that $X \in \mathcal{B}$ ? By definition of subbase, the finite intersection of members of $\mathcal{A}$ are the members of some base $\mathcal{B}$.
But for $a_i \in \mathcal{A}, \displaystyle\bigcap a_i \neq X$ for any finite intersection of $a_i$'s.
Look: $\{a,b\}\cap\{b,c\}\cap \{d\} \neq \{a,b,c,d\}$ nor do any other intersection of elements of $\mathcal{B}$ result in $X$. Anybody know what's going on here? Why is $X \in \mathcal{B}$?

You may or may not include $X$ to a basis. $X$ will have to be included by hand as one cannot get $X$ by taking intersections of proper subsets of $X$. Otherwise you can also include $X$ to $\mathcal{A}$ to start with.
The definition of basis is

For each $x \in X$, there is at least one basis element $B$ containing $x$.

If $x$ belongs to the intersection of two basis elements $B_1$ and $B_2$, then there is a basis element $B_3$ containing $x$ such that $B_3 \subseteq B_1 \cap B_2$.

See for your example if you do not include $X$ to the set $\mathcal{B}$,  it's still a basis.

A base for a topology is a set of subsets $\mathcal B\subset P (X)$ such that the set of all unions of elements of  $\mathcal B $ is the topology.
In general,  you are right that, as in this case, $X $ may not be included in the set of intersections of the elements of a subbase.  $X $ thus needs to be included,  in every event, to get a topology.


Endowments & Utility Function to get Demand Function We have two people, $A$ and $B$, A has $200$ units each of both good $X$ and $Y$ and $B$ has $100$ units each of both good $X$ and $Y$.

$A$ has tastes providing a utility function such that $u(X,Y) = y + 50 \ln x$ and $B$ $u(X,Y) = y + 150 \ln x$.

Given competitive equilibrium prices $p$ and $p_1$, how do I derive each person $A$ and $B$'s demand functions for both goods?

I agree, it is hard to tell how to answer the question because I don't know what "competitive equilibrium" means. But, if I assume that it means that given prices, the consumption decision of each person is optimized and such that market clearing conditions hold, then you can solve using the following. Solve for the optimal $x_i, y_i$ in each of the following.
Solve
$$ \max_{x_a,y_a} y_a+ 50 \ln x_a \\ s.t. \;  p_x x_a + p_y y_a \leq 200 p_x + 200 p_y $$
for person A, and
$$ \max_{x_b,y_b} y_b + 150 \ln x_b \\ s.t. \;  p_x x_b + p_y y_b \leq 100 p_x + 100 p_y $$
for person B. Use the method of Lagrange multipliers. The inequalities will hold with equality. Then, to pin down a solution, normalize the price of one good, say, by letting p_x = 1. Then apply the market clearing conditions (you'll only need to use one of them)

$$ x_a + x_b = 300 \\ y_a + y_b = 300.$$

(This gives the Walrasian (competitive) equilibrium in the general equilibrium framework.)

Marginal utility_A\Marginal utility_B=P_1/P_2
-> Solve for quantity B
Y=p_1A+p_2B
-> plug the equation for Q_2 (B) into the equation for Y.
-> that's your demand function


Determining whether a large series of 3D points all line on a plane TL;DR: For a large series of precise 3D coordinates that describe a real-world orbit, how can we determine if they all lie exactly on a plane?

The Problem

I've used NASA's highly precise SPICE toolkit to calculate the hourly position of the moon relative to the Earth in Cartesian coordinates. The frame of reference for these points is the J2000 frame: Earth's equator (x and y), with the z-axis running orthogonally through the poles.

We know the moon's orbit does not lie on the equatorial plane. The Earth-Moon orbit is typically described as a plane that is 5.14 degrees inclined from the equatorial plane.

(This is a 28-day period from Jan. 2018, hence the small overlap since the sidereal month is 27.32 days.)

What I want to determine is whether this orbit is perfectly "flat" -- whether the Moon orbits the Earth on a perfect plane rotated from the terrestrial equator -- or whether there is even a slight variance on the z axis of this approximate Earth-Moon orbital plane.

It's certainly very close to a plane, as we'd expect, as you can see from a year's worth of z coordinates from the Earth's frame of reference. But orbit's are hugely complicated given all the possible aberrations, which the SPICE toolkit usually accounts for.

One idea I had was to choose three points in the orbit, spaced about 9 days apart, calculate the plane for those three points, and then calculate the distance from that plane for each point. This seems inelegant and possibly biased by which three points I choose, though in theory all I need to know is whether the distance of each point to the 3-point plane is zero, regardless of which three points define the plane.

It seems to me there is a more elegant solution than this brute-force approach?

Let's say that you have position vectors $\{p_i:i\in I\}\subset \mathbb R^3$. If they were coplanar, you would have a vector $v\in\mathbb R^3$ such that $v\cdot p_i=0$ for every $i\in I$. Since this does not necessarily exist, what you can do instead is minimize the quadratic function
$$
f(v) = \sum_{i\in I} (v\cdot p_i)^2
$$
over $v\in S^2$.

This gives a good candidate for the "average orbit normal".

Edit 1: you have to subtract the barycenter of the points $p_i$ first, if you want the problem to be translation invariant.

Edit 2: the gradient of $f$ can be computed easily and is
$$
\nabla f(v) = 2\sum_{i\in I} (v\cdot p_i)p_i = 2\left(\sum_{i\in I}p_i\otimes p_i\right)v.
$$
With Lagrange multipliers, you want to find $v\in S^2$ and $\lambda\in\mathbb R$ such that $\nabla f(v)=2\lambda v$, because the constraint is $v\cdot v=1$. This is equivalent to finding the eigenvalues of the $3\times3$ matrix $\sum_{i\in I}p_i\otimes p_i$.

Edit 3: alternatively, call $P=\sum_{i\in I}p_i\otimes p_i$ and notice that $f(v)=v^TPv$. Therefore the minimum on $S^2$ is achieved at the eigenvectors corresponding to the lowest eigenvalue of $P$.

Edit 4: here is a picture of some points, the plane, the unit normal, and the segments indicating the distances of the points to the plane:

Edit 5: here is some Python code performing the computation

import numpy as np

# 120 random points in 3D
p = np.random.randn(120, 3)

# compute the svd
u, s, vh = np.linalg.svd(p, full_matrices=False)

# the best normal is the last row of vh
n = vh[-1]

# the sum of the squared distances is the square of the last singular value
sum_of_squared_distances = s[-1]**2

# verify the last statement
np.allclose((p@n) @ (p@n), s[-1]**2)

There don't seem to be outliers, you can use a total-least-squares plane fitting (it gives three solutions but the true one is easy to discriminate).

Then compute the distances to that plane.


Is computer science a branch of mathematics? I have been wondering, is computer science a branch of mathematics? No one has ever adequately described it to me. It all seems very math-like to me. My second question is, are there any books about computer science/programming that are very rigorous and take an axiomatic approach? Basically, putting computer science and programming on a rigorous foundation.

Theoretical computer science could certainly be considered a branch of mathematics. This branch of computer science deals with computers and computer programs as mathematical objects. Theoretical computer scientists could be described as computer scientists who know little about computers.

However, when people say "computer science" they usually include many things which would not be considered mathematics, for instance computer architecture, specific programming languages, etc.

I say that computer science is a branch of mathematics, but it has many branches connected to other sciences or fields of study as well. Many of the founding contributors to the field were mathematicians. The analogy of a musician to sports has no bearing because the person's sports accomplishments weren't necessarily any by-product of this person's musical talents. Computer science was fostered from mathematical carving.


point out the mistakes $1=2$? Q:prove $1=2$ ?

method1:-

let us consider $x=1$

then $x=x^2$

$x-1 =(x^2)-1$

$x-1=(x-1)(x+1)$

$1=x+1$

finally
$1=2$

i have little confusion here, is the mistake is considering $x=1$ or else any thing other than this.

method2:-

$-2=-2$

$1-3=4-6$

$(1^2)-(\frac{2*1*3}{2})=(2^2)-(\frac{2*2*3}{2})$

$(1^2)-(\frac{2*1*3}/2)+((\frac{3}{2})^2)=(2^2)-(\frac{2*2*3}{2})+((\frac{3}{2})^2)$

$(1-\frac{3}{2})^2=(2-\frac{3}{2})^2$

$1-\frac{3}{2}=2-\frac{3}{2}$ [here the formula if $x^n=y^n$ then $x=y$  is failed]

$1=2$

point out the mistakes in above two methods exactly and please explain

For the first: Don't divide by zero. (That's what you did going from $x-1=(x-1)(x+1)$ to $1=x+1$, since $x=1$.)

For the second: $x^2=y^2$ does not imply that $x=y$. After all, $(-1)^2=1=1^2,$ but $-1\ne 1$. The best we can conclude is that $x=\pm y$.

In the first one you divided by $x-1$, which is illegal cuz $x-1=0$.  I don't know what you're doing in the second one but I suspect you also divided by 0 there too lol.