# What are the chances rolling 6, 6-sided dice that there will be a 6?

More generally, what is the probability that n n-sided dice will turn up at least one side with the highest number ("n")?

My crude thinking is that each side has 1/6 probability, so that 6 of them (1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6) equals 100% of the time, but this obviously is not the case.

2 coins getting one T (say), has 3/4 of the time that at least one will be a T (for every 2 coin tosses). But this is 75% for a 2d2 dice throw, what is the general formula for NdN?

• Pretty sure we have a couple of questions already that cover this. Jul 26, 2020 at 22:59
• Does this answer your question? How often do you have to roll a 6-sided die to obtain every number at least once? Jul 27, 2020 at 19:07
• $m = n-1$, that is $P = 1 - \left(\frac{n-1}{n}\right)^n$ Jul 28, 2020 at 10:11
• @NathanChappell: Thanks! That's the cleanest solution yet! Jul 31, 2020 at 18:11

Probability of a die not turning up $$n$$ is $$1-1/n$$. Probability of not turning up $$n$$ in any of the $$n$$ dice is $$(1-1/n)^n$$. If you subtract this from $$1$$, it'll be probability of at least one $$n$$ turning up when you throw $$n$$ dice, i.e.

$$p=1-(1-1/n)^n\rightarrow 1-e^{-1}$$ as $$n$$ goes to $$\infty.$$

• In the case of trying to roll at least one 6 on 6 6-sided dice rolls (the title question), this gives us approximately a 66.5% chance. Jul 27, 2020 at 6:20
• Nathan Chappell has a simpler formula in the comment to the question above. Unfortunately, I don't have the time nor is it immediately apparent how to reduce your formula to his. Jul 31, 2020 at 18:10
• Inside of the parantheses is the same if you pay attention closely @Marcos $$\left(1-\frac{1}{n}\right)=\left(\frac{n-1}{n}\right)$$ Jul 31, 2020 at 21:50
• @gunes: Ah, yes, thanks. I came to the same conclusion after writing that comment -- an equivalency I hadn't seen before in algebra. Rather, I hadn't guessed to make 1 = n/n and then re-arrange terms. It's a common algebraic trick, but I'd never had the context to do it for myself. Aug 1, 2020 at 4:11
• How do you arrive at the conclusion in your second sentence? That is FAR OUT. I've not seen that in combinatorics. If you can explain it, I'll give you the credit. Nevermind... I think I see it now. I'll give you the credit... Aug 1, 2020 at 16:40

The event $$A:=$$ "at least one die turns up on side $$n$$" is the complement of the event $$B:=$$ "all dice turn up on non-$$n$$ sides".

So $$P(A)=1-P(B)$$. What's $$P(B)$$?

All dice are independent, so

$$P(\text{all n dice turn up on non-n sides}) = P(\text{a single die turns up non-n})^n = \bigg(\frac{n-1}{n}\bigg)^n.$$

So

$$P(A) = 1-\bigg(\frac{n-1}{n}\bigg)^n.$$

Trust but verify. I like to do so in R:

> nn <- 6
> n_sims <- 1e5
> sum(replicate(n_sims,any(sample(1:nn,nn,replace=TRUE)==nn)))/n_sims
[1] 0.66355
> 1-((nn-1)/nn)^nn
[1] 0.665102

Looks good. Try this with other values of nn. Here is a plot:

nn <- 2:100
plot(nn,1-((nn-1)/nn)^nn,type="o",pch=19,ylim=c(1-1/exp(1),1))
abline(h=1-1/exp(1),col="red")

We note how our probability in the limit is

$$P(A) = 1-\bigg(\frac{n-1}{n}\bigg)^n =1-\bigg(1-\frac{1}{n}\bigg)^n \to 1-\frac{1}{e}\approx 0.6321206 \quad\text{as }n\to\infty,$$

Answers by @StephanKolassa (+1) and @gunes (+1) are both fine. But this problem can be solved with reference to binomial and Poisson distributions as follows:

If $$X_n$$ is the number of ns seen in $$n$$ rolls of a fair $$n$$-sided die, then $$X_n \sim \mathsf{Binom}(n, 1/n),$$ so that $$P(X_n \ge 1) = 1 - P(X_n = 0)= 1-(1-1/n)^n.$$

As $$n\rightarrow\infty,$$ one has $$X_n \stackrel{prob}{\rightarrow} Y \sim\mathsf{Pois}(\lambda=1),$$ with $$P(Y \ge 1) = 1 - P(Y = 0) = 1 - e^{-1}.$$

The answer can be arrived at by purely counting the described events as well, although the accepted answer is more elegant. We'll consider the case of the die, and hopefully the generalization is obvious. We'll let the event space be all sequences of numbers from $$\{1,2,...,6\}$$ of length $$6$$. Here are a few examples (chosen at random):

3 2 3 5 6 1
1 1 2 5 2 4
1 2 1 1 6 3
4 4 3 3 4 2
6 1 1 6 3 4
6 3 5 4 5 1

The point is, our space has a total of $$6^6$$ events, and due to independence we suppose that any one of them is as probable as the other (uniformly distributed). We need to count how many sequences have at least one $$6$$ in them. We partition the space we are counting by how many $$6$$'s appear, so consider the case that exactly one $$6$$ appears. How many possible ways can this happen? The six may appear in any position (6 different positions), and when it does the other 5 postions can have any of 5 different symbols (from $$\{1,2,...,5\}$$). Then the total number of sequences with exactly one $$6$$ is: $$\binom{6}{1}5^5$$. Similarly for the case where there are exactly two $$6$$'s: we get that there are exactly $$\binom{6}{2}5^4$$ such sequences. Now it's time for fun with sums:

$$\sum_{k=1}^6 \binom{6}{k}5^{6-k} = \sum_{k=0}^6 \binom{6}{k}5^{6-k}1^k - 5^6 = (5+1)^6 - 5^6$$

To get a probability from this count, we divide by the total number of events:

$$\frac{6^6 - 5^6}{6^6} = 1 - (5/6)^6 = 1 - (1-1/6)^6$$

I think that this generalizes pretty well, since for any $$n$$ other than $$6$$, the exact same arguments holds, only replace each occurrence of $$6$$ with $$n$$, and $$5$$ with $$n-1$$.

It's also worth noting that this number $$5^6 = \binom{6}{0}5^6$$ is the contribution of sequences in which no $$6$$ occurs, and is much easier to calculate (as used in the accepted answer).

I found BruceET's answer interesting, relating to the number of events. An alternative way to approach this problem is to use the correspondence between waiting time and number of events. The use of that would be that the problem will be able to be generalized in some ways more easily.

### Viewing the problem as a waiting time problem

This correspondence, as for instance explained/used here and here, is

For the number of dice rolls $$m$$ and number of hits/events $$k$$ you get: $$\begin{array}{ccc} \overbrace{P(K \geq k| m)}^{\text{this is what you are looking for}} &=& \overbrace{P(M \leq m|k)}^{\text{we will express this instead}} \\ {\small\text{\mathbb{P} k or more events in m dice rolls}} &=& {\small\text{\mathbb{P} dice rolls below m given k events}} \end{array}$$

In words: the probability to get more than $$K \geq k$$ events (e.g. $$\geq 1$$ times rolling 6) within a number of dice rolls $$m$$ equals the probability to need $$m$$ or less dice rolls to get $$k$$ such events.

This approach relates many distributions.

Distribution of                 Distribution of
Waiting time between events     number of events

Exponential                     Poisson
Erlang/Gamma                    over/under-dispersed Poisson
Geometric                       Binomial
Negative Binomial               over/under-dispersed Binomial

So in our situation the waiting time is a geometric distribution. The probability that the number of dice rolls $$M$$ before you roll the first $$n$$ is less than or equal to $$m$$ (and given a probability to roll $$n$$ equals $$1/n$$) is the following CDF for the geometric distribution:

$$P(M \leq m) = 1-\left(1-\frac{1}{n}\right)^m$$

and we are looking for the situation $$m=n$$ so you get:

$$P(\text{there will be a n rolled within n rolls}) = P(M \leq n) = 1-\left(1-\frac{1}{n}\right)^n$$

### Generalizations, when $$n \to \infty$$

The first generalization is that for $$n \to \infty$$ the distribution of the number of events becomes Poisson with factor $$\lambda$$ and the waiting time becomes an exponential distribution with factor $$\lambda$$. So the waiting time for rolling an event in the Poisson dice rolling process becomes $$(1-e^{-\lambda \times t})$$ and with $$t=1$$ we get the same $$\approx 0.632$$ result as the other answers. This generalization is not yet so special as it only reproduces the other results, but for the next one I do not see so directly how the generalization could work without thinking about waiting times.

### Generalizations, when dices are not fair

You might consider the situation where the dice are not fair. For instance one time you will roll with a dice that has 0.17 probability to roll a 6, and another time you roll a dice that has 0.16 probability to roll a 6. This will mean that the 6's get more clustered around the dice with positive bias, and that the probability to roll a 6 in 6 turns will be less than the $$1-1/e$$ figure. (it means that based on the average probability of a single roll, say you determined it from a sample of many rolls, you can not determine the probability in many rolls with the same dice, because you need to take into account the correlation of the dice)

So say a dice does not have a constant probability $$p = 1/n$$, but instead it is drawn from a beta distribution with a mean $$\bar{p} = 1/n$$ and some shape parameter $$\nu$$

$$p \sim Beta \left( \alpha = \nu \frac{1}{n}, \beta = \nu \frac{n-1}{n} \right)$$

Then the number of events for a particular dice being rolled $$n$$ time will be beta binomial distributed. And the probability for 1 or more events will be:

$$P(k \geq 1) = 1 - \frac{B(\alpha, n + \beta)}{B(\alpha, \beta)} = 1 - \frac{B(\nu \frac{1}{n}, n +\nu \frac{n-1}{n})}{B(\nu \frac{1}{n}, n +\nu \frac{n-1}{n})}$$

I can verify computationally that this works...

### compute outcome for rolling a n-sided dice n times
rolldice <- function(n,nu) {
p <- rbeta(1,nu*1/n,nu*(n-1)/n)
k <- rbinom(1,n,p)
out <- (k>0)
out
}

### compute the average for a sample of dice
meandice <- function(n,nu,reps = 10^4) {
sum(replicate(reps,rolldice(n,nu)))/reps
}
meandice <- Vectorize((meandice))

### simulate and compute for variance n

set.seed(1)
n <- 6
nu <- 10^seq(-1,3,0.1)
y <- meandice(n,nu)
plot(nu,1-beta(nu*1/n,n+nu*(n-1)/n)/beta(nu*1/n,nu*(n-1)/n), log = "x", xlab = expression(nu), ylab = "fraction of dices",
main ="comparing simulation (dots) \n with formula based on beta (line)", main.cex = 1, type = "l")
points(nu,y, lty =1, pch = 21, col = "black", bg = "white")

.... But I have no good way to analytically solve the expression for $$n \to \infty$$.

With the waiting time However, with waiting times, then I can express the the limit of the beta binomial distribution (which is now more like a beta Poisson distribution) with a variance in the exponential factor of the waiting times.

So instead of $$1-e^{-1}$$ we are looking for $$1- \int e^{-\lambda} p(\lambda) \, \text{d}\, \lambda$$.

Now that integral term is related to the moment generating function (with $$t=-1$$). So if $$\lambda$$ is normal distributed with $$\mu = 1$$ and variance $$\sigma^2$$ then we should use:

$$1-e^{-(1-\sigma^2/2)} \quad \text{instead of} \quad 1-e^{-1}$$

### Application

These dice rolls are a toy model. Many real-life problems will have variation and not completely fair dice situations.

For instance, say you wish to study probability that a person might get sick from a virus given some contact time. One could base calculations for this based on some experiments that verify the probability of a transmission (e.g. either some theoretical work, or some lab experiments measuring/determining the number/frequency of transmissions in an entire population over a short duration), and then extrapolate this transmission to an entire month. Say, you find that the transmission is 1 transmission per month per person, then you could conclude that $$1-1/e \approx 0.63 \%$$ of the population will get sick. However, this might be an overestimation because not everybody might get sick/transmission with the same rate. The percentage will probably lower.

However, this is only true if the variance is very large. For this the distribution of $$\lambda$$ must be very skewed. Because, although we expressed it as a normal distribution before, negative values are not possible and distributions without negative distributions will typically not have large ratios $$\sigma/\mu$$, unless they are highly skewed. A situation with high skew is modeled below:

Now we use the MGF for a Bernoulli distribution (the exponent of it), because we modeled the distribution as either $$\lambda = 0$$ with probability $$1-p$$ or $$\lambda = 1/p$$ with probability $$p$$.

set.seed(1)
rate = 1
time = 1
CV = 1
### compute outcome for getting sick with variable rate
getsick <- function(rate,CV=0.1,time=1) {
### truncating changes sd and mean but not co much if CV is small
p <- 1/(CV^2+1)
lambda <- rbinom(1,1,p)/(p)*rate
k <- rpois(1,lambda*time)
out <- (k>0)
out
}

CV <- seq(0,2,0.1)
plot(-1,-1, xlim = c(0,2), ylim = c(0,1), xlab = "coefficient of variance", ylab = "fraction",
cex.main = 1, main = "if rates are bernouilli distributed \n fraction p with lambda/p and 1-p with 0")
for (cv in CV) {
points(cv,sum(replicate(10^4,getsick(rate=1,cv, time = 1)))/10^4)
}

p <- 1/(CV^2+1)
lines(CV,1-(1-p)-p*exp(-1/p),col=1)
lines(CV,p, col = 2, lty = 2)

legend(2,1, c("simulation", "computed", "percent of subsceptible population"),
col = c(1,1,2), lty = c(NA,1,2), pch = c(1,NA,NA),xjust =1, cex = 0.7)

The consequence is. Say you have high $$n$$ and have no possibilities to observe $$n$$ dice rolls (e.g. it takes to long), and instead you screen the number of $$n$$ rolls only for a short time for many different dice. Then you could compute the number of dices that did roll a number $$n$$ during this short time and based on that compute what would happen for $$n$$ rolls. But you would not be knowing how much the events correlate within the dice. It could be that you are dealing with a high probability in a small group of dice, instead of an evenly distributed probability among all dice.

This 'error' (or you could say simplification) relates to the situation with COVID-19 where the idea goes around that we need 60% of the people immune in order to reach herd immunity. However, that may not be the case. The current infection rate is determined for only a small group of people, it can be that this is only an indication for the infectiousness among a small group of people.

• I must admit that my last case is actually very trivial and does not this larger framework and tricks with moment generating functions, it can be done easier by just rescaling the population. Jul 31, 2020 at 16:58
• ...Except, since the number of rolls is finite, one can enumerate all possible outcomes. This is n^n for an n-sided die. Once one has done this it's a matter of counting which rolls have a #n. Jul 31, 2020 at 17:05
• @Marcos my approach is for people that do not like counting (e.g. imagine $n$ would be equal to a million or larger, it is still finite but good luck counting). And also, how are you gonna count if the dices are not fair but instead follow some continuous distribution? -------- That said, I agree your specific question can be answered easily. The method here is just an additional view that can be useful for more complex problems. Jul 31, 2020 at 17:20
• True, it requries a "meta-numeric" formula for counting the digits of numbers (as symbols rather than quantities) themselves. Jul 31, 2020 at 17:28
• @Marcos I am not sure what you mean by counting now. I consider this problem not as a counting problem when $n$ get's large. Well, you can go count things and maybe create expressions that summarize the counting, but you may not always get (easily) to a solution. Flipping the point of view from counting the probabilities of a given number of events for a given number of rolls, to a given number of rolls (waiting time) for a given number of events, can be a useful tool to greatly simplify the problem (I agree for this specific problem, which is not so difficult it is not so much necessary) Jul 31, 2020 at 17:42

Simplify and then extend. Start with a coin. A coin is a die with 2 sides (S=2).

The exhaustive probability space is

T | H

Two possibilities. One satisfies the condition of all heads. So your odds of all heads with one coin (n=1) are 1/2.

So try two coins (n=2). All outcomes:

TT | TH | HT | HH

Four possibilities. Only one matches your criteria. It is worth noting that the probability of one being heads and the other being tails is 2/4 because two possibilities of the four match your criteria. But there is only one way to get all heads.

TTT | THT | HTT | HHT

TTH | THH | HTH | HHH

8 possibilities. Only one fits the criteria - so 1/8 chances of all heads.

The pattern is (1/S)^n or (1/2)^3.

For dice S = 6, and we have 6 of them.

Probability of getting a 6 on any given roll is 1/6. Rolls are independent events. So using 2 dice getting all 6's is (1/6)*(1/6) or 1/36.

(1/6)^6 is about 1 in 46,656

• I was actually just looking for the probability of ANY heads showing up, given as many rolls as there are faces on the die. But, cheers mate, I got my answer. Jul 28, 2020 at 0:22


# Show that $x^4 +1$ is reducible over $\mathbb{Z}_{11}[x]$ and splits over $\mathbb{Z}_{17}[x]$.

Reduction into linear factors $\mathbb{Z}_{17}[x]$:

This part is not too hard: $x^4 \equiv -1$ mod 17 has solutions: 2, 8, 9, 15 so

$(x-2)(x-8)(x-9)(x-15) = x^4 -34 x^3 +391 x^2-1734 x+2160 \equiv x^4+1$ mod 17.

Reduction over $\mathbb{Z}_{11}[x]$:

This one doesn't have such an easy solution, as neither of $y^2 \equiv -1$ mod 11 or $x^4 \equiv -1$ mod 11 have solutions.

I've tried $x^4+1 = (x^2- \sqrt{2}x+1)(x^2+\sqrt{2}x+1)$ but $x^2 \equiv 2$ mod 11 also has no solutions so there's no easy substitution here.

I think that this approach is not going to work here, so I need something new. Any suggestions?

• See this question for a more or less complete answer. – Jyrki Lahtonen Apr 5 '13 at 15:05
• It certainly has a very complete answer - but perhaps somewhat overkill when it comes to answering this question? Nonetheless thanks for the link. – Lewy Apr 5 '13 at 15:19
• You were almost there... You tried $X^4+1=X^4+1+2X^2-2X^2$. Now, if you observe that $2=-9$ you are done.... – N. S. Apr 5 '13 at 15:45
• The splitting modulo $p=17$ comes from the fact that $p \equiv 1 \pmod 8$, so that $p$ is totally split in the extension $\Bbb Q(\zeta_8) / \Bbb Q$, which is the splitting field of $x^4+1$. – Watson Apr 6 '18 at 13:30

I will assume you've made no mistakes in your work.

Since $-1$ hasn't a fourth root in $\Bbb Z_{11},$ then the only way to reduce $x^4+1$ over $\Bbb Z_{11}$ is as a product if quadratics. We may as well assume that the quadratics are monic, so we've got $$x^4+1=(x^2+ax+b)(x^2+cx+d),$$ leaving us with the following system: $$a+c=0\\ac+b+d=0\\ad+bc=0\\bd=1$$ By the first equation, $c=-a,$ and the rest of the system becomes: $$b+d=a^2\\a(d-b)=0\\bd=1$$ Now, if $a=0$, then the first and third remaining equations imply that $-1$ has a square root in $\Bbb Z_{11}$ (why?), which you've ruled out. Hence, we need $b=d,$ and the rest of the system becomes: $$2b=a^2\\b^2=1$$ Can you take it from here?

• Yes, thank you for your clear explanation. This gives two possible solutions: $(x^2-3x -1)(x^2 +3x-1)$ and $(x^2-8x -1)(x^2 +8x-1)$. – Lewy Apr 5 '13 at 15:27
• @Lewy: You do know that factorization in this ring is unique, don't ya? IOW, look more closely at the "two" factorizations :-) – Jyrki Lahtonen Apr 5 '13 at 15:31
• @Lewy: Jyrki's point is well-taken. $8=-3,$ so those factorizations are identical (up to arrangement of the factors). – Cameron Buie Apr 5 '13 at 15:51
• Yes, I see that. Perhaps this is one of those times at which it's appropriate to say "Doh!". – Lewy Apr 5 '13 at 15:55

An abstract algebra argument, without much computation.

Claim: The polynomial $x^4+1$ splits over $\mathbb F_{p^2}$ for any odd (*) prime $p$.

We can see this because $F_{p^2}^\times$ is a cyclic group of order $p^2-1$, a multiple of $8$. If $g$ is a generator, then $g^{(1+2k)\frac{p^2-1}{8}}$ gives distinct roots for $k=0,1,2,3$.

This means that $x^4+1$ can't be irreducible in $\mathbb Z_p$, because if it was, the splitting field would have $p^4$ elements.

(*) True for $p=2$, but not for the same reasons. When $p=2$, $x^4+1=(x+1)^4$.

Specific solutions:

We can make this explicit by looking at the "standard" complex $4$th roots of $-1$: $$\pm\frac{\sqrt 2}2 \pm\frac{\sqrt{2}}{2}i=\frac{1}{2}(\pm \sqrt{2}\pm\sqrt{-2})$$

If $p\equiv 1\pmod 8$ then $2$ and $-2$ have square roots in $\mathbb Z_p$, so $x^4+1$ has four roots.

If $p\equiv -1\pmod 8$ then $2$ is a square, but $-2$ is not. Write $a^2\equiv 2\pmod p$. Then write:

$$x^4+1 = \left(x^2 -ax + 1\right)\left(x^2+ax+1\right)$$

If $p\equiv 3\pmod 8$ then $-2$ is a square and $2$ is not. Letting $b^2\equiv -2\pmod p$, we get:

$$x^4+1 = \left(x^2-bx-1\right)\left(x^2+bx-1\right)$$

Finally, if $p\equiv 5\pmod 8$ then neither of $\pm 2$ is a square, but $-1$ is a square. Letting $c^2\equiv -1\pmod p$, we see that the roots are $(\pm 1 \pm c)\sqrt{2}/2$ and the result is:

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

• The use of the formula $(\pm\sqrt2\pm\sqrt{-2})/2$ is a nice trick. In the linked answer I (IIRC at least partly in response to the discussion in the comments that lead to CWification) did get there, but should have seen it right away. +1 for unveiling the reason for the emergence of $\sqrt{\pm2}$ to this extent. – Jyrki Lahtonen Apr 5 '13 at 17:42
• Perhaps a more direct proof that $x^4+1$ is not irreducible is just to note that $x^4+1|x^8-1|x^{p^2-1}-1|x^{p^2}-x$. And $x^{p^2}-x$ has as its only irreducible factors the quadratic and linear prime polynomials. – Thomas Andrews Apr 5 '13 at 18:04
• Well, that's exactly how I did it originally. But somewhat surprisingly people don't think this is a duplicate of that :-) – Jyrki Lahtonen Apr 5 '13 at 18:07
• @JyrkiLahtonen N.S. suggested in comments to the question: $x^4+1=x^4+1 +2x^2-2x^2$. Hahaha, that makes the primacy of $\sqrt{2}$ and $\sqrt{-2}$ even more obvious! – Thomas Andrews Apr 5 '13 at 18:16

This question in fact already answered your question. Indeed, in the accepted answer, the complete solution can be found. So let me explain this and put it into CW.
As expounded in the link, we know that there is a primitive root of order $8$ in $\mathbb F:=\mathbb F_{p^2}$, called $u$. Since $\mathbb F$ is of degree $2$ over $\mathbb F_p$, the minimal polynomial is of degree at most $2$ over $\mathbb F_p$. Here, our $p\equiv 3\pmod 8$, so there is no $u$ in $\mathbb F_p$, as $u^4=-1$. Its conjugate is then $u^p=u^3$. Therefore $x^4+1$ has a factor given by $(x-u)(x-u^3)$. After easy calculations, we find that this becomes $(x^2-(u+u^3)x-1)$. And the other factor of that one must, after easy calculations of other conjugates of $u$, be $x^2+(u+u^3)x-1$. Therefore, $a:=u+u^3$ satisfies $a^2+2=0$. And I guess you know there is one such $a$ for $p=11$.

For those who jumped here:
We found the factorisation: $$(x^2-3x-1)(x^2+3x-1)$$.

Thanks for the attention, and inform me of any errors. Thanks.

• Also see that referred answer for more detail. – awllower Apr 5 '13 at 15:21

Look for a factorization of the shape $(x^2-ax+b)(x^2+ax+b)$. So we want $b^2\equiv 1\pmod{11}$, with $2b$ a quadratic residue.

Remark: Note that this is a general procedure for $x^4+1$ modulo an odd prime. The issue is whether one of $2$ or $-2$ is a quadratic residue of $p$. One of them is unless $p\equiv 5\pmod{8}$.

• In the case $p\equiv 5\pmod8$ we have that $2$ is a quadratic non-residue, so $i:=2^{(p-1)/4}$ is a square root of $-1$. In that case we have the factorization $(x^2+i)(x^2-i)$. – Jyrki Lahtonen Apr 5 '13 at 15:35
• In general, at least one of $a,b,ab$ is a square $\pmod p$. Take $a=2, b=-1.$ :) – Thomas Andrews Apr 5 '13 at 16:12
• Note, the standard formulation for the complex roots of $x^4+1=0$ can be formulated as $\frac{1}{2}(\pm\sqrt{2}\pm\sqrt{-2})$, which is why these two roots are important. – Thomas Andrews Apr 5 '13 at 16:14

Hint: We know that if $f(x)=x^4+1$ is reducible, then it either has a root or can be written $f(x)=g(x)h(x)$ where $\deg(g)=\deg(h)=2$.

• I guess OP already knew this, judged from the try. The point is: how to find those degree $2$ factors? – awllower Apr 5 '13 at 15:03

You may use the fact that $$x^2 = 9 \mod 11$$ has a solution, say $x = c$. Then use $$(x^2 + cx - 1)(x^2 - cx - 1),$$ and $c$ is pretty much obvious from here...


# Summation problem: $f(x)=1+\sum_{n=1}^{\infty}\frac{x^n}{n}$

I want to evaluate this summation:

$$S=1+x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+...+...$$

where, $|x|<1$

Here it is my approach

$$S=1+\sum_{n=1}^{\infty}\frac{x^n}{n}=f(x)$$

$$f'(x)=1+x+x^2+x^3+...+...=\frac{1}{1-x}$$

$$f(x)=\int f'(x)dx=\int \frac{1}{1-x} dx=-\ln(1-x)+C$$

$$f(0)=1 \Longrightarrow C=1$$

$$S=1-\ln(1-x)$$

And here is my problem:

I calculated this sum for only $|x|<1$.

Then, I checked in Wolfram Alpha and I saw that, this sum $f(x)$ converges for $x=-1$. But, this creating a contradiction with my solution. Because, the series $$f'(x)=1+x+x^2+x^3+...+...=\frac{1}{1-x}$$ for $x=-1$ doesn't converge, diverges. Therefore, there is a problem in my solution. But I can not find the source of the problem.

How can I prove the formula $f(x)=1-\ln(1-x)$ is also correct at the point $x=-1$ ?

Thank you very much.

• There's no problem with your solution. There's a problem with you assuming that if $\sum_n \frac{x^n}{n}$ converges, then $\sum_n x^{n-1}$ must converge. – mathworker21 Aug 23 '18 at 19:08
• Your approach worked for all $x$ you were asked to solve it for. WolframAlpha is telling you that the series also has a value for some $x$ outside that region, although your approach doesn't work in that case. Why does that matter? – Arthur Aug 23 '18 at 19:13
• @mathworker21 How can I prove the formula $f(x)=1-\ln(1-x)$ is also correct at the point $x=-1$ ? – Elvin Aug 23 '18 at 19:28
• @mathworker21 as I understand it, you mean my solution is incorrect $f(-1)-1=\ln 2$ .Am I right? – Elvin Aug 23 '18 at 20:34
• @student It's incorrect at $x = -1$. You may only deduce that $f'(x) = 1+x+x^2+\dots$ when $|x| < 1$. – mathworker21 Aug 23 '18 at 20:45

I don't know how familiar your are with power series, but this has to do with the notion of radius of convergence.

$\sum \left(\frac{x^n}{n}\right)_{n\in\mathbb{N^*}}$ is a power series with a radius of convergence $R=1$ (which can be proved by the ratio test), so indeed, it does converge for $|x|<1$, and does diverge for $|x|>1$.

As for $x=1$, the only case with $x=-1$ were we can't conclude right away, it could naively be anything, but it happens to converge.

The power series $\sum \left(x^n\right)_{n\in\mathbb{N^*}}$ is indeed the derivative of the previous one : we know it has the same radius of convergence, so for $x=1$, here again it could be anything ; and it happens to diverge.

The convergence circle is the only place were the convergence of a power series and its derivatives aren't always equivalent : it could be anything, and you can't deduce the convergence of the derivative from the convergence of the power series there.

As to show that the power series and $f(x)=1-\ln(1-x)$ are equal also for $x=-1$ (that is to say, to prove that $f(-1)$ is the sum of the series) :

$\cdot$ The power series and f both exist for $x$ in $[-1,1)$ (for the power series, you can prove it with the ratio test)

$\cdot$ They are both continuous on $[-1,1)$ : it is obvious for $f$, and for the power series, we know that the sum of the power series is continious strictly inside the convergence disk $(-1,1)$. We extend the continuity to -1 by the uniform convergence on $[-1,0]$.

$\cdot$ Are equal to one another on $(-1,1)$ which is dense in $[-1,1]$.

We can conclude that the power series and f are equal also at $x=1$, so $f(-1)$ is indeed the sum of the series.

If you are not familiar with this density theorem :

Since the power series is continuous on -1, by definition, $\lim\limits_{x\rightarrow\ -1}\sum\limits_{n=1}^{\infty}\frac{x^n}{n}=\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}$, the limits being taken by approaching from the right ($x>-1$).

But, since the power series and f are equal for $x>-1$, we can put $f$ instead of the power series inside the limit :

$$\lim\limits_{x\rightarrow\ -1}f(x)=\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}$$

Or $f$ is continuous on -1, so $\lim\limits_{x\rightarrow\ -1}f(x)=f(-1)$

Hence $\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}=f(-1)$.

• But we need more. We have a formula $f(x) = 1-\log(1-x)$ on $(-1,1)$. The series converges at $-1$, and the formula (extends to something that) is continuous at $-1$. Conclude that $f(-1)$ is the sum of the series at $-1$. – GEdgar Aug 23 '18 at 19:58
• The power series and f both exist on [-1,1) (ratio test), are both continuous on [-1,1) (for the power series, we extend the continuity to -1 by the uniform convergence on [-1,0]), and are equal to one another on (-1,1) which is dense in [-1,1]. We can conclude that the power series and f are equal also at x=1. – Harmonic Sun Aug 23 '18 at 20:02
• +1 for a complete proof. – GEdgar Aug 23 '18 at 21:28

By the ratio test, $$\lim_{n\to\infty } \left|\frac{x^{n+1}}{n+1}\frac{n}{x^n} \right|=\lim_{n\to\infty}|x|\frac{n}{n+1}<1$$ whenever $|x|<1$. Thus we have convergence on $(-1,1)$. We need to check the endpoints separately. For $x=1$, we have the diverging harmonic series. For $x=-1$, we have the alternating harmonic series, which converges.

A power series $\sum_{n=0}^\infty a_n x^n$ (I am assuming the series is centered at zero for definiteness) converges either only at $0$, or on some interval $I$ centered at zero. The half-length of $I$ is called the radius of convergence $R$, and can be computed generally as $\frac{1}{R}=\limsup_{n \to \infty} a_n^{1/n}$ (understood as $R=\infty$ if $1/R$ is zero in the above formula).

A power series with a given radius of convergence may or may not converge at the endpoints $\pm R$. $\sum_{n=1}^\infty \frac{x^n}{n}$ turns out to have radius of convergence $1$ and converges at $-1$ but does not converge at $1$. In the interior of its interval of convergence, a power series may be differentiated term by term; thus in your example you can deduce the derivative of $-\ln(1-x)$ is $\frac{1}{1-x}$ for $|x|<1$ by differentiating its series term by term. In general differentiation may change how the series behaves at its endpoints, as you found here.

It's well-known that $$\ln(1+y)=y-\frac{y^2}{2}+\frac{y^3}{3}-\frac{y^4}{4}+\cdots,~~~\forall y \in (-1,1].\tag1$$

Thus, let $y=-x.$ we have $$\ln(1-x)=-x-\frac{x^2}{2}-\frac{x^3}{3}-\frac{x^4}{4}+\cdots,~~~\forall x \in [-1,1).\tag2$$

As result, $$S=1+x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+\cdots=1-\left(-x-\frac{x^2}{2}-\frac{x^3}{3}-\frac{x^4}{4}+\cdots\right)=1-\ln(1-x).$$

Notice that, $(1)$ demands $-1<y\leq 1$. then in $(2)$, we demand $-1<-x\leq 1,$ namely, $-1\leq x<1.$

It is best to use elementary arguments for such well known power series rather than start integrating power series. While power series methods work fine in the interior of region of convergence, the behavior at boundary needs additional analysis (for example Abel's theorem).

Below I prove the formula $$\log(1+x)=x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\dots\tag{1}$$ for all values of $$x$$ satisfying $$-1. The series in question is obtained by replacing $$x$$ with $$-x$$.

Let's start with the algebraic identity $$\frac{1}{1+t}=1-t+t^2-\dots+(-1)^{n-1}t^{n-1}+(-1)^{n}\frac{t^{n}}{1+t}\tag{2}$$ which holds for all $$t\neq -1$$ and all positive integers $$n$$. Integrating this identity with respect to $$x$$ over interval $$[0,x]$$ where $$x>-1$$ we get $$\log(1+x)=x-\frac{x^2}{2}+\dots+(-1)^{n-1}\frac{x^n}{n}+(-1)^nR_n\tag{3}$$ where $$R_n=\int_{0}^{x}\frac{t^n}{1+t}\,dt$$ Our job is done if we can show that $$R_n\to 0$$ as $$n\to\infty$$ for all $$x\in(-1,1]$$. If $$x=0$$ then $$R_n=0$$. If $$0 then we can see that $$0 so that $$R_n\to 0$$. If $$x=-y$$ and $$y\in(0,1)$$ then $$R_n=(-1)^{n+1}\int_{0}^{y}\frac{t^n}{1-t}\,dt$$ The integral above is clearly less than or equal to $$\frac{1}{1-y}\int_{0}^{y}t^n\,dt=\frac{y^{n+1}}{(1-y)(n+1)}$$ which tends to $$0$$ as $$n\to\infty$$ and hence $$R_n\to 0$$. It is thus established that $$R_n\to 0$$ as $$n\to\infty$$ for all $$x\in(-1,1]$$. Taking limits as $$n\to\infty$$ in equation $$(3)$$ gives us the series $$(1)$$ which is valid for $$x\in(-1,1]$$.


# Inequality from Chapter 5 of the book *How to Think Like a Mathematician*

This is from the book How to think like a Mathematician,

How can I prove the inequality $$\sqrt[\large 7]{7!} < \sqrt[\large 8]{8!}$$

without complicated calculus? I tried and finally obtained just $$\frac 17 \cdot \ln(7!) < \frac 18 \cdot \ln(8!)$$

• Are we allowed complex roots and negative roots to prove the contrary ;-) – Philip Oakley Feb 28 '15 at 19:22
• I don't think that it is in the proposition – Gwydyon Mar 2 '15 at 11:24
• Can these simpler approaches to a specific example be used to produce a simpler answer to the "general case"? – Mark Hurd Mar 3 '15 at 3:02
• I don't know, the problem was "as is" – Gwydyon Mar 3 '15 at 16:35
• – Martin Sleziak Dec 11 '16 at 11:36

Your inequality is equivalent to $$(7!)^8 < (8!)^7$$ divide it by $(7!)^7$, and get $$7! < 8^7$$ and this is clear, since $$1 \cdots 7 < 8 \cdots 8$$

• In the spirit of the question title, I'd note that the first line of this answer is key. Maths does of course love cleverness, but also thrives on knowing to do really simply things such as taking powers of both sides here to remove those ugly roots. – Keith Feb 27 '15 at 3:02
• You are right, great ! I would have of to think there. – Gwydyon Feb 28 '15 at 17:39
• Elegant! really clever! – Max Payne May 27 '15 at 16:19

Think of

$${\ln(7!)\over7}={\ln(1)+\cdots+\ln(7)\over7}$$

as the average of seven numbers and

$${\ln(8!)\over8}={\ln(1)+\cdots+\ln(8)\over8}$$

as the average when an eighth number is added. Since the new number is larger than the previous seven, the average must also be larger. (E.g., if you get a better score on your final than on any of your midterms, your grade should go up, not down.)

• You are right, but it is clear to me only when i compute ln(8) – Gwydyon Feb 28 '15 at 18:08
• @Gwydyon, the logarithm is an increasing function, so $\ln(8)$ is larger than its predecessors. – Barry Cipra Feb 28 '15 at 20:00
• Yes I know that. – Gwydyon Mar 2 '15 at 11:21
• @Gwydyon, I guess I don't understand your previous comment then. – Barry Cipra Mar 2 '15 at 15:22
• Because x/8 is lower than y/7, if x=y, that is not the case but ln(7!) and ln((7+1)!) are near close, for x>=1 – Gwydyon Mar 3 '15 at 16:41

Note that $$\sqrt[7]{7!} < \sqrt[8]{8!} \iff\\ (7!)^8 < (8!)^7 \iff\\ 7! < \frac{(8!)^7}{(7!)^7} \iff\\ 7! < 8^7$$ You should find that the proof of this last line is fairly straightforward.

• You are right but someone has writen the same statements – Gwydyon Feb 28 '15 at 18:11

$8\ln (7!) < 7\ln (8!) \Rightarrow \ln (7!) < 7\ln 8 \iff \ln 1 + \ln 2 +\cdots \ln 7 < 7\ln 8$ which is clear.

• great! you achieved my second statement – Gwydyon Feb 28 '15 at 18:53

You have already turned the comparison of two geometric means into the comparison of two arithmetic means. So consider a more general comparison: show that appending a larger number always raises the geometric mean of a list of positive numbers by showing the effect on the arithmetic mean. Suppose the $x_i$ are real and $x_{n+1}$ is strictly largest. \begin{equation*} \begin{split} (1/(n+1)) \sum_{i=1}^{n+1} x_i &= (1/(n+1)) (x_{n+1} + \sum_{i=1}^{n} x_i) \\ &=(1/(n+1) (n x_{n+1}/n + n \sum_{i=1}^{n} x_i / n) \\ &> (1/(n+1) (\sum_{i=1}^{n} x_i/n + n \sum_{i=1}^{n} x_i / n) \\ &= (1/(n+1) ((n+1) \sum_{i=1}^{n} x_i / n) \\ &= \sum_{i=1}^{n} x_i / n \end{split} \end{equation*}

Note that we really only needed $x_{n+1}$ to be larger than the previous mean.


Truth of $x^2-2=0$

From Algrebra by Gelfand, it says that "When we claim that we have solved the equation $x^2-2=0$ and the answer is $x=\sqrt{2}$ or $x=-\sqrt{2}$, we are in fact cheating. To tell the truth, we have not solved this equation but confessed our inability to solve it; $\sqrt{2}$ means nothing except "the positive solution of the equation $x^2-2=0$

Can someone please explain what he really means? Does he mean every irrational number is meaningless? Thanks in advance.

• I think he might be saying that irrational numbers could be thought of as solutions to polynomial equations, not the other way around. – Airdish May 27 '17 at 16:40
• I believe he is saying the result is circular. – Simply Beautiful Art May 27 '17 at 16:44
• The downvote puzzles me. Gelfand is making a very interesting subtle point and the OP is quite right to be puzzled by it, and ask. – Ethan Bolker May 27 '17 at 16:55
• @EthanBolker He's a good writer. I just don't understand sometimes and asked. – Mathxx May 27 '17 at 16:58
• Indeed he is a good writer. As the comments and answers show, you asked a good question. I hope they help you understand. – Ethan Bolker May 27 '17 at 17:12

He is saying the following.

1. $\sqrt{2}$ is defined as "the number such that its square is two."
2. The statement "the solution $x$ to $x^2-2 = 0$ is $\sqrt{2}$" is therefore saying "the solution $x$ to $x^2-2=0$ is the number such that its square is two."

As you can see, this is a rather circular statement. This doesn't mean that irrational numbers are meaningless (indeed, $\sqrt{2}$ does exist -- see the comments and @EthanBolker's answer for more on this), but rather saying that this method of definition limits us to statements like "the number such that its square is two" or "half of the number such that its square is eight."

• Nice answer, except I don't think it is clear that $\sqrt{2}$ exists at all. It is either taken as an axiom, the completeness axiom of the reals, or is to be proved, depending on our construction of the real numbers... – SEWillB May 27 '17 at 16:51
• @SEWillB there certainly exist right triangles with legs equal to $1$ unit. Now, does there not exist a hypotenuse to the triangle, since it would be of length $\sqrt 2$ units, so may not exist? – Namaste May 27 '17 at 16:56
• SEWillB (continued)... And without a hypotenuse for a right triangle, we cease to have such a triangle? So the only right triangles require legs of lenghts $x, y$ such that the length of the hypotenuse, $\sqrt{x^2 + y^2},$ is rational? – Namaste May 27 '17 at 17:04
• @amWhy, I never liked these arguments at all. There is a nice bit in a book I read a long time ago (Liebeck introduction to pure mathematics) showing the 'existence' of $\sqrt{n}$ by geometrical construction like that. But these arguments aren't convincing to me because it's not clear what you're trying to do in my opinion. – SEWillB May 27 '17 at 17:08
• So you do not believe the Pythagorean Theorem? Well, then, I think I've wasted my time commenting with you. – Namaste May 27 '17 at 17:09

To elaborate on @fractal1729 's lovely correct answer:

Having defined $\sqrt{2}$ as "the number such that it's square is $2$" it's reasonable to ask whether there is such a number.

The Greeks knew that the answer is "no" if "number" means "rational number". So in order to claim the existence of $\sqrt{2}$ you must enlarge the system of rational numbers. The Greeks essentially sidestepped that question by doing geometry rather than arithmetic, using points on a line instead of numbers. Clearly there's a point on the "number line" with the right length since you can draw the diagonal of a unit square.

In later centuries mathematicians found more formal algebraic ways to enlarge the system of rational numbers to include what we now call all the "real numbers". The new ones are the irrationals. There are several ways to do this. One of the most common is to make precise the notion of an infinite decimal, along with rules for arithmetic with them. Others come with the names "Cauchy sequences" or "Dedekind cuts".

• To add a bit to your answer, note that the very notion of compass and straightedge constructions assumes with no justification that one can construct ideal circles/lines and somehow they always intersect when certain conditions are met (such as closer than the sum of radii). When one thinks about it, that is not at all obvious. Perhaps it is not even physically meaningful, for all we know! If so, it may very well be that $\sqrt{2}$ can't be constructed in any suitable physical sense! Furthermore, the computable reals are elementarily equivalent to the standard reals. Interesting at least. – user21820 May 29 '17 at 15:26

Using definite descriptor notation, we can define:

$$\sqrt{x} = (\iota y \in \mathbb{R})(y \geq 0 \wedge y^2=x)$$

In words: $\sqrt{x}$ is the unique $y \geq 0$ such that $y^2=x$.

From this, you can show that for all $y$ and all $x \geq 0$, we have: $$y^2 = x \iff y \in \pm\sqrt{x}.$$

But in some sense, this is a purely logical construct, at least insofar as we haven't explained how to approximate $\sqrt{x}$ to arbitrary precision. There's ways of doing this, but we haven't given one.

I think the author is simply wrong. There is another meaningful way of defining $\sqrt{2}$. Consider the following sequence: $$x_{n+1} := \frac{1}{2}\left(x_n + \frac{2}{x_n}\right)$$ with $x_0=1$.

Then $\lim_{n\to\infty} x_n=\sqrt{2}$, even though all $x_n\in\mathbb{Q}$ for arbitrary $n\in\mathbb{N}$. Now instead of defining $\sqrt{2}$ as the solution of $x^2-2=0$ we could have also defined it as the limit on $x_n$.

Proof for the sequence can be found here (German only).

• This is still circular, in a deeper way. How do you define the notion of a limit without some underlying structure of the real numbers? In the rationals that sequence has no limit. What Cauchy showed is that It is possible to define the limit as the sequence itself. It's the necessity for some definition that's the crux of Gelfand's cryptic comment. – Ethan Bolker May 27 '17 at 17:10
• There is no need to use $\mathbb{R}$ with the above sequence. For example no transcendental numbers (like $\pi$) are needed. And in some sense $37$ is also just the result of multiple (albeit finite) application of Peano's axioms. The "only" difference with the above definition of $\sqrt{2}$ is that you need to apply the appropriate axioms an infinite number of times. – Hannebambel May 27 '17 at 17:18
• No, the author is right. As @EthanBolker says, your sequence has no limit within $\mathbb{Q}$. The key difference vs. the construction of $37$ lies exactly in the finite number of steps: no matter how large the $n$, no number $x_n$ in your sequence will ever equal $\sqrt{2}$. And the fact that $\sqrt{2}$ is not in $\mathbb{Q}$ is equivalent to the notion that $x^2 - 2 = 0$ is unsolvable with the standard algebraic operations. – Roland May 28 '17 at 7:55
• I somehow still don't get how the author is correct. The author says "$\sqrt{2}$ means nothing except the positive solution of the equation $x^2−2=0$", whereas I think that $\sqrt{2}$ also means the limit of the aforementioned sequence. – Hannebambel May 28 '17 at 18:23
• This answer shows that, in a certain sense, it is possible to "solve" for what $\sqrt{2}$ is. But Gelfand never claimed it wasn't possible to do so--that was not his point at all. His point is that merely naming the answer as $\sqrt{2}$ doesn't solve anything, because all you've done is give a name to what the answer is. – Eric Wofsey May 29 '17 at 21:48

This is a great question (+1) and judging by the quote, Gelfand must be a great writer at least for algebra textbooks (I confess that I have not read any of his books and hence judging only from the quote in question). In fact he has pinned down the essence of solution of polynomial equations via algebra.

If we restrict ourselves to algebra then the solution of polynomial equations via radicals is equivalent to replacing one polynomial equation with a set of binomial equations of type $x^{n} - a=0$. And for binomial equations we don't do anything apart from inventing symbols like $a^{1/n}$.

Next there are some equations which can't be solved via radicals. How does an algebraist deal with the situation now? He smartly handles the situation using field extensions and for any polynomial $f(x)$ over a field $F$ one can create an extension field $E$ which contains all the roots of $f(x)$. The technique of construction of this extension field is so simple that one is tempted to call such mechanism of solution of equations as "cheating". Thus if $f$ is irreducible then one can get a root in quotient $F[x] /(f(x))$ and guess what the root of $f(x)$ is the coset $x+(f(x))$.

In effect algebraic methods never try to find the value of root of an equation, but they are rather concerned with the structure of the field extensions which contains the roots. In some very special cases such extensions are radical and these are the familiar ones where we use the quadratic formula, or Cardano's formula (or more complicated stuff of similar type).

Let's now come back to the usual scenario where the equations have coefficients in specific fields $\mathbb{R}$ and $\mathbb{C}$ and lets first handle the case when coefficients are real. Real numbers are the product of a non-algebraic process and their existence is almost on same footing as those of rational numbers. Thus they can and are used to measure magnitude and it is agreed by convention that there are sufficient real numbers to locate every point on a geometric line so that all the geometric measurement is possible via real numbers.

But then the real numbers are a very powerful system and offer us the following justification for the symbol $a^{1/n}$:

Theorem 1: If $a$ is a positive real number and $n$ is a positive integer then there is a unique positive real number $b$ such that $b^{n} =a$ and it is denoted by symbol $a^{1/n}$.

Thus at least some binomial equations of type $x^{n} - a=0$ have a root which has existence in the real number system. By existence we mean that it is possible to give some concrete idea about this root in comparison to the integers and rationals. In other words we can provide some approximation to the value of the root using the rational numbers. And moreover the approximation can be as accurate as we want. It is in this sense of approximation via rationals that every real number exists. And it applies to all sorts of irrational numbers including the famous ones $e, \pi, \sqrt{2}$. Thus irrational numbers are not meaningless, they are as meaningful as the rationals and perhaps mathematically more significant, but unfortunately algebraic techniques cannot help in discovering their true nature.

Let's also note that there are some real numbers which are the roots of certain polynomial equations with rational coefficients and these we call algebraic real numbers. The reason for extending our number system from $\mathbb{Q}$ to $\mathbb{R}$ is not to give some sort of existence to these algebraic numbers (like $\sqrt{2}$). As far roots of polynomials are concerned the algebraic mechanism of field extensions is a sufficient and beautiful approach. Even if we tried to add such numbers to $\mathbb{Q}$ it does not give us $\mathbb{R}$, but it rather gives $\overline{\mathbb{Q}}$ which we call the algebraic closure of $\mathbb{Q}$. It includes all the algebraic numbers both real and complex, but it does not capture all the real numbers or all the complex numbers. In fact one can prove that like $\mathbb{Q}$, the set $\overline{\mathbb{Q}}$ is also countable whereas both $\mathbb{R}, \mathbb{C}$ are uncountable.

Real numbers were invented to deal with the essential/pressing need to arithmetize geometry. The idea was to develop of a system of numbers which could correspond to the points on a line and it was known from the time of Pythagoras (or perhaps even earlier) that there were some points on the line which did not correspond to a rational number. Another need for real numbers was coming from the very powerful techniques of calculus which were based on geometrical intuition, but there was no rigorous justification of these methods using arithmetical means.

To answer your question, we have two ways to look at the symbol $\sqrt{2}$. One is via algebra which says that it is a solution to the equation $x^{2}-2=0$ and in this approach we can't distinguish between $\sqrt{2}$ and $-\sqrt{2}$. Another way is to think of it as a real number represented by its rational approximations. Thus we can say that $\sqrt{2}$ is a positive real number which is greater than all the positive rationals whose square is less than $2$ and it is less than all the positive rationals whose square is greater than $2$. Further in this particular case we are lucky to have a mechanism of locating a point on the number line corresponding to it via geometrical constructions with ruler and compass.

Let's also discuss a bit about the complex number system. But before we do that we need to note that there is another set of equations which the real number system can handle very well:

Theorem 2: If $f(x)$ is polynomial of odd degree with real coefficients then there is at least one real number $c$ such that $f(c) =0$.

But there are many equations with real coefficients for which there is no root in the real number system. The simplest and most famous such equation is $x^{2}+1=0$. Once again an algebraist comes to the rescue and creates a field extension $\mathbb{C}$ as the quotient $\mathbb{R} [x] /(x^{2}+1)$ and surprisingly in one shot the algebraist succeeds in solving all polynomial equations whatsoever :

Fundamental Theorem of Algebra: If $f(x)$ is a polynomial of positive degree with complex coefficients then there is a complex number $c$ such that $f(c) =0$.

But this is all cheating. The power of the above theorem is not due to the algebraic technique of creating field extensions via quotients, but rather due to the properties of real numbers mentioned in theorem 1 and 2 above.

• Technically, this kind of justification can only reach the computable reals and also the computable complex numbers, which includes the algebraic closure of the rationals. Notice that the computable complex numbers is algebraically closed, so we can't justify going beyond it because we can't actually demonstrate the existence of anything beyond it! Also, you are right that the fact that the complex numbers are algebraically closed is at its crux not really a matter of algebra but of analysis. Even the field-theoretic proof at one point requires IVT for odd-degree polynomials. – user21820 May 29 '17 at 16:05
• In other words the only reason we have for believing the existence of all standard real numbers (whether by Cauchy sequences or Dedekind cuts) is that we must believe the power-set axiom or equivalent, which is purely set-theoretic and has no ontological justification. Actually, even function types are not enough to grant the classical power-set, because if we use type theory we can have function types that are compatible with the universe being computable. What breaks is that type membership may not be always true or false. – user21820 May 29 '17 at 16:35
• Of course, ZFC set theory is very elegant and convenient for modern mathematics and so, justified or not, it has found acceptance. =) – user21820 May 29 '17 at 16:36


# Summary of my understanding of sequences and series' convergence and divergence?

I'm trying to summarise my understanding of infinite sequences, series, and their relationships with respect to convergence at the fundamental level. Here is what I know. How much of this is correct?

First off, here's a table of the notations that I use, and their corresponding meaning.

My understanding is that:

• The sequence $\lbrace a_n \rbrace _{n=0}^{\infty}$ converges if $$\lim\limits_{n\to\infty}a_n=L_{a}.$$

• The infinite series $\sum\limits_{n=0}^{\infty}a_n$ converges if its sequence of partial sums, $\lbrace s_n \rbrace _{n=0}^{\infty}$, has a limit, i.e.$$\lim\limits_{n\to\infty}s_n=L_{s}.$$

• If the infinite series $\sum\limits_{n=0}^{\infty}a_n$ converges, then the limit of the sequence $\lbrace a_n \rbrace _{n=0}^{\infty}$ is $0$, i.e. $$\sum\limits_{n=0}^{\infty}a_n \: converges \rightarrow \lim\limits_{n\to\infty}a_n=0.$$

• The divergence test:

If the the limit of the sequence $\lbrace a_n \rbrace _{n=0}^{\infty}$ is NOT $0$ or does not exist, then the infinite series diverges, i.e. $$\lim\limits_{n\to\infty}a_n\neq0 \rightarrow \sum\limits_{n=0}^{\infty}a_n \: diverges$$

Would seriously appreciate it if anyone could verify whether the above is accurate or incorrect in any way.

EDIT: I've modified the two limits notation that were mentioned in the comments and answers below, as well as adding the additional condition (limit does not exist or does not equal zero) for the divergence test. I appreciate all the answers/comments.

• I would say that the notation $L_{a_n}, L_{s_n}$ looks pretty bad, these terms should not depend on $n$. – user99914 Dec 4 '17 at 5:08
• BTW one useful equivalent of $\lim_{n\to \infty}a_n=L,$ that students often don't think of , is : For every $r>0$ the set $\{n:a_n\not \in [-r+l,r+L]\}$ is finite. – DanielWainfleet Dec 4 '17 at 5:49

Everything is correct, though the notation $\lim\limits_{n\to\infty}a_n=L_{a_n}$ is nonstandard. Perhaps an improvement would be to write it as $\lim\limits_{n\to\infty}a_n=L_{a}.$ Normally just an $L$ will suffice but if you're working with multiple sequences (such as $a_n, b_n, c_n$) then $L_a$ is a good notation for the limit of the sequence $a$.

The reason why $L_{a_n}$ is not so good is because $n$ is just a free variable that has no importance whatsoever; if you write $a_n$ or $a_k$ it's the same thing. What matters is the sequence whose name is "$a$".

Also note that your last two statements are trivially equivalent; they are contrapositives of each other. In general "If $p$ then $q$" is stating the same thing as "If not $q$ then not $p$".

Therefore, just from knowing

$$\sum\limits_{n=0}^{\infty}a_n \: converges \rightarrow \lim\limits_{n\to\infty}a_n=0.$$

you can deduce

$not (\lim\limits_{n\to\infty}a_n=0 ) \rightarrow not (\sum\limits_{n=0}^{\infty}a_n \: converges)$

or in other words

$\lim\limits_{n\to\infty}a_n \not =0 \text{ or the limit doesn't exist} \rightarrow \sum\limits_{n=0}^{\infty}a_n \: diverges$

• Regarding the redundancy in my understanding, although $\lim\limits_{n\to\infty}a_n \not =0 \text{ or the limit doesn't exist} \rightarrow \sum\limits_{n=0}^{\infty}a_n \: diverges,$ it does not mean that $\lim\limits_{n\to\infty}a_n=0 \rightarrow \sum\limits_{n=0}^{\infty}a_n \: converges,$ am I right? – user98937 Dec 4 '17 at 13:11
• @user98937 Yes that's perfectly right. What you wrote is the converse of $\sum\limits_{n=0}^{\infty}a_n \: converges \rightarrow \lim\limits_{n\to\infty}a_n=0.$. Converses are sometimes true, but not in this case as you can see from $\sum_{n=1}^{\infty} \dfrac 1n$ which diverges, in spite of the fact that $\lim_{n \to \infty} \dfrac 1n=0$ – Ovi Dec 4 '17 at 15:33

Everything you wrote looks good to me.


# Confusion regarding pdf of circularly symmetric complex gaussian rv

Considering a random variable $x$ that takes in values from a complex domain. Its real and imaginary components are totally uncorrelated. I am following this link and also studying this document.

In the wikipedia link, the pdf for a single observation is given and $k =2$ for bivariate gaussian as my assumption is that the real and imaginary are totally uncorrelated and are gaussian respectively. There is a 2 in the denominator in the pdf but the log likelihood for the complex case does not have any 2 in the denominator. The log-likelihood for $k=2$ would be $$-N \ln| \Sigma| - (x_n) {|\Sigma|}^{-1}(x_n)^H - k N \ln \pi$$ where $\mu=0$ as I am assuming zero mean r.v $x$

• Confusion 1:

I was thinking that the variance of $x$ was $$\Sigma = \begin{bmatrix}\sigma_1^2 & 0\\ 0& \sigma_2^2\end{bmatrix}\,\text.$$ So for $N$ samples (observation), the joint pdf would turn out to be $$P_x(x_1,x_2,...,x_N) = \prod_{n=1}^N\frac{1}{\pi \sigma^2_x} \exp \bigg(\frac{-{({x_n})}^H ({x_n})}{\sigma^2_x} \bigg)$$ where $\sigma^2_x = [\sigma_1^2,\sigma_2^2]$. Would there be a 2 in the denominator of the pdf and what is the correct pdf expression?

• Confusion 2:

In the document, the expression for the pdf for complex case looks different from the wikipedia link. Are they the same but maybe I am missing some link between them? Which pdf should I use?

• Confusion 3:

When simulating the r.v in Matlab with zero mean and variance 1, I am halving the variance because the real and imaginary part's variance should add up to 1. Then, would the pdf also contain half of the variance as $\sigma^2_x/2$?

Let me try to establish the relation between the univariate PDF for a real Gaussian and the univariate PDF for a complex proper (i.e. circular symmetric) Gaussian.

You know that
$p_x(x)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp(\frac{-x^2}{2\sigma^2})$ is the PDF of a real-valued Gaussian with variance $\sigma^2$. We write $x\sim\mathcal{N}(0,\sigma^2)$ to denote that $x$ is a random variable that follows a real-valued Gaussian with zero mean and variance $\sigma^2$.

Now, let $z=a+jb$ be a circular symmetric random variable with real part $a$ and imaginary part $b$. In a circularly symmetric Gaussian random variable, the real and imaginary part are i.i.d., i.e. $a\sim\mathcal{N}(0,\sigma^2)$ and $b\sim\mathcal{N}(0,\sigma^2)$. Since $a,b$ are independent, their joint PDF is the product of their PDFs.

$$p_z(z=a+jb)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(\frac{-a^2}{2\sigma^2}\right)\cdot\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(\frac{-b^2}{2\sigma^2}\right)$$

which gives the PDF of the complex variable $z$ at the value $a+jb$. We can reformulate this to \begin{align}p_z(z=a+jb)&=\frac{1}{2\pi\sigma^2}\exp\left(\frac{-(a^2+b^2)}{2\sigma^2}\right)\\&=\frac{1}{2\pi\sigma^2}\exp\left(\frac{-z^*z}{2\sigma^2}\right)\\&=\frac{1}{2\pi\sigma^2}\exp\left(\frac{-\|z\|^2}{2\sigma^2}\right)\end{align}

We also write for this case that $z$ follows a circular Gaussian distribution and denote this by $z\sim\mathcal{CN}(0,2\sigma^2)$. Why is it suddenly $2\sigma^2$ (i.e. the double variance compared to the uni-variate, real case? Well, because $E[\|z\|^2]=2\sigma^2$ since it consists of a real and an imaginary part (which are independent and hence their variance adds up together).

So, to sum up:

• if $x\sim\mathcal{N}(0,\sigma^2)$, then $p_x(x)=\frac{1}{\sqrt{2\pi\sigma^2}}\exp\left(-\frac{x^2}{2\sigma^2}\right)$
• if $z\sim\mathcal{CN}(0,\sigma^2)$, then $p_z(z)=\frac{1}{\pi\sigma^2}\exp\left(-\frac{z^*z}{\sigma^2}\right)$

• Thank you so much, cannot express my gratitude in words here.....just to clarify 2 things from you - (1) if I consider design where the r.v $z \sim CN(0,2\sigma^2)$ then the pdf has the 2 in the denominator, otherwise if $z \sim CN(0,\sigma^2)$ then there is no 2 in the pdf's denominator. So, either design is acceptable. Is my understanding right? (2) notations - in my question I wrote the $[.]^H$ complex conjugate transpose but you have written * which is only the conjugate. Why the $[.]^H$ is wrong? – Ria George Apr 18 '17 at 15:33
• sure, if $z\sim CN(0,2\sigma^2)$, then there is the two in the denominator, if its $z\sim CN(0,\sigma^2)$, then it's not there. Here, the two comes from the description of the variance (e.g. if we had $z\sim CN(0,1.23456\sigma^2)$, then in the denominator there would be $1.23456$). For a scalar variable $z$, $[]^H$ and $[]^*$ are equal. When it comes to vector-variables, you'd need $[]^H$. However, note that in this case, also the denominator changes to $\pi^k\sigma^{2k}$, since the PDF is the product of the $k$ PDFs of each component (k is the vector size); each component has var. $\sigma^2$. – Maximilian Matthé Apr 18 '17 at 17:58
• This answer has the correct ideas but is marred badly by a confusion of the concepts of probability and probability density. The probabiity that a continuous random variable equals a given number is $0$, regardless of the choice of number. Indeed, the probability that $z$ equals $a+jb$ (where we choose $a=b=0$) is claimed to be $$P(z=0+j0)=\frac{1}{2\pi\sigma^2}$$ which has value greater than $1$ if $\sigma^2 < \frac{1}{2\pi}$. -1 pending clean-up of the answer to be correct. – Dilip Sarwate Apr 18 '17 at 22:26


# Integral of $\text{Log}(z)$

I'd like to check my work. I'm trying to integrate $f(z)=\text{Log}(z)$ on the right half of the unit circle from $-i$ to $i$. $\text{Log} = \ln(r)+i\theta$ according to my book. So, \begin{align} \int_C f(z)\,dz&=\int_{z_1}^{z_2}f(z)\,dz\\\\& = \int_{-i}^i \text{Log}\,dz \\\\ &= \bigg[z\text{Log}-z\bigg]_{-i}^i \\\\ &= (i\text{Log}(i)-i)-\left(-i\text{Log}(-i)+i\right) \\\\ &= i\left(\ln(1)+\frac{\pi}{2}i\right)-i \ + i\left(\ln(1)-\frac{\pi}{2}i \right) \ -i \\\\&= -2i \\\\ \therefore \int_{-i}^i \text{Log}\,dz=-2i \end{align}

This may be incorrect, I'm not really sure how to incorporate the branch cut here.

Thanks!

• the circuit is a circle not the segment [-i,i]. – zwim Jun 15 '17 at 5:13
• So, I'm required to use the formula $\int_C f(z)dz=\int_a^b f[z(\theta)]z'(\theta)d\theta$? Where $a$ and $b$ are $\frac{\pi}{2}$ and $\frac{-\pi}{2}$? What would my choice for $z'(\theta)$ be in this case? – Kosta Jun 15 '17 at 5:14
• Have a look at these answers : math.stackexchange.com/questions/1602614/… – zwim Jun 15 '17 at 5:34

I thought it might be instructive to present two alternative approaches to evaluate the integral of interest. To that end we proceed.

Let $\text{Log}(z)=\log(|z|)+i\text{Arg}(z)$ where $-\pi < \text{Arg}(z)\le \pi$. In addition, let $C$ denote the semicircular contour in the right-half plane of radisu $1$ and that begins at $z=-i$ and ends at $z=i$.

METHODOLOGY $1$:

On $C$, $z=e^{i\theta}$, $-\pi/2\le \theta \le \pi$. Hence, the integral $\int_C \text{Log}(z)\,dz$ is given by

\begin{align} \int_C \text{Log}(z)\,dz&=\int_{-\pi/2}^{\pi/2} \text{Log}(e^{i\theta})\,ie^{i\theta}\,d\theta\\\\ &=-\int_{-\pi/2}^{\pi/2} \theta e^{i\theta}\,d\theta\\\\ &=-2i\int_0^{\pi/2} \theta\sin(\theta)\,d\theta\\\\ &=-2i \end{align}

METHODOLOGY $2$:

Another approach is to exploit Cauchy's Integral Theorem. Inasmuch as $\text{Log}(z)$ is analytic for $z\in \mathbb{C}\setminus (-\infty,0]$. Then, the integral over $C$ can be deformed to connect $-i$ to $i$ along any rectifiable path that does not intersect the branch cut. Therefore, we write

\begin{align} \int_C \text{Log}(z)\,dz&= \lim_{\epsilon\to 0^+}\left(\int_{-1}^{-\epsilon }\text{Log}(iy)\,i\,dy+\int_{-\pi/2}^{\pi/2}\text{Log}(\epsilon e^{i\theta})\,ie^{i\theta}\,d\theta+\int_{\epsilon }^1\text{Log}(iy)\,i\,dy\right)\\\\ &=i \lim_{\epsilon\to 0^+}\int_\epsilon^1 \left(\text{Log}(-iy)+\text{Log}(iy)\right)\,dy\\\\ &=2i\int_0^1 \text{Log}(y)\,dy\\\\ &=-2i \end{align}

as expected!

• This is very helpful, thank you Mark! – Kosta Jun 16 '17 at 16:21
• You're welcome. Pleased to hear that this is helpful! – Mark Viola Jun 16 '17 at 16:25

An alternate way to check, without using contours, is to use $$\int \ln(x) \, dx = x \, \ln(x) - x$$ which provides \begin{align} \int_{-i}^{i} \ln(x) \, dx &= \left( i \, \ln(e^{\pi \, i/2}) - i \right) - \left( -i \, \ln(e^{-\pi \, i/2}) + i \right) \\ &= \frac{\pi \, i^2}{2} - \frac{\pi \, i^2}{2} - 2 i \\ &= -2i. \end{align} With this it can be stated that the real line integral result is the same as the contour integral result.

looks good to me .Fundamental theorem of calculus wins again


# Thread: Trigonometric Identity Problem

1. ## Trigonometric Identity Problem

How do you show that:
2sinxcosx=
(4tan{x/2})/(1+tan2{x/2}) . (1-tan2{x/2})/(1+tan2{x/2})
Thanks a lot for helping!!

2. ## Re: Trigonometric Identity Problem

Originally Posted by JiaGeng
How do you show that:
2sinxcosx=
(4tan{x/2})/(1+tan2{x/2}) . (1-tan2{x/2})/(1+tan2{x/2})
$1+\tan^2(\frac x 2) = \sec^2(\frac x 2)$

$1-\tan^2(\frac x 2) = \dfrac{2 \tan(\frac x 2)}{\tan(x)}$

$\sin(2x)=2\sin(x)\cos(x)$

-------------------------
$\dfrac{4 \tan(\frac x 2)}{1+\tan^2(\frac x 2)}\dfrac{1-\tan^2(\frac x 2)}{1+\tan^2(\frac x 2)}=$

$\dfrac{4 \tan(\frac x 2)}{\sec^2(\frac x 2)}\dfrac{ \dfrac{2 \tan(\frac x 2)}{\tan(x)}}{\sec^2(\frac x 2)}=$

$4\cos(\frac x 2)\sin(\frac x 2)\dfrac{2\sin(\frac x 2)\cos(\frac x 2)}{\tan(x)}=$

$2\sin(x)\dfrac{\sin(x)}{\tan(x)}=$

$2\sin(x)\cos(x)$

3. ## Re: Trigonometric Identity Problem

Hello, JiaGeng!

$\text{Prove: }\:2\sin x\cos x\:=\:\frac{4\tan\frac{x}{2}}{1+\tan^2\frac{x}{2}} \cdot \frac{1-\tan^2\frac{x}{2}}{1 + \tan^2\frac{x}{2}}$

The first fraction is:

. . $\frac{4\tan\frac{x}{2}}{1 + \tan^2\frac{x}{2}} \;=\;\frac{4\frac{\sin\frac{x}{2}}{\cos\frac{x}{2} }}{\sec^2\frac{x}{2}} \;=\;\frac{4\frac{\sin\frac{x}{2}}{\cos\frac{x}{2} }}{\frac{1}{\cos^2\frac{2}{2}}} \;=\;4\sin\tfrac{x}{2}\cos\tfrac{x}{2} \;=\;2\sin x$

The second fraction is:

. . $\frac{1-\tan^2\frac{x}{2}}{1 + \tan^2\frac{x}{2}} \;=\;\frac{1-\frac{\sin^2\frac{x}{2}}{\cos^2\frac{x}{2}}}{\sec^ 2\frac{x}{2}} \;=\; \frac{1-\frac{\sin^2\frac{x}{2}}{\cos^2\frac{x}{2}}}{\frac {1}{\cos^2\frac{x}{2}}} \;=\;\cos^2\tfrac{x}{2} - \sin^2\tfrac{x}{2} \;=\;\cos x$

Therefore, the RHS becomes: . $2\sin x\cos x$.

4. ## Re: Trigonometric Identity Problem

Thanks romsek and soroban!
But I was wondering if there is a way to do it from LHS to get RHS because that's what the question requires.... Would that be even harder?

5. ## Re: Trigonometric Identity Problem

Originally Posted by JiaGeng
Thanks romsek and soroban!
But I was wondering if there is a way to do it from LHS to get RHS because that's what the question requires.... Would that be even harder?
Equality works in both directions. If you want, write the equations in reverse order and equality still holds at every step.

6. ## Re: Trigonometric Identity Problem

Hello, JiaGeng!

I was wondering if there is a way to do it from LHS to get RHS.
Would that be even harder?

If you would rather not run the steps in reverse,
it can be done ... with a little imagination.

$2\sin x\cos x \;=\;\frac {2(2\sin \frac{x}{2}\cos\frac{x}{2})}{1}\cdot \frac{\cos^2\!\frac{x}{2} - \sin^2\!\frac{x}{2}}{1}$

. . . . . . . . . $=\;\frac{4\sin\frac{x}{2}\cos\frac{x}{2}}{\cos^2\! \frac{x}{2} + \sin^2\!\frac{x}{2}} \cdot \frac{\cos^2\!\frac{x}{2} - \sin^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2} + \sin^2\!\frac{x}{2}}$

In both fractions, divide numerator and denominator by $\cos^2\!\tfrac{x}{2}\!:$

$\dfrac{\frac{4\sin\frac{x}{2} \cos\frac{x}{2}}{\cos^2\!\frac{x}{2}}} {\frac{\cos^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2}} + \frac{\sin^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2}}} \cdot \dfrac{\frac{\cos^2\!\frac{x}{2}}{\cos^2\!\frac{x} {2}} - \frac{\sin^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2}}} {\frac{\cos^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2}} + \frac{\sin^2\!\frac{x}{2}}{\cos^2\!\frac{x}{2}}} \;=\; \dfrac{4\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}}} {1 + \left(\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}} \right)^2} \cdot \dfrac{1 - \left(\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}} \right)^2} {1 + \left(\frac{\sin\frac{x}{2}}{\cos\frac{x}{2}} \right)^2}$

. . . . $=\;\frac{4\tan\frac{x}{2}}{1 + \tan^2\!\frac{x}{2}} \cdot \frac{1-\tan^2\!\frac{x}{2}}{1 + \tan^2\!\frac{x}{2}}$


# A Sample of Ask Dr. Math, Part 2: Questions Outside of School

In the first post, I gave a small sampling of questions we’ve had from students, parents, and teachers, all related to school, and discussed how we like to deal with these. But we also get many questions with no direct relation to school. These may come from people who actually use math in their work (computer programming, plumbing, and anything in between), or from students who are trying to deeply understand what they are studying, or who are just curious. Often, of course, these too are from students or teachers, but they are going beyond that role. These are perhaps the most interesting of all. They are really why we are here.

## A real-life question

This question arrived in 2014 from a flooring inspector, Tim, asking about how high a floor would buckle due to a given increase in length if the ends are fixed:

Modeling How Much Wood Expands

Say I place a six foot long yardstick wide side down. One end is butted against a wall (fixed object). When the other end of the yardstick is pushed towards the wall, by say 1/4", the middle area rises -- and it rises much, much higher than 1/4".

I would like to know if there is a fixed formula for this exponential gain of "flat" vs. "up."

I come across this daily, seeing floors buckle up and away from substrates because they are a tight fit.

(He misused the word exponential; I suppose he was just thinking that the rise is surprisingly high, as in exponential growth.)

Dr. Rick and I both recognized this problem as related to previous questions we had answered, and referred to those in our replies. His old answer assumed a circular arc for the new shape, and did a sanity check by comparing the surprising answer to one obtained by supposing that the board just bends sharply in the middle. The circular arc version does not lend itself to easy calculation, but the sharp bend could be turned into a formula.

There is a way to calculate the height, but it isn't a formula, as such.
...
For more on this topic, including a way to do a *rough* approximation with a simple formula, see:

http://mathforum.org/library/drmath/view/62613.html

I had been thinking while Dr. Rick wrote, and found a different old answer (by Dr. Jeremiah) that didn’t actually come up with a method, just a starting point. But I “played” with numbers using a spreadsheet much as Dr. Rick had for his earlier answer, and saw a pattern that suggested an approximate formula he might try. When I saw what Dr. Rick had written, I wrote to propose this formula.

I see Dr. Rick beat me to most of what I was going to say, except that my link to our archives is not quite as helpful:

Rail Bend in Hot Weather
http://mathforum.org/library/drmath/view/61465.html

But I made a spreadsheet carrying out the calculations for a circular arc; and have found experimentally that the rise seems to be quite accurately approximated by a simple formula. I have to study more to try to justify it, but here goes.

For the actual length of the stick, s, and the (small) decrease in the space available, x,

h = 0.605 sqrt(sx)

But people who enjoy math can’t be fully satisfied with a guess; I continued pursuing my approximation, hoping to justify it. The patient, Tim, didn’t need a proof, but I did. By the end of the day, I could write up a derivation of the formula and send it along, and then, the next day, apply it to some examples.

I've verified my simple approximation, which turns out to be

h = sqrt(6sx)/4

This changes my 0.605 to 0.612, which fits better for very small x but not quite as well for larger ones.

I'm sure you don't need to see this, but for my records, here is the derivation of my approximation: ...

A missing formula for a counter-intuitive observation (a half-inch shift can result in almost a 7-inch buckle) can be a great motivation for some fun with math. And we also have a reminder that in the real world, an approximation can be both good enough, and as good as you’ll get. (Be sure, as always, to read the whole story in the original page!)

## A curious question

(Well, that last one arose from curiosity, too, but this is pure-math curiosity.)

Within months of my starting with Ask Dr. Math, I wrote this answer, to a question wondering about place value in decimal numbers:

The Oneths Place

Why is there not a oneths place? My classmates and I were wondering.  It is weird that decimals begin with tenths, hundredths, and so on. We appreciate your help.

I love it when children are wondering, especially when a teacher encourages it. So I was happy to think about this, even though I had probably never considered the question before. (Since then, we have had some form of this question at least a dozen more times! Often, I have answered by saying, “Believe it or not, you’re not the first to ask this; if you search our site for the word ‘oneth’, you’ll find this answer …”)

I’m sure my answer is not all that could be said about it, but I managed not only to give the quick answer (oneths are just another name for ones, since 1/1 = 1, and we don’t want two places with the same value), but to relate it to some other perceived asymmetries in the way we write numbers, and bring in signed exponents (which may be beyond the students’ knowledge, or may be something they were just about to learn). I closed with a general comment about curiosity:

I hope that helps. It's interesting how we tend to expect things to be symmetrical. Mathematicians and scientists often expect it too, and when things don't seem balanced, they try to find out why. So keep wondering about things like this.

## A philosophical question

Another question we’ve received a number of times involves how a line segment can have a finite length when it is composed of infinitely many points. As a result, we’ve referred to the following question a dozen times or so, in addition to giving fresh answers from different perspectives:

How Can a Line Have Length?

We have a line, OR a line segment, OR a ray (it really doesn't matter). If this particular linear entity (let us say that it is a line segment, for the sake of hypothetical simplicity) consists only of infinite points, all with zero volume, mass, diameter, cross-sectional area, etc., how can it have length?  Why are we able to take a particular line segment and give it a length of 5?  If a substance can only be composed of volumeless points, how can it have volume in and of itself?

Dr. Daniel’s answer (from 1998) touches on several key ideas in philosophical thinking about this topic, making a concise summary without digging in too deeply. (I try to avoid digging too deeply, because of the possibility of cave-ins … .) When I answer related questions, I often refer to that answer, and also to this one:

Point and Line

I'm in high school, but this problem has really nothing to do with school, it's just been bothering me for a while.

A point has no dimension (I'm assuming), and a line, which has dimension, is a bunch of points strung together. How does something without dimension create something with dimension?

Going even farther, a point essentially is nothing, because it has no dimension. My question is, How does a bunch of nothings (a point) create a something (a line)?

Here Dr. Jordi got into a long discussion about the problem, perhaps not very effectively in the end. After referring to these two answers, I generally add something like the following as my own brief perspective:

Neither will be a fully satisfying answer, largely because we humans are finite beings, not able to directly observe infinity. (It's amazing enough that we can THINK about infinity, and get some of the answers right!) But the basic idea is that we don't define a line as something made by putting points together; rather, we start by defining a line, and then note that it consists of points. So we can find points on a line, without having to _make_ the line _out of_ points (or make a cube out of stacked squares).

Note also that we do not define length in terms of points; since 0, the width of a point, times infinity, the number of points, is an indeterminate quantity (we can't assign any one value to it), that would be useless to attempt. So length is an independent concept, defined only in relation to the location of the endpoints of a segment, not to the points that make it up.

In choosing these examples of “curious questions”, I have chosen to avoid  questions with really interesting answers, which deserve fuller treatment on their own! Keep watching, and I’ll get to some of them.

### 2 thoughts on “A Sample of Ask Dr. Math, Part 2: Questions Outside of School”

1. Hi – I would like to know the probability of this occurring – this past January I celebrated my 74th birthday which means I was born in 1947 (1947/74 numbers reversed). My daughter was born in April, 1974. She will be turning 47 this year (1974/47 numbers reversed) What is the probability of this occurring in a parent/son-daughter relationship?

1. Hi, Gwen.
I suppose you asked this in connection with this particular post just because it’s an example of curiosity! In fact, there is another post that deals with this very kind of question: Should Rare Events Surprise Us? You’ll find there that an important question we need to ask is, “What do you mean by ‘this’?”

I don’t think you are asking what percentage of all people now alive were born in 1947, and had a daughter born in 1974; and if you did, I’d have to pass, as it would require digging deeper into birth statistics than I feel like going. (It would not be an interesting question mathematically.)

I think your main interest is in the coincidence of the numbers. I may not get to a probability in the end, but there may be some interesting observations along the way!

My first observation is that the two reversals are closely related. The reason you are 74 this year is that 2021-1947 = 74; that is, 2021 = 1947 + 74. But that implies that 2021 also equals 1974 + 47, because both sums can be written as 1900 + 47 + 74, just rearranging the numbers. So that fact that this year your age is the reversal of your birth year implies that the same will be true this year for anyone born in 1974. To put it another way, her being born in 1974, the reversal of your birth year, predestined everything you observe this year. It all had to happen sooner or later!

Let’s test that out. I was born in 1952. I couldn’t have a daughter born in 1925 or 2025, but in fact it turns out that my father was born in 1925! My claim is that this by itself implies that something like your situation would occur at some point. So if we add 52 to 1925, we find that in 1977, my father was 52, and I was 25. Of course that happened once in a lifetime, but that it would happen to us at all depended only on our two birthdates and our living long enough.

Will everyone have some year in his life when his age is the reverse of his birth year? That just depends the reverse of his birth year being a likely age. For someone born in 1900, it happens immediately (and again if he reaches 100); born in 1901, it happens when he reaches 10. If you were born in 1909, you’ve have to live to 90 to have it happen. So basically, lifespan is the only restriction.

How likely is it that one will have a child in his “reverse year”? That restricts it more, since the resulting age has to be within the childbearing years. For example, in your case your age at her birth was 1974 – 1947 = 27. If we suppose that, say, a child can be born to a parent aged 16 to 45, then your scenario is feasible for people born in about 30% of all years, and considerably more likely for, say, 10-15%. (Actually, this is a little more subtle than what I just said, and I checked by making a spreadsheet to actually count years that would work.)

With appropriate statistical information, one might come up with a probability of actually having a child in a given year. But that’s beyond my level of interest.

But I recalled my twin brother pointing out something similar based on our father’s age, and was able to find it: Reversal of Age Digits Every Eleven Years. What he describes there will also apply to you and your daughter: Because you were a multiple of 9 years old when she was born, every 11 years your ages have reversed digits, as they are this year. So not only is your situation this year not unique, it is not unique to you: It also happened when she was 3, and 14, and 25, and 36! But it will stop happening when you pass 100 …

This site uses Akismet to reduce spam. Learn how your comment data is processed.


# Integral of the entrywise square of the exponential of a matrix

Note: I posted my question on math.stackexchange but got no answer. That is why I am asking it here.

Let $A$ be a $n\times n$ square matrix such that the real part of all eigenvalues are negative. For each $i,j$, let $\exp(At)_{ij}$ be the element $(i,j)$ of the matrix. It is well known that: $$\int_0^\infty \exp(At)_{ij}dt = -(A^{-1})_{ij}$$ Is it possible to simplify a similar expression where each element is squared: $$\int_0^\infty (\exp(At)_{ij})^2 dt = ??$$

I am wondering if it is possible to simplify the above expression. If it helps, I can assume that $A$ is diagonalizable. Note that unless for one-dimensional matrices, $(\exp(At)_{ij})^2\ne\exp(2At)_{ij}$.

• Note that OP wants an elementwise square, not the usual matrix-multiplication square. – Federico Poloni Nov 24 '16 at 8:19

Inspired strongly by Anthony's answer, here is a formula that works for arbitrary $A$. Let $M$ be the $n^2 \times n^2$ square matrix given by $$M= A \otimes I_n + I_n \otimes A_n$$ i.e. in terms of indices

$$M_{ij,kl}=A_{i,k} \delta_{j,l} + \delta_{i,k}A_{j,l}$$

Then because $A \otimes I_n$ and $I_n \otimes A$ commute, $$e^{Mt} = (e^{At} \otimes I_n) (I_n \otimes e^{At}) = e^{At} \otimes e^{At}$$ i.e. in indices $$(e^{M t})_{ij,kl} = (e^{A t})_{i,j} (e^{At})_{k,l}$$ so in particular $$(e^{At})_{i,j}^2 = (e^{Mt})_{ii,jj}$$ and $$\int_t (e^{At})_{i,j}^2 = \int_t (e^{Mt})_{ii,jj} = - (M^{-1})_{ii,jj}$$

(Here I am using commas to separate the two indices of a matrix entry)

• Thanks for this answer. I am not sure to understand why the two summands would commute and why $e^{Mt}_{ij,kl}$ can be expressed in terms of $e^{At}$ (with these indices, it seems false). – N. Gast Nov 24 '16 at 16:18
• I think this is problematic because each of the summands is of rank $n$, so the sum is of rank at most $2n$. For $n>2$, $M$ will not be invertible. – Anthony Quas Nov 24 '16 at 16:39
• @AnthonyQuas That was a stupid mistake, fixed now. – Will Sawin Nov 24 '16 at 18:09
• @N.Gast Sorry, that was wrong, is this clearer? – Will Sawin Nov 24 '16 at 18:09
• @WillSawin: does M^{-1} exist? – Anthony Quas Nov 24 '16 at 18:42

You can do something. Here's a computation for diagonalizable $A$. Let $A=BDB^{-1}$ and let the elements of $D$ be $-\lambda_1,\ldots,-\lambda_d$. Then \begin{align*} \int_0^\infty (e^{At})_{ij}^2\,dt&= \int_0^\infty (Be^{Dt}B^{-1})_{ij}^2\,dt\\ &=\int_0^\infty \sum_{k,k'} B_{ik}e^{-\lambda_k t}B^{-1}_{kj} B_{ik'}e^{-\lambda_k' t}B^{-1}_{k'j}\,dt\\ &=\int_0^\infty \sum_{k,k'} B_{ik}B^{-1}_{kj} B_{ik'}B^{-1}_{k'j}e^{-(\lambda_k+\lambda_k') t} \,dt\\ &=\sum_{k,k'} \frac{1}{\lambda_k+\lambda_k'}B_{ik}B^{-1}_{kj} B_{ik'}B^{-1}_{k'j}. \end{align*}

Given a Hurwitz matrix $\mathrm A \in \mathbb R^{n \times n}$, let

$$\Phi (t) := \exp(\mathrm A t)$$

be the state transition matrix, and let its $(i,j)$-th entry be denoted by

$$\varphi_{ij} (t) := \mathrm e_i^{\top} \Phi (t) \, \mathrm e_j$$

Hence,

$$\begin{array}{rl } \displaystyle\int_0^{\infty} \left( \varphi_{ij} (t) \right)^2 \, \mathrm d t &= \displaystyle\int_0^{\infty} \left( \mathrm e_i^{\top} \Phi (t) \, \mathrm e_j \right)^2 \, \mathrm d t\\\\ &= \displaystyle\int_0^{\infty} \mathrm e_i^{\top} \Phi (t) \, \mathrm e_j \mathrm e_j^{\top} \Phi^{\top} (t) \, \mathrm e_i \, \mathrm d t\\\\ &= \mathrm e_i^{\top} \underbrace{\left( \displaystyle\int_0^{\infty} \Phi (t) \, \mathrm e_j \mathrm e_j^{\top} \Phi^{\top} (t) \, \mathrm d t \right)}_{=: \mathrm W_c} \mathrm e_i = \mathrm e_i^{\top} \mathrm W_c \mathrm e_i\end{array}$$

where $\mathrm W_c$ is the controllability Gramian of the pair $(\mathrm A, \mathrm e_j)$ and is the solution to the following controllability Lyapunov equation

$$\boxed{\mathrm A \mathrm W_c + \mathrm W_c \mathrm A^{\top} + \mathrm e_j \mathrm e_j^{\top} = \mathrm O_n}$$

Thus, the $n$ columns of the integral of the entrywise product

$$\int_0^{\infty} \left( \Phi (t) \circ \Phi (t) \right) \mathrm d t$$

are the diagonals of $\mathrm W_c^{(1)}, \mathrm W_c^{(2)}, \dots, \mathrm W_c^{(n)}$, where $\mathrm W_c^{(1)}, \mathrm W_c^{(2)}, \dots, \mathrm W_c^{(n)}$ are the solutions to the following $n$ controllability Lyapunov equations

$$\begin{array}{cl} \mathrm A \mathrm W_c^{(1)} + \mathrm W_c^{(1)} \mathrm A^{\top} + \mathrm e_1 \mathrm e_1^{\top} &= \mathrm O_n\\ \mathrm A \mathrm W_c^{(2)} + \mathrm W_c^{(2)} \mathrm A^{\top} + \mathrm e_2 \mathrm e_2^{\top} &= \mathrm O_n\\ \vdots & \\ \mathrm A \mathrm W_c^{(n)} + \mathrm W_c^{(n)} \mathrm A^{\top} + \mathrm e_n \mathrm e_n^{\top} &= \mathrm O_n\end{array}$$

• In MATLAB, the Gramian can be computed using function gram. – Rodrigo de Azevedo Nov 25 '16 at 22:18


# Is $n^2 + n + 1$ prime for all n?

I recently stumbled across this question in a test.

Paul says that "$n^2+n+1$ is prime $\forall\:n\in \mathbb{N}$".

• Paul is correct, because...
• Paul is wrong, because...

The answers sheet says that "all answers providing a valid counterexample, e.g. $n=4$, are valid; however, I'm interested in understanding why - is there some sort of theorem which can predict whether a polynomial is prime or not?

What I tried was:

$n^2+n+1$ can be factorized as $(n+\frac{1+\sqrt{3}i}{2})(n+\frac{1-\sqrt{3}i}{2})$. Neither of these factors is a suitable factor (i.e. is natural, different from $1$, and different from $n^2+n+1$) for any $n\in\mathbb{N}$, therefore $n^2+n+1$ must be prime $\forall\:n\in\mathbb{N}$.
Instead, $n^2-1$ can be factorized as $(n+1)(n-1)$. The factor $(n+1)$ is a suitable factor (i.e. natural, different from $1$, and different from $n^2-1$) for $n>2$; therefore, $n^2-1$ is not prime for $n>2$.

However, the above reasoning is clearly wrong, because "$n^2+n+1$ is prime $\forall\:n\in\mathbb{N}$" doesn't hold for the case $n=4$.
What is wrong in the reasoning? Can one tell whether a polynomial $p(n)$ is prime for all $n$ a priori?

• Counterexample clearly is a formal proof. Furthermore, for quite a lot of small $n$ (like $n \leq 40$, IIRC - could be wrong), such numbers are prime. – Marcin Łoś May 15 '14 at 14:32
• @MarcinŁoś thanks for pointing that out. I edited the question to better suit what I'm asking for. – Giulio Muscarello May 15 '14 at 14:36
• It was established by Goldbach that there is no polynomial with integer coefficients that can give a prime for all integer inputs. Ref: mathworld.wolfram.com/Prime-GeneratingPolynomial.html – Joel May 15 '14 at 14:44

Hint $\ \ f(1)=3\,\Rightarrow\, 3\mid f(1\!+\!3n),\$ e.g. $\,3\mid f(4)=21$

Remark $\$ Above we used the Polynomial Congruence Theorem

$\ {\rm mod}\ 3\!:\ \color{}{1\!+\!3n\equiv 1}\,\Rightarrow\, f(\color{}{1\!+\!3n})\equiv f(\color{}1)\equiv 0,\$ for all $\,f\in\Bbb Z[x]$

Alternatively $\,\ 3n\mid f(1\!+\!3n)-f(1)\$ by the Factor Theorem $\,x-y\mid f(x)-f(y)$

The idea generalizes to a proof that any nonconstant polynomial $\in\Bbb Z[x]\,$ has a non-prime value.

Just because a polynomial $f$ doesn't factor doesn't mean that the number $f(m)$ you get when evaluating $f$ at a number $m$ doesn't factor. The simplest example is something like $f(x) = x+1$. This polynomial is irreducible, hence doesn't factor, but $f(3) = 4$ is clearly composite.

Here is a link showing that no polynomial with integer coefficients can evaluate to primes for all integers.

You want to disprove a statement of the form $\forall n\colon f(n)\text{ is prime}$, that is you want to prove $\neg\forall n\colon f(n)\text{ is prime}$, which is equivalent to $\exists n\colon \neg(f(n)\text{ is prime})$. Therefore, a counterexample is often the easiest and most straightforward way to disprove a general statement. In fact, any proof that merely shows that a $\forall$ statement is wrong without constructing a counterexample (or essentially doing so, but leaving out the details) is frowned upon by some mathematicians as being non-constructive. That being said, maybe you'd like a proof that there is no polynomial $f$ such that $f(n)$ is prime for all $n\in \mathbb N$ (except constant polynomials):

Let $$f(n)=a_dx^d+a_{d-1}x^{d-1}+\ldots+a_1x+a_0$$ be a polynomial of degree $d\ge 1$ with coefficients $a_i\in\mathbb C$, $0\le i\le d$, and $a_d\ne 0$. First we observe tat in fact $a_i\in \mathbb Q$ for all $i$: By plugging in $x=1, 2, \ldots, d+1$, we obtain $d+1$ rational equations in the unknowns $a_i$. Since the powers of $x$ are linearly independant (or look up Vandermonde matrix), there exists a unique solution, which must be rational. Then there exists $M\in\mathbb N$ sich that $a_iM\in\mathbb Z$ for all $i$. By assumption, $Mf(n)$ is $M$ times a prime for all $n\in\mathbb N$. For each prime $p$, there are at most $d$ values of $n$ such that $f(n)=p$. Since $M$ has only finitely many prime factors, $f(n)\mid M$ for only finitely many $n$. Therefore there exists $n$ such that $p:=f(n)\not\mid M$. By reducing $Mf(X)$ modulo $p$, we see that $Mf(n+kp)\equiv 0\pmod p$ for all $k\in\mathbb Z$. This implies that the prime $f(n+kp)$ is $p$ for all $k$. Especially, there are more than $d$ values of $n$ for which $f(n)=p$, contradiction. $_\square$

Trivia remark: On the other hand, there exists a polynomial in several variables with the property that its values are either negative or prime, and all primes occur!

• Your trivia remark is really cool! Do you have a link/reference? – André 3000 May 15 '14 at 15:22
• Here is a link to an early paper by Jones et al, not long after Matiyasevich proved existence. The $25$ variables has gone down a lot since then, I think to about $9$. – André Nicolas May 15 '14 at 15:38
• @AndréNicolas That's cool - so instead of letters we can now use digits to index the variables :) – Hagen von Eitzen Dec 7 '16 at 17:09

No. For $n=43$, $n^2+n+1=1893$ which is divisible by $3$.

• "What is wrong in the reasoning? What is a correct proof that a given polynomial $p(n)$ is (or isn't) prime for all natural numbers n?" Please read the entire question before answering. What I'm looking for is not a counterexample, but rather a proof. – Giulio Muscarello May 15 '14 at 14:32
• @GiulioMuscarello I understand you don't find this answer satisfying, but it's in fact perfectly valid proof. – Marcin Łoś May 15 '14 at 14:34
• @MarcinŁoś Sure, but the OP already had a much smaller counterexample with $n=4$. I don't see what this answer really adds. – André 3000 May 15 '14 at 14:38
• Jika is probably thinking of $n^2-n+41$, which is prime for $0 \le n \le 40$ – Robert Israel May 15 '14 at 15:06
• @RobertIsrael Yes you are right. Even though, I was thinking of Euler's formula $n^2-n+41$, I found that $43$ is a counter example. I hesitate to post my answer but since it is a valid mathematical proof I did post it. – Jika May 15 '14 at 15:15

Modulo 3, that polynomial is equivalent to some well known polynomial $(n-1)^2$ $$(n-1)^2=n^2-2n+1\equiv n^2+n+1 [3]$$

Hence if $n=1+3k$ for any $k$ (so each time $n-1\equiv 0[3]$) then $n^2+n+1$ will have 3 as a divisor.


# Is my inductive proof correct?

Trying this again.

Given $f(n) = 2f(n-1) + 1$ with $f(0) = 0$, I guess that $f(n) = 2^n-1$.

Base case: $f(0) = 2^0 - 1 = 1 - 1 = 0$, true.

Inductive step: Suppose $f(n) = 2^n-1$ for some $n \geq 0$. I will show that $f(n+1) = 2^{n+1}-1$.

$f(n+1) = 2f(n) + 1$

$f(n+1) = 2(2^n-1) + 1$

$f(n+1) = 2^{n+1} - 1$

This completes the proof.

My questions:

1. Is this proof correct? Awkward? Backwards?

2. It would help me to get the terminology right. Which piece is the inductive hypothesis? Or the "ansatz"?

• This one is good, clean, "forward." Jan 8 '16 at 19:53

As far as terminology, the inductive hypothesis is the thing you assume is true at some $n$, and is used to prove the statement for $n + 1$. So your inductive hypothesis is that $f(n) = 2^n - 1$.
The ansatz is the educated guess that the solution is $2^n - 1$, likely based on some experimentation. The ansatz then became your induction hypothesis (as it is wont to do).
Looks good to me. The inductive hypothesis is the step where you assume $f(n)=2^n-1$. We assume the inductive hypothesis because we have shown the existence of such an $n$ in our base case.


# Does Liebniz-Criteria become a necessary condition for convergence if $a_n$ is monotonically decreasing?

The Leibniz Criterion says that if the sequence $a_n$ is monotonically decreasing then the following statements are equivalent:

\begin{align} 1) & & & \sum_{n=0}^\infty (-1)^na_n \text{ converges} \\[6pt] 2) & & & \lim_{n\rightarrow\infty}(a_n) = 0 \end{align}

so this has to mean that if $a_n$ is monotonically decreasing, the following is true

$$\sum_{n=0}^\infty (-1)^na_n \text{ converges} \Leftrightarrow \lim_{n\rightarrow\infty}(a_n) = 0$$

I know that $\lim_{n\rightarrow\infty}(a_n) = 0$ is not a necessary condition for convergence if $a_n$ is not monotonically decreasing, but the way I am reading the rule stated in my script, it becomes a necessary condition if $a_n$ is monotonically decreasing.

For example to prove the non-convergence of

$$\sum_{n=0}^\infty (-1)^n(1)_n$$

I can just point out to the fact that

$$\lim_{n\rightarrow\infty}(1)_n = 1$$

because $(1)_n$ is a monotonically decreasing sequence. Is this interpretation correct?

• The condition $b_n\to 0$ is always necessary to the convergence of $\sum b_n$. When $b_n=(-1)^n a_n$, one has the equivalence $b_n\to 0\ \iff\ a_n\to 0$. So $a_n\to 0$ is a necessary condition for the convergence of $\sum (-1)^n a_n$. – Giuseppe Negro May 31 '15 at 11:49
• Yes the statement is true. Proof: $$b_n\to 0\ \iff\ \lvert b_n\rvert \to 0 \iff \lvert (-1)^n a_n\rvert\to 0 \iff a_n\to 0.$$ If you are not convinced please post a counterexample. – Giuseppe Negro May 31 '15 at 11:59
• if it were so why would leibniz go through the trouble of putting the additional monotonic decreasing condition there – Gravity May 31 '15 at 11:59
• I guess you are mixing up "necessary" and "sufficient" here. $a_n\to 0$ is necessary to the convergence of $\sum (-1)^na_n$. $a_n\to 0$ AND $a_n$ monotonically decreasing is sufficient to the convergence of $\sum (-1)^n a_n$. – Giuseppe Negro May 31 '15 at 12:01
• I know realize that you were right – Gravity May 31 '15 at 12:33

As Giuseppe Negro has noticed, for the convergence of $\displaystyle \sum a_n$,$$\lim_{n\rightarrow\infty}(a_n) = 0$$ is a necessary condition anyway.

The convergence test of Leibniz is only applicable to alternating series, i.e. series where every positive term is followed by a negative term, and every negative term is followed by a positve term ( + - + - + - + - ...).

For a general series, the condition $\displaystyle\lim_{n \to \infty} a_n= 0$ is a necessary condition for convergence, but not sufficient. This is the main point of Leibniz test. He could prove that for alternating series this condition is both necessary and sufficient. Thus if you've got an alternating series $\sum (-1)^n a_n$ with $\displaystyle\lim_{n \to \infty} a_n= 0$, than you are certain it converges.

I don't know why you are referring to the condition of "monotonically decreasing". This doesn't matter for Leibniz test. It's only an issue in the integral test.

• I understand your first point, but on your second point$\sum (-1)^n a_n$ with $\displaystyle\lim_{n \to \infty} a_n= 0$ you are certain that is converges, only when a is monotonically decreasing. The rule is defined for monotonically decreasing a – Gravity May 31 '15 at 12:36
• @Steven Van Geluwe: Alternation of signs and terms going to $0$ is not sufficient for convergence. Example, let $a_n=\frac{1}{n}$ if $n$ is odd, and let $a_n=\frac{1}{2^n}$ when $n$ is even. Then $\sum_1^\infty (-1)^n a_n$ diverges. – André Nicolas May 31 '15 at 12:52
• @Gravity: There are many series $\sum (-1)^n a_n$ that converge even though the $a_n$ are not monotonically decreasing. For example, let $a_n=\frac{1}{n^2}$ when $n$ is odd, and let $a_n=\frac{1}{n^3}$ when $n$ is even. – André Nicolas May 31 '15 at 12:59
• @Andre: that is correct and that is why Leibniz says the condition is sufficient but not necessary, but still we can only apply the Leibniz rule if $a_n$ is monotonically decreasing. we cannot in all Circumstances say $\sum (-1)^n a_n$ converges when $\displaystyle\lim_{n \to \infty} a_n= 0$ is true, and that is the point – Gravity May 31 '15 at 13:05
• I down voted, because I am afraid that the main point of this answer is wrong. Leibniz's test requires monotonicity of the $a_n$ term. – Giuseppe Negro May 31 '15 at 21:25