# Roulette Wheel Selection

As we saw previously, it’s easy to simulate a random coin flip by generating a random decimal $r$ between $0$ and $1$ and applying the following function:

\begin{align*} \textrm{outcome}(r) = \begin{cases} \textrm{heads} & \textrm{ if } r < 0.5 \\ \textrm{tails} & \textrm{ otherwise} \end{cases} \end{align*}

This is a special case of a more general idea: sampling from a discrete probability distribution. Flipping a fair coin is tantamount to sampling from the distribution [0.5, 0.5], i.e. $0.5$ probability heads and $0.5$ probability tails.

More complicated contexts may require sampling from longer distributions that may or may not be uniform. For example, if we wish to simulate the outcome of rolling a die with two red faces, one blue face, one green face, and one yellow face, then we need to sample from the distribution [0.4, 0.2, 0.2, 0.2].

Note that when we sample from the distribution, we need only sample an index from the distribution, and then use the index to look up the desired value. For example, when we sample an index from the distribution [0.4, 0.2, 0.2, 0.2], we have probabilities $0.4,$ $0.2,$ $0.2,$ and $0.2$ of getting indices $0,$ $1,$ $2,$ and $3$ respectively. Then, all we need to do is look up that index in the following array: [red, blue, green, yellow].

## Roulette Wheel Selection

Roulette wheel selection is an elegant technique for sampling an index from an arbitrary discrete probability distribution. It works as follows:

1. turn the distribution into a cumulative distribution,
2. sample a random number $r$ between $0$ and $1,$ and then
3. find the index of the last value in the cumulative distribution that is less than $r.$

To illustrate, let’s sample an index from the distribution [0.4, 0.2, 0.2, 0.2] that was mentioned above in the context of a die roll.

1. First, we construct the cumulative distribution: [0.4, 0.4 + 0.2, 0.4 + 0.2 + 0.2, 0.4 + 0.2 + 0.2 + 0.2], or more simply, [0.4, 0.6, 0.8, 1.0].
2. Then, we sample a random number $r$ between $0$ and $1.$ Suppose we get $r = 0.93.$
3. Finally, we find the index of the last value in the cumulative distribution that is less than $r = 0.93.$ In our case, this is the value $0.8$ at index $2,$ because the next value ($1.0$ at index $3$) is greater than $r = 0.93.$

So, we have sampled the index $2.$

## Exercise

Write a function random_draw(distribution) that samples a random number from the given distribution, an array where distribution[i] represents the probability of sampling index i.

To test your function on a particular distribution, sample many indices from the distribution and ensure that the proportion of times each index gets sampled matches the corresponding probability in the distribution. Do this for a handful of different distributions.

Tags:


# Prime divides $n^2 + 1 \Rightarrow$ prime doesn't divide $n$

How can I show that if a prime $p$ divides $$n^2 + 1$$ then it doesn't divide $n$?

• If p divides n then it must divide n^2. No number other than 1 can divide two consecutive numbers. Jul 6 '16 at 2:25
• Dang auto correct. And that was a weird one. Can not understand it. Jul 6 '16 at 2:28
• Try proving the contrapositive, it's easier to think about. Jul 6 '16 at 2:29
• @fleablood Maybe cutie numbers are like friendly numbers and lucky numbers at the same time?
– user296602
Jul 6 '16 at 2:29
• Applying Euclid's algorithm $\,(n^k\!+1,n) = (1,n) = 1\,$ by $\,n^k\!+1\equiv 1\pmod n\,$ for $\,k\ge 1.\,$ Since their gcd $= 1,\,$ they have no nontrivial common divisor. Jul 6 '16 at 3:35

We can use Bezout's Identity to show that $\left(n^2+1,n\right)=1$. That is, $$\left(n^2+1\right)\cdot1-n\cdot n=1$$ Therefore, the greatest common divisor of $n^2+1$ and $n$ is $1$.

That is, if any number divided both $n^2+1$ and $n$, it would also divide $(n^2+1)-n\cdot n=1$.

• For every integer $k\ge 1$, $(n^k+1)\cdot 1-n\cdot n^{k-1}=1$. Jul 6 '16 at 10:27
• Indeed. $\left(n^k+1,n\right)=1$ for $k\ge1$.
– robjohn
Jul 6 '16 at 12:12
• @Woria Special case $\, j = n^{k-1}\,$ of $\,(1\!+\!nj,\,n) = 1\$ by $\ 1= 1\!+\!nj-n(j)\ \$ (or by one step of Euclid's algorithm - see my comment on the question). Aug 4 '16 at 2:51

A proof by contradiction: assume $n\equiv 0\mod p$ with $p>1$, then $$n^2\equiv 0\pmod p$$ also. But $$n^2\equiv -1\pmod p$$ which contradicts, therefore $$n^2+1\equiv 0\pmod p\Rightarrow n\not\equiv 0\pmod p$$

• i.e. if $\,p\mid n,\color{#c00}{n^2\!+\!1}\,$ then $\,{\rm mod}\ p\!:\ n\equiv 0\,\Rightarrow\, 0\equiv \color{#c00}{n^2\equiv -1}\,\Rightarrow\, p\mid 1,\,$ contradiction Aug 4 '16 at 2:54

Below, all 'leters variables' $\ds{n,s,p}$ are integers $\ds{\pars{~p\ \mbox{is a}\ \ul{prime\ number}~}}$:

• $\ds{{n \over p} = s\quad\imp\quad n = sp\quad\imp\quad{n^{2} + 1 \over p} = {s^{2}p^{2} + 1 \over p} = s^{2} p + {1 \over p}\ !!!}$
• $\ds{{1 \over p}\ \ul{\mbox{is not}}\ \mbox{an integer because}\ p > 1 \pars{~p\ \mbox{is a prime number}~}}$
• $\pars{\vphantom{\LARGE A}% p \mid n \imp p \not\mid \pars{n^{2} + 1}}\ \mbox{is equivalent to}\ \pars{\vphantom{\LARGE A}% p \mid \pars{n^{2} + 1} \imp p \not\mid n}$

If $p=2$ and $2\mid n$ we have that $n^{2}$ is even and so $n^{2}+1$ is odd. Now assume that $p$ is odd. We can use the Legendre symbol. If we assume that $n\equiv0\mod p$ we have $n^{2}\equiv0 \mod p$. So $$\left(\frac{n^{2}}{p}\right)=0$$ but since $n^{2}\equiv-1 \mod p$ we also have, by the law of quadratic reciprocity $$\left(\frac{n^{2}}{p}\right)=\left(\frac{-1}{p}\right)=1^{\frac{p-1}{2}}=\begin{cases} 1 & p\equiv1\,\mod\,4\\ -1 & p\equiv3\,\mod\,4 \end{cases}$$ and this is absurd.

You want to prove the statement $\color\red{p|n^2+1}\implies\color\green{p\not|n}$.

Instead, you can prove the equivalent statement $\neg(\color\green{p\not|n})\implies\neg(\color\red{p|n^2+1})$:

$\small\neg(\color\green{p\not|n})\implies{p|n}\implies{p|n^2}\implies{\forall_{k\in(0,p)}:p\not|n^2+k}\implies{p\not|n^2+1}\implies\neg(\color\red{p|n^2+1})$.

BTW, this statement holds not only for every prime $p$, but also for every integer $p>1$.


# Defining the determinant of linear transformations as multilinear alternating form

Here is what our professor showed us in our linear algebra class to introduce the idea of determinants:

Suppose we have an $n$-dimensional vector space $V$. Then we can create a function from $V^n$ to $\mathbb{R}$ called $vol$ (for "volume") satisfying these properties:

$vol$ is multilinear
$vol$ is alternating (i.e. if any two of $v_1, \ldots, v_n$ are the same, then $vol(v_1, \ldots, v_n) = 0$)

From these two properties, we can see that if $e_1, \ldots, e_n$ is a basis of $V$, then the $vol$ function is completely defined by the value $vol(e_1, \ldots, e_n)$.

Thus if $T$ is a linear operator on $V$, the ratio:

$\dfrac{vol(Te_1, \ldots, Te_n)}{vol(e_1, \ldots, e_n)}$

is the same for any (multilinear and alternating) $vol$ function.

However, I am having trouble understanding why the ratio is also independent of the basis $e_1, \ldots, e_n$. This is what I am asking for help with. I can see that this invariance implies that intuitively, every $n$-parallelotope is stretched by the same amount by the operator $T$.

(Our professor then defined the determinant of $T$ as that ratio.)

-
Show that any two bases can be reached from each other by row operations and look at what row operations do to the volume. –  Qiaochu Yuan Jan 16 '11 at 2:04
Adding one row to another does not change the volume, while multiplying a row by a scalar changes the volume by that scalar factor. So if we go from $e_i$'s to another basis, say $f_i's$, then the ratio $vol(f_1, \ldots, f_n)/vol(e_1, \ldots, e_n)$ is the product of all the scalar multiplications. But I don't see why this is the same as $vol(Tf_1, \ldots, Tf_n)/vol(Te_1, \ldots, Te_n)$ –  Alan C Jan 16 '11 at 2:21
You are half way there. The point is that since $T$ is linear, it commutes with scalar multiplication. So if $f_1=\alpha e_1$ for a scalar $\alpha$, then $Tf_1 = \alpha Te_1$. –  Alex B. Jan 16 '11 at 5:10
Aha thanks! I wonder how I overlooked the linearity of $T$. Hm... but I'm also wondering if this could be done in a way similar to the Steinitz exchange lemma. Suppose we order the $e_i$'s and $f_i$'s so that for all $0 \leq k \leq n$, $f_1, \ldots, f_k, e_{k+1}, \ldots, e_n$ span $V$. Then we could go from $vol(Te_1, \ldots, Te_n)/vol(e_1, \ldots, e_n)$ to $vol(Tf_1, \ldots, Tf_n)/vol(f_1, \ldots, f_n)$, replacing one vector at a time. (And the reason the ratio stays the same is because $T$ is linearity.) –  Alan C Jan 16 '11 at 15:28
In light of my comments on a previous, closely related question: in case you were wondering, I am not teaching linear algebra this semester! –  Pete L. Clark Feb 15 '11 at 16:48

First note that since $T$ is linear, $\mathrm{vol}_T(v_1, \dots, v_n) = \mathrm{vol} (T v_1 , \dots , T v_n )$ is also a multilinear alternating function.

So if you go from $e_1, \dots , e_n$ to a different basis, say, $b_1, \dots b_n$, then you can write the $b_i$ in terms of their coordinates with respect to $e_1, \dots , e_n$:

$$b_1= \sum_{i=1}^n b_{i 1} \, e_i,\quad b_2= \sum_{i=1}^n b_{i 2} \, e_i,\quad\dots \quad b_n= \sum_{i=1}^n b_{i n} \, e_i.$$

And Leibniz's formula (which is a direct consequence of multinearity and alternating-ness), applied to both $\mathrm{vol}$ and $\mathrm{vol}_T$ tells us:

$$\mathrm{vol}(b_1 , \dots , b_n ) = \sum_{\sigma \in S_n} \text{sgn}(\sigma) \: b_{\sigma(1) 1} \cdots b_{\sigma(n) n} \cdot \mathrm{vol}(e_1, \dots , e_n)$$

$$\mathrm{vol} (T b_1 , \dots , T b_n ) = \sum_{\sigma \in S_n} \text{sgn}(\sigma) \: b_{\sigma(1) 1} \cdots b_{\sigma(n) n} \cdot \mathrm{vol}(T e_1, \dots , T e_n)$$

So if you take the ratio $\displaystyle \frac{\mathrm{vol} (T b_1 , \dots , T b_n )}{\mathrm{vol} (b_1 , \dots , b_n )}$ everything else cancels out and you're left with $\displaystyle \frac{\mathrm{vol} (T e_1 , \dots , T e_n )}{\mathrm{vol} (e_1 , \dots , e_n )}$ again.

Of course, for all of this, it is important that $\mathrm{vol} \neq 0$. That's probably an additional restriction your professor put on the $\mathrm{vol}$ function.

-


# If $p$ is prime and $p > 5$, show that when $p$ is divided by 10, the remainder is 1, 3, 7, or 9

If $p$ is prime and $p > 5$, show that when $p$ is divided by 10, the remainder is 1, 3, 7, or 9.

This is a problem from Hungerford's Abstract Algebra: An Introduction. I would like some help on it, it was an example in class. Thanks.

-
Consider the case when the remainder is 2. Then $p = 10 q + 2$ for some integer $q$, so that $p = 2 (5 q + 1)$ is even, but cannot be 2 by the assumption $p > 5$. The other cases are entirely similar, it is useful for you to work them out yourself. – Andreas Caranti Feb 1 '13 at 7:27
$p > 5$ prime means $p$ not divisible by $2$ or $5$. – Benjamin Dickman Feb 1 '13 at 8:26

By the division algorithm, we can write each $p$ as $$p = 10q + r$$ for some quotient $q$ and remainder $0\le r < 10$. As $p$ is prime, clearly $r\neq 0$. $r$ also cannot be even, otherwise $p$ is even. Finally, note that $r \neq 5$ or $5 \mid p$.

For a more brief and algebraic solution, note that $(p,\ 10) = 1$ implies that $p$ is a unit in $\mathbb{Z}/10\mathbb{Z}$. The units of the ring are precisely $1,\ 3,\ 7$ and $9$.

For completeness, you should probably show that there exists primes for each of the remaining congruence classes.

-

You already have a couple of nice ‘mathematical-looking’ answers. In attacking a question like this, though, you might want to start with simple, familiar facts.

The remainder when $p$ is divided by $10$ is simply the last digit of $p$. If the last digit of a number $n$ is $0,2,4,6$, or $8$, what kind of number is $n$? Can it be prime if it’s greater than $2$? If the last digit is $0$ or $5$, what can you say about $n$? Can it be prime and greater than $5$?

These are enough to tell you, at least informally, why the prime $p>5$ must end in $1,3,7$, or $9$, and now you can worry about explaining the reasoning in the previous paragraph a bit more formally.

-
Thank you for the tip, I was not sure how to best ask questions here but I'm learning and will remember that. – grayQuant Feb 1 '13 at 14:36

To say that a prime $p > 5$ gives a remainder of $1, 3, 7$ or $9$ when divided by $10$ is merely remarking that the prime is odd (and not $5$, since all integers ending in five are multiples thereof).

After all, the remainder when divided by $10$ is simply the unit of the number itself, and if that unit was any of $0, 2, 4, 6, 8$ we'd plainly see that it was an even number, and therefore not prime. Likewise with the five.

That said, we could come to the conclusion of your statement by, say, basing an argument on how all primes above $3$ are of the form $6n \pm 1$ (mind you, this follows from an argument akin to the above): the multiples of $6$ begin as follows: $$6, 12, 18, 24, 30\ldots$$ From which we father that the units of such multiples are either $0, 2, 4, 6$ or $8$. Now take the '$\pm 1$' bit into consideration and we find that we have the following units possible: $$1, 3, 5, 7, 9$$ (Remember, a remainder of $-1$ when divided by $10$ is equivalent to a remainder of $9$.)

So, much like the above, we disregard the $5$ since that certainly isn't prime, and we have $1, 3, 7, 9$ leftover, as desired.

-

you are looking for the unit digit of the prime.For prime $p\neq 2$, unit digit is odd which means $p\pmod {10}\in\{1,3,5,7,9\}$

Now, for any prime $p\gt 5$, unit git can't be $5$ otherwise it would be divisible by $5$ and hence won't be a prime.

Thus only possible candidates for unit digit of a prime $p\gt 5$ are $\{1,3,7,9\}$

-

This is clear from the Euclidean algorithm. Write the remainder $\rm\: r = (p\ mod\ 10).\:$ By Euclid

$$\rm p\equiv r\,\ (mod\ 10)\ \Rightarrow\ gcd(p,10) = gcd(r,10)$$

In particular,  when the  gcd $= 1,\,$ then: $\rm\,\ p\,$ is coprime to $10$ $\iff$ $\rm\,r\,$ is coprime to $10$

Now, by hypothesis, $\rm\, p\,$ is prime $> 5,\,$ so $\rm\, p\,$ is coprime to $10,\$ thus $\rm\ r\,$ is coprime to $10,\:$ so we infer that $\rm\,r\,$ is odd and coprime to $\,5,\:$ hence $\rm\:r\in \{1,3,7,9\},\,$ since the remainder $\rm\,r\in [0,9].$

Remark $\$ Ditto if we generalize $\rm\,10\,$ to any modulus $\rm\,m\!:\$ if prime $\rm\,p\nmid m\:$ then its remainder $\rm\, p\ mod\ m\,$ is one of the $\,\varphi(m)\,$ remainders coprime to $\rm\,m.\:$ Or, expressed in radix language:

$\quad$ in radix $\rm\,m\!:\$ if $\rm\,n\,$ has units digits $\rm\,r,\$ then $\rm\ n\,$ is coprime to $\rm\, m\iff r\,$ is coprime to $\rm\,m$

-


What is the “best” way to calculate the average of individual averages?

In preparing for GRE, I see questions looking for the mean of two or more individual means. Here is an example:

The average (arithmetic mean) of 100 measurements is 24, and the average of 50 additional measurements is 28

               Quantity A                          Quantity B
The average of the 150 measurements              26

A) Quantity A is greater.

B) Quantity B is greater.

C) The two quantities are equal.

D) The relationship cannot be determined from the information given.

My question regards the best way to determine the mean (average). I have found two methods that always basically solve it correctly, although the results differ by ~ 0.1.

One method is adding the weighted means: find sum of each sample, add the sums for a total sum, determine the proportion of each individual sum to the total sum to calculate the "weight", then add the products of each individual mean. In other words, Weighted mean = (proportion)(group A mean) + (proportion)(group B mean) + ....

So, to solve the example question: sum of Group A measurements = $100 \cdot 24 = 2400$ sum of Group B measurements = $50 \cdot 28 = 1400$ total sum = 3800 proportion of Group A to total = $2400 \div 3800 = 0.631579$ weighted mean of Group A = $24 \cdot 0.631579 = 15.157896$ proportion of Group B to total = $1400 \div 3800 = 0.368421$ weighted mean of Group B to total = $28 \cdot 0.368421 = 10.315788$ The average (mean) of the 150 measurements = 15.157896 + 10.315788 = 25.473684

The other method is to just divide the total sum by the 150 measurements, which is how a normal mean is calculated, to equal 25.333333.

Although both methods make B) the answer, they could be significantly different in other contexts. It seems to me that the first, weighted, method is better since it probably takes outliers, repeated measurement, etc. into account.

What is the "best" way to calculate the average of individual averages?

Your second method is correct and the mean is $25\frac 13$. The proportion in your first method should be the proportion of the measurements, not the proportion of the sum, so it would be $24\cdot \frac {100}{150}+28\cdot \frac {50}{150}=25\frac 13$, which agrees with the other.
The best way might be this: with $100$ sitting at $24$ and $50$ sitting at $28$, you need the balance point between the two. The balance point is closer to $24$ than to $28$, because there’s more mass sitting there. Therefore, it’s less than $26$.
If you want to be more precise, there’s half as much mass at $28$, so $28$ is twice as far away from the balance. You need the point “one third” of the way from $24$ to $28$, so that’s $24 + \frac43=25\frac13$.


# Are there an equal number of positive and negative numbers?

For every positive number there exists a corresponding negative number. Would that imply that the number of positive numbers is "equal" to the number of negative numbers? (Are they incomparable because they both approach infinity?)

• See Cardinality and Equinumerosity. Apr 10, 2017 at 7:16
• 'Equal number' when you talk about infinite sets means you can map one to one both ways, so yes there are an equal number of positive and negative 'numbers.'
– Arby
Apr 10, 2017 at 7:16
• Look up "Hilbert's hotel" to see an example how we compare infinite sizes, and the counterintuitive consequences that might have. Apr 10, 2017 at 7:17
• The two sets $\text{Pos}$ and $\text{Neg}$ are equinumerous because there exists a one-to-one correspondence (a bijection) between them. In this sense they are comparable also if both are infinite sets. Apr 10, 2017 at 7:18
• Define "equal". In the sense of cardinality, yes, there are "as many" positive numbers as negative, but then also as many positive integers as both positive and negative integers together, or as many positive integers as positive even integers.
– dxiv
Apr 10, 2017 at 7:22

If there is SOME function that gives a bijection between two sets, then these two sets are considered equally big. (Even if there is some other function between those two sets that is not onto/not 1-1). For example the set of multiples of 10 among positive integers being a proper subset of all positive integers seems to be "smaller". But we have a function $f(x)=10x$ providing bijection, and so they are considered to be of the same size (cardinality). In your case $g(x)=-x$ provides the bijection.

Yes, the existence of a one-to-one and onto mapping is exactly how equality of the size of sets (the technical term is "cardinality" is defined. The (cardinal) number of negative integers is the same as the cardinal number of positive integers, and the cardinal number of negative real numbers is the same as the cardinal number of positive real numbers.

Note however that there are more positive real numbers than positive integers, so not all infinite cardinalities are equal. The proof of that fact is done by Cantor's famous diagonal proof.

The word "infinity" is used in many places in maths and the definitions are not necessarily the same. Different symbols are used but there are still more definitions than symbols.

The most familiar symbol for infinity, $\infty$, is commonly used in calculus but it is more of a suggestive shorthand than an actual infinity. It is not normally used when discussing sizes of sets.

When discussing the size of sets, the term cardinality is usual. Clearly, normal counting won't work for infinite sets. However, as others have said, it is possible to say whether or not two sets have the same cardinality / are the same size. If a bijection (one to one and onto map) between them exists then they have the same cardinality. One counter-intuitive property of infinite sets is that it is possible that a map which is one to one and not onto exists as well one that is one to one and onto. So, the existence of a map that is one to one but not onto does not prove that one set is smaller. For that, you would also need to prove that no other map that is one to one and onto exists. The simplest example of this is the set of all natural numbers and just the even ones. Intuitively, the set of even numbers is smaller and there is an obvious map from the even natural numbers to a subset of the natural numbers. However, there is also a map between them which is one to one and onto hence they actually have the same cardinality.

By definition, a set which has a one to one and onto map to the natural numbers is called "countable". This is not countable in the day to day sense but it does mean that you could name one per second and (*), although you would not ever finish, you would name any particular one in a finite time.

(*) Assuming that you and the universe were immortal.

Many sets of intuitively different sizes are countable, for example the integers $\Bbb{Z}$, the rational numbers $\Bbb{Q}$ and the algebraic numbers $\Bbb{A}$. This cardinality / size is named countable and the symbol $\aleph_0$ is used. This is called "aleph null", "aleph naught", or "aleph zero". Aleph is the first letter of the Hebrew alphabet.

However, even though many sets which are intuitively bigger turn out to be the same size, bigger sets exist. It can be proved that there is no one to one and onto map from the natural numbers to the set of real numbers $\Bbb{R}$ so that it is bigger. Again, some apparently bigger sets are not actually bigger. For example $\Bbb{C}$, $\Bbb{R^2}$, and $\Bbb{R^3}$ are the same cardinality as $\Bbb{R}$.

Even bigger sets exist, the set of all subsets of $\Bbb{R}$ is bigger than $\Bbb{R}$. There is no biggest set.

A particularly interesting question is whether $\Bbb{R}$ is the next biggest cardinality after the countable infinity of $\Bbb{N}$. This is called the "Continuum Hypothesis". My answer is already long enough so I won't talk about that but if you are interested in this subject then you should look it up.

Finally, there is yet another type of infinity called "ordinal numbers". In this sense, the first infinity is usually written as $\omega$ and, unlike the cardinal infinities, $\omega + 1$ is different.

The notion of "counting" is made precise in mathematics by using functions. These functions are bijections. To "count" the elements in a set $X$, you establish a bijection from $X$ to a subset of the natural numbers $\mathbb{N}$.

Example. How many elements does the set $\{a, b, c\}$ have? The answer is 3, because there exists a bijection from $\{a, b, c\}$ to $\{0, 1, 2\}$. (Actually, there exist $3!$ bijections.)

So, certain subsets of $\mathbb{N}$ are, somehow, "measuring sticks", which you can use the gauge the size of other sets.

Using sets and functions allows one to generalize the idea of "counting" to infinite sets. The "measuring sticks" then become transfinite numbers (more precisely, cardinal numbers).

To answer your question, there is an equal number of positive and negative numbers, because there exists a bijection between these two sets. If by "number" you mean "integer", then this number is called aleph null. It's the smallest infinite cardinal.

Bonus: Using these ideas, you can show that the "amount" of (say) positive integers and the "amount" of integers is the same, or that the "amount" of even integers and the "amount" of prime numbers is the same.

There are exactly the same ones.

For each positive number there is one and only one negative,

And for each negative number there is one and only one positive,

So that both sets have the same cardinal.

There is a bijective function of the set of positive numbers to the set of negative numbers.


# Apostol Bolzano-Weierstrass Theorem

Theorem. If a bounded set $S$ in $\mathbb{R}^n$ contains infinitely many points, then there is at least one point in $\mathbb{R}^n$ which is an accumulation point of $S$.

Proof. (for $\mathbb{R}^1$) Since $S$ is bounded, it lies in some interval $[−a,a]$. At least one of the subintervals $[−a,0]$ or $[0,a]$ contains an infinite subset of $S$. Call one such subinterval $[a_1,b_1]$. Bisect $[a_1,b_1]$ and obtain a subinterval $[a_2,b_2]$ containing an infinite subset of $S$, and continue this process. In this way a countable collection of intervals is obtained, the $nth$ interval $[a_n,b_n]$ being of length $b_n -a_n = a/2^{n-1}$. Clearly the $\sup$ of the left endpoints $a_n$ and the $\inf$ of the right endpoints $b_n$ must be equal, say to $x$. The point $x$ will be an accumulation point of $S$ because, if $r$ is any positive number, the interval $[a_n,b_n]$ will be contained in $B(x;r)$ as soon as $n$ is large enough so that $b_n−a_n<r/2$. The interval $B(x;r)$ contains a point of $S$ distinct from $x$ and hence $x$ is an accumulation point of $S$.

My Questions

1. Why is it obvious that the $\sup$ of the left endpoint $a_n$ is equal to the $\inf$ of the right endpoint $b_n$? Also how does one consider the $\sup$ or $\inf$ of a single number?
2. I don't understand why we need $b_n−a_n<r/2$. Instead, why do we need to halve $r$? If $b_n−a_n<r$ then wouldn't $[a_n,b_n]$ still be contained in $B(x;r)$?
• Yes, you're correct that if $b_n-a_n<r$, then $[a_n,b_n]\subset B(x;r)$. For $b_n-x\le b_n-a_n$ and, similarly, $x-a_n\le b_n-a_n$. – Ted Shifrin Aug 22 '16 at 5:36
• Since $[a_{n+1},b_{n+1}]$ is a subinterval of $[a_n,b_n]$ by construction, the sequences $a_n$ and $b_n$ are (bounded and) decreasing and increasing, respectively, so $\lim_n a_n=\sup_n a_n$ and $\lim_n b_n=\inf b_n$. Since $|b_n-a_n|=a/2^{n-1}$, we have $\lim_n b_n-a_n=0$ and so $\lim_n a_n=\lim_n b_n$. (We do not consider $\sup$ and $\inf$ of single points, but range over all $n$.) – Luiz Cordeiro Aug 22 '16 at 15:39

He means $\sup\{a_n : n \in \mathbb N\}$, not the supremum of the single point $a_n$.

Note that $a_n$ is an increasing sequence, and $b_n$ is decreasing. Both sequences are bounded, because $[a_n,b_n] \subset [a_1,b_1]$ for every $n$. Therefore they both converge (specifically, $a_n$ converges to its supremum, and $b_n$ converges to its infimum). As the distance $b_n - a_n$ is shrinking to zero, they must converge to the same limit.

I assume he halves $r$ because his ball $B(x;r)$ is open, so not quite large enough to contain a closed interval of length $r$ if one of the endpoints of the interval is $x$.

Edit: actually, he used a strict inequality $b_n - a_n < r/2$, so indeed he could have used $b_n - a_n < r$.

• Thank you very much, You guys are fantastic! – Jonathan Duran Aug 23 '16 at 0:05

Apostol wrote "the endpoints" instead of "the endpoint". So your first question is solved by observing that he was saying $$\sup_{n \geq 1\ (\text{say})}a_{n} = \sup \{ a_{n} \mid n \geq 1 \} = \inf \{ b_{n} \mid n \geq 1 \} = \inf_{n \geq 1}b_{n}.$$

For the second question, that part of the proof does not imply anything that is a must. That choice of an upper bound for $b_{n}-a_{n}$ where $n >> 1$ is to show the reader that we do can do so-and-so.

• So the proof would have been fine if we chose $r$ instead of $r/2$? Thank you for your response! – Jonathan Duran Aug 23 '16 at 0:04
• Yes, it would also be fine. – Megadeth Aug 23 '16 at 1:40


# What's the size of the biggest set of numbers from 1 to 100 so that no number is the average of any other two?

John wants to build a set of numbers, from the range of 1 to 100. The only rule is that in that set no number can be the average of any other two. For example, if the set contains the numbers 1 and 3, then 2 cannot be present. What’s the size of the biggest set that John can build?

More precisely, if L is "John's set", then $$\forall x,y,z \in L : z \ne \frac{x+y}{2}$$ and $$\forall x \in L : 1 \leq x \leq 100$$

We want to find the cardinality of L.

PS: This problem appeared on a Sunday newspaper many years ago. On the following week they published a solution that was wrong. I was able to solve it computationally but never mathematically.

You can solve the problem via integer linear programming as follows. Let $$n=100$$. For $$i\in\{1,\dots,n\}$$, let binary decision variable $$x_i$$ indicate whether $$i\in L$$. The problem is to maximize $$\sum_{i=1}^n x_i$$ subject to $$x_i + x_{i+d} + x_{i+2d} \le 2 \quad \text{for i\in\{1,\dots,n-2\} and d\in\{1,\dots,\lfloor(n-i)/2\rfloor\}}.$$ The optimal objective value turns out to be $$27$$, attained by $$L=\{1,5,7,10,11,14,16,24,26,29,30,33,35,39,66,70,72,75,76,79,81,89,91,94,95,98,100\}.$$

See https://oeis.org/A003002 for more terms. Such a set is called a Salem-Spencer set, and asymptotic bounds are known for the largest cardinality.

• Very nice. Just out of curiosity, did you just write the program on the fly? When I look at the constraint, my first thought is that $2^{(100)} \approx 10^{(30)}$ is too many cases. My pc balks at more than $(10)^8$ cases. Did you find a way to streamline the code? For example, did you experiment with $V =$ value and increment $V$ by $(+1)$, checking each value, and discovering that $V = 27$ is attainable and $V = 28$ is not? May 25 at 23:26
• @asinomás can you undelete your answer? I think including it makes for an interesting comparison getween the greedy and optimal algorithms. May 25 at 23:30
• @user2661923 I used a generic ILP solver that uses the branch-and-cut algorithm, not brute force. May 25 at 23:53
• @OscarLanzi I agree with you and just voted to undelete the answer. asinomas was not flagged by your comment because he has not been registered for RobPratt's answer. One alternative is for you to track down any posting/answer that asinomas is registered for, and leave your comment request, addressed to him, there. Naturally, you will need to include a link back to this posting. May 25 at 23:57
• Very nice. The answer is indeed 27 (for N=100). In my case, I had used dynamic programming to find the sets. The reason I keep looking at this problem after all these years is that although I was able to prove a few properties/theorems about the cardinality of L, I was never able to solve it in a more "mathematical" way. I.e., for a certain size of N, is there an expression for #L? May 26 at 9:26

A greedy algorithm would hive an answer of $$24$$, as given by the "Erdos-Szekeres" sequence here: http://oeis.org/A003278 .

But, as demonstrated by RobPratt, and as often happens in analysis, the greedy algorithm is ultimately not the optimal one. It's as if you overuse an initially fertile soil, exhaust its nutrients and then you find you can't grow crops until you give time for rains to fall and the soil to replenish itself. Let's explore why greed turned out not good in this case.

Welcome to the desert

Suppose you have a list of whole numbers, with a minimum of $$1$$ and a maximum of $$n$$, such that there is not a group of three in arithmetic sequence. Then the arithmetic third of any pair of numbers from this list cannot be larger than $$2n-1$$, and so you can always insert the number $$2n$$ and be sure there is still no three-term arithmetic sequence.

If, in fact, you do need to resort to $$2n$$ to continue your list -- that is, no smaller number will do -- then you have in effect created a "desert". The presence of such deserts can make you fall behind a more carefully tended, more optimal sequence. And that is what happened here.

Upon further review, the Erdos-Szekeres sequence, constructed to take as small a number as possible at any step, is equally optimal at producing deserts. A number $$k$$ enters this sequence iff the ternary representation of $$k-1$$ has no elements of $$2$$, for instance eleven minus one is ten, which is $$101$$ in base $$3$$, so ten is in the sequence. But once we get to fourteen in this case, where one less is $$111$$ base $$3$$, we are forced to accept a $$2$$ somewhere in the ternary representation until we have passed the next power of $$3$$, in this case at $$28$$, where we can introduce a new ternary "digit". We build in a desert from $$n=(3^m+1)/2$$ all the way up to $$2n=3^m+1$$ for every whole number $$m$$. In this problem the desert from $$41$$ to $$82$$ ($$m=4$$) renders the greedy algorithm inferior.

Finding an oasis

Of course, we can change the rules of our game to make the greedy algorithm look good. If, instead of an upper bound of $$100$$, we were to choose an upper bound of $$(3^m+1)/2$$ for some whole number $$m$$ -- stopping just at the threshold of the desert -- then the Erdos-Szekeres method really does work. For instance, with a maximum of $$(3^5+1)/2=122$$ the Erdos-Szekeres method gives $$32$$ terms and that is indeed the optimum for a max element of $$122$$. See https://oeis.org/A065825.

• The description of the sequence seems to say that this is the result of the greedy approach (build a sequence from $1, 2, \ldots$ by choosing the next smallest valid number), which might not be optimal as RobPratt's answer suggests. May 25 at 23:15
• @angryavian Nice catch, I missed that. I deleted my comment. May 25 at 23:15
• I was k-c-u-f-ed (read it backwards) by Autocorrect. Forced to rephrase that passage. Please try again. May 26 at 0:59
• @OscarLanzi This time, when you reply, please include the AT:user2661923, so that I will be flagged. Perhaps I am being dense here. I don't understand this sentence: "Then the arithmetic third of any pair of numbers from this list cannot be larger than 2n−1, and so you can always insert the number 2n and be sure there is still no three-term arithmetic sequence." In this sentence, what is $n$, and what pair of numbers are you referring to? Are you, for example saying that if you take an optimal list, and append the number $(200)$ to it, that no constraint has been violated? May 26 at 1:08
• @OscarLanzi Okay. I skimmed your analysis. I am going t have to study it further, which will take at least a few days. I have bookmarked this posting, for reference. For what it's worth, I was also intrigued by Rob Pratt's reference to a branch and cut algorithm, re integer linear programming. May 26 at 1:23


# how to find probalility that a student misses at least one test if he/she is absent twice?

The probability that a teacher will give an unannounced test during any class is $$\dfrac15$$. If a student is absent twice then probability that he/she misses at least one test is

$$\\ \hspace{5cm}$$ a) $$\dfrac23\ \quad$$ b) $$\dfrac45\ \quad$$c) $$\dfrac7{25}\ \quad$$d) $$\dfrac9{25}\$$

My attempt:

Probability of attending first test & missing $$2$$nd test $$=\dfrac45\times\dfrac15=\dfrac4{25}$$

Probability of missing first test & attending $$2$$nd test $$=\dfrac15\times\dfrac45=\dfrac4{25}$$

Probability of missing both the tests $$=\dfrac15\times\dfrac15=\dfrac1{25}$$

Total probability of missing at least one test $$=\dfrac4{25}+\dfrac4{25}+\dfrac1{25}=\dfrac9{25}$$

• Yes, you are correct. Notice, a simple method is $$P_{\text{ Missing atleast one test }} = 1- P_{\text{ Missing no test }} = 1-(\frac{4}{5})^2=\frac{9}{25}$$
– user371838
Dec 10, 2017 at 15:42

Questions with "at least" are often great candidates for using the complement. That is: $$P_{\text{ Event A occurs }} = 1 - P_{\text{ Event A does not occur }}$$

So, $P_{\text{ miss at least 1 test }} = 1 - P_{\text{ miss no tests }}$ giving us:

\begin{align*} P_{\text{ miss no tests }} & = P_{\text{ no test on day 1 AND no test on day 2 }}\\ & = P_{\text{ no test on day 1 }} \times P_{\text{ no test on day 2 }}\\ & = \frac{4}{5} \times \frac{4}{5}\\ & = \frac{16}{25}\end{align*}

So, $$P_{\text{ miss at least 1 test }} = 1 - P_{\text{ miss no tests }} = 1 - \frac{16}{25} = \frac{9}{25}$$

Another way to see this is that the probability of the student missing at least one test is the probability of missing test 1 + the probability of missing test 2 - the probability of them missing both tests.

The student has $\frac15$chance of missing the first test, and $\frac15$ chance of missing the second test. If you add them up you're left with $\frac 25$. HOWEVER there is a case that is being counted twice: It could happen that the student misses test 1 AND test 2. That case is being counted both when the student misses test 1 and when the student misses test 2. So now we have to substract this case once

The chance of a test happening on two consecutive days is $(\frac 15)^2 = \frac {1} {25}$.

So the answer is $\frac 25 - \frac {1} {25} = \frac {9} {25}$

The general case for this is $$P(A \cup B) = P(A) + P(B) - P(A \cap B)$$


# Math Help - Half right, missed the other half...

1. ## Half right, missed the other half...

"Find all values of $r$ such that the slope of the line through the points $(r, 4)$ and $(1, 3 - 2r)$ is less than 5."

I solved it by first finding the slope $\frac {2r + 1}{r - 1} = 5$ which simplifies to $r = 2$. Then I used the point-slope form to derive the equation $y = 5x + 16$. Then, I got lazy, and plugged in a couple of test numbers into the equation, found that numbers above 2 seemed to qualify, and decided that the answer was the set $(2, \infty)$. Unfortunately, the answer should have included also the set $(-\infty, 1)$.

Algebraically, what should I have done to get to that answer? What part did I skip?

2. Hello, earachefl!

Find all values of $r$ such that the slope of the line
through the points $A(r,\,4)$ and $B(1,\,3\!-\!2r)$ is less than 5.
You should have solved the inequality . . . tricky, but safe.

You found the slope of $AB$ . . . good!

. . Then we have: . $\frac{2r + 1}{r - 1} \:<\:5$ . [1]

I'd like to multiply both sides by $(r-1)$
. . but the result depends on whether $(r-1)$ is positive or negative.

Recall: when multiplying or dividing an inequality by a negative quantity,
. . . . . .reverse the inequality.

Suppose $(r-1)$ is positive . . . that is: . $r > 1$

Multiply [1] by by positive $(r-1)\!:\;\;2r + 1 \:<\:5(r - 1)$

. . $2r + 1 \:<\:5r-5\quad\Rightarrow\quad -3r \:<\:-6$

Divide both sides by -3: . $r \:>\:2$

We have two inequalities to satisfy: . $r > 1$ and $r > 2$

We take the "stronger" of the two: . $\boxed{r > 2}$

Suppose $(r-1)$ is negative . . . that is: . $r < 1$

Multiply [1] by negative $(r-1)\!:\;\;2r + 1 \;\;{\color{red}>} \;\;5(r-1)$

. . $2r + 1 \:>\:5r - r\quad\Rightarrow\quad -3r \:>\:-6$

Divide both sides by -3: . $r \:<\:2$

We have two inequalities to satisfy: . $r < 1$ and $r < 2$

We take the "stronger" of the two: . $\boxed{r < 1}$

Therefore: . $(r < 1) \vee (r > 2)$ .. . . .or: . $(-\infty,\,1) \,\cup \,(2,\,\infty)$

3. Originally Posted by Soroban
Hello, earachefl!

We have two inequalities to satisfy: . $r < 1$ and $r < 2$

We take the "stronger" of the two: . $\boxed{r < 1}$
Interesting approach. I don't think my book ever put it in quite these terms.

Thanks!


Eigenvalues of a 5x5 matrix

1. May 15, 2010

gabriels-horn

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

3. The attempt at a solution
I haven't tackled anything bigger than a 3x3 matrix. Anyone have any good pointers for reducing this matrix? I'm assuming the quickest way is still going to be the cofactor method?

2. May 15, 2010

cronxeh

Its an upper triangular matrix, so eigenvalues are pretty much on the diagonal here, they are all 2. Taking the determinant yields (2-lambda)^5, setting (2-lambda)^5=0, you get lambda1=lambda2=lambda3=lambda4=lambda5=2.

3. May 15, 2010

Landau

No need to calculate, only to think

The matrix is upper-triangular, what does this immediately tell you about the eigenvalues?

4. May 16, 2010

gabriels-horn

Ok, the discussion about the eigenvalues being the main diagonal values is clear. If the five eigenvalues are = 2, then plugging that value into the eigenvector matrix leaves only the one values in the 5x5 matrix above. Setting the matrix = 0 only leaves the eigenvector = 0; how are there then three linearly independent eigenvectors. What am I overlooking?

5. May 16, 2010

ninty

By definition an eigenvector cannot be the zero vector.
I'm assuming you're using the usual methods I see undergraduates use, (A-xI) = 0
If we represent vectors as (x1,x2,x3,x4,x5) we get x2=0, x5=0
Then solving for x1,x3,x4 we can get 3 linearly independent vectors which form a basis for null(A-xI)

An easy one would be to take 3 vectors from the usual basis.
However the question doesn't really ask for the eigenvectors, just show that they do exist.

6. May 16, 2010

Landau

There are three Jordan Blocks corresponding to eigenvalue 2, so its geometric multiplicity is 3.

7. May 16, 2010

HallsofIvy

Staff Emeritus
From the definition of "eigenvector", if v is an eigenvector with eigenvalue 2, then
$$\begin{bmatrix}2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 2 & 0 & 0 \\ 0 & 0 & 0 & 2 & 1 \\ 0 & 0 & 0 & 0 & 2\end{bmatrix}\begin{bmatrix}u \\ v \\ x \\ y \\ z\end{bmatrix}= \begin{bmatrix}2u+ v \\ 2v \\ 2x \\ 2y+ z \\ 2z\end{bmatrix}= \begin{bmatrix} 2u \\ 2v \\ 2x \\ 2y \\ 2z \end{bmatrix}$$

which gives the equations 2u+ v= 2u, 2v= 2v, 2x= 2x, 2y+ z= 2y, 2z= 2z. The first equation tells us that v= 0 and the fourth equation that z= 0. But u, x, and y can be any numbers.

Last edited: May 17, 2010
8. May 16, 2010

gabriels-horn

Yes, the (A-xI) = 0 method is the one I used and got x2 = 0 and x5 = 0. How can you solve for x1, x3 and x4 when they are multiplied by zero? Wouldn't that also make them zero?

This isn't something that we went over in Linear or ODE, can you expand on this thought some more?

9. May 16, 2010

gabriels-horn

You just put [/math] on the end instead of [/tex] and I took the zero out of the variable column. That's what I was confused on, the fact that x1, x3 and x4 could be any value. I just assumed that they were also zero since putting 2-2 = 0 for the eigenvector only left the two 1's in the matrix corresponding to x2 = 0 and x5 = 0. Thank you guys for the insight and provoding a good matrix template for future use.

Last edited: May 16, 2010
10. May 16, 2010

Landau

Whatever values they have, they get multiplied by zero resulting in zero, so it doesn't matter what they are. In other words, you are free to choose x1, x3 and x4, which means you can form three linearly independent eigenvectors (e.g. taking x1, x3, x4 equal to 1,0,0, equal to 0,1,0, equal to 0,0,1, gives you three independent eigenvectors.)
Your matrix is already in Jordan Normal Form. The number of Jordan blocks corresponding to a given eigenvalue coincides with the geometric multiplicity of that eigenvalue. In this case there are three such blocks for eigenvalue 2.

11. May 16, 2010

gabriels-horn

So the Jordan block is essentially dependent on the 1 values of the superdiagonal, and since x1, x3 and x4 have no entries above them on the superdiagonal, the number of Jordan blocks is equal to 3?

12. May 17, 2010

HallsofIvy

Staff Emeritus
No, multiplying x1 by 0 does NOT make x1 0, it makes the product 0. All that means is that you don't have that variable in that particular equation.


Categories

## Number of points and planes | AIME I, 1999 | Question 10

Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1999 based on Number of points and planes.

## Number of points and planes – AIME I, 1999

Ten points in the plane are given with no three collinear. Four distinct segments joining pairs of three points are chosen at random, all such segments being equally likely.The probability that some three of the segments form a triangle whose vertices are among the ten given points is $\frac{m}{n}$ where m and n are relatively prime positive integers, find m+n.

• is 107
• is 489
• is 840
• cannot be determined from the given information

Number of points

Plane

Probability

## Check the Answer

Answer: is 489.

AIME I, 1999, Question 10

Geometry Vol I to IV by Hall and Stevens

## Try with Hints

$10 \choose 3$ sets of 3 points which form triangles,

fourth distinct segment excluding 3 segments of triangles=45-3=42

Required probability=$\frac{{10 \choose 3} \times 42}{45 \choose 4}$

where ${45 \choose 4}$ is choosing 4 segments from 45 segments

=$\frac{16}{473}$ then m+n=16+473=489.

Categories

## Sequence and fraction | AIME I, 2000 | Question 10

Try this beautiful problem from the American Invitational Mathematics Examination, AIME, 2000 based on Sequence and fraction.

## Sequence and fraction – AIME I, 2000

A sequence of numbers $x_1,x_2,….,x_{100}$ has the property that, for every integer k between 1 and 100, inclusive, the number $x_k$ is k less than the sum of the other 99 numbers, given that $x_{50}=\frac{m}{n}$, where m and n are relatively prime positive integers, find m+n.

• is 107
• is 173
• is 840
• cannot be determined from the given information

Equation

Algebra

Integers

## Check the Answer

Answer: is 173.

AIME I, 2000, Question 10

Elementary Number Theory by Sierpinsky

## Try with Hints

Let S be the sum of the sequence $x_k$

given that $x_k=S-x_k-k$ for any k

taking k=1,2,….,100 and adding

$100S-2(x_1+x_2+….+x_{100})=1+2+….+100$

$\Rightarrow 100S-2S=\frac{100 \times 101}{2}=5050$

$\Rightarrow S=\frac{2525}{49}$

for $k=50, 2x_{50}=\frac{2525}{49}-50=\frac{75}{49}$

$\Rightarrow x_{50}=\frac{75}{98}$

$\Rightarrow m+n$=75+98

=173.

Categories

## Finding smallest positive Integer | AIME I, 1996 Problem 10

Try this beautiful problem from the American Invitational Mathematics Examination, AIME I, 1996 based on Finding the smallest positive Integer.

## Finding smallest positive Integer – AIME I, 1996

Find the smallest positive integer solution to $tan19x=\frac{cos96+sin96}{cos96-sin96}$.

• is 107
• is 159
• is 840
• cannot be determined from the given information

Functions

Trigonometry

Integers

## Check the Answer

Answer: is 159.

AIME I, 1996, Question 10

Plane Trigonometry by Loney

## Try with Hints

$\frac{cos96+sin96}{cos96-sin96}$

=$\frac{sin(90+96)+sin96}{sin(90+96)-sin96}$

=$\frac{sin186+sin96}{sin186-sin96}$

=$\frac{sin(141+45)+sin(141-45)}{sin(141+45)-sin(141-45)}$

=$\frac{2sin141cos45}{2cos141sin45}$

=tan141

here $tan(180+\theta)$=$tan\theta$

$\Rightarrow 19x=141+180n$ for some integer n is first equation

multiplying equation with 19 gives

$x \equiv 141\times 19 \equiv 2679 \equiv 159(mod180)$ [since 2679 divided by 180 gives remainder 159]

$\Rightarrow x=159$.

Categories

## Roots of Equation and Vieta’s formula | AIME I, 1996 Problem 5

Try this beautiful problem from the American Invitational Mathematics Examination, AIME, 1996 based on Roots of Equation and Vieta’s formula.

## Roots of Equation and Vieta’s formula – AIME I, 1996

Suppose that the roots of $x^{3}+3x^{2}+4x-11=0$ are a,b and c and that the roots of $x^{3}+rx^{2}+sx+t=0$ are a+b,b+c and c+a, find t.

• is 107
• is 23
• is 840
• cannot be determined from the given information

### Key Concepts

Functions

Roots of Equation

Vieta s formula

## Check the Answer

Answer: is 23.

AIME I, 1996, Question 5

Polynomials by Barbeau

## Try with Hints

With Vieta s formula

$f(x)=x^{3}+3x^{2}+4x-11=(x-a)(x-b)(x-c)=0$

$\Rightarrow a+b+c=-3$, $ab+bc+ca=4$ and $abc=11$

Let a+b+c=-3=p

here t=-(a+b)(b+c)(c+a)

$\Rightarrow t=-(p-c)(p-a)(p-b)$

$\Rightarrow t=-f(p)=-f(-3)$

$t=-[(-3)^{3}+3(-3)^{2}+4(-3)-11]$

=23.

Categories

## Tetrahedron Problem | AIME I, 1992 | Question 6

Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1992 based on Tetrahedron.

## Tetrahedron Problem – AIME I, 1992

Faces ABC and BCD of tetrahedron ABCD meet at an angle of 30,The area of face ABC=120, the area of face BCD is 80, BC=10. Find volume of tetrahedron.

• is 107
• is 320
• is 840
• cannot be determined from the given information

Area

Volume

Tetrahedron

## Check the Answer

Answer: is 320.

AIME I, 1992, Question 6

Coordinate Geometry by Loney

## Try with Hints

Area BCD=80=$\frac{1}{2} \times {10} \times {16}$,

where the perpendicular from D to BC has length 16.

The perpendicular from D to ABC is 16sin30=8

[ since sin30=$\frac{perpendicular}{hypotenuse}$ then height = perpendicular=hypotenuse $\times$ sin30 ]

or, Volume=$\frac{1}{3} \times 8 \times 120$=320.

Categories

## Triangle and integers | AIME I, 1995 | Question 9

Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1995 based on Triangle and integers.

## Triangle and integers – AIME I, 1995

Triangle ABC is isosceles, with AB=AC and altitude AM=11, suppose that there is a point D on AM with AD=10 and $\angle BDC$=3$\angle BAC$. then the perimeter of $\Delta ABC$ may be written in the form $a+\sqrt{b}$ where a and b are integers, find a+b.

• is 107
• is 616
• is 840
• cannot be determined from the given information

Integers

Triangle

Trigonometry

## Check the Answer

Answer: is 616.

AIME I, 1995, Question 9

Plane Trigonometry by Loney

## Try with Hints

Let x= $\angle CAM$

$\Rightarrow \angle CDM =3x$

$\Rightarrow \frac{tan3x}{tanx}=\frac{\frac{CM}{1}}{\frac{CM}{11}}$=11 [by trigonometry ratio property in right angled triangle]

$\Rightarrow \frac{3tanx-tan^{3}x}{1-3tan^{2}x}=11tanx$

solving we get, tanx=$\frac{1}{2}$

$\Rightarrow CM=\frac{11}{2}$

$\Rightarrow 2(AC+CM)$ where $AC=\frac{11\sqrt {5}}{2}$ by Pythagoras formula

=$\sqrt{605}+11$ then a+b=605+11=616.

Categories

## Sequence and greatest integer | AIME I, 2000 | Question 11

Try this beautiful problem from the American Invitational Mathematics Examination, AIME, 2000 based on Sequence and greatest integer.

## Sequence and greatest integer – AIME I, 2000

Let S be the sum of all numbers of the form $\frac{a}{b}$,where a and b are relatively prime positive divisors of 1000, find greatest integer that does not exceed $\frac{S}{10}$.

• is 107
• is 248
• is 840
• cannot be determined from the given information

Equation

Algebra

Integers

## Check the Answer

Answer: is 248.

AIME I, 2000, Question 11

Elementary Number Theory by Sierpinsky

## Try with Hints

We have 1000=(2)(2)(2)(5)(5)(5) and $\frac{a}{b}=2^{x}5^{y} where -3 \leq x,y \leq 3$

sum of all numbers of form $\frac{a}{b}$ such that a and b are relatively prime positive divisors of 1000

=$(2^{-3}+2^{-2}+2^{-1}+2^{0}+2^{1}+2^{2}+2^{3})(5^{-3}+5^{-2}+5^{-1}+5^{0}+5^{1}+5^{2}+5^{3})$

$\Rightarrow S= \frac{(2^{-3})(2^{7}-1)}{2-1} \times$ $\frac{(5^{-3})(5^{7}-1)}{5-1}$

=2480 + $\frac{437}{1000}$

$\Rightarrow [\frac{s}{10}]$=248.

Categories

## Series and sum | AIME I, 1999 | Question 11

Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1999 based on Series and sum.

## Series and sum – AIME I, 1999

given that $\displaystyle\sum_{k=1}^{35}sin5k=tan\frac{m}{n}$ where angles are measured in degrees, m and n are relatively prime positive integer that satisfy $\frac{m}{n} \lt 90$, find m+n.

• is 107
• is 177
• is 840
• cannot be determined from the given information

Angles

Triangles

Side Length

## Check the Answer

Answer: is 177.

AIME I, 2009, Question 5

Plane Trigonometry by Loney

## Try with Hints

s=$\displaystyle\sum_{k=1}^{35}sin5k$

s(sin5)=$\displaystyle\sum_{k=1}^{35}sin5ksin5=\displaystyle\sum_{k=1}^{35}(0.5)[cos(5k-5)-cos(5k+5)]$=$\frac{1+cos5}{sin5}$

$=\frac{1-cos(175)}{sin175}$=$tan\frac{175}{2}$ then m+n=175+2=177.

Categories

## Inscribed circle and perimeter | AIME I, 1999 | Question 12

Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1999 based on Inscribed circle and perimeter.

## Inscribed circle and perimeter – AIME I, 1999

The inscribed circle of triangle ABC is tangent to AB at P, and its radius is 21 given that AP=23 and PB=27 find the perimeter of the triangle

• is 107
• is 345
• is 840
• cannot be determined from the given information

Inscribed circle

Perimeter

Triangle

## Check the Answer

Answer: is 345.

AIME I, 1999, Question 12

Geometry Vol I to IV by Hall and Stevens

## Try with Hints

Q tangency pt on AC, R tangency pt on BC AP=AQ=23 BP=BR=27 CQ=CR=x and

$s \times r =A$ and $s=\frac{27 \times 2+23 \times 2+x \times 2}{2}=50+x$ and A=$({(50+x)(x)(23)(27)})$ then from these equations 441(50+x)=621x then x=$\frac{245}{2}$

perimeter 2s=2(50+$\frac{245}{2}$)=345.

Categories

## LCM and Integers | AIME I, 1998 | Question 1

Try this beautiful problem from the American Invitational Mathematics Examination, AIME, 1998 based on LCM and Integers.

## Lcm and Integer – AIME I, 1998

Find the number of values of k in $12^{12}$ the lcm of the positive integers $6^{6}$, $8^{8}$ and k.

• is 107
• is 25
• is 840
• cannot be determined from the given information

Lcm

Algebra

Integers

## Check the Answer

Answer: is 25.

AIME I, 1998, Question 1

Elementary Number Theory by Sierpinsky

## Try with Hints

here $k=2^{a}3^{b}$ for integers a and b

$6^{6}=2^{6}3^{6}$

$8^{8}=2^{24}$

$12^{12}=2^{24}3^{12}$

lcm$(6^{6},8^{8})$=$2^{24}3^{6}$

$12^{12}=2^{24}3^{12}$=lcm of $(6^{6},8^{6})$ and k

=$(2^{24}3^{6},2^{a}3^{b})$

=$2^{max(24,a)}3^{max(6,b)}$

$\Rightarrow b=12, 0 \leq a \leq 24$

$\Rightarrow$ number of values of k=25.


# Are these linear algebra questions true or false?

Which of the following are true or false?

(a) Let $$H$$ be a five-dimensional subspace of the ten-dimensional vector space $$V$$. Then, every set containing seven vectors from $$H$$ must be linearly dependent.

(b) Let $$\mathcal{B}$$ be a basis of $$\mathbb{R}^{n}$$. Let $$A$$ be a the matrix whose columns are the vectors in $$\mathcal{B}$$. Then, for every vector $$x \in \mathbb{R}^{n}$$, it is true that $$[x]_{\mathcal{B}} = Ax$$.

(c) The dimension of the vector space $$\mathbb{P}_{4}$$ is $$4$$.

(d) Let $$A$$ be a $$3\times 3$$ matrix, and let $$H$$ be the set of fixed vectors of $$A$$, that is, the set of $$x \in \mathbb{R}^{3}$$ for which $$Ax = x$$. Then $$H$$ is a subspace of $$\mathbb{R}^{3}$$.

I think (a) is false, but I don't really have a reason why. I think this is true because if you have an $$n$$-dimensional space, you only need $$n$$ linearly independent ones to span the space.

I think (b) is true since it looks like a definition I saw in my book. I don't have a reason why.

I know (c) is false. I'm pretty sure it's dimension 5. I have seen the proof before. EDIT: Proof here: Determining Bases of P4

I think (d) is true. Because if $$Ax = x$$ and $$Ay = y$$ then $$A(x + y) = x + y$$. Also the with scalar multiplication. Also, this is sort of like eigenvalues, from my understanding.

Can someone help me verify these please?

• Is this a school assignment? – Jack Pfaffinger Apr 5 at 19:47
• No it's a quiz I took. I want to calculate my grade – user660922 Apr 5 at 19:48
• What is $\Bbb P_4$? – Bernard Apr 5 at 20:05
• The vector space of polynomials of degree less than or equal to $4$ – user660922 Apr 5 at 20:13

(a) is true. If a set of $$7$$ vectors in $$H$$ were independent, they are a basis for a subspace of $$H$$, so that the $$5$$-dimensional space $$H$$ has a subspace of dimension $$7$$, which is absurd. (b) is true; $$A$$ is called a change of basis matrix. (c) is false for the reason you state, and (d) is true for the reason you state. Good thinking!


Mathematics
OpenStudy (anonymous):

The sum of all odd numbers form 1 to 99 is?

OpenStudy (anonymous):

use sum of aritmetic sequence. .

Parth (parthkohli):

1 + 3 + 5 + 7.....But you need not do that since it is an arithmetic sequence.

Parth (parthkohli):

The sum of an arithmetic sequence is: $$\Large \color{Black}{\Rightarrow {n \over 2}(a_1 + a_l) }$$ a1 is the first term aL is the last n is the number of terms

OpenStudy (anonymous):

After 1 add? Should i cross multiply?

Parth (parthkohli):

1st term is 1. Last is 99. Odd numbers between 1,100 are 50.

Parth (parthkohli):

The common difference is d, btw.

OpenStudy (anonymous):

@ParthKohli , i think you've mistaken the formula. . http://www.regentsprep.org/Regents/math/algtrig/ATP2/ArithSeq.htm

Parth (parthkohli):

Oops, it was aN lol

OpenStudy (anonymous):

it's ok. .

OpenStudy (anonymous):

I dont get it XD

Parth (parthkohli):

Hey I know another pattern.

Parth (parthkohli):

The sum of first n odd numbers is n squared. The sum of first 50 odd numbers is 50 squared. So, 50^2 = 2500

Parth (parthkohli):

Well actually my formula was correct.

Parth (parthkohli):

I learnt this pattern at school.

OpenStudy (anonymous):

Ca you give me an example?

Parth (parthkohli):

For example the sum of first 4 odd numbers is 4 squared aka 16 1 + 3 + 5 + 7 = 4 + 12 = 16

OpenStudy (anonymous):

how did you got that formula? @ParthKohli

Parth (parthkohli):

Oh wait a second

Parth (parthkohli):

Yes....yes I'm correct.

OpenStudy (anonymous):

the answer is 2500, and you're correct, but how did you get that another formula?

Parth (parthkohli):

I learnt that at school

Parth (parthkohli):

@sel126 Got it?

OpenStudy (anonymous):

Yessss :) Thankyousomuch:)))))))

Parth (parthkohli):

Yw :D

OpenStudy (anonymous):

99 = a + (n-1)d hence 99 = 1 +(n-1)*3 n= 50 substituting value of n in equation S= n/2 [ 2a + (n-1)*d] we get sum of odd terms that is equal to 2500 where a =1(first term) and d =3(common difference)

OpenStudy (anonymous):

Why does three become the d?

OpenStudy (anonymous):

the sum of odd numbers is a perfect square

Parth (parthkohli):

That's what I said above

Parth (parthkohli):

Hehe don't waste your energy, genius. I've explained her.

OpenStudy (anonymous):

just thought i would mention it. no need for a formula, or all that other business, only need to know how many numbers are being added

Parth (parthkohli):

Hmm I said the exact same thing.

Parth (parthkohli):

Still here you have a medal


# Probability of Head in coin flip when coin is flipped two times

Probability of getting a head in coin flip is 1/2. If the coin is flipped two times what is the probability of getting a head in either of those attempts?

I think both the coin flips are mutually exclusive events, so the probability would be getting head in attempt 1 or attempt 2 which is :

P(attempt1) + P(attempt2) = 1/2 + 1/2 = 1

100% probability sounds wrong? What am I doing wrong. If i apply the same logic then probability of getting at least 1 head in 3 attempt will be 1/2+1/2+1/2 = 3/2 = 1.5 which I know for sure is wrong. What do i have mixed up?

-
The events are not mutually exclusive: you can get a head on the first and on the second flip –  Rookatu Mar 28 at 5:55
Indeed. The coin tosses are independent. That is not the same as mutually exclusive. –  Graham Kemp Mar 28 at 9:58

You are confusing the terms "independent" and "mutually exclusive".  These are not the same thing.  In fact events cannot be both "independent" and "mutually exclusive".  It's either one, the other, or neither.

"Mutually exclusive" simply means that the two events cannot happen together. If A happens then B does not and if B happens A cannot.

"Independent" simply means that the occurrence of one event is not conditional on the occurrence of the other. The probability of A happening does not depend on whether B happens or not, and vice versa.

Let $H_n$ be the indexed event of getting a head on the $n^{th}$ flip.

Given an unbiased coin, $P(H_1)=P(H_2)=\frac 1 2$

These events are independent so $P(H_1 \cap H_2) = P(H_1)\times P(H_2)$.  The outcome of one coin toss does not influence then outcome of the other.

However they are not mutually exclusive, so $P(H_1 \cup H_2) = P(H_1)+P(H_2) - P(H_1 \cap H_2)$.  Both coins can turn up heads.

Putting it together: $$\therefore P(H_1 \cup H_2) = \frac 12 + \frac 1 2 - \frac 12 \times \frac 12 = \frac 3 4$$

-

Let $A$ be the event of getting a tail in both tosses, then $A'$ be the event of getting a head in either tosses. So $P(A') = 1 - P(A) = 1 - 0.5*0.5 = 0.75$

-

probability of having head in a coin flip is 1/2 , when you flip 2 times then the probability you have at least 1 head is equal to :

1 - P(no head) = 1 - P(2 tail) = 1 - 1/2*1/2 = 3/4 or 75%

-


# One minus one plus one minus one plus...

There are three types of people in this world:

Evaluate:

$\color{blue}{S}=1-1+1-1+1-1+\ldots$

Type 1

$\color{blue}{S}=(1-1)+(1-1)+(1-1)+\ldots=0+0+0+\ldots=\boxed{0}$

Type 2

$\color{blue}{S}=1-(1-1)-(1-1)-(1-1)-\ldots=1-0-0-0-\ldots=\boxed{1}$

But the $$\displaystyle 3^{rd}$$ type of people did like this:

$1-\color{blue}{S}=1-(1-1+1-1+\ldots)=1-1+1-1+1-1+\ldots = S$

$\Leftrightarrow 1-\color{blue}S=\color{blue}S \Rightarrow 2\color{blue}S=1 \Rightarrow \color{blue}S=\boxed{\frac{1}{2}}$

Note by Adam Phúc Nguyễn
3 years, 4 months ago

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$...$$ or $...$ to ensure proper formatting.
2 \times 3 $$2 \times 3$$
2^{34} $$2^{34}$$
a_{i-1} $$a_{i-1}$$
\frac{2}{3} $$\frac{2}{3}$$
\sqrt{2} $$\sqrt{2}$$
\sum_{i=1}^3 $$\sum_{i=1}^3$$
\sin \theta $$\sin \theta$$
\boxed{123} $$\boxed{123}$$

Sort by:

You forgot $$4^\text{th}$$ type of people; they say that this series diverges.

- 3 years, 4 months ago

Its answer oscillates b/w 0 and 1

- 3 years, 4 months ago

Yes that's why it diverges.

- 3 years, 4 months ago

Even more here:

Evaluate : $S=1-2+3-4+5-6+ \ldots$

Type 1 : $S=1+(-2+3)+(-4+5)+ \ldots = 1+1+1+1+\ldots=\infty$

Type 2 : $S=(1-2)+(3-4)+(5-6)+ \ldots = -1-1-1-1+\ldots=-\infty$

Type 3 : They go to WolframAlpha, search this:

 1 sum(n from 1 to infty,(-1)^n*n)

Which shows up that "The ratio test is inconclusive." and "The root test is inconclusive.", from which they implies that the sum is incosistent.

Type 4 : They go to Wikipedia and finds out that the sum is actually equal to $$1/4$$.

- 3 years, 4 months ago

Wow! Awesome!

I also saw this video:

$1+2+3+4+\ldots=\frac{1}{12}$

- 3 years, 4 months ago

Wow, that's cool :)))

- 3 years, 4 months ago

i guess u forgot the negative sign along with 1/12

- 3 years, 4 months ago

last one is pretty good

- 3 years, 4 months ago

haha.. g8

- 3 years, 4 months ago

Grandi series.

- 3 years, 4 months ago

Gud 1

- 3 years, 4 months ago


# Using the FTC to take a derivative

1. Nov 7, 2012

### dumbQuestion

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

Simplify the following:

d/dx[∫(t/lnt)dt] where the integral is a definite integral with bounds from x to x2

2. Relevant equations

The Fundamental THeorem of calculus says:

Suppose f is continuous on [a,b]

Then ∫abf(x)dx=F(b)-F(a) where F is any antiderivative of f

3. The attempt at a solution

So this is how I thought to solve it. Let f(t)=t/lnt

First notice that f(t) continuous on (1,c] forall c in ℝ => f(t) integrable and there exists an antiderivative F(t) such that F'(t) = f(t)

So let F(t) be such an antiderivative. ***By the fundamental theorem of calculus,

∫f(t)dt (where the integral bounds are from x to x2=F(x2)-F(x)

This means

d/dx[∫f(t)dt] (where the integral bounds are from x to x2=d/dx[F(x2)-F(x)] = d/dx[F(x2)] - d/dx(F(x)] = 2xF'(x2) - F'(x) [by the Chain Rule] = 2x(x2/ln(x2)) - x/lnx = 2x3/2lnx - x/lnx [by rules of logarithm] = (x3-x)/lnx (common denominator and added them together)

So I get that as long as the bounds on the integral are from (0,c), the answer to
d/dx[∫(t/lnt)dt] where the integral is a definite integral with bounds from x to x2 = (x3-x)/lnx

OK here is my problem, the book solves this almost exactly the same way, but they never make any mention of the bounds on the integral or continuity. I guess I am confused. Do I not need to think about where the function is continuous? It's just part of the FTC says "Suppose f is continuous on [a,b]" so it seems to me like I can only apply it when that part holds. Why don't you need to think of continuity in this case? There is no restriction in the problem statement about x. How do you solve this problem for any general x?

Also the other problem, is the line where I put ***. I think I've done something wrong here because this function is only continuous on the open region (1,c] for all c, but the FTC requires f be continuous on a closed bounded region [a,b]. So do I just pick a number great than 1, say [1.1,c]? I mean what's the formal way to solve this with regards to the continuity aspect?

2. Nov 7, 2012

### LCKurtz

Your problem implicitly assumes $t>0$ hence $x>0$ and $x^2>0$ because $t>0$ is the domain of $\ln(t)$. So there is no problem.

3. Nov 7, 2012

### dumbQuestion

But doesn't f need to be continuous on a closed bounded interval [a,b]? ln(t) is only continuous on (0,c] for all c in R.

Can you apply the FTC if f is only continuous on an interval (a,b]?

4. Nov 7, 2012

### LCKurtz

Likely not; I'd have to check. But it doesn't matter for this question. If $x$ and $x^2$ are both positive, then all your conditions are true on the closed interval between them so you can use the FTC.


Question

# If the function $$f(x) = x^4 - 2x^3 + ax^2 + bx$$ on $$[1,3]$$ satisfies the conditions of Rolle's Theorem with $$c = \dfrac{3}{2}$$, then find $$a$$ and $$b$$.

Solution

## Given $$f(x)=x^4-2x^3+ax^2+bx$$ on $$[1,3]$$$$\implies f'(x)=4x^3-6x^2+2ax+b$$According to Rolle's theorem, if f(x) is continuous on $$[a,b]$$, differentiable on $$(a,b)$$ and $$f(a)=f(b)$$ then there exists some $$c \in (a,b)$$ such that $$f'(c)=0$$Given that the function $$f(x)$$ satisfies the conditions of Rolle's theorem with $$c=\dfrac 32$$$$f(1)=1^4-2(1)^3+a(1)^2+b(1)=1-2+a+b=a+b-1$$$$f(3)=3^4-2(3)^3+a(3)^2+b(3)=81-54+9a+3b=9a+3b-27$$from Rolles's theorem, $$f(1)=f(3)$$$$\implies a+b-1=9a+3b-27$$$$\implies 8a+2b=26$$$$\implies 4a+b=13$$ .......(1)from Rolles's theorem, $$f'(c)=4c^3-6c^2+2ac+b=0$$ $$\implies f'(\dfrac 32)=4(\dfrac 32)^3-6(\dfrac 32)^2+2a(\dfrac 32)+b=0$$$$\implies \dfrac{27}{2}-\dfrac{27}{2}+3a+b=0$$$$\implies 3a+b=0$$ .......(2)(1) - (2) $$\implies a=13$$substituting $$a=13$$ in (1) $$\implies 4(13)+b=13$$$$\implies b=-39$$Therefore, $$a=13,b=-39$$Mathematics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


# Dimensions of symmetric and skew-symmetric matrices

Let $\textbf A$ denote the space of symmetric $(n\times n)$ matrices over the field $\mathbb K$, and $\textbf B$ the space of skew-symmetric $(n\times n)$ matrices over the field $\mathbb K$. Then $\dim (\textbf A)=n(n+1)/2$ and $\dim (\textbf B)=n(n-1)/2$.

Short question: is there any short explanation (maybe with combinatorics) why this statement is true?

EDIT: $\dim$ refers to linear spaces.

• Do you mean symmetric (not normal) in the title? And do you mean the $\dim$ of linear spaces of such matrices, not the $\dim$ of the matrices, right? Aug 23, 2012 at 9:59
• I did edit it - thanks for the reminder! Aug 23, 2012 at 10:02
• You did not edit it correctly; $\mathbf A$ still refers to just one matrix, not a subspace. I will edit it for you. Aug 23, 2012 at 12:38
• And you should say that $\mathbb K$ is not of characteristic $2$, or otherwise symmetric and anti-symmetric matrices are the same thing and your equations cannot both be true. Aug 23, 2012 at 12:40

All square matrices of a given size $n$ constitute a linear space of dimension $n^2$, because to every matrix element corresponds a member of the canonical base, i.e. the set of matrices having a single $1$ and all other elements $0$.

The skew-symmetric matrices have arbitrary elements on one side with respect to the diagonal, and those elements determine the other triangle of the matrix. So they are in number of $(n^2-n)/2=n(n-1)/2$, ($-n$ to remove the diagonal).

For the symmetric matrices the reasoning is the same, but we have to add back the elements on the diagonal: $(n^2-n)/2+n=(n^2+n)/2=n(n+1)/2$.

Here is my two cents:

\begin{eqnarray} M_{n \times n}(\mathbb{R}) & \text{has form} & \begin{pmatrix} *&*&*&*&\cdots \\ *&*&*&*& \\ *&*&*&*& \\ *&*&*&*& \\ \vdots&&&&\ddots \end{pmatrix} \hspace{.5cm} \text{with $n^2$ elements}\\ \\ \\ Skew_{n \times n}(\mathbb{R}) & \text{has form} & \begin{pmatrix} 0&*'&*'&*'&\cdots \\ *&0&*'&*'& \\ *&*&0&*'& \\ *&*&*&0& \\ \vdots&&&&\ddots \end{pmatrix} \end{eqnarray} For this bottom formation the (*)s and (*')s are just operationally inverted forms of the same number, so the array here only takes $\frac{(n^2 - n)}{2}$ elements as an argument to describe it. This appears to be an array geometry question really... I suppose if what I'm saying is true, then I conclude that because $\dim(Skew_{n \times n}(\mathbb{R}) + Sym_{n \times n}(\mathbb{R})) = \dim(M_{n \times n}(\mathbb{R}))$ and $\dim(Skew_{n \times n}(\mathbb{R}))=\frac{n^2-n}{2}$ then we have that \begin{eqnarray} \frac{n^2-n}{2}+\dim(Sym_{n \times n}(\mathbb{R})))=n^2 \end{eqnarray} or \begin{eqnarray} \dim(Sym_{n \times n}(\mathbb{R})))=\frac{n^2+n}{2}. \end{eqnarray}

• $Skew_{n\times n}(\mathbb{R})=(Sym_{n\times n}(\mathbb{R}))^{\perp}?$ Aug 18, 2021 at 5:50

This is a bit late, but I figured I would chime in since the other answers don't really give the combinatorial intuition asked for in the original question.

In order to specify a skew-symmetric matrix, we need to choose a number $A_{ij}$ for each set $\{i,j\}$ of distinct indices. How many such sets are there? Combinatorics tells us that there are $\left( \begin{array}{@{}c@{}} n \\ 2 \end{array} \right) = \frac{n(n-1)}{2}$ such sets.

Similarly, in order to specify a symmetric matrix, we need to choose a number $A_{ij}$ for each set $\{i,j\}$ of (not necessarily distinct) indices. We can encode such sets by adding a special symbol $n+1$ that indicates a repeated index. Thus, we need to choose a number $A_{ij}$ for each set $\{i,j\}$ of distinct symbols, where now a symbol is either an index ($1 , \ldots , n$), or our special symbol $n+1$ that is used for a repeated index. Combinatorics tells us that there are $\left( \begin{array}{@{}c@{}} n+1 \\ 2 \end{array} \right) = \frac{n(n+1)}{2}$ such sets.

The dimension of symmetric matrices is $\frac{n(n+1)}2$ because they have one basis as the matrices $\{M_{ij}\}_{n \ge i \ge j \ge 1}$, having $1$ at the $(i,j)$ and $(j,i)$ positions and $0$ elsewhere. For skew symmetric matrices, the corresponding basis is $\{M_{ij}\}_{n \ge i > j \ge 1}$ with $1$ at the $(i,j)$ position, $-1$ at the $(j,i)$ position, and $0$ elsewhere.

Note that the diagonal elements of skew symmetric matrices are $0$, hence their dimension is $n$ less than the dimension of normal symmetric matrices.

• But this is no explanation why the symmetric matrices have the specified $\dim$. Aug 23, 2012 at 10:03
• Do you mean $n^2$? Aug 23, 2012 at 10:04
• Yeah, I didn't notice earlier that he asked for proofs of the dimensions too, and have edited. Aug 23, 2012 at 10:07
• @RijulSaini: Thanks, but enzotib's answer seems to be easier to understand! Aug 23, 2012 at 10:13

There have been many very good answers, so this is going to be another perspective of counting. We tackle the case of skew-symmetric first, which yields the condition that for any matrix $A$ with real entries, $a_{ij} = -a_{ij}$, so this means one side of the matrix is completely determined by the other as shown.

$$\begin{matrix} \begin{pmatrix} 0 &*' \\ *& 0 \\ \end{pmatrix} & * \end{matrix}$$

$$\begin{matrix} \begin{pmatrix} 0 &*' & *' \\ *& 0 & *' \\ * & * & 0 \\ \end{pmatrix} & \begin{matrix} *& \\ * & * \end{matrix} \end{matrix}$$

$$\begin{matrix} \begin{pmatrix} 0 &*' & *' &*'\\ *& 0 & *' &*'\\ * & * & 0 &*'\\ * & * &* & 0 \end{pmatrix} & \begin{matrix} * & & \\ *&* & \\ * & * &* \end{matrix} \end{matrix}$$

$$\begin{matrix} \begin{pmatrix} 0&*'&*'&*'&\cdots \\ *&0&*'&*'& \\ *&*&0&*'& \\ *&*&*&0& \\ \vdots&&&&\ddots \end{pmatrix} & \begin{matrix} *& \\ *&*& \\ *&*&*& \\ \vdots&&&&\ddots \end{matrix} \end{matrix}$$

Notice that the triangle keeps getting larger and larger and at each stage and is incremented by $+1$. Since we have $n-1$ entries to consider we add up the number of entries, that is $$1+ 2 + \dots + (n-1).$$

So by Gauss, we have $$\frac{(n-1)(n-1+1)}{2} = \frac{(n-1)n}{2}$$ degree of freedom and that is the dimension we seek.

For the symmetric case we need to add back the $n$ objects in diagonal zeroed out, so $$\frac{(n-1)n}{2} + n = \frac{n^2 + n}{2}$$


# How to remember sum to product and product to sum trigonometric formulas?

They are:

\begin{align} \cos(a)\cos(b)&=\frac{1}{2}\Big(\cos(a+b)+\cos(a-b)\Big) \\[2ex] \sin(a)\sin(b)&=\frac{1}{2}\Big(\cos(a-b)-\cos(a+b)\Big) \\[2ex] \sin(a)\cos(b)&=\frac{1}{2}\Big(\sin(a+b)+\sin(a-b)\Big) \\[2ex] \cos(a)\sin(b)&=\frac{1}{2}\Big(\sin(a+b)-\sin(a-b)\Big) \\[2ex] \cos(a)+\cos(b)&=2\cos\left(\frac{a+b}{2}\right)\cos\left(\frac{a-b}{2}\right) \\[3ex] \cos(a)-\cos(b)&=-2\sin\left(\frac{a+b}{2}\right)\sin\left(\frac{a-b}{2}\right) \\[3ex] \sin(a)+\sin(b)&=2\sin\left(\frac{a+b}{2}\right)\cos\left(\frac{a-b}{2}\right) \\[3ex] \sin(a)-\sin(b)&=2\cos\left(\frac{a+b}{2}\right)\sin\left(\frac{a-b}{2}\right) \end{align}

I have found nice mnemonics that helped me to remember the reduction formulae and others but I can't find a simple relationship between the formulas above. Can you help?

• What type of "relations" do you mean, or do you need ? – Jean Marie May 10 '16 at 8:33
• 'Mathematics' is the subject which comes by practice! So use these formulas in questions and all will be stored in memory ;P – user5954246 May 10 '16 at 8:55
• You are welcome to have a look at my answer to this post – Mick May 10 '16 at 16:57
• @RichardSmith: Here's a diagram that may help. – Blue May 10 '16 at 17:12

## 3 Answers

The only ones you need to know are the classical $\sin(a+b) = \sin(a)\cos(b)+\cos(a)\sin(b)$ and $\cos(a+b)=\cos(a)\cos(b)-\sin(a)\sin(b)$. The others are mere consequences of those.

For example, by changing the signs, you get $\cos(a-b)=\cos(a)\cos(b)+\sin(a)\sin(b)$. By summing, you have $\cos(a+b)+\cos(a-b) = 2\cos(a)\cos(b)$, which is your first formula.

Similarly, by solving $p=a+b$ and $q=a-b$, you get the formula $\cos(p)+\cos(q) = 2\cos\left(\dfrac{p+q}{2}\right)\cos\left(\dfrac{p-q}{2}\right)$.

• And the two you suggest to remember can be derived in less than $30$ seconds using $e^{i(a+b)}=e^{ia}e^{ib}$ and Euler's formula :) – Guest Nov 20 '16 at 19:32

Right away, you can cross off the fourth formula, since it is equivalent to the third formula after switching $a$ and $b$.

Then, you can also avoid the last four formulas, since these are all covered by the first three formulas via the relationships $$a+b = u, \quad a-b = v, \quad a = \frac{u+v}{2}, \quad b = \frac{u-v}{2}.$$

So that really leaves us with only three formulas. The first two are merely consequences of the cosine angle addition identity $$\cos(a \pm b) = \cos a \cos b \mp \sin a \sin b,$$ where a suitable addition or subtraction of the two forms of this equation are done; e.g., \begin{align*} \cos (a-b) &= \cos a \cos b + \sin a \sin b \\ \cos (a+b) &= \cos a \cos b - \sin a \sin b \\ \hline \cos(a-b) + \cos(a-b) &= 2 \cos a \cos b . \end{align*} A similar concept applied to the sine angle addition identity yields the third (and fourth).

Of course, you can memorize the formulas, or re-derive them, but clearly it's faster to have more formulas memorized as long as you can remember them. What is important to stress is that a vast array of trigonometric identities are all consequences of some very basic identities, and these basic identities are the ones you really need to know.

How about just restating the LHS. For example, you could restate $\cos a\sin b$ as $$\frac{\sin a\cos b +\cos a\sin b + \cos a\sin b - \sin a\cos b}{2}$$ and just figure it out from there. For Example, Let's start off with $\cos a\sin b$ and try to derive $\frac{1}{2}[\sin(a+b) - \sin(a-b)]$ \begin{align} \cos a \sin b &= \frac{1}{2}\bigg[2\cos a\sin b\bigg] \\ &= \frac{1}{2}\bigg[\cos a\sin b + \cos a\sin b\bigg] \\ &= \frac{1}{2}\bigg[\cos a\sin b + \cos a\sin b + 0\bigg] \\ &= \color{red}{\frac{1}{2}\bigg[\cos a\sin b + \cos a\sin b + (\sin a \cos b - \sin a\cos b)\bigg]} \\ &= \frac{1}{2}\bigg[(\cos a\sin b + \sin a \cos b) +(\cos a\sin b - \sin a\cos b)\bigg] \\ &= \frac{1}{2}\bigg[(\cos a\sin b + \sin a \cos b) -(\sin a\cos b - \cos a\sin b )\bigg] \\ &= \frac{1}{2}\bigg[(\cos a\sin b + \sin a \cos b) -(\sin a\cos (-b) + \cos a\sin (-b) )\bigg] \\ &=\frac{1}{2}\bigg[\sin(a+b) - \sin(a-b)\bigg] \end{align}

Usually I just remember/figure out the red line.


# Generating function of $\frac{h(x)}{(1-x)^2}$

If $$h(x)$$ is the generating function for $$a_r$$, what is the generating function of $$\frac{h(x)}{(1-x)^2}$$

Let $$h(x)$$ be written as

$$h(x) = \sum_{r} a_r x^r$$

Consider more simply

$$\frac{h(x)}{1-x} = \frac{1}{1-x} h(x) =\sum_{r} x^r \sum_{r} a_r x^r$$

I tried to expand this and see what I could get

$$(1+x+x^2+x^3+\dots+x^r+\dots)(a_0+a_1x+a_2x^2+a_3x^3+\dots+a_rx^r+\dots)$$

there are two ways to simplify the product, either

$$a_0(1+x+x^2+\dots)+a_1(x+x^2+x^3+\dots)+ a_2(x^2+x^3+x^4+\dots)+\dots= \sum_ra_r\sum_{k\ge r}x^k$$

or $$a_0 + (a_0+a_1)x+(a_0+a_1+a_2)x^2+(a_0+a_1+a_2+a_3)x^3 = \sum_r \left(\sum_{k\le r}a_k \right)x^r$$

obviously this is only for one factor of $$\frac{1}{1-x}$$ but I assume If I can get help for this I can extend it to two factors.

I'm not sure what form the answer is expected to be in? Because I could say the generating function is

$$\frac{h(x)}{1-x} = h\left(\sum_{k \ge r}x^k\right)$$

but I'm not sure that makes any sense. I was expecting to say something like

$$\frac{h(x)}{1-x} \mapsto h(x^2)$$

(the $$x^2$$ is not intentional, just some idea of what I believe the answer could look like)

Any help for the case of $$\frac{1}{1-x}$$ would be great and then I could extend it to $$\frac{1}{(1-x)^2}$$

• I think that the question must be "What sequence is $h(x)/(1-x)^2$ the generating functin of?" – Somos Apr 9 '19 at 21:56
• It probably helps a lot to note that because $\frac{d}{dx} \frac{1}{1-x} = \frac{1}{(1-x)^2}$, by taking the derivative of the geometric series we get $\frac{1}{(1-x)^2}=\sum_{n=0}^\infty (n+1)x^n$. Then you can just use one convolution of this series with the generating function for $h(x)$. – Robert Shore Apr 9 '19 at 21:57
• @Somos I'm not sure, you might be right. This is from a list of review questions for my combinatorics exam, see here a screenshot from the paper link – Hushus46 Apr 9 '19 at 22:00
• @RobertShore I have not heard the term convolution in my class but I assume you mean a new generating function where the coefficients $c_n = a_0b_n+a_1b_{n-1}+\dots+a_{n-1}b_1+a_nb_0$ ? – Hushus46 Apr 9 '19 at 22:06
• Yes, that's what I'm talking about. – Robert Shore Apr 9 '19 at 22:23

First, note that

$$\frac{d}{dx} \frac{1}{1-x}=\frac{1}{(1-x)^2}.$$

Thus, taking the derivative of the power series we have:

$$\frac{1}{(1-x)^2}=\sum_{k=0}^\infty (k+1)x^k.$$

Let

$$h(x)=\sum_{n=0}^\infty a_nx^n.$$

Then taking the convolution of these two series, we have:

$$\frac{h(x)}{(1-x)^2}=\sum_{n=0}^\infty \sum_{k=0}^n (k+1)a_{(n-k)}x^n.$$

Another way.

Since $$(1-x)^2 = 1-2x+x^2$$, if $$\dfrac{h(x)}{(1-x)^2} =\sum_{n=0}^{\infty} a_nx^n$$ then

$$\begin{array}\\ h(x) &=(1-x)^2\sum_{n=0}^{\infty} a_nx^n\\ &=(1-2x+x^2)\sum_{n=0}^{\infty} a_nx^n\\ &=\sum_{n=0}^{\infty} a_nx^n-2x\sum_{n=0}^{\infty} a_nx^n+x^2\sum_{n=0}^{\infty} a_nx^n\\ &=\sum_{n=0}^{\infty} a_nx^n-\sum_{n=0}^{\infty} 2a_nx^{n+1}+\sum_{n=0}^{\infty} a_nx^{n+2}\\ &=\sum_{n=0}^{\infty} a_nx^n-\sum_{n=1}^{\infty} 2a_{n-1}x^{n}+\sum_{n=2}^{\infty} a_{n-2}x^{n}\\ &=a_0+a_1x+\sum_{n=}^{\infty} a_nx^n-2a_0x-\sum_{n=2}^{\infty} 2a_{n-1}x^{n}+\sum_{n=2}^{\infty} a_{n-2}x^{n}\\ &=a_0+(a_1-2a_0)x+\sum_{n=}^{\infty} (a_n-2a_{n-1}+a_{n-2})x^n\\ \end{array}a_n$$

If $$h(x) =\sum_{n=0}^{\infty} h_nx^n$$ then, equating coefficients, $$h_0 = a_0$$, $$h_1 = a_1-2a_0$$, so $$a_1 = h_1+2a_0 = h_1+2h_0$$, and, for $$n \ge 2$$, $$h_n =a_n-2a_{n-1}+a_{n-2}$$ so $$a_n =h_n+2a_{n-1}-a_{n-2}$$.

The advantage of this method is that getting each new $$a_n$$ takes only 3 operations (multiply, add, subtract) instead of $$n$$.


# Antiderivative involving Trig Identities.

#### shamieh

##### Active member
A little confused on something.

Suppose I have the integral

$$\displaystyle 2 \int 4 \sin^2x \, dx$$

So I understand that $$\displaystyle \sin^2x = \frac{1 - \cos2x}{2}$$

BUT we have a 4 in front of it, so shouldn't we pull the $$\displaystyle 4$$ out in front of the integral to get:

$$\displaystyle 8 \int \frac{1 - \cos 2x}{2} \, dx$$

then pull out the $$\displaystyle \frac{1}{2}$$ to get: $$\displaystyle 4 \int 1 - \cos 2x \, dx$$

then:

$$\displaystyle 8 [ x + \frac{1}{2} \sin2x ] + C$$?

#### MarkFL

Staff member
I would switch the constants so that we have:

$$\displaystyle 4\int 2\sin^2(x)\,dx$$

Apply the identity:

$$\displaystyle 4\int 1-\cos(2x)\,dx$$

And then we have:

$$\displaystyle 4x-2\sin(2x)+C$$

#### Prove It

##### Well-known member
MHB Math Helper
A little confused on something.

Suppose I have the integral

$$\displaystyle 2 \int 4 \sin^2x \, dx$$

So I understand that $$\displaystyle \sin^2x = \frac{1 - \cos2x}{2}$$

BUT we have a 4 in front of it, so shouldn't we pull the $$\displaystyle 4$$ out in front of the integral to get:

$$\displaystyle 8 \int \frac{1 - \cos 2x}{2} \, dx$$

then pull out the $$\displaystyle \frac{1}{2}$$ to get: $$\displaystyle 4 \int 1 - \cos 2x \, dx$$

then:

$$\displaystyle 8 [ x + \frac{1}{2} \sin2x ] + C$$?
Surely you mean \displaystyle \begin{align*} 4 \left[ x + \frac{1}{2}\sin{(2x)} \right] + C \end{align*}. Apart from that everything you have done is correct

#### shamieh

##### Active member
I would switch the constants so that we have:

$$\displaystyle 4\int 2\sin^2(x)\,dx$$

Apply the identity:

$$\displaystyle 4\int 1-\cos(2x)\,dx$$

And then we have:

$$\displaystyle 4x-2\sin(2x)+C$$

I see. Ok here is where I am getting lost Mark. My original problem was this $$\displaystyle \int \frac{x^2}{\sqrt{4 - x^2}} dx$$

So I got to the step we just mentioned above (ignore that my final answer had an 8 in front of all those terms, should be a 4 - BUT I then noticed that the A.D. of $$\displaystyle \cos(2\theta)$$ is just $$\displaystyle \frac{1}{2}\sin(2\theta)$$THUS I can now change the 4 to a 2 since$$\displaystyle \frac{4}{2} = 2$$ when I pulled it out to the constant.)

Finally, after applying all of those changes - now I am here:

$$\displaystyle 2\theta - 2\sin(2\theta) + C$$ ... So then I said ok, simple enough, just sub back in for my original equation where I had $$\displaystyle x = 2\sin\theta$$ which becomes $$\displaystyle \theta = \arcsin(\frac{x}{2})$$ (Note: From when I used my trig sub)

Thus $$\displaystyle 2\arcsin(\frac{x}{2}) - 2\sin(2\arcsin(\frac{x}{2}))$$ But somehow my teacher is getting:

$$\displaystyle 2\arcsin(\frac{x}{2}) - \frac{1}{2} x\sqrt{4 -x^2} + C$$ as the final answer..

In the second term when i have sin(arcsin ... etc What would I do there?

#### MarkFL

Staff member
We are given:

$$\displaystyle I=\int \frac{x^2}{\sqrt{4-x^2}}\,dx$$

I would use the substitution:

$$\displaystyle x=2\sin(\theta)\,\therefore\,dx=2\cos(\theta)\,d \theta$$

And so now we have:

$$\displaystyle I=\int \frac{4\sin^2(\theta)}{\sqrt{4-4\sin^2(\theta)}}\,2\cos(\theta)\,d\theta$$

Simplifying this, we obtain:

$$\displaystyle I=4\int \sin^2(\theta)\,d\theta$$

This is half of what I began with in post #2 above, so using that method, we would obtain:

$$\displaystyle I=2\theta-\sin(2\theta)+C$$

Now, using the double-angle identity for sine, we may write:

$$\displaystyle I=2\theta-2\sin(\theta)\cos(\theta)+C$$

Observing that:

$$\displaystyle \sin(\theta)=\frac{x}{2}\implies\cos(\theta)=\frac{\sqrt{4-x^2}}{2}$$

we may now write:

$$\displaystyle I=2\sin^{-1}\left(\frac{x}{2} \right)-\frac{x\sqrt{4-x^2}}{2}+C$$

I think you are still trying to pull constants out in front of your integrals that are not factors of the entire integrand.

#### shamieh

##### Active member
Yes you are exactly right. I was pulling things out in front that I couldnt

So essentially I should have

$$\displaystyle 4[\theta - \frac{1}{2}\sin(2\theta)]$$

Which becomes:

$$\displaystyle 4\theta-2\sin(2\theta)$$

Which then becomes:

$$\displaystyle 2\theta - \sin(2\theta)$$

Then plug in double angle formula,

Then 2 in the second term cancels out with the $$\displaystyle \frac{x}{2}$$

Wow I see where I made my many errors. Thanks for the clarification.


# Oil volume required to rise the piston

1. Nov 27, 2013

### Camille

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

The piston shown weighs 11 lbf. In its initial position, the piston is restrained from moving to the bottom of the cylinder by means of the metal stop. Assuming there is neither friction nor leakage between piston and cylinder, what volume of oil (S = 0.85) would have to be added to the 1-in. tube to cause the piston to rise 1 in. from its initial position?

2. Relevant equations

$p = \frac{dF}{dA}$

And the basic differential equation of the fluid statics:

$\frac{dp}{dz} = - γ$

Also the density or the specific weight of the oil is:

$ρ = 1000 \frac{kg}{m^3} \cdot 0.85 = 850 \frac{kg}{m^3}$

$γ = ρ \cdot g = 8.336 \frac{kN}{m^3}$

3. The attempt at a solution

Firstly, I have calculated what volume of oil is needed just to keep the piston "a little" above the stop, ie. to hold just the weight of the piston:

$V_{oil p} = \frac{W_p}{A_p} \cdot \frac{A_o}{ρ \cdot g}$ ,

where W_p is the weight of the piston,
A_p is the c-s area of the cylinder
A_o is the c-s area of the tube.

This turns out to be:

$V_{oil p} = 22.39 in^3$.

Next, I have imagined, that when the piston is 1 in above the orignal level, we have to add even more oil to hold the weight of this 1-in thick layer of oil. This gave me in addition the volume of:

$V_{oil o} = 3.14 in^3$.

So altogether the total amount of oil needed calculated by me was:

$V_{oil} = 22.39 in^3 + 3.14 in^3 = 25.53 in^3$.

The answer should be $V_{oil} = 35.7 in^3$.

I see the hole in my reasoning, because the volume of oil in the 1-in layer has to be taken from somewhere, so it's either the old oil that was in the cylinder or the old + the new oil added. However, I don't know how to solve it.

Any help will be appreciated!

2. Nov 27, 2013

### nasu

For one thing, have you included the additional volume in the large cylinder?
And the 3.14 in^3 volume looks suspect. How did you get that?

3. Nov 27, 2013

### Camille

Do you mean the additional volume of the 1-in layer in the cylinder? Yes. It's weight is:

$W_1 = π \cdot (4 in)^2 \cdot 1 in \cdot ρ \cdot g = 6.87 N$

Then we have:

$\frac{V_{oil o}}{A_o} = \frac{W_1}{A_p}$

And solving it I got $V_{oil o} = 3.14 in^3$

4. Nov 27, 2013

### Staff: Mentor

The volume of a 1" layer in the large cylinder is π(4)2(1)/4 = 4π in3. This is the extra volume that had to be added, over and above the 22.39.

5. Nov 27, 2013

### Camille

Okay, I finally got it right. The first mistake was that 4 in and 1 in are diameters, not radii...

Here's how one can look at it:

Now, obviously the "additional" oil that must be poured is the whole blue one, so both on the left and right.

$V_{oil} = V_1 + V_2$

We know that, because the oil that is hatched in black has still the same volume as it had in the beginning. Now we calculate the equality of pressures at the line of equal pressures (marked green):

Left = Right

$p_L = p_R$

$p_L = \frac{W_p + W_{V_1}}{A_L}$

$p_R = \frac{W_{V_2}}{A_R}$

$\frac{W_p + W_{V_1}}{A_L} = \frac{W_{V_2}}{A_R}$

The areas (now correct...):

$A_L = π \cdot (\frac{4in}{2})^2 = 12.57 in^2$

$A_R = π \cdot (\frac{1in}{2})^2 = 0.79 in^2$

And the volume of the 1-in layer of oil:

$\boxed{V_1 = A_L \cdot 1 in = 12.57 in^3}$

And the weight of it:

$W_{V_1} = V_1 \cdot ρ \cdot g = 0.39 lbf$

We calculate the weight of the oil V_2:

$\frac{W_p + W_{V_1}}{A_L} \cdot A_R = W_{V_2}$

$W_{V_2} = \frac{11 lbf + 0.39 lbf}{12.57 in^2} \cdot 0.79 in^2 = 0.72 lbf$

So the volume of it is:

$\boxed{V_2 = \frac{W_{V_2}}{ρ \cdot g} = 23.17 in^3}$

Summing two volumes we get:

$V_{oil} = V_1 + V_2 = 12.57 in^3 + 23.17 in^3 = 35.74 in^3$

Last edited: Nov 27, 2013


# Homework Help: Can I use only one substitution for integral?

1. Sep 3, 2010

### thereddevils

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

By using the substitution t = tan x, find

$$\int \frac{dx}{\cos^2 x+4\sin^2 x}$$

2. Relevant equations

3. The attempt at a solution

Well let tan x=t

$$\frac{dt}{dx}=\sec^2 x=\tan^2 x+1=1+t^2$$

the integral then becomes

$$\int \frac{dx}{\frac{1}{\sqrt{1+t^2}}^2+4\frac{t}{\sqrt{1+t^2}}^2}$$

which simplifies to

$$\int \frac{1}{1+4t^2}$$

Then from here i make another substitution **

let t= 1/2 tan b

dt/db = 1/2 sec^2 b

$$\int \frac{1}{1+4(\frac{1}{2} \tan b)^2} \cdot \frac{1}{2}\sec^2 b db$$

= b + constant

Back substitute

= $$\frac{1}{2}\tan^{-1} (2t)$$ + constant

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

Am i correct? Especially this part ** where i made another substitution, is that valid? Or when the question specified the substitution, i have to stick that one substitution only?

2. Sep 3, 2010

### CompuChip

Re: Integration

Looks okay to me.
If you remember that
$$\int \frac{dy}{1 + y^2} \, dy = \tan^{-1}(y)$$
then $y = 2t$ immediately gives you
$$\int \frac{dt}{1+4t^2} = \frac{1}{2} \int \frac{dy}{1 + y^2} = \frac{1}{2} \tan^{-1}(y) = \frac{1}{2} \tan^{-1}(2 \tan x)$$

(Note that if this was a definite integral, you would have to be very careful with the integration boundaries in these subsitutions)

3. Sep 3, 2010

### thereddevils

Re: Integration

thanks Compuchip! So it's ok to make another substitution other than the one specified in the question? My teacher said otherwise, saying that it's not appropriate to make substitutions other than the one specified in the question. I want to get my facts right first before i get into another heated argument with her.

True, as for definite integrals, we will need to modify the limits in accordance with the substitution we make.

4. Sep 3, 2010

### CompuChip

Re: Integration

Personally, I think that if you can find a correct way to solve the question yourself (even if it is not exactly the way your teacher or anyone else has in mind) it is appropriate.

In this case, you could even argue that 2t -> t is not a full-fledged variable substitution but simply a rescaling, and the integral of 1/(1 + t²) is a standard integral which you can write down immediately whenever you encounter it (however you have proved that standard integral nicely here, which is not bad to do once in your life :) ).

5. Sep 4, 2010

### thereddevils

Re: Integration

Thanks again, Compuchip.


## Saturday, May 1, 2010

### SICP Exercise 1.31: Product of a Series

From SICP section 1.3.1 Procedures as Arguments

Exercise 1.31 asks us to write a product procedure (analogous to sum) that computes the product of a function at points over a given range. We need to show how to define factorial in terms of the new product procedure, and use product to compute approximations to π using the following formula:

Finally, if our product procedure is recursive, we need to write an iterative version, and vice versa.

Since summing a series and multiplying a series are extremely similar ideas, it's not surprising to find that it's very simple to modify sum to produce product. Let's use the recursive version from exercise 1.29 first.
(define (sum term a next b)   (if (> a b)       0       (+ (term a)          (sum term (next a) next b))))

The product procedure really only needs to perform a different operation and end on a different value than sum. The last step (when a > b) should be to multiply by 1 instead of adding 0.
(define (product term a next b)   (if (> a b)     1     (* (term a)        (product term (next a) next b))))

We can test this out by implementing factorial in terms of product using the identity and inc procedures that we've used before.
(define (identity x) x)(define (inc x) (+ x 1))(define (factorial x)   (product identity 1 inc x))> (factorial 3)6> (factorial 4)24> (factorial 5)120> (factorial 10)3628800> (factorial 20)2432902008176640000

The next test is to approximate π using something called Wallis' product or the Wallis Formula. (Lucky for us that mathematicians have already expressed this as the product of a series, saving us the work of coming up with a function for generating the terms.)

We'll multiply the product on the right hand side by the denominator on the left hand side so our procedure will just approximate π directly.
(define (wallis-pi n)   (define (term x)      (/ (* 4.0 (square x))         (- (* 4.0 (square x)) 1)))   (* 2.0 (product term 1 inc n)))> (wallis-pi 10)3.0677038066434994> (wallis-pi 100)3.133787490628163> (wallis-pi 1000)3.1408077460304042> (wallis-pi 10000)3.1415141186819313

Since our product procedure is implemented recursively, we need to show an iterative version. We can go back to the iterative sum procedure for inspiration.
(define (sum term a next b)   (define (iter a result)   (if (> a b)      result      (iter (next a) (+ (term a) result))))   (iter a 0))

Again, there are very few changes required to transform this procedure.
(define (product-iter term a next b)   (define (iter a result)   (if (> a b)       result       (iter (next a) (* (term a) result))))   (iter a 1))

You can plug product-iter into the factorial and wallis-pi procedures above to verify that they give the same results.

The similarities between our two versions of sum and product is no accident. This section of SICP is all about higher-order procedures, so in the next exercise we're going to see how pull the similarities out of these procedures into something even more abstract.

Related:

For links to all of the SICP lecture notes and exercises that I've done so far, see The SICP Challenge.

Lepsch said...

Hi Bill,

I've made another solution. There you go:

(define (pi4 n)
(define (term k)
(if (even? k)
(/ (+ 2 k) (+ 1 k))
(/ (+ 1 k) (+ 2 k))
))
(product term 1 inc n))

Anonymous said...

This is actually the correct implementation to the SICP provided formula.