A triangular pyramid is constructed using spherical balls so that each ball rests on exactly three balls of the next lower level.

Then, we calculate the number of paths leading from the apex to each position: A path starts at the apex and progresses downwards to any of the three spheres directly below the current position. Consequently, the number of paths to reach a certain position is the sum of the numbers immediately above it (depending on the position, there are up to three numbers above it).

The result is Pascal’s pyramid and the numbers at each level n are the coefficients of the trinomial expansion $(x + y + z)^n$. How many coefficients in the expansion of $(x + y + z)^{200000}$ are multiples of $10^{12}$?

## Solution Using the Multinomial Theorem

The generalization of the binomial theorem is the multinomial theorem. It says that multinomials raised to exponents can be expanded using the formula
$(x_1+x_2+\cdots+x_m)^n=\sum_{{k_1+k_2+\cdots+k_m=n}\atop{0\le k_i\le n}}\left({n}\atop{k_1,k_2,\ldots,k_m}\right)\prod_{1\le t\le m}x_t^{k_t}$
where
$\left({n}\atop{k_1,k_2,\ldots,k_m}\right)=\frac{n!}{k_1!k_2!\cdots k_m!}.$
Of course, when m=2 this gives the binomial theorem. The sum is taken over all partitions $k_1+k_2+\cdots+k_m=n$ for integers $k_i$. If n=200000 abd m=3, then the terms in the expansion are given by
$\left({200000}\atop{k_1,k_2,k_3}\right)x_1^{k_1}x_2^{k_2}x_3^{k_3}=\frac{200000!}{k_1!k_2!k_3!}x_1^{k_1}x_2^{k_2}x_3^{k_3}$
where $k_1+k_2+k_3=200000$. It’s worth pointing out that each of the coefficients is an integer, and thus has a unique factorization into products of prime integers. Of course, there’s no way that we’re going to calculate these coefficients. We only need to know when they’re divisible by $10^{12}$. Thus, we only need to consider how many factors of 2 and 5 are involved.

First, we’ll create a function $p(n,d)$ that outputs how many factors of $d$ are included in $n!$. We have that
$p(n,d)=\left\lfloor\frac{n}{d}\right\rfloor+\left\lfloor\frac{n}{d^2}\right\rfloor+\left\lfloor\frac{n}{d^3}\right\rfloor+ \cdots+\left\lfloor\frac{n}{d^r}\right\rfloor,$
where $d^r$ is the highest power of $d$ dividing $n$. For instance, there are 199994 factors of 2 in 200000!. Since we’re wondering when our coefficients are divisible by $10^{12}=2^{12}5^{12}$, we’ll be using the values provided by $p(n,d)$ quite a bit for $d=2$ and $d=5$. We’ll store two lists:
$p2=[p(i,2)\text{ for }1\le i\le 200000]\quad\text{and}\quad p5=[p(i,5)\text{ for }1\le i\le 200000].$
For a given $k_1,k_2,k_3$, the corresponding coefficient is divisible by $10^{12}$ precisely when
$p2[k_1]+p2[k_2]+p2[k_3]<199983\ \text{and}\ p5[k_1]+p5[k_2]+p5[k_3]<49987.$
That is, this condition ensures that there are at least 12 more factors of 2 and 5 in the numerator of the fraction defining the coefficients.

Now, we know that $k_1+k_2+k_3=200000$, and we can exploit symmetry and avoid redundant computations if we assume $k_1\le k_2\le k_3$. Under this assumption, we always have
$k_1\le\left\lfloor\frac{200000}{3}\right\rfloor=66666.$
We know that $k_1+k_2+k_3=200000$ is impossible since 200000 isn't divisible by 3. It follows that we can only have (case 1) $k_1=k_2 < k_3$, or (case 2) $k_1 < k_2=k_3$, or (case 3) $k_1 < k_2 < k_3$.

In case 1, we iterate $0\le k_1\le 66666$, setting $k_2=k_1$ and $k_3=200000-k_1-k_2$. We check the condition, and when it is satisfied we record 3 new instances of coefficients (since we may permute the $k_i$ in 3 ways).

In case 2, we iterate $0\le k_1\le 66666$, and when $k_1$ is divisible by 2 we set $k_2=k_3=\frac{200000-k_1}{2}$. When the condition holds, we again record 3 new instance.

In case 3, we iterate $0\le k_1\le 66666$, and we iterate over $k_2=k_1+a$ where $1\le a < \left\lfloor\frac{200000-3k_1}{2}\right\rfloor$. Then $k_3=200000-k_1-k_2$. When the condition holds, we record 6 instances (since there are 6 permutations of 3 objects).

## Cython Solution

I’ll provide two implementations, the first written in Cython inside Sage. Then, I’ll write a parallel solution in C.

%cython   import time from libc.stdlib cimport malloc, free   head_time = time.time()   cdef unsigned long p(unsigned long k, unsigned long d): cdef unsigned long power = d cdef unsigned long exp = 0 while power <= k: exp += k / power power *= d return exp   cdef unsigned long * p_list(unsigned long n, unsigned long d): cdef unsigned long i = 0 cdef unsigned long * powers = <unsigned long *>malloc((n+1)*sizeof(unsigned long)) while i <= n: powers[i] = p(i,d) i += 1 return powers     run_time = time.time()   # form a list of number of times each n! is divisible by 2. cdef unsigned long * p2 = p_list(200000,2)   # form a list of number of times each n! is divisible by 5. cdef unsigned long * p5 = p_list(200000,5)   cdef unsigned long k1, k2, k3, a cdef unsigned long long result = 0   k1 = 0 while k1 <= 66666: # case 1: k1 = k2 < k3 k2 = k1 k3 = 200000 - k1 - k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 3 # case 2: k1 < k2 = k3 if k1 % 2 == 0: k2 = (200000 - k1)/2 k3 = k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 3 # case 3: k1 < k2 < k3 a = 1 while 2*a < (200000 - 3*k1): k2 = k1 + a k3 = 200000 - k1 - k2 if 199982 >= (p2[k1]+p2[k2]+p2[k3]) and 49986 >= (p5[k1]+p5[k2]+p5[k3]): result += 6 a += 1 k1 += 1     free(p2) free(p5)     elapsed_run = round(time.time() - run_time, 5) elapsed_head = round(time.time() - head_time, 5)   print "Result: %s" % result print "Runtime: %s seconds (total time: %s seconds)" % (elapsed_run, elapsed_head)

When executed, we find the correct result relatively quickly.

Result: 479742450 Runtime: 14.62538 seconds (total time: 14.62543 seconds)

## C with OpenMP Solution

#include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <omp.h>   /*****************************************************************************/ /* function to determine how many factors of 'd' are in 'k!' */ /*****************************************************************************/ unsigned long p(unsigned long k, unsigned long d) { unsigned long power = d; unsigned long exp = 0; while (power <= k) { exp += k/power; power *= d; } return exp; }   /*****************************************************************************/ /* create a list [p(0,d),p(1,d),p(2,d), ... ,p(n,d)] and return pointer */ /*****************************************************************************/ unsigned long * p_list(unsigned long n, unsigned long d) { unsigned long i; unsigned long * powers = malloc((n+1)*sizeof(unsigned long)); for (i=0;i<=n;i++) powers[i] = p(i,d); return powers; }   /*****************************************************************************/ /* main */ /*****************************************************************************/ int main(int argc, char **argv) { unsigned long k1, k2, k3, a; unsigned long long result = 0;   unsigned long * p2 = p_list(200000, 2); unsigned long * p5 = p_list(200000, 5);     #pragma omp parallel for private(k1,k2,k3,a) reduction(+ : result) for (k1=0;k1<66667;k1++) { // case 1: k1 = k2 < k3 k2 = k1; k3 = 200000 - k1 - k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 3; } // case 2: k1 < k2 = k3 if (k1 % 2 == 0) { k2 = (200000 - k1)/2; k3 = k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 3; } } // case 3: k1 < k2 < k3 for (a=1;2*a<(200000-3*k1);a++) { k2 = k1 + a; k3 = 200000 - k1 - k2; if (p2[k1]+p2[k2]+p2[k3]<199983 && p5[k1]+p5[k2]+p5[k3]<49987) { result += 6; } } }   free(p2); free(p5);   printf("result: %lld\n", result);   return 0; }

This can be compiled and optimized using GCC as follows.

$gcc -O3 -fopenmp -o problem-154-omp problem-154-omp.c When executed on a 16-core machine, we get the following result. $ time ./problem-154-omp result: 479742450   real 0m1.487s

This appears to be the fastest solution currently known, according to the forum of solutions on Project Euler. The CPUs on the 16-core machine are pretty weak compared to modern standards. When running on a single core on a new Intel Core i7, the result is returned in about 4.7 seconds.

### Motivation

Many interesting computational problems, such as those on Project Euler require that one find the sum of proper divisors of a given integer. I had a fairly crude brute-force method for doing this, and was subsequently emailed a comment by Bjarki Ágúst Guðmundsson who runs the site www.mathblog.dk. He pointed me in the direction of this page and provided some sample code illustrating how such an approach runs asymptotically faster than the approach I had been taking. Awesome! I’m going to expand on that a bit here, providing some mathematical proofs behind the claims and providing code for those who may want to take advantage of this.

### The Mathematics Behind It All

Let the function $\sigma(n)$ be the sum of divisors for a positive integer $n$. For example,
$\sigma(6)=1+2+3+6=12.$

It should seem obvious that for any prime $p$ we have $\sigma(p)=1+p$. What about powers of primes? Let $\alpha\in\mathbb{Z}_+$, and then
$\sigma(p^\alpha)=1+p+p^2+\cdots+p^\alpha.$

We’d like to write that in a closed form, i.e., without the “$+\cdots+$”. We use a standard series trick to do that.

\begin{align} \sigma(p^\alpha) &= 1+p+p^2+\cdots+p^\alpha\cr p\sigma(p^\alpha) &= p+p^2+p^3+\cdots+p^{\alpha+1}\cr p\sigma(p^\alpha)-\sigma(p^\alpha) &= (p+p^2+\cdots+p^{\alpha+1})-(1+p+\cdots+p^\alpha)\cr p\sigma(p^\alpha)-\sigma(p^\alpha) &= p^{\alpha+1}-1\cr (p-1)\sigma(p^\alpha) &= p^{\alpha+1}-1\cr \sigma(p^\alpha) &=\frac{p^{\alpha+1}-1}{p-1}.\end{align}

That solves the problem of finding the sum of divisors for powers of primes. It would be nice if we could show that $\sigma$ is multiplicative on powers of primes, i.e., that $\sigma(p_1^{\alpha_1}p_2^{\alpha_2})=\sigma(p_1^{\alpha_1})\sigma(p_2^{\alpha_2})$. We’ll prove that this is the case, and solve the problem in general along the way.

Proposition: The function $\sigma$ is multiplicative on powers of primes.

Proof: Let $n$ be a positive integer written (uniquely, by the fundamental theorem of arithmetic) as
$n=\prod_{i=1}^m p_i^{\alpha_i}$
for $m$ distinct primes $p_i$ with $\alpha_i\in\mathbb{Z}_+$. Any divisor $k$ of $n$ then has the form
$k=\prod_{i=1}^m p_i^{\beta_i}$
where each $\beta_i$ satisfies $0\le\beta_i\le\alpha_i$. Then
$\sigma(n)=\sigma\left(\prod_{i=1}^m p_i^{\alpha_i}\right)$
is the sum of all divisors $k$ of $n$ and can be written by summing over all possible combinations of the exponents $\beta_i$. There are $\prod_{i=1}^m \alpha_i$ combinations, and we can form their sum and simplify it as follows.
\begin{align}\sigma(n) &= \sum_{1\le i\le m,\ 0\le\beta_i\le\alpha_i}p_1^{\beta_i}p_2^{\beta_2}\cdots p_m^{\beta_m}\cr &= \sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\left(\sum_{2\le i\le m,\ 0\le\beta_i\le\alpha_i}p_2^{\beta_2}p_3^{\beta_3}\cdots p_m^{\beta_m}\right)\cr &= \sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\sum_{\beta_2=0}^{\alpha_2}p_2^{\beta_2}\left(\sum_{3\le i\le m,\ 0\le\beta_i\le\alpha_i}p_3^{\beta_3}p_4^{\beta_4}\cdots p_m^{\beta_m}\right) \cr &= \vdots\cr &=\sum_{\beta_1=0}^{\alpha_1}p_1^{\beta_1}\sum_{\beta_2=0}^{\alpha_2}p_2^{\beta_2}\sum_{\beta_3=0}^{\alpha_3}p_3^{\beta_3}\ \cdots\ \sum_{\beta_m=0}^{\alpha_m}p_m^{\beta_m}\cr &=\sigma(p_1^{\alpha_1})\sigma(p_2^{\alpha_2})\cdots\sigma(p_m^{\alpha_m}).\end{align}
This completes the proof. Q.E.D.

Thus, we now have a formula for the sum of divisors of an arbitrary positive integer $n$ using the factorization of $n$. Namely,
$\sigma(n)=\sigma\left(\prod_{i=1}^m p_i^{\alpha_i}\right)=\prod_{i=1}^m\left(\frac{p_i^{\alpha_i+1}-1}{p_i-1}\right).$

This is something I use quite a bit for various problems and programming exercises, so I figured I could post it here. It’s a basic post that isn’t advanced at all, but that doesn’t mean that the implementation given below won’t save work for others. The idea is to create a list of primes in C by malloc’ing a sieve, then malloc’ing a list of specific length based on that sieve. The resulting list contains all the primes below a given limit (defined in the code). The first member of the list is an integer representing the length of the list.

#include <stdio.h> #include <stdlib.h> #include <malloc.h>   #define bool _Bool   static unsigned long prime_limit = 1000000;   unsigned long sqrtld(unsigned long N) { int b = 1; unsigned long res,s; while(1<<b<N) b+= 1; res = 1<<(b/2 + 1); for(;;) { s = (N/res + res)/2; if(s>=res) return res; res = s; } }   unsigned long * make_primes(unsigned long limit) { unsigned long *primes; unsigned long i,j; unsigned long s = sqrtld(prime_limit); unsigned long n = 0; bool *sieve = malloc((prime_limit + 1) * sizeof(bool)); sieve[0] = 0; sieve[1] = 0; for(i=2; i<=prime_limit; i++) sieve[i] = 1; j = 4; while(j<=prime_limit) { sieve[j] = 0; j += 2; } for(i=3; i<=s; i+=2) { if(sieve[i] == 1) { j = i * 3; while(j<=prime_limit) { sieve[j] = 0; j += 2 * i; } } } for(i=2;i<=prime_limit;i++) if(sieve[i]==1) n += 1; primes = malloc((n + 1) * sizeof(unsigned long)); primes[0] = n; j = 1; for(i=2;i<=prime_limit;i++) if(sieve[i]==1) { primes[j] = i; j++; } free(sieve); return primes; }     int main(void) {   unsigned long * primes = make_primes(prime_limit);   printf("There are %ld primes <= %ld\n",primes[0],prime_limit);     free(primes); return 0; }

Say one wanted to form a list of all primes below 1,000,000. That’s what the above program does by default, since “prime_limit = 1000000.” If one compiles this and executes, you would get something like what follows. The timing is relatively respectable.

$gcc -O3 -o prime-sieve prime-sieve.c$ time ./prime-sieve There are 78498 primes <= 1000000   real 0m0.008s user 0m0.004s sys 0m0.000s

The code is linked here: prime-sieve.c


# Triangles in 20 non-straight-line "dots"

• August 22nd 2010, 07:07 AM
grottvald
Triangles in 20 non-straight-line "dots"
Twenty points/dots are given so that the three of them are never in a straight line. How many triangles can be formed with corners(as in vertex i think?) in the dots?
• August 22nd 2010, 07:21 AM
Plato
Calculate the number of ways to choose three points from twenty.
• August 22nd 2010, 10:36 AM
grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct (Worried)
• August 22nd 2010, 10:57 AM
Plato
Quote:

Originally Posted by grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct

It is not a large number at all: $\displaystyle \binom{20}{3}=\frac{20!}{3!\cdot 17!}=1140$
• August 22nd 2010, 11:58 AM
Quote:

Originally Posted by grottvald
C(20,3) ? But that results in a very big number that seems unlikely to be correct (Worried)

You may be thinking of non-overlapping triangles in the picture with 20 dots.
That's a different situation.
Imagine the dots are placed apart from left to right, not on a straight line.
Pick the leftmost point.
To make a triangle, you can pick any 2 of the remaining 19 dots.

The number of ways to do this is $\binom{19}{2}=171$

Therefore, there are 171 triangles that can be drawn which include the leftmost point.

If you move on to the next point to the right and exclude the point previously chosen,
then you can draw another $\binom{18}{2}=153$ triangles.

These triangles do not include any of the previous 171,
since these 153 omit the leftmost point.

Notice that these triangles typically share sides of other triangles,
but they are made of 3 distinct points, hence the triangles are being counted only once.

hence, there are $\binom{19}{2}+\binom{18}{2}+\binom{17}{2}+........ .+\binom{2}{2}=\binom{20}{3}$ triangles.
• August 22nd 2010, 01:26 PM
grottvald
Quote:

You may be thinking of non-overlapping triangles in the picture with 20 dots.
That's a different situation.
Imagine the dots are placed apart from left to right, not on a straight line.
Pick the leftmost point.
To make a triangle, you can pick any 2 of the remaining 19 dots.

The number of ways to do this is $\binom{19}{2}=171$

Therefore, there are 171 triangles that can be drawn which include the leftmost point.

If you move on to the next point to the right and exclude the point previously chosen,
then you can draw another $\binom{18}{2}=153$ triangles.

These triangles do not include any of the previous 171,
since these 153 omit the leftmost point.

Notice that these triangles typically share sides of other triangles,
but they are made of 3 distinct points, hence the triangles are being counted only once.

hence, there are $\binom{19}{2}+\binom{18}{2}+\binom{17}{2}+........ .+\binom{2}{2}=\binom{20}{3}$ triangles.

Thank you so much! You explained it in an very easy and beautiful way. Thanks again!


# $\int\frac{g(x)}{f(x)} \, dx$ where $f(x) = \frac{1}{2}(e^x+e^{-x})$ and $g(x) = \frac{1}{2}(e^x - e^{-x})$?

Given two functions $$f(x) = \frac{1}{2}(e^x+e^{-x})$$ and $$g(x) = \frac{1}{2}(e^x - e^{-x})$$, calculate

$$\int\frac{g(x)}{f(x)} \, dx.$$

Observing that $$f'(x) = g(x)$$, this is very easy to do. Just take $$u = f(x)$$ and therefore $$du = f'(x)\,dx$$. Now we have

$$\int \frac{f'(x)}{f(x)} \, dx = \int \frac{du}{u} = \ln |u| + C = \ln\left|\frac{1}{2}(e^x+e^{-x})\right|+C.$$

However, this solution is wrong. The correct one is $$\ln|e^x+e^{-x}| + C$$. I see how we could get that, just plug in $$g(x)$$ and $$f(x)$$ directly, and we get

$$\int \frac{\frac{1}{2}(e^x - e^{-x})}{\frac{1}{2}(e^x+e^{-x})} \, dx.$$

Cancelling the $$\frac{1}{2}$$'s and taking $$u = e^x+e^{-x}$$ and $$du = (e^x-e^{-x}) dx$$ gives us

$$\int \frac{du}{u} = \ln|u| + C = \ln|e^x+e^{-x}| + C.$$

I can't see where I made a mistake in my approach, and I'd be really grateful if you pointed it out.

• Please try to make the titles of your questions more informative. For example, Why does $a<b$ imply $a+c<b+c$? is much more useful for other users than A question about inequality. From How can I ask a good question?: Make your title as descriptive as possible. In many cases one can actually phrase the title as the question, at least in such a way so as to be comprehensible to an expert reader. You can find more tips for choosing a good title here. – Shaun May 22 at 18:47
• Thanks, I will do that next time. :) – Gregor Perčič May 22 at 19:01
• I feel terrible mentioning it because I know you're only trying to be polite but could you remove the religious elements at the end? There are likely many faiths none should be given a platform – Karl May 22 at 19:10
• @Karl With all due respect, I will not remove it. It is very good to try to propagate the Faith in all contexts of life. The mods may remove it, but hey, I did my best. Not to mention that my right to free speech will be trampled on in this instance. – Gregor Perčič May 22 at 19:29
• I ment no offence honestly. I'd just rather stick to maths. – Karl May 22 at 19:38

Note that if $$K$$ is a constant, $$\ln|K h(x)|= \ln|K|+\ln|h(x)|$$. In other words, the $$1/2$$ in the log can get 'absorbed' into the $$+C$$ term.
• Aaaaah, I see! But then that means that my solution $\ln|\frac{1}{2}(e^x + e^{-x})| + C$ doesn't by itself (with $C = 0$) calculate the area under the curve $h(x) = \frac{f(x)}{g(x)}$? – Gregor Perčič May 22 at 19:00
• It seems $f$ and $g$ are reversed in your comment. It should, in the sense that $$\int _{0}^x \frac{g(t)}{f(t)}\,dt = \left.\ln|\frac{1}{2}(e^t + e^{-t})|+C\right|_{0}^x$$ $$= \left(\ln|\frac{1}{2}(e^x + e^{-x})|+C\right)-\left(\ln|\frac{1}{2}(1+1)|+C\right)=\ln|\frac{1}{2}(e^x + e^{-x})|$$The $1/2$ is essential to make sure, starting at $x=0$, the area is $0$; otherwise, you'll be off by a constant. – Integrand May 22 at 19:25
• Yes, $f$ and $g$ are reversed. Sorry about that and thanks for the insight. – Gregor Perčič May 22 at 19:32
Using the identity: $$\log (\frac{a}{b})=\log(a)- \log(b)$$
$$\ln \frac{1}{2}(e^x+e^{-x})+C$$
$$=\ln (e^x+e^{-x})-\ln 2+C$$
$$=\ln (e^x+e^{-x})+C{'}$$ (as $$\ln 2$$ is constant)


# Monthly Archives: August 2015

## Marilyn vos Savant Conditional Probability Follow Up

In the Marilyn vos Savant problem I posted yesterday, I focused on the subtle shift from simple to conditional probability the writer of the question appeared to miss.  Two of my students took a different approach.

The majority of my students, typical of AP Statistics students’ tendencies very early in the course, tried to use a “wall of words” to explain away the discrepancy rather than providing quantitative evidence.  But two fully embraced the probabilities and developed the following probability tree to incorporate all of the given probabilities.  Each branch shows the probability of a short or long straw given the present state of the system.  Notice that it includes both of the apparently confounding 1/3 and 1/2 probabilities.

The uncontested probability of the first person is 1/4.

The probability of the second person is then (3/4)(1/3) = 1/4, exactly as expected.  The probabilities of the 3rd and 4th people can be similarly computed to arrive at the same 1/4 final result.

My students argued essentially that the writer was correct in saying the probability of the second person having the short straw was 1/3 in the instant after it was revealed that the first person didn’t have the straw, but that they had forgotten to incorporate the probability of arriving in that state.  When you use all of the information, the probability of each person receiving the short straw remains at 1/4, just as expected.

## Marilyn vos Savant and Conditional Probability

The following question appeared in the “Ask Marilyn” column in the August 16, 2015 issue of Parade magazine.  The writer seems stuck between two probabilities.

(Click here for a cleaned-up online version if you don’t like the newspaper look.)

I just pitched this question to my statistics class (we start the year with a probability unit).  I thought some of you might like it for your classes, too.

I asked them to do two things.  1) Answer the writer’s question, AND 2) Use precise probability terminology to identify the source of the writer’s conundrum.  Can you answer both before reading further?

Very briefly, the writer is correct in both situations.  If each of the four people draws a random straw, there is absolutely a 1 in 4 chance of each drawing the straw.  Think about shuffling the straws and “dealing” one to each person much like shuffling a deck of cards and dealing out all of the cards.  Any given straw or card is equally likely to land in any player’s hand.

Now let the first person look at his or her straw.  It is either short or not.  The author is then correct at claiming the probability of others holding the straw is now 0 (if the first person found the short straw) or 1/3 (if the first person did not).  And this is precisely the source of the writer’s conundrum.  She’s actually asking two different questions but thinks she’s asking only one.

The 1/4 result is from a pure, simple probability scenario.  There are four possible equally-likely locations for the short straw.

The 0 and 1/3 results happen only after the first (or any other) person looks at his or her straw.  At that point, the problem shifts from simple probability to conditional probability.  After observing a straw, the question shifts to determining the probability that one of the remaining people has the short straw GIVEN that you know the result of one person’s draw.

So, the writer was correct in all of her claims; she just didn’t realize she was asking two fundamentally different questions.  That’s a pretty excusable lapse, in my opinion.  Slips into conditional probability are often missed.

Perhaps the most famous of these misses is the solution to the Monty Hall scenario that vos Savant famously posited years ago.  What I particularly love about this is the number of very-well-educated mathematicians who missed the conditional and wrote flaming retorts to vos Savant brandishing their PhDs and ultimately found themselves publicly supporting errant conclusions.  You can read the original question, errant responses, and vos Savant’s very clear explanation here.

CONCLUSION:

Probability is subtle and catches all of us at some point.  Even so, the careful thinking required to dissect and answer subtle probability questions is arguably one of the best exercises of logical reasoning around.

RANDOM(?) CONNECTION:

As a completely different connection, I think this is very much like Heisenberg’s Uncertainty Principle.  Until the first straw is observed, the short straw really could (does?) exist in all hands simultaneously.  Observing the system (looking at one person’s straw) permanently changes the state of the system, bifurcating forever the system into one of two potential future states:  the short straw is found in the first hand or is it not.

CORRECTION (3 hours after posting):

I knew I was likely to overstate or misname something in my final connection.  Thanks to Mike Lawler (@mikeandallie) for a quick correction via Twitter.  I should have called this quantum superposition and not the uncertainty principle.  Thanks so much, Mike.

## SBG and AP Statistics Update

I’ve continued to work on my Standards for AP Statistics and after a few conversations with colleagues and finding this pdf of AP Statistics Standards, I’ve winnowed down and revised my Standards to the point I’m comfortable using them this year.

Following is the much shorter document I’m using in my classes this year.  They address the AP Statistics core content as well as the additional ideas, connections, etc. I hope my students learn this year.  As always, I welcome all feedback, and I hope someone else finds these guides helpful.

## SBG and Statistics

I’ve been following Standards-Based Grading (SBG) for several years now after first being introduced to the concept by colleague John Burk (@occam98).  Thanks, John!

I finally made the dive into SBG with my Summer School Algebra 2 class this past June & July, and I’ve fully committed to an SBG pilot for my AP Statistics classes this year.

I found writing standards for Algebra 2 this summer relatively straightforward.  I’ve taught that content for decades now and know precisely what I want my students to understand.  I needed some practice writing standards and got better as the summer class progressed.  Over time, I’ve read several teachers’ versions of standards for various courses.  But writing standards for my statistics class prove MUCH more challenging.  In the end, I found myself guided by three major philosophies.

1. The elegance and challenge of well designed Enduring Understandings from the Understanding by Design (UbD) work of Jay McTighe the late Grant Wiggins helped me craft many of my standards as targets for student learning that didn’t necessarily reveal everything all at once.
2. The power of writing student-centered “I can …” statements that I learned through my colleague Jill Gough (@jgough) has become very important in my classroom design.  I’ve become much more focused on what I want my students (“learners” in Jill’s parlance) to be able to accomplish and less about what I’m trying to deliver.  This recentering of my teaching awareness has been good for my continuing professional development and was a prime motivator in writing these Standards.
3. I struggled throughout the creation of my first AP Statistics standards document to find a balance between too few very broad high-level conceptual claims and a far-too-granular long list of skill minutiae.  I wanted more than a narrow checklist of tiny skills and less than overloaded individual standards that are difficult for students to satisfy.  I want a challenging, but reachable bar.

So, following is my first attempt at Standards for my AP Statistics class, and I’ll be using them this year.  In sharing this, I have two hopes:

• Maybe some teacher out there might find some use in my Standards.
• More importantly, I’d LOVE some feedback from anyone on this work.  It feels much too long to me, but I wonder if it is really too much or too little.  Have I left something out?

At some point, all work needs a public airing to improve.  That time for me is now.  Thank you in advance on behalf of my students for any feedback.

## Chemistry, CAS, and Balancing Equations

Here’ s a cool application of linear equations I first encountered about 20 years ago working with chemistry colleague Penney Sconzo at my former school in Atlanta, GA.  Many students struggle early in their first chemistry classes with balancing equations.  Thinking about these as generalized systems of linear equations gives a universal approach to balancing chemical equations, including ionic equations.

This idea makes a brilliant connection if you teach algebra 2 students concurrently enrolled in chemistry, or vice versa.

FROM CHEMISTRY TO ALGEBRA

Consider burning ethanol.  The chemical combination of ethanol and oxygen, creating carbon dioxide and water:

$C_2H_6O+3O_2 \longrightarrow 2CO_2+3H_2O$     (1)

But what if you didn’t know that 1 molecule of ethanol combined with 3 molecules of oxygen gas to create 2 molecules of carbon dioxide and 3 molecules of water?  This specific set coefficients (or multiples of the set) exist for this reaction because of the Law of Conservation of Matter.  While elements may rearrange in a chemical reaction, they do not become something else.  So how do you determine the unknown coefficients of a generic chemical reaction?

Using the ethanol example, assume you started with

$wC_2H_6O+xO_2 \longrightarrow yCO_2+zH_2O$     (2)

for some unknown values of w, x, y, and z.  Conservation of Matter guarantees that the amount of carbon, hydrogen, and oxygen are the same before and after the reaction.  Tallying the amount of each element on each side of the equation gives three linear equations:

Carbon:  $2w=y$
Hydrogen:  $6w=2z$
Oxygen:  $w+2x=2y+z$

where the coefficients come from the subscripts within the compound notations.  As one example, the carbon subscript in ethanol ( $C_2H_6O$ ) is 2, indicating two carbon atoms in each ethanol molecule.  There must have been 2w carbon atoms in the w ethanol molecules.

This system of 3 equations in 4 variables won’t have a unique solution, but let’s see what my Nspire CAS says.  (NOTE:  On the TI-Nspire, you can solve for any one of the four variables.  Because the presence of more variables than equations makes the solution non-unique, some results may appear cleaner than others.  For me, w was more complicated than z, so I chose to use the z solution.)

All three equations have y in the numerator and denominators of 2.  The presence of the y indicates the expected non-unique solution.  But it also gives me the freedom to select any convenient value of y I want to use.  I’ll pick $y=2$ to simplify the fractions.  Plugging in gives me values for the other coefficients.

Substituting these into (2) above gives the original equation (1).

VARIABILITY EXISTS

Traditionally, chemists write these equations with the lowest possible natural number coefficients, but thinking of them as systems of linear equations makes another reality obvious.  If 1 molecule of ethanol combines with 3 molecules of hydrogen gas to make 2 molecules of carbon dioxide and 3 molecules of water, surely 10 molecule of ethanol combines with 30 molecules of hydrogen gas to make 20 molecules of carbon dioxide and 30 molecules of water (the result of substituting $y=20$ instead of the $y=2$ used above).

You could even let $y=1$ to get $z=\frac{3}{2}$, $w=\frac{1}{2}$, and $x=\frac{3}{2}$.  Shifting units, this could mean a half-mole of ethanol and 1.5 moles of hydrogen make a mole of carbon dioxide and 1.5 moles of water.  The point is, the ratios are constant.  A good lesson.

ANOTHER QUICK EXAMPLE:

Now let’s try a harder one to balance:  Reacting carbon monoxide and hydrogen gas to create octane and water.

$wCO + xH_2 \longrightarrow y C_8 H_{18} + z H_2 O$

Setting up equations for each element gives

Carbon:  $w=8y$
Oxygen:  $w=z$
Hydrogen:  $2x=18y+2z$

I could simplify the hydrogen equation, but that’s not required.  Solving this system of equations gives

Nice.  No fractions this time.  Using $y=1$ gives $w=8$, $x=17$, and $z=8$, or

$8CO + 17H_2 \longrightarrow C_8 H_{18} + 8H_2 O$

Simple.

EXTENSIONS TO IONIC EQUATIONS:

Now let’s balance an ionic equation with unknown coefficients a, b, c, d, e, and f:

$a Ba^{2+} + b OH^- + c H^- + d PO_4^{3-} \longrightarrow eH_2O + fBa_3(PO_4)_2$

In addition to writing equations for barium, oxygen, hydrogen, and phosphorus, Conservation of Charge allows me to write one more equation to reflect the balancing of charge in the reaction.

Barium:  $a = 3f$
Oxygen:  $b +4d = e+8f$
Hydrogen:  $b+c=2e$
Phosphorus:  $d=2f$
CHARGE (+/-):  $2a-b-c-3d=0$

Solving the system gives

Now that’s a curious result.  I’ll deal with the zeros in a moment.  Letting $d=2$ gives $f=1$ and $a=3$, indicating that 3 molecules of ionic barium combine with 2 molecules of ionic phosphate to create a single uncharged molecule of barium phosphate precipitate.

The zeros here indicate the presence of “spectator ions”.  Basically, the hydroxide and hydrogen ions on the left are in equal measure to the liquid water molecule on the right.  Since they are in equal measure, one solution is

$3Ba^{2+}+6OH^- +6H^-+2PO_4^{3-} \longrightarrow 6H_2O + Ba_3(PO_4)_2$

CONCLUSION:

You still need to understand chemistry and algebra to interpret the results, but combining algebra (and especially a CAS) makes it much easier to balance chemical equations and ionic chemical equations, particularly those with non-trivial solutions not easily found by inspection.

The minor connection between science (chemistry) and math (algebra) is nice.

As many others have noted, CAS enables you to keep your mind on the problem while avoiding getting lost in the algebra.


# Simplifying compound fraction: $\frac{3}{\sqrt{5}/5}$

I'm trying to simplify the following:

$$\frac{3}{\ \frac{\sqrt{5}}{5} \ }.$$

I know it is a very simple question but I am stuck. I followed through some instructions on Wolfram which suggests that I multiply the numerator by the reciprocal of the denominator.

The problem is I interpreted that as:

$$\frac{3}{\ \frac{\sqrt{5}}{5} \ } \times \frac{5}{\sqrt{5}},$$

Which I believe is:

$$\frac{15}{\ \frac{5}{5} \ } = \frac{15}{1}.$$

What am I doing wrong?

• You should multiply both numerator and denominator by that constant! – Mahdi Khosravi Jul 23 '13 at 9:50
• Or you can exchange the numerator and denominator of the whole denominator and move it to whole numerator! – Mahdi Khosravi Jul 23 '13 at 9:51
• I know this an old question, but if you had simply changed your √5/5 to a √5/√5, you would've got 3√5÷5/5 and gotten your answer. The whole point of multiplying a complex faction by a number to simplify it is to times it by 1 (√5/√5 in this case) because multiplying anything by 1 is the same thing. – Gᴇᴏᴍᴇᴛᴇʀ Sep 7 '14 at 19:44
• "The problem is I interpreted that as:" .... remember that the numerator is 3. – John Joy Jan 4 at 17:58

\begin{align*}\frac{3}{\frac{\sqrt{5}}{5}} &= 3 \cdot \frac{5}{\sqrt 5}\\ &= 3 \cdot \frac{5}{\sqrt 5} \cdot 1\\ &= 3 \cdot \frac{5}{\sqrt 5} \cdot \frac{\sqrt 5}{\sqrt 5}\\ &= 3 \cdot \frac{5\sqrt 5}{5}\\ &= 3\sqrt 5 \end{align*}

• I appreciate everyone's response but this answer is the most elaborate. Thanks blf, I see where I went wrong now! – Sam Jul 23 '13 at 10:00

You multiplied the original fraction by $\dfrac5{\sqrt5}$, which is not $1$, so of course you changed the value. The correct course of action is to multiply by $1$ in the form

$$\frac{5/\sqrt5}{5/\sqrt5}$$

to get

$$\frac3{\frac{\sqrt5}5}=\frac3{\frac{\sqrt5}5}\cdot\frac{\frac5{\sqrt5}}{\frac5{\sqrt5}}=\frac{3\cdot\frac5{\sqrt5}}1=3\cdot\frac5{\sqrt5}=3\sqrt5\;,$$

since $\dfrac5{\sqrt5}=\sqrt5$.

More generally,

$$\frac{a}{b/c}=\frac{a}{\frac{b}c}\cdot\frac{\frac{c}b}{\frac{c}b}=\frac{a\cdot\frac{c}b}1=a\cdot\frac{c}b\;,$$

this is the basis for the invert and multiply rule for dividing by a fraction.

This means $$3\cdot \frac{5}{\sqrt{5}}=3\cdot\frac{(\sqrt{5})^2}{\sqrt{5}} =3\sqrt{5}$$ You're multiplying twice for the reciprocal of the denominator.

Another way to see it is multiplying numerator and denominator by the same number: $$\frac{3}{\frac{\sqrt{5}}{5}}=\frac{3\sqrt{5}}{\frac{\sqrt{5}}{5}\cdot\sqrt{5}} =\frac{3\sqrt{5}}{1}$$

Start with $$\frac{3}{\sqrt{5}/5}=\frac{15}{\sqrt{5}},$$

and then rationalize the denominator (multiply both numerator and denominator by $\sqrt{5}$) to get

$$\frac{15\sqrt{5}}{5}=3\sqrt{5}.$$

You have the following fraction to simplify: \begin{align} \frac{3}{\sqrt{5}/5} &=\frac{5\times 3}{\sqrt{5}} \\ &=\frac{15}{\sqrt{5}} \\ &=\sqrt{\bigg(\frac{15}{\sqrt{5}}\bigg)^2} \\ &=\sqrt{\frac{15^2}{\sqrt{5}^2}} \\ &=\sqrt{\frac{225}{5}} \\ &=\sqrt{45} \\ &= \sqrt{9\times 5} \\ &= \sqrt{9}\sqrt{5} \\ &= 3\sqrt{5} \\ \therefore \frac{15}{\sqrt{5}}\times \frac{5}{\sqrt{5}} &=\frac{15}{\sqrt{5}}\times \frac{\big(\frac{15}{\sqrt{5}}\big)}{3} \\ &=\frac{15}{\sqrt{5}}\times \frac{15}{\sqrt{5}}\times \frac{1}{3} \\ &=\bigg(\frac{15}{\sqrt{5}}\bigg)^2 \times \frac{1}{3} \\ &=45\times \frac{1}{3} \\ &=\frac{45}{3} \\ &=15 \end{align}

One thing that helps me organize my thoughts, is to convert both numerator and denuminator to fractions as follows.

\begin{align} \frac{3}{\frac{5}{\sqrt{5}}}&=\frac{\frac{3}{1}}{\frac{5}{\sqrt{5}}}=\frac{\frac{3}{1}}{\frac{5}{\sqrt{5}}}\cdot\frac{\frac{\sqrt{5}}{5}}{\frac{\sqrt{5}}{5}}=\frac{\frac{3}{1}\cdot\frac{\sqrt{5}}{5}}{\frac{5}{\sqrt{5}}\cdot\frac{\sqrt{5}}{5}}=\frac{\frac{3}{1}\cdot\frac{\sqrt{5}}{5}}{1}=\frac{3}{1}\cdot\frac{\sqrt{5}}{5}=\text{etc.}\\ \end{align}

In the expression $$\frac{3}{\frac{\sqrt{5}}{5}}$$, to find the reciprocal of that expression's denominator, $$\frac{\sqrt{5}}{5}$$, simply swap its numerator and denominator.

Thus the reciprocal of $$\frac{\sqrt{5}}{5}$$ is $$\frac{5}{\sqrt{5}}$$, and $$\frac{3}{\frac{\sqrt{5}}{5}} = 3 \cdot \frac{5}{\sqrt{5}}$$

I think the result you have to remember is

$$\boxed{\dfrac 1{\sqrt{a}}=\dfrac{\sqrt{a}}a}$$

You will see this kind of manipulation very often in your studies, and it allows to get rid of square roots on denominator.

Here your expression is just $$\dfrac{3}{\frac{\sqrt{5}}{5}}=\dfrac{3}{\frac 1{\sqrt{5}}}=3\sqrt{5}$$


# Is There a Rigorous Proof Of 1 = 0.999…?

Yes.

First, we have not addressed what 0.999… actually means. So it’s best first to describe what on earth the notation $$b_0.b_1b_2b_3…$$ means. The way mathematicians define this thing is

$$b_0.b_1b_2b_3…=\sum_{n=0}^{+\infty}{\frac{b_n}{10^n}}$$

So, in particular, we have that

$$0.999…=\sum_{n=1}^{+\infty}{\frac{9}{10^n}}$$

But all of this doesn’t really make any sense until we define what the right-hand side means. There is an infinite sum there, but what does that mean? Well, we put

$$S_k=\sum_{n=1}^{k}{\frac{9}{10^n}} \ ,$$

then we have a finite sum. So, for example
$$S_1=0.9, \ ~S_2=0.99, \ ~S_3=0.999, \ etc.$$
So, in some way, we want to take the limit of this sequence.

Let’s consider a particularly simple sequence to illustrate the idea behind the definition of a limit of a sequence: 1/2, 1/3, 1/4,… The terms in this sequence get smaller and smaller. You might think that it’s obvious that it goes to 0, or that it’s obvious that a smart mathematician can prove that it goes to 0, but it’s not. It’s impossible to even attempt a proof until we have defined what it means for something to go to 0. So we have to define what the statement “1/2, 1/3, 1/4,… goes to 0” means before we can attempt to prove that it’s true.

This is the standard definition: “1/n goes to 0” means that “for every positive real number $\epsilon$, there’s a positive integer N, such that for all integers n such that $n\geq N$, we have $|1/n| < \epsilon$”. With this definition in place, it’s quite easy to prove that “1/n goes to 0” is a true statement. What I want you to see here, is that we chose this definition to make sure that this statement would be true. The first mathematicians who thought about how to define the limit of a sequence might have briefly considered definitions that make the statement “1/n goes to 0” false, but they would have dismissed those definitions as irrelevant because they fail to capture the idea of a limit that they already understood on an intuitive level.

So the real reason why 1/n goes to 0 is that we wanted it to! Similar comments hold for the sequence of partial sums that define 0.999… It goes to 1, because we have defined the concepts “0.999….”, “sum of infinitely many terms”, and “limit of a sequence” in ways that make 0.999…=1. Can we define number systems such that 1=0.999… does not hold? Of course! But these number systems are not as useful, because they don’t conform to our intuition about limits and numbers.

Now that we know what a limit and an infinite sum is, let me give a fully rigorous proof to the equality 1=0.999… This proof is due to Euler and it appears in the 1770’s edition of “Elements of algebra”.
We know that

$$0.999…=\sum_{n=1}^{+\infty}{ \frac{9}{10^n} } = \frac{9}{10} + \frac{9}{10^2} + \frac{9}{10^3} +…$$

This sum is a special kind of sum, namely, it’s a geometric sum. For (infinite) geometric sums, we can find its limit easily:

Let
$$x=\frac{1}{10}+\frac{1}{10^2}+\frac{1}{10^3}+…$$
Then
$$9x=0.999…$$

But, we also have $10x=1+\frac{1}{10}+\frac{1}{10^2}+…$, so $10x-x=1$.

This implies that $x=\frac{1}{9}$.

Hence,
$$0.999…=9x=1$$
Does this proof look familiar? It should! It is essentially the same as Proof #2 in the previous post. The only difference is that every step is now justified by operations with limits.

See this supportive article: https://www.physicsforums.com/insights/why-do-people-say-that-1-and-999-are-equal/

The following forum members have contributed to this FAQ:
AlephZero
Fredrik
micromass
tiny-tim
vela

To forum post

Tags:
102 replies
1. nuuskur says:

It should be unanimous that 1 – 0.9(9) = 0.0(0) = 0. Assume the opposite, then 0.0(0) != 0, contradiction.

Too much java, my TeX is rusty :D

2. Mark44 says:

[QUOTE=”alva, post: 5215165, member: 497526″]
But my reasoning is similar to the OP. He is taking more addends in one series than in the other.[/QUOTE]

[QUOTE=”weirdoguy, post: 5215170, member: 464738″]No it’s not, because he’s using infinite series, and you are using finite series. It is a big difference.[/QUOTE]
In addition, [USER=497526]@alva[/USER], you don’t seem to realize that 0.99 and 0.99… mean completely different things. The first number has two decimal digits that are shown explicitly, and an implied infinite number of zeroes that follow it. The second number has an infinite number of 9’s following the decimal point.

We are NOT saying that 1 = 0.99. We ARE saying that 1 = 0.99…, and the proof is given in the OP.

Also, 0.99… and 0.999… are exactly the same, while 0.99 and 0.999 are different.

3. micromass says:

[QUOTE=”alva, post: 5215165, member: 497526″]
But my reasoning is similar to the OP. He is taking more addends in one series than in the other.[/QUOTE]

No, in both cases, the number of addends is infinite. The only difference is that the series in the OP is convergent, while yours are divergent.

4. alva says:

[QUOTE=”HomogenousCow, post: 5215156, member: 435628″]Here you’ve just made some bizarre arguments and obvious arithmetic mistakes.[/QUOTE]
Please, let me know what are “my arithmetic mistakes”.

5. weirdoguy says:

No it’s not, because he’s using infinite series, and you are using finite series. It is a big difference.

6. alva says:

[QUOTE=”HomogenousCow, post: 5215152, member: 435628″]You can’t manipulate divergent series that way, also you forgot the negative signs at the end.[/QUOTE]
You’re right and I apologize for the mistake in the signs.
Moreover where I said “my age” I meant “my age from Jesus’s birth.

But my reasoning is similar to the OP. He is taking more addends in one series than in the other.

7. weirdoguy says:

[QUOTE=”alva, post: 5215133, member: 497526″]and never 0.99999… = 1[/QUOTE]

Your “proof” is just plain wrong. Just deal with the fact that 0,(9)=1.

8. HomogenousCow says:

[QUOTE=”alva, post: 5215133, member: 497526″]Let x= 1/10 +1/100 + …

Lets take just 2 addends, x=0.11

Then 9x = 0.99

But, we also have 10x = 1 + 1/10 = 1.1, so 10x – x =0.11

Hence 0.99 = 9x = 0.99

You can use 3 addends and get 0.999 = 9x = 0,999

And 4 addends and 5, and calculate the limit when n -> infinite and never 0.99999… = 1[/QUOTE]

Here you’ve just made some bizarre arguments and obvious arithmetic mistakes.

9. HomogenousCow says:

[QUOTE=”alva, post: 5215141, member: 497526″]I was born in 1950 and my brother in 1952.

In many years my age will be 1950 + 1 + 1 +1 +1 ….

In many years my brothers age will be 1952 +1 + 1 +1 ….

So the difference will be 1952 +( 1 + 1 +1+ …) – 1950 – ( 1 +1 +1+1+…) = 1952 + (1 +1 +1 +…) – 1950 +2 + (1 +1 +1..) = 0[/QUOTE]

You can’t manipulate divergent series that way, also you forgot the negative signs at the end.

10. alva says:

I was born in 1950 and my brother in 1952.

In many years my age will be 1950 + 1 + 1 +1 +1 ….

In many years my brothers age will be 1952 +1 + 1 +1 ….

So the difference will be 1952 +( 1 + 1 +1+ …) – 1950 – ( 1 +1 +1+1+…) = 1952 + (1 +1 +1 +…) – 1950 +2 + (1 +1 +1..) = 0

11. alva says:

Let x= 1/10 +1/100 + …

Lets take just 2 addends, x=0.11

Then 9x = 0.99

But, we also have 10x = 1 + 1/10 = 1.1, so 10x – x =0.11

Hence 0.99 = 9x = 0.99

You can use 3 addends and get 0.999 = 9x = 0,999

And 4 addends and 5, and calculate the limit when n -> infinite and never 0.99999… = 1

12. Mark44 says:

[QUOTE=”alva, post: 5215060, member: 497526″]Let

x=110+1102+1103+…

Then
9x=0.999…
But, we also have 10x=1+110+1102+…, so 10x−x=1.

This implies that x=19.
[/quote]None of the above makes any sense. In your definition of x, its value is at least 2300. How can 9x be 0.999…?
[QUOTE=alva]

Hence,

0.999…=9x=1

**********************************************************
Im sorry but Im trying to copy/paste the OP message but the format is not preserved
**********************************************************

Lets do the proof with n=2 for ALL the equations

Let x = 1/10 + 1/100 = 0.11

Then 9x = 0.99

But, we also have 10x = 1 + 1/10 = 1.1 so 10x-x =0.11

Hence
0.99 = 9x = 0.99 !!! yes
[/quote]Of course. If x = .11, then ordinary arithmetic can be used to show that 9x = .99. So what?
[QUOTE=alva]

And, as anyone can see, you can repeat the proof for n=3,4… and using limits, when n->infinite, the result is clear, 1 is not = 0.999999…[/QUOTE]

13. micromass says:

[QUOTE=”gill1109, post: 5214887, member: 401042″]Yes you are right. However the surreals do include numbers (lots and lots of them!) which are strictly between all of 0.99999…9 (any number of repetitions) and 1.[/QUOTE]

That depends how many repetitions of ##9## you take in ##0.999…##. If you take countably many, then sure. But if you index over all ordinals, then no.

14. gill1109 says:

[QUOTE=”micromass, post: 5214863, member: 205308″]Whether ##1=0.9999…## in the surreals depends highly on the definitions for ##0.9999…##. Some definitions make it equal, others don’t.[/QUOTE]
Yes you are right. However the surreals do include numbers (lots and lots of them!) which are strictly between all of 0.99999…9 (any number of repetitions) and 1.

15. micromass says:

[QUOTE=”gill1109, post: 5214572, member: 401042″]Here is a number system in which 1 is not equal to 0.9999…. and it moreover is rather useful in game theory, and some people even imagine it might be useful sometime in the future, in physics: J H Conway’s “surreal numbers”. [URL]https://en.wikipedia.org/wiki/Surreal_number[/URL][/QUOTE]

Whether ##1=0.9999…## in the surreals depends highly on the definitions for ##0.9999…##. Some definitions make it equal, others don’t.

16. Hornbein says:

[QUOTE=”micromass, post: 5214231, member: 205308″]micromass submitted a new PF Insights post

[URL=’https://www.physicsforums.com/insights/is-there-a-rigorous-proof-of-1-0-999/’]Is There a Rigorous Proof Of 1 = 0.999…?[/URL]

[URL=’https://www.physicsforums.com/insights/is-there-a-rigorous-proof-of-1-0-999/’]Continue reading the Original PF Insights Post.[/URL][/QUOTE]

I suggest 1 – 0.9999… = 0.0000….

17. KSG4592 says:

Always find these fascinating, even if most of it goes over my head at this point.

18. Pro7 says:

the question which is obvious is….how far is 0.999… away from 1?…since the answer is very close to 0 as it never ends…therefore 0.999… tends to 1.

19. Ilja says:

I have a nice childhood memory about this. My school teacher had not checked this, and had the nice idea to write, instead of an open interval [0,1) a closed interval [0.0.9999…]. I had heard somewhere that 1=0.999…, so I simply said this. The teacher, and the whole class, disagreed. So a discussion started, and I had to think about how to prove it. What I invented was that 1/9 = 0.1111…, 8/9 = 0.8888…, but when we add 0.1111… to 0.88888… we will clearly get 0.9999…. On the other side, 1/9+8/9 = 9/9 = 1.

The next day it became clear that I was right. Some guys have looked into some books.

The better proof is to compute 9*0.9999… = 10* 0.9999… – 0.9999… = 9.999999..-0.99999… = 9.

20. Anton Alice says:

I think there is a problem with the step, where you take 10x-x =1.
Applying operations on infinite sums has been considered dangerous, as far as I know.

21. terryds says:

Here is the ‘silly’ proof. 0.999… = 0.333…+0.666… = 1/3 + 2/3 = 3/3 = 1

22. H_A_Landman says:

You have to be careful, because Cantor’s hierarchy of trans-finite numbers doesn’t exist in the Surreal Numbers. For example,one might be tempted to identify Conway’s $\omega = {0,1,2,…|}$ with Cantor’s $\aleph_0$, since they are both intuitively “the infinity of the integers”. But in Cantor’s system, $\aleph_0$ is the smallest (positive) infinite number, whereas in Conway’s there does not exist any such smallest infinity since we also have $\omega-1$, $\omega/2$, $\sqrt{\omega}$, etc. Conversely, in Cantor’s system there is no largest infinity, but in Conway’s there is (On).

23. DMartin says:

I said:"I think there can be contradictions in mathematics"You said:"So you think 1+1=3  is valid and can be proven? Because that is equivalent to what you just said."I don't think I need to comment on this, it's so ridiculous that it speaks for itself.

24. DMartin says:

I prefer to keep it in degrees throughout, and although you can subtract the 89, I won't. To explain it, it's another series of numbers that suggest something, but somewhat different from the other. It suggests that for any number like 89.99999, there's another number between it and 90, arrived at via x/(sine x). You can then add more 9s, and it still applies. However many 9s you add, this rule applies, so it seems very reasonable to say that it applies to 89.99999…….. as well. That means there's at least one number between 89.9999….. and 90.Now because as I mentioned, infinities can be compared, this seems to reveal the existence of an infinity greater than the first one, or at least, a number or set of numbers that goes numerically higher. Certainly worth thinking about, but as I said, I think there can be contradictions in mathematics, so it's not an attempt to disprove your proof of 0.9999…. = 1.

25. DMartin says:

I do believe in mathematics, but I just take a different view of it than you do. Gödel's work meant that many others saw the edges of it, from the 1930s on, so my view isn't a controversial one.

26. DMartin says:

I never said it wasn't useful! It's very useful. And it doesn't matter that it's a bit rough round the edges either.

27. DMartin says:

Incidentally, and I'm not going to get into discussion about this, if one should show that there's always a number between 0.9999…. and 1, that might suggest that they're different. Well I can show that there's always a number in between 89.9999…… and 90. It's the expression x/(sine x) again, it always gives a number nearer 90, however many 9s there are.Now I should make my position clear – I'm not arguing that your proof of 0.9999…. = 1 is false. I think mathematics is not a consistent system, and that it gets a bit rough round the edges, that's all. Perhaps I've shown that a bit.

28. DMartin says:

You seem to think we should define things first, and then do our exploring. But sometimes the exploring helps to inform the definitions, and this is how mathematics has actually developed. This means one can point out a mathematical structure without necessarily having a rigorous definition. But a definition I've given for the relevant number, whether a loose one, and whether or not it fits with your definitions, is an angle x between 0 and 90 degrees such that x/(sin x) = exactly 180/π.

29. DMartin says:

By the way, I did say, but probably should have emphasised more, that what applies to one pair of numbers doesn't necessarily apply to the other. There are things that happen at or near 0 that don't happen elsewhere. But this is surely relevant, nonetheless! Thanks for the discussion.

30. DMartin says:

I never said it was a proof, surely even you noticed that. I said it was relevant, and that the context can make a difference. The point that the context makes a difference is borne out by micromass above saying about the context of surreal numbers:"Whether 1=0.9999…  in the surreals depends highly on the definitions for 0.9999… . Some definitions make it equal, others don't."So it's relevant to point out a sequence relating to the second pair of numbers I mentioned, in which there is a distinction between the two of them, because one infinite sequence lands somewhere different from the other.Incidentally, there have been distinctions drawn between different infinities, and it has turned out that they can be compared, and one infinity can turn out to be 'larger' than another. This might intuitively seem impossible, but ways to compare them were found. There is some loose similarity between that and what I've done.

31. DMartin says:

That's what one would expect it to be. I've shown that the second pair isn't just 0 and 0.

32. DMartin says:

Well, there's a symmetry to be pointed out. First, you have 0.9999….. and 1, and these two numbers look the same, or almost the same. People discuss whether they're the same, and whether there's a proof that they are.Then, if you subtract 0.9999….. from 1, you find another pair of numbers – that is, the result of the subtraction, and zero. This pair of numbers can be called 1 – 0.9999…. , and 0.And there's a symmetry between these two pairs of numbers. Each pair may well be in the same relationship, whatever that is. So anything shedding a bit of light on either pair might be relevant. And showing the second pair to be different from each other is relevant.

33. DMartin says:

Yes I knew it was 1 radian."This is by definition, not up for debate". This implies that all our definitions are, by definition, correct.What you learned in primary school may or may not be true. But I have said that the context makes a difference sometimes.But the question of comparing a whole number, or a non-negative integer, and another nearby number that approaches it with an infinite series, is not always a clear cut question. And what I've set out has bearing on it, because I've show the two looking different, and looking existent.Don't forget that we learn as we go, the mathematical structures we have are not just a given eternal structure, they were put together bit by bit by finding things, and what we have is, as always, incomplete.

34. DMartin says:

Sorry, our posts crossed. Yes, I know you think that whether or not a number exists is related to whether or not one can specify the positions of the digits. But the mathematical structure I've shown above hints at a relevant structure that is uncovered, and exists in some way other than just conforming to a made up set of rules.

35. DMartin says:

Putting in 0.0001, I get x/(sin x) = 57.295779513111409697664737311509try putting in 0.0000001then 0.00000000000000001.the result will approach 180/[pi], and to me this shows something that is discovered, rather than invented, and has bearing on the similar questions we've been looking at.

36. DMartin says:

" 0.999999… exists because every digit in the decimal representation can be specified. If you ask, "what digit is in the 12th place?" Answer: 9. If you ask, "what digit is in the 59th place?" Answer: 9. If you ask, "what digit is in the 623rd place?" Answer: 9. No matter what specific digit you ask about, the answer is always "9". "That's true, and you believe that it's significant.

37. DMartin says:

See posts above. There's a series of increasingly small angles near zero degrees that approach a number at infinity, but that number is above zero. It's clear that this number gives x/(sin x) = 180/π, because the values approach that number. Whether or not any other values give 180/π makes no difference, but it's interesting to hear it.

38. DMartin says:

Well, it's a matter of taste to some extent. You say you can prove that within a particular artificial system, a number 0.99999999…. exists, but 1 minus that number, or 0.00000….0001 doesn't exist. And yet I've shown that the second number can be expressed as an angle between zero and 90 degrees.This has bearing on the question of whether mathematics is invented or discovered. Are we inventing the rules, or discovering them. When I look at the points above about the digit 1 in my number, I think there's a bit too much inventing going on.

39. DMartin says:

If you say that one number exists and another doesn't, you need to say what you mean by exists. If you mean exists within mathematics, Gödel showed that mathematics isn't necessarily a self-consistent system, so existing within mathematics isn't necessarily a meaningful concept.If you're not keen on how my number is expressed, perhaps you'd prefer it if I said:an angle θ such that θ/(sin θ) = exactly 180/π. I can prove that this angle is not zero, because θ = 0 gives a different result.

40. DMartin says:

I don't know what you mean by existence, when you say you can prove the existence of your number. But it seems clear enough that if we can talk about numbers with an infinite number of decimal places that all make a difference, then my number and yours are very similar. And my number and yours add up to one, which gives them more common ground.About the position of the 1 in my number, out of all those 9s of yours, there must be one that corresponds to my 1. So whatever problems I have with my number (and God knows it's hard to keep them all in line), you must have the same problems with yours.

41. DMartin says:

So you have a rule that 'each numerical digit must have it's concrete position'. I suppose you know the positions of all the 9s in 0.99999….. then. But even if you argued that their positions are more concrete than the 1 in the number I used, it's not clear where the rule came from.what I've shown is a series that converges on, or approaches, a number at infinity, and the point is, whatever the existence status of that number at infinity, it isn't zero. And surely whatever its existence status, it's similar to the existence status of the numbers you're talking about.

42. DMartin says:

Well, that may be so, but this thread is a discussion on the basis that such numbers are worth talking about, so we're assuming they have some meaning before we start. If you say 'there is no such number', then presumably you think this whole thread is pointless.

43. DMartin says:

I can show that whatever the meaning of the number 0.0000000 => 00001, with an infinite number of zeros, it is different from 0. This means that other similar numbers are probably the same, though it does depend on the context. The method involves showing that the two numbers 0.0000000 => 00001 and 0 give completely different output numbers when put into an equation.To show that 0.0000000 => 00001 does not equal 0.Take the equation θ/(sin θ) , where θ is an angle in degrees.For θ = 0.0000000 => 00001, it gives θ/(sin θ) = 180/π = 57.295779513082320876798154814105this is known because a series of increasingly small angles such as 0.0001, 0.0000000001, 0.0000000000000001 etc.give numbers that approach 180/π.But for θ = 0, it gives θ/(sin θ) = 0Therefore 0.0000000 => 00001 does not equal 0.Any thoughts would be appreciated, thanks.

44. alva says:

Letx=110+1102+1103+…Then9x=0.999…But, we also have 10x=1+110+1102+…, so 10x−x=1.This implies that x=19.Hence,0.999…=9x=1

45. WWGD says:

You can also use, though not as nice,  the perspective of the Reals as a metric space, together with the Archimedean Principle:  then d(x,y)=0 iff x=y. Let then ## x=1 , y=0.9999….  ##Then ##d(x,y)=|x-y| ## can be made indefinitely small ( by going farther along the string of 9's ), forcing ## |x-y|=0## , forcing  ##x=y ##. More formally, for any ##\epsilon >0 ##, we can make ##|x-y|< \epsilon ##

46. gill1109 says:

Here is a number system in which 1 is not equal to 0.9999…. and it moreover is rather useful in game theory, and some people even imagine it might be useful sometime in the future, in physics: J H Conway's "surreal numbers". https://en.wikipedia.org/wiki/Surreal_number

47. Josh Meyer says:

Nice!The informal proof I always share with people is that 1/9=0.111…,  2/9=0.222…, 3/9=0.333…, and so on until 9/9=0.999…=1


The Integral

1. Jun 27, 2007

anantchowdhary

Is there a mathematical proof that can prove that the integral is the antiderivative?

2. Jun 27, 2007

Staff: Mentor

fundamental theorem of calculus

Look up the fundamental theorem of calculus.

3. Jun 27, 2007

anantchowdhary

umm...ive tried to study it....but my question is a little different....i meant to say..

if we take out the area of the graph of a function f(x) bound at certain limits, then..is there any way to prove that the indefinite integral gives us the antiderivative of the function

or rather..the area bound under two limits of the function is simply the limits applied to the antiderivative of the function

4. Jun 27, 2007

Kummer

Given an integrable function $$f:[a,b]\mapsto \mathbb{R}$$ we define,
$$g(x) = \int_a^x f(t) dt$$ for all $$t\in [a,b]$$.
Then, $$g$$ is a continous function on $$[a,b]$$. And furthermore if $$f$$ is continous at $$t_0 \in (a,b)$$ then $$g$$ is differentiable at $$t_0$$ with $$g'(x_0)=f(x_0)$$

5. Jun 27, 2007

mathwonk

suppose f is aN INCREASING CONTINUOUS FUNCTION. then the area under the graph between x and x+h is between f(x)h and f(x+h)h,

i.e.f(x)h < A(x+h)-A(x) < f(x+h)h.

satisfy yourself of this by drawing a picture.

now the derivative of that area function is the limit of [A(x+h)-A(x)]/h, as h goes to zero.

by the inequality above, this limit iscaught b etween f(x) and f(x+h), for all h, which emans, since f is continuious, it equals f(x). i.e. dA/dx= f(x).

now in creasing is not n eeded ubt makes it easier.

6. Jun 27, 2007

anantchowdhary

thanks..ill give it a thought

7. Jun 28, 2007

HallsofIvy

Staff Emeritus
A little more generally- assume f(x)> 0 for a< x< b. For any number n, divide the interval from a to b into n equal sub-intervals (each of length (b-a)/n)). Construct on each a rectangle having height equal to the minimum value of f on the interval- that is, each rectangle is completely "below" the graph. Let An be the total area of those rectangles. Since each rectangle is contained in the region below the graph of f, it is obvious that $A_n \le A$ where A is the area of that region (the "area below the graph").

Now do exactly the same thing except taking the height to be the maximum value of f in each interval. Now, the top of each interval is above the graph of f so the region under f is completely contained in the union of all the rectangles. Taking An to be the total area of all those rectangles, we must have $A \le A^n$.

That is, for all n, $A_n \le A \le A^n$

If f HAS an integral (if f is integrable) then, by definition, the limits of An and An must be the same- and equal to the integral of f from a to b. Since A is always "trapped" between those two values, the two limits must be equal to A: The area is equal to the integral of f from a to b.

That's pretty much the proof given in any Calculus book.

8. Jun 28, 2007

Gib Z

"is there any way to prove that the indefinite integral gives us the antiderivative of the function"

I seemed to understand this as - ' is there any way to prove F(x), where F'(x)=f(x), is the same function as the function given by $$\int f(x) dx$$.' The fundamental theorem of Calculus shows when we put upper and lower bounds, b and a, on the integral, it results in F(b) - F(a), however to the specific question as I understood, the dropping of bounds is just a nice notation for the integral/antiderivatve function.

9. Jun 28, 2007

anantchowdhary

umm...i tried this out..i Followed pretty much of it

but how do we prove that dA/dx=f(x)?

thanks

10. Jun 28, 2007

mathwonk

notice the proof i gave for the increasing case, which is due to newtton, does not need the deep theorem that a continuous function always has a max and a min on a closed bounded interval.

it also covers (when used piecewise) all polynomials, con tinuous rational functions, and continuous trig functions, that occur in practice. hence there is

no reason for books to omit this proof or banish it to an appendix.

11. Jun 28, 2007

HallsofIvy

Staff Emeritus
Define F(x) to be
$$\int_a^x f(t)dt$$
For f(x)> 0 we can interpret that as the area between the graph y= f(x) and the x-axis, from a to the fixed value x. Then F(x+h) is
$$\int a^{x+h}f(t)dt$$
the area between the graph y= f(x) and x-axis, from a to the fixed value x+h.

Now F(x+h)- F(x) is the area between the graph y= f(x), between x and x+h. It's not difficult to see that is equal to the area of the rectangle with base x to x+h and height f(x*) where x* is some value between x and x+h: That is F(x+h)- F(x)= hf(x*). Then
$$\frac{F(x+h)- F(x)}{h}= f(x^*)$$
Taking the limit as h goes to 0 forces x*, which is always between x and x+h, to go to x.
Therefore
$$\frac{dF}{dx}= \lim_{h\rightarrow 0} \frac{F(x+h)- F(x)}{h}= f(x)$$

12. Jun 28, 2007

mathwonk

let me combine halls discussion with mine in post 5.

he has shown, modulo the theorem that max and min exist,

that in my notation, if m(h) is the min of f on the interval [x,x+h], and if M(h) is the max,

that m(h)h < A(x+h)-A(x) < M(h)h.

where < means less than or equal.

Then again if we compute the derivative of A as the limit of
[A(x+h)-A(x)]/h

as h goes to 0, we see by the inequalities that [A(x+h)-A(x)]/h
is squeezed between

M(h) and m(h) for all h. since f is continuous, these numbers both apprioach f(x), so lim [A(x+h)-A(x)]/h
= dA/dx = f(x).

13. Jun 28, 2007

mathwonk

to prove the point halls says is "not difficult to see", uses the intermediate value theorem, in case you do not see it.

Last edited: Jun 28, 2007
14. Jun 28, 2007

anantchowdhary

thanks a lot for the proof!

15. Jun 29, 2007

HallsofIvy

Staff Emeritus
"It is easy to see ..." means "I think there is a proof but I can't remember it just now".

"Obvious to the most casual observer" means "I hope no one asks me to prove it"!

16. Jun 29, 2007

HallsofIvy

Staff Emeritus
"It is easy to see ..." means "I think there is a proof but I can't remember it just now".

"Obvious to the most casual observer" means "I hope no one asks me to prove it"!

17. Jul 2, 2007

ssd

This is a beauty..... incomplete though. I believe,for a student new to calculus, it is enough to remove all mental barriers about the fact whether an integral is anti-derivative.

18. Jul 2, 2007

jambaugh

Technically the indefinite integral is defined to be the anti-derivative (or rather a variable anti-derivative depending on an arbitrary constant since "the" anti-derivative is not unique.)

The definite integral is a value rather than a function so you can't call it an anti-derivative.

That technical nit picking aside see your undergraduate calculus text and the two forms of the FTC.


# We square an integral, but why change a variable?

If we square an integral, we also change the integration variable in one of the integrals. But why is this actually correct?

For example, say I have the following:

Solve $\int_{-\infty}^\infty e^{-x^2} dx$. Let $I=\int_{-\infty}^\infty e^{-x^2} dx$, so
\begin{align} I^2 &=\bigg(\int_{-\infty}^\infty e^{-x^2} dx\bigg)^2\\ &= \bigg(\int_{-\infty}^\infty e^{-x^2} dx\bigg) \times \bigg( \underbrace{ \int_{-\infty}^{\infty} e^{-y^2}dy }_{\text{Why}?} \bigg) \\ &=\int_{-\infty}^\infty\bigg(\int_{-\infty}^\infty e^{-(x^2+y^2)} dx\bigg)dy \end{align}

But why is the following wrong: \begin{align} I^2 &=\bigg(\int_{-\infty}^\infty e^{-x^2} dx\bigg)^2\\ &= \bigg(\int_{-\infty}^\infty e^{-x^2} dx\bigg) \times \bigg(\int_{-\infty}^{\infty} e^{-x^2}dx\bigg) \\ &=\int_{-\infty}^\infty\bigg(\int_{-\infty}^\infty e^{-x^2-x^2} dx\bigg)dx \\ &=\int_{-\infty}^\infty\bigg(\int_{-\infty}^\infty e^{-2x^2} dx\bigg)dx \qquad ? \end{align}

• By definition $\int_{a}^b f(x)dx=\int_{a}^b f(y)dy$. For your second approach, no such rule for integrals exists. It abuses notation as you need $dx,dy$ to distinguish your variables when you rewrite the integrals in iterated form. – Alex R. Feb 26 '18 at 20:10
• The second-to-last equality is wrong. It is not true that $$\bigg(\int_{-\infty}^\infty e^{-x^2} dx\bigg) \times \bigg(\int_{-\infty}^{\infty} e^{-x^2}dx\bigg) =\int_{-\infty}^\infty\bigg(\int_{-\infty}^\infty e^{-x^2-x^2} dx\bigg)dx.$$ Indeed, the inner integral on the RHS $$\left(\int_{-\infty}^{\infty} e^{-2x^2}\ dx\right)$$ is equal to some positive constant, let's call it $c$. The outer integral is integrating the constant value $c$, from $-\infty$ to $\infty$, so the result is $\infty$. On the other hand, the two factors on the LHS are finite, hence their product is finite. – Bungo Feb 26 '18 at 20:16
• It is a dummy variable. – hamam_Abdallah Feb 26 '18 at 20:25

The short answer is that in your second to last identity you are neglecting cross terms in your multiplication.

A simple example may be used to demonstrate the error, and we will use a strict summation instead of an integration for clarity. Consider the sum $$\sum_{x=1}^3 x = 1 + 2 +3 = 6.$$ Now, squaring the summation yields \begin{align} \left(\sum_{x=1}^3x\right)^2 &= (1+2+3)^2 = (1+2+3)\times(1+2+3) \end{align} In order to properly calculate this quantity (long-hand) requires one to completely distribute including cross terms: \begin{align} &\ {\color{white}+}\ 1\times 1 + 1\times 2 + 1\times 3 \notag \\ (1+2+3)\times(1+2+3) =& +2\times 1 + 2\times 2 + 2\times 3 = 36. \notag \\ & + 3\times 1 + 3\times 2 + 3\times 3 \end{align} However, if the cross terms were neglected one would obtain $$(1+2+3)\times(1+2+3) \ne (1^2+2^2+3^2) = 1\times 1 + 2\times 2 + 3\times 3 = 14.$$ Written another way, we conclude that $$\left(\sum_{x=1}^3x\right)^2 = \left(\sum_{x=1}^3x\right)\left(\sum_{x=1}^3x\right) \ne \sum_{x=1}^3x^2.$$ However, as noted in the comments, the $x$ in the summation (or the in the definite integral) is just a dummy variable, and may be replaced with another symbol, such as $y$: $$\left(\sum_{x=1}^3x\right)^2 = \left(\sum_{x=1}^3x\right)\left(\sum_{y=1}^3y\right).$$ The reason for changing the dummy variable is that we may now say that the summation over $x$ and $y$ are independent, and so we may rearrange the summations: $$\left(\sum_{x=1}^3x\right)^2 = \left(\sum_{x=1}^3x\right)\left(\sum_{y=1}^3y\right) = \sum_{x=1}^3\sum_{y=1}^3x\times y.$$ Again, integration is just summation, and so the same fact holds true for integrals. Furthermore, it doesn't matter what the function inside the summation/integral is. Thus, we may write $$\left(\int_a^b f(x)\ dx\right)^2 = \left(\int_a^b f(x)\ dx\right)\left(\int_a^b f(y)\ dy\right) = \int_a^b\int_a^b f(x)\times f(y)\ dx\ dy.$$ Using $f(x)=e^{-x^2}$ results in your example problem.

Because changing the integrand's variable doesn't change the value of the integral:$$\int_{a}^{b}f(x)dx=\int_{a}^{b}f(y)dy$$the same argument holds for summation as following$$\sum_{n=a}^{b}k_n=\sum_{m=a}^{b}k_m$$also we know that$$\left(\sum_{n=a}^{b}k_n\right)^2=\left(k_a+...+k_b\right)^2=k_a^2+...+k_b^2+2k_ak_{a+1}+...+2k_{b-1}k_b$$and$$\sum_{n=a}^{b}k_n\sum_{m=a}^{b}k_m=(k_a+...+k_b)(k_a+...+k_b)$$which by expanding the terms and rearranging them leads to$$\left(\sum_{n=a}^{b}k_n\right)^2=\sum_{n=a}^{b}k_n\sum_{m=a}^{b}k_m$$since integral is intrinsicly a summation, this can be generalized to integral operator either.

I think the best way of visualizing what is happening intuitively is thinking in terms of programming.

If you make a program and you have two functions (in the programming sense) which do not interact, you can call "$x$" the variable in both functions. They are isolated.

However, if a function is supposed to handle two different variables independently in the same context, you cannot name them the same thing.

Formally and mathematically (and also changing notation from $\int f(x)dx$ to $\int f$ so that the point may become clearer), we have the following chain of equalities.

\begin{align*} \underline{\left(\int_{\mathbb{R}} x \mapsto e^{-x^2}\right)} \cdot \underline{\left(\int_{\mathbb{R}} x \mapsto e^{-x^2} \right)}&\stackrel{Linearity}=\left(\int_{\mathbb{R}} \underline{\left(\int_{\mathbb{R}} x \mapsto e^{-x^2}\right)}\left(x \mapsto e^{-x^2} \right)\right) \\ &\underset{\text{fctn mult.}}{\overset{\text{Def. of}}{=}} \int_{\mathbb{R}} x \mapsto \left(e^{-x^2} \underline{\left(\int_{\mathbb{R}} y \mapsto e^{-y^2}\right)}\right) \\ &\underset{\text{}}{\overset{\text{Linearity}}{=}} \int_{\mathbb{R}} x \mapsto \left(\int_{\mathbb{R}} y \mapsto e^{-x^2-y^2}\right) \\ &\stackrel{Fubini}{=}\int_{\mathbb{R}^2}(x,y) \mapsto e^{-x^2-y^2}. \end{align*}

Using the same name ($x$) for the variables in both integrations is "fine" up to the third equality (I changed it in the second equality for the sake of clarity, otherwise the third would be a little mystic). Using $x$ instead of $y$ in the second line would be extremely bad taste, but not explicitly wrong. Using $x$ instead of $y$ in the right side of the first equality is edgy, but not so much.

Indeed, each underline integral is a closed box with respect to the rest: they are fixed numbers, which don't interact at all with the rest of the environment other than via the fact that they are numbers. It is in the third equality that we are multiplying a constant (relative to the inner function which we are integrating) which depends on $x$. It does not depend on the function inside the integral at all, but it is invading its space and interacting with it. To be extremely clear, call the function $x \mapsto e^{-x^2}$ by $f$. The second line is then $$\int_{\mathbb{R}} x \mapsto \left(e^{-x^2} \left(\int_{\mathbb{R}} f\right)\right)$$ $$=\int_{\mathbb{R}} \left( x \mapsto \int_{\mathbb{R}} (e^{-x^2}\cdot f)\right),$$ where we multiplied a constant to the inner integral.

What you are proposing is that the equality should read $$\int_{\mathbb{R}} x \mapsto \left(e^{-x^2} \left(\int_{\mathbb{R}} f\right)\right)$$ $$=\int_{\mathbb{R}} \left( x \mapsto \int_{\mathbb{R}} g\right),$$ where $g(t)=e^{-t^2}f(t)$. This doesn't make sense. Essentially, what you are implying is that $$f \cdot\int g=\int f\cdot g,$$ which is not true.


# Math Help - Probability question

1. ## Probability question

A man writes 5 letters, one each to A, B, C, D and E. Each letter is placed in a separate envelope and sealed. He then addressed the envelopes, at random, one each to A, B, C, D and E.

Find the probability that both of the letters to A and B are in incorrect envelopes.

The answer is given as 13/20 but I can't figure out why. Can anyone help?

2. Originally Posted by jjc
A man writes 5 letters, one each to A, B, C, D and E. Each letter is placed in a separate envelope and sealed. He then addressed the envelopes, at random, one each to A, B, C, D and E. Find the probability that both of the letters to A and B are in incorrect envelopes. The answer is given as 13/20
The number of ways that A or B is in the correct envelope is give by:
$P(A \cup B) = P(A) + P(B) - P(A \cap B) = \frac{{2(4!) - 3!}}{{5!}}$
Now, for neither to get the correct letter subtract from 1.

3. Hello, jjc!

A man writes 5 letters, one each to A, B, C, D and E.
Each letter is placed in a separate envelope and sealed.
He then addressed the envelopes, at random, one each to A, B, C, D and E.

Find the probability that both of the letters to A and B are in incorrect envelopes.

Answer: $\frac{13}{20}$
Here is a logical (but very primitive) approach . . .

The letters are: . $A,B,C,D,E$

Their envelopes are: . $a,b,c,d,e$

There are two cases to consider:
. . (1) Letter $A$ is in envelope $b.$
. . (2) Letter $A$ is not in envelope $b.$

(1) Letter $A$ is in envelope $b$: . $P(\text{A in b}) \:=\:\frac{1}{5}$

Then letter $B$ can go in any of the other four envelopes: $\{a,c,d,e\}$
. . $P(\text{B wrong}) \:=\:\frac{4}{4} \:=\:1$

Hence: . $P(\text{A in b }\wedge\text{ B wrong}) \:=\:\frac{1}{5}\cdot1 \:=\:{\color{blue}\frac{1}{5}}$

(2) Letter $A$ is in not in envelope $b$ ... it is in $\{c,d,e\}$
. . $P(\text{A not in b}) \:=\:\frac{3}{5}$

Then letter B must be in one of the three remaining envelopes.
. . $P(\text{B wrong}) \:=\:\frac{3}{4}$

Hence: . $P(\text{A not in b} \wedge\text{ B wrong}) \:=\:\frac{3}{5}\cdot\frac{3}{4} \:=\:{\color{blue}\frac{9}{20}}$

Therefore: . $P(\text{A wrong }\wedge\text{ B wrong}) \;=\;\frac{1}{5} + \frac{9}{20} \;=\;{\bf{\color{red}\frac{13}{20}}}$


IntMath Home » Forum home » Graphs of the Trigonometric Functions » Phase shift

Phase shift [Solved!]

My question

Hello, I have a question about phase shift. What makes the second approach incorrect?

It makes sense that the shift is -c/b when considering it as when the expression inside the sin/cos function equals 0 (as if the function is just starting off).

However, when plugging in 0 for x, it seems like the graph would be shifted c to the left (since the value inside the paranthesis is acting as though x=c), but this isn't the case when b isn't 1

Thanks a lot!

Relevant page

3. Graphs of y = a sin(bx + c) and y = a cos(bx + c)

What I've done so far

Drawn several graphs, but couldn't conclude anything

X

Hello, I have a question about phase shift. What makes the second approach incorrect?

It makes sense that the shift is -c/b when considering it as when the expression inside the sin/cos function equals 0 (as if the function is just starting off).

However, when plugging in 0 for x, it seems like the graph would be shifted c to the left (since the value inside the paranthesis is acting as though x=c), but this isn't the case when b isn't 1

Thanks a lot!
Relevant page

3. Graphs of y = a sin(bx + c) and y = a cos(bx + c)

What I've done so far

Drawn several graphs, but couldn't conclude anything

Re: Phase shift

Hello Andrew

I think the problem here is with the concept of "starting off". Let's use "t" as the variable and talk about when things occur.

Let's also just talk about sin to keep it simple.

If we set the expression inside the sin (that is, bt + c) to 0, we are saying "at what time does sin have value 0?", since sin 0 = 0. Then by solving, we get t = -c/b.

The effect here is to shift the graph to the left by the amount c/b. (That is, the function has value 0, or it is "starting off [from value 0]" at t = -c/b.)

Now let's think about y = a sin(bt+c) when the TIME is 0 ("starting off when we flip the switch on"). Now we have y = a sin c, which is some value on the y-axis, and that will be the starting value of y. I hope you can see that it doesn't matter what b is in such a case, since it is no longer in the expression y = a sin c.

Does that help?

I have added a new example on 3. Graphs of y = a sin(bx + c) and y = a cos(bx + c) - I hope that makes it clearer.

Regards

X

Hello Andrew

I think the problem here is with the concept of "starting off". Let's use "t" as the variable and talk about when things occur.

Let's also just talk about sin to keep it simple.

If we set the expression inside the sin (that is, bt + c) to 0, we are saying "at what time does sin have value 0?", since sin 0 = 0. Then by solving, we get t = -c/b.

The effect here is to shift the graph to the left by the amount c/b. (That is, the function has value 0, or it is "starting off [from value 0]" at t = -c/b.)

Now let's think about y = a sin(bt+c) when the TIME is 0 ("starting off when we flip the switch on"). Now we have y = a sin c, which is some value on the y-axis, and that will be the starting value of y. I hope you can see that it doesn't matter what b is in such a case, since it is no longer in the expression y = a sin c.

Does that help?

I have added a new example on 3. Graphs of y = a sin(bx + c) and y = a cos(bx + c) - I hope that makes it clearer.

Regards

Re: Phase shift

Your new example helped a lot.

Thanks.

X

Your new example helped a lot.

Thanks.

You need to be logged in to reply.


# How to get a transfer function from this block diagram?

Pardon my paint skills, I did my best

My attempt is short and seems to fail, I have no idea why:

\begin{align} \alpha &= in - a_{1}\beta - a_{2}\gamma \\ \beta &= \alpha z^{-1} \\ \gamma &= \beta z^{-1} = \alpha z^{-2} \end{align}

inputting 2nd and 3rd equation into the first one I get:

\begin{align} \alpha &= in - a_{1}\alpha z^{-1} - a_{2}\alpha z^{-2} \\ in &= \alpha + a_{1}\alpha z^{-1} + a_{2}\alpha z^{-2} \end{align}

I can write the output as:

\begin{align} out &= b_{2}\gamma + b_{1}\beta + b_{0}\alpha \\ out &= b_{2}\alpha z^{-2} + b_{1}\alpha z^{-1} + b_{0}\alpha \end{align}

I have output and input in terms of alpha, but I can't figure what to do from here.

You are going in the right direction! Lets take these two equations: $$(1) \quad in = \alpha+a_1\alpha z^{-1}+a_2\alpha z^{-2}$$ $$(2) \quad out = b_0\alpha+b_1\alpha z^{-1}+b_2\alpha z^{-2}$$ now rewrite (1) such that it becomes a function of $$\alpha$$: $$in = \alpha\left(1+a_1z^{-1}+a_2z^{-2}\right)$$ $$\alpha = \frac{in}{1+a_1z^{-1}+a_2z^{-2}}$$ Substitute $$\alpha$$ in equation (2): $$out = in\frac{b_0+b_1 z^{-1}+b_2 z^{-2}}{1+a_1z^{-1}+a_2z^{-2}}$$ And derive proper discrete transfer function from it: $$H(z) = \frac{out}{in} = \frac{b_0+b_1 z^{-1}+b_2 z^{-2}}{1+a_1z^{-1}+a_2z^{-2}}$$

• Thank you kind sir. I'm ashamed I didn't figure it out myself. But you made a little mistake I believe, in the second (2) equation the last term should have b2 instead of a2, and that mistakes propagates to the results as well Sep 17 '20 at 11:14
• Oops, small copy-past error haha. fixed it! Sep 17 '20 at 11:15

Just wanted to add that you could use this to draw diagrams next time. Much easier to use than paint. You can even use Latex.

• This really should be posted as a comment and not an answer. Oct 13 '20 at 15:19
• Don't have the reputation to do so, just need 4 more to get to 50 lol Oct 13 '20 at 19:08
• Just one good answer will get you there! Oct 13 '20 at 22:13
• If you used this website to draw a new diagramm for thr op and then answer the OPs question i’d definitely +1 Oct 14 '20 at 8:59


# Why is the following relation transitive, but not reflexive?

In a practice paper for an exam there is the following relation:

$$E = \{(1,1),(2,2),(3,3),(4,4)\}\ \text{ on the set }V = \{1,2,3,4,5\}$$

It would appear that because $(5,5)$ is not in $E$, that it would not be a reflexive relation.

What is unclear is how the relation is still transitive. By our definition for Transitivity, for all elements in set $V$, there would have to be $(a,b)$ and $(b,c)\ldots$ and therefore $(a,c)$ in the set $E$.

This works for element $1$ in $V$ because you have $(1,1)$ and $(1,1)$ and therefore $(1,1)$. I would have assumed however that because there is no tuple $(5,5)$ in $E$ the entire relation could not be transitive?

Hope this makes sense, thanks for any input offered.

• "By our definition for Transitivity, for all elements in set V, there would have to be (a,b) and (b,c)" No. This is not the definition. ( a,b) do not have to be in E for all a,b. But IF (a,b) does exist, AND (b,c) exist, then (a,c) must also exist. But if (a,b) does not exist... no harm, no foul. [Note: if (a,b) did have to exist for a,b in V, then E has to be V x V = {(1,1)(1,2)(1,3)..... (5,3),(5,4)(5,5)} all, every single one of the 25 pairs. – fleablood Jan 11 '17 at 17:35

Reflexive means for all $a \in V$ then $(a,a) \in E$. That fails because $5 \in V$ and $(5,5) \not \in V$.

Transitive says nothing about items of $V$ but only about items in $E$. The relation is transitive if every time you have an $(a,b) \in E$ and a $(b,c) \in E$ you must also have a $(a,c) \in E$ then the relation is transitive. If you never have an $(5,x)$ or $(y, 5) \in E$ that will in no way affect what you do have in $E$.

This particular relationship if you have $(a,b) \in E$ then $a \ne 5; b\ne 5;$ and $a = b$. So if $(a,b), (b,c) \in E$ then $a = b = c$ and $(a,c) = (a,a) = (a,b) \in E$. So the relationship is transitive. That $a,b,c$ can never be equal to $5$ is utterly irrelevant.

• I never thought about it, but reflexive is the only condition that pertains to the elements of V. Symmetry pertains only to elements of E in that if you have this element in V you must have that element too. Transitivity says if you have two elements in V you must also have a third. A function could still be transitive if you have (a,b) but absolutely no (b,x). For transitivity to fail you must have both an (a,b) and an (b,c) but not the (a,c). If you don't the (a,b) or you don't have the (b,c) it doesn't matter whether or not you have the (a,c). So no (5,x) or (x,5) doesn't matter. – fleablood Jan 11 '17 at 17:51
• Yes, @fleablood. In your last point, when you do not have some elements a, b, c, in V, such that $(a, b), (b, c) \in E$, it is a vacuously true, that transitivity holds regardless of whether or not $(a, c)$ is, or is not, in $E$. Also, as you seem to have gleaned, it is helpful to examine failures of properties of relations, for which the property fails. If it does not fail, the property holds. – Namaste Jan 11 '17 at 18:16
• Hmmm, transitivity does not require three elements in some set $V$ of a transitive relation $E$. If $E = \{(a, a)\}$, E is indeed transitive, (and symmetric). – Namaste Jan 11 '17 at 18:23
• I didn't mean to imply transitivity required 3 elements. As you point out if there are no (a,b) (b,c) pairs it's vacuously transitive. If it's non-vacuously transitive it must have (a,b) and (b,c) and a cooresponding (a,c). But a, b, and c need not be distinct. So (a,a) (a,a) and (a,a) will do. – fleablood Jan 11 '17 at 22:11

Definition: $R$ is transitive if and only if $\forall x,y (R(x,y)$ and $R(y,x))\Rightarrow R(x,z)$

Can you point to where exactly you think this definition fails? For $x=y=5$ the antecedent fails to hold (since $R(5,5)$ is false) and therefore the implication is true, since an implication with a false antecedent is always true.

Your definition of transitivity is unclear as stated, and you have misunderstood it, there is no requirements on the members of the underlying set, only on the elements of the relation.

Proof $E$ is transitive: if $E\left(a,\,b\right)\land E\left(b,\,c\right)$ then $a=b\in V\backslash \left\{ 5\right\}$ and similarly $b=c\in V\backslash \left\{ 5\right\}$, so $a=c\in V\backslash \left\{ 5\right\}$ and $E\left(a,\,c\right)$.


# mirror reflection

1. The problem statement, all variables and given/known data

Question A. Draw accurately in the figure the light beam that goes from Object A to eye B after being reflected on the mirror. It must be consistent with the mirror principle!

Question B. At question A. you may have connected the point behind the mirror (A') with eye B. And found the correct light path that way.

Will that also work if you use the point behind the mirror of B (B') instead? Do you get the same result? Use mathematical arguments for your judgement!

2. Relevant equations mirror reflection rules

3. The attempt at a solution

Question A: I tried to draw point A' and connected that to B. The purple line is the normal line (the imaginary line that is perpendicular to the mirror) And the angle between the mirror and A is the same as the angle between the mirror and B.

Question B: I think this is true, I can draw the same lines, but I don't know what is meant by 'mathematical arguments'

-
This is a very nicely written question. If only we had more like this one... :-) – Vedran Šego Nov 14 '13 at 4:14

Notice that $AA'B'B$ is an isosceles trapezoid, so its diagonals intersect on the mirror, which means that using either $\triangle AA'B$ or $\triangle AB'B$ will give you the same point.

You'll probably need to provide a bit more arguments that the diagonals intersect on the mirror. Read the linked article and ask if you get stuck.

Edit: Here is a bit more:

We can extend $AA'B'B$ to a triangle. Let us denote the new vertex as $C$. It is on the intersection of the lines on which $\overline{AB}$ and $\overline{A'B'}$ lie.

Note that

1. $|\overline{AA''}| = |\overline{A'A''}|$, where $A''$ denotes a point at which $\overline{AA'}$ intersects with the mirror; and
2. the mirror (on which the altitude of the mirror lies) is orthogonal to $\overline{AA'}$.

From points $1$ and $2$, we see that $\triangle AA'C$ is an isosceles triangle. The same can be said for $\triangle BB'C$ (with the same arguments).

Now, since

$$|\overline{AB}| = |\overline{AC}| - |\overline{BC}| = |\overline{A'C}| - |\overline{B'C}| = |\overline{A'B'}|,$$

we see that $AA'B'B$ is an isosceles trapezoid.

Using this, show that the diagonals of $AA'B'B$ intersect on the mirror. Can you take over now?

-
Do you mean with a bit more arguments to proof Similarity (geometry) between the triangles? – user108681 Nov 14 '13 at 4:36
@user108681 I've expanded my answer. – Vedran Šego Nov 14 '13 at 12:15
A bit easier: you can just observe isosceles triangles $\triangle AA'E$ and $\triangle BB'E$, where $E$ is the point on the mirror where $\overline{AB'}$ and $\overline{A'B}$ intersect (i.e., the point you're looking for). – Vedran Šego Nov 14 '13 at 18:31


# Why is minimizing least squares equivalent to finding the projection matrix $\hat{x}=A^Tb(A^TA)^{-1}$?

I understand the derivation for $\hat{x}=A^Tb(A^TA)^{-1}$, but I'm having trouble explicitly connecting it to least squares regression.

So suppose we have a system of equations: $A=\begin{bmatrix}1 & 1\\1 & 2\\1 &3\end{bmatrix}, x=\begin{bmatrix}C\\D\end{bmatrix}, b=\begin{bmatrix}1\\2\\2\end{bmatrix}$

Using $\hat{x}=A^Tb(A^TA)^{-1}$, we know that $D=\frac{1}{2}, C=\frac{2}{3}$. But this is also equivalent to minimizing the sum of squares: $e^2_1+e^2_2+e^2_3 = (C+D-1)^2+(C+2D-2)^2+(C+3D-2)^2$.

I know the linear algebra approach is finding a hyperplane that minimizes the distance between points and the plane, but I'm having trouble understanding why it minimizes the squared distance. My intuition tells me it should minimize absolute distance, but I know this is wrong because it's possible for there to be non-unique solutions.

Why is this so? Any help would be greatly appreciated. Thanks!

• Check your derivation for $\hat{x}$ and you will find (as @Ian points out) the expression should be $\hat{x}=(A^TA)^{-1}A^Tb$. Perhaps you should edit this into the Question, though it may be the crux of why you had trouble "connecting it to least squares regression" (minimization). Aug 22 '16 at 15:00

You should be multiplying by $(A^T A)^{-1}$ on the left, not the right. Anyway, the geometric point is that you want $Ax-b$ to be perpendicular to $Ay$ for every vector $y$. (I think this is most easily seen by a geometric argument, which can be easily found in books, but which I can't easily render here.) This translates to $(Ay)^T(Ax-b)=0$ for every $y$, which is the same as $y^T(A^T(Ax-b))=0$ for every $y$. This can only happen if $A^T(Ax-b)=0$, which rearranges to your form if $A^T A$ is invertible (as is usually the case).

Also, it is the same to minimize the square of the Euclidean distance as it is to minimize the Euclidean distance itself. (This is also true of any other nonnegative quantity.) What would be different is minimizing some other distance, like the "taxicab" distance (where you sum the absolute values). Why we should choose to minimize the Euclidean distance in the first place is not a purely mathematical question, it depends on where the problem is coming from. That question is a bit off-topic here, though, and has also been asked before on MSE. (The short version of that discussion: "it's mathematically convenient" and "see the Gauss-Markov theorem".)

• About minimizing the Euclidean distance: I'm a little confused about the distinction. For example, least squares would penalize a point for being farther away: e.g. a point 1 unit away would be penalized by 1 whereas a point 2 units away would be penalized by 4. I think my confusion lies in the difference between minimizing an aggregate of points vs individual ones, since it seems to me that minimizing euclidean distance for each point wouldn't account for the distance factor in least squares. Aug 22 '16 at 15:30
• In your problem the goal is to choose a vector in a certain 2D subspace which is closest to another vector in 3D space, where you measure distance in the Euclidean sense. This is not measured separately by components but rather through the usual distance formula.
– Ian
Aug 22 '16 at 15:39

The matrix has full column rank; we are guaranteed a unique solution.

Problem statement

\begin{align} \mathbf{A} x &= b \\ \left[ \begin{array}{cc} 1 & 1 \\ 1 & 2 \\ 1 & 3 \\ \end{array} \right] % \left[ \begin{array}{cc} x_{1} \\ x_{2} \\ \end{array} \right] &= \left[ \begin{array}{cc} 1 \\ 2 \\ 2 \\ \end{array} \right] \end{align}

Normal equations

\begin{align} \mathbf{A}^{*} \mathbf{A} x &= \mathbf{A}^{*} b \\ % \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 1 & 2 & 3 \\ \end{array} \right] % \left[ \begin{array}{cc} 1 & 1 \\ 1 & 2 \\ 1 & 3 \\ \end{array} \right] % \left[ \begin{array}{cc} x_{1} \\ x_{2} \\ \end{array} \right] &= \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 1 & 2 & 3 \\ \end{array} \right] % \left[ \begin{array}{cc} 1 \\ 2 \\ 2 \\ \end{array} \right] \\[3pt] % \left[ \begin{array}{cc} 3 & 6 \\ 6 & 14 \\ \end{array} \right] % \left[ \begin{array}{cc} x_{1} \\ x_{2} \\ \end{array} \right] % &= % \left[ \begin{array}{cc} 5 \\ 11 \\ \end{array} \right] % \end{align}

Least squares solution

\begin{align} x_{LS} &= \left( \mathbf{A}^{*} \mathbf{A} \right)^{-1} \mathbf{A}^{*} b \\ % \left[ \begin{array}{cc} x_{1} \\ x_{2} \\ \end{array} \right] &= \frac{1}{6} \left[ \begin{array}{cc} 14 & -6 \\ -6 & 3 \\ \end{array} \right] % \left[ \begin{array}{cc} 5 \\ 11 \end{array} \right] \\ % &= \frac{1}{6} \left[ \begin{array}{cc} 4 \\ 3 \end{array} \right] % \end{align}


# On Cesàro convergence: If $x_n \to x$ then $z_n = \frac{x_1 + \dots +x_n}{n} \to x$

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):

In a normed vector space, if $x_n \longrightarrow x$ then $z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x$

I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.

Thanks!

Given $\epsilon >0$ there exists $n_0$ such that if $n\geq n_0$ then $\parallel x_n -x\parallel < \epsilon$

so

\begin{align*} 0 & \leq \left\lVert \frac{x_1 +\cdots +x_n}{n} -x \right\rVert \leq \left\lVert \frac{x_1 + \dots + x_n - nx }{n} \right\rVert \\ & \leq \frac{\lVert x_1 - x \rVert}{n} + \dots + \frac{\lVert x_{n_0 - 1} - x \rVert}{n} + \frac{\lVert x_{n_0} - x \rVert}{n} +\dots + \frac{\lVert x_{n} - x \rVert}{n} \\ &\le \frac 1n\sum_{i=1}^{n_0-1} \| x_i -x\| + \frac{n-n_0}{n} \epsilon \end{align*}

The first $n_0 -1$ terms $\| x_i -x\|$ can be bounded by some $M$, thus for $n\ge (n_0-1)M/\epsilon=: N_0$ we have $$\frac 1n\sum_{i=1}^{n_0-1} \| x_n -x\| \le \frac 1n (n_0-1)M \le \epsilon$$

Thus $$\left\| \frac{x_1 + \cdots x_n}{n} - x\right\| <2\epsilon$$ when $n\ge N_0$.

Thanks a lot @Leonid Kovalev for the inspiration, though my main problem was that I wasn't aware of what to do with the $nx$ (the silliest part :P)

• This sort of thing is encouraged, I think. – Dylan Moreland Jun 11 '12 at 3:21
• I think you want "$-nx$" in the first line of the display, and $\|x_n - x\|$ at the end. I don't think you want to say that the first few terms are $\leq M$; that doesn't seem to be enough. – Dylan Moreland Jun 11 '12 at 3:41
• @DylanMoreland: Why isn't it enough? Can you explain? – Bouvet Island Jun 11 '12 at 14:56
• @Inti: I think you are missing something in the argument. Generally the argument consists of two steps: first choose $n_0$ such that if $n \geq n_0$, $\|x_n -x \| < \epsilon / 2$. Next choose $N \geq n_0$ such that $M$ (which is at least $\sup_n \|x_n\|$) satisfies $M / N < \epsilon / 2$. I don't see the second part of the argument implemented in your answer. – Willie Wong Jun 11 '12 at 14:59
• Should it not be $(n-n_0+1)\epsilon/n$? – jippyjoe4 Oct 14 '19 at 4:19

There is a slightly more general claim:

PROP Let $$\langle a_n\rangle$$ be a sequence of real numbers, and define $$\langle \sigma_n\rangle$$ by $$\sigma_n=\frac 1 n\sum_{k=1}^n a_k$$

Then $$\liminf_{n\to\infty}a_n\leq \liminf_{n\to\infty}\sigma_n \;(\;\leq\;)\;\limsup_{n\to\infty}\sigma_n\leq \limsup_{n\to\infty}a_n$$

P We prove the leftmost inequality. Let $$\ell =\liminf_{n\to\infty}a_n$$, and choose $$\alpha <\ell$$. By definition, there exists $$N$$ such that $$\alpha for any $$k=0,1,2,\ldots$$ If $$m>0$$, then $$m\alpha <\sum_{k=1}^m \alpha_{N+k}$$

which is $$m\alpha<\sum_{k=N+1}^{N+m}a_k$$

$$(m+N)\alpha+\sum_{k=1}^{N}a_k<\sum_{k=1}^{N+m}a_k+N\alpha$$

which gives

$$\alpha+\frac{1}{m+N}\sum_{k=1}^{N}a_k<\frac{1}{m+N}\sum_{k=1}^{N+m}a_k+\frac{N}{m+N}\alpha$$

Since $$N$$ is fixed, taking $$\liminf\limits_{m\to\infty}$$ gives $$\alpha \leq \liminf\limits_{m \to \infty } \frac{1}{m}\sum\limits_{k = 1}^m {{a_k}}$$ (note that $$N+m$$ is just a shift, which doesn't alter the value of the $$\liminf^{(1)}$$). Thus, for each $$\alpha <\ell$$, $$\alpha \leq \liminf\limits_{m \to \infty } \frac{1}{m}\sum\limits_{k = 1}^m {{a_k}}$$ which means that $$\liminf_{n\to\infty}a_n\leq \liminf_{n\to\infty}\sigma_n$$ The rightmost inequality is proven in a completely analogous manner. $$\blacktriangle$$.

$$(1)$$: Note however, this is not true for "non shift" subsequences, for example $$\limsup_{n\to\infty}(-1)^n=1$$ but $$\limsup_{n\to\infty}(-1)^{2n+1}=-1$$

COR If $$\lim a_n$$ exists and equals $$\ell$$, so does $$\lim \sigma_n$$, and it also equals $$\ell$$. The converse is not true.

WLOG, the $x_n$ converge to $0$ (otherwise consider the differences $x_n-x$), and stay confined in an $\epsilon$-neighborhood of $0$ after $N_\epsilon$ terms.

Then the average of the first $m$ terms is bounded by

$$\frac{N\overline{x_N}+(m-N)\epsilon}m,$$ which converges to $\epsilon$. So you can make the average as close to $0$ as you like.