# True or False. Every Diagonalizable Matrix is Invertible

## Problem 439

Is every diagonalizable matrix invertible?

## Solution.

### Counterexample

We give a counterexample. Consider the $2\times 2$ zero matrix.
The zero matrix is a diagonal matrix, and thus it is diagonalizable.
However, the zero matrix is not invertible as its determinant is zero.

### More Theoretical Explanation

Let us give a more theoretical explanation.
If an $n\times n$ matrix $A$ is diagonalizable, then there exists an invertible matrix $P$ such that
$P^{-1}AP=\begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_n \end{bmatrix},$ where $\lambda_1, \dots, \lambda_n$ are eigenvalues of $A$.
Then we consider the determinants of the matrices of both sides.
The determinant of the left hand side is
\begin{align*}
\det(P^{-1}AP)=\det(P)^{-1}\det(A)\det(P)=\det(A).
\end{align*}
On the other hand, the determinant of the right hand side is the product
$\lambda_1\lambda_2\cdots \lambda_n$ since the right matrix is diagonal.
Hence we obtain
$\det(A)=\lambda_1\lambda_2\cdots \lambda_n.$ (Note that it is always true that the determinant of a matrix is the product of its eigenvalues regardless diagonalizability.
See the post “Determinant/trace and eigenvalues of a matrix“.)

Hence if one of the eigenvalues of $A$ is zero, then the determinant of $A$ is zero, and hence $A$ is not invertible.

The true statement is:

a diagonal matrix is invertible if and only if its eigenvalues are nonzero.

### Is Every Invertible Matrix Diagonalizable?

Note that it is not true that every invertible matrix is diagonalizable.

For example, consider the matrix
$A=\begin{bmatrix} 1 & 1\\ 0& 1 \end{bmatrix}.$ The determinant of $A$ is $1$, hence $A$ is invertible.
The characteristic polynomial of $A$ is
\begin{align*}
p(t)=\det(A-tI)=\begin{vmatrix}
1-t & 1\\
0& 1-t
\end{vmatrix}=(1-t)^2.
\end{align*}
Thus, the eigenvalue of $A$ is $1$ with algebraic multiplicity $2$.
We have
$A-I=\begin{bmatrix} 0 & 1\\ 0& 0 \end{bmatrix}$ and thus eigenvectors corresponding to the eigenvalue $1$ are
$a\begin{bmatrix} 1 \\ 0 \end{bmatrix}$ for any nonzero scalar $a$.
Thus, the geometric multiplicity of the eigenvalue $1$ is $1$.
Since the geometric multiplicity is strictly less than the algebraic multiplicity, the matrix $A$ is defective and not diagonalizable.

### Is There a Matrix that is Not Diagonalizable and Not Invertible?

Finally, note that there is a matrix which is not diagonalizable and not invertible.
For example, the matrix $\begin{bmatrix} 0 & 1\\ 0& 0 \end{bmatrix}$ is such a matrix.

## Summary

There are all possibilities.

1. Diagonalizable, but not invertible.
Example: $\begin{bmatrix} 0 & 0\\ 0& 0 \end{bmatrix}.$
2. Invertible, but not diagonalizable.
Example: $\begin{bmatrix} 1 & 1\\ 0& 1 \end{bmatrix}$
3. Not diagonalizable and Not invertible.
Example: $\begin{bmatrix} 0 & 1\\ 0& 0 \end{bmatrix}.$
4. Diagonalizable and invertible
Example: $\begin{bmatrix} 1 & 0\\ 0& 1 \end{bmatrix}.$

Determine whether each of the following statements is True or False. (a) If $A$ and $B$ are $n \times n$...


# $\mathbb{Z}_2\times\mathbb{Z}_2$ has order $4$? How so?

$\mathbb{Z}_2\times\mathbb{Z}_2$ has order $4$, the neutral element is $(0_2,0_2)$ and the other elements have order $2$. Therefore, $\mathbb{Z}_2\times\mathbb{Z}_2$ is not cyclic,so it is the Klein group.

The elements of $\mathbb{Z_2}$ are $\{0_2,1_2\}$ and the order of $1_2$ is 2.

If we take the direct product $\mathbb{Z}_2\times\mathbb{Z}_2$ then we have a generator of the Group product $\langle 1_2,1_2\rangle$.

Question:

How can the author state $\mathbb{Z}_2\times\mathbb{Z}_2$ has order $4$? Is $\langle 1_2,1_2\rangle$ not a generator of order 2 of $\mathbb{Z}_2\times\mathbb{Z}_2$?

• Remember that the order of a group is a somewhat distinct concept from the order of an element. The order of a group is the cardinality of that group (in this case, 4---the elements can be explicitly written fairly easily), while the order of an element $a$ is the smallest natural number $n$ such that $a^n$ is the identity (here, the maximal order of an element is 2). – Xander Henderson Nov 29 '17 at 18:54
• The order of a group means its size. – Ittay Weiss Nov 29 '17 at 18:54
• $(1,1)$ does not generate the element $(0,1)$ – Doug M Nov 29 '17 at 18:55
• $\langle 1, 1\rangle$ only generates all of $\Bbb Z_n\times \Bbb Z_m$ if the greatest common factor of $n$ and $m$ is 1. Here it is 2. – MJD Nov 29 '17 at 18:57

The order of a group is the number of elements in it. $\mathbb{Z}_2\times\mathbb{Z}_2$ has four elements: $(0,0), (0,1), (1,0), (1,1)$.
But as you have seen, each element has order $\le 2$. (This, in particular, proves that $\mathbb{Z}_2\times\mathbb{Z}_2$ is not isomorphic to $\mathbb{Z}_4$.)
The elements of $\mathbb{Z}_2 \times \mathbb{Z}_2$ are


# Difference between revisions of "1995 AHSME Problems/Problem 27"

## Problem

Consider the triangular array of numbers with 0,1,2,3,... along the sides and interior numbers obtained by adding the two adjacent numbers in the previous row. Rows 1 through 6 are shown.

$$\begin{tabular}{ccccccccccc} & & & & & 0 & & & & & \\ & & & & 1 & & 1 & & & & \\ & & & 2 & & 2 & & 2 & & & \\ & & 3 & & 4 & & 4 & & 3 & & \\ & 4 & & 7 & & 8 & & 7 & & 4 & \\ 5 & & 11 & & 15 & & 15 & & 11 & & 5 \end{tabular}$$

Let $f(n)$ denote the sum of the numbers in row $n$. What is the remainder when $f(100)$ is divided by 100?

$\mathrm{(A) \ 12 } \qquad \mathrm{(B) \ 30 } \qquad \mathrm{(C) \ 50 } \qquad \mathrm{(D) \ 62 } \qquad \mathrm{(E) \ 74 }$

## Solution 1

Note that if we re-draw the table with an additional diagonal row on each side, the table is actually just two of Pascal's Triangles, except translated and summed. $$\begin{tabular}{ccccccccccccccc} & & & & & 1 & & 0 & & 1 & & & & \\ & & & & 1 & & 1 & & 1 & & 1 & & & \\ & & & 1 & & 2 & & 2 & & 2 & & 1 & & \\ & & 1 & & 3 & & 4 & & 4 & & 3 & & 1 & \\ & 1 & & 4 & & 7 & & 8 & & 7 & & 4 & & 1 \\ 1 & & 5 & & 11 & & 15 & & 15 & & 11 & & 5 & & 1 \end{tabular}$$

The sum of a row of Pascal's triangle is $2^{n-1}$; the sum of two of each of these rows, subtracting away the $2$ ones we included, yields $f(n) = 2^n - 2$. Now, $f(100) = 2^{100} - 2 \equiv 2 \pmod{4}$ and $f(100) = 2^{100} - 2 \equiv 2^{20 \cdot 5} - 2 \equiv -1 \pmod{25}$, and by the Chinese Remainder Theorem, we have $f(100) \equiv 74 \pmod{100} \Longrightarrow \mathrm{(E)}$.

## Solution 2 (induction)

We sum the first few rows: $0, 2, 6, 14, 30, 62$. They are each two less than a power of $2$, so we try to prove it:

Let the sum of row $n$ be $S_n$. To generate the next row, we add consecutive numbers. So we double the row, subtract twice the end numbers, then add twice the end numbers and add two. That makes $S_{n+1}=2S_n-2(n-1)+2(n-1)+2=2S_n+2$. If $S_n$ is two less than a power of 2, then it is in the form $2^x-2$. $S_{n+1}=2^{x+1}-4+2=2^{x+1}-2$.

Since the first row is two less than a power of 2, all the rest are. Since the sum of the elements of row 1 is $2^1-2$, the sum of the numbers in row $n$ is $2^n-2$. Thus, using Modular arithmetic, $f(100)=2^{100}-2 \bmod{100}$. $2^{10}=1024$, so $2^{100}-2\equiv 24^{10}-2\equiv (2^3 \cdot 3)^{10} - 2$ $\equiv 1024^3 \cdot 81 \cdot 81 \cdot 9 - 2 \equiv 24^3 \cdot 19^2 \cdot 9 - 2$ $\equiv 74\bmod{100} \Rightarrow \mathrm{(E)}$.

## Solution 3 (plain recurrence solving)

We derive the recurrence $S_{n+1}=2S_n + 2$ as above. Without guessing the form of the solution at this point we can easily solve this recurrence. Note that one can easily get rid of the "$+2$" as follows: Let $S_n=T_n-2$. Then $S_{n+1}=T_{n+1}-2$ and $2S_n+2 = 2(T_n-2)+2 = 2T_n-2$. Therefore $T_{n+1}=2T_n$. This obviously solves to $T_n=2^{n-1} T_1$. As $S_1=0$, we have $T_1=2$. Therefore $T_n=2^n$ and consecutively $S_n=2^n-2$.


# Show $\int_0^{2\pi}\cos^2t\,dt=\pi$ using Pythagorean Theorem

The 'traditional' way I always see this integral calculated is with the identity

$$\cos^2t=\frac{1+\cos(2t)}{2}$$

My alternative method uses $$\cos^2t+\sin^2t=1$$. It's obvious that

$$\int_0^{2\pi}\cos^2t+\sin^2t\,dt=\int_0^{2\pi}1\,dt=2\pi$$

The interval of integration is an integer multiple of the periods of each function ($$\cos^2t$$ has a period of $$\pi$$), and so it seems reasonable to me that given the Pythagorean identity used above, $$\cos^2t$$ and $$\sin^2t$$ contribute, for lack of a better word, equally to this final answer of $$2\pi$$ above, and so the integral in the title should be half of $$2\pi$$, or just $$\pi$$.

Is this method valid? What additional statements, if any, are necessary to make it rigorous enough to be valid?

• One way to make it more rigorous is just to shift the integral for $\sin^2$ by $\pi/2$ so that you just get the integral for $\cos^2$ twice. – vrugtehagel May 8 at 16:58
• One of my high-school teachers showed me this trick for calculating the average of $\cos^2 x$, and it's stuck with me ever since. – Michael Seifert May 8 at 17:04

## 2 Answers

Your argument is definitely valid. To add more explanation, we can say that $$\int_{a}^{a+T} f(x)dx = \int_{0}^{T} f(x) dx$$ for any $$T$$-periodic function $$f(x)$$ (try to prove this rigorously), and then $$\int_{0}^{2\pi} \sin^{2} t dt = \int_{0}^{2\pi} \cos^{2}\left(t-\frac{\pi}{2}\right) \,dt = \int_{-\frac{\pi}{2}}^{2\pi - \frac{\pi}{2}} \cos^{2}t\,dt = \int_{0}^{2\pi} \cos^{2}t\,dt$$

Use $$\displaystyle\int_0^{2a}f(x)\ dx=2\int_0^af(x) \ dx$$ for $$f(2a-x)=f(x)$$

twice to find $$I=\int_0^{2\pi}\cos^2t\ dt=4\int_0^{\pi/2}\cos^2t\ dt$$

Now $$\displaystyle\int_a^bf(x) \ dx=\int_a^bf(a+b-x) \ dx$$

to find $$2\cdot\dfrac I4=\int_0^{\pi/2}(\cos^2t+\sin^2t)dt$$


# Teacher claims this proof for $\frac{\csc\theta-1}{\cot\theta}=\frac{\cot\theta}{\csc\theta+1}$ is wrong. Why?

My son's high school teacher says his solution to this proof is wrong because it is not "the right way" and that you have to "start with one side of the equation and prove it is equal to the other". After reviewing it, I disagree. I believe his solution is correct, even if not "the right way", whatever that means. I asked my son how he did it: he cross-multiplied the given identity, simplified it to a known/obvious equality, and then reversed the steps for the proof. This was a graded exam, and the teacher gave him a zero for this problem.

What do you think about my son's solution? Thanks!

Problem: prove the following trigonometric identity \begin{align*} \frac{\csc(\theta)-1}{\cot(\theta)}&=\frac{\cot(\theta)}{\csc(\theta)+1}\ .\\ \end{align*} Solution: for all real $$\theta$$ not equal to an integer multiple of $$\pi/2$$, we have \begin{align*} \cot^2(\theta)&=\cot^2(\theta)\\[8pt] \frac{\cos^2(\theta)}{\sin^2(\theta)}&=\cot^2(\theta)\\[8pt] \frac{1-\sin^2(\theta)}{\sin^2(\theta)}&=\cot^2(\theta)\\[8pt] \csc^2(\theta)-1&=\cot^2(\theta)\\[8pt] \frac{\csc^2(\theta)-1}{\cot(\theta)}&=\cot(\theta)\\[8pt] \frac{\csc(\theta)-1}{\cot(\theta)}&=\frac{\cot(\theta)}{\csc(\theta)+1} \end{align*}

• Ask the professor? They may have a specific way they ask you to prove them. I have my students prove them a specific way. These can be googled or whatever. Feb 28, 2021 at 17:52
• Your son's proof is correct. He proved that the required identity is equivalent to $\cot^2 \theta = \cot^2 \theta$ which is true. So the identity is true. Feb 28, 2021 at 17:52
• You would be amazed how easy it is to get an b.s. in education in the US. Feb 28, 2021 at 17:53
• The proof looks good to me (and actually this is exactly the order I would have written it in). Sorry your son has a teacher who thinks math is just following a given series of steps and that there is one right way to do every problem. Feb 28, 2021 at 17:53
• The proof is correct and furthermore easy to follow. If the teacher believes it to be wrong, then they should be able to specifically name the error ("Line $n$ is wrong because..."). Saying that a method is "not the right way" is questionable pedagogy at best, and at worst, suggests that the teacher doesn't fully understand the material. But perhaps there is missing information, e.g., the full question might be, "Prove the statement using the Right Way method". Feb 28, 2021 at 18:04

I would at least have skipped the first line and started with $$\dfrac{\cos^2\theta}{\sin^2\theta} = \cot^2\theta.$$

One reason why an instructor might have qualms about this argument is the frequency with which students do this in the opposite direction, i.e. they write \require{cancel} \xcancel{ \begin{align} \frac{\csc(\theta)-1}{\cot(\theta)}&=\frac{\cot(\theta)}{\csc(\theta)+1} \\[8pt] \frac{\csc^2(\theta)-1}{\cot(\theta)}&=\cot(\theta)\\[8pt] \csc^2(\theta)-1&=\cot^2(\theta)\\[8pt] \frac{1-\sin^2(\theta)}{\sin^2(\theta)}&=\cot^2(\theta)\\[8pt] \frac{\cos^2(\theta)}{\sin^2(\theta)}&=\cot^2(\theta)\\[8pt] \cot^2(\theta)&=\cot^2(\theta) \end{align} } This would be logically correct if one wrote "This equality is true if the one below it is true." on each line. But one must be clear about the correct direction of "If ... then ...". Without those explicit words, the sequence of equalities can be taken to mean "If ... then ..." in just the opposite order.

Often what instructors want is something like this: $$\frac{\csc\theta-1}{\cot\theta} = \cdots\cdots\cdots\cdots = \frac{\cot\theta}{\csc\theta+1}.$$ in which each "equals" sign asserts the equality of things already known to be equal.

I would give full credit to the answer that your son wrote if each line had some brief explanation of how it is deduced from the line before it. For example, he could write this:

$$\cot^2\theta = \frac{\cos^2\theta}{\sin^2\theta} = \frac{1-\sin^2\theta}{\sin^2\theta} = \csc^2\theta-1.$$ Then, dividing both sides of the equality $$\cot^2\theta = \csc^2\theta-1$$ by $$\cot\theta,$$ we get $$\cot\theta = \frac{\csc^2\theta-1}{\cot\theta}.$$ Finally, dividing both sides of that by $$\csc\theta+1$$ we get $$\frac{\csc\theta-1}{\cot\theta} = \frac{\cot\theta}{\csc\theta+1}.$$

Note that I wrote words above, not just mathematical notation. Well written answers do that, except perhaps in fairly simple cases.

• Very nice all the answer and the question +1 for all the users. Very nice the required cancel :-) for MathJAX. Feb 28, 2021 at 22:48
• @Sebastiano : Thank you. Mar 1, 2021 at 6:16

There are multiple motivations for writing proofs: perhaps to pass an exam (from a regular student's viewpoint), or perhaps to test understanding (from a teacher's perspective). Here, I'd like to highlight another important motivation: to enjoy the process of discovery.

Here's a geometric proof of the trigonometric identity. It is not practical to use in an exam, but it makes the abstract symbols more concrete. Coming up with multiple proofs of the same result can help one develop intuition and allow one to appreciate the connections between different areas of mathematics.

Problem statement: $$\frac{\csc\theta-1}{\cot\theta}=\frac{\cot\theta}{\csc\theta+1}$$

In this picture involving the unit circle, we construct some lengths which correspond to expressions in the problem statement. We start with $$\theta$$ and $$\phi = \frac{\pi}{2} - \theta$$.

Basic trigonometric definitions lead to the blue and orange lengths. By some angle-chasing (or a circle theorem), we have the $$\color{red}{\text{red}}$$ angle. Then, more angle-chasing gives:

The $$\color{red}{\text{red}}$$ angles are the same $$\implies\triangle ADB\sim \triangle BDE \implies \frac{AD}{DB}=\frac{DB}{ED}\iff$$ the problem statement.

• Love this geometric approach! If you don't mind, what do you use to produce such a nice and clear diagram of the geometry/trigonometry? Thanks! Feb 28, 2021 at 21:20
• Thank you. I'm glad you liked it. I used GeoGebra: geogebra.org/m/yngwjpcg Feb 28, 2021 at 21:34

I would assume that the teacher considered it an invalid answer, because your son assumed that the equality is true before showing that it is, if that even makes any sense. This is obviously a guess, but in the mind of the teacher, what he did was not "showing" that the equality is true, but merely "verifying" that it is. In other words, what the teacher likely wanted is for the students to get the answer on the right-hand side by exclusively using the left-hand side. More explicitly, even though the students knew what the end result should look like, they should have pretended they don't, manipulated the left-hand side and exclaimed "Eureka! It's true!" when they got the RHS.

With that logic, all he needed to do was to multiply numerator and denominator by $$\csc(\theta)+1$$, which immediately yields the desired result after simplifications.

• Indeed, and a far more immediate solution! Feb 28, 2021 at 18:14
• Your answer reminds me of a high school maths teacher who said that I "thought too much like an engineer" (in the sense that I would often manipulate both sides into something that's true, in the style of the OP's son's proof). However, all of us think like this to a certain extent: some people are fast, and can immediately rewrite the proof (in their head) as "LHS = ... = ... = RHS"; some might hide that process on scratch paper. I don't really understand how one of these proofs can be better than the other, assuming they're correctly written. They all demonstrate the same math ability. Feb 28, 2021 at 18:25
• That is possible that is how the teacher thinks. Thanks for the reply! Feb 28, 2021 at 18:30
• Former high school math teacher here who taught students trig identity proofs, and this is exactly right. Moreover, it helps to keep them from making mistakes and incorrectly "proving" the statement after making a mistake on one side, then forcing another mistake on the other side to get to equality instead of searching for the problem in the work they've already done. It also helps them learn more about the relationships between different trig functions if they can only manipulate one side. Feb 28, 2021 at 18:31
• Further, the point of a trig identity problem isn't always just to demonstrate equality. There are typically multiple standards built into a single question. In this case, I'm guessing the teacher wanted something involving manipulating fractions. Feb 28, 2021 at 18:31

All of these methods of proof are valid, and should be graded as such (unless the question specifically said to use a certain method).

Method $$1$$ - Start with one side, simplify to the other.

$$\frac{\csc(\theta)-1}{\cot(\theta)}=\frac{(\csc(\theta)-1)(\csc(\theta)+1)}{\cot(\theta)(\csc(\theta)+1)}=\frac{\csc^{2}(\theta)-1}{\cot(\theta)( \csc(\theta)+1)}=\frac{\cot^{2}(\theta)}{\cot(\theta)(\csc(\theta)+1)}$$$$=\boxed{\frac{\cot(\theta)}{\csc(\theta)+1}}$$

Method $$2$$ - Start with the asserted identity, simplify to a known identity.

$$\frac{\csc(\theta)-1}{\cot(\theta)}=\frac{\cot(\theta)}{\csc(\theta)+1}\Longleftrightarrow(\csc(\theta)-1)(\csc(\theta)+1)=\cot^{2}(\theta)\Longleftrightarrow\csc^{2}(\theta)-1$$$$=\cot^{2}(\theta)\ \blacksquare$$

Method $$3$$ - Start with a known identity, turn it into the asserted identity (which is what your son did):

$$\csc^{2}(\theta)-1=(\csc(\theta)+1)(\csc(\theta)-1)=\cot^{2}(\theta)\Longrightarrow\boxed{\frac{\csc(\theta)-1}{\cot(\theta)}=\frac{\cot(\theta)}{\csc(\theta)+1}}$$

That said, however, perhaps the teacher took points off due to the length of your son's proof, which was more roundabout than it could have been. For instance, he could have started with a Pythagorean identity instead of starting with a '$$x=x$$' identity and using a Pythagorean identity, and took a few less steps in simplifying to the desired identity.

• +1 nice answer! Feb 28, 2021 at 18:29

It's disappointing to see that the teacher believes there is only one way to prove trigonometric identities. Actually, there are a number of approaches, all equally valid and useful in different circumstances. Sometimes it is more elegant to 'start with one side and prove that it is equal to the other', but a proof is a proof.

Your son is actually using quite an advanced technique, where he shows that a statement $$P$$ implies another statement $$Q$$, and then shows that all of the steps are invertible, meaning that $$P \iff Q$$. As long as you are able to show that all of the steps are indeed invertible, this is a very useful method. Let's look at his method in more detail. He started by assuming that $$\frac{\csc \theta - 1}{\cot\theta} = \frac{\cot\theta}{\csc\theta+1}$$ and working from there. If we cross mutliply both sides, look at what happens: \begin{align} &\frac{\csc \theta - 1}{\cot\theta} = \frac{\cot\theta}{\csc\theta+1} \\[6pt] \implies & (\csc\theta-1)(\csc\theta+1) = \cot^2\theta \\[6pt] \implies & \csc^2\theta-1=\cot^2\theta \\[6pt] \implies & \frac{1-\sin^2\theta}{\sin^2\theta} = \frac{\cos^2\theta}{\sin^2\theta} \\[6pt] \implies & \frac{\cos^2\theta}{\sin^2\theta}=\frac{\cos^2\theta}{\sin^2\theta} \\[6pt] \implies & \cot^2\theta = \cot^2\theta \, . \end{align} Now, try reading the proof 'backwards'. Does $$\cot^2\theta = \cot^2\theta$$ imply $$\frac{\cos^2\theta}{\sin^2\theta} = \frac{\cos^2\theta}{\sin^2\theta} \, ?$$ Does $$\frac{\cos^2\theta}{\sin^2\theta} = \frac{\cos^2\theta}{\sin^2\theta}$$ imply $$\frac{1-\sin^2\theta}{\sin^2\theta} = \frac{\cos^2\theta}{\sin^2\theta} \, ?$$ Keep going. If the answer to all of these question is 'yes', then we have successfully proven that $$\frac{\csc \theta - 1}{\cot\theta} = \frac{\cot\theta}{\csc\theta+1} \iff \cot^2\theta = \cot^2\theta \, .$$ And since the RHS is an identity, the LHS must also be an identity. There's just one tiny snag to this proof. When we are going in a backwards direction, and conclude that $$(\csc\theta-1)(\csc\theta+1) = \cot^2\theta$$ implies $$\frac{\csc \theta - 1}{\cot\theta} = \frac{\cot\theta}{\csc\theta+1} \, ,$$ we are assuming that both $$\cot\theta$$ and $$\csc\theta + 1$$ are non-zero. But, your son directly addresses this by stating at the start of the proof, 'for all real $$\theta$$ not equal to an integer multiple of $$\pi/2$$...', meaning that this is never a problem. This kind of attention to detail is very impressive for a high-school student.


# [SOLVED]Sum with Binomial Coefficients

#### VincentP

##### New member
I'm having trouble proving the following identity (I don't even know if it's true):
$$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\binom{n-1}{k-1}$$ $$\forall n,k \in \mathbb{N} : n>k$$
Thank you in advance for any help!
Vincent

#### Prove It

##### Well-known member
MHB Math Helper
I'm having trouble proving the following identity (I don't even know if it's true):
$$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\binom{n-1}{k-1}$$ $$\forall n,k \in \mathbb{N} : n>k$$
Thank you in advance for any help!
Vincent
Maybe expanding the binomial coefficients would help. Recall that $\displaystyle {n\choose{m}} = \frac{n!}{m!(n-m)!}$

#### VincentP

##### New member
Maybe expanding the binomial coefficients would help. Recall that $\displaystyle {n\choose{m}} = \frac{n!}{m!(n-m)!}$
Well I have tried that of course:
$$\sum_{r=1}^k \frac{k!}{r!(k-r)!} \frac{(n-k-1)!}{(r-1)!(n-k-r)!} \stackrel{?}{=} \frac{(n-1)!}{(k-1)!(n-k)!}$$
But I don't know where to go from here since I still can't sum the left hand side. I also tried to prove it by induction but I failed to prove the induction step.

#### Sudharaka

##### Well-known member
MHB Math Helper
I'm having trouble proving the following identity (I don't even know if it's true):
$$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\binom{n-1}{k-1}$$ $$\forall n,k \in \mathbb{N} : n>k$$
Thank you in advance for any help!
Vincent
Hi Vincent,

Thank you for submitting this problem, I enjoyed solving it.

Since, $$\binom{k}{r}=\binom{k}{k-r}$$ we have,

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{r=1}^{k}\binom{k}{k-r} \binom{n-k-1}{r-1}$

Using the Pascal's rule we get,

\begin{eqnarray}

\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}&=&\sum_{r=1}^{k}\left[{k+1 \choose k-r+1}-{k \choose k-r+1}\right]\binom{n-k-1}{r-1}\\

&=&\sum_{r=1}^{k}{k+1 \choose k-r+1}\binom{n-k-1}{r-1}-\sum_{r=1}^{k}{k \choose k-r+1}\binom{n-k-1}{r-1}\\

\end{eqnarray}

Now use the Vandermonde's identity to get,

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}={n \choose k}-\binom{n-1}{k}$

Using the Pascal's rule again we get,

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}={n-1 \choose k-1}$

Kind Regards,
Sudharaka.

#### Opalg

##### MHB Oldtimer
Staff member
For a completely different, combinatorial, way to look at this problem, suppose that you have $n-1$ objects, and you want to select $k-1$ of them. There are $n-1\choose k-1$ ways of making the selection.

Now suppose that $k$ of the objects are white, and the remaining $(n-1)-k$ are black. Then another way to select $k-1$ objects is as follows. First, choose a number $r$ between 1 and $k$ (inclusive). Then select $r-1$ black balls and $(k-1)-(r-1) = k-r$ white balls. The number of ways to do that is ${k\choose k-r}{(n-1)-k\choose r-1} = {k\choose r}{n-k-1\choose r-1}.$ Sum that from $r=1$ to $k$ to get the total number of ways to select $k-1$ objects.

#### VincentP

##### New member
@ Sudharaka
Thank you very much for your explanation!
I have one question though: Doesn't Vandermonde's identity require the sum to start at r=0?

@Opalg
Thank you for your reply, that's a very interesting approach to the problem!

#### Sudharaka

##### Well-known member
MHB Math Helper
@ Sudharaka
Thank you very much for your explanation!
I have one question though: Doesn't Vandermonde's identity require the sum to start at r=0?

@Opalg
Thank you for your reply, that's a very interesting approach to the problem!
You are welcome. I have neglected an in between step that may have aroused the confusion.

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{r=1}^{k}{k+1 \choose k-r+1}\binom{n-k-1}{r-1}-\sum_{r=1}^{k}{k \choose k-r+1}\binom{n-k-1}{r-1}$

Substitute $$u=r-1$$. Then the right hand side becomes,

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{u=0}^{k}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k}{k \choose k-u}\binom{n-k-1}{u}$

I hope this clarifies your doubts.

Kind Regards,
Sudharaka.

#### VincentP

##### New member
You are welcome. I have neglected an in between step that may have aroused the confusion.

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{r=1}^{k}{k+1 \choose k-r+1}\binom{n-k-1}{r-1}-\sum_{r=1}^{k}{k \choose k-r+1}\binom{n-k-1}{r-1}$

Substitute $$u=r-1$$. Then the right hand side becomes,

$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{u=0}^{k}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k}{k \choose k-u}\binom{n-k-1}{u}$

I hope this clarifies your doubts.

Kind Regards,
Sudharaka.
Well not quite.
If you substitute the index of summation $u=r-1$ you have to change the lower as well as the upper bound of summation, because otherwise you change the number of summands. Therefore if you substitute $u=r-1$ we get:
$$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{u=0}^{k-1}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k-1}{k \choose k-u}\binom{n-k-1}{u}$$ Which doesn't match Vandermonde's Identity anymore, because the upper bound of summation doesn't appear in the lower index of the binomial coefficant.

Kind Regards,
Vincent

#### Sudharaka

##### Well-known member
MHB Math Helper
Well not quite.
If you substitute the index of summation $u=r-1$ you have to change the lower as well as the upper bound of summation, because otherwise you change the number of summands. Therefore if you substitute $u=r-1$ we get:
$$\sum_{r=1}^k \binom{k}{r} \binom{n-k-1}{r-1}=\sum_{u=0}^{k-1}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k-1}{k \choose k-u}\binom{n-k-1}{u}$$ Which doesn't match Vandermonde's Identity anymore, because the upper bound of summation doesn't appear in the lower index of the binomial coefficant.

Kind Regards,
Vincent
Note that,

$\sum_{u=0}^{k-1}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k-1}{k \choose k-u}\binom{n-k-1}{u}=\sum_{u=0}^{k}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k}{k \choose k-u}\binom{n-k-1}{u}$

since when $$u=k$$ the right hand side is equal to zero. If you have any more questions about this please don't hesitate to ask.

Kind Regards,
Sudharaka.

#### VincentP

##### New member
Note that,

$\sum_{u=0}^{k-1}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k-1}{k \choose k-u}\binom{n-k-1}{u}=\sum_{u=0}^{k}{k+1 \choose k-u}\binom{n-k-1}{u}-\sum_{u=0}^{k}{k \choose k-u}\binom{n-k-1}{u}$

since when $$u=k$$ the right hand side is equal to zero. If you have any more questions about this please don't hesitate to ask.

Kind Regards,
Sudharaka.
I think that clarifies everything, thanks so much.
Vincent

#### Sudharaka

##### Well-known member
MHB Math Helper
I think that clarifies everything, thanks so much.
Vincent
I am glad to be of help.

Kind Regards,
Sudharaka.


# Directional Derivative help, solving for derivative = 0 when given constants

A function that is useful in studying the air flow over mountains is

$$h(x,y) = \frac{h_0}{[(\frac{x}{a})^2+(\frac{y}{b})^2+1]^\frac{3}{2}}$$

where $h_0$, a, and b are all positive constants.

(a) Find $\nabla h$.

(b) Find the directional derivative of the point (x,y) in the direction of the vector $v=(v_1,v_2)$

(c) At what point(s) is the directional derivative equal to zero?

For part a), I found that $\nabla h$ is equal to $$\frac{-3h_0}{[(\frac{x}{a})^2+(\frac{y}{b})^2+1]^\frac{5}{2}}\langle\frac{x}{a^2},\frac{y}{b^2}\rangle$$

Using this, I found that for part b), I got that $D_uh(x,y) = \frac{-3h_0}{[(\frac{x}{a})^2+(\frac{y}{b})^2+1]^\frac{5}{2}}\langle\frac{x}{a^2},\frac{y}{b^2}\rangle \bullet\frac{1}{\sqrt{v_1^2+v_2^2}}\langle v_1, v_2 \rangle$

which simplifies to $D_uh(x,y) = \frac{-3h_0}{[(\frac{x}{a})^2+(\frac{y}{b})^2+1]^\frac{5}{2}{\sqrt{v_1^2+v_2^2}}}(\frac{xv_1}{a^2}+\frac{yv_2}{b^2})$

First of all, is this correct?

Secondly, given that I am correct up to this point, I am unsure on how to do part c). How can I solve for an x and y where $D_uh = 0$ when I do not have values for $v_1$ and $v_2$?

Any help here is appreciated.

• I suposse you have to solve the equation $\frac{xv_{1}}{a^{2}}+\frac{yv_{2}}{b^{2}}=0$ – julio godoy Jun 23 '16 at 6:36
• and the vector solution is $(-ya^{2},xb^{2})$, if the vector solution has unit lenght you have to normalize that vector – julio godoy Jun 23 '16 at 6:44
• @juliogodoy Wouldn't that solution require that $v_1 = -v_2$? if you plug in those x and y values in the equation, you get $-yv_1 + xv_2 = 0$. What am I missing here? – dibdub Jun 23 '16 at 6:46
• you can use also the fact that $u$ and $v$ are perpendicular then $u\cdot v = 0$ and if $u = (u_1,u_2)$ then $v=(-u_2,u_1)$ – Navaro Jun 23 '16 at 6:51
• In that case wouldnt the answer be $(\frac{-yv_2}{b^2},\frac{xv_1}{a^2})$? *edit: Actually it would be $(\frac{-v_2}{b^2},\frac{v_1}{a^2})$. Is that correct? – dibdub Jun 23 '16 at 6:54

The first two answers are correct.

For the third question: the directional derivative is equal to $0$ if $v =(v_1,v_2)$ is perpendicular to $\nabla h$ , so: $$v\cdot \nabla h = 0 \Rightarrow \dfrac{v_1}{a^2}x+\dfrac{v_2}{b^2}y = 0 \Rightarrow y = -\left( \dfrac{b}{a} \right)^2\left(\dfrac{v_1}{v_2}\right)x\Rightarrow y=cx \quad\text{where } c=-\left( \dfrac{b}{a} \right)^2\left(\dfrac{v_1}{v_2}\right)$$ which is the equation of a straight line passing through the origin $O=(0,0)$

conclusion: every point $(x,y)$ satisfying the previous equation makes the directional derivative in the direction of $v=(v_1,v_2)$ equal to zero

• Perfect, that makes sense. Thanks for all your help! – dibdub Jun 23 '16 at 7:47

The condition $x\frac{v_1}{a^2}+y\frac{v_2}{b^2}=0$ could be written $(P-O)\cdot\mathbf{u}=0$, where $P=(x,y)$, $O=(0,0)$ and $\mathbf{u}=\langle\frac{v_1}{a^2},\frac{v_2}{b^2}\rangle$.
This is the equation of the straight line passing through $O$ and orthogonal to $\mathbf{u}$.

The directional derivative is $0$ on each point of this line.

• Could you elaborate on this? Why is it (P-O)? What does P represent? How would I present my answer for part c) then? – dibdub Jun 23 '16 at 6:45
• @dubbler26: edited. – enzotib Jun 23 '16 at 7:03


# Calculating expectation of a function of a continuous random variable?

Assume we have a continuous random variable $$X$$, with a probability density function

$$f(x) = 1 - \frac{x}{2},\; 0 < x < 2$$

Let's say I want to calculate $$E(2X)$$. I will use two different methods, and get different results, so I obviously understand something wrong.

METHOD 1:

Using the formula for the expectation of a function of a random variable, I get:

$$E(2X) = \int_{-\infty}^{+\infty} 2xf(x)dx = \int_0^2 (2x-2x^2)dx = \frac{4}{3}$$

I understand this formula intuitively, as it's pretty much exactly the same as in the discrete case, if we replace the integral with a finite sum and the probability density function with the probability mass function. Only the values change, and not the distribution, so we only apply the function 2x to the values, and not the distribution $$f(x)$$.

METHOD 2:

Let's say I declare a new continuous random variable, $$Y = 2X$$. I can calculate the probability density function of $$Y$$:

$$g(y) = |\frac{dx}{dy}|f(x) = \frac{1}{2}f(\frac{y}{2}) = \frac{1}{2}(1-\frac{y}{4})$$

for $$0.

Then I can calculate:

$$E(2X) = E(Y) = \int_{-\infty}^{+\infty} y\;g(y)dx = \int_0^4 \frac{1}{2}(1-\frac{y}{4})dx = \frac{2}{3}$$

I don't understand what I did wrong here.

But I also don't understand the formula for $$g(y)$$ intuitively - shouldn't $$g(y)$$ and $$f(x)$$ be the same functions if they're injective, similar to the discrete case?

Anyway, if someone can point out what I did wrong, I would be very grateful.

You forgot to multiply by $$y$$ for the second computation.
$$g(y)$$ and $$f(x)$$ are different functions, but they are related by $$g(y)=\frac{1}{2}f\big(\frac{y}{2}\big)$$ and are both decreasing (also see here). For instance, $$h_{1}(x)=x$$ and $$h_{2}(x)=2x$$ are injective, but $$h_{1}(1)=1$$ and $$h_{2}(1)=2$$.
It is a good idea to check if $$g(y)=\frac{1}{2}(1-\frac{y}{4})$$ for $$0 is a valid pdf. Indeed we have $$g(y)\geq 0$$ for $$0 and $$\int_{-\infty}^{\infty}g(y)dy=\frac{1}{2}\int_{0}^{4}(1-\frac{y}{4})dy=1,$$ so $$g(y)$$ is a valid pdf.
Next we have $$E(2X) = E(Y) = \int_{-\infty}^{+\infty} y\;g(y)dx = \int_0^4 \frac{\color{red}{y}}{2}(1-\frac{y}{4})dx = \frac{4}{3}$$


# Is there a bijective map from $(0,1)$ to $\mathbb{R}$?

I couldn't find a bijective map from $(0,1)$ to $\mathbb{R}$. Is there any example?

-
Yes, and there's even one from (0,1) to R²... – Axel Sep 21 '12 at 12:56

Here is a nice one ${}{}{}{}{}{}{}{}{}$, can you find the equation?

-
That's really nice! – Clive Newstead Sep 21 '12 at 12:26
Note: I would be interested in an explicit formula. – The Chaz 2.0 Oct 21 '13 at 19:59
@The Chaz 2.0 If the diameter of the circle is 1 and the interval is $(0, 1)$ and 1/2 mapped to 0 and the distance between the center of the circle and the 2nd numberline is 1/2 then the formula is $f(x)=\frac{x-1/2}{\sqrt{x-x^2}}$. Becouse scaling does not matter you can multiply by 2 and get the formula $f(x)=\frac{2x-1}{\sqrt{x-x^2}}$, but i don't know how you can get Cameron Buie's formula, out of this. – 05storm26 Feb 2 '14 at 8:31
I am thinking about: $f:(0,1)\to\mathbb{R}$, $f(x)=-\cot\left(\pi x\right)$ – Darius Apr 22 '14 at 19:58
As far as I can tell, the connection between our answers' formulae is coincidental (aside from the fact that if $g$ is a positive function on some subset of $\Bbb R,$ then so is $\sqrt{g},$ so our functions are related, but not in an obvious heuristic way. Please let me know if you can discern a connection between our answers (aside from the obvious algebraic one). – Cameron Buie Oct 31 '14 at 3:07

Here is a bijection from $(-\pi/2,\pi/2)$ to $\mathbb{R}$: $$f(x)=\tan x.$$ You can play with this function and solve your problem.

-

$g(x)=\frac 1{1+e^x}$ gives a bijection from $\Bbb R$ to $(0,1)$, so take the inverse of this map.

-
And the inverse is $f(x)=\ln\left(\frac{1}{x}-1\right)$ – celtschk Sep 21 '12 at 12:19

A homeomorphism (continuous bijection with a continuous inverse) would be $f:(0,1)\to\Bbb R$ given by $$f(x)=\frac{2x-1}{x-x^2}.$$

Added: Let me provide some explanation of how I came by this answer, rather than simply leave it as an unmotivated (though effective) formula and claim in perpetuity.

Many moons ago, I was assigned the task of demonstrating that the real interval $(-1,1)$ was in bijection with $\Bbb R.$ Prior experience with rational functions had shown me graphs like this:

The above is a graph of a continuous function from most of $\Bbb R$ onto $\Bbb R.$ This doesn't do the trick on its own, since it certainly isn't injective. However, it occurred to me that if we restrict the function to the open interval between the two vertical asymptotes, we get this graph, instead:

This graph is of a continuous, injective (more precisely, increasing) function from a bounded open interval of $\Bbb R$ onto $\Bbb R.$ This showed that rational functions could do the job. Other options occurred to me, certainly (such as trigonometric functions), but of the ideas I had (and given the results I was allowed to use) at the time, the most straightforward approach turned out to be using rational functions.

Now, given the symmetry of the interval $(-1,1)$ (and, arguably, of $\Bbb R$) about $0,$ the natural choice of the unique zero of the desired function was $x=0.$ In other words, I wanted $x$ to be the unique factor of the desired rational function's numerator that could be made equal to $0$ in the interval $(-1,1)$--meaning that for $\beta\in(-1,1)$ with $\beta\ne0,$ I needed to make sure that $x-\beta$ was not a factor of the numerator. For simplicity, I hoped that I could make $x$ the only factor of the numerator that could be made equal to $0$ at all--that is, I hoped that I could have $\alpha x$ as the numerator of my function for some nonzero real $\alpha.$

In order to get the vertical asymptotic behavior I wanted on the given interval--that is, only at the interval's endpoints--I needed to make sure that $x=\pm1$ gave a denominator of $0$--that is, that $x\mp1$ were factors of the denominator--and that for $-1<\beta<1,$ $\beta$ was not a zero of the denominator--that is, that $x-\beta$ wasn't a factor of the denominator. For simplicity, I hoped that I could make $x\mp1$ the only factors of the denominator.

Playing to my hopes, I assumed $\alpha$ to be some arbitrary nonzero real, and considered the family of functions $$g_\alpha(x)=\frac{\alpha x}{(x+1)(x-1)}=\frac{\alpha x}{x^2-1},$$ with domain $(-1,1).$ It was readily seen that all such functions are real-valued and onto $\Bbb R.$

I wanted more, though! (I'm demanding of my functions when I can be. What can I say?) I wanted an increasing function. I determined (through experimentation which suggested proof) that $h_\alpha$ would be increasing if and only if $\alpha<0.$ Again, for convenience, I chose $\alpha=-1,$ which gave me the function that satisfied the desired (and required) properties: $g:(-1,1)\to\Bbb R$ given by $$g(x)=\frac{-x}{x^2-1}=\frac{x}{1-x^2}.$$

Much later, you posted your question, and I realized (again, based on experience) that my earlier result could be adapted to the one you wanted. Playing around a bit with linear interpolation showed that the function $h:(0,1)\to(-1,1)$ given by $h(x)=2x-1$ was a bijection--in fact, an increasing bijection.

It is readily shown (and I had previously seen) that if $X,Y,$ and $Z$ are ordered sets and if we are given increasing maps $X\to Y$ and $Y\to Z,$ then the composition of those maps is an increasing map $X\to Z.$ Also, it is readily shown (and I had seen previously) that if both such maps are continuous and surjective, then so is their composition. Just from these results, my originally posted map was obtained (though named differently): \begin{align}(g\circ h)(x) &= g\bigl(h(x)\bigr)\\ &= \frac{h(x)}{1-\left(h(x)\right)^2}\\ &=\frac{2x-1}{1-(2x-1)^2}\\ &=\frac{2x-1}{1-\left(4x^2-4x+1\right)}\\ &= \frac{2x-1}{4x-4x^2}\\ &=\frac{2x-1}{4(x-x^2)}.\end{align}

As lhf astutely pointed out shortly thereafter (and as I should have seen immediately), the factor of $4$ in the denominator serves no particular purpose, hence its later removal to yield the function $f$ that I eventually posted.

The remaining claim that I made (that $f$ has a continuous inverse), I leave to you (the reader). If you're curious how I determined this, try to prove it on your own first. If you're stymied (or if you simply want to run your proof attempt by me), let me know. I will do what I can to get you "unstuck."

-
This is the answer you want. A direct map that just stretches the unit interval onto the (-inf,inf) interval. This shows you don't need an exotic function like the bijection between [0,1] and [0,1]^2. – John Baber-Lucero Sep 21 '12 at 12:17
No need for that 4... – lhf Sep 21 '12 at 12:22
Fair point, @lhf. Not sure why I bothered with that.... – Cameron Buie Sep 21 '12 at 17:21
+1 for the motivation. – LePressentiment Jan 6 at 4:45

For a less differentiable example, consider the bijection in the following picture,

In symbols, given $x \in (0,1)$ let $n$ be the largest natural number such that $1-\frac{1}{n}<x$, define $$y=\frac{x-n}{\frac{1}{n}-\frac{1}{n+1}}$$ to be the renormalized version of $x$ if the interval $(1-\frac{1}{n},1-\frac{1}{n+1}]$ is rescaled and shifted to map to $(0,1)$. Then we have the following bijection: $$f(x)=\begin{cases}\frac{n-1}{2}+y,& n \text{ odd} \\ -\frac{n-2}{2}-y,& n \text{ even}\end{cases}$$

-
Not only less differentiable but also much less continuous. – Stefan Geschke Sep 21 '12 at 10:15
(: One might even consider the composition $f \circ g$ with a nowhere continuous bijection $g:(0,1)\rightarrow (0,1)$. – Nick Alger Sep 21 '12 at 10:27

Yes. let $f(x)=\tan((x-1/2)\pi)$. the domain is $(0,1)$ and range is $\mathbb{R}$

-
Here is a more visual description of the same function (modulo a factor of $\pi$) Bend the line segment (0, 1) into a semicircle, with the open part facing upwards, and rest it on the real line (with 0.5 on the semicircle resting on 0 on the real line). To map a point on one line to a point on the other, draw a line through that point and the centre of the circle. The mapped point is where it intersects the other line. – Max Sep 21 '12 at 10:10
Of course, knowing the domain and range simply guarantees that $f$ is surjective, but this $f$ does turn out to be injective, too. – Cameron Buie Sep 21 '12 at 10:36

Yes, see above answers. There are even bijective maps between $(0,1)$ and $\mathbb{R}^n$. To see this, note that a bijection $\phi$ between $(0,1)$ and $(0,1)^2$ can be made in this way: Let $x= 0.b_1b_2\ldots$, with $b_j$ being the digits in a decimal expansion. Define $$\phi(x) = (0.b_1b_3b_5\ldots,0.b_2b_4b_6\ldots),$$ i.e., extract even and odd digits. For $\phi^{-1}(x_1,x_2)$, let $x_1 = 0.a_1a_2a_3\ldots$, and $x_2=b_1b_2b_3\ldots$. Then, $$\phi^{-1}(x,y) = 0.a_1b_1a_2b_2\cdots$$ Some care has to be taken with identification between digital expansions like $0.199999\cdots$ and $0.20000\cdots$, but that is an exercise.

Having the bijection between $(0,1)$ and $(0,1)^2$, we can apply one of the other answers to create a bijection with $\mathbb{R}^2$.

The argument easily generalizes to $\mathbb{R}^n$.

-
Actually you don't even have to generalize the argument: If you have the bijection between $(0,1)$ and $(0,1)^2$, you get a bijection from $(0,1)$ to $(0,1)^3$ by just applying the same bijection to one of the two factors of $(0,1)^2$. Of course the same way you get to $(0,1)^n$. – celtschk Sep 21 '12 at 12:16

The trigonometric function $\tan x$ is an invertible function from $(-\pi/2,\pi/2)$ to $\mathbb{R}$. Also to find an invertible function from $(0,1)$ to $(-\pi/2,\pi/2)$ find the equation of the straight line joining the points $(0,-\pi/2)$ and $(1,\pi/2)$. Now compose the two functions together. You can likewise find bijections between any two open intervals and any open interval and $\mathbb{R}$.

-

$x \mapsto \ln (- \ln x)$ with the inverse $y \mapsto e^{-e ^ {\ y}}$. It's also a $C ^ \infty$ diffeomorphism.

-

By virtue of http://natureofmathematics.wordpress.com/lecture-notes/cantor/, here's another picture. The interval at the bottom is $\mathbb{R}$.

-
It's not clear to me which point on the circle is missed from the map described by the blue arrows. It looks like it could be some point between the images of the point $0$ and the point $1$, but then the map described by the red arrows from the circle to the real line is not a bijective map because that missed point has no preimage and so its image in the real line after the red mapping has no preimage in the interval. This is a poor picture. – Dan Rust Feb 18 '14 at 12:45
the idea is good : draw a circle of radius $1$ and center $(0,1)$, draw the segment $(-1,1) , (1,1)$, and map the segment to $\mathbb{R}$ by taking from any point of the segment the nearest point on the half bottom circle, drawing the line passing through these 2 points, and considering its intersection with the horizontal line $y = 0$. finally, prove that every continuous bijection between $]-1;1[$ and $\mathbb{R}$ can be constructed this way (replacing the circle by other curves). and the reciprocal : characterize the curves from which we get such a bijection. – user1952009 Jan 5 at 22:54


# Determining compositions of trig functions by knowing Euler's identity etc

How does one determine: $$\cos^2(\arctan(x))?$$

I know what it is equal to, since its in the tables. But without working with many trigonometric identities, its not clear how to find such things.

How would you see this with the minimal number of trig identities?

$\cos^2(\arctan(x))=\cos(\arctan(x))\cos(\arctan(x))=\frac{1}{\sqrt{1+x^2}}\frac{1}{\sqrt{1+x^2}}=\frac1{1+x^2}.$

The one identity I used here, I didn't know. It seems in similar situations, on an exam, I would have massive trouble without these identities. Can all of these sorts of things be solved by knowing something about Eulers identity and such?

Define the point $P(\theta)=(1,x)$ so that $\tan(\theta) = x$. Note that we need to have $\theta$ in the first or fourth quadrant in order for $\theta = \arctan x$ to be true.

From the picture we see that $\cos^2(\arctan x) = \cos^2 \theta = \dfrac{1}{1+x^2}$.

I find that the easiest way to solve these is to let $\theta$ be $\arctan{x}$, so that $\tan{\theta}=x$. Then we have \begin{align*} \frac{\sin{\theta}}{\cos{\theta}}&=x\\ \cos{\theta}&=\frac{\sin{\theta}}{x}\\ \cos{\theta}&=\frac{\sqrt{1-\cos^2{\theta}}}{x}\\ x\cos{\theta}&=\sqrt{1-\cos^2{\theta}}\\ x^2\cos^2{\theta}&=1-\cos^2{\theta}\\ (x^2+1)\cos^2{\theta}&=1\\ \cos^2{\theta}&=\frac{1}{x^2+1}\\ \end{align*} This may look tougher, but after the third step, we only need to use algebraic manipulations, and don't need to worry about trigonometry anymore. The two nicest ways to make a trig problem easier to solve are getting rid of inverses like I have in this problem, and writing everything in terms of sine and cosine.

• Is $\sin\theta$ always non negative like $$\sqrt{1-\cos^2\theta}$$ Nov 13 '17 at 4:08
• Best way to fix that problem is to already square after the second step. Nov 13 '17 at 6:55
• I think that the OP main concern is not to solve the problem posted. That is just an example. He seems to look for a general way of solving trig functions with some sort of simplifying tool like for example Euler’s identity. Nov 13 '17 at 7:35

From the well-known trig identity $$\sec^2y=1+\tan^2y$$ and $$\sec y=\frac{1}{\cos y}$$ one can easily find $$\cos^2y=\frac{1}{1+\tan^2y}$$ Plugging $y=\arctan x$ implies $$\cos^2(\arctan x)=\frac{1}{1+x^2}$$

Firstly, lets check the range of commonly defined $\arctan (x)$ because our result will depend on this. It is generally taken to be $(-\frac{\pi}{2}, \frac{\pi}{2})$. So $\cos$ will be positive over this domain.

Here this analysis is not of much use as we have squared the $\cos$ term, which will always be positive anyway.

Now to get the value of $\cos(\arctan(x))$ for acute angle $\arctan(x)$, let this angle be $\phi$.

\begin{align} \phi &= \arctan (x) \tag{1}\\ \tan(\phi) &= x\\ \frac{1}{1+\tan^2 \phi} &= \frac{1}{1+x^2}\\ \cos^2 \phi &= \frac{1}{1+x^2}\\ \implies \cos^2 (\arctan x) &=\frac{1}{1+x^2} \end{align}

There are (as is often the case with trigonometric identities) several ways to solve this, and the already-posted answers are just fine. Here's another, which I like because it uses a very general-purpose tool.

The tool in question: the famous half-angle formulae. These are extremely useful and reduce many trigonometric identities to routine algebraic manipulation. In case you don't already know them, here they are. Let $t=\tan\frac12\theta$; then $\cos\theta=\frac{1-t^2}{1+t^2}$, and $\sin\theta=\frac{2t}{1+t^2}$, and $\tan\theta=\frac{2t}{1-t^2}$.

Why are these useful here? Because $\cos^2\phi$ is very closely related to $\cos2\phi$, which means we have cosine of twice an arctangent, which if you think about it for a moment you'll see is exactly what the half-angle formula for cos tells us how to handle.

So. We're taking $\tan^{-1}x$ and we want (in effect) the cosine of twice this, so write $x=\tan\frac12\theta$. The formula above says that $\cos\theta=\frac{1-x^2}{1+x^2}$; call this $c$. The thing we were actually asked for is $\cos^2\frac12\theta$ and we have $c=2\cos^2\frac12\theta-1$ so $\cos^2\frac12\theta=\frac{c+1}2=\frac1{1+t^2}$.


# Find expression for sum of series

I want to find a formula for the sum of this series using its general term. How to do it?

Series $$S_n = \underbrace{1/3 + 2/21 + 3/91 + 4/273 + \cdots}_{n \text{ terms}}$$

General Term

$$S_n = \sum_{i=1}^{n} \frac{i}{i^4+i^2+1}$$

-
I changed n\ \mbox{terms} to n\text{ terms}. The mismatch in sizes of fonts resulted from use of an incorrect method. –  Michael Hardy Jul 12 '14 at 22:23

Using partial fractions, we get $\dfrac{i}{i^4+i^2+1} = \dfrac{\tfrac{1}{2}}{i^2-i+1} - \dfrac{\tfrac{1}{2}}{i^2+i+1}$.

Thus, $S_n = \displaystyle\sum_{i = 1}^{n}\dfrac{i}{i^4+i^2+1} = \dfrac{1}{2}\sum_{i = 1}^{n}\dfrac{1}{i^2-i+1} - \dfrac{1}{i^2+i+1}$.

Since $(i+1)^2-(i+1)+1 = i^2+i+1$, this sum telescopes to $S_n = \dfrac{1}{2}\left(1 - \dfrac{1}{n^2+n+1}\right)$.

Taking the limit as $n \to \infty$ gives $S = \dfrac{1}{2}$.

-
thank you so much,but i have one doubt ,in which cases can i apply partial fraction to calculate sum? –  user3481652 Jul 12 '14 at 20:47
Anytime you have a rational function (whose numerator has a smaller degree than its denominator), you can always try using partial fractions. Whether or not it will lead to a solution depends on the particular problem. –  JimmyK4542 Jul 12 '14 at 20:49
okay thank you for your help :) –  user3481652 Jul 12 '14 at 20:51
Note that the factorisation $i^4+i^2+1=(i^2+i+1)(i^2-i+1)$ comes easily if you notice that $(i^2-1)(i^4+i^2+1)=i^6-1=(i^3+1)(i^3-1)=(i+1)(i^2-i+1)(i-1)(i^2+i+1)$ –  Mark Bennet Jul 12 '14 at 21:06

Use partial fractions,

$$\frac{i}{i^4+i^2+1} = \frac{1}{2(i^2-i+1)}-\frac{1}{2(i^2+i+1)}$$

-

Write it out:

$$\begin{eqnarray} \sum_{i=1}^\infty \frac{i}{i^4 + i^2 + 1} &=& \sum_{i=1}^\infty \left( \frac{2}{4i^2 - 4i + 4} - \frac{2}{4i^2 + 4i + 4}\right)\\ &=& \sum_{i=1}^\infty \left( \frac{2}{\Big(2i-1\Big)^2 + 3} - \frac{2}{\Big( 2i + 1\Big)^2 + 3}\right)\\ &=& \frac{2}{\Big( 2 - 1\Big)^2 + 3} + \sum_{i=1}^\infty \left( \frac{2}{\Big(2i+1\Big)^2 + 3} - \frac{2}{\Big( 2i + 1\Big)^2 + 3}\right)\\ &=& \frac{1}{2}. \end{eqnarray}$$

-
Mind to give reason for downvote? –  johannesvalks Jul 12 '14 at 21:06
I didn't downvote you. But I think you posted the solution AFTER other users. I think they care about "speed" + "accuracy"....next time... –  NotALoner Jul 12 '14 at 21:35
Well - that is the problem when you reply a post and in the mean time you watch the worldcup so you are late with the final result.... Thanks for the tip / advice!! –  johannesvalks Jul 12 '14 at 21:39
@ user2584283 I think the OP asks for (a formula for) the sum of the series. –  user84413 Jul 13 '14 at 1:01
If you look at the question's edit history, you will see that at one time, it asked for the sum of the infinite series, not just the first $n$ terms. –  JimmyK4542 Jul 13 '14 at 1:41