# Finding the local maxima/minima of the following function

$$f: \mathbb{R}\rightarrow \mathbb{R}$$. Then determining if each of the solutions is a global maximum or a global minimum. $$f(x) = \frac{x^{4}}{4} - 2x^{3} + \frac{11}{2}x^{2} - 6x + 2$$ for all $$x \in \mathbb{R}$$.

I have used the synthetic division to find this equation: $$\left ( x^{2} - 5x + 6 \right )\left ( x - 1 \right ) = 0$$

So the critical points are $$x^{*} = 1,2,3$$.

I know that if $$x^{*} = 1$$, then $${f}''\left ( 1 \right ) = 2 > 0$$, so this is minimum.

If $$x^{*} = 2$$, then $${f}''\left ( 2 \right ) = 1 < 0$$, so this is maximum.

If $$x^{*} = 3$$, then $${f}''\left ( 3 \right ) = 2 > 0$$, so this is minimum.

How do I determine whether these solutions are local max/min and global max/min?

Are all of them global solutions as $$x \in \mathbb{R}$$?

EDIT: I have plugged the values of the $$x's$$ in the main function.

For $$x=1$$ and $$x=3$$, $$f(1)= -0.25 = f(3)$$, and for $$x=2$$, $$f(2)= 0$$.

So is $$x=1,3$$ a local minimum and $$x=2$$ a global maximum?

• Use the 2nd derivative. – Wuestenfux Oct 8 '18 at 7:05
• Local max/min: second derivative. Global Max/Min: compare values or find inequality. – Andreas Oct 8 '18 at 7:05
• Have used the second derivative. So are all of them local solutions? I think all of them are global solutions as $x \in \mathbb{R}$. – OGC Oct 8 '18 at 7:06

From the second derivative test the extremum points that you have found are all local. Note that $$\lim_{x\to \pm\infty}f(x)=+\infty$$, so $$x=1$$ is not a global maximum point. On the other hand, since $$f(1)=f(3)=-1/4$$, it follows that $$x=1$$ and $$x=3$$ are global minimum points.
• Without drawing the graph, how would I figure out that $x=1$ and $x=3$ are global minimum points? – OGC Oct 8 '18 at 7:19
• Since $f$ is differentiable in $\mathbb{R}$, and $\lim_{x\to \pm\infty}f(x)=+\infty$, any global minimum point is also a critical point. – Robert Z Oct 8 '18 at 7:23


# How do you solve this sort of definite integral?

Can someone walk me through how to do the following problem so I can attempt a few more practice problems?

If: $$\int_{1}^{5} f(x) dx = 12$$ and $$\int_{4}^{5} f( x) dx = 3.6$$ find: $$\int_{1}^{4} f( x) dx$$

Would it simply be $12 - 3.6$ ?

EDIT

If: $$\int_{0}^{9} f(x) dx = 37$$ and $$\int_{0}^{9} g( x) dx = 16$$ find: $$\int_{0}^{9} 2f(x)+3g(x) dx$$

Would this simply be: $2 \times 37 + 3 \times 16$?

-
Do you know any theorems or identities that relate the values of integrals of the same function with different limits? –  MJD May 7 '12 at 4:18
If $a \leq c \leq b$, then $\int_a^b=\int_a^c+\int_c^b$. Use this profitably. –  Ｊ. Ｍ. May 7 '12 at 4:19
As you said, it is simply 12-3.6. –  MJD May 7 '12 at 4:19
@MarkDominus Wow, I didn't think it would be that simple. That's why I posted it up here. I'll post a second one up so it's not a waste of a question. –  justcheckingin May 7 '12 at 4:21
Regarding the second problem: yes, that's right. –  Brian M. Scott May 7 '12 at 4:26

This is done using additivity of integration on intervals i.e. if $c \in [a,b]$ and

$\displaystyle \int_a^b f(x) dx$, $\displaystyle \int_a^c f(x) dx$ and $\displaystyle \int_c^b f(x) dx$ are well- defined, then $$\int_a^b f(x) dx = \int_a^c f(x) dx + \int_c^b f(x) dx$$ Hence, in your case, you have that $$\int_1^5 f(x) dx = \int_1^4 f(x) dx + \int_4^5 f(x) dx$$ Hence, we get that $$12 = \int_1^4 f(x) dx + 3.6$$ i.e. $$\int_1^4 f(x) dx = 8.4$$

For the second problem as Brian pointed out in the comments, it follows from linearity of integration i.e. $$\int \left( a f(x) + b g(x) \right)dx = a \int f(x)dx + b \int g(x) dx$$ provided all the integrals are well-defined.

-

$$\int_a^bf(x)dx+\int_b^cf(x)dx=\int_a^cf(x)dx$$
The integral in the interval $[1,4]$ is the difference: integral in $[1,5]$ - integral $[4,5]$.


# General formula for iterated cumulative sum

Consider the sequence $$S_0$$ consisting of ones:

$$1,1,1,1,1,1,\ldots$$

Now compute the cumulative sum of this sequence, and call the resulting sequence $$S_1$$:

$$1,2,3,4,5,6,\ldots$$

Proceed iteratively to generate sequence $$S_2$$:

$$1,3,6,10,15,21,\ldots$$

then $$S_3$$:

$$1,4,10,20,35,56,\ldots$$

and so on.

It is well known that each sequence $$S_k$$ can be represented by a $$k$$-degree polynomial $$P_k(n)$$. For the above sequences the polynomials are $$P_0(n) = 1$$ $$P_1(n) = n$$ $$P_2(n) = \frac{n^2+n}{2}$$ $$P_3(n) = \frac{n^3+3n^2+2n}{6}$$

My question: Is there a general formula for coefficients of the polynomial $$P_k$$? Or more generally, is there a formula to compute $$S_k(n)$$ as a function of $$n$$ and $$k$$? I mean a closed formula $$S_k(n) = f(k,n)$$ (not an iterative procedure such as the construction method I just described).

If that helps, actually I'm not interested in $$S_k(n)$$, but rather in the quotient $$S_k(n)/S_k(n+1)$$.

• Just a test to see if I have understood: in $S_1$ should the last term be $21$? – User3773 Feb 26 '15 at 17:39
• @Cla Oops. Yes, sorry. Corrected! – Luis Mendo Feb 26 '15 at 17:40

The numbers in sequence $S_k$ are the binomial coefficients $\binom{m}{k}$; the $n$-th term of $S_k$ is $\binom{n-1+k}{k} = \frac{(n-1+k)!}{(n-1)!k!}$. One can prove this by using that $$\binom{i}{i} + \binom{i+1}{i} + \cdots + \binom{i+j}{i} = \binom{i+j+1}{i+1}$$ for any $i,j \geq 0$.

For $k=1$ we find $P_1(n) = \binom{n-1+1}{1} = \binom{n}{1} = n$, for $k=2$ we find $P_2(n) = \binom{n-1+2}{2} = \binom{n+1}{2} = \frac{n(n+1)}{2}$, for $k=3$ we find $P_3(n) = \binom{n-1+3}{3} = \binom{n+2}{3} = \frac{n(n+1)(n+2)}{6}$, etcetera.

• Wow. It was really simple! Could you provide any reference? – Luis Mendo Feb 26 '15 at 17:43
• Thanks a lot for your help. I've posted a related question here – Luis Mendo Feb 26 '15 at 18:47

We can generalize your problem to arbitrary initial sequences.

Let $a_n\,(n=0,1,2,3,...)$ be a sequence of numbers. Define its iterated partial sums using the recurrence $$S^{(0)}_n=a_n,\quad S^{(k+1)}_n=\sum_{m=0}^n S^{(k)}_m,\tag1$$ so that we have, for example, $$\small\begin{array} &S^{(0)}_0=\color{green}{a_0}, &S^{(0)}_1=\color{blue}{a_1}, &S^{(0)}_2=\color{maroon}{a_2},&...\\ S^{(1)}_0=\color{green}{a_0}, &S^{(1)}_1=\color{green}{a_0}+\color{blue}{a_1}, &S^{(1)}_2=\color{green}{a_0}+\color{blue}{a_1}+\color{maroon}{a_2},&...\\ S^{(2)}_0=\color{green}{a_0}, &S^{(2)}_1=\color{green}{a_0}+(\color{green}{a_0}+\color{blue}{a_1}), &S^{(2)}_2=\color{green}{a_0}+(\color{green}{a_0}+\color{blue}{a_1})+(\color{green}{a_0}+\color{blue}{a_1}+\color{maroon}{a_2}),&...\\ S^{(3)}_0=\color{green}{a_0}, &S^{(3)}_1=\color{green}{a_0}+(\color{green}{a_0}+(\color{green}{a_0}+\color{blue}{a_1})),&... \end{array}\tag2$$ Now we can prove by induction that the following formula holds: $$S^{(k+1)}_n=\sum_{m=0}^n\binom{m+k}k\,a_{n-m}.\tag3$$

• Vladimir, I've just given an approach which generalizes your solution even more. Please see my new answer. – Gottfried Helms Aug 29 '19 at 6:55

A more generalized solution, where even fractional iteration-heights $$h$$ for $$S_n^{(h)}$$ become possible, can be found using a matrix-ansatz. Consider the matrix-equation $$D \cdot A = S^{(1)}(A) \tag 1$$ where $$D$$ is the lower triangular unit-matrix $$D= \Tiny \begin{bmatrix} 1&.&.&.&\cdots\\1&1&.&.&\cdots\\1&1&1&.&\cdots\\ 1&1&1&1&\cdots\\ \vdots&\vdots&\vdots&\vdots&\ddots\\ \end{bmatrix} \tag 2$$ then of course \small \begin{align} D^2 \cdot A &= S^{(2)}(A) \\ D^3 \cdot A &= S^{(3)}(A) \\ \vdots \\ D^h \cdot A &= S^{(h)}(A) \\ \end{align} \tag 3 The $$h$$'th power of $$D$$ can be computed using $$L = \log(I + (D-I))$$ and $$\exp(L)$$ using the series-representation of this functions (which reduce to finite sums in the case of using $$D$$). We get formally

$$\displaystyle \qquad \qquad \Large{D^h =}$$ $$\tag 4$$

and where we need only document the entries of the first column because of the schematic form of $$D^h$$:

$$\displaystyle \qquad \qquad S_n^{(h)} (A) = \sum_{c=0}^n D_{n,c} \cdot A[c] = \sum_{r=0}^n D_{n-r,0} \cdot A[r] \tag 5$$

The coefficients $$D_{r,0}$$ might look abscure, but can easily be described when factorials are extracted:

$$\displaystyle \qquad \qquad \large {S_5^{(h)}(A)=}$$ $$\tag 6$$

and even simpler

$$\displaystyle \qquad \qquad \large {S_5^{(h)}(A)=}$$ $$\tag 7$$

The coefficients in the previous representation are the unsigned Stirlingnumbers $$1$$'st kind and for integral $$h$$ this gives of course the appropriate binomial-expressions which are noted in the other answers and comments.
But we can easily insert fractional $$h$$ as well!

Concerning your last question, the quotient.

Example, let $$k=3$$ then the quotient can be found by multiple cancellations: $$P_3(n) = {n^3+3n^2+2n\over 6} = {(n+2)(n+1)n\over 6} \\\ P_3(n+1) = {(n+1)^3+3(n+1)^2+2(n+1)\over 6} = {(n+3)(n+2)(n+1)\over 6} \\\ {P_3(n+1)\over P_3(n)} ={{(n+3)(n+2)(n+1)\over 6}\over {(n+2)(n+1)n\over 6} } = {n+3\over n}$$ Thus in general: $${P_k(n+1)\over P_k(n)} ={{(n+k)\cdots(n+2)(n+1)\over k!}\over {(n+k-1)\cdots(n+1)n\over k!} } = {n+k\over n}$$


# Arcwise connected part of $\mathbb R^2$

Here's a question that I share: Show that if $D$ is a countable subset of $\mathbb R^2$ (provided with its usual topology) then $X=\mathbb R^2 \backslash D$ is arcwise connected.

• This is even true if you only require $D$ to have lebesgue-measure 0: math.stackexchange.com/questions/77791/… Jun 9 '12 at 9:20
• I have two further questions: 1) Is this result holds in higher dimension i.e., on $\mathbb{R}^n$, where $n \in \mathbb{N}$. 2) Can one characterize the topological space for which this kind of properties hold $?$ May 22 '13 at 18:47
• @TeresaLisbon I first asked it as new question but it was closed and repititive requests to open it were discarded in CURED chatroom and they suggested that new questions shouldn't be asked but bounty should be put on old question. Which I did now. Sep 23 '21 at 6:02
• Just for reference, the question that was closed as a duplicate is If A is countable subset of $\mathbb{R}^2$ , then $\mathbb{R}^2 - A$ is pathwise connected.. The relevant discussion in the chatroom CURED can be found here: Request for reopening //q/3973870. Sep 23 '21 at 6:57
• @No-One Got it, thanks. I think what I'll do, if I plan to answer this, is place your bounty text in my answer, to make sure that my answer targets your query, along with the question in general. Sep 23 '21 at 9:20

HINT: Not only is $\Bbb R^2\setminus D$ arcwise connected, but you can connect any two points with an arc consisting of at most two straight line segments.

Suppose that $p,q\in\Bbb R^2\setminus D$. There are uncountably many straight lines through $p$, and only countably many of those lines intersect $D$, so there are uncountably many straight lines through $p$ that don’t hit $D$. Similarly, there are uncountably many straight lines through $q$ that don’t hit $D$. Can you finish it from here?

• Yes, I can : two of them at lest intersect. One auther way is to consider the bissector $\Delta$ of $[ab]$ and all straight lines $[p,\delta]\cup[\delta,q]$ where $\delta \in \Delta$, On of them at lest is a subset of $X$ Jun 9 '12 at 9:32
• @Mohamed: Exactly. (Or if you’re really lucky, one of them is the line through $p$ and $q$.) Jun 9 '12 at 9:37
• I have not thought about this one!! Thank's!! (Edit [p,q] not [a,b] ) Jun 9 '12 at 9:51
• From here. In order to show path $f:[0,1]\to \Bbb{R}^2-A$ is continuous.we can construct a function: $f(t)=f_1(t)$ ,if $t\in [0,1/2]$ and $f(t)=f_2(t)$ ,if $t\in [1/2,1]$. $f$ is continuous by pasting lemma. And we're done. Am I right?@Briam M Scott Jul 16 '20 at 11:57
• @AmanPandey: Yes, that’s right. Jul 16 '20 at 16:35

Any two points in $\mathbb R^2\setminus D$ are connected by uncountably many disjoint arcs of circles, of which only countably many may intersect $D$.

(This is adapted from one of my student's solutions to a related exam problem.)

Let $$p, q$$ be two distinct points in $$\mathbb{R}^2 \setminus D$$. If the straight line segment joining $$p$$ to $$q$$ lies in $$\mathbb{R}^2 \setminus D$$, then you are done: one possible parametrization of the path is $$\gamma(t) = (1 - t)p + tq$$, $$0 \leq t \leq 1$$.

So, suppose that the above does not work. Now, note that there are uncountably infinitely many straight lines passing through the point $$p$$. Since $$D$$ is only countable, in particular there are uncountably infinitely many straight lines passing through $$p$$ and not intersecting $$D$$. Fix any one such line $$L_1$$. Once more, there are uncountably infinitely many straight lines passing through $$q$$ that also intersect $$L$$. In particular, there are uncountably infinitely many such lines that also do not intersect $$D$$. Fix any one such line $$L_2$$.

Suppose that $$L_1$$ and $$L_2$$ intersect at the point $$r$$. Then, you can take the path joining $$p$$ and $$q$$ to be the one that starts at $$p$$, traverses along the line $$L_1$$ to the point $$r$$, then traverses along the line $$L_2$$ to the point $$q$$. One possible parametrization of this path is $$\gamma(t) = \begin{cases} (1 - 2t)p + 2tr, & 0 \leq t \leq \tfrac{1}{2};\\ (2 - 2t)r + (2t - 1)q, & \tfrac{1}{2} \leq t \leq 1. \end{cases}$$ Note that the pasting lemma shows that $$\gamma$$ is indeed continuous.

As for how one arrives at these specific parametrizations, one first needs to know the parametric equation of a straight line. For instance, see Parametric form of a line for a quick refresher. Secondly, one needs to adjust the parameter $$t$$ by scaling and translating in order to get it to lie in the "correct" range for one's purposes. This is another linear change, so it should not be too difficult.

But, just to belabor the point further, here's one way you can mentally figure out the parametrization $$\gamma$$ in the second case. To join the points $$p$$ and $$r$$, we want to vary $$t$$ from $$0$$ to $$1/2$$ such that at $$t = 0$$ we are at $$p$$ and at $$t = 1/2$$ we are at $$r$$. So, if the parametrization for this part looks like $$\gamma(t) = f(t)p + g(t)r$$, then we want $$f(0) = 1$$ and $$f(1/2) = 0$$, and we also want $$g(0) = 0$$ and $$g(1/2) = 1$$. Can we find linear functions $$f(t) = \alpha_1 t + \beta_1$$ and $$g(t) = \alpha_2 t + \beta_2$$ that satisfy these conditions? Sure, just substitute those values of $$(t, f(t))$$ and $$(t, g(t))$$ that we wrote down for $$t = 0, 1/2$$ into the respective equations to solve for $$\alpha_i, \beta_i$$. Repeat the process for the line joining $$r$$ to $$q$$, and you are done.

• For completeness, you should at least state that your path is also injective, which implies that it defines an embedding $[0,1]\to X$, as required by the definition of an arcwise connected space. Sep 28 '21 at 17:57

Ok I will take a stab at clarifying Brian M. Scott's Answer instead of writing a fully different answer.

Let $$p,q\in \mathbb{R}-D$$. Then Define $$A:=\{\text{ Lines Through }p\}$$, $$B:=\{ \{\text{ Lines through }q\}$$.

One could write the definitions of these sets more formally if desired, but the meaning is clear. I claim the following: $$\exists l\in A, \text{ such that } l\cap D=\emptyset.$$ Similarly $$\exists n\in B, \text{ such that } l\cap D=\emptyset.$$ Lets us understand why this should be clear. Now define a mapping $$m:\mathbb{R} \to A$$ by $$m(x):=$$ the line in $$A$$ with slope $$x$$. This mapping is clearly $$1-1$$ and onto (almost see below*), as any line through a point $$p$$ is determined by its slope, and any slope uniquely determines a line through $$p$$. You could formalize this more by writing any line through $$p$$ in point slope form, but I leave that to the reader.

A similar argument follows for $$B$$, thus $$||A||=||B||=||\mathbb{R}||$$.

Now let us show that there are lines in $$A$$ and $$B$$ which do not contain points in $$D$$. define a map $$\phi:D\to A\times B$$, by $$\phi(d):=\{(l,m)\in A\times B| d=l\cap m\}$$. That is each point $$d\in D$$ gets mapped to the pair of lines in $$A$$ and $$B$$ which meet at $$d$$. This mapping is $$1-1$$, as any two points determine a unique line. By assumption $$D$$ is countable, therefor $$\phi$$ cannot be onto thus there exists a pair of lines, $$(l^*,m^*)$$, which do not contain any points in $$D$$. This follows as $$A\times B- \phi(D)\neq \emptyset$$.

we have a piecewise linear path $$p \to l^*\cap m^* \to q$$. QED.

The Crux of the argument, here is where we assert that the mapping $$\phi$$ cannot be onto, given the assumption that $$D$$ was countable.

One small note, the map $$m$$ is not quite onto, as the vertical line through $$p$$ has undefined slope. However, this doesn't disturb the argument as the main idea is that $$A$$ and $$B$$ are both uncountable. We might also be able to circumvent this by taking a mapping from the extended reals.

• Great stuff, really nice answer, thanks for adding the clarification in the first line. Sep 25 '21 at 12:32


# Are at most $1/3$ vertices "kings"?

If $$G=(V,E)$$ is a finite, simple, undirected graph, and $$v\in V$$, we set $$N(v) = \{w\in V:\{v,w\}\in E\}$$, and $$\text{deg}(v)= |N(v)|$$. We say a vertex $$v\in V$$ is a king if $$\text{deg}(v) > \text{deg}(w)$$ for all $$w\in N(v)$$.

In the graph $$G=(\{0,1,2\}, \big\{\{0,1\}, \{1,2\}\big\})$$, one of the $$3$$ vertices is a king. Let $$\text{King}(G)$$ be the set of king vertices.

Question. Is it true that for any finite connected graph $$G=(V,E)$$ with $$|V|>1$$ we have $$|\text{King}(G)|/|V|\leq 1/3$$? If not, how large can this value get?

• A complete bipartite graph $G = U \cup V$ with $|U| = n$ and $|V| = n-1$ has $n - 1$ kings out of $2n - 1$ total vertices. Feb 28 at 14:16
• maybe related: mathoverflow.net/questions/343607/… Mar 1 at 15:14

For this discussion I am assuming we do not consider isolated vertices to be "Kings", even though technically your definition considers them to be so in a vacuous sense (I guess this convention goes back to Shakespeare). Otherwise of course one can make every vertex a king by having no edges whatseover.

For the matching lower bound, observe that no two kings can be adjacent, and if there is at least one king, the set $$E'$$ of ordered pair edges $$(v,w)$$ in $$E$$ with $$v \in \mathrm{King}(G)$$ and $$w \not \in \mathrm{King}(G)$$ is non-empty. Now we do weighted double counting: \begin{align*} \# \mathrm{King}(G) &= \sum_{v \in \mathrm{King}(G)} 1 \\ &= \sum_{(v,w) \in E'} \frac{1}{d(v)}\\ &< \sum_{(v,w) \in E'} \frac{1}{d(w)} \\ &\leq \sum_{w \in V \backslash \mathrm{King}(G)} 1 \\ &= \#V - \# \mathrm{King}(G) \end{align*} hence $$\# \mathrm{King}(G) < \frac{1}{2} \# V.$$ Of course the same claim holds when there are no kings as long as the graph is not the empty graph. So this shows that the lower bound provided by the complete bipartite graph examples (adding an isolated vertex in the case when one wants an even number of vertices) are completely optimal: the maximal number of kings in a graph on $$n$$ vertices is $$\max( \lfloor \frac{n-1}{2} \rfloor, 0)$$.

This bound can also be viewed as quantifying a variant of the "friendship paradox". (Based on this connection, I propose "influencer" as a more modern and gender-neutral terminology alternative to "king".)

• There is already the gender-neutral "celebrity" which appears to be motivated by interpreting the vertex degree as the number of people by which a person is known. Mar 1 at 15:20
• Furthermore the terminology "king" is used with a different meaning in oriented tournaments (these are vertices with maximum out-degree). Mar 2 at 4:14

The fact that the number of kings is less than the number of non-kings is essentially equivalent to the following problem, proposed by Alexander Razborov to Tournament of Towns in 1990:

Given an $$m\times n$$ matrix, $$m. Some entries are starred, and each column contains a starred entry. Then there exists a star whose row contains more stars than its column.

(Here columns correspond to kings, rows to non-kings, stars to edges, and the strictness of inequalities is different.)

I wanted to find a proof that uses Hall's marriage theorem [1] instead of double-counting.

Given a graph $$G=(V,E)$$, let $$K$$ be the set of kings in $$V$$, and $$R:=V \setminus K$$ the rest.

Claim: $$|K| < |R|$$.

Proof Let $$G=(V,E)$$ be a counterexample that minimizes the sum $$|V|+|E|$$, so $$|K| \ge |R|$$. Then $$G$$ is bipartite, since any edge between nodes in $$R$$ can be removed. If $$|K|>|R|$$ then removing one king would yield a smaller counterexample, so $$|K|=|R|$$. If there was a subset $$S$$ of $$K$$ where its neighborhood satisfies $$|N(S)|< |S|$$, then the induced graph on $$S \cup N(S)$$ would be a smaller counterexample. Thus the Hall condition is met in $$G$$. Removing from $$G$$ a perfect matching of $$K$$ to $$R$$ yields a smaller counterexample.

If we consider the complete bipartite graph $$K_{n,m},$$ where $$n,m$$ are natural numbers with $$n < m,$$ then the maximum degree of a vertex in this graph is $$=m$$ and there are at least $$n$$ many vertices having degree $$m$$, and so the number of "kings" (as per the definition above) in this graph is $$= n,$$ and the total number of vertices $$=n+m.$$
Now, since $$n,m$$ can be anything (with $$n \le m$$), so one can take $$n,m$$ to be such that $$n/(n+m) > \frac{1}{3},$$ and thus in this case we see that the number of kings in this graph is $$> \frac{1}{3} \cdot$$ the number of vertices in the graph.
For such graphs you can just set $$n=m-1$$ to see that you cannot get an "asymptotic" bound of $$< 1/2.$$
• If $n=m$ then there are no kings. The best this bipartite construction can do is $\lceil n/2\rceil$ many kings, as Nik Weaver has also pointed out. Feb 28 at 15:58


Why is the integral of $\frac1{x^2}$ from $1$ to $\infty$ not the same as the infinite sum from $1$ to $\infty$?

Studying series I am a bit confused on this point. The infinite sum of $1/x^2$ from $1$ to $\infty$ was proved by Euler to be $\pi^2$ divided by $6$:

$$\sum_{x=1}^\infty\frac 1 {x^2}=\frac {\pi^2} 6$$

But if I integrate from $1$ to $\infty$ of the same entity namely $1/x^2$ it is $1$. Correct..? Unless I did it wrong. $$\int_1^\infty\frac 1 {x^2}dx=1$$ How can this be since by integrating it seems we are adding a lot more numbers to cover the same area so we should by all means get the same thing or something at least as large as $\pi^2/6$?

• Why would anyone expect them to be the same? Dec 24, 2017 at 16:49
• @LordSharktheUnknown, please read his entire question. Dec 24, 2017 at 16:54
• The relationship between the sum and the integral is given by en.wikipedia.org/wiki/Euler–Maclaurin_formula. they differ because rectangles are not curved. The area in the rectangles is not the area under the curve. Dec 24, 2017 at 16:54
• @Sedumjoy, please read your edited question for how to write the integral and sum :). Dec 24, 2017 at 17:00
• I agree with @LordSharktheUnknown, it is not natural to expect that $$f(x)=\frac{1}{x^2},\qquad g(x)=\frac{1}{\lfloor x\rfloor ^2}$$ have the same integral over $(1,+\infty)$, also because $g(x)\geq f(x)$. Dec 24, 2017 at 17:55

Note that $$\int_1^\infty \frac{1}{x^2}\leq\sum_1^\infty \frac{1}{n^2}\tag{1}$$ by considering a Riemann sum with left endpoints. Here is a picture (for the case of $1/x$ but a similar picture can be drawn for this case as well). See this picture. Image credits go to Wikipedia.

• +1 For the picture.. It illustrates the point better :) I will add it to my answer
– Ant
Dec 24, 2017 at 16:59
• no its the wrong graph, should be a graph of $\frac{1}{x^2}$, right? Dec 24, 2017 at 17:00
• @FoobazJohn, Just wondering, what program did you use to make this picture? Dec 24, 2017 at 17:00
• @mathreadler, yeah you're right, though the basic insight remains the same. Dec 24, 2017 at 17:01
• @mathreadler Yes I commented that it is for $1/x$ but a similar picture can be drawn for the case $1/x^2$. Dec 24, 2017 at 17:01

When you do the sum, you sort of approximate the area with rectangles of base length equal to $1$. Draw the function $1/x^2$ and draw the rectangles with base length 1; you'll see that the area under the rectangles is much bigger than the area under the function $1/x^2$

Here is an illustration for the function $1/x$, but it's essentially the same as in the $1/x^2$ case. (Thanks to @FoobazJohn) The integral adds a lot more numbers, but these numbers are multiplied by something very small. The end result is that the integral represents the area under the $1/x^2$ curve, which is less than the area under the rectangles.

Let us compare $1$ and $\int_1^2\frac1{x^2}\,\mathrm dx$. Since $\bigl(\forall x\in(1,2]\bigr):\frac1{x^2}<1$, $\int_1^2\frac1{x^2}\,\mathrm dx<1$. For the same reason, $\int_2^3\frac1{x^2}\,\mathrm dx<\frac14$, $\int_3^4\frac1{x^2}\,\mathrm dx<\frac19$, and so on. So$$1=\int_1^\infty\frac1{x^2}\,\mathrm dx<\sum_{n=1}^\infty\frac1{n^2}=\frac{\pi^2}6.$$

Note that it is not true that $\int_a^bf(x)\,\mathrm dx$ is the sum of all numbers $f(x)$ with $x\in[a,b]$. Instead, it is the average value of $f$ in $[a,b]$ times $b-a$.

• all three answers are very good in explaining this and I will pick one to close the problem but they are equally good....I feel stupid for not seeing this that I had to ask.... Dec 25, 2017 at 0:59


# Help Me Find Mistake in Exact Differential Equation

I am working on exact differential equations and I just cannot seem to understand them and was hoping to have my method checked and please provide feedback on that.

$$(18xy^2 - \sin(x))dx + (8 + 18x^2y)dy = 0;\,\, y(0) = 1$$ I first calculated the crossed partial derivatives for both terms to check they were equal which I found they both came out to be 36xy.

Then I have said that $$\frac{\partial u}{\partial x} = 18xy^2 - sin(x)$$ and therefore $$u = 9y^2 x^2 + cos(x) + h(y)$$

Now I have said that $$\frac{\partial u}{\partial y} = 18yx^2 + h'(y) = 8 + 18yx^2$$ which I believe is not a problem.

This says that h'(y) = 8 which I have then integrated with respect to y and found h(y) = 8y + C

I believe this means my final result for the answer which in our notes is always denoted as $$u(x,y) = 36xy + 8y + C$$

So far I cannot understand how these exact differential equations work and have been told my answer is wrong. I am yet to find the exact solution using the initial condition as I am unsure how to do that as well because I am confused by a few things with these problems however if possible could we please discuss the method how to solve these types of DEs and check to see if my answer is correct.

Thank you very much,

Michael

• Micheal, I have started the edits so take a look at the first question and hopefully you can fix the other equations? All details can be found here. – Chinny84 Mar 3 '16 at 10:18
• Thanks I wasn't sure until now how to properly do the formatting thank you. – Michael Mar 3 '16 at 10:46
• No problem. I think the site experience will become even better for you now :) – Chinny84 Mar 3 '16 at 10:52

$$\left(18xy(x)^2-\sin(x)\right)\space\text{d}x+\left(8+18x^2y(x)\right)\space\text{d}y=0$$

Let $\text{P}(x,y)=18xy^2-\sin(x)$ and $\text{Q}(x,y)=18x^2y+8$.

This is an exact equation, because $\frac{\partial\text{P}(x,y)}{\partial y}=36xy=\frac{\partial\text{Q}(x,y)}{\partial x}$.

Define $f(x,y)$ such that $\frac{\partial f(x,y)}{\partial x}=\text{P}(x,y)$ and $\frac{\partial f(x,y)}{\partial y}=\text{Q}(x,y)$.

Then, the solution will be given by $f(x,y)=\text{C}$, where $\text{C}$ is an arbitrary constant.

Integrate $\frac{\partial f(x,y)}{\partial x}$ with respect to $x$ in order to find $f(x,y)$:

$$f(x,y)=\int(18y^2x-\sin(x))\space\text{d}x=9y^2x^2+\cos(x)+g(y)$$

Differentiate $f(x,y)$ with respect to $y$ in order to find $g(y)$:

$$\frac{\partial f(x,y)}{\partial y}=\frac{\partial}{\partial y}(9y^2x^2+\cos(x)+g(y))=18yx^2+\frac{\text{d}g(y)}{\text{d}y}$$

Substitute into $\frac{\partial f(x,y)}{\partial y}=\text{Q}(x,y)$:

$$18yx^2+\frac{\text{d}g(y)}{\text{d}y}=18yx^2+8$$

Solve for $\frac{\text{d}g(y)}{\text{d}y}$:

$$\frac{\text{d}g(y)}{\text{d}y}=8\Longleftrightarrow$$ $$\int\frac{\text{d}g(y)}{\text{d}y}\space\text{d}y=\int8\space\text{d}y\Longleftrightarrow$$ $$g(y)=8y$$

Substitute $g(y)$ into $f(x,y)$:

$$f(x,y)=9y^2x^2+8y+\cos(x)$$

The solution is $f(x,y)=\text{C}$:

$$9y^2x^2+8y+\cos(x)=\text{C}$$

$$9y(x)^2x^2+8y(x)+\cos(x)=\text{C}\Longleftrightarrow$$ $$y(x)=\frac{-4\pm\sqrt{16+9\text{C}x^2-9x^2\cos(x)}}{9x^2}$$

We know that $y(0)=1$ we can't use the solution with the '-' sign before the square root:

$$1=\lim_{x\to0}\frac{-4+\sqrt{16+9\text{C}x^2-9x^2\cos(x)}}{9x^2}\Longleftrightarrow$$ $$1=\frac{\text{C}-9}{72}\Longleftrightarrow$$ $$\text{C}=81$$

So the solution is:

$$y(x)=\frac{-4+\sqrt{81x^2-9x^2\cos(x)+16}}{9x^2}$$

• Thank you for the super clear and detailed answer! I think I should easily be able to follow this process through and apply it to any other problems :) – Michael Mar 3 '16 at 11:23
• @Michael You're welcome. Yes you can do that!! – Jan Mar 3 '16 at 11:46

HIT:

You found $\quad u = 9y^2 x^2 + \cos(x) + h(y)\quad$ which is correct.

You also found $\quad h(y) = 8y + C\quad$ which is correct.

Then obviously the result is not : $u(x,y) = 36xy + 8y + C$ but is : $$u(x,y) = 9y^2 x^2 + \cos(x) +8y+C$$

Then you can solve $u(x,y)$=constant for $y(x)$.


# DOF of Natural Cubic Spline

I am curious as to what the answer to the below question is? The question specifies a modeler has a cubic spline with knots at {10, 20, 30, 50}. They realize their model is overfitting at the ends of the distribution and wants to impose an additional constraint that the curve before the first knot and after the last knot are linear, then to calculate the DOF of the new model.

My thought process is that the answer should be 4 DOF for the new natural cubic spline model. Below is how I arrived at my answer:

The cubic spline has 8 DOF: 4+(4)(4)-(4)(3)=8 where the first 4 is for the intercept, X, X^2, X^3; then add 4 terms for earch knot; subtract out the 3 constraints at each knot to account for continuity, and the first and second derivatives to be zero.

Then to make the cubic spline with 4 knots a natural cubic spline, subtract (2)(2)=4 to get 4 DOF since the interval below the lowest knot and above the largest knot need to be made linear.

I’ve been told the correct answer is 6 DOF and I don’t understand how. I’ve been told it has something to do with interior knots vs boundary knots. Can someone shed some light as to how the answer could possibly be 6? Is my answer of 4 wrong?

Let there be $$K$$ knots $$\xi_1 < \dots < \xi_K$$. I'll use $$x_\min$$ for the smallest observed $$x$$ value, and $$x_\max$$ is analogous.

I think the answer depends on whether or not the $$\xi_j$$ are assumed to be interior knots, and if we want the spline to change in $$[x_\min, \xi_1]$$ and $$[x_\max, \xi_K]$$ or not (and this also depends on whether or not $$x_\min < \xi_1$$ and/or $$\xi_K < x_\max$$).

If we only care about behavior between $$\xi_1$$ and $$\xi_K$$, then we could use the following truncated power basis: $$h_j(x) = x^j, j=0,1,2,3$$ and $$h_j(x) = (x-\xi_{j-3})_+^3, \hspace{5mm} j = 4,\dots, K+3$$ leading to $$K+4$$ DoF. This represents four DoF coming from the global cubic that we start with and one DoF being added for every knot we pass.

Restricting this to a natural spline means we'll constrain $$\beta_2 = \beta_3 = 0$$ which frees up 2 DoF, and we'll need the coefficients of $$x^3$$ and $$x^2$$ to be zero when every basis is active, so this further frees up two DoF meaning there are now $$K$$ DoF.

In interpolation problems and smoothing splines I think this is the right way to account for DoFs, because we have every point as a knot so there aren't separate boundary knots from $$x_\min$$ and $$x_\max$$.

But if we are always thinking of the $$\xi_j$$ as interior knots then we would have two more regions where the spline in changing. This is where setting $$\xi_0 = x_\min$$ and $$\xi_{K+1} = x_\max$$ makes sense and really we now have $$K+2$$ knots and therefore the full cubic spline has $$K+6$$ DoF and the natural spline has $$K+2$$.

In Figure 7.5 of Introduction to Statistical Learning (in the question you linked) we can tell that they are using the $$K+2$$ DoF version because the spline is nonlinear on all of $$[x_\min, x_\max]$$, rather than just on $$[\xi_1, \xi_3]$$.

To answer the exact question: I can't tell which formulation they want but I think $$6$$ is more likely correct.

For a spline that is not interpolating or smoothing, which you have here, I think having $$\xi_1$$ and $$\xi_K$$ as interior knots makes sense so the $$K+2 = 6$$ answer makes sense.

But in the exact wording of the question they say "the curve before the first knot and after the last knot will be linear". If they mean out of the four given knots, then that means an answer of $$K=4$$ is correct, but I'm guessing they worded this poorly and are thinking of $$x_\min$$ and $$x_\max$$ as the first and last knots respectively, so even though at face value this suggests an answer of $$4$$, with this boundary knot inclusion then again the answer is $$6$$.

• thank you for your response! the source this question is based on is James' Intro to Statistical Learning. I've linked below another thread which is the exact question/confusion I'm having between my answer and what was deemed as the correct answer. Is there a way to know in the question asked that they want us to assume implicit bounds, making the total knots 6? stats.stackexchange.com/questions/396889/… – kres901567708 Oct 28 '19 at 16:15
• @kres901567708 I've just completely rewritten. I think in this question they are likely tacitly assuming boundary knots that are not any of the four listed and that makes $6$ correct (I was not doing this when I went through it before; I usually use smoothing splines where that doesn't make sense so I assumed no separate boundary knots but i think that was the wrong call here), but I also think the question is not clearly worded and without knowing that they likely want boundary knots I don't think $6$ vs $4$ DoF is clear. – jld Oct 28 '19 at 18:52
• thank you! Would you say in your opinion that I have a valid case to argue the question is unclear and 4 DOF should be an acceptable answer, or is there something in the question that gives away we should be including xmin and xmax as boundary knots? – kres901567708 Oct 29 '19 at 19:43
• @kres901567708 I think it’s unclear but as I’ve thought more about it, with these splines (ie not smoothing or interpolating) it probably is pretty much always the case that the specified knots are interior and wouldn’t be boundary knots. Like when the $\xi$ are thought of as tuning parameters, which I think is the case with a standard regression spline, they’re often put at quantiles of the data which would make them interior – jld Oct 30 '19 at 2:23


# $\lim_{x\to0^{+}} x \ln x$ without l'Hopital's rule

I have a midterm coming up and on the past exams the hard question(s) usually involve some form of $\lim_{x\to0^{+}} x \ln x$. However, we're not allowed to use l'Hopital's rule, on this year's exam anyways.

So how can I evaluate said limit without l'Hopital's rule? I got somewhere with another approach, don't know if it's useful:

1. $\lim_{x\to0^{+}} x \ln x = \lim_{x\to0^{+}} x^2 \ln (x^2) = L$
2. $= (\lim_{x\to0^{+}} 2x)(\lim_{x\to0^{+}} x \ln x)$
3. $= 0 * L$

Then I just need to prove that L is finite/exists (which means it must be 0)

• Observing that $x\ln x=\ln(x^x),$ this question is effectively a duplicate of this other one. – Cameron Buie Oct 11 '13 at 21:57
• I do not believe this should be closed, since it describes an interesting aproach to the problem that is absent elsewhere. – André Nicolas Oct 11 '13 at 22:10
• Lovely boldfaced typo. Have a sticky p key. Also shift. – André Nicolas Oct 11 '13 at 22:22
• @Raekye : That is a very clever approach. – Stefan Smith Oct 12 '13 at 1:54
• @AndréNicolas: Couldn't the approach be posted to the other post? I think it would make sense. – Najib Idrissi Oct 12 '13 at 2:55

The idea you described is a very nice one. We fill in the details.

We consider, as in the OP, $x^2\ln(x^2)$, that is, $(2x)(x\ln x)$. If we can show that $x\ln x$ is bounded near $0$, it will follow by Squeezing that $\lim_{x\to 0} x^2\ln(x^2)=0$, and therefore $\lim_{t\to 0^+}t\ln t=0$.

Let $f(x)=x\ln x$. Then $f'(x)=1+\ln x$. It follows that $f(x)$ is decreasing in the interval $(0,e^{-1})$. It reaches a minimum value of $-e^{-1}$ at $x=e^{-1}$.

Since $f(x)$ is negative in our interval, we have $|x\ln x|\le e^{-1}$ in the interval, and we have shown boundedness.

• Ah, that makes sense. I thought I had to use the derivative to show "which direction the function is going" but couldn't spell it out. Thank you very much! – Raekye Oct 11 '13 at 22:12
• A deleted answer gives another way to show that $f(x)$ is bounded: $$0>x\ln(x)=x\int_1^x\frac1t\,dt\geq x(\frac1x(x-1))=x-1>-1$$ when $0<x<1$, so $|f(x)|\leq 2$ when $0<x<1$. – Jonas Meyer Oct 11 '13 at 22:15
• (Now that $f(x)=x\ln(x)$ instead of $2x\ln(x)$, the last line of my comment should say "$|f(x)|\leq 1$".) – Jonas Meyer Oct 11 '13 at 22:57
• Sorry about the little change, in checking for my usual typos I thought there was no point in dragging the $2$ around. – André Nicolas Oct 11 '13 at 22:59
• @Raekye: Please note that in my opinion the approach of user@17762 is "better." My answer was an exercise in pushing through your clever idea. – André Nicolas Oct 12 '13 at 0:27

Let $x=e^{-t}$ and note that as $x \to 0^+$, we have $t \to \infty$. Hence, $$L = \lim_{x \to 0} x \ln(x) = \lim_{t \to \infty} -te^{-t} = -\lim_{t \to \infty} \dfrac{t}{e^t}$$ Now recall that $e^t \geq \dfrac{t^2}2$, because $$e^t =\sum_{k=0}^{\infty}\frac{t^k}{k!} \geq \frac{t^2}{2}$$ Hence, we have $$\lim_{t \to \infty} \dfrac{t}{e^t} \leq \lim_{t \to \infty} \dfrac2t = 0$$ This gives us $L=0$.

• Ah this makes sense too. I selected Andre's answer though because he answered earlier. Thanks for your input though! – Raekye Oct 11 '13 at 22:17
• Can you explain why e^t >= t^2/2 ? I’m not good at math. – plhn Mar 15 '17 at 12:10


# How would I solve $x^2-4x=y^2-4y$ without knowing the answer beforehand?

The equation is $x^2-4x=y^2-4y$ in the case where $x\ne y$. The answer is $x+y=4$.

I can start from $x+y=4$ and create the equation very easily, and I can substitute $x+4=y$ into the equation and show both sides are equal easily. I just don't get how I would find the answer if I didn't know it before hand, and all I had was the equation? Any advice?

• I just realized, assuming that x and y aren't equal, then x must equal +/- (y-4) and y must equal +/- (x-4), otherwise there's no way x(x-4)=y (y-4). – Hockeyfan19 Nov 27 '17 at 2:11
• Be weary of the line of reasoning; it’s fallacious. Just because $ab = cd$ and $a \neq b$, doesn’t mean $a = c$. That trick only works when we have something like $ab = 0$, whence we can conclude $a$ or $b$ is zero. See the most recent answer to this question for the right application of this idea. It’s subtle. – Bob Krueger Nov 28 '17 at 1:49

\begin{align} x^2 - 4x &= y^2 - 4y \\ x^2 - y^2 &= 4x - 4y \\ (x-y)(x+y) &= 4(x-y) \\ x+y &= 4\end{align} where dividing by $x-y$ is allowed since $x \neq y$.

• It seems so obvious now, thanks for showing the way! I wasn't seeing it at all. – Hockeyfan19 Nov 26 '17 at 21:17

As an alternative, the solution that struck me first was completing the square in both $x$ and $y$. This is common when dealing with quadratics, especially once there are no $xy$ cross-terms. $$x^2 - 4x = y^2 - 4y$$ $$x^2 - 4x + 4 = y^2 - 4y + 4$$ $$(x-2)^2 = (y-2)^2$$ This means that either $x-2 = y-2$ or $x-2 = -(y-2)$, which means either $x = y$ or $x+y = 4$, as desired.

• I actually saw that I could complete the square when I was working on it. I missed that it would progress towards the solution though. Thanks for the alternative approach! – Hockeyfan19 Nov 27 '17 at 1:38
• You're welcome. Look into quadratic forms and conic sections for more general problems of this type. – Bob Krueger Nov 27 '17 at 1:44
• This is the way I first went, so +1 ;) – Lamar Latrell Nov 27 '17 at 4:37

Let $c$ be the common value of $x^2-4x$ and $y^2-4y$. Then $x$ and $y$ are both roots of the polynomial $t^2-4t-c$. Since we are assuming $x$ and $y$ are distinct, they are all of the roots, so $t^2-4t-c$ factors as $(t-x)(t-y)$. Since $(t-x)(t-y)$ expands to $t^2-(x+y)t+xy$, comparing the coefficients of $t$ gives $x+y=4$.

(Conversely, if $x+y=4$, then since $x$ and $y$ are both roots of $(t-x)(t-y)=t^2-(x+y)t+xy=t^2-4t+xy$, $x^2-4x$ and $y^2-4y$ are both equal to $-xy$.)

• Very interesting approach, but where did the -4t come from in your polynomial? – Hockeyfan19 Nov 27 '17 at 2:04
• I'm not sure what you mean. Since $x^2-4x=c$, $x^2-4x-c=0$, and similarly for $y$. So $x$ and $y$ are roots of $t^2-4t-c$. – Eric Wofsey Nov 27 '17 at 2:32
• Okay so it comes from the original equation, I see now – Hockeyfan19 Nov 27 '17 at 2:43
• And you're using the t for clarities sake I think? – Hockeyfan19 Nov 27 '17 at 2:45

Write $x+y=d$. Then we have $y=d-x$ and so: $$(d-x)^2-4(d-x) = x^2-4x$$ so $$d^2-2dx-4d =-8x$$thus $$d(d-2x)-4(d-2x)=0$$ so $$(d-2x)(d-4)=0$$ If $d=2x$ we get $x=y$ which is impossible. So $d=4$ and we have $x+y=4$.


941 views

An $n \times n$ array $v$ is defined as follows:

$v\left[i,j\right] = i - j$ for all $i, j, i \leq n, 1 \leq j \leq n$

The sum of the elements of the array $v$ is

1. $0$
2. $n-1$
3. $n^2 - 3n +2$
4. $n^2 \frac{\left(n+1\right)}{2}$

edited | 941 views

square matrix whose transpose is its negation; that is, it satisfies the condition −A = AT. If the entry in the i th row and j th column is aij, i.e. A = (aij) then the skew symmetric condition is aij = −aji

The sum of the $i^{th}$ row and $i^{th}$ column is $0$ as shown below. Since, the numbers of rows $=$ no. of columns, the total sum will be $0$.

 $0$ $-1$ $-2$ $-3$ $-4$ $1$ $0$ $-1$ $-2$ $-3$ $2$ $1$ $0$ $-1$ $-2$ $3$ $2$ $1$ $0$ $-1$ $4$ $3$ $2$ $1$ $0$

edited by
this matrix is also a skew symmetric matrix, so definitely it's sum will be 0.
Let there are total N rows . You will find ∑ of elements of row i + ∑ of elements row (N-i+1) = 0.

So if N is even then

row 1 + row N =0

row 2 + row (N-1) =0

row 3 + row (N-2)=0

similarly row (N/2) + row (N/2+1) =0.   (So total sum is 0)

But if N is odd then row ((N+1)/2) will have no corresponding rows BUT Ithe summation of elements of this row is 0 .

So for N = even or Odd , the sum of element is 0 .
If you look at code carefully it is very clear matrix getting defined is skew symmetric matrix.

Sum of all elements in skew symmetric matrix is 0.

i think we can easily get it without drawing matrix
as expression given v[i, j] = i - j
suppose i1-j1=k1   {for a particular index } so its opposit index shows j1-i1=-k1, for example if v[1,2]=x then v[2,1]=-x}
so we have  cases here
1. for all  i>j v[i, j] = i - j and jut for opposit indexof v[i, j] = i - j , v[j, i] = j - i =-(i-j) :: note this is for non diagonal elements
2. for all i=j v[i, j] = i - j=0  :: note this is for diagonal elaments
so total sum will be zero ucan easily get it by seeing above cases

ans is option (a) i.e 0

solution: suppose if n=3

then i<=3 and 1<=j<=3

i.e i=1,2,3, and j=1,2,3

=> v={i-j}=(0,-1,-2,1,0,-1,2,1,0}

sum of elements in v=0
edited by
@prakash What if i take, i=0,1,2.   and j=1,2,3...? then it will be skew symmetric matrix..?
+1 vote
sum of all elements =n*( $\sum_{i=1}^{n}i-\sum_{j=1}^{n}j )= 0$


# Prove $(A \cap B) \cup (A \cap B')= A$ using Set Identities

I recently started a Discrete Mathematics course in college and I am having some difficulties with one of the homework questions. I need to learn this, so please guide me through at least two steps to get the ball rolling.

The question reads: Show that if $A$ and $B$ are sets, then: $(A \cap B) \cup (A \cap B')=A$

We are supposed to use set identities. I had a question prior, but it was simple: $(A \cap B \cap C)' = A'\cup B' \cup C'$ - Which would be one of De Morgan's laws.

I am at a loss. I have been reading the textbook and tried looking up some videos, but I am not sure exactly where to start. Any help you can provide, will be greatly appreciated!

Thanks, Kei

• I'm not sure what you're asking. Can you clarify what specifically you're confused with? Also I highly reccomend taking a look at "How to Prove It" as a supplementary text. It's a fantastic introduction to this subject. – lordoftheshadows Jan 23 '17 at 18:58
• Use distributivity! LHS is equal to $A \cap (B \cup B')$ – Crostul Jan 23 '17 at 18:58
• @lordoftheshadows: I wasn't sure on the first two steps to prove that the left side is indeed equal to the right side? If I am explaining it right. Our professor showed us an example in class such as this: (A ∪ (BnC)) = (C ∪ B) ∩ A = A ∩ (B ∩ C) - De Morgan Law = A ∩ (B u C) De Morgan Law = (B u C) ∩ A = Commutative Law = (C u B) ∩ A = Commutative Law So I am looking for the first two steps, I see that @Crostul had posted the first step. Thank you! I am going to see if I can take it from there. I do really appreciate the help! – Kei U. Jan 23 '17 at 19:00
• I have edited the question for formatting and some grammatical things for you, @KeiU. We will all see it when it is approved. Good luck! – The Count Jan 23 '17 at 19:03
• Thank you @TheCount! I appreciate that, I really should have looked over the question better, sorry! @Crostul: Do I distribute (A ∩ B) U (A ∩ B`) together? – Kei U. Jan 23 '17 at 19:05

The idea is to achieve get close $B$ and $B^c$. Then we use distributive property: $(A\cap B)\cup(A\cap B^c)=A\cap (B\cup B^c)=A\cap X=A$, with $X$ the universe

• Hello, I really appreciate your answer you provided! I think where I was confused was, being able to reverse an identity. I was using the set identity, though not using it in reverse if that makes sense. This is what I did: I used Distributive law, Absorption law, and then Identity law. – Kei U. Jan 23 '17 at 19:24
• It would not let me edit the above comment. The last sentence should be a question. I wanted to ensure that I did use the right laws above, as you shown in your post Julio Maldonado Henriquez. Thank you! – Kei U. Jan 23 '17 at 19:33

Consider an element of $A$ - either it is in $B$, or it isn't, and thus is in the complement of $B$. Thus $A \subset (A \cap B)$ $\cup$ $(A \cap B')$. Now, try to argue on your own that the reverse "inclusion" holds: that we have $A \supset (A \cap B)$ $\cup$ $(A \cap B')$.

You can use identities such as $(A\cap B) \cup (A \cap C) = A \cap (B \cup C)$ to get $(A \cap B) \cup (A \cap B') = A \cap (B \cup B') = A \cap U = A$.

But I prefer to think of what it is saying. $A \cap B$ means "everything in A and in B" and $A \cap B'$ means "everything that is in A that is not in B" and $(A\cap B) \cup (A \cap B')$ means "every thing that is in A and B combined with everything that is not in B". Is there a logical reason that "everything in A and B combined with everything in A and not in B" would be "A"?

Well, I hope it should be obvious. Everything in A is either in B or not in B so combining the items of A that are not in B with those that are should give you all the items in A.

So the best way to express that idea directly would be:

$A = A \cap U = A \cap (B \cup B') = (A \cap B) \cup (A\cap B')$. Or if that's a little too abstract, I rather like to do an element by element proof:

Let $x \in A$ either $x \in B$ or $x \in B'$. If $x \in B$ then $x \in A \cap B$. If $x \in B'$ then $x \in A \cap B'$. Either way $x \in A \cap B$ or $x \in A\cap B'$ so $x \in (A \cap B) \cup (A\cap B)$. So $A \subseteq (A\cap B) \cup (A \cap B)$. Likewise if $y \in (A \cap B) \cup (A\cap B)$ then either $y \in (A \cap B) \subset A$ or $y \in (A\cap B') \subset A$. Either way, $y \in A$ so $(A\cap B)\cup (A\cap B') \subseteq A$.

$A \subseteq (A\cap B) \cup (A \cap B)$ and $(A\cap B)\cup (A\cap B') \subseteq A$, so (A\cap B)\cup (A\cap B') = A$. A fourth way is the big guns. Let$x \in U$now one of four things might happen: 1)$x \in A$and$x \in B$. Then$x \in A$and$x \in A\cap B$and$x \in (A \cap B) \cup (A \cap B')$. 2)$x \in A$and$x \not \in B$. Then$x \in A$and$x \in B'$and$x \in A \cap B'$and$x \in (A \cap B) \cup (A \cap B')$3)$x \not \in A$and$x \in B$. Then$x \not \in A$and$x \not \in A \cap B$and$x \not \in A \cap B'$so$x \not \in (A \cap B) \cup (A \cap B')$. 4)$x \not \in A$and$x \not \in B$. Then$x \not \in A$and$x \not \in A \cap B$and$x \not \in A \cap B'$so$x \not \in (A \cap B) \cup (A \cap B')$. Looking at the four cases we see$x \in A \iff x \in (A \cap B) \cup (A \cap B')$. Thus$A$and$(A \cap B) \cup (A \cap B')$have precisely the same elements and neither has any element the other doesn't. In other words,$A = (A \cap B) \cup (A \cap B')\$.


# Definition of random

Suppose that you has to guess given a set of numbers

• If they are random.
• The mathematical expectation

Is there a definition of randomness that allow this prove/test?

Is even possible? if so: How many value would be enough ?

Example:

If numbers come from a coin experiment, results could be coded as 0 or 1,

000100010110100011.....

Then how many "bits" are enough to "test" variable randomness?

According to the law of large numbers, the average of the results (adding the results and dividing by the number of trials) should become closer and closer to the expected value as more trials are performed.

But if we don't know where those numbers come from then we don't know what to expect!

What are the law of large numbers hypothesis?

Does the definition of random cointain a reference to average and to the expected value?

It is deeply confusing to me,

thanks in advance for any information

• Random means that knowing the first $n$ terms of the sequence you cannot say anything about the $n+1$'th term at all besides that all possible combinations for that term to happen have the same probability. – Listing Jun 22 '11 at 19:38
• If you search on testing random number generators you can find a lot of information. It is a large and complicated topic. – Ross Millikan Jun 22 '11 at 20:14
• This is complicated topic indeed. For one thing: would you say that the digits of PI are random? – leonbloy Jun 22 '11 at 20:22
• @Hernan - You might want to look up Kolmogorov complexity, which looks at randomness from a computational viewpoint. – Unreasonable Sin Jun 22 '11 at 20:44
• @Ross Millikan thanks, as I see tests expects (or are aimed to) a certain distribution, it's like having a metadata about the data, as if randomness were not in a set of numbers, but in its interpretation @leonbloy it depends, if you already know numbers come from "PI" or from "a coin experiment" then that's not what I am asking about, because you have extra meta information about the data, the question is about the factibility of judge a set of data as "random", computable/non-computable random, is further discussion, but first I would like to know if e a definition of random is even possible – Hernán Eche Jun 22 '11 at 20:52

You may like to understand the randomness of you sequence heuristically as follows. This may help you to get more intuition.

Write favorite binary sequence you would like to test for randomness in a file and try to compress it (e.g. with zip, etc...).

Then take the ratio between the size of the compressed file and the size of the original one. If the ratio is close to 1, it means the sequence is quite random, and if the ratio is close to zero then it means that the sequence is not very random.

• Yes this is the answer, as @Unreasonable Sin has comment, that's a Kolmogorov randomness definition, and that definition is really great, I have been reading Gregory Chaitin AIT en.wikipedia.org/wiki/Algorithmic_information_theory and is the deeper thing I have read about randomness – Hernán Eche Jul 1 '11 at 19:43

The randomness of a sequence, to use @Listing's definition, can be quantified by the entropy rate.

If the order of the numbers does not matter, you can use a statistical test for randomness.

I recommend reading Chapter 3.5 of Knuth, Seminumerical Algorithms (this book is Volume 2 of The Art Of Computer Programming). In fact, I recommend reading everything Knuth has ever written, but this chapter in particular, titled What is a Random Sequence, will help you clarify your concept of randomness.


# Plotting complex Sine

I've got another plotting problem. I want to plot Sin[z] where z is complex. So, I've tried the following:

Plot3D[ Sin[ x + I y], {x, -1, 1}, {y, -1, 1}]

I wanted to see how the sine function looks like on the unit circle. But... I get no output. Am I doing something wrong or is the kernel stuck?

• You can plot Re[Sin[x + I*y]] and Im[Sin[x + I*y]] separately. – b.gates.you.know.what Jun 15 '12 at 15:35
• Possible duplicate of Plotting Complex Quantity Functions – Jens Aug 7 '12 at 16:36
• – Jens Aug 7 '12 at 16:37
• @Jens It's not a duplicate of those posts since the OP asks for plot of sine on the unit circle, although the issue is quite similar. – Artes Aug 7 '12 at 17:18
• @Artes I see this as a special case of the linked question, but since you answered both, I'll go with your judgement here. – Jens Aug 7 '12 at 17:27

Well, you have to treat the real and imaginary parts separately. You can't really have a complex $z$ value in these plots. Here's one way to visualize complex sine:

Table[Plot3D[f[Sin[x + I y]], {x, -1, 1}, {y, -1, 1},
RegionFunction -> Function[{x, y, z}, x^2 + y^2 < 1]], {f, {Re, Im,
Abs}}] // GraphicsRow

One further visualization aid would be to color these functions by the argument (adapting a scheme by Roman Maeder):

Table[Plot3D[f[Sin[x + I y]], {x, -5, 5}, {y, -5, 5},
ColorFunction -> Function[{x, y, z}, Hue[(Pi + If[z == 0, 0, Arg[Sin[x + I y]]])/(2Pi)]],
ColorFunctionScaling -> False, PlotLabel -> TraditionalForm[f[Sin[z]]],
RegionFunction -> Function[{x, y, z}, x^2 + y^2 < 25]],
{f, {Re, Im, Abs}}] // GraphicsRow

As Artes notes, one could have used ParametricPlot3D[] so that you are directly working with polar coordinates:

Table[ParametricPlot3D[{r Cos[t], r Sin[t], f[Sin[r Exp[I t]]]},
{r, 0, 5}, {t, -Pi, Pi}, BoxRatios -> OptionValue[Plot3D, BoxRatios],
ColorFunction -> Function[{x, y, z}, Hue[(Pi + If[z == 0, 0, Arg[Sin[x + I y]]])/(2 Pi)]],
ColorFunctionScaling -> False, PlotLabel -> TraditionalForm[f[Sin[z]]]],
{f, {Re, Im, Abs}}] // GraphicsRow

Yet another visualization possibility:

Table[ParametricPlot3D[{r Cos[t], r Sin[t], f[Sin[r Exp[I t]]]},
{r, 0, 5}, {t, -Pi, Pi}, BoxRatios -> OptionValue[Plot3D, BoxRatios],
ColorFunction -> Function[{x, y, z}, Hue[(Pi + If[z == 0, 0, Arg[Sin[x + I y]]])/(2Pi)]],
ColorFunctionScaling -> False, MeshFunctions -> (#4 &),
MeshShading -> {Automatic, None}, MeshStyle -> Transparent,
PlotLabel -> TraditionalForm[f[Sin[z]]], PlotRange -> All],
{f, {Re, Im, Abs}}] // GraphicsRow

• wow, that looks great. Thank you! – Chris Jun 15 '12 at 15:43

You can plot in 3 dimensions only real and/or imaginary parts of a function. One can make use of Plot3D, but since there was a question how the sine function looks like on the unit circle, first I demonstrate usage of ParametricPlot3D and later I'll show a few of many possible uses of Plot3D.

When we'd like to use ParametricPlot3D, then instead of parametrizing complex numbers like x + I y we would rather parametrize them like r * Exp[ I u], where r is a radius of a circle and u is a polar angle. On a unit circle this reduces to Exp[ I u].

ParametricPlot3D[
{ { Cos[u], Sin[u], Re @ Sin[Exp[I u]]},
{ Cos[u], Sin[u], Im @ Sin[Exp[I u]]}},   {u, 0, 2 Pi},
PlotStyle -> {{Thick, Darker @ Green}, {Thick, Darker @ Orange}}, BoxRatios -> Automatic]

It would be easier to realize the structure of the graph of Sine, rotating ParametricPlot3D around z axis. Thus we define the following functions :

F1[t_] :=
Graphics3D[
Rotate[
ParametricPlot3D[ Table[{r Cos[u], r Sin[u], Re @ Sin[r Exp[I u]]}, {r, 0.1, 1, 0.1}],
{u, 0, 2 Pi}, PlotStyle -> Thick,
ColorFunction -> (ColorData["DeepSeaColors"][#3] &),
BoxRatios -> Automatic, Axes -> False, Boxed -> False][[1]],
2 Pi t, {0, 0, 1}], Boxed -> False]

F2[t_] :=
Graphics3D[
Rotate[
ParametricPlot3D[ Table[{r Cos[u], r Sin[u], Im @ Sin[r Exp[I*(u)]]}, {r, 0.1, 1, 0.1}],
{u, 0, 2 Pi}, PlotStyle -> Thick,
ColorFunction -> (ColorData["Rainbow"][#3] &),
BoxRatios -> Automatic, Axes -> False, Boxed -> False][[1]],
2 Pi t, {0, 0, 1}], Boxed -> False]

now we can animate rotation around z-axis :

Animate[
Show[{ F1[t], F2[t],
ParametricPlot3D[{{Cos[v], Sin[v], -1},
{Cos[v], Sin[v],  0},
{Cos[v], Sin[v],  1}  }, {v, 0, 2 Pi},
PlotStyle -> {Dashed, Dashed, Dashed}, BoxRatios -> Automatic,
Axes -> False, Boxed -> False]},
ViewPoint -> {Pi, Pi/2, 1/2}],
{t, 0, 1},  DefaultDuration -> 15]

The "deepseacolors" and "rainbow" families of curves are respectively parametric 3D - plots of real and imaginary parts of Sine over circles of radius r in the complex plane and the view point rotates around z - axis. The dashed circles are unit circles in planes {x, y} for z in {-1, 0 , 1}. Here the rotation is surplus but still advantageous for the sake of comprehensible visualization.

Now we provide static 3-D plots of Sine in the complex plane.

GraphicsRow[{
Plot3D[Re@Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -2 Pi, 2 Pi}, ClippingStyle -> None],
Plot3D[Im@Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -2 Pi, 2 Pi}, ClippingStyle -> None]}]

I extended the range of the plot to {x, -2 Pi, 2 Pi} and {y, -2 Pi, 2 Pi} since in your former case there was nothing interesting to see.

To compare with a familiar pattern of the graph of Sine let's restrict the range of the imaginary part of the variable, e.g.

GraphicsRow[{ Plot3D[ Re @ Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -0.3 Pi, 0.3 Pi}],
Plot3D[ Im @ Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -0.3 Pi, 0.3 Pi}]}]

or to get the equal scale for all dimensions

GraphicsRow[
{Plot3D[ Re @ Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -0.4 Pi, 0.4 Pi},
BoxRatios -> Automatic, PlotLabel -> "Real part"],

Plot3D[ Im @ Sin[x + I*y], {x, -2 Pi, 2 Pi}, {y, -0.4 Pi, 0.4 Pi},
BoxRatios -> Automatic, PlotLabel -> "Imaginary part"]     },

PlotLabel -> "Graphs of Sine"]

and if you prefer the both parts of Sine in the complex plane in one plot :

Plot3D[{ Re @ Sin[x + I*y], Im @ Sin[x + I*y]},
{x, -2 Pi, 2 Pi}, {y, -0.4 Pi, 0.4 Pi},
Mesh -> {5, 3}, BoxRatios -> Automatic,
PlotStyle -> {{Opacity[0.35], Lighter[Green, 0.5]},
{Opacity[0.7],  Lighter[Blue,  0.7]} } ]

• For a different visualization, on the Riemann sphere, see the paper "Visualizing Complex Functions with the Presentations Application," The Mathematica Journal, vol. 11 #2 (2009), by David J. M. Park and me. Available in CDF and PDF here. (To re-evaluate most code, and to run the dynamic examples, you'll need a copy of Park's Presentations application.) – murray Aug 7 '12 at 16:57
• @murray Thank you for pointing out interesting references. I've seen that paper. – Artes Aug 7 '12 at 17:01


# Prove that if $M_{1} \subseteq M_{2}$, then inf$(M_{2})\leq$ inf$(M_{1})\leq$ sup$(M_{1})\leq$ sup$(M_{2})$

Prove that if $M_{1} \subseteq M_{2}$, then inf$(M_{2})\leq$ inf$(M_{1})\leq$ sup$(M_{1})\leq$ sup$(M_{2})$

My attempt:

$M_{1} \subseteq M_{2} \implies \forall m\in{M_{1}}$, $m\in{M_{2}}$

$\implies$inf$(M_{2}) \leq$ inf$(M_{1})$ and also that sup$(M_{1})\leq$ sup$(M_{2})$

Additionally, by the definition of supremum we know that inf$(M_{1})\leq$ sup$(M_{1})$

Together we have, inf$(M_{2})\leq$ inf$(M_{1})\leq$ sup$(M_{1})\leq$ sup$(M_{2})$

$\therefore$ If $M_{1} \subseteq M_{2}$, then inf$(M_{2})\leq$ inf$(M_{1})\leq$ sup$(M_{1})\leq$ sup$(M_{2})$

I made a few jumps that I am not sure you can take (line 1 to 2). Is this proof valid? Anything I can change? Thanks!

• Hmm, I think your jumps are too big. How does all m in both M_1 being in M_2 imply the inf M_2 is less or equal to the inf of M_1? How do we know from the definition of sup that inf <= sup? That's not actually part of the definition. I sympathize, as this real does seem trivial and obvious and thus irritatingly difficult to prove. But you I don't think your prove has actually done anything except restate what is to be proven and declared they are obvious. (Which to be fair they sort of are.) Jul 12 '17 at 17:40

There seems to be nothing wrong with your proof, but can you tell us how did you go from $(\forall m\in M_1):m\in M_2$ to $\inf M_2\leqslant\inf M_1$?

• This means that inf$(M_{1})$, sup$(M_{1})\in{M_{2}}$. I guess I should explicitly state that right? edit: Actually not sure that is correct Jul 12 '17 at 16:52
• @dawgchow My mistake for the earlier comment. That's not necessarily true if you think about it Jul 12 '17 at 16:52
• @dawgchow No, you shouldn't, because it is not true. Do you want a counter-example? Jul 12 '17 at 16:53
• Ya because if inf$(M_{1})$ is not the minimum of $M_{1}$ it wouldn't necessarily be in $M_{2}$ Jul 12 '17 at 16:54
• @dawgchow Right! So, your proof is incomplete. Jul 12 '17 at 16:55

Here's how I would do it:

By the definition of subsets, $\inf$ and $\sup$, we have the following:

$$M_1\subseteq M_2\iff (\forall m\in M_1)\,\,\,m\in M_2$$ $$(\forall m\in M_2)\,\,\,\inf(M_2)\le m\le \sup(M_2)$$

Then we can conclude

$$(\forall m\in M_1)\,\,\,\inf(M_2)\le m\le \sup(M_2)$$

Next, from the definition of $\inf$ and $\sup$, we get

$$(\forall m\in M_1)\,\,\,x\le m\le y \iff x\le\inf(M_1)\le\sup(M_1)\le y$$

Therefore

$$\inf(M_2)\le \inf(M_1)\le\sup(M_1)\le \sup(M_2)$$

When you are asked to prove something trivial and obvious... well, do the definitions. I think your prove relies on "common sense" and makes jumps that are simply too big, to the point you are mostly just restating the statements.

I'd do: If $m \in M_1$ then $m \in M_2$ as $M_1 \subset M_2$. So $\inf M_2 \le m$ by definition of infinum. So $\inf M_2$ is a lower bound of $M_1$. But $\inf M_1$ is the greatest lower bound of $M_1$ so $\inf M_2 \le \inf M_1$.

By identical argument: $\sup M_2 \le \sup M_1$. That is; if $m \in M_1$ then $m \in M_2$ and therefore $\sup M_2 \ge m$ and is an upper bound of $M_1$, but as $\sup M_1$ is the least upper bound $\sup M_2 \ge \sup M_1$.

By definition of supremum and infimum for any $m \in M_1$ then $\inf M_1 \le m \le \sup M_1$ so $\inf M_1 \le \sup M_1$. (Unless $M_1$ is empty, in which case neither $\inf M_1$ nor $\sup M_1$ exist.) (I suppose at the very beginning of the proof I could/should have made a comment that $M_1$ and $M_2$ are both presumed to be non-empty and bounded above and below.).

Hence ... result.

That's basically your proof but with the jumps explicitly explained. (Perhaps painfully so.)

=====

And, to be fair, maybe I'm being to0 glib in claiming "$\inf M_1$ is greatest lower bound".

More detail: If $\inf M_1 < \inf M_2$ then $\inf M_2$ is not a lower bound of $M_1$ which we just showed it is, so $\inf M_2 \le \inf M_1$.

That's kind of obvious but as I criticized you for not proving the obvious, it's only fair that I apply my own standards...


# Establishing a bijection between permutations and permutation matrices.

I am trying to prove the following:

Given $\sigma \in S_n$ let $P(\sigma)$ be the matrix with $(P(\sigma))_{i,j} = \delta_{i,\sigma(j)}$. Show that $P$ is a bijection between $S_n$ and the set of permutation matrices of size $n$ $-$ where $\delta_{i,j}$ is the Kronecker delta which equals 1 if $i=j$ and 0 otherwise.

As I understand the question, the question is saying that for each row $i$ and column $j$ we have that position $i,j$ equals 1 iff $\sigma(j) = i$.

So then it seems then that for any $\sigma$ such that $\sigma(i) = i$, we would have $P(\sigma)$ as the identity matrix with strictly 1's from the top-left to the bottom-right and zeros everywhere else. On the other hand, suppose that we have $\sigma(1) = 2$, $\sigma(2) = 3$, $\sigma(3) = 4$, $\sigma(4) = 1$; then we'd have the following matrix

\begin{bmatrix}0 & 0 & 0& 1\\1 & 0 & 0 & 0\\0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0\end{bmatrix}

Is this a correct understanding?

If so, then here is my attempted proof of the question mentioned above:

$\bf{Injectivity}$: Assuming $\sigma, \tau \in S_n$ and $P(\sigma) = P(\tau)$ then whenever $\sigma(j) = i$ we have the jth-column and i-th row of the matrix $p$ as a 1 and similarly for $\tau(j) = i$. So $\tau = \sigma$ and we are done.

$\bf{Surjectivity}$: Let $P$ be some $n \times n$ permutation matrix. Then each row and column will have exactly one 1 with zeros everywhere else. Then for every i,j position which has a 1 in it, we can choose a permutation $\sigma$ such that $\sigma(j) = i$ for some $\sigma$ which is an n-cycle and we are done.

Is this proof sound? Thank you in advance.

You're proof is fine, but more can be said. The set $P_n$ of $n\times n$ permutation matrices is a group under matrix multiplication, and as such $S_n\cong P_n$. Indeed, let $\{v_1,\ldots,v_n\}$ be a basis for $\mathbb{R}^n$ (you can take any field here, but nevermind). For each $\sigma\in S_n$, we define a linear transformation $P_\sigma$ by $P_\sigma(v_i)=v_{\sigma(i)}$, whose matrix in the basis $\{v_1,\ldots,v_n\}$ is $P(\sigma)$.

Let $\Phi:S_n\longrightarrow P_n$ be the map $\Phi(\sigma)=P_\sigma$. This map is a homomorphism since $$P_\sigma P_\tau(v_i)=P_\sigma(v_{\tau(i)})=v_{\sigma(\tau(i))}=v_{\sigma\tau(i)}=P_{\sigma\tau}(v_i).$$

The map is injective: if $P_\tau v_i=v_{\tau(i)}=v_i$ for all $i$, then $\tau(i)=i$ for all $i$ and $\tau=1$.

Finally, the map is surjective because $|P_n|=n!$ (permutation matrices are allowed one nonzero entry in every row and column. Starting with the leftmost column, you have $n$ choices for where to place a nonzero entry; having made this choice you have occupied a row, so going to the next column you have $n-1$ choices for where to place a nonzero entry, etc.)

• Thanks. That makes sense as well. – letsmakemuffinstogether Oct 1 '15 at 18:58
• There is another component to the question: show that $P: S_n \rightarrow M_n{\mathbb{R}}$ has $P(\sigma\tau)=P(\sigma)P(\tau)$. Any hints on how to do this? I think I see how it's done but I'm having troubles putting it into words and using summation notation to multiply the matrices $P(\sigma)$ and $P(\tau)$. – letsmakemuffinstogether Oct 1 '15 at 20:07
• @letsmakemuffinstogether that is my proof that $\Phi$ is a homomorphism. – David Hill Oct 1 '15 at 21:46

It can also be shown that the map $$\Phi: \mathcal{S}_n \longrightarrow \mathcal{P}_n$$ defined by $$\sigma \in \mathcal{S}_n \longmapsto P_\sigma \in \mathcal{P}_n$$ is a homomorphism and hence an isomorphism.

If $$\sigma$$, $$\gamma \in \mathcal{S}_n$$ and $$1 \le i,j \le n$$, then $$\left[ P_\sigma P_\gamma\right]_{ij} = \sum_{k=1}^n \delta_{i,\sigma(k)} \delta_{k, \gamma(j)} = \delta_{i, \sigma(\gamma(j))} = \left[ P_{\sigma \circ \gamma}\right]_{ij},$$ i.e., $$P_{\sigma} P_{\gamma} = P_{\sigma \circ \gamma}$$.

Thus, \begin{align} \Phi(\sigma\circ\gamma) = P_{\sigma \circ \gamma} = P_\sigma P_\gamma = \Phi(\sigma)\Phi(\gamma) \end{align} as desired.


# Limit of a 0/0 function

Let's say we have a function, for example, $$f(x) = \frac{x-1}{x^2+2x-3},$$ and we want to now what is $$\lim_{x \to 1} f(x).$$ The result is $\frac{1}{4}$.

So there exists a limit as $x \to 1$.

My teacher says that the limit at $x=1$ doesn't exist. How is that? I don't understand it. We know that a limit exists when the one sided limits are the same result.

Thank you!

• Try factoring the denominator. This is probably a homework problem, so look at the numerator for a hint. – copper.hat Oct 16 '14 at 22:35
• @copper.hat: I completely disagree! In the definition of "$\lim_{x\to 1} f(x)$", $f(1)$ doesn't need to be defined (in fact, in most interesting cases it isn't), and even if it is defined, that value shouldn't be taken into account. Adding "$x \neq 1$" doesn't make any difference whatsoever. – Hans Lundmark Oct 17 '14 at 7:13
• @HansLundmark: I stand corrected. – copper.hat Oct 17 '14 at 15:03

It's possible that your teacher was pointing out the fact that the function doesn't exist at $x = 1$. That's different from saying that the limit doesn't exist as $x \to 1$. Notice that by factoring, $$f(x) = \frac{x-1}{x^2 + 2x - 3} = \frac{x-1}{(x-1)(x+3)}$$

As long as we are considering $x \ne 1$, the last expression simplifies: $$\frac{x-1}{(x-1)(x+3)} = \frac{1}{x+3}.$$ In other words, for any $x$ other than exactly $1$, $$f(x) = \frac{1}{x+3}.$$ This helps understand what happens as $x$ gets ever closer to $1$: $f(x)$ gets ever closer to $$\frac{1}{(1) + 3} = \frac{1}{4}.$$

• The word 'exactly' unnecessary. – CiaPan Oct 17 '14 at 8:12
• @CiaPan: What about the word 'is'? – Nikolaj-K Oct 17 '14 at 13:43
• @NikolajK that depends on what 'is' is. – Yakk Oct 17 '14 at 14:53
• @Yakk: It's equivalent to equivalence in univalent foundations. – Nikolaj-K Oct 17 '14 at 16:37

Your teacher is not correct. There are two easy ways to do this problem. The first is by factoring the denomiator:

$$\lim_{x\to 1}\frac{x-1}{(x-1)(x+3)}=\lim_{x\to 1}\frac{1}{x+3}=\frac{1}{4}$$

The second is by using L'Hospital's rule, which is a useful identity in limits. By L'Hospital's rule, we know that

$$\lim_{x\to 1}\frac{x-1}{x^2+2x-3}=\lim_{x\to 1}\frac{1}{2x+2}=\frac{1}{4}$$

This limit exists, because it is simply a discontinuity in the function, but it is a discontinuity at a single point. When we have certain indeterminate forms in limits, we may apply L'Hospital's rule, which allows us to better compute the limit.

L'Hospital's rule states that, in certain indeterminate forms:

$$\lim_{x\to n}\frac{f(x)}{g(x)}=\lim_{x\to n}\frac{f'(x)}{g'(x)}$$

It is worth clearing up a particular misconception that seems to have arisen. For $$f(x)=\frac{x-1}{x^2+2x-3}$$ we cannot compute the value of $f(1)$, because this results in an indeterminate form. However, the limit exists, because there is simply a local discontinuity at a single point in an otherwise continuous function.

• A third alternative, to whoever may care, is to note that the limit if $\dfrac 1{f'(1)}$, where $f(x)=x^2+2x-3$. – Git Gud Oct 16 '14 at 23:57
• To justify the use of l'Hospital, you also need to point out that $g' \neq 0$ in a punctured neighbourhood of the point in question. – Hans Lundmark Oct 17 '14 at 7:14
• A hard requirement of the usability of l'Hôpital's rule is that the resulting "right-hand-size" is exists. But I guess that's what Hans is saying in more fancy terms? – rubenvb Oct 17 '14 at 8:00
• @rubenvb: No, it's not enough that $\lim f/g$ is of type $0/0$ and that $\lim f'/g'$ exists. There are examples which show this. You really need $g'$ to be nonzero near the point. (Those examples are a bit artificial to be honest, but still...) – Hans Lundmark Oct 17 '14 at 15:10
• @Hans $g'$ can be zero if $f'$ is zero, because you just have another L'Hospital's case and take $f''/g''$ Otherwise, just compute the limit normally. – Aza Oct 17 '14 at 16:13

I don't know what your teacher means exactly. Limits are defined when $x$ tends to some number, or infinity. Not when $x$ is this number.

The value that the function takes at the limit poit is irrelevant (to compute the limit). In fact, in most high school limit exercises, the function is not defined at the point that $x$ tends to.