# How many random walk steps until the path self-intersects?

Take a random walk in the plane from the origin, each step of unit length in a uniformly random direction.

Q. How many steps on average until the path self-intersects?

My simulations suggest ~$$8.95$$ steps.

Red: origin. Top: the $$8$$-th step self-intersects. Bottom: the $$11$$-th step self-intersects. (Not to same scale.)
I suspect this is known in the SAW literature (SAW=Self-Avoiding Walk), but I am not finding this explicit number.

Related: self-avoidance time of random walk.

Added. Here is a histogram of the number of steps to self-intersection.

$$10000$$ random trials.

• This is asking for a uniformly random direction in the plane. By comparison, in 1-d the corresponding number is $(1/2)2 + (1/4)3 + (1/8)4 + \cdots = 3$; in 3-d the corresponding number is $\infty$. – Matt F. Mar 10 '19 at 4:40
• I added a second example. I have thousands of these. :-) – Joseph O'Rourke Mar 10 '19 at 18:56
• One can also ask for the asymptotic as $n$ goes to infinity of the probability that a length $n$ random walk does not self-intersect. The form of this asymptotic might be close to the case of random walks on grids, which if I recall right is conjectured but not known. – Will Sawin Mar 12 '19 at 17:42
• FWIW I ran this on $10^7$ random configurations and got a mean of ~$8.886$ steps. – Chip Hurst Mar 13 '19 at 14:22
• I ran $10^9$ simulations over night and the mean stayed at ~$8.886$. Here's a link of the simulation tallies: wolfr.am/C3YsNZmE. The largest run consisted of 98 lines. – Chip Hurst Mar 14 '19 at 12:16

Here are some computational insights.

I ran $$N = 10^k$$ simulations for $$3 \leq k \leq 12$$. For $$N = 10^9$$ I recorded some explicit instances and recorded which pairs intersected, as opposed to just the lengths. For all other runs, I simply summed the results.

First and foremost here's a summary of the runs:

$$\begin{array}{ |l|l|l|l| } \hline N & \text{mean} & \text{std/sqrt(}N\text{)} & \text{total number of segments} \\ \hline 10^3 & 8.732 & 0.16106 & 8732 \\ 10^4 & 8.781 & 0.0528827 & 87810 \\ 10^5 & 8.86218 & 0.0166654 & 886218 \\ 10^6 & 8.89447 & 0.00524551 & 8894468 \\ 10^7 & 8.88463 & 0.00165934 & 88846265 \\ 10^8 & 8.88595 & 0.000524796 & 888595095 \\ 10^9 & 8.88615 & 0.000165965 & 8886153545 \\ 10^{10} & 8.88631 & - & 88863113226 \\ 10^{11} & 8.88614 & - & 888613831649 \\ 10^{12} & 8.88614 & - & 8886139852418 \\ \hline \end{array}$$

We can apply the central limit theorem to this (sub)sequence of means. Even though $$\text{std/sqrt(}N\text{)}$$ was not calculated for $$N = 10^{12}$$, based on prior terms ~$$0.00000524$$ seems like a sufficient estimate.

From here I think we can be fairly confident that the first few digits of the mean are $$\bf{8.8861}$$. Here are the first few standard deviations ($$68-95-99.7$$ rule):

$$m \pm 1\sigma \rightarrow [8.886135, 8.886145] \\ m \pm 2\sigma \rightarrow [8.886129, 8.886150] \\ m \pm 3\sigma \rightarrow [8.886124, 8.886156]$$

In fact it takes $$8$$ standard deviations to lose the digit $$1$$:

$$m \pm 8\sigma \rightarrow [8.886098, 8.886181]$$

Finally, based on an inverse symbolic search, we can find that $${\bf\frac{1795}{202}} = 8.886138613...$$ falls within $$0.25\sigma$$ of $$m = 8.886139852418$$ and so maybe this has potential to be the closed form.

For $$N = 10^9$$, here is the histogram of the number of steps to self-intersection, whose shape is quite similar to the one posted by OP:

If we plot look at the log plot, we can see the tail follows a decaying exponential quite closely (in red):

From here we might think we could use a gamma distribution or something similar to estimate the data, but I was only able to find a tight approximation with one distribution: the inverse Gaussian distribution $$\operatorname{IG}(8.886, 26)$$. Here's its PDF overlaid on the histogram:

I also recorded which segments intersected each other for $$N = 10^9$$. The data shows segment $$n$$ most often intersects with segment $$n-2$$, followed by $$n-3$$, etc which I think makes sense. Borrowing terminology from MattF's answer, the quick intersections are the most probable.

In the following diagram an $$(x, y)$$ pair indicates how often segment $$x$$ intersected with segment $$y$$. Each diagonal approximately decays exponentially, all with the same rate.

For each of the 4 cores I ran the simulations on, I recorded a single sequence of each length. The most interesting ones of course are the long ones.

Here's an instance of length 96. It's riddled with near misses and is ultimately squashed by a quick intersection.

Here the suspicious looking part is indeed intersection free -- it's about $$0.01 \,\text{rad}$$:

Lastly I looked at the histogram of angles in my saved simulations:

I think this bias (introduced by stopping once an intersection occurs) says that the best way to stay intersection free is to not curl back up towards yourself.

I have compiled all of my data into a Mathematica notebook which can be downloaded here.

• Great data! I especially like the somewhat surprising angles histogram (but I accept your explanation). – Joseph O'Rourke Mar 25 '19 at 19:27
• Thanks. Yes I was surprised by that histogram too. Originally I thought there might have been a bug in my code. I reran my code without the intersection stopping condition and the histogram came out uniform. An example of that is in the linked notebook. – Chip Hurst Mar 25 '19 at 19:31
• And by the way, I made a couple edits since posting -- I don't know if you saw them -- a conjectured closed form and an approximate distribution fit. – Chip Hurst Mar 25 '19 at 19:32
• $2+11\sqrt{29/74}$ is even closer to the empirical average. – Matt F. Mar 25 '19 at 20:16
• The tail behaviour means that the intersection probability tends towards a constant $p$ which you could get from the slope. The behaviour is then modelled reasonably well by $$\Pr(\text{length} = k \mid k > k_0) = \Pr(\text{length} > k_0) \, (1-p)^{k-k_0-1} p$$ once the walk is past $k_0$ steps. – student Mar 26 '19 at 14:34

We can get an upper bound of $$15.52$$ by considering just the cases of interesction of next-to-consecutive steps, which we call quick intersections.

Let $$\alpha$$ be the angle between step $$AB$$ and step $$BC$$, and let $$u=\alpha/\pi$$. So $$u$$ is (initially) uniformly distributed between $$0$$ and $$1$$. Then, as Gerhard Paseman and Bill Bradley determined, the probability that steps $$AB$$ and $$CD$$ intersect is $$P(\text{intersection|u})= \begin{cases} \frac14-\frac u4\ \ \text{ if } u\le \frac13\\ \frac12-u\ \ \text{ if } \frac13\le u \le \frac12\\ \phantom{1-2}0 \ \ \text{ if } \frac12 \le u\\ \end{cases}$$ So the (initial) overall probability of an intersection is $$\int P(\text{intersection}|u)du=1/12$$.

This means that for the next step, we have $$P(u|\text{no intersection last time})=\frac{12}{11} \begin{cases} \frac34+\frac u4\ \ \text{ if } u\le \frac13\\ \frac12 + u\, \ \ \text{ if } \frac13\le u \le \frac12\\ \phantom{1-2}1 \ \ \text{ if } \frac12 \le u\\ \end{cases}$$ \begin{align} P(\text{intersection|no intersection last time}) &=\frac{12}{11}\int_{u=0}^1 \begin{cases} (\frac34+\frac u4)(\frac14-\frac u4)\ \ \text{ if } u\le \frac13\\ (\frac12+u)(\frac12-u)\ \ \, \text{ if } \frac13\le u \le \frac12\\ \ \ \phantom{1-2}1(0)\ \ \ \ \ \ \ \ \ \ \ \text{ if } \frac12 \le u \end{cases} du\\ &=\frac{29}{396} \end{align} So the probability of no quick intersection after $$n$$ steps is $$\frac{11}{12}\left(\frac{367}{396}\right)^{n-3}$$ and the expected number of steps until a quick intersection is $$3\left(\frac{1}{12}\right)+\sum_{n=4}^\infty n\left( \frac{11}{12}\left(\frac{367}{396}\right)^{n-4}\! - \frac{11}{12}\left(\frac{367}{396}\right)^{n-3} \right)=\frac{450}{29} \simeq 15.52$$

• Nice analysis, MattF! – Joseph O'Rourke Mar 23 '19 at 0:11

Inspired by Bill Bradley's post, I've decided to lower bound the probability of an intersection which (using the method suggested in Bill's post) gives a slightly less weak upper bound for the expected length of a random walk.

Using Bill's picture and rescaling so that angles are measured as nonnegative fractions of 2pi, we see one domain of self intersection is when $$\alpha \lt \beta$$ and $$\alpha + 2\beta \lt 1/2$$. This region is a triangle of base 1/4, and height 1/6, with an area of 1/48. Missing the measure 0 set where $$\alpha=\beta$$, we reflect across that line, and then once more across the line $$\alpha+\beta=1$$ to get the other three regions having an intersection, giving the probability of self intersection of three-step paths to be 4/48=1/12.

Now let's extend this to paths with four steps. The number of cases to determine the probability exactly is more than I care to tackle, so I will cheat and underestimate it. I do this by considering just two cases: that an intersection occurs in the first three steps, or that it does not but occurs in the last three steps.

If we considered these cases as disjoint, we would get a probability of 1/12 + 1/12 = 1/6. They aren't, so we will consider the case that $$\beta \leq 1/4$$ and $$\alpha \gt 1/4$$ or more visibly use 3/4 of the chance that the last three steps self-intersect. This gives a lower bound of (1/12) times (1+3/4), or 7/48, which gives 1/7 as a weak lower bound.

Using this and Bill's estimating method gives 1 + 7*(4-1)=22 as a weak upper bound on the number of steps needed to self-intersect. If we could improve the lower bound from 1/7 to 1/6 for self intersection of a four step path, this would lead to an upper bound of 19 instead of 22.

But if we can cheat once, we can cheat again. The first cheat went from two neighboring angles to three, so we will go from three to five and lower bound the crossing probability of six segments as (7/4) times the (lower bound of the) probability of four segments. We share the middle angle so that we can nicely separate the domains of the middle angle turning sharp left or sharp right. We do a similar cut and trim and end up with a lower bound of 49/192 =1/4+1/192 for the probability of 6 segments crossing. This gives a slightly better upper bound of 1 +4*5 or 21 for the step length of a walk that does not cross itself.

To justify the cheat, one has to do a lot more work to make sure that the probability grows by 7/4 at this step. However, I won't do that. I use the second cheat instead to motivate the idea that 22 is an upper bound that can be improved with a simple argument, and hope to inspire someone to come up with a simple and more honest and precise estimate.

Gerhard "Long As It's Not Graded" Paseman, 2019.03.20.

• I would like to point out that many of my signatures encode some double meaning. In this particular case, I want to make it clear that this analysis fails on other manifolds. In particular, Joseph's problem makes sense on a torus or pseudo sphere, even on non-oriented manifolds or graphs with a rigid geometric structure. I encourage people to consider the version for a torus. Gerhard "Promises To Not Grade Work" Paseman, 2019.03.20. – Gerhard Paseman Mar 20 '19 at 17:21
• The version of Joseph's question on a compact space is likely in the graph theory literature. Consider a cover of the space by uniform mostly disjoint regions, and make a graph with a region a vertex and a line joining two regions if a step takes one from one region to another. One can now approximate a random walk by a transition matrix, or use the theory of random walks in graphs to compute a desired expectation. Thus the actual expectation can be considered as a limit of expectations using various partitions of the space. Gerhard "Still Interested In Torus Version" Paseman, 2019.03.20. – Gerhard Paseman Mar 20 '19 at 18:20

(Thanks for noticing my earlier error, Gerhard!)

Here's a loose but very simple upper bound. Consider three consecutive unit steps, which might look like this:

We take $$\alpha\in[0, \pi]$$ and $$\beta\in[0,2\pi)$$. (By symmetry we can reflect $$\alpha\in (\pi, 2\pi)$$ back to $$\pi-\alpha$$.) Then to overlap, we need $$\alpha < \pi/2$$, $$\beta<\pi/2$$ and $$\alpha + \beta < \pi$$ The first two events are independent, with probabilities 1/2 and 1/4.

For the third event, consider a case where the three segments just barely cross, e.g.:

If we decrease the angles $$\alpha, \beta$$, the steps will still intersect, so it's sufficient to consider this case.

Because the bottom and left edges are both length one, the upper and rightmost angles are both $$\beta$$. Since we have a triangle, $$\alpha+2\beta=\pi$$, so the probability of this event is 2/3. (There's a symmetric case where the roles of $$\alpha$$ and $$\beta$$ are reversed.) It's possibly clearer to see this by examining a phase space diagram ("blue" = "line segments intersect"):

The blue region takes up 2/3rds of the (uniformly sampled) space. Conditioning on everything, the probability of overlap is 1/2 * 1/4 * 2/3 = 1/12

We can apply this argument to multiple non-overlapping pairs of angles. Therefore, the expected number of steps until self-intersection is upper-bounded by $$\leq 1 + 2\times 12 = 25$$

• Something does not look right. Do you want to find it, or shall I expand on my comments above? Gerhard "Pretty Sure About One Twelfth" Paseman, 2019.03.20. – Gerhard Paseman Mar 20 '19 at 15:49
• Looks good now. I like the picture and the estimate. Gerhard "Blue Is A Nice Color" Paseman, 2019.03.21. – Gerhard Paseman Mar 21 '19 at 23:55


# How do I take a fraction to a negative power?

I ran into this issue during my homework. Using the rules of logarithms, I need to prove that $$-2\ln\bigg(\frac{2}{\sqrt{6}}\bigg)=\ln3-\ln2$$ So here were my steps:

1. First step: $$-2\ln\bigg(\frac{2}{\sqrt{6}}\bigg)=\ln\left(\bigg(\frac{2}{\sqrt{6}}\bigg)^{-2}\right)$$ And that's as far as I got, because now I want to use the form $$\ln(a/b) = \ln(a) - \ln(b)$$, but first I need to reduce the fraction because it is raised to the $$-2$$.

How do I evaluate $$\bigg(\frac{2}{\sqrt{6}}\bigg)^{-2}$$ ?

Thanks

• Note that $x^{-a} = \frac{1}{x^a}$ – desiigner Jul 11 '19 at 19:53

By definition $$a^{-k} = \frac 1{a^k}$$

So $$\left(\frac{2}{\sqrt{6}}\right)^{-2} =\frac 1{\left(\frac{2}{\sqrt{6}}\right)^{2}}=$$

$$\frac 1{\left(\frac {2^2}{\sqrt 6^2}\right)}=\frac {\sqrt 6^2}{2^2}=\frac 64=\frac 32$$

It will help to realize that $$(\frac ab)^{-1} = 1/(a/b) = \frac ba$$ and that $$(\frac ab)^k = \frac {a^k}{b^k}$$ to realize that that means $$\left(\frac ab\right)^{-k} = \frac 1{\left(\frac ab\right)^k}= \frac 1{\left(\frac {a^k}{b^k}\right)} = \frac {b^k}{a^k}.$$

(Also $$(\frac ab)^{-k} = [(\frac ab)^{-1}]^k = (\frac ba)^k=\frac {b^k}{a^k}$$ or that $$(\frac ab)^{-k} = \frac {a^{-k}}{b^{-k}} = (1/a^k)/(1/b^k) = \frac {b^k}{a^k}$$.)

In any event

$$\left(\frac {2}{\sqrt 6}\right)^{-2} = \left(\frac {\sqrt 6}{ 2}\right)^2 = \frac {\sqrt 6^2}{2^2} = \frac 64 = \frac 32.$$

• Perfect, this is the explanation I was looking for. So now after a few steps, I'll get ln(3/2) = ln(3) - ln(2). – Miguel Aragon Jul 11 '19 at 21:36

\begin{align} -2\ln \left( \frac{2}{\sqrt 6} \right) &= -2\big( \ln(2)-\ln(\sqrt{6}) \big) \\ &= -2\ln(2)+2\ln(6^{1/2}) \\ &= -2\ln(2)+\ln(2\cdot 3) \\ &=-2\ln(2)+ \big( \ln(2)+\ln(3)\big) \\ &=\ln(3)-\ln(2) \end{align} And for your specific question, remember that $$\left( \frac{a}{b} \right)^{-n}=\left( \frac{b}{a} \right)^n$$

Well you may start by distributing the index since $$2$$ and $$\sqrt 6$$ are positive. Thus $$\left(\frac{2}{\sqrt{6}}\right)^{-2}=\frac{2^{-2}}{{\sqrt 6}^{-2}}.$$

Then recall that for any nonzero number $$a$$ and any negative integer $$-n,$$ we have $$a^{-n}=\frac {1}{a^n}.$$ Applying this to your expression, we have $$\frac{2^{-2}}{{\sqrt 6}^{-2}}=\frac{\frac {1}{2^2}}{\frac{1}{{\sqrt 6}^2}}=\frac{\frac {1}{4}}{\frac{1}{6}}=\frac{6}{4}=\frac 32.$$

$$-2 \ln(\frac{2}{\sqrt{6}}) = \ln(\frac{2}{\sqrt{6}})^{-2} = \ln \frac{1}{(\frac{2}{\sqrt{6}})^{2}} = \ln \frac{6}{4} = \ln\frac{3}{2} = \ln 3 - \ln 2$$

$$-2 \ln \left( \frac{2}{\sqrt{6}} \right) = \ln 3 - \ln 2$$

if and only if

$$\ln \left( \frac{2}{\sqrt{6}} \right)^{-2} = \ln \left( \frac{3}{2}\right)$$

if and only if

$$\ln \left[ \frac{1}{\left(\frac{2}{\sqrt{6}}\right)^{2}} \right] = \ln \left( \frac{3}{2}\right)$$

And so, we have

$$\ln \left( \frac{6}{4} \right) = \ln \left( \frac{3}{2}\right)$$

which is true.

• you started by assuming the statement to be proven, so in reality you haven't shown anything. You need to run the argument in reverse – peek-a-boo Jul 11 '19 at 20:27
• One way to prove something is to take the LHS = RHS and proceed with a series of iff statements until something obvious is obtained. I neglected to include them initially. – mlchristians Jul 11 '19 at 20:29
• $4 = 10 \implies 7-3 =7+3 \implies-3= 3 \implies (-3)^2 = 3^2 \implies 9=9$ which is true. Therefore $4 = 10$. Or if penguins were elephants then they would both eat food. Which is true. So penguins are elephants. – fleablood Jul 11 '19 at 20:37
• "One way to prove something is to take the LHS = RHS and proceed with a series of iff statements until something obvious is obtained." But if you do that you MUST specify the steps are actually if and only if steps. If you do not SPECIFICALLY state that it is reasonable to assume they are only forward implications and the proof is not valid. – fleablood Jul 11 '19 at 20:38
• Your first comment is not if and only if; and neither is you second. Forward implications is one-way; necessary and sufficient (i.e., if and only if are both ways). In the case of this problem, start from the given equation and work it to where I finished. Any problem with that. Now, if you want to do the work, start w/ the last statement and by a series of implications, show it implies the initial equation. I chose iff and only if instead. – mlchristians Jul 11 '19 at 20:45

For a non-zero real number, we have $$1=x^0=x^{2-2}=x^2\cdot x^{-2}\tag1$$ from How to understand why $$x^0=1$$ where $$x$$ is any real number?

Putting $$x=2/\sqrt6$$ into $$(1)$$, we get $$1=\left(\frac2{\sqrt6}\right)^2\cdot\left(\frac2{\sqrt6}\right)^{-2}\tag2$$ and since we know that for a positive integer $$n$$ and positive real numbers $$a,b$$, $$\left(\frac ab\right)^n=\underbrace{\frac ab\cdot \frac ab\cdot\ldots\cdot\frac ab}_{n\,\text{times}}=\underbrace{\frac{a\cdot a\cdot\ldots\cdot a}{b\cdot b\cdot\ldots\cdot b}}_{n\,\text{times}}=\frac{a^n}{b^n},\tag3$$ we have that $$\left(\frac2{\sqrt6}\right)^2=\frac{2^2}{\left(\sqrt6\right)^2}=\frac46=\frac23\tag4.$$ Finally, putting $$(4)$$ back into $$(2)$$ yields $$1=\frac23\cdot\left(\frac2{\sqrt6}\right)^{-2}\implies\left(\frac2{\sqrt6}\right)^{-2}=\frac1{2/3}=\frac32\tag5$$ as the answer.


# Any “shortcuts” to proving that $\frac{\sin(x)}2+\sin^2(\frac x2)\tan(\frac x2)\to\tan(\frac x2)$

I was working on simplifying some trig functions, and after a while of playing with them I simplified $$\frac{\sin(x)}{2}+\sin^2\left(\frac{x}{2}\right)\tan\left(\frac{x}{2}\right) \rightarrow \tan\left(\frac{x}{2}\right)$$

The way I got that result, however, was with what I think a very "roundabout" way. I first used the half-angle formulaes, then used $$x=\pi/2-\beta$$, and that simplified to $$\frac{\cos(\beta)}{1+\sin(\beta)}$$ where I again used the coordinate change to get $$\frac{\sin(x)}{1+\cos(x)}\rightarrow\tan\left(\frac{x}{2}\right)$$

I tried using the online trig simplifiers but none succeeded. Of course, after you know the above identity, it's easy to prove by proving that $$\frac{\sin(x)}{2}=\tan\left(\frac{x}{2}\right)-\sin^2\left(\frac{x}{2}\right)\tan\left(\frac{x}{2}\right)$$

Is there a more direct way to get the identity? I guess what I'm asking is, am I missing any "tricks" or software that I could have on my toolbelt so that next time I don't spend hours trying to simplify trig identities?

With $$s:=\sin\frac x2,c:=\cos\frac x2$$, $$\sin x=2sc$$ and

$$\frac122sc+s^2\frac sc=\frac{sc^2+s^3}c=\frac sc.$$

• I accepted this answer since it makes all steps explicit – Esteban Sep 30 '20 at 15:03
• @Esteban: thank you for the explanation. – Yves Daoust Sep 30 '20 at 15:20

Use $$\sin(x) = 2 \sin(x/2) \cos(x/2)$$ then we have $$\begin{eqnarray*} \frac{\sin(x)}{2}+\sin^2\left(\frac{x}{2}\right)\tan\left(\frac{x}{2}\right) &=& \frac{\sin(x/2)}{\cos(x/2)} \underbrace{\left( \cos^2(x/2) + \sin^2(x/2) \right)}_{=1} \\ &=& \tan (x/2). \end{eqnarray*}$$

• I actually tried this route but got stuck, unfortunately. So I think it's worth commenting that the "trick" here to get to your right hand expression is to multiply the 2sin(x/2)cos(x/2)/2 term by cos(x/2)/cos(x/2). – Esteban Sep 30 '20 at 14:51

Fairly obvious: $$\sin^2\left(\frac{x}{2}\right)\tan\left(\frac{x}{2}\right)=(1-\cos^2\left(\frac{x}{2}\right))\tan\left(\frac{x}{2}\right)=\tan\left(\frac{x}{2}\right)-\cos\left(\frac{x}{2}\right)\sin\left(\frac{x}{2}\right)=\tan\left(\frac{x}{2}\right)-\frac{\sin x}{2}$$

• All the tried trig simplifiers beg to differ it was fairly obvious, unfortunately. I like the route you took. – Esteban Sep 30 '20 at 14:54

$$\frac{\sin x}{2} = \sin\frac{x}{2}\cos\frac{x}{2} = \frac{\sin\frac{x}{2}}{\cos\frac{x}{2}} \cos^2\frac{x}{2} = \tan\frac{x}{2} \left(1 - \sin^2\frac{x}{2}\right)$$


#### [SOLVED] Determining precisely where $\sum_{n=1}^\infty\frac{z^n}{n}$ converges?

Inspired by the exponential series, I'm curious about where exactly the series $\displaystyle\sum_{n=1}^\infty\frac{z^n}{n}$ for $z\in\mathbb{C}$ converges.

I calculated $$\limsup_{n\to\infty}\sqrt[n]{\frac{1}{n}}=\limsup_{n\to\infty}\frac{1}{n^{1/n}}$$ and $$\lim_{n\to\infty} n^{1/n}=e^{\lim_{n\to\infty}\log(n)/n}=e^{\lim_{n\to\infty}1/n}=e^0=1.$$ So the radius of convergence is $1$, so the series converges on all $z$ inside $S^1$. But is there a way to tell for which $z$ on the unit circle the series converges? I know it converges for $z=-1$, but diverges for $z=1$, but I don't know about the rest of the circle. For what other $z$ does this series converge? Thanks.

#### @Pookaros 2017-05-10 23:18:42

Even though the 1st answer is the more easy and appropriate here is a more analytic one. $\sum_{n=1}^{k} (z^n)/n =(z/1-z) $$\sum_{n=1}^{k-1} [(1-z^n)/n(n+1) + (1-z^k)/k] (we can prove that with induction till k). We can also see that 0 \leqslant |(1-z^k)/k|\leqslant 2/k\rightarrow0 for k\rightarrow$$\infty$ also

0 $\leqslant$ |(1-z^n)/n(n+1)|$\leqslant$ 2/n(n+1)

$\sum_{n=1}^{\infty}2/n(n+1)$ $(converges)$ so $\sum_{n=1}^{\infty} (z^n)/n$ $(converges)$ as well

#### @Martin Argerami 2012-03-11 00:56:15

Fix $z$ in the unit circle, i.e. $|z|=1$. We want to apply Dirichlet's test: if $\{a_n\}$ are real numbers and $\{b_n\}$ complex numbers such that:

1. $a_1\geq a_2\geq\cdots$
2. $\lim_{n\to\infty}a_n=0$
3. There exists $M>0$ such that $\left|\sum_{n=1}^Nb_n\right|\leq M$ for every $N\in\mathbb{N}$;

then $\sum_{n=1}^\infty a_nb_n$ converges. Here $a_n=1/n$, $b_n=z^n$. The first two conditions are clearly satisfied, and for the third one: $$\left|\sum_{n=1}^Nz^{ n }\right|=\left|\frac{z-z^{N+1}}{1-z}\right|\leq\frac{2}{|1-z|}$$ for all $N\in\mathbb{N}$. This shows that the third condition is satisfied for every $z\ne1$ in the circle.

In conclusion, the series converges for every $z$ with $|z|\leq1$ other than $z=1$, and it diverges for $|z|>1$.

#### @philmcole 2017-12-06 12:32:40

Can you explain this step: $|\sum_{n=1}^Nz^{ n }| = |\frac{z-z^{N+1}}{1-z}|$ ?

Here.

#### @philmcole 2017-12-06 13:48:17

Yeah, but where do you get that additional $z$ in the nominator from? By the formula you linked it should be $|\frac{1-z^{N+1}}{1-z}|$, no?

#### @Martin Argerami 2017-12-06 13:49:24

If you start the sum from $0$, yes.

#### @Pacciu 2012-03-11 23:23:01

The followin theorem on power series is due to E. Picard:

Let $(a_n)$ be a sequence of real numbers.

If the sequence $(a_n)$ is nonnegative, decreases and tends to zero when $n\to \infty$, then the complex power series $\sum a_n\ z^n$ converges in the closed unit disc $\overline{D}(0;1)$ with the only possible exception of the point $1$.

The proof of Picard's theorem relies on Abel's summation by parts formula, as far as I remember.

Now, the coefficients of your series, i.e. $a_n=1/n$, satisfy the assumptions of Picard's theorem, hence your series converges at least in $\overline{D}(0;1)\setminus \{1\}$; on the other hand, the series diverges when $z=1$ (for it becomes the harmonic series).

Therefore the convergence set of $\sum 1/n\ z^n$ is $\overline{D}(0;1)\setminus \{1\}$.

### Determining precisely where $\sum_{n=0}^\infty \left(\frac{z^n}{n}\right)$ converges uniformly

• 2017-09-13 22:36:35
• Pookaros
• 77 View
• 0 Score
• Tags:   complex-analysis

### [SOLVED] To prove the statements related to power series

• 2017-01-27 02:53:47
• Kavita
• 653 View
• 1 Score
• Tags:   complex-analysis


# Probability: Taking Cups From A Box

I just saw the question in an exam paper. My friend and I have different answer and I am not sure which solution is correct, so I hope someone can help me.

There are 16 cups in a box, 11 are blue and 5 are white. Six cups are taken out from it at the same time. What is the probability of taking at least 4 white cups?

My solution:

$$P=\frac{\binom54\binom{11}2+\binom55\binom{11}1}{\binom{16}6}$$

My friend's solution:

$$P=\frac{5!\times11\times6+5!\times11\times10\times_6\text{P}_2}{_{16}\text{P}_6}$$

My friend use a different approach and his answer is different from mine. I wonder if I am correct and why. Please show me the reason, thank you!

-
Your method is correct. –  André Nicolas Apr 15 '13 at 8:02
@AndréNicolas Can you tell me why I am correct? After my friend told me his solution, I am so confused with the question ... –  redcap Apr 15 '13 at 8:22

Your method is correct. There are $\binom{16}{6}$ equally likely ways to pick a collection of $6$ cups. (We can imagine the cups have secret ID numbers written in invisible ink.)
Your numerator counts the favourables. For example, the are $\binom{5}{4}$ ways to pick $4$ whites. For each of these ways there are $\binom{11}{2}$ ways to pick the accompanying blues, for a total of $\binom{5}{4}\binom{11}{2}$.
Your friend's proposed solution can be made to work, though it is perhaps a little trickier to do it correctly. The friend observed that counting order of picking, there are ${}_{16}P_6$ equally likely ways of picking $6$ cups. Now we count the number of favourables. Your friend's first term in the count of favourables is correct, the second is not.
There are $\binom{6}{2}$ ways of picking the locations of the $4$ blue cups. For each of these ways, the first chosen location can be filled in $11$ ways, and the second in $10$ ways. Then the remaining locations can be filled with white cups in ${}_5P_4$ ways. Multiply to get the total with $4$ white and $2$ blue. There are two mistakes in the proposed expression there. First, instead of $\binom{6}{2}$ there is ${}_6P_2$. Secondly, there is the $4!$ which may be a typo. For the placement of white cups in the $4$ available slots, either use the permutation symbol ${}_5P_4$, or decide the $4$ whites can be chosen in $\binom{5}{4}$ ways, and then permuted in $4!$ ways. That part turns out to be $(5)4!$, which is the same as $5!$.
You are welcome. I had figured the $4!$ was an unimportant error. But that still leaves an overcount in that part by a factor of $2$. That error is somewhat more structural. –  André Nicolas Apr 15 '13 at 9:30


# Parameterize unitary without transpose

For all unitary matrices, i.e. $A \overline{A}^T = I$, there is a skew-Hermitian matrix $X$ so that $A = exp(X)$. So the unitary group has $n^2$ dimensions.

Is there any similar parameterisation of all matrices with $A \overline{A} = I$? What can be said about the number of dimensions? (Btw. is there any name for this type of matrices in literature?)

• Note that If $M$ is a real square matrix of the relevant size, then $A = \exp(iM)$ has the property that $\overline{A} = \exp(-iM)$, so that $A\overline{A} = I$. – Geoff Robinson Oct 19 '15 at 22:56
• @QiaochuYuan: Right, this collection is not closed under multiplication. Does this already exclude any notion of dimensionality and parameterisation? – Sebastian Schlecht Oct 20 '15 at 8:38
• @GeoffRobinson: Right, but are these all matrices with this property? – Sebastian Schlecht Oct 20 '15 at 9:05
• @GeoffRobinson: The answer is yes if we add $A$ invertible, as $\exp: M(N,\mathbb{C}) \rightarrow GL(N,\mathbb{C})$ is surjective and $\exp(M) \overline{\exp(M)}=I$ follows $M = -\overline{M}$. – Sebastian Schlecht Oct 20 '15 at 9:13
• Well,$A$ certainly needs to be invertible in the question. – Geoff Robinson Oct 20 '15 at 10:00

The set $V= \{ A\in M_n(\mathbb{C})\ |\ A\bar A = I\}$ is a smooth submanifold of $M_n(\mathbb{C})$ with real dimension $n^2$.

Proof: Consider the involution $\iota:\mathrm{GL}(n,\mathbb{C})\to \mathrm{GL}(n,\mathbb{C})$ defined by $$\iota(A) = (\bar A)^{-1}.$$ This is an anti-holomorphic involution of the complex manifold $\mathrm{GL}(n,\mathbb{C})$, and its fixed locus is precisely $V$. Thus, $V$ is a totally real submanifold of $\mathrm{GL}(n,\mathbb{C})$ with (real) dimension $n^2$.

Also: While it's true that the map $f:M_n(\mathbb{R})\to \mathrm{GL}(n,\mathbb{C})$ defined by $$f(a) = \exp(ia)$$ has its image in $V$, it is not a 'parametrization' everywhere, i.e., $f$ is not a local diffeomorphism everywhere. While this is true on a neighborhood of $0\in M_n(\mathbb{R})$, at other places, the map $f$ definitely is not a local diffeomorphism. For example, if $a$ has $n$ eigenvalues of the form $2k_i\pi$ (where $k_1,\ldots, k_n$ are integers, not all zero), then $f(a) = I$, but the space of such real matrices $a$ has positive dimension for any $n$-tuple $(k_1,\ldots, k_n)$ for which not all of the $k_i$ are equal.

It turns out that $f$ is surjective. The proof uses the fact that, for $A\in V$, we have $A\bar A = \bar A A = I$, so, in particular, $A$ and $\bar A$ commute and hence can be put simultaneously in Jordan normal form by a real conjugation. Then, breaking $\mathbb{C}^n$ into a sum of complexifications of real subspaces according to the eigenvalues of $A$ and using the semi-simple/nilpotent decomposition appropriately, one can reduce to dealing with the upper triangular case, and the result can then be proved using simple facts about power series in commuting nilpotent variables. Details upon request (see below).

Of course, all of this is probably a special case of known facts about affine symmetric spaces. I have now realized that $V$ is simply the Cartan embedding for the affine symmetric space $\mathrm{GL}(n,\mathbb{C})/\mathrm{GL}(n,\mathbb{R})$. This Cartan embedding $$\sigma:\mathrm{GL}(n,\mathbb{C})/\mathrm{GL}(n,\mathbb{R})\longrightarrow V\subset \mathrm{GL}(n,\mathbb{C})$$ is given by $\sigma(B\cdot\mathrm{GL}(n,\mathbb{R})) = B\,(\,\overline B\,)^{-1}$. The exponential map we have been discussing is just the geodesic mapping of this affine symmetric space, so, probably all of this follows from general theory.

Details: Let $A\in\mathrm{GL}(n,\mathbb{C})$ satisfy $A\overline{A} = I$. Let $\lambda\in\mathbb{C}$ be an eigenvalue of $A$ of multiplicity $m\le n$ and let $$V_\lambda = \{ v\in\mathbb{C}^n \ |\ (A{-}\lambda)^mv = 0\ \}.$$ be the associated generalized eigenspace. Of course, $\mathbb{C}^n$ is the direct sum of these generalized eigenspaces. Since $\overline{A}$ commutes with $A$, it preserves each of these subspaces. Moreover, one clearly has $$\overline{V_\lambda} = V_{1/\bar\lambda},$$ so each of the spaces $V_\lambda+V_{1/\bar\lambda}$ is invariant under conjugation and hence is the complexification of a real subspace $W_\lambda\subset \mathbb{R}^n$. It follows that, by conjugating by a real matrix, we can assume that $A$ (and hence $\overline A$) is in block diagonal form, so it suffices to treat the case where either $A$ has a single eigenvalue $\lambda$ satisfying $\lambda\bar\lambda=1$, so that $\mathbb{C}^n=V_\lambda$, or else $A$ has an eigenvalue $\lambda$ satisfying $\lambda\bar\lambda > 1$ and $\mathbb{C}^n=V_\lambda\oplus V_{1/\bar\lambda}$.

In either case, we can assume that $\lambda = r\ge 1$ is real, since, if $\lambda = r e^{i\theta}$, we can replace $A$ by $e^{-i\theta}A$ and show that $e^{-i\theta}A$ is in the image of $f$ (since $I$ commutes with everything and $e^{i\theta} I = \exp(i\theta I)$.)

First, consider the case $\lambda = 1$. Then $A = C + i S$ where $C$ and $S$ are real matrices and $((C-I) + iS)^n = (A-I)^n = 0$. Moreover, $N=C-I$ and $S$ commute since $I = A\bar A = C^2+S^2 +i(SC-CS) = I + 2N + N^2 + S^2$. Note that $N$ and $S$ are nilpotent commuting matrices. Since they satisfy $$2N + N^2 = -S^2,$$ it follows that $N = p(-S^2)$ where $p(t) = -\tfrac12 t^2 + \cdots$ is the (unique) power series (with real coefficients) that satisfies $2p(t) + p(t)^2 = -t^2$. Since $S$ is nilpotent, it follows that $N = p(-S^2)$ expresses $N$ canonically as a polynomial in $S$. Now let $q(t)$ be the (unique) power series with real coefficients that satisfies $\sin q(t) = t$. Note that we must have $p(-q(t)^2) = \cos(t)-1$. Now, because $S$ is nilpotent, we have $S = \sin q(S)$, where $q(S)$ is a real polynomial in $S$. Putting all of this together, we have $$A = I + p(-S^2) + iS = \cos(q(S)) + i\sin(q(S)) = \exp(iq(S)).$$ Finally, before leaving this special case, let us note that, because $A$ satisfies its characteristic polynomial $(A-I)^n = 0$, it follows that $\overline A = A^{-1}$ is expressed as a universal polynomial in $A$ with real coefficients, so $iS = \tfrac12(A-\overline{A})$ is also expressed as a universal polynomial with real coefficients. Since $q(t)$ is an odd power series, it satisfies $iq(it) = f(t)$ where $f$ has real coefficients, so there is actually a formula of the form $A = \exp( i g_n(A))$ for all $A \in \mathrm{GL}(n,\mathbb{C})$ satisfying $A\bar A = I$ and $(A-I)^n=0$ for some universal polynomial $g_n(t)$ with real coefficients that also has the property that $g_n(A)$ is a real $n$-by-$n$ matrix for all such $A$. (This remark will be used below.)

Now, finally, let us assume that $A$ has eigenvalues $\lambda = e^t$ and $1/\lambda = e^{-t}$ for some $t>0$. Then $V_\lambda$ and $\overline{V_\lambda} = V_{1/\lambda}$ are disjoint, complementary complex subspaces of $\mathbb{C}^n$ and so we must have that there exists a matrix $Q\in M_n(\mathbb{R})$ such that $$V_\lambda = \{ v + iQv \ | \ v\in \mathbb{R}^n \}.$$ Because $V_\lambda$ is closed under multiplication by $i$, it follows that $Q^2 = -I$. Setting $$S = \cosh t + i\sinh t\,Q = \exp(i t Q),$$ we see that $Sw= e^t w$ for all $w \in V_\lambda$ and $Sw = e^{-t}w$ for all $w \in V_{1/\lambda}$, so $S$ is the semi-simple part of $A$. Hence $S$ can be written as $S = s_\lambda(A)$, where $s_\lambda(t)$ a polynomial in $t$ with real coefficients (that depend on $\lambda$). Thus, $\bar S = s_\lambda(\bar A)$ can be written as a universal polynomial in $A$, implying that $Q$ itself can be written as a universal polynomial in $A$ and hence, in particular, it commutes with $A$ and $\bar A$. Now, writing $$A = \exp(i t Q) B,$$ we see that $B\bar B = I$ and that $B$ can be written as a polynomial in $A$. Moreover, the eigenvalues of $B$ are now all equal to $1$, so $(B-I)^n=0$, and so $B = \exp(i g_n(B))$ (as per above), where $g_n(B)$ is a polynomial in $A$, which, therefore, commutes with $Q$ (which is a polynomial in $A$). Finally, we have $$A = \exp(i t Q)\exp(i g_n(B)) = \exp(i (t Q+g_n(B))),$$ as desired.

• Thank you very much for your insightful answer. The only main missing part for me is the surjectivity of $f$. – Sebastian Schlecht Oct 20 '15 at 16:43
• Robert, I learn so much new material from your answers! Just great! – Suvrit Oct 21 '15 at 13:24
• Robert, great answer. So a bit about the details, for simplicity assuming $A$ is diagonalisable. Commutativity gives as $A = U^{-1} \Lambda U$ for real $U$. $A$ is invertible, hence there is $\exp(i L) = \Lambda$. So, $A = \exp( i U^{-1} L U)$. Why is $U^{-1} L U$ real? – Sebastian Schlecht Oct 22 '15 at 20:05
• If $A$ is diagonal, then $A\bar A = I$ implies that all of the eigenvalues of $A$ are complex numbers of unit modulus, so each of them is of the form $e^{ir}$ where $r$ is real. – Robert Bryant Oct 22 '15 at 20:40
• I'm confused, I only wanted $A$ diagonalisable and not $A$ diagonal. – Sebastian Schlecht Oct 22 '15 at 21:24

Qiaochu Yuan is a little hard about our variety $V$; Kummer showed that an element of $V$ is in the form $U\bar{U}^{-1}$ (a generalization of this result is the Hilbert's theorem 90). Close to the subject, cf. "Ikramov, On the matrix equation $X\bar{X}=A$" http://link.springer.com/article/10.1134%2FS1064562409010153#page-1

Robert wrote a nice answer; we can give more elementary proofs as follows. $\mathbb{C}$ is seen as $\mathbb{R}^2$.

Proposition 1. $dim(V)=n^2$ when $V$ is considered as a real algebraic set.

Proof. According to Kummer, if $R\bar{R}=I$, then there is $T\in GL_n(\mathbb{C})$ s.t. $R=T\overline{T}^{-1}$. Let $f:T\in GL_n\rightarrow T\overline{T}^{-1}$; note that $f$ is a pseudo-parametrization of our set; in fact $f$ is a submersion. It remains to calculate the rank of $Df_T:H\in M_n\rightarrow (H-T\overline{T}^{-1}\overline{H})\overline{T}^{-1}$. Note that $rank(Df_T)=rank(H\rightarrow T^{-1}H-\overline{T}^{-1}\overline{H})$.

Let $T^{-1}=U+iV,H=X+iY$, where $U,V,X,Y$ are real matrices. Then $rank(Df_A)=rank(g:(X,Y)\in \mathbb{R}^{2n^2}\rightarrow UY+VX\in \mathbb{R}^{n^2}$; we show that $g$ is onto. Let $A\in M_n$; since $U+iV$ is invertible, there is $\lambda\in \mathbb{R}$ s.t. $U+\lambda V$ is invertible. Finally $g(\lambda(U+\lambda V)^{-1}A,(U+\lambda V)^{-1}A)=A$ and we are done.

Proposition 2. Any $R\in V$ can be written as $exp(iA)$ where $A$ is a real matrix.

Proof. Let $R=U+iV$, where $U,V$ are real. $R\bar{R}=I$ is equivalent to $U^2+V^2=I,VU=UV$; that is equivalent to: there is a real matrix $A$ s.t. $U=\cos(A),V,=\sin(A)$ and $R=\exp(iA)$.

EDIT. (cf. Sebastian's comment). $e^Me^{\bar{M}}=I$ does not imply that $e^{M+\bar{M}}=I$.

Proof. Take $M=\begin{pmatrix}i\pi&1\\0&-i\pi\end{pmatrix}$.

• That is very sleek! Do you need Prop1 for Prop2? Do you get Prop1 also from Prop2? – Sebastian Schlecht Oct 29 '15 at 11:59
• And do you have any suggestion what to name $V$? I understand that there might be no agreed name. Unfortunately, I cannot access right now the Ikramov paper to have a look. – Sebastian Schlecht Oct 29 '15 at 12:01
• I would like to see the details for your Proposition 2. I don't believe that it is as easy as you seem to think. I thought of exactly this line, right up to your 'that is equivalent to there is a real matrix A...". I didn't see how to prove that directly, and I would be curious to see what method you use to prove it. Also, the smoothness of $V$ follows, as I wrote, easily from the fact that it is the fixed point set of an anti-holomorphic involution. I don't see why it needs anything from Kummer, unless you are quoting the surjectivity of the Cartan embedding, a nontrivial fact. – Robert Bryant Oct 29 '15 at 14:11
• @ Sebastian SchlechtClearly , Prop. 1 and 2 can be independently proved. About a name for $V$, I don't know. In general, the authors consider elements of $V$ and not the whole set. cf also Horn and Johnson; Matrix Analysis, Section 4.6 – loup blanc Oct 29 '15 at 14:59
• @loupblanc: I suspected as much. So it's somewhat misleading to claim that your proof is 'more elementary'; it just leaves out many details and even essential ideas. In fact, while I mention Cartan's results, I don't use them (or any result of Kummer) in the surjectivity argument, which, in fact, uses nothing more than than the semi-simple/nilpotent decomposition (i.e., Jordan normal form), and even the result over $\mathbb{C}$ needs this. – Robert Bryant Oct 29 '15 at 15:52

I totally lied about this not being a natural thing to ask! As loup blanc alludes to, in fact $n \times n$ matrices such that $M^{-1} = \overline{M}$ can be interpreted as Galois descent data for descending the complex vector space $\mathbb{C}^n$ to a real vector space, or equivalently as a $1$-cocycle in

$$Z^1(B \text{Gal}(\mathbb{C}/\mathbb{R}), GL_n(\mathbb{C})).$$

The statement that any such matrix must have the form $U \overline{U}^{-1}$ says that any such $1$-cocycle is cohomologous to zero, or equivalently that the Galois cohomology set

$$H^1(B \text{Gal}(\mathbb{C}/\mathbb{R}), GL_n(\mathbb{C}))$$

is trivial. This just says that there is only one real form of $\mathbb{C}^n$ up to isomorphism, namely $\mathbb{R}^n$. The space $GL_n(\mathbb{C})/GL_n(\mathbb{R})$ appearing in Robert Bryant's answer can then be interpreted as the space of real forms of $\mathbb{C}^n$.


# Divisibility Challenge

#### anemone

##### MHB POTW Director
Staff member
Given unequal integers $a, b, c$ prove that $(a-b)^5+(b-c)^5+(c-a)^5$ is divisible by $5(a-b)(b-c)(c-a)$.

##### Well-known member
Let us put $f(x) = (x-b)^5 + (b-c)^5 + (c-x)^5$
Putting x = b we get f(b) = 0
so (x-b) is a factor
so a-b is a factor of $(a-b)^5 + (b-c)^5 + (c-a)^5$

similarly we have (b-c) and (c-a) are factors

now $(a-b)^5 = a^5 – 5a b^4 + 10a^2b^3 – 10 a^3 b^2 +5 a^4 b – b^5 = a^5 – b^5 + 5m$ where $m = - a b^4 + 2a^2b^3 – 2 a^3 b^2 + a^4 b b^4$
similarly $(b-c)^5 = b^5 – c^5 + 5n$
$(c-a)^5 = c^5 – a^5 + 5k$
Adding we get $(a-b)^5 + (b-c)^5 + (c-a)^5 = 5 (m+n+k)$

So $(a-b)^5 + (b-c)^5 + (c-a)^5$ is divisible by $5(a-b)(b-c)(c-a)$

#### anemone

##### MHB POTW Director
Staff member
Let us put $f(x) = (x-b)^5 + (b-c)^5 + (c-x)^5$
Putting x = b we get f(b) = 0
so (x-b) is a factor
so a-b is a factor of $(a-b)^5 + (b-c)^5 + (c-a)^5$

similarly we have (b-c) and (c-a) are factors

now $(a-b)^5 = a^5 – 5a b^4 + 10a^2b^3 – 10 a^3 b^2 +5 a^4 b – b^5 = a^5 – b^5 + 5m$ where $m = - a b^4 + 2a^2b^3 – 2 a^3 b^2 + a^4 b b^4$
similarly $(b-c)^5 = b^5 – c^5 + 5n$
$(c-a)^5 = c^5 – a^5 + 5k$
Adding we get $(a-b)^5 + (b-c)^5 + (c-a)^5 = 5 (m+n+k)$

So $(a-b)^5 + (b-c)^5 + (c-a)^5$ is divisible by $5(a-b)(b-c)(c-a)$

I like your solution because of the way you introduced a polynomial function for the problem and well done!

#### caffeinemachine

##### Well-known member
MHB Math Scholar
Given unequal integers $a, b, c$ prove that $(a-b)^5+(b-c)^5+(c-a)^5$ is divisible by $5(a-b)(b-c)(c-a)$.
Let $S_5=(a-b)^5+(b-c)^5+(c-a)^5$, $S^3=(a-b)^3+(b-c)^3+(c-a)^3$ and $S_2=(a-b)^2+(b-c)^2+(c-a)^2$.

From this thread http://mathhelpboards.com/challenge...^5-5=-^3-b^3-c^3-3-*-^2-b^2-c^2-2-a-8276.html we know that

$$\frac{S_5}{5}=\frac{S_3}{3}\frac{S_2}{2}$$.

Note that since $(a-b)+(b-c)+(c-a)=0$, we have $S_3=3(a-b)(b-c)(c-a)$.

Thus $$S_5=5(a-b)(b-c)(c-a)\frac{S_2}{2}$$.

Clearly $2$ divides $S_2$ and thus we are done.

#### anemone

##### MHB POTW Director
Staff member
Let $S_5=(a-b)^5+(b-c)^5+(c-a)^5$, $S^3=(a-b)^3+(b-c)^3+(c-a)^3$ and $S_2=(a-b)^2+(b-c)^2+(c-a)^2$.

From this thread http://mathhelpboards.com/challenge...^5-5=-^3-b^3-c^3-3-*-^2-b^2-c^2-2-a-8276.html we know that

$$\frac{S_5}{5}=\frac{S_3}{3}\frac{S_2}{2}$$.

Note that since $(a-b)+(b-c)+(c-a)=0$, we have $S_3=3(a-b)(b-c)(c-a)$.

Thus $$S_5=5(a-b)(b-c)(c-a)\frac{S_2}{2}$$.

Clearly $2$ divides $S_2$ and thus we are done.
Hey caffeinemachine,

Thanks for participating and that's another trick for me to learn today!


# Set of functions from empty set to $\{0,1\}$

How does the set of all functions $\{f \,|\, f: \emptyset \to \{0,1\}\}$ look like? Is it empty or does it contain infinitely many functions? Does the definition $f: \emptyset \to \{0,1\}$ make sense at all?

I was wondering because we know that the two sets $\{0,1\}^X$ and $\mathcal{P}(X)$ have the same cardinality. But this is only true if $X$ is non-empty, right?

• What have you tried so far? Have you tried considering the definition of "function"? – skyking Dec 11 '17 at 10:03

Yes, it makes sense. There is one and only one function from $\emptyset$ into $\{0,1\}$, which is the empty function. Think about the definition of function as a set of ordered pairs to see why.

• @philmcole If $X=\emptyset$ then $\mathcal P(X)$ has only one element. $\emptyset \in\mathcal P(X)$ but $\{\emptyset\}\notin\mathcal P(\emptyset)$ because $\{\emptyset\}\not\subseteq\emptyset.$ – bof Dec 11 '17 at 10:20
• @bof Oh, you're totally right. So the theorem holds also if $X=\emptyset$ since we have $\{0,1\}^X = \{f \,|\, f: \emptyset \to \{0,1\}\} = \{\text{the empty function}\}\sim \{\emptyset\} = \mathcal{P}(X)$ – philmcole Dec 11 '17 at 10:36

It is known as the empty function.

For any set $A$, there is exactly one function from the empty set to $A$, namely the empty function:

$$f_A: \emptyset \to A.$$

The graph of an empty function is a subset of the Cartesian product $\emptyset × A$. Since the product is empty the only such subset is the empty set $\emptyset$.

• I have a weird (maybe naif) argument: since '$x \in \emptyset$ implies that any proposition about $x$ is true', can we also say that $x \in f^{-1}(1)$? If we do this for all $x \in \emptyset$ can we conclude that $f$ is constant? And analogously, if we pick $y \in \emptyset$ such that $y \in f^{-1}(0)$ whereas for any other $x \in \emptyset, x \in f^{-1}(1)$, can we conclude $f$ is not constant? This seems to be a contradiction, does not it? – Gibbs Dec 11 '17 at 10:12
• related – Siong Thye Goh Dec 11 '17 at 10:19
• I read that $f$ is a constant function, but I see no mention of the contradiction in my previous comment... – Gibbs Dec 11 '17 at 10:25

A function $f:A\to B$ is a set of ordered pairs $(a,b)$ with $a\in A,b\in B$. In this case there is no $a\in A$ so therefore $f$ is an 'empty function'


# Numbering of each equation within cases with left alignment (both on the page and within the equations)

I am trying to create a set of equations with curly braces (like cases), each with their own set of numbers derived from the subsection (such as can be done with equations using \numberwithin{equation}{subsection}). I get a good result where I want one equation number representing all cases of the equation (code below).

$$\mathbb(E)(X) = \int_{-\infty}^{\infty} xdF(x) = \left\{ \begin{array}{lll} \sum_{x \in \mathcal{X}} xf_{X}(x) & =\sum_{x \in \mathcal{X}}x \mathbb{P}(X=x) &\text{ if } X \text{ is discrete}\\ \\ \int_{-\infty}^{\infty} xf_{X}(x)dx & &\text{ if } X \text{ is continuous} \end{array} \right.$$

What can I do to to have each of the cases numbered individually?

I have tried align and numcases, but each of them has some problem - either the equation or the text aligns right, or the spacing goes awry.

Would appreciate some help for the specific example above, with

1. Equation aligned to left of page

2. All text within cells left aligned

3. Equation numbers on extreme right

4. An empty cell in the 2nd case and

5. A blank line in between the two cases.

• this should be helpful: Separate labels in cases. rather than a full blank line, an optional dimension value for the gap, e.g. [.6\baselineskip] would seem preferable. – barbara beeton Aug 16 '16 at 19:37
• Off-topic: It should be \mathbb{E}(X), not \mathbb(E)(X). – Mico Aug 16 '16 at 19:48
• Thanks Mico :). I actually use macros for those and made a typo while changin it to regular (non-macro) code for the forum. – Py_Dream Aug 17 '16 at 2:13

Another solution (and numbering) with the empheq package (which loads mathtools, which loads amsmath):

\documentclass{article}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters
\usepackage{amsfonts, % for \mathbb and \mathcal macros
empheq}%

\numberwithin{equation}{subsection}
\setcounter{section}{1}
\setcounter{subsection}{1}

\begin{document}

\begin{subequations}
\begin{empheq}[left={\mathbb{E}(X)=\displaystyle\int_{-\infty}^{\infty} x\,dF(x)=\empheqlbrace}]{alignat = 2}
& \sum_{x \in \mathcal{X}} xf_{X}(x) =\sum_{x \in \mathcal{X}} x\mathbb{P}(X=x)
&\qquad & \text{if $X$ is discrete}, \\
& \int_{-\infty}^{\infty} xf_{X}(x)\,dx
& &\text{if $X$ is continuous}. \end{empheq}
\end{subequations}

\begin{subequations}
\begin{empheq}[left={\mathbb{E}(X)=\displaystyle∫_{-∞}^{∞} x\,dF(x)=\empheqlbrace}]{flalign}
& ∑_{x ∈ \mathcal{X}} xf_{X}(x) =∑_{x ∈ \mathcal{X}} x\mathbb{P}(X=x)
& &\text{if $X$ is discrete},&\hspace{5em} & \\
& ∫_{-∞}^{∞} xf_{X}(x)\,dx
&& \text{if $X$ is continuous}. \end{empheq}
\end{subequations}

\end{document}

• Sorry. It's once more a problem with my editor. i'LL FIX IT. – Bernard Aug 16 '16 at 21:04
• Hi, many thanks for this. Can this be done without the global [fleqn] option? I don't want all equations left aligned. – Py_Dream Aug 17 '16 at 2:02
• Yes, absolutely. Actually, what formatting was not very clear, as you can see from some comments. So, to sum it up, you want equation numbers on the right, and centred alignments? – Bernard Aug 17 '16 at 8:01
• Hi Bernard, as mentioned in the original question, I am looking for this particular set of equations to be left aligned and the numbers to be right aligned. However, I do not want equations to be left-aligned globally, i.e., I do not want the global [fleqn] option. – Py_Dream Aug 18 '16 at 11:34
• @Py_Dream: You must use the flalign environment then. Please see my updated answer. – Bernard Aug 18 '16 at 11:56

You didn't specify the type of problem(s) you encounter with the numcases environment. At any rate, I don't seem to encounter any in the following example. (The fleqn option is set so that the entire equation is set flush-left instead of centered. If that's not needed, just drop that option.)

\documentclass[fleqn]{article}
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters
\usepackage{amsfonts} % for \mathbb and \mathcal macros
\usepackage{amsmath}  % for \text and \numberwithin macros
\usepackage{cases}    % for numcases environment

%% And, just for this example:
\numberwithin{equation}{subsection}
\setcounter{section}{1}
\setcounter{subsection}{1}

\begin{document}
\begin{numcases}{\mathbb{E}(X) = \int_{-\infty}^{\infty} x\,dF(x)=}
\sum_{x \in \mathcal{X}} xf_{X}(x)  =
\sum_{x \in \mathcal{X}} x\mathbb{P}(X=x)
& \text{if $X$ is discrete} \\[1\baselineskip]
\int_{-\infty}^{\infty} xf_{X}(x)\,dx
& \text{if $X$ is continuous}
\end{numcases}
\end{document}

• Many thanks. I do not want to use the global [fleqn] option. So I was loading cases using \usepackage[fleqn]{cases} as was suggested somewhere. When I do this with your code (as on my earlier attempts), I get multiple errors for both the begin{numcases} line and the end{numcases} line. E.g. Undefined control sequence. ...}(X) = \int_{-\infty}^{\infty} x\,dF(x)=} Missing number, treated as zero. ...}(X) = \int_{-\infty}^{\infty} x\,dF(x)=} Illegal unit of measure (pt inserted). ...}(X) = \int_{-\infty}^{\infty} x\,dF(x)=} Is there any way to do this without the global [fleqn] option? – Py_Dream Aug 17 '16 at 2:05
• @Py_Dream - Under no circumstance should you attempt to pass the option fleqn to the cases package -- what you say "was suggested somewhere" is faulty. If you don't want to set the fleqn option at the \documentclass stage, you should set it as an option when loading the amsmath package: \usepackage[fleqn]{amsmath}. – Mico Aug 17 '16 at 5:33
• @Py_Dream - If you don't want all displayed equations to be left-aligned, certainly don't use the option fleqn option in the first place. If the non-centering should apply to just one displayed equation, you'll have to fine-tune its position "by hand", e.g., by using one or more \qquad instructions at the very end of the equation's right-hand most portion. – Mico Aug 17 '16 at 5:44
• Hi Mico, do you happen to have any further information (or links) on why fleqn should never be passed to the cases package and why the suggestion was faulty? It is not very helpful having cardinal truths stated without any reasons ascribed. – Py_Dream Aug 18 '16 at 11:37

Equation aligned to left of page: \documentclass[12pt,leqno]{book}

• I think you meant to specify fleqn, not leqno. – Mico Aug 16 '16 at 20:00
• @Mico: I had misunderstood, I guess. I'll change my code. Thanks! – Bernard Aug 16 '16 at 20:52


# Why Gauss-Legendre Quadrature should keep the number of integral points less than about 50?

I wanted to use Gauss-Legendre Quadrature to calculate an integral as follows：

When n=10 and some other number(except odd numbers),the numerical result is the same as theoretical result.

Clear["Global*"];
n = 10;
L[x_] := D[(x^2 - 1)^n, {x, n}]/(n!*2^n);
A[x_] := 2/((1 - x^2) (D[L[x], x])^2);
f[x_] := E^(-x)/x;
sol = NSolve[L[x] == 0., x];
nodes = (x /. sol);
coef = Table[A[x] /. {x -> nodes[[i]]}, {i, 1, Length@nodes}];
Sum[coef[[i]] f[nodes[[i]]], {i, 1, Length@nodes}]
Integrate[E^(-x)/x, {x, -1, 1.}, PrincipalValue -> True]

-2.11450175075
-2.11450175075

But,when n>=50,the code will give wrong numerical result.

Clear["Global*"];
n = 50;
L[x_] := D[(x^2 - 1)^n, {x, n}]/(n!*2^n);
A[x_] := 2/((1 - x^2) (D[L[x], x])^2);
f[x_] := E^(-x)/x;
sol = NSolve[L[x] == 0., x];
nodes = (x /. sol);
coef = Table[A[x] /. {x -> nodes[[i]]}, {i, 1, Length@nodes}];
Sum[coef[[i]] f[nodes[[i]]], {i, 1, Length@nodes}]
Integrate[E^(-x)/x, {x, -1, 1.}, PrincipalValue -> True]

-43.8873164858
-2.11450175075

That is very puzzling.

NSolve has severe issues to solve for the roots (which is not surprising since finding the roots of a polynomial of degree 50 is a nontrivial task):

Max[Abs[L[x] /. sol]]

164.177

That seems to be a precision problem (the polynomial hase huge coefficients but the powers of x tend to be very small so that this easily lead to catastrophic cancellation. You will get better results with higher WorkingPrecision:

sol = NSolve[L[x] == 0, x, WorkingPrecision -> 100];
Max[Abs[L[x] /. sol]]

0.*10^-92

So the real art here is to determine the roots in a numerically stable way. Actually, Gauß-Legendre quadrature rule is already built into the system. For example, see

n = 50;
prec = 200;
{nodes, coef, bla} = NIntegrateGaussRuleData[n, prec];
(* compute all quadrature points by convex combinations*)
nodes = (-1) * (1 - nodes) + nodes * 1;
coef = 2 coef;
a = coef.f[nodes];
b = Integrate[f[x], {x, -1, 1}, PrincipalValue -> True];
a - b

2.6225212*10^-190

PS.: I was quite astonished that Gauß quadrature works so well with this singular integral. Then it came back to my mind that it is constructed such that it neglects contributions of all odd functions (because they would integrate to 0 anyways)...

• thank you very much! I thought it was easy to solve for the roots of polynomial of large degree before. – Quere Sep 14 '18 at 12:25
• @Quere In the meantime, I found out that using higher WorkingPrecision helps to make your method more precise. – Henrik Schumacher Sep 14 '18 at 12:33
• Yes!I noticed it.The result was really amazing. – Quere Sep 14 '18 at 12:37
• Not really worth writing as a separate answer, so: the trick of using even-order Gauss-Legendre quadrature to evaluate principal value integrals with a singularity at the center was published by Piessens, but I seem to recall this being known as folklore. In case the pole is not exactly in the middle of the integration interval, one can either split the integral so that there is a regular part and a part symmetric about the pole, or one can use a substitution that centers the pole, allowing the use of Gaussian quadrature. – J. M.'s discontentment Sep 24 '18 at 19:45

If you add WorkingPrecision -> 60 in the NSolve function you get your solution.

n = 50;
A[x_] := 2/((1 - x^2) (D[LegendreP[n, x], x])^2);
f[x_] := E^(-x)/x;
sol = NSolve[LegendreP[n, x] == 0, x, WorkingPrecision -> 60];
nodes = (x /. sol);
coef = Table[A[x] /. {x -> nodes[[i]]}, {i, 1, Length@nodes}];
Sum[coef[[i]] f[nodes[[i]]], {i, 1, Length@nodes}]
Integrate[E^(-x)/x, {x, -1, 1.}, PrincipalValue -> True]

-2.11450175075145702914368470979175591804810787513962

-2.1145

Or you can use the built in functions i mma

<< NumericalDifferentialEquationAnalysis
n = 50;
{pts, w} = Transpose[GaussianQuadratureWeights[n, -1, 1]];
Integrate[E^(-x)/x, {x, -1, 1.}, PrincipalValue -> True]
Sum[w[[i]] f[pts[[i]]], {i, 1, Length@pts}]

-2.1145

-2.1145

A more stable way of computing the roots of a polynomial family that satisfies a three-term recurrence is the method of Golub and Welsch (1969), which computes the eigenvalues of a matrix based on the recurrence, sometimes called the "comrade matrix."

(*
* n-point Gauss quadrature (Golub-Welsch 1969)
*)
(* p[n][x] == (a[n]x+b[n])p[n-1][x] - c[n]p[n-2][x] *)
comradeMatrix[{a_, b_, c_}, {n_, n0_Integer}, prec_: Infinity] :=
Block[{n = Range@n0},
With[{beta = Sqrt[Rest@c/(Most@a*Rest@a)]},
N[SparseArray[{Band[{1, 1}] -> -b/a, Band[{2, 1}] -> beta,
Band[{1, 2}] -> beta}, {n0, n0}], prec]
]];
Module[{n}, comradeMatrix[{2 n - 1, 0, n - 1}/n, {n, n0}, prec]];

(*
{-0.998866, -0.994032, -0.985354, -0.972864, -0.956611, -0.936657, \
-0.913079, -0.885968, -0.85543, -0.821582, -0.784556, -0.744494, \
-0.701552, -0.655896, -0.607703, -0.557158, -0.504458, -0.449806, \
-0.393414, -0.3355, -0.276288, -0.216007, -0.154891, -0.0931747, \
-0.0310983, 0.0310983, 0.0931747, 0.154891, 0.216007, 0.276288, \
0.3355, 0.393414, 0.449806, 0.504458, 0.557158, 0.607703, 0.655896, \
0.701552, 0.744494, 0.784556, 0.821582, 0.85543, 0.885968, 0.913079, \
0.936657, 0.956611, 0.972864, 0.985354, 0.994032, 0.998866}
*)

The integration weights can be computed from these nodes as in the OP.

• As a terminological note: the tridiagonal matrix with the orthogonal polynomial's recurrence coefficients is called a Jacobi matrix. (The comrade matrix, as you might recall, is a Jacobi matrix for the Chebyshev polynomials, with a correction term representing the Chebyshev series coefficients.) I talked about this here. – J. M.'s discontentment Sep 24 '18 at 11:27
• @J.M. Barnett (1975) seems to introduce the name "comrade matrix" of a polynomial with respect to an arbitrary family of polynomials that satisfies a three-term recurrence and presents it as a generalization of the Chebyshev colleague matrix of Good (1961). But, you know, I'm not that confident about current terminology in this area. -- Yes, I found the link to that Q&A shortly after posting an answer and put it under the question above. – Michael E2 Sep 25 '18 at 17:34
• Argh, I switched up "comrade" and "colleague" again... I keep switching the general and specific cases. :D – J. M.'s discontentment Sep 25 '18 at 17:40


# Finding resonant frequency or damping ratio from Bode Plot

I am working on a question where I have to estimate a transfer function from its bode plot.

I plotted the asymptotes of this bode diagram, and was able to find out that this is 3rd order system with a pole at s = 0 and two complex poles.

$$\dfrac{w_n^2}{s(s^2 + 2\zeta w_n s + w_n^2)}$$ where I found out that $$w_n = 6.7 rad/s$$ from the asymptotic bode plot.

I was also able to find the system gain $$\K\$$ from the magnitude plot.

I am unable to find $$\\zeta\$$ here. I tried finding the resonant frequency $$\w_r\$$ from the bode plot so that I can calculate $$\\zeta\$$ using: $$w_r = w_n\sqrt{1 - 2\zeta^2}$$ but I was unable to.

I know that the frequency at which the phase plot crosses zero is the resonant frequency but the phase plot here doesn't cross zero.

I tried approximating $$\\zeta\$$ using the fact that maximally flat response is obtained for $$\\zeta = 0.707 \$$, so that for the given plot, $$\\zeta < 0.707 \$$. But I wasn't able to exactly find a value.

Is there any other way to find $$\\zeta\$$ or will I be just able to approximate it?

The solution says that the value of $$\\zeta\$$ is $$\0.447\$$.

• Curiously, it changed May 18, 2021 at 13:01
• @TonyStewartEE75 Sorry I added the wrong bode plot. May 18, 2021 at 13:02
• Compute d phi /dt max in the same units(rads) May 18, 2021 at 13:06
• Or rather $d\phi /d\omega$ then determine the ratio constant May 18, 2021 at 13:18
• If the plot is not on a paper (i.e. you have access to the datapoints), subtract the 1/s from it and you'll be left with a more manageable 2nd order magnitude/phase. May 18, 2021 at 15:09

The following graphical solution relies on the idea that it's possible to separate the contribute of the zero in w=0 by referring the magnitude measurements to a line slanted with a -20dB/decade slope. Thanks to the properties of logarithms, division becomes translation on the magnitude Bode plot. We also have to take into account the -90 degrees contribution in the phase - it's basically a constant -90° addition since, being the pole in the origin, it has already 'run its course'.

1. the first step is to find wn. In a second order system with no zeros, the phase resonance happens exactly at wn, the undamped natural frequency (a frequency that is in general different from wpeak, the peak frequency of the magnitude, and also from the damped natural frequency wd). Since we need to separate the phase contribution of the pole in the origin, instead of finding the frequency where the phase is -90° we need to find the frequency where the phase is -180° By eyeballing the scale on the tiny plot I have I believe I can locate it at 6.7 rad/s. You might end up with a better estimate.

Now I want to find the 3dB corner frequency the system would have without the pole in the origin . I therefore...

1. ...trace a slanted line, translated 3dB under the asymptotic behavior at low frequencies and

2. ...and then I look for the intersection of said line with the magnitude of the transfer function to find w3dB. Eyeballing again I find w3dB = 8.7 rad/sec

3. We are now in the position to computed the ratio w3dB/wn = 1.298 = 1.3

We can now either solve the expression for w3dB as a function of zeta

or, if we have a graph like this, 5) use it to find the value of zeta corresponding to w3dB/wn = 1.3.

again by eyeballing I get a zeta value of around 0.48, a value not dissimilar from that found by solving the equation

for zeta, which gives zeta = 0.477

And this value is reasonably close, considering the amount of lazy eyeballing employed, to the correct answer of 0.447. Try your estimates on a bigger graph, counting the pixels and report back. Did it work?

Caveat emptor: it is imperative that the second order function be without additional zeroes (apart for the one we have been able to separate). The relevant frequencies have different expressions form system with one or more zeroes.

• Thank you, yeah it did work. I got the w3dB to be around 8.9 rad/s from the bode plot, which gave me a ratio of 1.328. Got zeta = 0.4482. Thanks a lot! Jun 13, 2021 at 5:39


# plot graph of function with different constants

I need to plot the graph of :

$$v(t) = \frac{-mg}{b} (e^{-\frac{b}{m}t}+1)$$ , where $$g = 9.8 m/s^2$$ and $$b$$ and $$m$$ are positive constants.

Is there a way to plot this without having to define random values for $$b$$ and $$m$$? I mean a way in which I can see how the graph behaves for different values of $$b$$ and $$m$$ ?

• Unfortunately no, I am new to Mathematica, I only know the basics – Physmath Apr 22 at 2:17
• I will take a look, thank you ! – Physmath Apr 22 at 2:22
• To simplify little bit, you can introduce a new variable, say $\lambda=\frac{b}{m}$. Then you can Plot a sequence of curves for a list of $\lambda$ values. – yarchik Apr 22 at 3:03

v[s_, t_] := -g/s (Exp[-s t] + 1)
g = 9.8;
slist = {0.1, 0.2, 0.4, 0.8};
Plot[Evaluate[v[#, t] & /@ slist], {t, 0, 10},
PlotTheme -> {"BoldColors", "Frame", "Grid"},
FrameLabel -> {Automatic, v[t]},
FrameStyle -> Directive[14, Black],
PlotLabels -> slist
]

• Plot[Evaluate[v[slist, t] , {t, 0, 10},...] works too. – Ulrich Neumann Apr 22 at 8:02
• @UlrichNeumann That is good suggestion, it makes the syntax more transparent. – yarchik Apr 22 at 8:12


# Showing that if $3x$ is even then $3x+5$ is odd

I'm learning the absolute basics of how to do proofs, and am really struggling.

If 3x is even then 3x+5 is odd.

This is the solution:

I get that even numbers are 2n and odd numbers are 2n+1. For the life of me, I CANNOT get it into that form shown below. I feel so dumb. I tried looking up other answers before posting, but nothing I found is this basic.

Work: -Assumptions- 3x = 2n 3x+5 = 2k+1

-Trying to make sense of 3x- 3x+5 = 2k+1 3x = 2k-4

-Plugging in 2k-4 for 3x- 2k-4 = 2n 2k = 2n+4 k = n+2

-Plugging in n+2 for k- 3x+5 = 2(n+2)+1

...This is where I gave up. I don't know where I'm going with this anymore.

• You should calm down, everyone can have difficulties. Explain us where you get lost. If you don't know where you get lost I can try to explain you the proof step by step. – Eureka Dec 5 '20 at 17:42
• I'm good, just frustrated. I'd like step by step. I'll edit in my work above. Warning, there is no rhyme or reason to it. – visualbread Dec 5 '20 at 17:44
• If $y$ is even, can you prove that $y+5$ is odd? Try this first, then try your problem. There’s no substantial difference. – Benjamin Wang Dec 5 '20 at 17:46
• @visualbread your resolution may be a bit convoluted but it's correct. You just proved that $3x+5=2(n+2)+1$. And $2(n+2)+1$ is odd ,because it is of the form $2h+1$ with $h=n+2$ – Eureka Dec 5 '20 at 17:52
• @BenjaminWang I am unable to do that one either. From y = 2n and y+5 = 2k+1, I can get that all the way to n = k -2 (or k = n+2), but I can't see what that tells me. The final solution has everything nicely equal to one another, and I can't seem to set it up that way. – visualbread Dec 5 '20 at 17:54

I think you're getting confused by the $$3x$$ part. The $$3x$$ plays no role in the problem.

Suppose you're given any number that is even. I'll call it y. Now we want to show $$y+5$$ is odd.

Therefore by definition

$$y=2k$$ for some integer $$k$$

Now

$$y+5 = 2k+5$$

Now we just need to show that $$2k+5$$ is 2 times an integer plus 1

$$2k+5 = 2(k+2)+1$$

So $$2k+5$$ is odd because it can be written in the form 2*integer +1 where the integer here is $$k+2$$. So $$y+5$$ is odd since $$y+5 = 2k+5$$

So if any number is even. Then that number plus 5 is odd. It doesn't matter if the original number is 3x or 8z or 3x^2-5x+x^3 etc...

• I might be there, but I need just a little bit more help. How did you write 2k+5 in the form 2(k+2) + 1? I can see that those are the same, but how could I do it without trial and error? – visualbread Dec 5 '20 at 18:16
• So the first step is to look at 5. We see it is an odd integer. So I decide it is more convenient to write it as $4+1$. So I write $2k+5$ as $2k+4+1$. Now I can factor $2k+4 = 2(k+2)$. So putting it all together $2k+5 = 2k+4+1 = 2(k+2)+1$. Hope this makes sense. let me know. Suppose I had $2k+6$ instead. since 6 is even, I know I can factor immediately $2k+6 = 2(k+3)$. – Ameet Sharma Dec 5 '20 at 18:19
• Thanks! This shows me all the steps I need to follow my book's logic. I don't know what happened in my math education, but I never did learn some of these little things that make some of these proofs actually understandable. At least there's websites like this one to fill in the gaps. – visualbread Dec 5 '20 at 18:25
• No problem. I highly recommend doing lots of exercises with factoring, simplification and algebra so that these things become second nature. It takes a lot of practice but it is worth it. As you get into more advanced math, these things really need to be 2nd nature where you don't need to think about them anymore... otherwise you'll get bogged down at every step. – Ameet Sharma Dec 5 '20 at 18:31
• I'm sure there are lots of online websites. Here's one I just found as part of an online algebra textbook: openstax.org/books/college-algebra/pages/1-review-exercises. Each chapter has review exercises and a practice test. I recommend doing all these, maybe multiple times till you can do them in your sleep. In my opinion... if you want online resources, look for online algebra "textbooks"... and do all the exercises in each chapter. If you have doubts you can review the chapter. – Ameet Sharma Dec 5 '20 at 18:51

Your problem is that $$3x + 5 = 2k +1$$ is not an assumption. It is the conclusion you need to prove.

Your one and only assumption is that $$3x = 2n$$ for some integer $$n$$.

$$3x = 2n$$.

.... then you do a bunch of steps ....

.... steps .....

.... and get in the end ........

Conclusion: $$3x + 5 = 2(????????) + 1$$ where $$??????$$ is some integer you come up with in you steps.

Let's see what happens when we try. Let's take it nice and slow:

=======

$$3x = 2n$$.

$$3x +5 = 2n + 5$$

....hmmm, we want $$2(??????) + \color{red}1$$ in the end so let's pull out the $$+\color{red}1$$ first.....

$$3x + 5 = 2n+5 = 2n + (4 + \color{red}1)=(2n+4) +\color{red}1$$

.... hmmm, okay that's the $$+1$$ now we want $$2(\color{red}{??????}) + 1$$. To get the So we need to factor then $$2$$ out of $$2n+4$$ and see what we have left.... that will bee the $$\color{red}{??????}$$

$$3x + 5 = (\color{red}{2n+4}) + 1$$

$$3x + 5= 2(\color{red}{n + 2}) + 1$$

.... and that's it......

Conclusion: $$3x+5 = 2(\color{red}{n + 2})+1$$.

The $$??????$$ we wanted turns out to be $$\color{red}{n+2}$$ an we have

$$3x + 5 = (3x+4) + 1 = (2n+4) + 1 = 2(\color{red}{n+2}) + 1$$.

And because $$\color{red}{n+2}$$ is an integer if we let $$k = n+2$$ be that integer $$3x+5 = 2k + 1$$ and so... $$3x + 5$$ is odd.

=======

Although if you want to work backwards

Conclusion: $$3x + 5 = 2k +1$$ ..... and we want to solve for $$k$$ to show it is possible...

$$3x + 5 -1 =2k + 1-1$$

$$3x +4 = 2k$$

$$k = \frac {3x + 4}2 = \frac {3x}2 + 2$$.

.... but is $$\frac {3x}2 + 2$$ an integer?????

Well, $$3x$$ is even. So there is an integer $$n$$ so that $$3x = 2n$$ so

$$k = \frac {3x}2 +2 = \frac {2n}2 + 2 = n+2$$.

So $$k=n+2$$ is the integer we want to conclude $$3x+5 =2k +1$$.

If we did it this way our proof would go:

$$3x$$ is even so there is an integer $$n$$ so that $$3x = 2n$$. Let $$k = n+2$$; that is an integer.

$$2k + 1 = 2(n+2)+1 = 2n + 5 = 3x + 5$$.

So $$3x+5 = 2k +1$$ and that is odd.

Ok so we know that $$3x$$ is even, that means we can write $$3x=2n$$ for a suitable $$n$$, since even means that the number is divisible by two without remainder. But then we have $$3x+5=2n+5=2n+(4+1)=2n+2\cdot 2+1=2(n+2)+1$$ which clearly is odd.

• Thanks for the reply. I'm still not there yet. I can't figure out where 2n+5 came from or why it can be set equal to 2x+5. I need this broken down even further if that's even possible. – visualbread Dec 5 '20 at 17:55
• We set it equal to $3x+5$ NOT $2x+5$. I will try to break it down further: so – Mo145 Dec 5 '20 at 18:04
• 1)a natural number $N$ is called even if it is a multiple of $2$. So per definition we can write every even number $N$ as $N=2M$. Note that we can write any natural number as $N=2\frac{N}{2}$ but in general $\frac{N}{2}$ will not be a natural number, for example take $N=3$, then clearly $\frac{3}{2}$ is not a natural number. In fact this will only be the case if $N$ is even. – Mo145 Dec 5 '20 at 18:08
• 2)Since we assume $3x$ to be even we can, by 1) write it as $3x=2n$ where $n=\frac{3x}{2}$ so we have the following equality $3x=2n$ adding a number on both sides preserves the equality hence we have $3x+5=2n+5$ – Mo145 Dec 5 '20 at 18:11
• I hope this clarifies your concerns :) – Mo145 Dec 5 '20 at 18:11

We know that $$3x=2n$$. So: $$\color{blue}{3x}+5=\color{blue}{2n}+5$$ Because the "blue quantities" are equal. Now: $$3x+5=2n+5=2n+4+1$$ In this step I just wrote $$5$$ as $$4+1$$:

$$3x+5=2n+5=2n+4+1=2n+2\cdot 2+1$$ In this step I just wrote $$4$$ as $$2 \cdot 2$$.

$$3x+5=2n+5=2n+4+1=\color{green}{2n+2\cdot 2}+1=\color{green}{2(n+2)}+1$$ The last step is valid because the green quantities are equal. In the end: $$3x+5=2(n+2)+1$$ This means that $$3x+5$$ is odd because is of the form $$2h+1$$ with $$h$$ integer(in particular $$h=(n+2)$$)

Remember here that $$n$$ represents ANY natural number. You got to the answer but you didn’t even realize it. That’s probably because you are thinking syntactically rather than semantically. What I mean is the literal string of symbols $$2(n+2)$$ didn’t register to you as even because it is not the same as the string $$2n$$. But $$n+2$$ is a natural number just like $$n$$ is. So the the strings $$2(n+2)$$ and $$2n$$ both represent even numbers, and so $$2(n+2) + 1$$ is odd just as you have shown in your last line.

You are dealing with a problem where you are given too much information. Here is another way of doing it (we'll use $$m$$ for an integer).

If $$3x$$ is even then $$x$$ must be even, so we can put $$x=2m$$. [This is a consequence of the fact that $$2$$ is a prime, or can be proved in various ways]

Then $$3x+5=6m+5=6m+4+1=2(3m+2)+1$$.

Now we can put $$3m=n$$, an integer, to get $$2(n+2)+1$$.

For an alternative proof, we could put $$3m+2=n$$ and then we get $$2n+1$$.

Note that the last two sentences are alternatives to one another. They both use $$n$$, but $$n$$ is defined differently in the two cases.

What I'm trying to do here is to unpack how the different expressions for the same thing relate to each other. If you get your head round that you will be flying.

• I find this answer to be pretty overwhelming for the OP, since you are talking about "alternative proofs" and "consequences of the fact that 2 is prime that can be proved in various ways". I'm not underestimating the OP, but I think that when you learn fron basic you should do things calmly step by step. – Eureka Dec 5 '20 at 18:23
• @Eureka What I was trying to do was to show what happens when you keep the factor $3$ for an extra step. If it is "overwhelming" it might help OP to understand why the factor $3$ is best dropped ("too much information"). Either it helps or it doesn't. – Mark Bennet Dec 5 '20 at 18:35


# Evaluate $\int_0^\frac{\pi}{4} \cos^{-1}({\sin x}) \,dx$

I came across this integral in a math competition and couldn't solve it $$\int_0^\frac{\pi}{4} \cos^{-1}({\sin x})\, dx$$

I tried a $u$-substitution, with $u=\sin x$ and ended up with the integral $$\int_0^\frac{\pi}{4} \cos^{-1}(\text{u}) \cdot \frac{1}{\sqrt{1-u^2}}\,du$$ which is not much simpler and I cannot figure out how to solve this. Any hints/solutions for this problems?

I also tried drawing a triangle for the problem but it didn't really help with the solution.

You can use the trigonometric formula : $$\forall x \in\mathbb{R},\cos^{-1}(x)+\sin^{-1}(x)=\frac{\pi}{2}$$

Thus $\forall x\in\left[0,\frac{\pi}{4}\right]$ you have $\sin^{-1}(\sin(x))=x$ so : $$\cos^{-1}(\sin(x))+\sin^{-1}(\sin(x))=\frac{\pi}{2}\Rightarrow \cos^{-1}({\sin x})=\frac{\pi}{2}-x$$

Finally : $$\int_0^\frac{\pi}{4} \cos^{-1}({\sin x}) dx=\int_0^\frac{\pi}{4} \frac{\pi}{2}-xdx$$ Can you finish ?

• What is $\sin^{-1}(\sin x)=?$ – lab bhattacharjee Apr 11 '17 at 15:48
• it is $x$ since $x$ is in $[0,\pi/4]$ – Jennifer Apr 11 '17 at 15:54

HINT:

If $\cos^{-1}(\sin x)=y,0\le y\le\pi\ \ \ \ (1)$

and $\cos y=\sin x=\cos\left(\dfrac\pi2-x\right)$

$y=2m\pi\pm\left(\dfrac\pi2-x\right)$ where $m$ is an integer such that $(1)$ is satisfied

For $0\le2m\pi+\dfrac\pi2-x\le\pi\iff 2m\pi-\dfrac\pi2\le x\le2m\pi+\dfrac\pi2$

Here $m=0$

Here's a barely different route to take, continuing from the direction you've taken.

First, note that substituting $u=\sin x$ would actually give

$$\int_{x=0}^{x=\pi/4}\cos^{-1}(\sin x)\,\mathrm dx=\int_{\color{red}{u=0}}^{\color{red}{u=1/\sqrt2}}\frac{\cos^{-1}u}{\sqrt{1-u^2}}\,\mathrm du$$

Now, recall that $\dfrac{\mathrm d}{\mathrm du}\cos^{-1}u=-\dfrac1{\sqrt{1-u^2}}$, which means you can make another intermediate substitution of, say, $v=\cos^{-1}u$. Then you have

$$-\int_{v=\cos^{-1}0=\pi/2}^{v=\cos^{-1}(1/\sqrt2)=\pi/4}v\,\mathrm dv=\int_{\pi/4}^{\pi/2}v\,\mathrm dv=\dfrac{3\pi^2}{32}$$

which agrees with the other answers above.

$$\int \cos^{-1}(\sin x) dx$$ $$= \int 1 \cdot \cos^{-1}(\sin x) dx = x \cdot \cos^{-1}(\sin x) - \int x \cdot -\frac{\cos x}{\sqrt{1-\sin^{2}x}} dx + C$$ (integration by parts)

$$= x \cdot \cos^{-1}(\sin x) + \int x \cdot \frac{\cos x}{\sqrt{1-\sin^{2}x}} dx + C$$ $$= x \cdot \cos^{-1}(\sin x) + \int x \cdot \frac{\cos x}{\sqrt{\cos^2 x}} dx + C$$

$$= x \cdot \cos^{-1}(\sin x) \pm \int x \cdot \frac{\cos x}{\cos x} dx + C$$ $$= x \cdot \cos^{-1}(\sin x) \pm \frac{x^2}{2} + C$$

Now do it for the definite integral.

1)

$(u^2)^{\prime}=2\times u\times u^{\prime}$

therefore $\dfrac{1}{2}u^2$ is an antiderivative of $u\times u^{\prime}$

2) derivative of $\text{cos}^{-1}(x)=-\dfrac{1}{\sqrt{1-x^2}}$

$\displaystyle J= \int_0^{\tfrac{\pi}{4}} \text{cos}^{-1}(\sin x)dx$

Perform the change of variable $y=\sin x$,

$\displaystyle J=\int_0^{\tfrac{\sqrt{2}}{2}} \dfrac{\text{cos}^{-1}(x)}{\sqrt{1-x^2}}dx$

Using $(1)$,

\begin{align}J&=-\dfrac{1}{2}\Big[\text{cos}^{-1} (x)^2\Big]_0^{\tfrac{\sqrt{2}}{2}}\\ &=-\dfrac{1}{2}\left[\dfrac{\pi^2}{16}-\dfrac{\pi^2}{4}\right]\\ &=\boxed{\dfrac{3}{32}\pi^2} \end{align}


This section details the validation for the Beam calculator. Several examples are worked through to determine expected results such as deflections, forces, and stresses. These expected results are then compared to the actual output of the calculator.

The standard beam equations for a cantilever beam loaded at the free end are given below:

 Max Deflection: $$\delta_{max} = {P L^3 \over 3EI}$$ @ x = L Max Slope: $$\theta_{max} = {P L^2 \over 2EI}$$ @ x = L Shear: $$V = +F$$ constant Moment: $$M_{max} = -FL$$ @ x = 0

For the validation case, an Aluminum 6061-T6 beam with a 1 inch diameter circular cross-section and a length of 10 inches is loaded at 1000 lbf. The inputs are:

L = 10 in
F = 1000 lbf
E = 9.9e6 psi (Al 6061-T6)
$$A = {\pi d^2 \over 4} = 0.7854 ~in^4$$
$$I = {\pi d^4 \over 64} = 0.04909 ~in^4$$

For the given inputs, the expected results are:

 Max Deflection: $$\delta_{max} = 0.6859 \text{ in}$$ @ x = L Max Slope: $$\theta_{max} = 0.1029 \text{ rad}$$ @ x = L Shear: $$V = +1000 \text{ lbf}$$ constant Moment: $$M_{max} = -10,000 \text{ in-lbf}$$ @ x = 0

### Comparison With Calculator

#### Free Body Diagram

The Free Body Diagram (FBD) is shown below. From the FBD it can be seen that the forces balance and the beam is in static equilibrium.

#### Deflection & Slope

A screenshot of the results table giving the maximum deflection and slope is shown below. It can be seen that these values match the expected values above:

The deflection plots are shown below. From these plots it can be seen that a maximum deflection of 0.6859 inches occurs at the free end of the beam as well as a maximum slope of 0.1029 radians.

#### Shear-Moment Diagram

The shear-moment diagram for the beam is shown below. This diagram is what would be expected for the current case. A constant shear force of 1000 lbf exists along the length of the beam, and the moment increases linearly from 0 in-lbf at the free end of the beam to the full value of -10,000 in-lbf at the fixed end.

#### Stresses

There are two points of interest for validating stresses. Before calculating stress, the forces at these points need to be determined.

Axial (lbf) Shear (lbf) Moment (in-lbf)
Forces @ x = 0: $$F_{ax} = 0$$ $$F_{sh} = 1000$$ $$M = 10000$$
Forces @ x = L: $$F_{ax} = 0$$ $$F_{sh} = 1000$$ $$M = 0$$

The stresses are calculated using the following equations:

Axial Stress Shear Stress Bending Stress Von Mises Stress
$$\sigma_{ax} = {F_{ax} \over A}$$ $$\tau_{sh} = {F_{sh} \over A}$$ $$\sigma_{b} = {Mc \over I}$$ $$\sigma_{vm} = \sqrt{ (\sigma_{ax} + \sigma_{b})^2 + 3\tau_{sh}^2 }$$

Based on the forces at each point and the equations above, the expected stresses at the points of interest are:

Tensile (psi) Shear (psi) Bending (psi) Von Mises (psi)
Stress @ x = 0: $$\sigma_{ax} = 0$$ $$\tau_{sh} = 1273$$ $$\sigma_{b} = 101859$$ $$\sigma_{vm} = 101883$$
Stress @ x = L: $$\sigma_{ax} = 0$$ $$\tau_{sh} = 1273$$ $$\sigma_{b} = 0$$ $$\sigma_{vm} = 2205$$

The stress plots are shown below. It can be seen that these plots agree with the stresses calculated above.

There is one discrepancy that can be noted, which is that the values for bending stress and von Mises stress at x = L are shown to be higher in the stress plots than predicted. The reason for this is that the stress plots are showing the maximum nodal values for each element, and the maximum bending stress for the element at x = L will occur at the left-most node in that element. Therefore, the values of bending stress and von Mises stress reported in the plots will be somewhat higher than what was calculated above. However, the stresses for each node within any element can be interrogated in the result tables. This table will be discussed following the stress plots.

##### Stress At End of Beam (x = L)

A screenshot of one of the result tables for this case is shown below with the element of interest highlighted. The node at the very end of the beam (i.e. at x = L) is "Node 2" for the highlighted element. It can be seen that the bending stress at this node is 0 psi and the von Mises stress at this node is 2205 psi. This matches what was predicted.


# Find the remainder when $528528528…$up to $528$ digits is divided by $27$?

Find the remainder when $528528528...$up to $528$ digits is divided by $27$?
Here's what I have done: The number can be written as $528\cdot 10^{525}+528\cdot 10^{522}+...+528$ which has $176$ terms and each term is $\equiv15 \mod 27$ thus the number should be $176*15 \mod 27$ hence $21$ should be the remainder. But book says it is $6$. I don't understand the flaw in my logic. Please correct me.

• you have $21+6=27$ perhaps you are off by a sign? – gt6989b Oct 16 '17 at 15:26
• I think that your answer is correct. – alexp9 Oct 16 '17 at 15:29
• Brute force in python gives 21. – Gribouillis Oct 16 '17 at 15:31
• Are you sure the book says $6$ and not $-6$? After all, $21\equiv -6 \pmod{27},$ so then both answers would agree. – David K Oct 16 '17 at 15:36
• @fleablood Also a good point about negative remainders. It looks like there's probably an error in the book. (Unless the transcription of the problem is very confused, it's only $176$ "copies" of the group of digits $528,$ which makes $528$ digits altogether since each group has three digits. Also, we don't need $10^k$ to be congruent to $1$; we only need $10^{3k}\equiv 1 \pmod{27},$ which is true.) – David K Oct 16 '17 at 17:00

Here is a python3 session

>>> s = '528' * 176
>>> len(s)
528
>>> int(s) % 27
21

• Is it possible to multiply a string by a number? My god...python is awesome. – Integral Oct 16 '17 at 15:35
• @Integral yes strings, lists and tuples can be repeated by multiplying them by a number. – Gribouillis Oct 16 '17 at 15:36

You can see that $6$ cannot be correct by casting out $9$'s: Since $5+2+8=5+5+5$, we have

$$528528\ldots528\equiv5+5+5+\cdots+5+5+5=5\cdot528\equiv5(5+2+8)\equiv5\cdot6\equiv3\mod 9$$

so the remainder mod $27$ must be either $3$, $12$, or $21$. Your approach gave the correct answer, $21$.

• Anyway it is also $-6$ so there is a typo in the book or Anuran has not have seen the minus sign. – Piquito Oct 16 '17 at 15:54
• @Piquito, I agree, a negative sign would fix things (as David K noted in comments). But remainders are usually understood to be nonnegative, so I'm inclined to think it's a typo. – Barry Cipra Oct 16 '17 at 15:57

Since $$3\mid111$$, we know that $$27\mid999$$, Therefore, $$1000\equiv1\pmod{27}$$ Thus, \begin{align} \sum_{k=0}^{175}528\cdot1000^k &\equiv528\cdot176\pmod{27}\\ &\equiv3\cdot176^2\pmod{27}\\ &\equiv3\cdot14^2\pmod{27}\\ &\equiv3\cdot7\pmod{27}\\ &\equiv21\pmod{27} \end{align}

You are incorrect in assuming $10^{k} \equiv 1 \mod 27$. As $10^k \not \equiv 1$ we do not have $528*10^k \equiv 15 \mod 27$.

What you need instead is $528528... = 528(1001001001......)$

And $1001001..... =\sum_{k=0}^{175} 10^{3k}$

$10^3 \equiv 1 \mod 27$... Oh... we do have that and you were not wronng after all.... so $\sum 10^{3k}\equiv 176 \equiv 14 \mod 27$.

So $528528....... \equiv 15*14 \equiv 21 \mod 27$.

And... the book is wrong.

Had it been 527 iterations of 528 the answer would be $6$.

Note that $$27 \times 37 = 999$$.

To find the remainder you get when you divide $$528528\cdots 528$$ by $$999$$, you can "cast out" $$999$$s.

$$\underbrace{528 + 528 + \cdots 528}_{\text{176 times} } \to 176 \times 528 \to 92928 \to 92+928 \to 1020 \to 21$$

So the remainder is $$21$$.

Note. If the remainder was bigger than 26, you would have had to divide it by 27 to get the correct remainder.


# Why do we study Cantor Set?

For finding counter examples. That does not sound convincing enough, at least not always. Why as a object in its own right the study of Cantor Set has merit ?

• Why are you not convinced that counterexamples are an important thing to study? (Re: "at least not always", the beauty of a counterexample is that only needs to be used once, in a particular key spot, to change our understanding forever.) – Daniel R. Collins Sep 30 '18 at 1:07

1. in beginning real analysis: to counter the naive notion that a "closed set" is a union of closed intervals, plus a few single points.

2. In beginning Lebesgue measure: the easiest example of an uncountable set of measure zero

3. In general topology: sets homeomorphic to the Cantor set are useful in proofs

4. Fractal geometry: many fractals are homeomorphic to the Cantor set. Mandelbrot calls such a thing a Cantor dust to suggest its appearance.

• Can one claim and substantiate that the study of cantor set is something fundamental and not just a source of ready counterexample ? – Vagabond Sep 29 '18 at 15:21
• Point (4) seems to address this. The Cantor set is one of the simplest examples of a fractal, and is therefore studied in detail by students who are first learning fractal geometry or analysis (to the point that a colleague of mine, after writing a masters thesis on Cantor-like sets, started her PhD by stating that she never wanted to see the Cantor set again). – Xander Henderson Sep 30 '18 at 14:51

The Cantor set is quite useful in its own right. My preferred way to think of the Cantor set is as "the most general compact metrizable space." That it is the most general such space means that it is often good for counterexamples because it lacks the particulars. At the same time, one can construct things by specialization.

The formal expression of the Cantor set being the most general compact metrizable space is that every compact metrizable space is the image of the Cantor set under a continuous function. One can use this as a method of proof. For example, to show that a continuous surjection from $$[0,1]$$ onto $$[0,1]^2$$ exists, one can use the fact that $$[0,1]^2$$ is the image of the Cantor set under a continuous function and then extend this continuous function by linear interpolation (the complement of the Cantor set consists of open intervals) to all of $$[0,1]$$.

A lot more can be proven this way, including a number of very surprising results. A wonderful source for such arguments is the following paper, which (deservedly) won an award for mathematical exposition:

Benyamini, Yoav. "Applications of the universal surjectivity of the Cantor set." The American mathematical monthly 105.9 (1998): 832-839.

Among the results proven there is the entirely classical result of Banach and Mazur that every separable Banach space is linearly isometric to a subspace of $$C[0,1]$$; a result as far from being a counterexample as can be.

I think that you may be selling short the value of a counterexample! They are quite useful for making sure that you have not proven too much. i.e. When you have a plausible but only semi-formal argument, how do you tell if it is worth the effort in making it rigorous? Checking against counterexamples is often a useful step.

Still, there are relations to unbounded paths in an infinite binary tree without leaves. That is, suppose that you start at the root and write $$0.$$, thought of as a ternary number. As we travel to the left or right, write a $$0$$ or $$2$$, respectively, for the following digit. Continuing on we get a ternary expansion defining a real number in the Cantor set. Correspondingly, the ternary expansion of an element of the Cantor set gives rise to a path from the root in the tree.

Spaces that are homeomorpic to the Cantor set arise naturally in many mathematical settings, particularly in dynamical systems.

For one dynamical example, the Cantor set is homeomorphic to the phase space of any infinite Bernoulli process.

For another, the "nonescaping set" of many simple dynamical systems in the real line (or the complex plane) is homeomorphic to the Cantor set (this is a "Cantor dust" example as in the answer of @GeraldEdgar). Consider for example the dynamical system $$z_n = (z_{n-1})^2 + 10$$ (You can replace $$10$$ by any real or complex number of magnitude $$>2$$). One can prove that there is a subset $$C \subset \mathbb C$$ homeomorphic to the Cantor set such that if $$z_0 \in C$$ then the sequence $$(z_n)$$ is bounded (in fact it stays in $$C$$), whereas if $$z_0 \not\in C$$ then $$\lim_{n \to \infty} |z_n| =\infty$$. In short, points not in $$C$$ escape to infinity, points in $$C$$ do not.

Also, there are important theoretical descriptions/properties of the Cantor set, for example:

• A topological space is homeomorphic to the Cantor set if and only if it is compact, metrizable, has no isolated points, and every component is a point.
• Any compact zero-dimensional metrizable topological space is homeomorphic to a subspace of the Cantor set.

Cantor sets even occur naturally in number theory! The $$p$$-adic integers $$\mathbb Z_p$$ are homeomorphic to the Cantor set.

• Do you mean some subset in $\mathbb{C}$? I don't get the example; for any $z_{-1}$ real one has $z_n \geq 10^{2^n} \to +\infty$. – Vandermonde Oct 7 '18 at 16:01
• Oops, you're right, that was careless of me. Fixed. – Lee Mosher Oct 7 '18 at 21:26


# Sequence queue - converges or diverges?

I have the next sequence queue: $$\sum_{n=1}^{\infty}{\frac{n^2-n-1}{n^4+n^2+1}}$$. Does the queue converges or diverge?

My attempt: I have tried to show that $$\frac{1}{n^2}>|\frac{n^2-n-1}{n^4+n^2+1}|$$ for any $$n>0$$, and then by the comparation test we get that since $$\sum_{n=1}^{\infty}{\frac{1}{n^2}}$$ converges, we have that $$\sum_{n=1}^{\infty}{|\frac{n^2-n-1}{n^4+n^2+1}|}$$ converges too, and by a theorem we have that since $$\sum_{n=1}^{\infty}{|\frac{n^2-n-1}{n^4+n^2+1}|}$$ $$\implies$$ $$\sum_{n=1}^{\infty}{\frac{n^2-n-1}{n^4+n^2+1}}$$ converges. Is that right?

• Yeah, a direct comparison test works for this. You were right to compare the following: $$\frac{1}{n^2}>\left|\frac{n^2-n-1}{n^4+n^2+1}\right|$$ Now because the $$\sum_{n=1}^{\infty} \frac{1}{n^2}$$ converges by the p-test, you can conclude that the original series also converges. Mar 16, 2021 at 22:22
• @ObsessiveInteger So my attempt is right? but can you show me how I satisfy that $\frac{1}{n^2}>|\frac{n^2-n-1}{n^4+n^2+1}|$. for $\frac{1}{n^2}>\frac{n^2-n-1}{n^4+n^2+1}$ it's easy since we get by algebra that $n^3+1>0$ for $n>0$. However, for the negative it's not that easy. Mar 16, 2021 at 22:31
• You could make an argument by saying that the numerator of $\frac{n^2-n-1}{n^4+n^2+1}$ grows smaller faster compared to that of $\frac{1}{n^2}$ and similarly, the denominator of $\frac{n^2-n-1}{n^4+n^2+1}$ grows bigger much faster compared to that of $\frac{1}{n^2}$. This means that $\frac{n^2-n-1}{n^4+n^2+1}$ is reaching $0$ faster compared to $\frac{1}{n^2}$, hence, the inequality is true. Of course you can see that graphically as well. Plug in both functions into desmos and you will see. Mar 16, 2021 at 22:41
• @ObsessiveInteger seeing that throw desmos is good, but can I actually verify that by using just inequality algebra? and thank you for the answer. Mar 16, 2021 at 22:44
• Why don't you do the limit comparison test instead? That way you do not have to worry about proving the inequality. Mar 16, 2021 at 22:45

I continue from where you stopped,

Easy to show that :

$$\frac{n^2-n-1}{n^4+n^2+1} < \frac{n^2-1}{n^4+1} < \frac{n^2}{n^4} < \frac{1}{n^2}$$

When we know that $$\sum_{n=1}^{\infty}{\frac{1}{n^2}}$$ converges.

Therefore, by comparison test :

$$\underset{converges}{\underbrace{\frac{n^2-n-1}{n^4+n^2+1}}} < \underset{converges}{\underbrace{\frac{1}{n^2}}}$$

• However, what stops us from doing so for just the expression without ||, is that when $n$ has small values then the whole expression is negative, and then you cannot use the comparison test, so we have to show it with ||. Mar 16, 2021 at 22:48
• @aasc232 By the limit test we get the equation aims to zero so can see that only the first element in the sum has negative value do not forget is the sum of this equation .
– ATB
Mar 16, 2021 at 22:54
• Can you remind me the limit test? Mar 16, 2021 at 22:56
• And the comparison test is when you have $0\le a_k\le b_k$ for all $k>0$, with the first elements of $a_k$ included, then if $b_k$ converges we get that $a_k$ converges too. So since we have that $a_k$ isn't positive for all $k>0$ we cannot use it. That is what I tried telling you. Isn't right? Mar 16, 2021 at 23:01
• @aasc232 Do the $n=1$ term separately $$|\frac{1^2-1-1}{1^{4}+1^2+1}|<\frac{1}{1}$$ and then ATB's answer applies for all $n>1$ as $\frac{n^{2}-n-1}{n^{4}+n^{2}+1}$ is positive for $n>1$. Of course, a finite number of terms does not determine the convergence and can be disregarded in general when checking convergence
– user649348
Mar 16, 2021 at 23:03

We are trying to prove that the series, $$\sum_{n=1}^{\infty}{\frac{n^2-n-1}{n^4+n^2+1}}$$ converges.

Let us use the Limit Comparison Test. That is, if $$a_n>0$$ and $$b_n>0$$, then if $$\lim_{n\to \infty}\frac{a_n}{b_n}=L$$ for some real number $$L$$. Then, if $$b_n$$ converges, by the limit comparison test, $$a_n$$ must also converge.

Let $$a_n=\frac{n^2-n-1}{n^4+n^2+1}$$ and we say $$b_n=\frac{1}{n^2}$$. Then, $$\lim_{n\to \infty} \frac{\frac{n^2-n-1}{n^4+n^2+1}}{\frac{1}{n^2}}\\ \lim_{n\to \infty}\left(\frac{(n^2-n-1)(n^2)}{n^4+n^2+1}\right)\\ \lim_{n\to \infty}\frac{n^4-n^3-n^2}{n^4+n^2+1}\cdot \frac{\frac{1}{n^4}}{\frac{1}{n^4}}\\ \lim_{n\to \infty} \left(\frac{{1-\frac{1}{n}}-\frac{1}{n^2}}{1+\frac{1}{n^2}+\frac{1}{n^4}}\right)\\ \lim_{n\to \infty}\frac{1-0-0}{1+0+0}=\frac{1}{1}=1$$

Hence, we have shown that the $$\lim_{n\to \infty}\frac{a_n}{b_n}=L$$ converges because it equals some constant; in this case, $$1$$.

Now, because $$\sum_{n=1}^{\infty}\frac{1}{n^2}$$ converges by the p-test, (since $$p=2>1$$), we can conclude that the series, $$\sum_{n=1}^{\infty}{\frac{n^2-n-1}{n^4+n^2+1}}$$ must also converge by the limit comparison test.

• Ohhh I didn't try using this, in this way. Thank you! Mar 16, 2021 at 23:03
• One last thing, by limit comparison test we have to show that the sequence queue $\frac{n^2−n−1}{n^4+n^2+1}$ is positive. How do we show that? or you saying we disregard the first negative elements of the sum?' Mar 16, 2021 at 23:12
• Technically you do not have to show that, note that the sum $\sum_{n=1}^{\infty}$ starts at $n=1$, so we are only considering values for $n$ that are positive. Notice that for values greater than $1$, $\frac{n^2-n-1}{n^4+n^2+1}$ can never be negative. Mar 16, 2021 at 23:19
• So you are saying that becuase the only negative fraction of the sum is $-\frac{1}{3}$ then there exist elements that if we sum them we get a positive number bigger then $\frac{1}{3}$? Mar 16, 2021 at 23:24
• Thank you a lot! Mar 16, 2021 at 23:29