# sketch the region enclosed by the given curves and find its area

sketch the region enclosed by the given curves and find its area:

$$y=\frac 1x,\; y=x,\; y=\frac x4,\; x>0.$$

I have no problem sketching the area between the curves but there are three, and only one constant value, so I don't know what to put as my second a/b value. I tried using 1/x as a b value but that just gave me an equation answer and the answer isn't an equation.

edit: i forgot about the intersections as constant values. but now I see how to split them up.

This is chapter 6.1 calculus James Stewart btw (area between curves)

• Just FYI: there are many calculus textbooks each with their own chapter/section scheme. "Chapter 6.1" isn't useful information without telling us what textbook you're using. – Adam Saltz Sep 2 '13 at 21:28

From Wolfram Alpha, we can sketch the curves to find the area of interest:

Note that we need to find the points of intersection: at $x = 0$ the lines $y = x, \;y = \frac x{4}$ intersect. At $x= 1$, the lines $y = x$ and $y = \frac 1x$ intersect. At $x = 2,$ the lines $y = \frac 1x$ and $y = \frac x4$ intersect. You can solve this by integrating between the relevant curves from $x = 0$ to $x = 1$, and likewise integrating between the relevant curves between $x = 1$ and $x = 2$, then summing: $$\int_0^1 \left(x - \frac x4\right)\,dx \quad + \quad \int_1^2 \left(\frac 1x - \frac x4\right)\,dx$$

• ok I solved it but I got ln2 - 1/2 and the answer is ln2 O_o i double checked calculations what did i do wrong?? – J L Sep 2 '13 at 21:39
• You have to evaluate the second integral $F(2) - F(1)$ – Namaste Sep 2 '13 at 21:42
• First integral $\frac 12 - \frac 18 = \frac 38$. Second integral: $\ln 2 - \frac 12 - (\ln 1 - \frac 18) = \ln 2 - \frac 38$. Sum, we get $\ln 2$. – Namaste Sep 2 '13 at 21:44
• i figured it out i wrote 7/8 instead of 3/8 for some reason – J L Sep 2 '13 at 21:45
• Good then, that should agree. Is all good? – Namaste Sep 2 '13 at 21:47

Hint: Suppose that we integrate with respect to $x$. Since there are two types of upper curves, draw a vertical line at $x=1$ (where the two upper curves of $y=x$ and $y=1/x$ intersect) that splits the region into two cases. You should obtain: $$\left[\int_0^1 x - \frac x4~dx \right] + \left[\int_1^2 \frac 1x - \frac x4~dx \right]$$

• ohhh yeahh i see. thanks for your help :) I forgot about spliting things into two integrals – J L Sep 2 '13 at 21:26

If you sketched the region correctly then you should be seeing a sort of triangle whose base is given by the line $y=x/4$ whose left side is given by $y=x$ and whose right side is given my $y=1/x$.

The first thing you have to do is to identify the crossing points, that is, the endpoints of this distorted triangle. One crossing point is obviously given by $(0,0)$ where the lines $y=x$ and $y=x/4$ meet, for the next one you have to solve the equation $$\frac{1}{x}=x$$ from where you obtain $x=1$ (we care only about the positive solution since $x>0$). The other vertex of the desired region is given by solving $$\frac{1}{x}=\frac{x}{4}$$ from where you can obtain the solution $x=2$. Look at your sketched region, we will integrate in terms of x-slices. Usually one integrates the area between the two curves $f(x)$ and $g(x)$ in the $x$-region $[a,b]$ as $\int_a^b f(x)-g(x) \; dx$. In this case however, the expression for the upper limit changes exactly at $x=1$ so there should be TWO subtractions instead of one. The desired expression for the area $A$ is $$A = \int_{0}^1 x-\frac{x}{4}\; dx + \int_{1}^2 \frac{1}{x}-\frac{x}{4} \; dx$$ And you should be able to calculate that integral yourself. Hope that helps.

Make a scetch of all three curves over the domain $x>0$. Can you see how they form and bound a triangle-like figure?

What do you mean by "only one constant value"? If you sketch the three curves, you'll see two regions which look like triangles with one bent edge (the $y=1/x$ part). In one of those regions, all the points have positive $x$-coordinates. In the other, the $x$-coordinates are all negative. Integrate to find the area of the positive one.


# Is the cartesian product of groups the product of a normal subgroup and its quotient group?

I'm studying elementary group theory, and just seeing the ways in which groups break apart into simpler groups, specifically, a group can be broken up as the sort of product of any of its normal subgroups with the quotient group of that subgroup. So I wondered how you could do the inverse of that operation:

1. Given two groups $A$ and $B$, construct a group $G$ which admits a normal subgroup $H$ isomorphic to $A$, such that $G/H$ is isomorphic to $B$.

I think I have a proof that the cartesian product $A \times B$ (with the usual component-wise operation) verifies (1), but since I'm just starting out I'm not totally confident in my construction. Furthermore, if I'm right, is this the only group up to isomorphism satisfying (1)?

Edit: I just noticed Proving the direct product D of two groups G & H has a normal subgroup N such that N isomorphic to G and D/N isomorphic to H, which seems to positively answer my question. In that case I'd like to draw attention to the follow up question above (uniqueness up to isomorphism).

Yes, the direct product $A \times B$ satisfies the property, as you've noticed. But it's not unique up to isomorphism. For example, the dihedral group $D_n$ has a normal subgroup $H \simeq \mathbb Z/n \mathbb Z$, with $G/H \simeq \mathbb Z/2 \mathbb Z$, but $D_n$ is not isomorphic (for $n > 1$) to $\mathbb Z/2\mathbb Z \times \mathbb Z/n\mathbb Z$.

More generally, you're asking whether, given an exact sequence of the form $1 \to N \to G \to H \to 1$, is $G$ isomorphic to $N \times H$? The answer is no, as I've shown. Many counterexamples are provided by semidirect products (something you'll learn soon enough if you're studying elementary group theory).

For abelian groups, the concept of Ext functor allows one to classify all such extensions (given abelian groups $A,B$, "how many" groups $G$ are there with an exact sequence $0 \to B \to G \to A \to 0$ is given by $\mathrm{Ext}(A,B)$), but this is much more advanced.

• If each of A,B,C is abelian and the sequence 0 -> A -> B -> C -> 0, what would be some restrictions on A, C that would ensure that B is isomorphic to A x C? What if A and C are cyclic? – gen Oct 24 '18 at 22:27

You're correct that $A\times B$ satisfies (see here) the stated property, but in general it will not be the only such group.

The simplest example is with $A=B=\mathbb{Z}/2\mathbb{Z}$, in which case $\mathbb{Z}/4\mathbb{Z}$ also has the desired property.

Your idea about the direct product working is true. The general idea you are looking for however is that of a semidirect product which refutes your claim of uniqueness in the general setting.

It's interesting to ask when the direct product is the only possibility and that can actually be answered by finding the group $\text{Ext}(B,A)$. This is know as an extension problem. We have that if $\text{Ext}(B,A)=1$ then $A\times B$ is the unique extension of $B$ by $A$.

I believe the converse is false however, but I can't think of an example at the moment. That is, there exist pairs $(B,A)$ such that $\text{Ext}(B,A)\neq 1$ but $B\times A$ is the unique (up to group isomorphism, not extension equivalence) extension of $B$ by $A$.


# How do I solve a Continued Fraction of solution to quadratic equation?

I know that it is possible to make a CF (continued fraction) for every number that is a solution of a quadratic equation but I don't know how.

The number I'd like to write as a CF is:

$$\frac{1 - \sqrt 5}{2}$$

How do I tackle this kind of problem?

-

Let's rewrite $\ \dfrac {1-\sqrt{5}}2=-1+\dfrac {3-\sqrt{5}}2$ to have something positive to evaluate then : $$\frac 1{\dfrac {3-\sqrt{5}}2}=\frac 2{3-\sqrt{5}}=\frac {2(3+\sqrt{5})}{(3-\sqrt{5})(3+\sqrt{5})}=\frac {2(3+\sqrt{5})}{9-5}=\frac {3+\sqrt{5}}{2}=2+\frac {\sqrt{5}-1}{2}$$ (we want the term at the right to be between $0$ and $1$ at each stage)

You may continue this process until repetition !

You should get : $$\dfrac {1-\sqrt{5}}2=-1+\cfrac 1{2+\cfrac 1{1+\cfrac 1{1+\ddots}}}$$

-
So this solution is [-1;2,1,1,...], isn't that different from the one in the post above? – Spyral Aug 23 '12 at 18:51
@Spyral: Sasha has a minus sign over the whole C.F. I have only the integer part with a sign (both results are correct, perhaps that this one is more common...) – Raymond Manzoni Aug 23 '12 at 18:57
That confused me indeed.. I thought a C.F. was UNIQUE.. so your solution being [-1,2,1,1,...], sasha's being -[0;1,1,...] and Brian M. Smiths being [0;1,1,...] is kind of confusing me =/ – Spyral Aug 23 '12 at 19:08
Even though all these methods might be correct, this one was the clearest to me, thanks – Spyral Aug 23 '12 at 19:12
@Spyral: There are many types of continued fraction. The standard one in Number Theory is the simple continued fraction given in the very nice answer by Raymond Manzoni. For these, there is almost a uniqueness theorem (depending on how you define things, a rational will have two simple continued fraction expansions that are minor variants of each other). For generalized continued fractions, there is definitely not uniqueness. – André Nicolas Aug 23 '12 at 19:14

Suppose $x$ is a root of $p(z) = z^2 - b z - c$. Then, diving $p(z)$ over $z$ and solving that for $z$ gets us $$z = b+ \frac{c}{z}$$ Iterating: $$z = b + \cfrac{c}{b + \cfrac{c}{z}} = \cfrac{b}{c + \cfrac{c}{b+ \ddots}}$$ Since $\frac{1-\sqrt{5}}{2}$ is a root of $z^2 - z -1$ we have: $$\frac{1-\sqrt{5}}{2} = -\frac{1}{\frac{1+\sqrt{5}}{2}} = - \cfrac{1}{1 + \cfrac{1}{1+ \frac{1}{1+\ddots}}}$$

Added: Consider a sequence, defined by $x_{n+1} = b + \frac{c}{x_n}$, with $x_0 = \frac{c}{y}$. Few initial terms of the sequence are $\frac{c}{y}$, $b + y$, $b + \cfrac{c}{b+y}$, $b + \cfrac{c}{b + \cfrac{c}{b+y}}$, etc. It is well known that terms of this sequence can also be obtained as a ratio of two solutions, $a_n$ and $b_n$ to the following recurrence equation: $$v_{n} = b v_{n-1} + c v_{n-2} \tag{1}$$ with initial conditions $a_0=y$, $a_1 = c$ and $b_0 = 1-\frac{b}{c} y$, $b_1 = y$. Then $x_n = \cfrac{a_n}{b_n}$. The solution to $(1)$ has the form: $$v_{n} = v_0 \frac{z_1 z_2^n - z_2 z_1^n}{z_1-z_2} + v_1 \frac{z_1^n - z_2^n}{z_1-z_2}$$ where $z_1$ and $z_2$ are the two roots of $z^2 - b z -c = 0$. Assume $z_2>z_1$. In the large $n$ limit, $$\lim_{n \to \infty} x_n = \lim_{n \to \infty} \frac{a_n}{b_n}= \lim_{n\to \infty} \frac{a_1 (z_1^n - z_2^n) + a_0 (z_1 z_2^n - z_1^n z_2)}{b_1 (z_1^n - z_2^n) + b_0 (z_1 z_2^n - z_1^n z_2)} = \frac{a_0 z_1 - a_1}{b_0 z_1 - b_1} = \frac{c (c- y z_1)}{c (y - z_1) + b y z_1}$$ In the case at hand $x_0 = \infty$ and $x_1 = b$, corresponding to the limit of $y \to \infty$, in which case the value of the continued fraction becomes: $$\lim_{n \to \infty} x_n = \lim_{y \to 0} \frac{c (c- y z_1)}{c (y - z_1) + b y z_1} = - \frac{c}{z_1} = z_2$$

-
The result of the continued fraction will be the larger of two roots. With $b>0$ and $c>0$ both roots are real. – Sasha Aug 23 '12 at 18:49
How do you get the other root? Can you give some intuition about why, when you pass from the iterations to the limit, one of the roots "disappears"? – Rahul Aug 23 '12 at 18:52
@RahulNarain The product of roots of the quadratic polynomial is the free term. Thus, the smaller root is $z_2 = -\frac{c}{z_1}$. – Sasha Aug 23 '12 at 18:54
OK, but that doesn't answer my second question, because surely $z_2$ also satisfies $z=b+c/z$, $z = b+c/(b+c/z)$, and so on. – Rahul Aug 23 '12 at 19:03
@RahulNarain I have expanded the post, addressing your second question now. – Sasha Aug 23 '12 at 19:26

The general procedure is as follows for positive $x$. Let $x_0=x$, and let $[a_0;a_1,a_2,\dots]$ be the desired CF expansion. Then $a_0=\lfloor x_0\rfloor$. Given $x_n$ and $a_n$, let $$x_{n+1}=\frac1{x_n-a_n}$$ and $a_{n+1}=\lfloor x_{n+1}\rfloor$.

Since $\frac12(1-\sqrt5)$ is negative, let’s work with its absolute value, $x=\frac12(\sqrt5-1)$. Clearly $0\le x<1$ so $a_0=0$. Then $$x_1=\frac1x=\frac2{\sqrt5-1}=\frac{2(\sqrt5+1)}4=\frac{1+\sqrt5}2\;;$$ so $$\lfloor x_1\rfloor=\left\lfloor\frac{1+\sqrt5}2\right\rfloor=1\;,$$ since $2\le\sqrt5<3$, and $a_1=1$.

Now $$x_2=\frac1{x_1-1}=\frac2{\sqrt5-1}=x_1\;,$$ so everything repeats: $a_2=1$, $x_3=x_1$, $a_3=1$, etc. Thus, $x=[0;1,1,1,\dots]$, and your number is the negative of this.

-


# Math

A radioactive substance decays according to the formula
Q(t) = Q0e−kt
where Q(t) denotes the amount of the substance present at time t (measured in years), Q0 denotes the amount of the substance present initially, and k (a positive constant) is the decay constant.
(a) Find the half-life of the substance in terms of k.

(b) Suppose a radioactive substance decays according to the formula
Q(t) = 36e−0.0001074t
How long will it take for the substance to decay to half the original amount? (Round your answer to the nearest whole number.)

1. 👍 0
2. 👎 0
3. 👁 1,867
1. .5 = e^-k T
ln .5 = - k T

T = -.693/-k = .693/k

b)
T = .693 / .0001074 = 6454 years

1. 👍 0
2. 👎 3
2. A radioactive substance decays according to the formula
Q(t) = Q0e−kt
where Q(t) denotes the amount of the substance present at time t (measured in years), Q0 denotes the amount of the substance present initially, and k (a positive constant) is the decay constant.
(a) Find the half-life of the substance in terms of k.

(b) Suppose a radioactive substance decays according to the formula
Q(t) = 36e−0.0001238t
How long will it take for the substance to decay to half the original amount? (Round your answer to the nearest whole number.)

1. 👍 0
2. 👎 0

## Similar Questions

1. ### calculus

A sample of a radioactive substance decayed to 94.5% of its original amount after a year. (Round your answers to two decimal places.) (a) What is the half-life of the substance? (b) How long would it take the sample to decay to

2. ### algebra 2

In the formula A(t) = A0ekt, A is the amount of radioactive material remaining from an initial amount A0 at a given time t, and k is a negative constant determined by the nature of the material. An artifact is discovered at a

3. ### calculus

assume the half-life of the substance is 31 days and the initial amount is 183.9 grams. (a) Fill in the right hand side of the following equation which expresses the amount A of the substance as a function of time t (the

4. ### Calc

A sample of a radioactive substance decayed to 93.5% of its original amount after a year. a) What is the half-life of the substance? ? years (b) How long would it take the sample to decay to 10% of its original amount? ? years

1. ### precalculus

Twenty percent of a radioactive substance decays in ten years. By what percent does the substance decay each year?

2. ### Exponential Modeling

The half-life of a radioactive substance is one day, meaning that every day half of the substance has decayed. Suppose you have 100 grams of this substance. How many grams of the substance would be left after a week?

3. ### Calculus

The radioactive element polonium decays according to the law given below where Q0 is the initial amount and the time t is measured in days. Q(t) = Q0 · 2-(t/140) If the amount of polonium left after 700 days is 45 mg, what was

4. ### Calculus-Modeling Equations

An unknown radioactive element decays into non-radioactive substances. In 420 days the radioactivity of a sample decreases by 39 percent. 1.What is the half-life of the element? 2.How long will it take for a sample of 100 mg to

1. ### Calculus

The rate of decay is proportional to the mass for radioactive material. For a certain radioactive isotope, this rate of decay is given by the differential equation dm/dt = -.022m, where m is the mass of the isotope in mg and t is

2. ### calculus

radioactive Carbon 14 in a dead organism decays according to the equation A=A e^.000124t where t is in years and A0 is the amount at t=0. Estimate the age of a skull uncovered in an archeological site if 10% of the original Carbon

3. ### mathematics

The exponential formula for the half-life of a radioactive isotope is y=y0ekt, where y is the amount of the isotope remaining after t years, y0 is the initial amount of the isotope, k is the decay constant, and e is the

4. ### Math/Calculus

After 5 days, a particular radioactive substance decays to 37% of its original amount. Find the half life of this substance. Is this right? Th= ln 2/ln(1/.37) x 5 days


Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

# Tag Info

14

The way I have explained the fundamental theorem of arithmetic in the past is by establishing what it means to be prime (has exactly two positive divisors) and then having students construct factor trees (where the prime factors at the end are circled). The prime definition avoids some of the caveat-language otherwise seen ("a number only divisible by ...

14

It might not be possible to get your brother to arrive at the proof himself, no matter how much you scaffold it. ("You can lead a horse to water" and all that.) If he's into maths and appreciates a good proof, you might get the desired enthusiasm by just showing him the proof! That said, here's an idea. Forget primes for a moment, and think about ...

14

I think it turns out that "perfect" numbers do not interact much with other parts of number theory. Some of these very old, elementary, very ad-hoc definitions of special classes of integers have proven (and will prove) to interact interestingly with other ideas, but some seem not to. It's not easy for a beginner to guess the significance or subtlety of one ...

13

I don't really answer the question but: why do you want your brother to come to the answer right now? Now, your brother understands that, to prove that the set of prime numbers is infinite, you can assume it is finite. And, from this pool of prime numbers, you can construct a new one that is not in the family. Why don't you let your brother play with that ...

12

This is indeed tricky, and it seems to me the most effective way (in far more general, similar situations) is to show them the problem would be to have them apply their method to another, close problem where the answer is actually opposite. Either they will explain why it does not apply there, and you can argue that the difference is subtle enough to warrant ...

11

To really understand why the integers $\mathbb{Z}$ have unique prime factorization, it helps to understand how unique prime factorization can fail in other settings. For example, $$(2 + \sqrt{10}) \cdot (2 - \sqrt{10}) = -6 = -2 \cdot 3,$$ so prime factorizations in $\mathbb{Z}[\sqrt{10}] = \{a + b\sqrt{10}: a, b \in \mathbb{Z}\}$ aren't unique. On the other ...

10

What's wrong is that most of the justification is missing. Why can $N = p^2/q^2$ only happen if $q^2 = 1$? This can be justified using the fundamental theorem of arithmetic (which states that integers have unique prime factorization), but that justification needs to be made explicit, and they need to make sure that the fundamental theorem of arithmetic has ...

10

I would recommend Python combined with SageMath, as already recommended by Joseph O'Rourke, or rather SageMath and Python comes naturally. Python is a modern, and widely used, interpreted language (no compilation needed) it supports big integers via the bignum type. (But using SageMath I think this is tangential, I mention it for completeness mainly.) ...

9

The two statements aren't literally "the same", because as the student observed, they say different things. However, they are logically equivalent: each implies the other. (Similarly, "4/2" isn't literally the same expression as "5 - 3", but they provably represent the same number.) If we could only prove things by repeating the same statement, we couldn't ...

9

Maybe the issue is that if the values you're multiplying have units, then the result of multiplying will have the product of those units. Therefore, your result can't really be equivalent to a value in the base set, because the units are different. Therefore, if applying this to the real world, I suggest considering the repeated-addition interpretation (...

8

There is some value beyond the algorithm to insist on the fact that quotient and remainder in an Euclidean division are uniquely determined as soon as one settles on some convention on the remainder. What they are exactly depends on ones convention (non-negative remained, smallest absolute value, or still something else) but if one fixes a convention then ...

8

Another classic is the following: A rectangular floor measures $300 \text{ cm} \times 195 \text{ cm}$. What is the largest square tiles that can be used to cover the floor exactly?

8

Going back to Euclid, I have found questions such as `Given a large supply of rods of length $15$ and $21$, what lengths can be measured?' can appeal to students. This also motivates the result $\gcd(a,b) = ra+sb$ of the (extended) Euclidean Algorithm.

8

Some nice geometrical applications arise in the analysis of periodical curves such as Roulettes (Spirograph curves), Star Polygons, etc. Concrete experience with implementations in toys like Spirograph also provides excellent motivation for more abstract concepts such as cyclic groups.

8

I wrote an article for NCTM's grades 8-14 journal, The Mathematics Teacher, which is about building towards ${\rm F}\ell{\rm T}$ by thinking through ways in which the following statement can be generalized: If you subtract a natural number from its square, then the result is even. I wrote more about this in some earlier StackExchange posts, e.g., MESE ...

8

What is the name of this subdiscipline in math education? In one of the comments, Dave L Renfro has a reference to Piaget, whose work was primarily done with younger schoolchildren. With respect to extending this work into the older years of one's education, a potentially good place to look would be APOS Theory, which is due to Ed Dubinsky and collaborators....

7

(Summary: I would suggest exploring it flexibly, but ensuring students also know the "rigid" version.) Rather than directly addressing Euclid's algorithm for the $\gcd$ of two whole numbers, I believe one witnesses similar phenomena when covering the standard algorithm for division. For example, I observe analogs with your remarks of: The flexible method ...

7

Mathematically, even perfect numbers give a good number theory example to the general idea of classification, i.e. all even perfects have a specific form. I use perfect numbers in my number theory class for two or three pedagogical reasons: with some trial and error (and the help of some computational software), I have the students essentially discover ...

7

Wilson's Theorem is very powerful for proving things related to quadratic residues, and I think also in general a good theoretical tool. Motivating it by just saying "hey let's multiply everything together" seems very reasonable and even playful. Why is this theoretical? It is basically saying that if you multiply all units together you get a specified ...

7

The way I understand the question is: If students are not taught fractions, but instead formal deductive proofs of properties of natural numbers, would they learn mathematics better? I find it unlikely. Students struggle with fractions in primary school. Students usually struggle with proofs in gymnasium or university. It seems unlikely that primary school ...

6

I think using actual small primes actually detracts from finding the solution. If you are thinking about finding a number that is not divisible by 2,3, or 5, it is easy to come up with one (11) without having to use a formula. Thus, I would get him thinking about primes more symbolically. Given 3 primes, $p_1, p_2, p_3$ what is their LCM? What is ...

6

You probably already know that $1/\zeta(2)$ is the probability of two "random" integers being relatively prime. Since this constant is related to number theory, you should expect any proof of the Basel formula to be hard work. Probably the best proof from the point of view of transparency is obtained by evaluating \int_0^1\int_0^1 \frac{1}{1-xy}{\rm d}x{\...

6

What computer languages might one recommend for, say, investigations in number theory? I find Mathematica ideal, e.g.: "Mod sequences that seem to become constant; and the number 316" "Does 53 diverge to infinity in this Collatz-like sequence?" But: (a) there is a huge start-up learning curve, and (b) Mathematica is not free. Because of the latter, I ...

6

Here's a word problem for the greatest common divisor: 12 boys and 15 girls are to march in a parade. The organizer wants them to march in rows, with each row having the same number of children, and with each row composed of children with the same gender. What is the largest number of children per row that satisfies these constraints? There should be $\... 6 I've heard very good reviews of the 2017 book, "An Illustrated Theory of Numbers" by MH Weissman. The book's main site is here; a write-up, along with some reviews, by the American Mathematical Society can be found here. To quote from the latter (emphasis added by me): An Illustrated Theory of Numbers gives a comprehensive introduction to number theory, ... 5 Euler's original heuristic may "fly" with people who don't know about calculus: just as polynomials (e.g., with all real roots) are essentially products of linear factors$x-\alpha$where$\alpha$runs through the roots, one might imagine that$\sin \pi z$(using radian measure) is a products of something like$1-{z\over n}$for$n$non-zero integer, and ... 5 I like to ask my probability students the question: If you pick an integer between 2 and 100 uniformly at random, what's the probability that it's the average of two (not necessarily different) primes? I like that above question (easily equivalent to Goldbach) because there's no preference for even versus odd numbers as in Goldbach. It also gets ... 5 I am not sure whether this really answers your question, but I could think of the following strategy of introducing these sets of numbers. It is not based on any kind of research and just based on personal experience with first year university students where I sometimes give something similar as a "naive idea" in addition to the proper definitions. The ... 5 Some caveats: I own both books, and have taken number theory courses up to graduate level. Also, your questions are clearly somewhat subjective: what is difficult, relevant or complete for one person, depends on their previous exposure, inclination, course content, and ability. So...in my opinion.. both books are classics, which means they have been around ... 5 Look at patterns in decimal expansions: what is the period of the repeating decimal of$1/n$? From numerical data, the period is at most$n-1$, and you only get equality when$n = p$is prime (but not conversely:$1/11$has decimal period$2$, not$10$). If you look at the period of the decimal of$1/p$for primes$p$besides$2$and$5\$, you find that ...

Only top voted, non community-wiki answers of a minimum length are eligible


# Coefficient of $x^3$ in expansion of $\frac{1}{e^x\cdot (1+x)}$

If $|x|<1$, then what is the coefficient of $x^3$ in expansion of $\dfrac{1}{e^x\cdot (1+x)}$?

My Try: So I rewrote this by taking $e^x$ to the numerator to get $\frac{e^{-x}}{(1+x)}$. My problem is, how can I deduce the coefficient of $x^3$ here, since I would need to divide the numerator by the denominator, which is a cumbersome task. Is there a simpler way? How can I solve problems like these? I'd love to know.

• You just need that term. Do a few steps of the long division. – Hellen Sep 3 '17 at 14:08
• Is really long division the only method? What if I was asked the coefficient of $x^200$? I would certainly not divide then. There has to be another, more logical way. – Tanuj Sep 3 '17 at 14:09
• Not all the terms of all Taylor series have nice expressions. Some of them may take a lot of effort. I, too, hate it when I need to calculate the $x^5$ term of $\tan x$. Here you can also rewrite $1/(1+x)=1-x+x^2-x^3+\cdots$ and multiply that term-by-term with the series of $e^{-x}$. This is still easy. – Jyrki Lahtonen Sep 3 '17 at 14:12
• @JyrkiLahtonen But in this case, both Taylor series are as nice as it gets... – Clement C. Sep 3 '17 at 14:17
• @ClementC. Quite. But I still wouldn't want to calculate the $x^{200}$ term :-) – Jyrki Lahtonen Sep 3 '17 at 14:50

Hint. Note that $$\frac{1}{e^x\cdot(1+x)}=\frac{e^{-x}}{1-(-x)}=\left(\sum_{n=0}^{\infty} \frac{(-x)^n}{n!}\right)\cdot \left(\sum_{n=0}^{\infty} {(-x)^n}\right)\\ =\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}+o(x^3)\right)\cdot \left(1-x+x^2-x^3+o(x^3)\right).$$ Can you take it from here?

P.S. Along the same lines, it can be seen that, more generally, the coefficient of $x^n$ in the expansion of $\frac{1}{e^x\cdot(1+x)}$ is $$\sum_{k=0}^n\frac{(-1)^k}{k!}\cdot (-1)^{n-k}=(-1)^n\sum_{k=0}^n\frac{1}{k!}.$$ See the Cauchy product wiki page.

• Okay, I see, but how does that help me? You know if there were two terms in the numerator and one in denominator I could easily solve. But not in this case. – Tanuj Sep 3 '17 at 14:11
• @Tanuj Now you have to expand the product. – Robert Z Sep 3 '17 at 14:14

\begin{eqnarray*} \frac{e^{-x}}{1+x} &=&\left(1-x+\frac{x^2}{2}-\frac{x^3}{6}+\cdots \right) (1- x+x^2-x^3+\cdots ) \\ &=& \cdots +x^3 \underbrace{\left( -1-1-\frac{1}{2}-\frac{1}{6}\right)}_{\color{blue}{-\frac{8}{3}}}+ \cdots \end{eqnarray*}

• Can you explain what exactly did you do? – Tanuj Sep 3 '17 at 14:12
• Wow a eureka moment for me! You used that result of infinite Geometric Progression, right? – Tanuj Sep 3 '17 at 14:14
• Just used the standard expansions for the functions ... – Donald Splutterwit Sep 3 '17 at 14:16

From the two Taylor series at $0$, to order $x^3$:$$e^{-x} = 1-x+\frac{x^2}{2}-\frac{x^3}{6} + o(x^3) \tag{1}$$ and $$\frac{1}{1+x} = 1-x+x^2-x^3+o(x^3)\tag{2}$$ we obtain \begin{align} \frac{e^{-x}}{1+x} &= \left(1-x+\frac{x^2}{2}-\frac{x^3}{6} + o(x^3)\right)\left(1-x+x^2-x^3+o(x^3)\right)\\ &= 1-x+x^2-x^3+o(x^3) - x+x^2-x^3+\frac{x^2}{2}-\frac{x^3}{2}-\frac{x^3}{6}\\ &= 1-2x+\frac{5}{2}x^2{\color{red}{-\frac{8}{3}}}x^3 +o(x^3) \end{align} and you can just read off the coefficient.

Note that when expanding the product, we could have focused on only the terms $x^3$ (it would have been marginally faster, but would have required keeping track); and didn't expand any term $x^k$ with $k>3$, since anyway they are "swallowed" by the $o(x^3)$.


# Limits of volume integrals

#### GreenGoblin

##### Member
Help choose the limits of the following volume integrals:

1) V is the region bounded by the planes x=0,y=0,z=2 and the surface z=x^2 + y^2 lying the positive quadrant. I need the limits in terms of x first, then y then z AND z first, then y and then x. And also polar coordinates, x=rcost, y=rsint, z=z.

I am trying to convince myself

2) V is the region bounded by x+y+z=1, x=0, y=0, z=0.

#### CaptainBlack

##### Well-known member
Help choose the limits of the following volume integrals:

1) V is the region bounded by the planes x=0,y=0,z=2 and the surface z=x^2 + y^2 lying the positive quadrant. I need the limits in terms of x first, then y then z AND z first, then y and then x. And also polar coordinates, x=rcost, y=rsint, z=z.

I am trying to convince myself

2) V is the region bounded by x+y+z=1, x=0, y=0, z=0.
The region V is the volume above the parabaloid surface $$z=x^2+y^2$$ and below $$z=2$$ in the first quadrant. The projection of this region onto the x-y plane is that part of the circle $$x^2 + y^2=2$$ in the first quadrant.

So this is $$x\in (0,\sqrt{2})$$ and $$y \in (0, \sqrt{2-x^2})$$ and $$z \in ( \sqrt{x^2+y^2} , 2)$$

CB

#### HallsofIvy

##### Well-known member
MHB Math Helper
(I assume that by "x first, then y then z" you are referring to going from left to right. Of course, the integration is in the opposite order.)

"x first, then y then z" is pretty much the usual way to do an integral like this. Note that if we project into the xy-plane, the upper boundary projects to the circle $x^2+ y^2= 2$, a circle of radius $2$, centered at (0, 0) and in the first quadrant that is a quarter circle. In order to cover that entire figure, clearly x has to go from 0 to $\sqrt{2}$. Now, for each x, y must go from the x-axis, y= 0, up to the circle, $y= \sqrt{2- x^2}$. And, finally, for any given (x,y), z must go from the paraboloid, $z= x^2+ y^2$, to z= 2. The integral would be $\int_{x=0}^\sqrt{2}\int_{y= 0}^\sqrt{2- x^2}\int_{z= x^2+ y^2}^2 f(x,y,z)dzdydx$.

In the other order, z first, then y and then x, project to the yz- plane. There, of course, the paraboloid project to half of the parabola $z= y^2$. Now, z goes from 0 to 2 and, for each z, y goes from 0 to $\sqrt{z}$. Now, for each y and z, x goes from 0 to $\sqrt{2- y^2}$. The integral would be $\int_{z=0}^2\int_{y= 0}^\sqrt{z}\int_{x= 0}^\sqrt{2- y^2} f(x,y,z)dxdydz$.

For V is the region bounded by x+y+z=1, x=0, y=0, z=0, with the order "x first, then y then z", we project to the xy-plane which gives the triangle bounded by x= 0, y= 0, and x+ y= 1. x ranges from 0 to 1 and, for each x, y ranges from 0 to 1- x. For each (x, y), z ranges from 0 to 1- x- y. The integral would be $\int_{x= 0}^1\int_{y= 0}^{1- x}\int_{z= 0}^{1- x- y} f(x,y,z) dzdydx$. Can you get it for the order "z first, then y then x"?

Last edited:


# Variance of alternate flipping rounds

I did the following exercise, but I would like to extend the question to the variance of the variate.

Bob and Bub each has his own coin. Chance of coming up "heads" is $\rho$ for Bob's coin and $\tau$ for Bub's. They flip alternatively, first Bob, then Bub, then Bob again, etc. Let Bob's flip followed by Bub's flip constitute a round, and let $R$ denote the number of rounds until each gets "heads" at least once. For $\rho = 1/3$, $\tau = 2/5$, what is the expectation of $R$?

General answer for the expectation is:

$$\mathbb{E}[R]=\frac{1 + \frac{\rho}{\tau} + \frac{\tau}{\rho} - (\rho + \tau)}{\rho + \tau - \rho \, \tau}$$

This agrees with Monte Carlo simulation I did (with $10^5$ repeats), which approximates expectation and variance (with $\rho = 1/3$, and $\tau = 2/5$) to $3.84647$ and $6.48666$ respectively.

Is anybody able to calculate variance symbolically?

• Out of curiosity, where does your expected value formula come from?
– Remy
Dec 1, 2017 at 0:23
• @Remy I derived it. In a nutshell, $R$ is distributed geometrically with parameter $p = \rho + \tau - \rho \, \tau$ (probability of success of either one of them) plus a geometric variate with parameter $p = \rho$ and weighted with probability $\mathbb{P}\{\text{Bob didn't have success, but Bub did} \, | \, \text{either had}\}$ plus a similar variate for the reverse case.
– BoLe
Dec 2, 2017 at 12:51

Please load the page $$2\sim3$$ times for the hyperlinks to work properly.

# Outline

Setup the Notations : As titled.

Solution.1 : Direct application of the conditional decomposition of expectation. This is the foolproof approach if one wants a quick numeric evaluation and doesn't want to be bothered with analysis.

Solution.2 : A framework that provides perspectives and better calculation.

Appendix.A : Supplementary material to Solution.1.

Appendix.B.1 : In-site links to existing questions that are closely related.

Appendix.B.2 : Supplementary material to Solution.2.

# Setup the Notations

Let $$X$$ be the total number of trials of Bob's flips when his first head (success) appears.

Let $$Y$$ be that for Bub. We have $$X\sim \mathrm{Geo}[\rho]$$ independent to $$Y\sim \mathrm{Geo}[\tau]$$.

The following basics for a Geometric distribution will be useful here: \begin{align*} \mu_{_X} &\equiv \mathbb{E}[X] = \frac1{\rho} & & \tag*{Eq.(1)} \label{Eq01} \\ A_X &\equiv \mathbb{E}[X(X+1)] = \frac2{ \rho^2 } & &\tag*{Eq.(2)} \label{Eq02} \\ S_X &\equiv \mathbb{E}[X^2 ] = \frac{2 - \rho}{ \rho^2 } & &\tag*{Eq.(3)} \label{Eq03} \\ V_X &\equiv \mathbb{V}[X] = \frac{1 - \rho}{ \rho^2 } & &\tag*{Eq.(4)} \label{Eq04} \\ Q_X &\equiv \mathbb{E}[(X+1)^2] = A_X + \mu_{_X} + 1 = \frac{ 2 + \rho + \rho^2 }{ \rho^2 } & &\tag*{Eq.(5)} \label{Eq05} \end{align*} Recall that we often use $$A_X$$ to obtain $$S_X$$ because $$A_X$$ is easier to derive (it is a more natural quantity for the Geometric distribution).

The shorthands for $$Y$$ are the same $$\mu_{_Y}$$ and $$V_Y$$ etc.

# Solution.1

Just like how the expectation can be derived (which apparently you know how to), the 2nd moment (thus variance) can be obtained by conditioning on the results of the round. Denote the events of $$\{ \text{Bob head, Bub tail} \}$$ as just $$HT$$, and recall that $$X$$ is for Bob flipping alone as if Bub doesn't exist. \begin{align*} \mathbb{E}[ R^2 ] &= \rho \tau \, \mathbb{E}\left[ R^2 \,\middle|~ HH\right] + (1 - \rho)(1 - \tau)\,\mathbb{E}\left[ R^2 \,\middle|~ TT\right] \\ &\hspace{36pt} + \rho (1 - \tau) \, \mathbb{E}\left[ R^2 \,\middle|~ HT\right] + \tau (1 - \rho)\,\mathbb{E}\left[ R^2 \,\middle|~TH\right] \\ &= \rho \tau + (1 - \rho)(1 - \tau)\,\mathbb{E} \left[ (1+R)^2 \right] + \rho (1 - \tau) \, \mathbb{E}\left[ (1+Y)^2 \right] + \tau (1 - \rho)\,\mathbb{E}\left[ (1+X)^2 \right] \end{align*} Please let me know if you need justification for $$\mathbb{E}[ R^2 ~|~~TH] = \mathbb{E}[ (1+Y)^2 ]$$ and the alike. Moving on, use the \ref{Eq04} shorthand $$Q_X$$ and $$Q_Y$$ for now and rearrange. $$\mathbb{E}[ R^2 ] = \rho \tau + (1 - \rho)(1 - \tau) \left( \mathbb{E}[ R^2 ] + 2 \mathbb{E}[ R ] + 1 \right) + \rho (1 - \tau) Q_Y + \tau (1 - \rho)\,Q_X$$ Denote $$\lambda = 1 - (1 - \rho)(1 - \tau) = \rho + \tau - \rho \tau$$, and collect $$\mathbb{E}[ R^2 ]$$ on the left. $$\begin{equation*} \lambda\,\mathbb{E}[ R^2 ] = \rho \tau + (1 - \lambda) \left( 2 \mathbb{E}[ R ] + 1 \right) + \rho (1 - \tau) Q_Y + \tau (1 - \rho)\,Q_X \tag*{Eq.(6)} \label{Eq06} \end{equation*}$$ Note that the denominator of $$\mathbb{E}[ R ]$$ is just $$\lambda$$. Along with the symmetry, this suggests that the numerator of $$\mathbb{E}[ R ]$$ can be rewritten into a better form invoking the basic \ref{Eq01}. \begin{align*} 1 + \frac{ \rho }{ \tau } + \frac{ \tau }{ \rho } - (\rho + \tau) &= \bigl( 1 + \frac{ \rho }{ \tau } - \rho \bigr) + \bigl( 1 + \frac{ \tau }{ \rho } - \tau \bigr) - 1 \\ &= \frac{ \tau + \rho - \rho\tau }{ \tau } + \frac{ \rho + \tau - \rho\tau }{ \rho } - 1 \\ \implies \mathbb{E}[ R ] = \frac1{\rho} + \frac1{\tau} &- \frac1{\lambda} = \mu_{_X} + \mu_{_Y} - \frac1{\lambda} \tag*{Eq.(7)} \label{Eq07} \end{align*} It's not a coincidence that the expectation can be expressed as such. The reason will be elaborated in the next section for Solution.2.

For the sake of computing the numeric value, \ref{Eq06} was a good place to stop. With the given parameters $$\rho = 1/3$$ and $$\tau = 2/5$$, we have $$\mathbb{E}[ R ] = 23/6$$, $$Q_X = 22$$, and $$Q_Y = 16$$. That makes $$\mathbb{E}[ R^2 ] = 190/9$$ and the variance $$V_R \equiv \mathbb{E}[ R^2 ] - \mathbb{E}[R]^2 = \frac{77}{12}~.$$ See the end of Solution.2 for a Mathematica code block for the numerical evaluation and more.

One can quickly check the value of $$\mathbb{E}[ R ] \approx 3.8333$$ relative to $$\mu_{_X} = 3$$ and $$\mu_{_Y} = 2.5$$, as well as $$V_R \approx 6.146667$$ in relation to $$V_X = 6$$ and $$V_Y = 15/4$$. Both of the quantities for $$R$$ are slightly larger than the max of $$X$$ and $$Y$$, which is reasonable.

Now, if you have a strong inclination for algebraic manipulation, then the following is what you might arrive at, after some trial and error. Recall the shorthand for the 2nd moment \ref{Eq03}: $$\begin{equation*} \mathbb{E}[ R^2 ] = \frac{ 2 - \rho }{ \rho^2 } + \frac{ 2 - \tau }{ \tau^2 } - \frac{ 2 - \lambda }{ \lambda^2 } = S_X + S_Y - \frac{ 2 - \lambda }{ \lambda^2 } \tag*{Eq.(8)} \label{Eq08} \end{equation*}$$ Again, this is not a coincidence. Along with \ref{Eq07}, their respective 3rd terms seem to be another Geometric random variable with the success' parameter $$\lambda$$. The proper probabilistic analysis is the subject of Solution.2 up next.

By the way, blindly shuffling the terms around is usually not the best thing one can do. Nonetheless, just for the record, Appendix.A shows one way of going from \ref{Eq06} to \ref{Eq08} mechanically.

# Solution.2

Denote $$W \equiv \min(X,Y)$$ as the smaller among the two and $$Z \equiv \max(X,Y)$$ as the larger. The key observation to solve this problem is that $$Z \overset{d}{=} R~, \qquad\qquad \textbf{the maximum has the same distribution as the 'rounds'.}$$ This allows one to think about the whole scenario differently (not as rounds of a two-player game). For all $$k \in \mathbb{N}$$, since $$X \perp Y$$ we have \begin{align*} \Pr\{ Z = k \} &= \Pr\{ X < Y = Z = k \} \\ &\hspace{36pt} + \Pr\{ Y < X = Z = k \} \\ &\hspace{72pt} + \Pr\{ X = Y = Z = k \} \\ &= \tau (1 - \tau)^{k-1} (1 - (1-\rho)^k) \\ &\hspace{36pt} + \rho (1 - \rho)^{k-1} (1 - (1-\tau)^k) \\ &\hspace{72pt} + \rho\tau (1 - \rho)^{k-1} (1 - \tau)^{k-1} \tag*{Eq.(9)} \label{Eq09} \end{align*} In principle, now that the distribution of $$Z$$ (thus $$R$$) is completely specified, everything one would like to know can be calculated. This is indeed a valid approach (to obtain the mean and variance), and the terms involved are all basic series with good symmetry.

Note that $$Z$$ is not Geometric (while $$X$$, $$Y$$, and $$W$$ are), nor is it Negative Binomial. At this point, it is not really of interest that \ref{Eq09} can be rearranged into a more compact and illuminating form ...... because we can do even better.

There are two more observations that allow one to not only to better calculate but also understand the whole picture. \begin{align*} &X+Y = W + Z \tag*{Eq.(10)} \label{Eq10} \\ &W \sim \mathrm{Geo[\lambda]} \tag*{Eq.(11)} \label{Eq11} \end{align*} This is the special case of the sum of the order statistics being equal to the original sum. In general with many summands this not very useful, but here with just two terms it is crucial.

Back to the two-player game scenario, the fact that $$W$$ is Geometric with success probability $$\lambda = 1 - (1 - \rho)(1 - \tau)$$ is easy to see: a round 'fails' if and only if both flips 'fail', with a probability $$(1 - \rho)(1 - \tau) = 1 - \lambda$$.

The contour of $$W = k$$ is L-shaped boundary of the '2-dim tail', which fits perfectly with the scaling nature (memoryless) of the joint of two independent Geometric distribution. Pleas picture in the figure below that $$\Pr\left\{W = k_0 + k ~ \middle|~~ W > k_0 \right\} = \Pr\{ W = k\}$$ manifests itself as the L-shape scaling away.

The contour of $$Z = k$$ looks like $$\daleth$$, and together with the L-contour of $$W$$ they make a cross. This is \ref{Eq10} the identity $$X+Y = W+Z$$, visualized in the figures below. See Appendix.B.1 for the linked in-site posts of related topics.

Immediately we know the expectation to be: $$\begin{equation*} \mathbb{E}[ Z ] = \mathbb{E}[ X + Y - W ] = \mu_{_X} + \mu_{_Y} - \mu_{_W} = \frac1{\rho} + \frac1{\tau} - \frac1{\lambda} \tag*{Eq.(7.better)} \end{equation*}$$

This derivation provides perspectives different from (or better, arguably) those obtained by conditioning on the first round.

Derivation of the 2nd moment reveals a more intriguing properties of the setting. \begin{align*} \mathbb{E}[ Z^2 ] &= \mathbb{E}[ (X + Y - W)^2 ] \\ &= \mathbb{E}[ (X + Y)^2 ] + \mathbb{E}[ W^2 ] - 2\mathbb{E}[ (X + Y) W ] \\ &= \mathbb{E}[ X^2 ] + \mathbb{E}[ Y^2 ] + 2 \mathbb{E}[ XY ] + \mathbb{E}[ W^2 ] - 2\mathbb{E}[ (W+Z) W ] \qquad\because X+Y = W+Z\\ &= \mathbb{E}[ X^2 ] + \mathbb{E}[ Y^2 ] - \mathbb{E}[ W^2 ] + 2\mathbb{E}[ XY ] - 2\mathbb{E}[ WZ ] \end{align*} Here's the kicker: when $$X \neq Y$$, by definition $$W$$ and $$Z$$ each take one of them so $$WZ = XY$$, and when $$X = Y$$ we have $$WZ = XY$$ just the same!! Consequently, $$\mathbb{E}[ ZW ] = \mathbb{E}[ XY ] =\mu_{_X} \mu_{_Y}$$ always, and they cancel. $$\begin{equation*} \mathbb{E}[ Z^2 ] = \mathbb{E}[ X^2 ] + \mathbb{E}[ Y^2 ] - \mathbb{E}[ W^2 ] = \frac{ 2 - \rho }{ \rho^2 } + \frac{ 2 - \tau }{ \tau^2 } - \frac{ 2 - \lambda }{ \lambda^2 } \tag*{Eq.(8.better)} \label{Eq08better} \end{equation*}$$ This is the proper derivation, and in \ref{Eq08} the 3rd term following $$S_X + S_Y$$ is indeed $$-S_W$$.

Keep in mind that both $$W$$ and $$Z$$ are clearly correlated with $$X$$ and $$Y$$, while our intuition also says that the correlation between $$W$$ and $$Z$$ is positive (see Appendix.B for a discussion).

While we're at it, this relation in fact holds true for any (higher) moments, $$\mathbb{E}[ Z^n ] = \mathbb{E}[ X^n ] + \mathbb{E}[ Y^n ] - \mathbb{E}[ W^n ]~.$$This is true due to the same argument that gave us $$WZ = XY$$, and using \ref{Eq09} doing the explicit sums to derive this identity is also easy.

Without further ado, the variance of $$Z$$ (thus the variance of $$R$$), previously known only as the unsatisfying "\ref{Eq06} minus the square of $$\mathbb{E}[ Z ]$$'', can now be put in its proper form. \begin{align*} V_Z &\equiv \mathbb{E}[ Z^2 ] - \mathbb{E}[ Z ]^2 \\ &= \mathbb{E}[ X^2 ] + \mathbb{E}[ Y^2 ] - \mathbb{E}[ W^2 ] - ( \mu_{_X} + \mu_{_Y} - \mu_{_W} )^2 \\ &= V_X + V_Y - V_W + 2( \mu_{_W} \mu_{_Z} - \mu_{_X} \mu_{_Y}) \tag*{Eq.(12.a)} \\ &= \frac{ 1 - \rho }{ \rho^2 } + \frac{ 1 - \tau }{ \tau^2 } - \frac{ 1 - \lambda }{ \lambda^2 } + 2\left( \frac1{ \lambda } \bigl( \frac1{ \rho } + \frac1{ \tau } - \frac1{ \lambda } \bigr) - \frac1{ \rho \tau }\right) \tag*{Eq.(12.b)} \end{align*} This expression (or the symbolic one just above) is a perfectly nice formula to me. You can rearrange it to your heart's content, for example, like this $$\begin{equation*} V_Z = \bigl( \frac1{ \rho } - \frac1{ \tau } \bigr)^2 - \frac1{ \lambda^2 } + 2 (\frac1{\lambda} - \frac12) \bigl( \frac1{ \rho } + \frac1{ \tau } - \frac1{ \lambda } \bigr) \tag*{Eq.(12.c)} \end{equation*}$$ which emphasizes the role played by the difference between $$X-Y$$.

I'm not motivated to pursue a 'better' form beyond Eq.(12), and if anyone knows any alternative expressions that are significant either algebraically or probabilistically, please do share.

Let me conclude with a Mathematica code block verifying the numeric values and identities for the variance, the 2nd moment, as well as the earliest algebra of the conditioning of expectation.

(* t = \tau, p = \rho, m = E[R],  S = E[R^2] , h = \lambda = 1-(1-p)(1-t) *) ClearAll[t , p, m, S, V, h, tmp, simp, sq, var, basics]; basics[p_] := {1/p, (1 - p)/p^2, (2 - p)/p^2, (2 + p + p^2)/ p^2};(* EX, VX, E[X^2], E[(1+X)^2]*)
Row@{basics[1/3], Spacer@10, basics[2/5], Spacer@10, basics[1 - (1 - 1/3) (1 - 2/5)]}
simp = Simplify[#, 0 < p < 1 && 0 < t < 1] &; h = 1 - (1 - p) (1 - t); m = (1 + t/p + p/t - (t + p))/h; sq[a_] := (2 - a)/a^2;(* 2nd moment of a Geometric distribution *) var[a_] := (1 - a)/a^2;
S = tmp /. Part[#, 1]&@Solve[tmp == p t + (1 - p) (1 - t) (1 + 2 m + tmp) + p (1 - t) (1 + 2/t + sq@t) + (1 - p) t (1 + 2/p + sq@p), tmp] //simp (* this simplification doesn't matter ... *)
V = S - m^2 // simp (* neither does this. *)
{tmp = V /. {p -> 1/3, t -> 2/5}, tmp // N} (* below: veryfiy the various identities for 2nd moment and variance. Difference being zero means equal *)
{sq@t + sq@p - sq@h - S, var@p + var@t - var@h + 2 m 1/h - 2/(p t) - V, (1/p - 1/t)^2 - 1/h^2 + 2 (1/p + 1/t - 1/h) (1/h - 1/2) - V} // simp
`

$$\large\textbf{Appendix.A: }\normalsize\text{an algebraic route from \ref{Eq06} to \ref{Eq08}}$$

Consider \ref{Eq06} one part at a time. First, the $$2(1 - \lambda)\, \mathbb{E}[ R ]$$. From the the first line to the 2nd line, $$1 - \lambda = (1 - \rho)(1 - \tau)$$ is inserted for the 2nd term: \begin{align*} 2(1 - \lambda)\, \mathbb{E}[ R ] &= 2(1 - \lambda )\frac{ - 1}{\lambda} + 2(1 - \lambda) \bigl( \frac1{ \rho } + \frac1{ \tau } \bigr) \\ &= 2\frac{\lambda - 1}{\lambda} + \frac{2(1 - \rho ) }{ \rho }(1 - \tau) + (1 - \rho ) \frac{ 2(1 - \tau) }{ \rho } \\ &= 2 - \frac2{\lambda} + \bigl( \frac{2 - \rho}{ \rho } - 1\bigr) (1 - \tau) + \bigl( \frac{2 - \tau}{ \tau } - 1 \bigr) (1 - \rho ) \\ &= \color{magenta}{2 - \frac2{\lambda} } + \frac{2 - \rho}{ \rho^2 } (1 - \tau)\rho \color{magenta}{- (1 - \tau)} + \frac{2 - \tau}{ \tau^2 } (1 - \rho )\tau \color{magenta}{- (1 - \rho )} \end{align*} Next in line are the $$Q_X$$ terms. \begin{align*} \rho (1 - \tau) Q_Y + \tau (1 - \rho)\,Q_X &= \rho (1 - \tau) \bigl( \frac{ 2 + \tau }{ \tau^2 } + 1\bigr) + \tau (1 - \rho) \bigl( \frac{ 2 + \rho }{ \rho^2 } + 1 \bigr) \\ &= \rho \bigl( \frac{ 2 - \tau - \tau^2 }{ \tau^2 } + 1 - \tau \bigr) + \tau \bigl( \frac{ 2 - \rho - \rho^2 }{ \rho^2 } + 1 - \rho \bigr) \\ &= \rho \frac{ 2 - \tau}{ \tau^2 } + \tau \frac{ 2 - \rho }{ \rho^2 } \color{magenta}{- 2\tau\rho} \end{align*} Put things back together in \ref{Eq06}, the magenta terms combine with $$\rho\tau$$ and $$1 - \lambda$$ (multiplied by 1): \begin{align*} \lambda\,\mathbb{E}[ R^2 ] &= \rho \tau + (1 - \lambda) + (1 - \lambda) 2 \mathbb{E}[ R ] + \rho (1 - \tau) Q_Y + \tau (1 - \rho)\,Q_X \\ &= \rho \tau + (1 - \lambda) \color{magenta}{ {}+ 2 - \frac2{\lambda} - (1 - \tau) - (1 - \rho ) - 2\tau\rho} \\ &\hphantom{{}= \rho \tau} + \frac{2 - \rho}{ \rho^2 } (1 - \tau)\rho + \frac{2 - \tau}{ \tau^2 } (1 - \rho )\tau \tag{from \mathbb{E}[R]}\\ &\hphantom{{}= \rho \tau } + \tau \frac{ 2 - \rho }{ \rho^2 } + \rho \frac{ 2 - \tau}{ \tau^2 } \tag{from Q_X etc}\\ &= 1 - \frac2{\lambda} + \frac{ 2 - \rho }{ \rho^2 } \bigl( \rho + \tau - \rho\tau \bigr) + \frac{ 2 - \tau }{ \tau^2 } \bigl( \rho + \tau - \rho\tau \bigr) \\ &= 1 - \frac2{\lambda} + \frac{ 2 - \rho }{ \rho^2 } \lambda + \frac{ 2 - \tau }{ \tau^2 } \lambda \end{align*} Finally we can divide by the coefficient of $$\mathbb{E}[ R^2 ]$$ on the left hand side and obtain \ref{Eq08}.

$$\large\textbf{Appendix.B.1: }\normalsize\text{In-Site Links to Related Questions}$$

I found many existing posts about this topic (minimum of two independent non-identical Geometric distributions). In chronological order: 90782, 845706, 1040620, 1056296, 1169142, 1207241, and 2669667.

Unlike the min, only 2 posts about max is found so far: 971214, and 1983481. Neither of the posts go beyond the 1st moment, and only a couple of the answers address the 'real geometry' of the situation.

In particular, consider the trinomial random variable $$T$$ that splits the 2-dim plane into the 3 regions. $$\begin{equation*} T \equiv \mathrm{Sign}(Y - X) = \begin{cases} \hphantom{-{}} 1 & \text{if}~~Y > X \quad \text{, with probability}~~ \tau( 1 - \rho) / \lambda \\ \hphantom{-{}} 0 & \text{if}~~X = Y \quad \text{, with probability}~~ \rho \tau / \lambda \\ -1 & \text{if}~~Y < X \quad \text{, with probability}~~ \rho( 1 - \tau) / \lambda \end{cases} \end{equation*}$$ This trisection of above-diagonal, diagonal, and below-diagonal is fundamental to the calculation of both $$W$$ and $$Z$$.

It can be easily shown that $$T \perp W$$, that the trisection is independent of the minimum. For example, $$\Pr\left\{ T = 1 \mid W = k\right\} = \Pr\{ T = 1\}$$ for all $$k$$.

Note that $$T$$ is not independent to $$Z$$ (even with the corner $$k=1$$ removed).

In the continuous analogue, $$\{X,Y,W\}$$ are Exponential with all the nice properties, and $$Z$$ is neither Exponential nor Gamma (analogue of Negative Binomial).

The density of the $$Z$$ analogue is easy and commonly used, but its doesn't seem to have a name. At best one can categorize it as a special case of phase-type (PH distribution).

$$\large\textbf{Appendix.B.2: }\normalsize\text{Covariance between \min(X,Y) and \max(X,Y), along with related discussions.}$$

Recall the expectations: $$\mathbb{E}[X] = \mu_{_X} = 1 / \rho$$, and the similar \begin{align*} \mu_{_Y} &= \frac1{ \tau }~, & \mu_{_W} &= \frac1{ \lambda } = \frac1{\rho + \tau - \rho\tau}~, & &\text{and}\quad \mu_{_Z} = \mu_{_X} + \mu_{_Y} - \mu_{_W} \end{align*} The covariance between the minimum and the maximum is $$\begin{equation*} C_{WZ} \equiv \mathbb{E}\left[ (W - \mu_{_W} ) (Z - \mu_{_Z} ) \right] = \mathbb{E}[ WZ ] - \mu_{_W} \mu_{_Z} = \mu_{_X} \mu_{_Y} - \mu_{_W} \mu_{_Z} \tag*{Eq.(B)} \label{EqB} \end{equation*}$$ The last equal sign invokes the intriguing $$WZ = XY$$ mentioned just before \ref{Eq08better}.

A positive covariance (thus correlation) expresses the intuitive idea that when the min is large then the max also tends to be large.

Here we do a 'verbal proof' of $$C_{WZ} > 0$$ for all combinations of parameters. The purpose is not really a technical proof but more about illustrating the relations between $$\{W, Z\}$$ and $$\{X, Y\}$$.

Since $$\mu_{_X} + \mu_{_Y} = \mu_{_W} + \mu_{_Z}$$, the covariance $$C_{WZ}$$ is in essence comparing products (of two non-negative numbers) given the value of the sum. We know that for a fixed sum, the closer the two 'sides' (think rectangle) are the larger the product.

Being the min and max, $$\mu_{_W}$$ and $$\mu_{_Z}$$ are more 'extreme' and can never be as close as $$\mu_{_X}$$ and $$\mu_{_Y}$$, throughout the entire parametric space $$\{ \rho, \tau \} \in (0, 1)^2$$. Boom, QED.

(the extreme cases where at least one of $$\{\rho, \tau\}$$ is zero or one are all ill-defined when it comes to min and max)

An algebraic proof for $$C_{WZ} > 0$$ (or for everything in this appendix) is easy. Let me emphasize the descriptive aspect.

Consider what it means for $$W$$ as a Geometric distribution to be the minimum of $$X$$ and $$Y$$. \begin{align*} \frac1{\lambda} &< \min( \frac1{\rho}, \frac1{\tau} ) & &\text{faster to 'succeed' on average} \\ \lambda &> \max( \rho, \tau ) & &\text{better than the higher success parameter} \end{align*} That is, the mean of the 'minimum flip' $$\mu_{_W} < \min( \mu_{_X}, \mu_{_Y} )$$ is more extreme at the lower end.

On the other hand, $$Z$$ is NOT a Geometric distribution. However, one can define an auxiliary $$Z' \sim \mathrm{Geo}[1 / \mu_{_Z}]$$ with an equivalent mean $$\mu_{_{Z'}} = \mu_{_Z}$$. Once we have arrived at \ref{EqB}, the role of $$Z$$ can be replaced by $$Z'$$: $$C_{WZ} = C_{WZ'} = \mu_{_X} \mu_{_Y} - \mu_{_W} \mu_{_{Z'}}$$

Now we can have similar descriptions for $$\mu_{_Z}$$, while it is actually $$\mu_{_{Z'}}$$ for the Geometric distribution that is being compared with $$X$$ and $$Y$$. \begin{align*} \mu_{_Z} &> \max( \mu_{_X}, \mu_{_Y} ) & &\text{slower to 'succeed' on average} \\ \frac1{ \mu_{_Z} } &< \min( \rho, \tau ) & &\text{worse than the lower success parameter} \end{align*} That is, the mean of the 'maximum flip' is more extreme at the higher end.

This concludes the verbal argument for how $$\mu_{_W}$$ and $$\mu_{_Z}$$ are more dissimilar (than the relation between $$\mu_{_X}$$ and $$\mu_{_Y}$$) thus making a smaller product.

• Thank you for this comprehensive, inspiring answer. Solution One I don't have problem understanding, I'm upset a bit that I didn't complete my analysis. I turned back while trying to form this recursion involving nonlinear terms, like E[(1+X)^2]. Solution Two and the Appendices I am able to follow as well.
– BoLe
Mar 22, 2018 at 10:45


# Finding area problem

There is this simple geometry question that seems so easy but I think the question lacks some information (does it?). Or maybe there are other ways to solve the problem.

So the problem says, there are two squares $ABCD$ and $FCHG$ with a side of length $8$ and $10$, respectively. We are asked to find the area of the shaded region.

What makes this question a bit tricky is because the small triangle $DEF$ is not shaded. And if we are given the length of AD, then the question will be easy. Is there a way to find AD or is there any other methods to solve the problem?

By the way, the answer is $48.4$.

And also, I am pretty sure we don't need to use advance methods such as trigs, etc.

I really appreciate any helps!

## 4 Answers

Triangles $BCF$ and $DEF$ are similar triangles, which means that their sides are proportional. You know side $BC=8,$ $CF=10$ and side $EF=2$. Can you proceed?

• yes I can! thanks! – user71346 Nov 11 '13 at 10:50

Hint: Look for similar triangles. What is $\Delta DEF$ similar to?

• ah yes! so careless... thanks! – user71346 Nov 11 '13 at 10:49

Let say lines $BG$ and $FC$ intersects at $K$,

So $CK+KF=10$ and $FKG$ and $BCK$ are similar triangles.

So $\frac{KF}{CK}=10/8$ therefore $CK=40/9$ and $KF=50/9$

The area of FKG triangle = $0.5*10*50/9=27.7$

Also $AD+DE=8$ and $ADB$ and $DEF$ are similar triangles. Similarly it gives

$AD=32/5$ and $DE=8/5$

The area of $BDEK$ = area of $BFC$- area of $DEF$ - area of $BCK$ = $0.5*8*10-0.5*2*8/5-0.5*8*40/9$= 20.7

Total area = The area of $BDEK$ + The area of FKG triangle =$27.7+20.7=48.4$

"Is there a way to find AD or is there any other methods to solve the problem?"

AD is proportioan to AE as BD is proportional to BF as EC is proportional to FC.

So AD ~ 8 as 8 ~ 10. Or AD/8 = 8/10.


# Solving a congruence system when the Chinese remainder theorem cannot be applied

I'm trying to solve the following system $$\cases{3x\equiv1\pmod{14}\\x\equiv1\pmod{8}\\3x\equiv9\pmod{5}}$$

My understanding is that, since $$14, 8, 5$$ aren't all coprime, I cannot apply the Chinese remainder theorem.

The first thing I did was solving the first and third equations independently, which yielded the following equivalent system:

$$\cases{x\equiv5\pmod{14}\\x\equiv1\pmod{8}\\x\equiv3\pmod{5}}$$

At this point I'm unsure how to proceed. I thought solving the system made up of the first two equation, and then a system made up of the solution to the first system with the third equation could work, but turns out it didn't. Here's what I tried:

$$\cases{x\equiv5\pmod{14}\\x\equiv1\pmod{8}\\} \iff x = 5+ 14k=1+8h \rightarrow7k-4h = -2 \iff k = 2+4y, h = 4-7y, \text{ with }y\in\mathbb{Z}$$ Therefore, $$x = 33 - 56y \iff x\equiv33\pmod{56}$$. Plugging this result back into the system, we now have $$\cases{x\equiv33\pmod{56}\\x\equiv3\pmod{5}\\} \iff x = 3+5k=33+56h \rightarrow5k-56h=30 \iff k = -330+56y, h = -30-5y, \text{ with }y\in\mathbb{Z}$$ Therefore, $$x \equiv 1653\equiv 253 \pmod{280}$$; however, this result is incorrect. What did I do wrong?

• did you mean $h=4\color{red}+7y$ and $h=-30\color{red}+5y$? Apr 2 '20 at 18:55
• there is also a formula for non-coprime moduli on wikipedia Apr 2 '20 at 18:57

I would encourage you to split up the given conditions and group according to powers of the same prime.

You have $$3x \equiv 1 \pmod 7$$ $$3x \equiv 9 \pmod 5$$ and related $$3x \equiv 1 \pmod 2$$ $$x \equiv 1 \pmod 8$$

The redundant pair becomes, as $$3 \equiv 1 \pmod 2,$$ $$x \equiv 1 \pmod 2$$ $$x \equiv 1 \pmod 8$$ These are consistent, the highest power of the prime is $$8=2^3,$$ so these combine to $$x \equiv 1 \pmod 8.$$ Then $$x$$ is 5 mod 7 and 3 mod 5, together $$x \equiv 1 \pmod 8.$$ $$x \equiv 3 \pmod 5.$$ $$x \equiv 5 \pmod 7.$$ Now you can use CRT I get $$x \equiv 33 \pmod {280}$$ as $$33 = 32 + 1 = 30 + 3 = 28 + 5$$

What did I do wrong?

At the end, you should have $$x=3+5k=3+5(-330+56y)$$

or $$x=33+56h=33+56(-30-5y)$$,

which means $$x=-1647+280y$$, so $$x\equiv-1647\equiv33\pmod{280}$$.

• I think you forgot the minus sign in front of $330$ to get $1653=3+5(330)$ Apr 2 '20 at 18:38


# Suppose $A,B\in M_n(\mathbb{C})$ such that $AB-BA=A$ . Prove that $A$ is not invertible .

Suppose that $A,B\in M_n(\mathbb{C})$ such that $AB-BA=A$. Prove that $A$ is not invertible.

My work:

Suppose $A$ is invertible. Then $ABA^{-1}=I+B$ . So $B$ is similar to $I+B$ .Let $B$ have eigenvalues $c_1,c_2,\ldots,c_n \in \mathbb{C}$. So $B$ has basis such that $B$ is upper triangular with respect to it and has $c_1,\ldots,c_n$ as diagonal entries . It is easy to see that $I+B$ is upper-triangular with respect to this basis and has entries $1+c_1,\ldots, 1+c_n$ .

Hence $$c_1+c_2+\ldots +c_n=\operatorname{trace}(B)$$ $$=\operatorname{trace}(I+B)=(1+c_1)+\ldots+(1+c_n)=n+c_1+\ldots +c_n .$$

So $n=0$, contradiction. I'm not sure if my solution is correct one. It seems alright. I will be very thankful if you can confirm that the proof indeed is a correct one.

Any other possible solutions are welcomed.

• It is correct, but too complicated. After proving that $B$ and $I+B$ are similar, you can simply say that this is no possible, since the trace of $I+B$ is $n$ plus the trace of $B$. No need to mention upper triangular matrices. May 28, 2017 at 16:38

Let $A$ be invertible.

We have $(AB-BA)A^{-1}=I$, or $ABA^{-1}-B=I.$

But $\operatorname{tr} (ABA^{-1})=\operatorname{tr}{B},$ which is a contradiction.

It is probably worth showing that $$A$$ is in fact nilpotent. Indeed, by induction we get $$A^m B - B A^m = m A^m$$ for all $$m\ge 0$$. Taking the traces on both sides we get $$0=m \operatorname{Trace}A^m$$ so (assuming char $$0$$) $$\operatorname{Trace}A^m = 0$$ for all $$m\ge 1$$. This implies $$A$$ nilponent.

$$\bf{Added:}$$ Based on an idea of @Hans: , we can generalize this . For $$X$$, $$Y$$ matrices, let $$[X,Y]=X Y - Y X$$.

Assume that $$[C,B]=A$$, and $$[C,A]=0$$ ( $$C$$, $$A$$ commute). Then $$A$$ nilpotent.

Indeed, for all $$m\ge 1$$ we have $$[C,A^{m-1} B] = A^{m-1} [C,B]= A^m$$, and so $$\operatorname{Trace} A^m=0$$ . Conclude $$A$$ nilpotent (assume char $$0$$).

$$\bf{Added:}$$. What we are showing is that if $$\operatorname{ad}(C)^2 A=0$$, then $$\operatorname{ad}(C) A$$ is nilpotent. We can also reason as follows: we may assume that the basic field is algebraically closed. Consider the Jordan structure of $$C$$, with blocks of size $$n_1$$, $$\ldots$$, $$n_k$$ corresponding to $$\lambda_1$$, $$\ldots$$, $$\lambda_k$$. Then we see that all operators $$B$$ in the kernel of $$\operatorname{ad}C^2$$ have the property that $$\operatorname{ad}(C)B=0$$.

(here we use an explicit Jordan structure for $$\operatorname{ad}(C)$$. We again use that the characteristic of the field is $$0$$ or $$>n$$ ).

• Nice conclusion. +1. You only need to show $A^mB-A^{m-1}BA=A^m\implies \text{tr}A^m=0, \forall m\in\mathbf N$.
– Hans
Oct 8, 2017 at 7:34
• @Hans; yes, your approach is simpler and better! I should add this idea. Oct 8, 2017 at 17:46

$\def\m{\mathfrak }$This result (and, in fact, orangeskid's observation) has the following far reaching generalization:

if $\m g$ is a finite dimensional (complex) Lie algebra and $\mathfrak r$ is its radical, then $[\m g,\m r]$ acts on any finite dimensional representation of $\m g$ nilpotently.

Indeed, in the question the matrices $A$ and $B$ span a Lie algebra $\m g$ of dimension (at most, really, but let us suppose) equal to $2$ which is solvable, so that the radical of $\m g$ is simply $\m g$ itself, and the theorem above tells us that $[\m g,\m g]$ acts nilpotently on finite dimensinal modules: since $[\m g,\m g]$ is spanned by $A$, the desired result follows.

Of course, this is immensely more general.

As an example:

if $A$, $B$ and $C$ are square matrices such that $CA-AC = B$, $CB-BC = aA + B$, $AB-BA = 0$, then $B$ is nilpotent and, more generally, al linear combinations of $A$ and $B$.

This comes from looking at a random 3-dimensional solvable Lie algebra.

• One can find the proof of this, which depends on Levi's theorem, in the book on Lie algebra by Hossein Abbaspour and Martin A. Moskowitz; it is Theorem 3.5.6 there. Oct 12, 2017 at 17:41
• Excellent answer! I will have to review my rusty rep theory... Oct 12, 2017 at 19:16


# Autopilot Automated Plane Geometry Case Study

Posted 3 months ago
628 Views
|
2 Replies
|
4 Total Likes
|

Dan's blog on automated plane geometry is about a quite fansinating application of new features of V12. This discussion is mainly to show how to make GeometricScene components as building blocks to give you insights to solve challenging geometric problems. Also because the components in this example is quite limited, I hope it serves as beginner case for Wolfram Language users who are interested in applying this feature in teaching and research.

• AOPS Problem: In triangle $ABC$ let point $D$ be on side $BC$. If $AD=7$, $\angle BAD=15$ deg, and $\angle CAD = 30$ deg, compute the minimum possible area of the triangle.

RandomInstance offers a second argument to generate a list of geometric objects that satifies the given concitions

Use the following line to find the area of the triangles above:

In[ ]:= (Area[Triangle[{"A","B","C"}]]/.(#["Points"]))&/@objs1
Out[ ]= {22.0393,21.6971,82.0575,18.1804,90.0952,18.8076,50.7958,25.823}

Lets try more triangles, like 20, and see where is the minimum value even we haven't analyze the problem at all:

We can graphically conclude that the minimum value is around 17.93. (Pretty good approximation comparing to the true solution later)

Next we consider adding some constraints to the GeometricScences so the illustrations of the valid triangle ABC's are aligned in regularzied manner. Well by the precision of WL and flexibility of MS OneNote, I quitck notice the following works:

I appriciate that the GeometricScene function gives a mixture of cartesian-coordinate based programming and Geogebra-style freedom. Just modify the first argument in GeometricScene and make 10 instances of valid ABC:

Looking at the the instances, you probably have some insights of the problem. The variation of the area of ABC is by

• fix the angle BAC=45 degree and its two side rays
• rotate a line $l$ that cross point D

$B$, $C$ is then determined by the intersections of rays and $l$. To find how this rotation affects the area, we can parameterize $\angle ABC = \theta$ and the area of ABC. This is valid because $\angle ABD$ is uniquely defined by $\angle ADC$, which can be interpred as a measure of the rotation of $l$.

Comparing to the objs2, we successfully sort the triangles based on the angular size of $\angle ABC$, from 10 degree to 110 degree with increment of 10. Lets plot the area vs $\angle ABC$ on a finer segmentation of angle values:

Remember that all codes that you have written is just gs1 plus some plot functions and parameter modification. Almost zero computation but finding the coordinate of $D$. This is way simpler than we used to do with Graphics function.

Let's compare our result to the analytic solution:

Attachments:
2 Replies
Sort By:
Posted 3 months ago
 - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming, and consider contributing your work to the The Notebook Archive!


# The number of triples that sum to a constant

Problem:
How many triples are there of the form $$(x_0,x_1, x_2)$$ where $$x_0 \in I$$, $$x_1 \in I$$, $$x_2\in I$$ $$x_0 \geq 0$$, $$x_1 >= 0$$, $$x_2 >= 0$$ and $$n = x_0 + x_1 + x_2$$ where $$n \in I$$?
Let $$c(n)$$ be the number of tuples we can have for a given $$n$$. For $$n = 0$$, the only valid triple is $$(0,0,0)$$, hence $$c(0) = 1$$.
For $$c(1) = 3$$, the set of valid triples is: $$(0,0,1 ), (0,1,0), (0,0,1)$$ Hence $$c(1) = 3$$.
For $$c(2) = 6$$, the set of valid triples is: $$(1,0,1 ), (0,1,1 ), (0,0,2 ), (1,1,0), (0,2,0), (0,0,2)$$ Hence $$c(2) = 6$$.
Using the information on this URL:
How many $k-$dimensional non-negative integer arrays $(x_1,\cdots,x_k)$ satisfies $x_1+x_2+\cdots+x_k\le n$

I find the answer to be: $$c(n) = {{n+3}\choose{3}} - {{n+2}\choose{3}}$$ $$c(n) = \frac{(n+3)!}{3!n!} - \frac{(n+2)!}{3!(n-1)!}$$ $$c(n) = \frac{(n+3)(n+2)(n+1) - (n+2)(n+1)(n)}{6}$$ $$c(n) = \frac{(n+2)(n+1)(n+3 - n)}{6}$$ $$c(n) = \frac{3(n+2)(n+1)}{6}$$ $$c(n) = \frac{(n+2)(n+1)}{2}$$ Do I have that right?
Thanks,
Bob

• This is equivalent to $\frac12(n+1)(n+2)$ which agrees with the supplied values. Jul 12 '19 at 23:07
• Like this? Jul 12 '19 at 23:10
• en.wikipedia.org/wiki/Stars_and_bars_(combinatorics) Jul 12 '19 at 23:16

Yes - this is correct. This can also be found by defining a helper function $$b(n)$$, which counts the number of ways to write $$n$$ as a sum of two numbers. Clearly, $$b(n) = n+1$$, as the first value, $$v$$, can be anything from $$0$$ to $$n$$, while the second value is $$n - v$$.

The function $$c(n)$$ is then equal to $$\sum_{i = 0}^{n}b(n-i)$$ This is because the first value, $$i$$, can be anything from $$0$$ to $$n$$. The number of ways to write the remaining two numbers so that the total sum is $$n$$ is $$b(n-i)$$. Plugging in the formula finds $$c(n) = \sum_{i = 0}^{n} (n-i+1) = n(n+1) - \frac{n(n+1)}{2} + n+1 = \frac{(n+2)(n+1)}{2}$$

which is the same formula you arrived at.

This is a prototypical “stars and bars” problem. Here we have $$n$$ stars and $$2$$ bars, with $$\binom{n+2}2 = {(n+2)(n+1)\over2}$$ ways to choose among the $$n+2$$ possible positions for the two bars.

Another way: The number of partitions of $$n$$ into three non-negative integers is equal to the coefficient of $$z^n$$ in the formal power series $$(1+z+z^2+z^3+\cdots)^3$$. This coefficient can be found using the generalized binomial theorem: $$(1+z+z^2+z^3+\cdots)^3 = \frac1{(1-z)^3} = \sum_{k=0}^\infty \binom{-3}{k} z^k = \sum_{k=0}^\infty \binom{k+2}2 z^k.$$ The number of partitions is therefore $$\binom{n+2}2$$ as before.

• All of these were mentioned in the comments, ~9h earlier. Jul 13 '19 at 8:19
• @rtybase Your point being? If you though the question was a duplicate of some other, you should’ve flagged it as such.
– amd
Jul 13 '19 at 8:21
• Something genuinly different is required. But up to you really ... I don't think the question is a duplicate. To begin with I don't know what $I$ is (in $x_0 \in I$ for example). Nobody clarrified this. Jul 13 '19 at 8:22


# 5 cards are chosen from a standard deck. What is the probability that we get all four aces, plus the king of spades?

We have $\binom{52}{5}$ ways of doing this. This will be our denominator.

We want to select all 4 aces, there are there are exactly $\binom{4}{4}$ ways of doing this.

Now we have selected 4 cards, and we need to select one more. That one card has to be the king of spades. Out of the 48 remaining cards, only one of them is our wanted one. This can be chosen in $\binom{48}{1}$ ways.

$$\dfrac{\binom{4}{4}\binom{48}{1}}{\binom{52}{5}}=\dfrac{1}{54145}?$$

Is this correct?

If we look at it another way:

Then then our probability for the aces and specific king are $(4/52)\times (3/51) \times (2/50) \times (1/49) \times (1/48)$ which is a completely different here.

Which is the correct approach?

• numerator should be 1 if you want a specific combination – Ning Wang Sep 14 '18 at 2:15
• So the second one is correct? – K Split X Sep 14 '18 at 2:17
• No, it seems like you're permuting those four aces. – Ning Wang Sep 14 '18 at 2:19
• $\binom{48}{1}$ would mean you're selecting $1$ card (any) from the remaining $48$ cards and not specifically a king of spades. – Ister Sep 14 '18 at 7:53
• $\binom44$ is correct because there are $4$ aces to choose from, but $\binom{48}1$ should be $\binom11$ because there is only one king of spades. – bof Sep 14 '18 at 23:38

Assuming you just want those 5 cards in any order:

Since you have specified all 5 specific cards that you want, you don't need to consider the aces separately from the king. The probability of selecting these 5 cards is then

(Probability choosing any one of the 5) $\times$ (Probability of choosing one of the remaining 4) $\times$ ..., i.e. $$\frac{5}{52} \times \frac{4}{51} \times \frac{3}{50} \times \frac{2}{49} \times \frac{1}{48} = \frac{1}{54145} \times \frac{1}{48},$$ just to confirm what Ross Millikan said.

If, instead, you want the 4 aces before the king, we have $$\frac{4}{52} \times \frac{3}{51} \times \frac{2}{50} \times \frac{1}{49} \times \frac{1}{48}.$$

You've fully determined the five cards you want, so the probability is $\frac{1}{{52 \choose 5}}$ since there are ${52 \choose 5}$ different ways to choose 5 cards from the deck, and only one correct one.

• Just to clarify, you want to get 5 cards from a set of specific 5 cards in which case your numerator should be $\binom{5}{5}$ – Ister Sep 14 '18 at 7:51
• I'm not this carl; you wording leads the casual reader to believe you are incorrect, since there are 5! ways to pick the correct 5 cards. You should stress that you started by calculating combinations, not permutations – Carl Witthoft Sep 14 '18 at 15:54

Your first computation gets the chance you get four aces and any other card. The $48 \choose 1$ factor is selecting the other card. If you want specifically the king of spades it should be $1$, so the chance is $48$ times less. Your second computation gets the chance you draw the four aces first in some order, then draw the king of spades. You should multiply by $5$ for the number of positions the king can be in. Neither is correct for the question in the title.

The first way:

There is only one set of cards, that fits the specifications (all 4 aces and the king of spades) and $\binom{52}{5}$ different sets of cards that can all be drawn with equal probability. The chance to draw your set is $$\frac{1}{\binom{52}{5}}$$

The second way:

The chance of drawing a specific card out of $n$ is $\frac{1}{n}$. So a specific sequence or order of 5 cards has the chance $\frac{1}{52}\cdot\frac{1}{51}\cdot\frac{1}{50}\cdot\frac{1}{49}\cdot\frac{1}{48}$ to be drawn. There are $5!$ different sequences or orderings of 5 cards, that countain the 5 specified cards (s. permutations). So the chance to draw the set is $$\frac{5!}{52\cdot51\cdot50\cdot49\cdot48} = \frac{5!\cdot 47!}{52!} = \frac{1}{\frac{52!}{5!\cdot 47!}} = \frac{1}{\binom{52}{5}}$$

For the last equality see Binomial coefficient.

You select 4 aces out of 4 possible aces and one king of spades out of 1 possible king of spades, so there is exactly $$\binom{4}{4}\binom{1}{1}=1$$ way of completing this set. Therefore this set is unique.

There are $\binom{52}{5}$ unique sets of five cards.

Therefore the probability of picking this set of five cards is:

$$P=\frac{\binom{4}{4}\binom{1}{1}}{\binom{52}{5}} = \frac{1}{2598960}$$


# Counting number of Bitstrings that do not contain $110$ for length $n \ge 4$

Question: Consider bitstrings that do not contain $$110$$. Let $$S_n$$ be the number of such strings having length $$n$$. What is $$S_n$$ for $$n \ge 4$$?

Answer: $$S_n = S_{n-1} + S_{n-2} + 1$$

Attempt: I tried writing out all the bitstrings for $$n=2$$, and $$n=3$$.

$$n=3$$ I got: $$000, 001, 011, 111, 100, 010, 101$$

$$n=2$$ I got: $$00, 01, 10, 11$$

$$n=4$$ seems to large to do this by hand. According to the answer, it should be $$S_4 = S_3 + S_2 + 1$$.

$$S_4 = 7 + 0 + 1 = 8$$? Assuming $$S_n$$ is the number of strings without $$110$$, so since $$n=3$$ has one $$110$$ I just exclude that and get $$7$$. $$n=2$$ has no $$110$$.

I'm not sure how the formula was derived. The bitstring counting logic I struggle with, any guidance on how to appriach these would help a lot.

• Your bitstring either starts with a $0$, or it starts with a $10$, or it has no $0$'s at all. Do you see how that relates to the answer's recursive formula? – Barry Cipra Nov 25 '18 at 22:15

This is not going to be an answer, but I don't have enough reputation to comment, so I apologize in advance.

My thought is to try thinking about your placement of the $$110$$. For the case of $$n=3$$, you saw that there was only one place to put it - as the whole thing.

Now consider the case of $$n=4$$. The approach will be to consider the possibilities which contain the string you are looking to avoid, find out how many such unique strings there are and subtract it from the total.

There are two places to put the string $$110$$, namely the beginning $$110\bullet$$ or the end $$\bullet110$$. There are $$2^4$$ total four-digit bitstrings, and there are four which match these placement patterns $$1100, 1101$$ and $$0110, 1110$$. Just to check, we should make sure all four of these are different, which is clear for this many (just look at the third digit) but might not be so clear on a larger scale. So as I see it there are $$2^4 - 4 = 12$$ ways to do this. This is $$16-4=12 \neq 8$$.

I agree with your logic for finding $$S_3, S_2$$, and hence $$S_4 = 8$$. Do you see any errors in my logic?

If you agree with my logic, is it possible that the question is not being asked the way you have asked it here? Alternatively are you sure the solution you have is correct?

• The mistake in Toby's computation is that $S_2 = 4$, not $0$. The given solution ($S_n = S_{n-1} + S_{n-2} + 1$) is correct. (See Barry Cipria's comment above.) – Fabio Somenzi Nov 25 '18 at 22:41


# Depiction of all graphs (not necessarily connected) with 6 vertices

I am searching (with no unsuccess) the WWW for a depiction of all non-isomorphic graphs with 6 vertices.

On the site http://www.graphclasses.org/smallgraphs.html I found an incomplete list, but all graphs with 5 vertices (34 ones). According to the integer sequence A000088, there should be 156 of them. A paper by Cvetkovic and Petric http://www.sciencedirect.com/science/article/pii/0012365X84900335 gives all connected graphs with 6 vertices (112 ones).

If I take all connected graphs (112) and take all graphs with 5 vertices adding a separate node (34), then I have 146 graphs. Which 10 graphs are missing?

Thank you very much!

• By all complete graphs did you perhaps mean all connected graphs? – hardmath Oct 15 '16 at 15:54
• Sorry. Yes, thanks. – user36124 Oct 15 '16 at 15:56
• Given your existing work, you may find the earlier Question Why there are 11 non-isomorphic graphs of order 4? a useful reference. These include non-connected possibilities. – hardmath Oct 15 '16 at 16:03
• You need all connected graphs on 4 vertices (6 of them) with two separate vertices and the pair of 3-line/triangle with 3 disconnected vertices, etc. 6 + 2 + 1 + 1 = 10. To put it another way, the number of graphs on N are the sum of the number of connected graphs on N plus the number of connected graphs on N-1 ... 1. – gilleain Oct 15 '16 at 16:08
• You may be interested to look at findstat.org/StatisticFinder/Graphs by the FindStat project – Alexander Konovalov Oct 15 '16 at 17:05

We can partition the graphs by the number of connected components.

One connected component: There are $112$ connected graphs with $6$ vertices

Two connected components: There can be

• A connected component of size $1$ and a connected component of size $5$ ($1 \cdot 21 = 21$ possibilities)
• A connected component of size $2$ and a connected component of size $4$ ($\color{red}{1 \cdot 6 = 6}$ possibilities)
• A connected component of size $3$ and another connected component of size $3$ ($\color{red}{3}$ possibilities - $P_3 \sqcup P_3$, $P_3 \sqcup K_3$, or $K_3 \sqcup K_3$)

Three connected components: There can be

• Two connected components of size $1$ and a connected component of size $4$ ($1 \cdot 1 \cdot 6=6$ possibilities)
• A connected component of size $1$, one of size $2$, and one of size $3$ ($1 \cdot 1 \cdot 2 = 2$ possibilities)
• Three connected components of size $2$ ($\color{red}{1}$ possibility - $P_3 \sqcup P_2 \sqcup P_2$)

Four connected components: There can be only be three connected components of size $1$ and one of size $3$, for $1 \cdot 1 \cdot 1 \cdot 2 = 2$ possibilities

Five connected components: There can only be four connected components of size $1$ and one of size $2$, for $1 \cdot 1 \cdot 1 \cdot 1 \cdot 2 = 2$ possibilities

Six connected components: One possibility

Add these up and you get $112+21+6+3+6+2+1+2+2+1=156$ graphs.

The ones in red are the ones you are missing - they are not obtained from adding an isolated vertex to a graph with $5$ vertices.

Perhaps the easiest way to systematically count is to begin with the integer partitions of six as denoting the sizes of components in your (not necessarily connected) graphs. There are eleven possibilities.

Some of these give rise to a single (up to isomorphism) graph:

$1 + 1 + 1 + 1 + 1 + 1$

$2 + 1 + 1 + 1 + 1$

$2 + 2 + 1 + 1$

$2 + 2 + 2$

Some give rise to two possibilities each as three nodes can form a connected component in exactly two ways:

$3 + 1 + 1 + 1$

$3 + 2 + 1$

Then there are three possibilities for this partition:

$3 + 3$

because the two components can be non-isomorphic in one way but isomorphic in two ways.

From the earlier Question we see that there are six connected graphs on four vertices, so each of these gives six possibilities:

$4 + 1 + 1$

$4 + 2$

Then we get down to the cases you previously considered:

$5 + 1$ (a connected component of five vertices and one extra node)

$6$ (a connected component of six vertices)

There are respectively $21$ and $112$ of these cases (see OEIS A001349, Number of connected graphs with n nodes). The previous small cases numbered $23$, and $23+21+112= 156$.


# Does knowing the surface area of all faces uniquely determine a tetrahedron?

I was wondering if the four areas of a tetrahedron faces were sufficient information to uniquely determine its shape. For example, is it true to say that if the surface areas are equal then the solid must be a regular tetrahedron?

If the answer is negative, then what else we need to fully determine the shape of the tetrahedron in space?

• Well if a tetrahedron is the only shape which can exist with four faces in three dimensions then it must be a tetrahedron. You could prove whether or not it must be regular based on the areas using algebra – Henry Lee Jun 14 at 14:14
• The space of tetrahedra, up to congruency, has 6 degrees of freedom, and you only give 4 pieces of information with your areas. So my immediate guess is that no, it is in no way determined. – Arthur Jun 14 at 14:14
• Are you aware of the Minkowski theorem (math.stackexchange.com/questions/105033/…)? – Moishe Kohan Jun 14 at 14:56
• @MoisheKohan No, I hadn't seen this before. But does this theorem imply existence of more than one tetrahedron with identical face areas? – Amirh.Kp Jun 14 at 17:43
• @Amirh.Kp: yes, of course. This is existence-uniqueness theorem. It allows you to prescribe areas as well as the directions of normals to the faces. It also shows exactly what you are missing. – Moishe Kohan Jun 14 at 18:22

Consider the vertex set in $$\mathbb R^3$$ $$\{(a, b, 0), (a, -b, 0), (-a, 0, b), (-a, 0, -b)\}$$ for $$a, b > 0$$. Then it is clear that the faces determined by these vertices are all congruent isosceles triangles with side lengths $$2b$$, $$\sqrt{4a^2+2b^2}$$, $$\sqrt{4a^2+2b^2}$$ and common area $$a \sqrt{4a^2+b^2}$$. So by a suitable choice of $$a$$ and $$b$$ we can make the tetrahedron irregular but have faces of equal area; moreover, for a given area of a face, there is in general more than one choice of $$(a,b)$$, hence even for this very restricted type of tetrahedron, knowing the area of each face does not uniquely determine the tetrahedron.

A tetrahedron with vertices at $$(0,0,0)\\ (1/2, 0,0)\\ (0,2,0)\\ (-0.0924127, 1.9387, 0.4913857)$$ will have area $$1$$ for all faces.

The coordinates of that last point are approximate (and of course you can freely swap the sign of the $$z$$-coordinate). The actual point is given as the solution to the three equations $$\cases{x^2 + z^2 = 1/4\\ y^2 + z^2 = 4\\ \displaystyle\left(\frac4{\sqrt{17}}(x-1/2) -\frac1{\sqrt{17}}y\right)^2 + z^2 =\frac43}$$ I placed the three first vertices first, to make sure one face was non-equilateral and had area $$1$$, then these three equations are exactly the equations that ensure that the other three faces have area $$1$$. The left-hand sides are (the squares of) the altitudes of the three remaining faces if you put the fourth vertex at $$(x, y, z)$$, and the right-hand sides are what those altitudes must be to ensure that the area of the corresponding face is $$1$$.

As you can see, I am somewhat free to make the first face whatever shape I want, as long as its area is $$1$$, and then I just set up the three equations to find the fourth vertex. It's possible that some extreme versions of the first face causes the resulting three equations to not have any real solution, but I have demonstrated here that at least one non-regular tetrahedron may be generated this way.

• +1 I think there's an interesting construction lurking here. If you relax the equal area condition to specify just the ratios of areas of faces then Informally, you're foliating the space of tetrahedra What do the leaves look like? – Ethan Bolker Jun 14 at 15:00
• @EthanBolker That's a cool question. I really only thought of it as just intersecting three cylinders... – Arthur Jun 14 at 15:01

The answer is "no," which can be demonstrated by counting degrees of freedom.

A tetrahedron has 4 vertices in 3-dimensional space, and is therefore defined by 12 independent parameters, i.e. the $$x$$, $$y$$, $$z$$ coordinates of each vertex.

Now consider what we mean by two tetrahedra having "the same shape". The orientation in 3-D space doesn't matter, and that eliminates 6 of the 12 parameters (there are 3 rigid body translations, and 3 rotations).

But the tetrahedron only has four faces, so fixing the area of each face still leaves two independent parameters to vary its shape in an arbitrary way.

If you want to pick two more quantities to fix the shape of the tetrahedron, that could be done in many different ways, but it would be nice to do it in a way that is independent of any coordinate system used to describe it.

One natural parameter could be the volume of the tetrahedron, but finding a second one is not so "obvious".

The radius of the inscribed and circumscribed spheres might be interesting choices. Proving that they do uniquely define the tetrahedron in combination with the area of the faces is left as an exercise for the reader :)

Another option might be to fix the lengths of two edges. Choosing a pair of edges which do not share a vertex has a nice symmetry about it.

You may be interested in my paper with Petr Lisonek, Metric Invariants of Tetrahedra via Polynomial Elimination, ISSAC 2000 conference, Aberdeen (Scotland), July 2000, 217-219. We show that in general the four areas, circumradius and volume do not determine a tetrahedron, but there exist non-regular tetrahedra that are determined by the four areas and the circumradius. For example, this is the case if one face is an equilateral triangle iscribed in a great circle of the circumscribed sphere.

It's easy to construct a tetrahedron with sides congruent to any acute isosceles triangle.

Start by taking two copies of the triangle, glue them together at the base, and then pull the apices apart until the distance between them equals the length of the base. (You can always do this if the triangles are acute, since the base length of an acute isosceles triangle is less than twice the height.) Now the sides of the triangles, together with the line between their apices, form two additional isosceles triangles that are congruent with the original one, and you thus have a tetrahedron with four congruent faces. Cut some triangles out of paper and try it if you don't believe it!

In fact, essentially the same method actually works for any acute triangle, even if it's not isosceles! The only tricky part is that now there are two distinct possible ways to glue the first two copies of the triangle together at the base, depending on whether or not you flip one of them over first, and you need to choose the way that leaves the non-equal sides of the triangles adjacent. Then proceed just like above.

Thus, in particular, for any acute triangle with area $$A$$ there exists a tetrahedron with all faces congruent to that triangle, and thus also with area $$A$$. Unless the triangle happens to be equilateral, this tetrahedron will not be regular.

A tetrahedron can be determined by the lengths of three edges emanating from a vertex and the three angles formed by pairs of those angles. Thus, a tetrahedron admits six degrees of freedom. Four face areas are not enough to determine the shape (or even the volume) of such a figure.

As an extreme example, you can consider any rectangle a "degenerate" tetrahedron with four congruent right-triangle faces; the volume is zero, which is decidedly different than that of a regular tetrahedron. In fact, one can construct "equihedral" (equal-face-area) tetrahedra with volumes anywhere from the minimum of zero to the regular tetrahedron's maximum.

As for what other information you can use, my favorite additional parameters are the areas of the tetrahedron's three (what I call) "pseudo-faces". You can think of these geometrically as the quadrilateral projections of the tetrahedron into planes parallel to a pair of opposite sides. Each pseudo-face area is calculated by $$\text{area} = \frac12 \text{side}\cdot\text{side} \cdot \sin \text{(angle)}$$ just like any other face, except here, the "$$\text{side}$$"s are opposite each other, and the "$$\text{angle}$$" is considered the angle between the corresponding direction vectors.

Four standard faces (say, $$W$$, $$X$$, $$Y$$, $$Z$$) and three pseudo-faces ($$H$$, $$J$$, $$K$$) make seven area parameters, which would seem to over-determine the figure. However, the sum-of-squares identity $$W^2+X^2+Y^2+Z^2=H^2+J^2+K^2 \tag{1}$$ introduces a dependency that reduces the degrees of freedom to the expected six.

Other pseudo-face relations include a strangely familiar-looking Law of Cosines. \begin{align} Y^2 + Z^2 - 2 Y Z \cos A &= H^2 = W^2 + X^2 - 2 W X \cos D \\ Z^2 + X^2 - 2 Z X \cos B &= \,J^2 = W^2 + Y^2 - 2 W Y \cos E \\ X^2 + Y^2 - 2 X Y \cos C &= K^2 = W^2 + Z^2 - 2 W Z \cos F \end{align} \tag{2} where each of $$A$$, $$B$$, $$C$$, $$D$$, $$E$$, $$F$$ is the dihedral angle between appropriate pairs of faces ($$A$$ between $$Y$$ and $$Z$$, etc).

There's also this volume formula:

\begin{align} 81V^4 &= H^2 J^2 K^2 - 2 (W X-Y Z)(W Y-Z X)(W Z-X Y) \\ &-H^2(W X-YZ )^2-J^2(WY-ZX)^2-K^2(WZ-XY)^2 \end{align} \tag{3}

If the four face areas are equal, the formula reduces to $$9V^2 = HJK$$, which shows that the volume of an "equihedral" tetrahedron depends upon more than those face areas.

Anyway, you can read more about these kinds of relations in my Hedronometry notes. In particular, "Heron-Like Results for Tetrahedral Volume" (PDF) includes the stuff I've described above and a bit more.

• Thanks for your comprehensive introduction. one thing I can't understand which is seemingly a critical concept and that is your extreme example of considering every rectangle as a "degenerate tetrahedron" with four congruent right-triangle faces. I think you mean it's a natural result of a process which construct tetrahedrons but I can't come up with such process. – Amirh.Kp Jun 14 at 18:21
• @Amirh.Kp: Any four points can be the vertices of a tetrahedron. The vertices of a rectangle are four points, so they determine a tetrahedron; since it's flat, the volume is zero. (The rectangle's four sides, and its two diagonals, are the edges of the tetrahedron, and the right triangles formed by two adjacent sides and one diagonal are the faces of this tetrahedron.) Such a figure is considered "degenerate" because it is not three-dimensional. This is like how any three points determine a triangle; if those points are collinear, the triangle is "degenerate" with area zero. – Blue Jun 14 at 22:56