Apply equivalence rules to convert to CNF I am having trouble seeing how I could apply the equivalence rules mentioned here to the following formula in order to convert it into Conjunctive Normal Form (CNF).

$$(p \wedge q) \vee (\neg p \wedge r)$$

I know the solution through Wolfram Alpha, but I do not see how these rules could be applied in order to obtain the answer. These rules get a little confusing for me when a negation of a literal is involved. Could someone please help me to understand this process?

If we look here we are given an algorithm to follow, and we will see that at each step all we need to do is step $5$.

$$(p \wedge q) \vee (\neg p \wedge r) \equiv ((p \wedge q) \vee \neg p) \wedge ((p \wedge q) \vee r) \quad \text{ distribute} \vee \text{ over } \wedge$$
$$\equiv ((p \vee \neg p)  \wedge (q \vee \neg p)) \wedge ((p \vee r) \wedge (q \vee r)) \quad \text{ again distribute} \vee \text{ over } \wedge $$
$(p \vee \neg p)$ is a tautology and we know that $t \wedge a \equiv a$ for any tautology $t$, so that we can just "throw out" $(p \vee \neg p)$.  This leaves us with:

$$(q \vee \neg p) \wedge ((p \vee r) \wedge (q \vee r)) \equiv (q \vee \neg p) \wedge (p \vee r) \wedge (q \vee r) \quad \text{ since } \wedge \text{ is associative} $$

This is in conjunctive normal form, although it is not exactly what Wolfram is giving.

First write out the truth table:

 p   q   r  (p∧q)  (¬p∧r)  [(p∧q)∨(¬p∧r)]
 0   0   0    0        0           0
 0   0   1    0        1           1
 0   1   0    0        0           0
 0   1   1    0        1           1
 1   0   0    0        0           0
 1   0   1    0        0           0
 1   1   0    1        0           1
 1   1   1    1        0           1

Now how do you write a disjunctive normal form from this?  As a rough outline you interpret all "0s" as negations of the variables, and "1s" as the variables when and only when the statement evaluates to 1, and make an n-ary conjunction of that.  Then you make a disjunction of all that.  The conjunction normal form consists of the dual of the disjunctive normal form.  You can look at the rows where the statement form evaluates to 0 instead of to 1, and exchange "OR" for "AND".  We write a literal if it matches to 0, and the negation of the literal if it matches to 1 for the rows where we have a "0".

The definition of a conjunctive normal form says that they have to qualify as wffs or statement forms or significant expressions.  To spare your eyes and my labor of writing a string with many parentheses, I will hereafter use Polish notation.

Given an informal rule of detachment, we can thus define the relevant wffs as follows:

All lower case letters of the Latin alphabet qualify as wffs.
If $\alpha$ qualifies as a wff, then so does N$\alpha$.
If $\alpha$, $\beta$ qualify as wffs, then so does K$\alpha$$\beta$.
If $\alpha$, $\beta$ qualify as wffs, then so does A$\alpha$$\beta$.

Thus, Kpq represents the wff (in a distinct language) above the first column not falling underneath a variable.  KNpr represents the wff above the second column not falling underneath a variable, and AKpqKNpr represents the wff above the third column not falling underneath a variable.

AApqr only evaluates to 1 when one of it's variables takes on the value 1.  Otherwise it qualifies as false.  AApNqr only evaluates to 1 when Nq evaluates to 0, and so do p and r.  And so on, allowing us to infer

KKK AApqr AApNqr AANpqr AANpqNr as a conjunctive normal form.


Evaluate $\int _{|z|=2}ze^{\frac{3}{z}} dz$ How to integrate this

$\int _{|z|=2}ze^{\frac{3}{z}} dz$

I tried to do this by substituting $z=2e^{i\phi};0\leq \phi\leq 2\pi$

But cannot proceed further.Any help

Expanding and integrating term by term we end up with integrating 9/(2z) round the circle given. The answer is 2i(pi)(9/2)=9i(pi).


Probability, Random Walk, Distance from Origin after N steps in 2 and 3 dimensions I am looking for a formula of the distance from Origin after N equal steps in random directions in a 2 or 3 dimensional spaces. Can someone help me with a reference to a book, article or any publication dealing with this subject? Thanks!

note the question asks for a formula, simulating the thing is trivial..

As a first step, since you only ask for the distance, work out the incremental change in distance with each step assuming a unit step in a random direction. You can then develop a simple 1D numerical approach to find the distance after n steps: (mathematica code, the question was orignally posted to the mathematica site)

md[n_Integer] := (
       Mean@Table[
        dissquared = 0;
        Do[
          dissquared +=
               1 + 2 Cos[RandomReal[{0, 2 Pi}]] Sqrt[dissquared ];
         , {n}];
         Sqrt[dissquared], {2000}])

 Show[Plot[ Sqrt[Pi i/4 ], {i, 1, 500}, PlotStyle -> Red],
      ListPlot[Table[{i, md[i]}, {i, 1, 500, 10}]]]

oops I dont seem to be allowd to post a graphic.  Anyway we can emperically work out an expression for the average distance as

d[n] = Sqrt[ n Pi /4 ]

Note obviously d[1] must be 1, but the simulation converges to the above for n larger than 4..
If someone can finish up and show that analytically I'd like to see..

2 apprioriate models for your task could be:

1) Markovian matrix with probabilities between each state.

or 2) Brownian motion


Easiest way to tell if a critical point is a a min or max For $f(x,y) = \sqrt{x^2 + y^2 + \frac{1}{x^2 y^2}}$ the critical points are $(1,1), (1,-1), (-1,1), (-1,-1)$ and all of their values in the function is $3$. How can you tell that these are either maximums or minimums?

The example problem states that because the values of the critical points are all $3$, this implies that they are minimums without requiring any additional computations. How can you tell just by observation?

The auxiliary function
$$g(u,v):=u+v+{1\over uv}\quad \bigl((u,v)\subset Q:=({\mathbb R}_{>0})^2\bigr)$$
is $\geq M$ when $u+v\geq M$ and goes to $\infty$ when $u\to0+$, or $v\to0+$. It follows that $g$ assumes a global minimum on $Q$ and that this minimum occurs at a critical point $(\xi,\eta)\in Q$. Computation shows that $(1,1)$ is the unique critical point of $g$ in $Q$, so that without further calculations we can say that
$$g(u,v)\geq g(1,1)=3\quad\forall (u,v)\in Q\ .\tag{1}$$
The function $f$ defined in the question has as its domain the union of the four open quadrants of the $(x,y)$-plane, and is even with respect to $x$ and to $y$. It therefore suffices to study $f$ in the first quadrant $Q$. The substitution $u:=x^2$, $v:=y^2$ transforms $Q$ to $Q$ and $f^2$ into the function $g$ studied above. From $(1)$ we therefore can conclude that
$$f(x,y)\geq f(1,1)=\sqrt{g(1,1)}=\sqrt{3}\qquad\bigl((x,y)\in Q\bigr)\ .$$
It follows that $\sqrt{3}$ is the global minimum value of $f$ on its domain.

Consider the square of the function and apply AM-GM inequality (arithmetic mean is greater than or equal to the geometric mean) and you are done !!


Provide the correct interpretation of the conﬁdence interval A sample of $150$ new cell phones produced by Yeskia found that $12$ had cosmetic ﬂaws. A $90\%$ conﬁdence interval for the proportion of all new Yeskia phones with cosmetic ﬂaws is $0.044$ to $0.116$. Which ones of statements below provide the correct interpretation of this conﬁdence interval?
  Please, give explanation.
  a) There is a $90\%$ chance that the proportion of new phones that have cosmetic ﬂaws is between $0.044$ and $0.116$.
  b) There is at least a $4.4\%$ chance that a new phone will have a cosmetic ﬂaw.
  c) A sample of $150$ phones will have no more than $11.6\%$ with cosmetic ﬂaws.
  d) If you selected a very large number of samples and constructed a conﬁdence interval for each, $90\%$ of these intervals would include the proportion of all new phones with cosmetic ﬂaws.
  e) none of the above

I would say that the answer is a) based on my poor understanding of definition of CIs.

The answer should be (d).

(d) should be the standard correct choice. The probability that the confidence interval you constructed would include the actual number would be 90%. But strangely enough, this choice doesn't actually invoke any numbers in the question.

(a) can sound correct or wrong depending on interpretation, so not a good choice just to be safe. It's not true that conditioned on these number computed for confidence interval, the actual number lie inside it at probability 90%.

(b) too absolute to be true. There is still the possibility that the actual number is lower than estimated.

(c) same problem as (b)

(e) is out since (d) is quite correct.


Proving divisibility of sum of seven consecutive integers by 7 using congruence theories I have have this peculiar problem below;
For which values of n, a consecutive set of seven integers, raised to it's nth power and added together, will be divisible by 7?
For example if a is any integer then the sum of seven consecutive integers when n=1 is;
a + (a+1) + (a+2) + (a+3) +  (a+4) + (a+5) + (a+6) = 7a+21
which is divisible by 7.
I can prove it's divisible using polynomials for n=2,3 or 4 but that doesn't involve the use of congruence theories. I tried to apply Fermat Little Theorem, but it didn't get me anywhere

$a,a+1,a+2,a+3,a+4,a+5$, and $a+6$ comprise a complete set of residues modulo $7$,
so we can take $a=0$ without loss of generality.
For $n=1$, the sum is congruent to $0+1+2+3+4+5+6\equiv0\bmod7$.
For $n=2$, the sum is congruent to $0+1+4+2+2+4+1\equiv0\bmod7$.
For $n=3$, the sum is congruent to $0+1+1-1+1-1-1\equiv0\bmod7$.
For $n=4$, the sum is congruent to $0+1+2+4+4+2+1\equiv0\bmod7$.
For $n=5$, the sum is congruent to $0+1+4+5+2+3+6\equiv0\bmod7$.
For $n=6$, the sum is congruent to $0+1+1+1+1+1+1\equiv6\bmod7$.
For $n=6k+m$, the sum is congruent to that for $m$, as a consequence of Fermat's little theorem.
Therefore, the sum is a multiple of $7$ unless $n$ is a multiple of $6$.

First of all if $a_1, a_2,....,a_7$ are consecutive then then are congruent to a complete residue class.  That is for $r_1, .....r_2 = 0,....,6$ then exactly one $a_i$ is congrent to each $r_i$.
By Fermat's little thereom if $n = 6k + j$ then $a_i^n\equiv (a_i^{6})^ka_i^j \equiv \begin{cases}0\equiv a_i^j\pmod 7 &a_i\equiv 0 \pmod 7\\1^ka_i^j\equiv a_i^j\pmod 7&a_i\not \equiv 0\pmod 7\end{cases}\equiv a_i^j$
So we need do test these for $n\equiv j; j=0,1,2,3,4,5$.
Now $6\equiv -1$ and $5\equiv -2$ and $4 \equiv -3\pmod 7$ so
$a_1^n + a_2^n + ... + a_7^n \equiv ((-3)^j + (3)^j) + ((-2)^j + 2^j) + (-1^j + 1^j) + 0^j\pmod 7$.
If $j$ is odd we are done $(-m)^j + m^j\equiv 0 \pmod 7$ and the sum is equivalent to $0\pmod 7$.
If $j$ is even we'll have to try them.
If $j = 0$ we have $a_1^n + a_2^n + ... + a_7^n \equiv 1+1+1+1+1+1+0\equiv 6\pmod 7$.  No good.
If $j=2$ we have $a_1^n + a_2^n + ... + a_7^n\equiv 9+9+4+4+1+1+0\equiv 2*14\equiv 0$.  So that is good.
If $j=4$ we have $a_1^n + a_2^n + ... + a_7^n\equiv 2*3^4 + 2*2^4+2*1^4+0\equiv 2*9^2 +2*16 + 2\equiv 2*2^2 + 2*2 + 2= 8+ 6=1-1\equiv 0\pmod 7$.  So that is good.
So the only time this does not work is if $n$ is a multiple of $6$.
=====
I could probably have done this a little slicker to note that $3$ is a primitive root mod $7$. ($3^{k=1,2,....,6}\equiv 3,2,6,4,5,1\pmod 7$) and so $\sum a_i^n\equiv \sum_{i\ne 0} 3^{in}$ but then noteting that $3^k\equiv - 3^{k+3\pmod 6}$ the terms cancel out so long as $n\not \equiv 0\pmod 6$.  (And for $n\equiv 0 \pmod 6$ it is evident that $\sum a_i^n\equiv \sum_{a_i\not \equiv 0\pmod 7} 1\equiv -1\pmod 7$.)


Is there an analytic solution for the equation $\log_{2}{x}+\log_{3}{x}+\log_{4}{x}=1$? I am looking for a close form solution for below equation.

$$\log_{2}{x}+\log_{3}{x}+\log_{4}{x}=1.$$

I solve it by graphing, but I don't know is there a way to find $x$ analytically  ?

$$ log_v {u}= \dfrac{log_a u}{log_a v} $$

valid for any arbitrary base $a$, need not necessarily be $10$ or $e$.

So

$$\log_a{x}\left(\dfrac{1}{\log_a2}+\dfrac{1}{\log_a3}+\frac{1}{\log_a4}\right)=1$$

or

$$x=a^\left({\dfrac{1}{\dfrac{1}{\log_a2}+\dfrac{1}{\log_a3}+\dfrac{1}{\log_a4}}}\right)=f(a)$$

EDIT1:

apparently but in fact $ \ne any \,f(a)$

Consequently $x$ is indeterminate... as we are free to choose any base.

Sorry, since $ a^{log_a u} = \,u $ it has a cancelling effect ... hastily over sighted on pure visual/structural inspection of the above. (  I wished only to say "consequently $x$ is independent of base... as we are free to choose any base " ) etc. ...because I placed more value on base independence as relevant for this question.

g[u_] = Log[u] (1/Log[3] + 1/Log[4] + 1/Log[2]);
ParametricPlot[{a, a^(1/g(a))}, {a, 1, 12}, GridLines -> Automatic]

that yields a base free  $ x \approx 1.3844.$


Why are metrics defined as functions in $\mathbb{R}^{+}$? A metric on a set $S$ is a function $d: S^2 \to \mathbb{R}^{+}$ that is symmetric, sub-additive, non-negative, and takes $(x,y)$ to $0$ iff $x=y$.

My question is: what makes $\mathbb{R}^{+}$ so special that metrics are universally defined in terms of it? Why don't we use some other totally-ordered set with a least element $m$ and an abelian operator $+$ which preserves order and under which $m$ is neutral?

To take it one step further, why aren't metrics defined, more generally, to map elements of $S^2$ to any totally-ordered set that satisfies these conditions?

In the theory of metric spaces there are two properties of the real numbers (which are used as the values of the metric) that play an important role.  The first is that $\mathbb{R}$ is Archimedean, which means that $\mathbb{N}$ is not bounded above in $\mathbb{R}$.  The second is that $\mathbb{R}$ satisfies the supremum property, i.e. every nonempty set that's bounded above has a supremum.

To get a sense of how these are used in metric space theory let's first look at how they're used in real analysis.

Archimediean property:  Here are just a couple of the very many things that one can prove are equivalent to the Archimedean property in any ordered field $\mathbb{F}$:

The sequence $\{1/n\}_{n=1}^\infty$ converges to $0$ (here convergence is w.r.t. the absolute value defined on any ordered field).
If $x \in \mathbb{F}$ and $-1 < x < 1$ then $x^n \to 0$ as $n \to \infty$.
If $x \in \mathbb{F}$ and $-1 < x < 1$ then $\sum_{n=0}^\infty x^n$ converges to $1/(1-x)$.

Supremum property:  Here are a couple things equivalent to the supremum property in any ordered field $\mathbb{F}$:

Every bounded and monotone sequence is convergent.
$\mathbb{F}$ is Archimedean, and every Cauchy sequence is convergent (here Cauchy is also defined with the absolute value on $\mathbb{F}$).

Certainly all of the above bullet points are used rather frequently in proofs in real analysis.  The key point here is that they are often used in metric theory proofs as well!  The Archimedean examples are used all the time.  To show that $x_n \to x$ in a metric space we often show that $d(x_n,x) \to 0$ in $\mathbb{R}$ by showing that it's bounded above by something of the above form, say $C /n$ or $C/2^n$. The geometric series is used in some key proofs, too: for instance, it's the main component of the proof of Banach's fixed point theorem.

The supremum property equivalences are used from time to time in proofs, but they also play an essential role in the theory of completeness.  All the proofs that show that a metric space has a completion rely crucially on the fact that $\mathbb{R}$ is itself a complete metric space, which is given by one of the above bullet points.  The existence of a completion is quite useful in a couple places.

So, the upshot is that we use $\mathbb{R}$ in the metric space theory because it allows us to port a bunch of tricks / results / ideas from real analysis to metric analysis.  Does this mean that it's a necessary ingredient in the definition?  Certainly not.  For instance, in the discussion above I talk about using the absolute value on arbitrary ordered fields to define convergence.  This works perfectly fine as a substitute for a metric and gives rise to a reasonable way of doing analysis.  We can think of this as an "$\mathbb{F}-$metric" $d: \mathbb{F} \times \mathbb{F} \to \mathbb{F}^+$, and in principle we could also define something like this on general spaces.

If $\mathbb{F}$ is Archimedean, then $\mathbb{F} \subseteq \mathbb{R}$, and so we actually have a metric!  This means we only get something "new" when $\mathbb{F}$ is non-Archimedean, but in this case all sorts of weird stuff shows up.  For instance, without the Archimedean property it becomes rather tricky to prove that things converge by bounding the distance by a known sequence since $1/n$, $2^{-n}$, etc no longer converge to $0$.

I haven't thought too much about what happens if we let the metric take values in an arbitrary ordered Abelian group (I believe this is what we would get from what you say above), but I suspect the biggest issue will again occur when we leave the context of Archimedean ordered groups.

You can define a metric with values in another set as you propose. However, you can also just map this set of your metric values to a subset of the real numbers. On the other hand, it does not make sense to consider a more general set as, e.g., the complex numbers. Therefore the real numbers are the canonical general set. Also keep in mind that definitions are just names that should be useful to abbreviate common patterns. The term metric in the usual sense provides that wide applicability in the sense described above.

It's just a definition that applies to many applications. Thus it is useful and hence justified.

Relating to my previous answer: Other sets are either equivalent via a suitable mapping to subsets of the real numbers or sacrifice properties being held by the real numbers that are useful.


Can the range of a variable be inclusive infinity? Can a range be $[0, \infty]$ or must it be $[0, \infty)$ because you can never quite reach infinity?

Clarification:
$[0, 1]$ means $0 \leqslant x \leqslant 1 $, while  $(0, 1)$ means $0 < x < 1 $. My question is whether infinity can be written as inclusive when stating the range.

Generally if including positive and negative infinities, one says that one is working with the "extended real line", usually denoted $\mathbb{R}\cup\{\infty,-\infty\}$. It's quite possible, consider the function
$$f(x)=\begin{cases}x & \mathrm{if } \quad x\neq 0\\\infty & \mathrm{if }\quad x=0\end{cases}$$

Can it be $e^\pi$? $\infty$ and $e^\pi$ are just two entities that you may or may not consider part of a set. You can perfectly include them and define functions on that set or taking values of that set.


Uniqueness theorem for harmonic function So far in complex analysis books I have studied about Uniqueness theorem: If $f$ is analytic in a domain $D$ and if its set of zeroes has a limit point in $D$ then $f\equiv 0$ on $D$, I want to know is this result holds for harmonic functions?

In general harmonic functions are functions $u:\mathbb{R}^n\rightarrow \mathbb{R}$. If $0$ is a regular value of such a function (which is true for almost every real number) then $u^{-1}(0)$ is locally an $(n-1)$ dimensional submanifold. Actually this is true for every $C^1$-function, regardless whether it is harmonic or not. So the question makes only sense for $u:  \mathbb{R}\rightarrow \mathbb{R}$. In this case the equation is $u^{''}=0$ which implies $u$ is linear.

So the answer is yes, in one dimension, cause there the solution is explicitly known, no otherwise, since the zero set is usually locally a submanifold of dimension $\ge1$.

I don't think this problem is true at all.

The real or imaginary part of an analytic function is always an harmonic function.

$f:\mathbb{C}\rightarrow\mathbb{C}:z\mapsto z$ is an analytic function thus $g:\mathbb{R^2}\rightarrow\mathbb{R}:(x,y) \mapsto \operatorname{Im}(g(x+iy))=y$ is a harmonic function. $g(x,y)=0$ for every point on the real line (points with $y=0$). But $g$ is not the zero function on any open subset of the complex plane (including the unit disc).

Gotta hate harmonic functions.


Picking balls from a bag until one colour is missing A bag contains balls of three different colours namely $A，B，C$. The number of each types of balls is $n$.

Assume you pick 3 balls randomly from the bag every round, without replacement. And you stop if you have picked up all balls of one colour.  What's the probability distribution of number of the rounds you spend?

I think we can identify this with the same question except you pick one ball a time，but I still cannot handle it.

My answer is not as detailed as Marko's and it does not give the probability of rounds but probability of draws before a ball of one colour to become extinct first.  But a simple enumeration of the combination of draws could lead to the below and all X's are the number of draws that yield the combination. Now let us denote each of them with sub-scripts.

$AAA -X_1$

$AAB -X_2$

$AAC -X_3$

$ABB -X_4$

$ACC -X_5$

$ABC -X_6$

$BBB -X_7$

$BBC -X_8$

$BCC -X_9$

$CCC -X_10$

Let us analyse Ball A

$3X_1+2X_2+2X_3+X_4+X_5+X_6 = n$

If you notice it is same for B and C too.

Let us analyze for Ball B

$3X_7+2X_4+2X_8+X_2+X_6+X_9 = n$

So is for Ball C

Summation of the solution of all three will make sure that one of those balls will get to run out the first.

Now use generating function to find the solution for any one of the equations. And the coefficient of $X^n$ is the number of ways you can draw all n balls of any type first.
Let us assume $n=20$

Thus
$(1+x^3+x^6+x^9+x^{12}+x^{15}+x^{18}+x^{21})(1+x^2+x^4+x^6+x^8+x^{10}+x^{12}+x^{14}+x^{16}+x^{18}+x^{20})^2(\sum_{i=0}^{20}x^i)^3$

The coefficient of $x^{20}$ in the above generating function is $6602$.

Total number of ways all such draws could result in a sum of 60
$3(X_1+X_2+X_3+X_4+X_5+X_6 +X_7+X_8+X_9+X_{10})= 60$

$(X_1+X_2+X_3+X_4+X_5+X_6 +X_7+X_8+X_9+X_{10})= 20$
and the coefficient of $x^{20}$ in the below generation function

$(\sum_{i=0}^{20}x^i)^{10}$ is $10015005$.

Thus the required probability = $\frac{6602\times 3}{10015005}$

different n, you will have to go through this procedure to obtain the probability.

I hope I have given you a simple solution.

Goodluck.

Here  is  a  basic  contribution,   working  with  a  closely  related
question. We solve the problem where  we have $j$ instances of each of
$n$ types of  coupons and draw without replacement until  we have seen
all $j$ coupons  of some type.  Using the notation  from the following
MSE    link    we
introduce the marked generating function

$$\left(\sum_{k=0}^{j-2}
\frac{j!}{(j-k)!} \frac{z^k}{k!} + j w z^{j-1}\right)^n.$$

The coefficient on $[z^m]$  here represents distributions of sequences
of $m$  draws from the $n$  types according to probability,  where the
ones that occur  $j-1$ times have been marked. Each  of the latter may
be augmented to a  complete set of some color where  the weight is one
because $j-1$  coupons have already  been drawn.  As we only  need the
count we differentiate with respect to $w$ and set $w=1$, getting

$$n\times \left(\sum_{k=0}^{j-1}
\frac{j!}{(j-k)!} \frac{z^k}{k!}\right)^{n-1}
\times j z^{j-1}.$$

With  the  method  from  the  linked  post  we  thus  obtain  for  the
probability

$$P[T = m] = \frac{1}{m!} {nj\choose m}^{-1}
(m-1)! [z^{m-1}] n j z^{j-1} \left(\sum_{k=0}^{j-1}
\frac{j!}{(j-k)!} \frac{z^k}{k!}\right)^{n-1}
\\ = \frac{1}{m!} {nj\choose m}^{-1} \times n \times j \times
(m-1)! [z^{m-1}] z^{j-1} (-z^j + (1+z)^j)^{n-1}.$$

Extracting the coefficient we find

$${nj-1\choose m-1}^{-1} [z^{m-j}]
\sum_{q=0}^{n-1} {n-1\choose q} (-1)^{n-1-q} z^{j(n-1-q)}
(1+z)^{qj}
\\ = {nj-1\choose m-1}^{-1}
\sum_{q=0}^{n-1} [z^{m-j(n-q)}] {n-1\choose q} (-1)^{n-1-q}
(1+z)^{qj}
\\ = {nj-1\choose m-1}^{-1}
\sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{qj\choose m-j(n-q)}
\\ = {nj-1\choose m-1}^{-1}
\sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{qj\choose nj-m}.$$

Observe that

$${qj\choose nj-m} {nj-1\choose m-1}^{-1}
= \frac{(qj)! (m-1)! } {(nj-1)! (m-(n-q)j)! }
\\ = {nj-1\choose qj}^{-1} {m-1 \choose m-(n-q)j}.$$

We record for the probabilities the formula

$$\bbox[5px,border:2px solid #00A000]{
P[T=m] = \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj}^{-1} {m-1 \choose (n-q)j-1}.}$$

We now verify that this is a probability distribution.
This requires the value of

$$\sum_{m=j}^{n(j-1)+1} {m-1 \choose (n-q)j-1}
= \sum_{m=j-1}^{n(j-1)} {m\choose (n-q)j-1}
\\ = [z^{(n-q)j-1}] \sum_{m=j-1}^{n(j-1)} (1+z)^m
= [z^{(n-q)j}] ( (1+z)^{n(j-1)+1} - (1+z)^{j-1} ).$$

With $0\le  q\le n-1$ the second  term does not contribute  and we may
continue with

$$ \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj}^{-1} {n(j-1)+1\choose (n-q)j}
\\ = \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj}^{-1} {nj+1-n\choose qj+1-n}
\\ = \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q} \frac{qj}{nj-qj}
{nj-1\choose qj-1}^{-1} {nj+1-n\choose qj+1-n}
\\ = \sum_{q=1}^{n-1}  {n-1\choose q-1} (-1)^{n-1-q}
{nj-1\choose qj-1}^{-1} {nj+1-n\choose qj+1-n}.$$

Observe once more that

$${nj-1\choose qj-1}^{-1} {nj+1-n\choose qj+1-n}
= \frac{(nj+1-n)! \times (qj-1)!}{(nj-1)! \times (qj+1-n)!}
\\ = {nj-1\choose n-2}^{-1} {qj-1\choose n-2}.$$

We thus find for the sum of the probabilities

$${nj-1\choose n-2}^{-1}
\sum_{q=1}^{n-1}  {n-1\choose q-1} (-1)^{n-1-q}
{qj-1\choose n-2}
\\ = {nj-1\choose n-2}^{-1}
\sum_{q=0}^{n-2}  {n-1\choose q} (-1)^{n-q}
{qj+j-1\choose n-2}
\\ =  1 + \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-q}
{qj+j-1\choose n-2}.$$

The sum vanishes, as in

$$\sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-q}
[z^{n-2}] (1+z)^{qj+j-1}
\\ = [z^{n-2}] (1+z)^{j-1}
\sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-q} (1+z)^{qj}
\\ = [z^{n-2}] (1+z)^{j-1} (1-(1+z)^j)^{n-1},$$

but $(1-(1+z)^j)^{n-1} = (-1)^{n-1} j^{n-1} z^{n-1} + \cdots$ and
there is no contribution.  This confirms it being a probability
distribution.

Continuing with the expectation we require the value of

$$\sum_{m=j}^{n(j-1)+1} m {m-1 \choose (n-q)j-1}
= (n-q)j \sum_{m=j}^{n(j-1)+1} {m \choose (n-q)j}
\\ = (n-q)j [z^{(n-q)j}] \sum_{m=j}^{n(j-1)+1} (1+z)^m
\\ = (n-q)j [z^{(n-q)j+1}] ((1+z)^{n(j-1)+2} - (1+z)^j)
= (n-q)j {n(j-1)+2\choose (n-q)j+1}.$$

The second term did not contribute since we have $(n-q)j+1\gt j.$
We thus have for the expectation

$$j \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj}^{-1} (n-q) {n(j-1)+2\choose (n-q)j+1}
\\ = j \sum_{q=0}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj}^{-1} (n-q) {nj+2-n\choose qj+1-n}
\\ = j \sum_{q=1}^{n-1}  {n-1\choose q} (-1)^{n-1-q}
\frac{qj}{nj-qj} {nj-1\choose qj-1}^{-1} (n-q)
\\ \times \frac{nj+2-n}{nj-qj+1}
{nj+1-n\choose qj+1-n}
\\ = j (nj+2-n) \sum_{q=1}^{n-1} q {n-1\choose q} (-1)^{n-1-q}
{nj-1\choose qj-1}^{-1}
\frac{1}{nj-qj+1}
{nj+1-n\choose qj+1-n}.$$

Re-using the earlier factorization we get

$$j (nj+2-n) {nj-1\choose n-2}^{-1}
\sum_{q=1}^{n-1} q {n-1\choose q} (-1)^{n-1-q}
\frac{1}{nj-qj+1}
{qj-1\choose n-2}
\\ = j (nj+2-n) (n-1) {nj-1\choose n-2}^{-1}
\sum_{q=1}^{n-1} {n-2\choose q-1} (-1)^{n-1-q}
\frac{1}{nj-qj+1}
{qj-1\choose n-2}
\\ = j^2 n (nj+1) {nj+1\choose n-1}^{-1}
\\ \times
\sum_{q=0}^{n-2} {n-2\choose q} (-1)^{n-q}
\frac{1}{nj-qj-j+1}
{qj+j-1\choose n-2}.$$

Working with the sum term we have

$${n-2\choose q} (-1)^{n-q}
\frac{1}{nj-qj-j+1}
{qj+j-1\choose n-2}
\\ = \mathrm{Res}_{z=q}
\frac{1}{nj-j+1-zj}
\prod_{p=0}^{n-3} (zj+j-1-p)
\prod_{p=0}^{n-2} \frac{1}{z-p}.$$

Now since $\lim_{R\to\infty} 2\pi R  \times R^{n-2}/R/R^{n-1} = 0$ and
residues sum  to zero we may  evaluate this by taking  the negative of
the residue at $z=n-1+1/j$. This is the computation:

$$-\mathrm{Res}_{z=n-1+1/j}
\frac{1}{nj-j+1-zj}
\prod_{p=0}^{n-3} (zj+j-1-p)
\prod_{p=0}^{n-2} \frac{1}{z-p}
\\ = \frac{1}{j} \mathrm{Res}_{z=n-1+1/j}
\frac{1}{z-(n-1+1/j)}
\prod_{p=0}^{n-3} (zj+j-1-p)
\prod_{p=0}^{n-2} \frac{1}{z-p}
\\ = \frac{1}{j}
\prod_{p=0}^{n-3} (nj-p)
\prod_{p=0}^{n-2} \frac{1}{n-1+1/j-p}
\\ = \frac{1}{j} \times (n-2)! \times {nj\choose n-2} \times
j^{n-1} \prod_{p=0}^{n-2} \frac{1}{nj-j+1-pj}.$$

With

$${nj\choose n-2} {nj+1\choose n-1}^{-1}
= \frac{n-1}{nj+1}$$ we finally have the closed form

$$\bbox[5px,border:2px solid #00A000]{
E[T] = n! \times
j^n \times \prod_{p=0}^{n-2} \frac{1}{nj-j+1-pj}.}$$

To see what the asymptotics are we use the alternate form

$$\bbox[5px,border:2px solid #00A000]{
E[T] = n \times j \times
\frac{\Gamma(n)\Gamma(1+1/j)}{\Gamma(n+1/j)}.}$$

Keeping $j$ fixed and letting $n$ go to infinity yields the asymptotic

$$n\times j\times \Gamma(1+1/j) \times n^{-1/j}
= n^{1-1/j} \times j\times \Gamma(1+1/j).$$

There is  an enumeration routine  that may  be compared to  the closed
forms both of which were implemented in the following Maple code.

V :=
proc(n, j)
    option remember;
    local L, recurse, results;

    results := 0;

    recurse :=
    proc(LL, sofar, prob)
    local choice, cprob;

        if numboccur(LL, 0) > 0 then
            results := results + prob*u^nops(sofar);
            return;
        fi;

        for choice to nops(LL) do
            cprob := LL[choice]/(n*j-nops(sofar));

            recurse([seq(LL[q], q=1..choice-1),
                     LL[choice]-1,
                     seq(LL[q], q=choice+1..nops(LL))],
                    [op(sofar), choice],
                    prob*cprob);
        od;
    end;

    L := [seq(j, q=1..n)];
    recurse(L, [], 1);

    results;
end;

P := (n, j, m) -> n*j/binomial(n*j, m)/m
*coeftayl(z^(j-1)*(-z^j+(1+z)^j)^(n-1), z=0, m-1);
PGF := (n, j) -> add(P(n,j,m)*u^m, m=j..(j-1)*n+1);

EX := (n, j) -> add(P(n,j,m)*m, m=j..(j-1)*n+1);

P2 := (n, j, m) ->
add(binomial(n-1,q)*(-1)^(n-1-q)/binomial(n*j-1, q*j)
    *binomial(m-1, m-(n-q)*j), q=0..n-1);

PGF2 := (n, j) -> add(P2(n,j,m)*u^m, m=j..(j-1)*n+1);

EX2 := (n, j) -> n!*j^n*mul(1/(n*j-j+1-p*j), p=0..n-2);

EXGAMMA := (n, j) -> n*j*GAMMA(n)*GAMMA(1+1/j)/GAMMA(n+1/j);
EXASYMPT := (n, j) -> n^(1-1/j)*j*GAMMA(1+1/j);

With the calculation  that was presented here we want  to make sure we
have the  correct interpretation of  the problem from the  start.  The
following  basic program  will do  this by  computing the  expectation
through  simulation. Consult  for the  details of  the scenario  under
investigation.  The output is in fine agreement with the data i.e. the
closed form from above.

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <time.h>
#include <string.h>

int main(int argc, char **argv)
{
  int n = 6 , j = 3, trials = 1000;

  if(argc >= 2){
    n = atoi(argv[1]);
  }

  if(argc >= 3){
    j = atoi(argv[2]);
  }

  if(argc >= 4){
    trials = atoi(argv[3]);
  }

  assert(1 <= n);
  assert(1 <= j);
  assert(1 <= trials);

  srand48(time(NULL));
  long long data = 0;

  for(int tind = 0; tind < trials; tind++){
    int src[n*j];

    for(int cind = 0; cind < n*j; cind++)
      src[cind] = cind/j;

    int done = 0; int steps = 0;
    int dist[n];

    for(int cind = 0; cind < n; cind++)
      dist[cind] = 0;

    while(!done){
      int cpidx = drand48() * (double)(n*j-steps);
      int coupon = src[cpidx];

      for(int cind=cpidx; cind < n*j-steps-1; cind++)
        src[cind] = src[cind+1];

      steps++;
      dist[coupon]++;

      if(dist[coupon] == j)
        done = 1;
    }

    data += steps;
  }

  long double expt = (long double)data/(long double)trials;
  printf("[n = %d, j = %d, trials = %d]: %Le\n",
         n, j, trials, expt);

  exit(0);
}


How to figure of the Laplace transform for $\log x$? I was looking at a table of common Laplace transforms of functions when I came across the transform for $\log x$.  Apparently, the transform is as follows:

$$\mathcal{L} \left\{ \log x\right\}=-\frac{1}{s}\left(\log s + \gamma\right)$$

where $\gamma$ is Euler's Constant.

Clearly, because $\gamma$ is present, the integral

$$\mathcal{L} \left\{ \log x\right\}=\int_{0}^{\infty} e^{-st}\log t dt$$

must be turned into a sum at some point.  This integral as well looks very similar to

$$\Gamma'(1)=\int_{0}^{\infty} e^{-t}\log t dt=-\gamma$$

How should $\mathcal{L} \left\{ \log x\right\}$ be solved?

Here is my attempt:

Letting $u=st \Rightarrow t =\frac{1}{s}u \Rightarrow dt = \frac{du}{s}$ so we have

$$
\mathcal{L} \left\{ \log x\right\}=\int_{0}^{\infty} e^{-st}\log t \, dt=
\frac{1}{s} \int_{0}^{\infty} e^{-u}\log (\frac{1}{s}u)du =
\frac{1}{s} (\int_{0}^{\infty} e^{-u}\log u\, du -\log s\int_{0}^{\infty} e^{-u}\, du)=\frac{1}{s}(\log s-\gamma)
$$

I must have made a mistake here but cannot find it.

The Laplace transform of the power function is:

$$
\int_0^\infty e^{-st} t^a dt = \frac{\Gamma(a+1)}{s^{a+1}}
$$

Differentiate with respect to $a$ using differentiation under the integral sign:

$$
\int_0^\infty e^{-st} t^a \log{t} dt = \frac{\Gamma'(a+1) s^{a+1} - \Gamma(a+1) s^{a+1} \log{s}}{(s^{a+1})^2}
= \frac{\Gamma'(a+1) - \Gamma(a+1) \log{s}}{s^{a+1}}
$$

Now plug in $a = 0$ to get what you want.

The only mistake you have done is in the last step.You have written log(s) instead of -log(s).
Solve the last integral carefully , You are missing the negative sign and hence the variation in the answer


4 member committees with more women than men From a group of 10 men and 5 women, 4 member committees are to be formed each of which must contain at least one woman. Then the probability for these committees to have more women than men is:

  $\frac{2}{23}$
  $\frac{1}{11}$
  $\frac{21}{220}$
  $\frac{3}{11}$

Since each committee must have at least one woman, 4 women have already been placed into separate committees. There is one woman yet to be placed. For a committee to have more women than men, there can be 2 women and 0 men or 1 man. For a committee having only one woman, there must not be any more men in the committee.

This is what I could reason so far. But I don't know how to proceed.

Edit:
I might have misinterpreted four-member committees (having 4 members) as 4 committees.

The probability that there is at least one woman in the committee is 1 minus the probability that no woman is in the committee

$$P(W\geq 1)=1- \frac{{10 \choose 4}\cdot {5 \choose 0}}{15 \choose 4}$$

Then it is asked for $$P(W\geq 3|W\geq 1)=\frac{P(W\geq 3\cap W\geq 1)}{P(W \geq 1)}=\frac{P(W\geq 3)}{P(W\geq 1)}$$

And $$P(W \geq 3)=\sum_{x=3}^4 \frac{{10 \choose 4-x}\cdot {5 \choose x}}{{15 \choose 4}}$$

If you consider each committee to contain 4 members and assume that there are 4 committees,

P(4 member committees which contain at least 1 woman) = P(3M,1W)+P(2M,2W)+P(1M,2W)+P(0M,4W) =

{10C3.5C1 + 10C2.5C2 + 10C1.5C3 + 10C0.5C4}/ 15C4 = 1155/1365

P(committees to have more women than men) =

{ P(1M,3W) + P(0M,4W) }/ {P(3M,1W)+P(2M,2W)+P(1M,2W)+P(0M,4W)}

=(105/1365)/(1155/1365) = 1/11, which is the required probability.


Sum of consecutive square roots inside a square root $$\large\sqrt{1+\sqrt{1+2+\sqrt{1+2+3+\sqrt{1+2+3+4+\cdots}}}}$$
I saw this somewhere in the internet but, the website didn't provide me any further information. What is the sum of the equation above? What is it called?

What is the sum of the equation above? What is it called?

It's neither an equation nor a sum, but is a continued radical defined as the limit   (as $n\to\infty$) of the sequence of the nested radicals
$$
u_n = \sqrt{a_1+\sqrt{a_2 + \cdots + \sqrt{a_n}}}
$$
where $a_n = \sum_{i=1}^n i = n(n+1)/2$ (the $n^{th}$ triangle number), $n = 1,2,3,...$

That this limit exists follows from a theorem proved by T. Vijayaraghavan (1927):

  For any sequence of nonnegative reals $(a_n)_{n=1,2,3,...}$, the sequence of nested radicals $(u_n)_{n = 1,2,3,...}$ with
  $$u_n = \sqrt{a_1+\sqrt{a_2 + \cdots + \sqrt{a_n}}}$$
   converges if and only if there exists a finite upper limit
  $$\overline{\lim}\ {\left(\frac{\log{a_n}}{2^n}\right)} < \infty.$$

This clearly holds in the present case, because
$$\overline{\lim}\ {\left(\frac{\log{\frac{n(n+1)}{2}}}{2^n}\right)}  = 0.
$$

To  bound the error of $u_n$ as an approximation of the limit, the following consequence of a theorem proved by Herschfeld (1935) can be used:

  If $a_i \gt 0 \ \ (i = 1,2,3,...)$, then for all $n \ge 1$,
  $$0 \le u_{n+1}-u_n \le \frac{1}{2^n}\sqrt{\frac{a_{n+1}}{a_1 a_2 \cdots a_n}}. $$

Substituting $a_i = i(i+1)/2$ and simplifying then gives
$$0 \le u_{n+1}-u_n \le \frac{1}{n!}\sqrt{\frac{n+2}{2^{n+1}}} ,
$$
whence, noting that $n! \ge \sqrt{2 \pi n} \left(\frac{n}{e}\right)^n$,
$$0 \le u_{n+1}-u_n \le A \left(\frac{B}{n}\right)^n
$$
where $A = \sqrt{\frac{3}{4\pi}} = 0.4886...$ and $B = \frac{e}{\sqrt{2}} = 1.922...$

Now for all $m > n > 1$,

$$\begin{align}
0 \le u_m - u_n & = (u_m - u_{m-1}) + (u_{m-1} - u_{m-2}) + \cdots + (u_{n+1} - u_n) \\
& \le A \left (  \left (\frac{B}{m-1}\right )^{m-1} + \left (\frac{B}{m-2}\right )^{m-2} + \cdots + \left (\frac{B}{n}\right )^{n}     \right )\\
& \le A \left (  \left (\frac{B}{n}\right )^{m-1} + \left (\frac{B}{n}\right )^{m-2} + \cdots + \left (\frac{B}{n}\right )^{n}     \right )\\
& \le A \left (\frac{B}{n}\right )^n \frac{1 - (\frac{B}{n})^{m-n}}{1 - \frac{B}{n}}\tag{*}
\end{align}
$$
where the geometric progression was summed in the last step (noting that $B/n < 1$ for all $n > 1$).

Finally, taking limits with $m \to \infty$ and letting $u = \lim_{m \to\infty}{u_m}$,
$$0 \le u - u_n \le A \left (\frac{B}{n}\right )^n \frac{1}{1 - \frac{B}{n}}.
$$

(Note that (*) above also gives another proof of the existence of the limit, by showing the sequence $(u_n)_{n = 1,2,3,...}$ to be Cauchy.)

The latter error bound is rather weak, but it suffices to prove, for example, that

$$u = 1.8644589581634881323520037152739437841564220698266...$$

by computing $u_n$ for sufficiently large $n$. For example, $u_n$ has at least $n$ correct digits for any $n \ge 20$, because in that case
$A \left (\frac{B}{n}\right )^n \frac{1}{1 - \frac{B}{n}} \le 0.5 \ 10^{-n}.
$

(Aside)

Here's the Sage program I used to compute the $u_n$:

def u(n):
  r = 0
  for k in [1..n][::-1]: r = sqrt(k*(k+1)/2 + r)
  return r

for n in [10..100]: print n, u(n).n(digits=100)

As Gerry Myerson said this type of problems are called nested radical.

Let us try the following method: Writing the sequence of partials $$D_n:=
\sqrt {1 + \sqrt {1 + 2 + \sqrt {1 + 2 + 3 + \sqrt {1 + 2 + 3 + 4 +  \ldots  + \sqrt { \ldots  + \sqrt { \ldots  + \sqrt {1 + 2 + 3 +  \ldots  + n} } } } } } }
$$

Labeling the terms of the series beginning from the last one up to the first one; denoted by $y_1^2,y_1^2,\cdots,y_{n-1}^2,y_n^2$, i.e.,
\begin{align}
&y_n^{2}=1 + 2 + 3 +  \ldots  + n = \sum\limits_{k = 1}^n {k}=\frac{n(n+1)}{2}
\\
&y_{n-1}^{2}=1 + 2 + 3 +  \ldots  + (n-1) = \sum\limits_{k = 1}^{n-1} {k}=\frac{n(n-1)}{2}
\\
&y_{n-2}^{2}=1 + 2 + 3 +  \ldots  + (n-2) = \sum\limits_{k = 1}^{n-2} {k}=\frac{(n-1)(n-2)}{2}
\\
&\vdots
\\
&y_{3}^{2}=1 + 2 + 3 = \sum\limits_{k = 1}^{3} {k}=\frac{(3)(4)}{2}=6
\\
&y_{2}^{2}=1 + 2 = \sum\limits_{k = 1}^{2} {k}=\frac{(2)(3)}{2}=3
\\
&y_{1}^{2}=1 = \sum\limits_{k = 1}^{1} {k}=\frac{(1)(2)}{2}=1
\end{align}
Thus,
\begin{align}
D_n  =
\sqrt {y_1  + \sqrt {y_2  + \sqrt {y_3  +  \ldots  + \sqrt { \ldots  + \sqrt { \ldots  + \sqrt {y_{n - 2}  + \sqrt {y_{n - 1}  + \sqrt {y_n } } } } } } } }
\end{align}
Now, let us divide $D_n$ into the following subsequences
\begin{align}
 & S_{n,1}^2  = y_n  \\
 & S_{n,2}^2  = y_{n - 1}  + S_{n,1}  \\
 &S_{n,3}^2  = y_{n - 2}  + S_{n,2}  \\
 &S_{n,4}^2  = y_{n - 3}  + S_{n,3}  \\
  &\vdots  \\
 &S_{n,n - 2}^2  = y_2  + S_{n,n - 1}  \\
 &S_{n,n - 1}^2  = y_1  + S_{n,n}
 \end{align}
Finally, we have
\begin{align}
D_n  &= S_{n,1}^2  + S_{n,2}^2  + S_{n,3}^2  + S_{n,4}^2  +  \ldots  + S_{n,n - 2}^2  + S_{n,n - 1}^2
\\
&= \sum\limits_{j = 1}^{n - 1} {S_{n,j}^2 }
\\
&= \sum\limits_{j = 1}^n {y_j }  + \sum\limits_{j = 1}^n {S_{n,j} }
\end{align}
I think this enough to give an indication.


Computing Expect Value of Two Random Variables Problem:

Suppose that we are given a random variables $x$ that is
uniformly distributed on the interval $[-1,1]$. We are also given
$y$ that is uniformly distributed on $[-1,3]$. Find the expected
value of $E(\frac{x}{y})$ assuming that $x$ and $y$ are independent.

Answer:

The distribution functions for $x$ and $y$ is:
\begin{eqnarray*}
f_x(x) &=& \frac{1}{2} \\
f_y(y) &=& \frac{1}{4} \\
\end{eqnarray*}
Now for the expected value.
\begin{eqnarray*}
E(\frac{x}{y}) &=& \int_{-1}^{1} \int_{-1}^{3} { \frac{x}{8y} } dy dx
    = \int_{-1}^{1}  \frac{x}{8} \ln{|y|} \Big|_{y = -1}^{ y = 3} dx \\
E(\frac{x}{y}) &=& \int_{-1}^{1} \frac{(\ln3)x}{8} dx \\
E(\frac{x}{y}) &=& 0 \\
\end{eqnarray*}

Is my solution correct? I am concerned that I have a problem because the function I am integrating is dividing by $0$ when $y = 0$.

Bob

Your distribution functions are incorrect. Using your function, if we plug in $0$ to $f_x(x)$ we get $0$. This would imply that the probability of $x$ being less than $0$ is $0$, but with a uniform distribution on $[-1,1]$, it should be $1$, since "half" the values possible are below $0$.

You should instead get functions constant over the intervals where the random variables can hold values. See if you can figure them out. If not, comment and I will add something.

Also, I realize I didn't read the other parts of your answer very carefully. As Did points out you do not have a well-defined expected value. Unfortunately the manner in which you calculate the integral uses Fubini's theorem which does not apply, as he says, when the integral of the absolute value of each of the positive and negative parts of your function are infinite (which in this case, they are).

$f_X(x)= \tfrac 1 2~\mathbf 1_{-1\leq x\leq 1}$

$f_Y(y)= \tfrac 1 4~\mathbf 1_{-1\leq x\leq 3}$

$\mathsf E(X)=\int_{-1}^1\int_{-1}^3 \frac{x}{8y}\operatorname d y\operatorname dx$

But otherwise okay.

However, as your suspected, that one point does cause problems.   As Did points out, the existence of any $\mathsf E(Z)$ requires $\mathsf E(\lvert{Z}\rvert)$ to be finite.   So even though the above integral is zero, it is not the actual solution.


Is $\sqrt{1+x^2}$ matrix monotone? A function $f(x)$ is matrix monotone if $f(A)-f(B)$ is positive semidefinite whenever $A-B$ is positive semidefinite for positive semidefinite matrices $A, B$. Is $\sqrt{1+x^2}$ matrix monotone?

No. One may be tempted to expect $\sqrt{1+x^2}$ to behave like $x$. However, since $x^2$ is not matrix monotone, it may cause $\sqrt{1+x^2}$ to fail to be matrix monotone. I don't have a nice counterexample at hand, but if you have access to a numerical linear algebra package, you will see that when
$$
A=\pmatrix{2.01&1\\ 1&3},\ B=\pmatrix{1\\ &2},
$$
we have $A\succ B\succ 0$ but the eigenvalues of $\sqrt{I+A^2}-\sqrt{I+B^2}$ are $1.83$ and $-8.34\times10^{-3}$.

I think yes.  My general thinking is that the positive definite property is tied
to a matrix's determinate being non-zero, and that the square of a matrix will merely
amplify the magnitude of the determinate, but not zero it out.

I emphasize that this is strictly a guess.


About the Golden Ratio Conjugate My question is quite simple: I have the Golden Ratio, noted "φ", and the so-called Silver Ratio, noted "ψ". Both of these numbers are solutions for the equation x² - x - 1 = 0, and I want to demonstrate that ψ=1-φ, and ψ=-1/φ. I just know that (x-φ)(x-ψ)=x² - x - 1, but that's all, I just don't get it although it seems very obvious. Any advice on this? Thanks for your replies!

HINT:
Taking up from where you have left,

$$(x-\phi)(x-\psi)=x² - x - 1$$
$$\implies x^2-(\phi+\psi)x+\phi\psi=x² - x - 1$$

Now, just compare the coefficients of the terms on either side of the above equation and re-arrange it to get what you want to demonstrate.

For further reference, you should check Vieta's Theorem.

Ah, yes, I think I understand! So I have −(ϕ+ψ)=−1, and it makes -ψ=-1+ϕ, which is equivalent to ψ=ϕ-1, right? Same for ψ=-1/ϕ, I just have to look at ϕψ=-1. I didn't know this theorem, I will remember it for later! Thank you a lot :)


What is the most accurate estimate of total possible number of chess games What is the most accurate estimate for the total possible number of chess games. I already know about Shannon's number, I'm just wondering if there's anything higher than that.

On the Wikipedia page for Shannon's number it states

  Allis also estimated the game-tree complexity to be at least $10^{123}$, "based on an average branching factor of $35$ and an average game length of $80$"


If $f:\mathbb{R}\to\mathbb{R}$ is continuous and $f(x)\neq x$ for all $x$, must it be true that $f(f(x))\neq x$ for all $x$? Let $f: \Bbb R → \Bbb R$ be a continuous function such that $f(x)=x$ has no real solution  . Then is it true that $f(f(x))=x$ also has no real solution ?

Since $f$ is continuous, saying that $f(x) = x$ has no solution means that either $f(x) < x$ for all $x$ or $f(x) > x$ for all $x$. Let's assume wlog that $f(x) > x$, then $f(f(x)) > f(x) > x$ for all $x$ so $f(f(x))=x$ has no solution either.

Let $\mbox{Id}_\mathbb{R}:\mathbb{R}\to \mathbb{R}$ the function $\mbox{Id}_\mathbb{R}(x)=x$. By hypotheses $0\notin \mbox{Im}(f-\mbox{Id}_{\mathbb{R}})$. Note that :

$\mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)} \subset \mbox{Im}(f-\mbox{id}_{\mathbb{R}}) \implies  0\notin \, \mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)} $
$\mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)^C} \subset \mbox{Im}(f-\mbox{id}_{\mathbb{R}}) \implies  0\notin \, \mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)^C} $
$\mbox{Im}(f\circ f-\mbox{id}_\mathbb{R})
\supset
\mbox{Im}(f|_{\mbox{Im}(f)} -\mbox{id}_\mathbb{R}|_{\mbox{Im}(f)})
=
\mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)}$.
$\mbox{Im}(f\circ f-\mbox{id}_\mathbb{R})
\supset
\mbox{Im}(f|_{\mbox{Im}(f)^C} -\mbox{id}_\mathbb{R}|_{\mbox{Im}(f)^C})
=
\mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)^C}$.
$\mbox{Im}(f\circ -\mbox{id}_\mathbb{R})= \mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)^C}\cup \mbox{Im}(f -\mbox{id}_\mathbb{R})|_{\mbox{Im}(f)}$

Then if $f|_{\mbox{id}_\mathbb{R}} -\mbox{id}_\mathbb{R}$ no have real roots then $f\circ f-\mbox{id}_\mathbb{R}$ too no have real roots.


Archimedean Property Corollary proof I am trying to prove one of the Archmedian properties corollaries.

The corollary states:

If $x$ is a real number such that $x>0$ then there exists a natural number $n\in \mathbb{N}$ such that $n−1\le x <n$.

From the Archmedian property, I know that for $x\in \mathbb{R}$, then there is a positive integer $n$ such that $n>x$ and from the Well Ordering Principle I know that for any nonempty subset of $\mathbb{N}$ there is a least element, however, how do I show that $n-1\le x$?

look at all those natural numbers $n$ which is larger than $x$, and choose the smallest one (e.g. $n_0$) by well-ordering principle, then argue that $n_0-1$ is also a natural number(shall make use of the fact that $x>0$). Hence it must follow that $n_0-1\le x$.


base of the vectorspace $\Bbb{Q}(a)$ over $\Bbb{Q}$ i have to find the base of the vectorspace $\Bbb{Q}(\alpha)$ over $\Bbb{Q}$ with $\alpha = \sqrt{1+\sqrt{3}}$.

i have found the minimal polynom of $\alpha$ over $\Bbb{Q}$: $f(x)=x^{4}-2x^{2}-2$.
The degree of this polynom is 4 so dim$\Bbb{Q}(\alpha) = 4  $.
Is this correct?

can i take as base 1,$\alpha$,$\alpha^{2}$,$\alpha^{3}$?

Yes you can although there other forms of bases.


Does the limit of proportions of objects in a sequence depend on the order of the objects in that sequence? Motivation : Suppose A is an infinite sequence of some objects, and I want to get some sense of the proportion of objects satisfying some property P. Intuitively, I can define
proportion = $\lim \limits_{n \to \infty} \frac {\sum_{k=1}^{n} f(A_k)}{n}$, where $f(A_k)=1$ if $A_k \in P$, and $0$ otherwise.
Question : Does this limit (or even its existence) depend on the order of the objects in the sequence A?

Yes, quite dramatically. Take $A = \mathbb{N}$ to be the positive integers WLOG and let $S$ be the subset having property $P$. The full group $\text{Aut}(\mathbb{N})$ of permutations of $\mathbb{N}$ acts transitively on the set of all infinite subsets of $\mathbb{N}$ whose complement is also infinite, so if $S$ is infinite with infinite complement then the limit you describe can have any value in $[0, 1]$, or be undefined, depending on the order.
For example, take $S$ to be the odd numbers. In the usual order the limit is $\frac{1}{2}$; this is called the natural density. But if we consider the order
$$1, 2, \\ 3, 5, 4, \\ 7, 9, 11, 6, \\ 13, 15, 17, 19, 8, \dots$$
in which we alternate between one even number and $k$ odd numbers for all positive integers $k$, then the limit is $1$. Variations of this idea can be used to produce any other limit or no limit.
To produce a limit $r \in [0, 1]$ take a sequence $\frac{p_k}{q_k}$ of rational approximations converging to $r$ (which can become eventually constant if $r$ is rational) and alternate between $q_k$ even numbers and $p_k$ odd numbers. To produce no limit, alternate between $2^k$ even numbers and $2^k$ odd numbers; this causes the density to fluctuate between $\frac{1}{2}$ and $\frac{1}{3}$. This is related to the fact that the "Benford subset" of positive integers whose first digit is $1$ has no natural density.
On the other hand, if $S$ is finite then the density is $0$ regardless of the order, and if $S$ is cofinite (has finite complement) then the density is $1$ regardless of the order.

Yes the limit does exist.  Define an event of picking up an object and noting whether it has property P.  Then your limit function is basically the definition of the probability of an event.  Although your function f will flip-flop between 0 and 1, the impact of each new 0 or each new 1 on the total sum will become vanishingly small as n becomes increasingly large.
So if my objects are coins and P is the property (lying heads-up), then as I examine more and more coins the closer your limit will get to 0.5. By the time I've looked at 1,000,000 coins, say, the sum might be at 502,301/1,000,000.  If the next coin is a head, it will become 502,302/1,000,001.  If it is a tail, 502,301/1,000,000, but the difference is negligible.


What is the perimeter of a sector? I don't understand this.

So we have:
\begin{align}
r &= 12 \color{gray}{\text{ (radius of circle)}} \\
d &= 24 \text{ (r}\times2) \color{gray}{\text{ (diameter of circle)}} \\
c &= 24\pi \text{ (}\pi\times d) \color{gray}{\text{ (circumference of circle)}} \\
a &= 144\pi \text{ (}\pi\times r^2) \color{gray}{\text{ (area of circle)}}
\end{align}
And we have:
\begin{align}
ca &= 60^\circ \color{gray}{\text{ (Central Angle of sector)}} \\
ratio &= \frac{60}{360} = \frac{1}{6} \color{gray}{\text{ (ratio of ca to circle angle which is 360 degrees)}}
\end{align}
So now we can calculate:
\begin{align}
al = \frac{1}{6} \times 24\pi &= 4\pi \color{gray}{\text{ (arc length of SECTOR = ratio X circumference of circle)}}
sa &= \frac{1}{6} \times 144per = 24\pi \color{gray}{\text{ (sector area = ratio X area of circle)}}
\end{align}
So my question is: What is meant by the perimeter of a Sector. Is it the arch length or the are of a Sector? And what is $24 + 4\pi$?

The perimeter of the sector includes the length of the radius $\times 2$, as well as the arc length. So the perimeter is the length "around" the entire sector, the length "around" a slice of pizza, which includes it's edges and its curved arc.

The arc length is just the curved portion of the circumference, the sector permimeter is the length of line $\overline{AC} = r$ plus the length of line $\overline{BC} = r$, plus the length of the arc ${AOC}$.

The circumference of the circle is the total arc length of the circle.

Length is one-dimensional, the length of a line wrapped around the circle. Area is two dimensional; All of what's inside the circle.

perimeter of the sector is the sum of the lengths of all its boundaries.thus the perimeter of the sector is L+2r units.


About fractional Sobolev space I'm reading a paper used Sobolev space $H^s(\Omega)$ , I only know the definition of these space when $\Omega=R^n$ which used Fourier Transform, what if $\Omega$ is a bounded open set?

And I also want to know the bounded linear functional on this space look like?

Any suggestions are welcome!

Maybe you want to take a look to this paper: http://arxiv.org/abs/1104.4345


Conditiona expectatio : Tosses of a biased coin A box contains 2 biased coins, one with probability of 0.4 of head and other with probability 0.7 of head. A coim in randomly chose and tossed 10 times. Evaluate the conditional expectation of the number of heads given that the first 2 of the first 3 tosses were head.

My attempt:

Let $X$ denote the number of heads that appeared on those tosses. Define
$$
X_i=1 \text{if a head appears}$$
$$X_i=0, otherwise$$

If a coin is randomly chosen, the probability of head should be

$$\frac{1}{2} 0.4 + \frac{1}{2} 0.7$$

Then

$$P(X_i=1)=0.55$$

Now, we can see that

$$X=X_1+...+X_{10}$$

Note that there are 4 cases where 2 heads (H) appears on the first 3 tosses:

$$HHH,HHT,HTH,THH$$

If $ Y  $is the event where 2 heads appear on the first 3 tosses, then, for example,

$$E(X_1|Y)=P(HHH)+P(HHT)+P(HTH) = (0.55)^3 + 2(0.55)^20.45 $$

We should have the same for $ X_2, X_3.$ But,$ X_4, ..., X_{10}$ are independent of Y (considering independent tosses), then

$$E[X_i|Y]=E[X_i]=0.55, i=4,...,10$$

Now, we shpuld sum and obtain the conditional expectation of $X.$ But I am getting 5.16, while the answer is 6.06. What is wrong?

Thanks!

The question is a little ambiguous.  When you say "the first 2 of the first 3 tosses are heads," that is clearly a typo; based on the answer you gave, I assume it should read "exactly 2 of the first 3 tosses are heads."  (If it should instead read "at least 2 of the first 3 tosses are heads," the answer will differ.)

Your main error is treating the tosses as independent of each other: All the tosses depend on which coin you chose, and are independent given that choice, which isn't the same thing.  So
$$
P(2H \;|\; A)=3(0.4)^2(0.6) = 0.288, \\
P(2H \;|\; B)=3(0.7)^2(0.3) = 0.441,
$$
where $A$ means you chose the tail-weighted coin and $B$ means you chose the head-weighted coin.  In case $A$, the expected number of heads is clearly $2 + 0.4\times 7 = 4.8$; and in case $B$ it's $2 + 0.7\times 7=6.9$.  So you can write
$$
E[N_H\;|\;2H]=E[N_H\;|\;A]P(A\;|\;2H)+E[N_H\;|\;B]P(B\;|\;2H)\\ =4.8P(A \; | \; 2H)+6.9(1-P(A\;|\;2H))=6.9-2.1P(A\;|\;2H).
$$
Moreover,
$$
P(A\;|\;2H)=\frac{P(2H\;|\;A)P(A)}{P(2H)}=\frac{0.288 \cdot0.5}{0.288\cdot 0.5 + 0.441 \cdot 0.5}=\frac{32}{81}.
$$
The result is then
$$
E[N_H \;|\; 2H] = 6.9 - 2.1\times\frac{32}{81}=6.07.
$$

As the question is written, you are saying that HH was gotten for the first $2$ coin tosses.  I would say from only $2$ coin tosses that no conclusion can be drawn as to which biased coin was chosen because either one could have "easily" generated HH.

Thus my answer would be $2 + 8 * 0.55 = 6.4$


Describing all holomorphic functions such that $f(n)=n$ for $n \in \mathbb{N}$ This question is inspired by a somewhat simpler one.

The question is: how can we classify all holomorphic functions $f:\mathbb{C}\rightarrow\mathbb{C}$ satisfying the property $\forall n \in \mathbb{N} \quad f(n)=n $?

If we have $g:\mathbb{C}\rightarrow\mathbb{C}$ such that $g\big|_\mathbb{N}\equiv 0$, then $f(z)=z+g(z)$ satisfies the criterion. Conversly, given such $f$ and defining $g(z)=f(z)-z$, we get $g\big|_\mathbb{N}\equiv 0$. So, the question boils down to classifying such $g$.

The set $I$ of such $g$, which is $I=\{g:\mathbb{C}\rightarrow\mathbb{C}, g\big|_\mathbb{N}\equiv 0\}$, is an ideal of the algebra of holomorphic functions, so we can ask for its generators. Obviously, $\forall k\in\mathbb{Z}\quad 1-e^{2\pi kz}\in I$, but I am not able to prove that they generate $I$.

Let $f$ any such function. Then $g(z)= f(z)/(ze^{2\pi iz})$ is entire and equal to $1$ at the natural numbers.

Therefore $g(z)-1$ is zero at the naturals. Let $\Pi(z)$ be a Weierstrass product giving you an entire function vanishing exactly at the natural numbers.

Therefore all the $g$ are of the form $\Pi(z)h(z)$ for any entire $h(z)$.

Hence $g(z)=\Pi(z)h(z)+1$ and $$f(z)=ze^{2\pi i z}(\Pi(z)h(z)+1)$$

Two things change here to get all the functions. The product $\Pi(z)$ for all the orders that you may want the zeros to have, and the entire function $h$, which is arbitrary and you may just consider it part of $\Pi(z)$ anyway.


Proving ∀x∃yRxy,∀x∀y(Rxy→∃zRzx), ∀x∀y(Ryx→∀zRxz) ∴∀x∀yRxy I have been trying the following prove but no success. Any help is appreciated. Thank you.
∀x∃yRxy
∀x∀y(Rxy→∃zRzx)
∀x∀y(Ryx→∀zRxz)
∴∀x∀yRxy

I'm assuming you want some flavour of natural deduction proof (as it would be simply evil to set this as an exercise for a Hilbert-style proof-system!).

This is then interesting enough to answer. For it vividly illustrates how thinking strategically helps you construct a natural deduction proof (and with luck makes the proof easy to find!). Break down the construction of proof into stages, but not necessarily stages that follow one after another -- rather, as here, you often need to construct the stages one inside another. To explain:

Stage A

You have three universal premisses and are aiming for a universal conclusion. So the obvious thing to do is take some arbitrary $a$. Your given premisses then yield the derived premisses

$\exists yRay\\
\forall y(Ray \to \exists zRza)\\
\forall y(Rya \to \forall zRaz)$

Suppose you can derive the initial conclusion

$\forall yRay$

Then, since $a$ is arbitrary, you can then derive the wanted final conclusion

$\forall x\forall yRxy$.

[You get the new premisses by three applications of UE, the final step will be UI, and the layout will depend on your preferred proof system!]

Stage B

So we now have a simpler exercise, to get from the derived premisses to the initial conclusion. Your proof here will have to use the existential premiss (and always a good policy to instantiate existentials before universals). So that tells us that the shape of the simpler proof should be like this:

$\exists yRay\\
\forall y(Ray \to \exists zRza)\\
\forall y(Rya \to \forall zRaz)\\
\quad\quad | \quad Rab\\
\quad\quad | \quad\quad\vdots\\
\quad\quad | \quad\forall yRay\\
\forall yRay$

where the final step invokes EE (roughly, given $\exists y\varphi(y)$ and a proof from $\varphi(b)$ to a conclusion $C$  not involving $b$, we can infer $C$). OK so far?

Stage C

At some point we are going to have to invoke the second derived premiss and get at that existential conclusion and then use it in another proof by EE. So that suggests that the proof will have to continue like this:

$\exists yRay\\
\forall y(Ray \to \exists zRza)\\
\forall y(Rya \to \forall zRaz)\\
\quad\quad | \quad Rab\\
\quad\quad | \quad (Rab \to \exists zRza)\\
\quad\quad | \quad \exists zRza\\
\quad\quad | \quad \quad | \quad Rca\\
\quad\quad | \quad\quad | \quad \vdots\\
\quad\quad | \quad\quad | \quad\forall yRay\\
\quad\quad | \quad\forall yRay\\
\forall yRay$

Again -- OK so far, see why the proof outline more or less writes itself?

Stage D

Obviously, we now have to make use of the third derived premiss. And there is only one sensible way of instantiating that universal quantification! Which gives us ...

$\exists yRay\\
\forall y(Ray \to \exists zRza)\\
\forall y(Rya \to \forall zRaz)\\
\quad\quad | \quad Rab\\
\quad\quad | \quad (Rab \to \exists zRza)\\
\quad\quad | \quad \exists zRza\\
\quad\quad | \quad \quad | \quad Rca\\
\quad\quad | \quad \quad | \quad (Rca \to \forall zRaz)\\
\quad\quad | \quad \quad | \quad\forall zRaz\\
\quad\quad | \quad\quad | \quad \vdots\\
\quad\quad | \quad\quad | \quad\forall yRay\\
\quad\quad | \quad\forall yRay\\
\forall yRay$

Drat! We haven't quite finished, as in the subsubproof we've derived $\forall zRaz$ and we want $\forall yRay$. But hopefully you can join up the dots and change the variable by a UE followed by a UI!

So we are done. Now it just remains to implement the proof idea into your favourite natural deduction system!

Here is a proof using the logic software program Fitch:


Why Does this Example of Matrix Multiplication Work? I'm fairly new to matrix multiplication and came across an example which looks wrong and I'm wondering if anyone can clarify.

Which is said to become the following equation:

But if with matrices you multiply row by column, and then sum, why are the two examples equivalent?

Shouldn't the equation evaluate to

$$\begin{bmatrix}
    W_{1,1}*x_1 + W_{1,2}*x_1 + W_{1,3} +x_1 \\
    W_{2,1}*x_2 + W_{2,2}*x_2 + W_{2,3} +x_2 \\
    W_{3,1}*x_3 + W_{3,2}*x_3 + W_{3,3} +x_3 \\
\end{bmatrix}$$

and not

$$\begin{bmatrix}
    W_{1,1}*x_1 + W_{1,2}*x_2 + W_{1,3} +x_3 \\
    W_{2,1}*x_1 + W_{2,2}*x_2 + W_{2,3} +x_3 \\
    W_{3,1}*x_1 + W_{3,2}*x_2 + W_{3,3} +x_3 \\
\end{bmatrix}$$

as it does

What would the correct equation be?

The two equations in the picture you posted are not equivalent. The top one is probably a typo.

It looks OK to me.

To do the matrix product,
I would go
across the Ws
and down the Xs.
That gets the
WX sums.

Then the Bs are added.


Classification of finite abelian groups I'm new to group theory and struggling with understanding what is required in an example problem I'm working through.

I need to classify the following using the classification og finite abelian groups:

$$ \Bbb Z_2 \times \Bbb Z_4 / \langle (0,1) \rangle $$
$$ \Bbb Z_2 \times \Bbb Z_4 / \langle (1,2) \rangle $$
$$ \Bbb Z_6 \times \Bbb Z_8 / \langle (1,2) \rangle $$

How would I go about classifying these? Any help is greatly appreciated.

Recall that a quotient of an abelian group is again abelian. Notice that the subgroup generated by $\left\langle (0,1)\right\rangle$ in $\mathbb{Z}_2\times \mathbb{Z}_4$ has $4$ elements, thus $\mathbb{Z}_2\times \mathbb{Z}_4/\left\langle (0,1)\right\rangle$ has $2$ elements. By the classification of finite abelian groups we must have that this group is isomorphic to $\mathbb{Z}_2$.

You can proceed in this way by doing the same for the other groups. If necessary you can look at order of elements to exclude certain possibilities.

Alternatively you can use the first isomorphism theorem:

Consider the map $f:\mathbb{Z}_2\times \mathbb{Z}_4\rightarrow \mathbb{Z}_2:(\bar{a},\bar{b})\rightarrow \bar{a}$. Clearly $f$ is a surjective morphism and $\ker(f)=\left\langle (0,1)\right\rangle$, by the first isomorphism theorem we have that $$\mathbb{Z}_2\times \mathbb{Z}_4/\left\langle (0,1)\right\rangle\cong \mathbb{Z}_2.$$

If you see the proper morphism you can get the desired isomorphism immediately, but of course this method only works if you already know which group it should be.

The first question here is what is the operation while considering $Z_2 \times Z_4$. So, we have two options.

One is addition, or $(a,b)+(c,d)= (a+c(mod2), b+d(mod4))$, and then $<(0,1)> = \{(0,1)+(a,b)| a\in Z_2, b \in Z_4\}$ and it is a good exercise that you see by yourself that this is whole $Z_2 \times Z_4$, hence the quotient is trivial, which is not the point, I assume.

Other is multiplication, or $(a,b) \times (c,d) = (ac(mod2),bd(mod4))$, and then $<(0,1)> = \{(0,1) \times (a,b)| a\in Z_2,b \in Z_4\}=\{(0,b)|b \in Z_4\}$ which is obviously isomorphic to $Z_4$, so the quotient is obviously $Z_2$.

In other cases the thinking is similar.


What's the parametric equation for the general form of an ellipse rotated by any amount? What's the parametric equation for the general form of an ellipse rotated by any amount?

Preferably, as a computer scientist, how can this equation be derived from the three variables: coordinate of the center/two foci and eccentricity of an ellipse?

I need to generate completely random eclipses within certain bounds. The variables I described above are most convenient. This is for a personal project of mine and I can't find anybody who can help me.

Let's start with the parametric equation for a circle centered at the origin with radius 1:

  x(t) = cos 2πt

  y(t) = sin 2πt

To turn this into an ellipse, we multiply it by a scaling matrix of the form

| a  0 |
| 0  b |

which gives

| a  0 |   | x(t) |   | a x(t) |
| 0  b | * | y(t) | = | b y(t) |

To rotate this by θ degrees, multiply it by the rotation matrix

| cos θ   -sin θ |   | a x(t) |    |a x(t) cos θ - b y(t) sin θ|
| sin θ    cos θ | * | b y(t) | =  |a x(t) sin θ + b y(t) cos θ|

So the new parametric equation would be

  x'(t) = a x(t) cos θ - b y(t) sin θ = a cos 2πt cos θ - b sin 2πt sin θ

  y'(t) = a x(t) sin θ + b y(t) sin θ = a cos 2πt sin θ + b sin 2πt cos θ

You can then translate this to have center (x0, y0) by adding these components to the parametric components.

Hope this helps!

If you have the coordinates (Cx,Cy) of the centre, the coordinates (Fx,Fy) of one of the foci, and the eccentricity e then the parametric equation of the ellipse are

 P(t) = C + cos(t)*A + sin(t)*B

where t is an angle going from 0 to 2*pi, A is the semi-major axis (vector) and B the semi-minor axis; A and B can be calculated like this:

c = hypot( Fx-Cx, Fy-Cy) /* distance from centre to focus */
a = c/e                  /* length of semi-major axis */
b = a*sqrt(1-e*e)        /* length of semi-minor axis */
(Ax,Ay) = (a/c)*(Fx-Cx,Fy-Cy)
(Bx,By) = (b/c)*(Fy-Cy, -(Fx-Cx))

Note that these equations will fail if e=0; but in that case the focus and the centre will be the same and you haven't specified the ellipse (circle) fully as the radius is unknown.


Divergence theorem with non smooth functions How do you extend the classical multivariable integration by parts formula for functions with countably many discontinuities?

Is the result still true? Can I use an approximating sequence?

It is true. Here's another way of seeing it. By the divergence theorem,
$$
\int_\Omega div(f\phi)\,\mathrm{d}x=\int_{\partial \Omega}f\phi\cdot \nu\,\mathrm{d}S,
$$
where $\nu$ is the outward unit normal. Since $\phi$ has compact support, the right hand side equals zero. Then component wise, this means
$$
\int_\Omega \partial_i (f\phi)\,\mathrm{d}x=\int_\Omega \partial_i(f)\phi\,\mathrm{d}x+\int_\Omega f\partial_i(\phi)\,\mathrm{d}x=0.
$$


Probabilities involving $2018$ biased coins Consider a group of $2018$ biased coins such that for the $n^{th}$ coin the
probability $P_{heads} = \frac{1}{p_n}$ where $p_n$ is the $n^{th}$ prime number. Thus the first coin will be unbiased while the second coin will give head $\frac{1}{3}$ times and so on.....

First Question

You toss the $2018$ coins one by one (starting with the first coin and ending with the last) and record the number of head you get. Let the total number of heads to get be equal to $H$. Find the probability $P$ such that $H$ is even.

Second Question

Now the first coin (which is unbiased) is removed and another coin is added at the end. So now the $n^{th}$ coin will have $P_{heads} = \frac{1}{p_{n+1}}$.
Solve the first question again for this case.

Third Question

Does it really matter whether there are $2018$ coins? I believe that the answers should not depend on the total number of coins. Am I correct?

This is not homework. A friend asked me this question. I have a feeling that the answer to both questions must be $\frac{1}{2}$ but I am unable to prove it. Can someone help me?

(Expanding on comments)

Q1 Use induction (I got the idea from your Q3 whose answer is affirmative for Q1)

$$P(\sum_{n=1}^{k+1} 1_{H_n} \ \text{is even})$$

$$= P(\sum_{n=1}^{k} 1_{H_n} + 1_{H_{k+1}} \ \text{is even})$$

$$= P(\sum_{n=1}^{k} 1_{H_n} \ \text{is even} \cap 1_{H_{k+1}} = 0) + P(\sum_{n=1}^{k} 1_{H_n} \ \text{is odd} \cap 1_{H_{k+1}} = 1)$$

$$= P(\sum_{n=1}^{k} 1_{H_n} \ \text{is even}) P(1_{H_{k+1}} = 0) + P(\sum_{n=1}^{k} 1_{H_n} \ \text{is odd}) P(1_{H_{k+1}} = 1) \tag{independent?}$$

$$= \frac12 \frac1{p_{k+1}} + \frac12 (1-\frac1{p_{k+1}}) = \frac12 \tag{inductive hypothesis}$$

Now, $H = \sum_{n=1}^{2018} 1_{H_n}$. As it turns out, not only is 2018 irrelevant but also is $p_k$ irrelevant: as long as it is not $0$. It doesn't matter if it's prime, composite or 1.

Q2

(Edit: wait they're not independent.  LOL. I can try again next time I guess. Or someone may edit.)

$$P(\sum_{n=1}^{2019} 1_{H_n} - 1_{H_1} \ \text{is even})$$

$$ = P(\sum_{n=1}^{2019} 1_{H_n} \ \text{is even})P(H_1^C) + P(\sum_{n=1}^{2019} 1_{H_n} \ \text{is odd})P(H_1) \tag{again, independent?}$$

$$ = \frac12 \frac12 + \frac12 (1-\frac12) \tag{by Q1}$$

$$ = \frac12$$

If $p_k$ is the probability to get heads on the $k$th throw and $P_k$ is the probability that the number of heads after $k$ throws is even, we have a recurrence relation
$$P_k = (1 - p_k) P_{k-1} + p_k (1 - P_{k-1}), \quad P_0 = 1.$$
If $p_k$ is the reciprocal of the $(k + 1)$st prime, $P_{2018}$ is a huge fraction approximately equal to $.50435$. The limit $P_\infty$ appears to be $1/2$. For other sequences the limit will be different.


$\frac{dy}{dt} = (1 − y)(y + 3)$ Find equilibrium states of the differential equation below

$\frac{dy}{dt} = (1 − y)(y + 3)$

and describe whether they are stable or not

Ok to find equilibria we have to solve the equation: dN/dt = 0? right?

And then what?

We are asked to find the equilibrium points of

$$\frac{dy}{dt} = (1 − y)(y + 3)$$

To find the equilibrium points, we set $\dfrac{dy}{dt} = 0$ and find the critical points, so we have

$$\frac{dy}{dt} = (1 − y)(y + 3) = 0 \implies y = 1, -3$$

Can you now figure out the stability of those two critical points?

A direction field plot shows:

$~~~~~~~~~~$

We can also draw a phase line as (compare to direction field plot):

This is a tough question, we are looking for solutions of y such that $\frac{dy}{dt} = 0$.

Now $ (1−y)(y+3) = y-y^2 +3-3y = -y^2 -2y +3.$ Note that $y=0$ implies $\frac{dy}{dt} = 3$ but when $y=2$ we have $\frac{dy}{dt} = -5$ and so IVT says there is a solution between y=0 and y=2. Unfortunately I can't narrow it down any more.


Relationship between the coefficients of a polynomial equation and its roots My question is-
Solve: $x^3 - 6x^2 + 3x + 10= 0$  given that the roots are in arithmetic progression.

Any help would be greatly appreciated.

Let the three roots be $a-d$, $a$, and $a+d$.

The sum of the roots is the negative of the coefficient of $x^2$, so $(a-d)+a+(a+d)=6$, and therefore $a=2$.

The product of the roots is the negative of the constant term, and therefore $(a-d)(a)(a+d)=-10$. Since we know $a$, we can now find $d$.  We get $a^2-d^2=-5$, and therefore $d^2=9$.

Remarks: $1.$ In general, if we have a cubic equation $px^3+qx^2+rx+s=0$, where $p\ne 0$, and the roots are $\alpha$, $\beta$, and $\gamma$, then
$$\alpha+\beta+\gamma=-\frac{q}{p}, \qquad \alpha\beta+\beta\gamma+\gamma\alpha=\frac{r}{p},\qquad \alpha\beta\gamma=-\frac{s}{p}.\tag{$1$}$$
There are analogous relations between coefficients and roots for polynomials of any degree.

$2$. Note that we called the roots $a-d, a, a+d$. We could have called them $a$, $a+d$, and $a+2d$, but the algebra would be a little more complicated. Symmetry is your friend.

$3.$ If the fact we used about roots is not available, there are a couple of things we can do. We can hope that the roots are rational. then they must all divide the constant term $10$. the only candidates are $\pm 1$, $\pm 2$, $\pm 5$, and $\pm 10$, and we quickly get to an answer.

Or else we can let the roots be $\alpha$, $\beta$, and $\gamma$, and see that the polynomial must be $(x-\alpha)(x-\beta)(x-\gamma)$. Expanding, we find in essence the relationship $(1)$.

Or else (but this is ugly) we can substitute $a-d$, $a$, and $a+d$ in our polynomial, and expand. Then solve for $a$ and $d$. The equations we get have a fair bit of symmetry, so this is not as difficult as it seems.

First of all the easiest mtd is

$1)~$ Get one of the roots by hit and trial mtd in your question clearly $~-1~$ is one of the roots i.e when $~x =-1~$ the whole equation results $~0~$ therefore
$~X=-1 ,~~~ X+1=0~$

$2)~$ apply division method to reduce it to quadratic and then $~u~$ can easily have your roots that are in A. P


Is the limits technique just an approximation to find derivatives of functions? If $\displaystyle \lim_{x \to \Delta}$ means that as x approach $\Delta$ but never reach it, that is $\Delta - x \neq  0$, so the techniques to find the derivative of a function is just an approximation and not really the derivative since if we get when calculating a derivative of a function: $\displaystyle \lim_{x \to \Delta} x^2 + x \Delta$ then if $\Delta \neq 0$ then it is just an approximation since a little number will remain, where I'm wrong?

I think something that gets ignored when talking about limits is just how much we use the Squeeze Theorem:  This says that if $f(x)\leq g(x)\leq h(x)$ for all $x$ in an open interval around $x=a$ and
$$
\lim_{x\to a}f(x)=\lim_{x\to a}h(x)=L
$$
then $\lim_{x\to a}g(x)=L$.  As in @Keeran's answer, we can let $f(x)=x^2$.  We obtain
\begin{align*}
f'(x) &= \lim_{h\to 0}\frac{(x+h)^2-x^2}{h}\\
     &=  \lim_{h\to 0}\frac{2xh+h^2}{h}\\
     &=  \lim_{h\to 0}(2x+h)
\end{align*}
Before we plug in $h=0$ there is a point to be made.  In that last step we are not saying that, as functions of $h$,
$$
\frac{2xh+h^2}{h}=2x+h.
$$
We are saying that the limits
$$
\lim_{h\to 0}\frac{2xh+h^2}{h}
$$
and
$$
\lim_{h\to 0}(2x+h)
$$
are equal.  This is the Squeeze Theorem at work.

In your question you ask whether we have an approximation.  In answer to that: Up until we let $\Delta=0$, yes, we only have an approximation.  My point here is that the derivative is defined to be the limit above if it exists.  The Squeeze Theorem is what allows us to figure out the limit.

In taking the limit the variable that you set the limit to does reach the given value. If you are thinking of the definition of the derivative as follows (for functions on the real numbers)

$\displaystyle f'(x) = \lim_{h\rightarrow 0} {f(x+h) - f(x) \over h }$

then we do take $h=0$ at  some point. For example consider taking the derivative of the function

$\displaystyle f(x) = x^{2}$

using the above definition. We have

$\displaystyle f'(x) = \lim_{h\rightarrow 0} {f(x+h) - f(x) \over h} \\
\displaystyle \quad\quad\ = \lim_{h\rightarrow 0} {x^{2} + 2hx + h^{2} - x^{2} \over h} \\
\displaystyle \quad\quad\ =\lim_{h\rightarrow 0} 2x + h$

Now set $h=0$ and you have your derivative, i.e. $\displaystyle{\text{d}\over\text{d}x}x^{2} = 2x$


Evaluating $\sum_{n=1}^\infty\frac{1}{4n(2n+1)}$ How to evaluate this sum, derived from "Lockdown math" by 3Blue1Brown?

$$\sum_{n=1}^\infty\frac{1}{4n(2n+1)}$$


By first expanding $(\cos^2x + \sin^2x)^3$, otherwise, show that $ \cos^6x + \sin^6x = 1 - (3/4)\sin^2(2x)$ By first expanding $(\cos^2x + \sin^2x)^3$, otherwise, show that
$$ \cos^6x + \sin^6x = 1 - (3/4)\sin^2(2x)$$
Here's what I've done so far (starting from after expansion):
$\cos^6x + (3\cos^4x\sin^2x) + (3\cos^2x\sin^4x) + \sin^6x$
$\cos^6x + (3\cos^2x\sin^2x)(\cos^2x+\sin^2x) + \sin^6x$
$\cos^6x + (3\cos^2x\sin^2x) + \sin^6x$
$\cos^6x + \sin^6x = -3\cos^2x\sin^2x$
$\cos^6x + \sin^6x = (-3/2)(2\cos^2x\sin^2x)$
$\cos^6x + \sin^6x = (-3/2)(\sin^22x)$
How can I get it into $ 1 - (3/4)\sin^2(2x)$?

You can use $a^3+b^3=a^2-ab+b^2$ and proceed
$$\begin{equation}\begin{aligned}
&\sin^6 x+\cos^6 x\\[3ex]
&=(\sin^2x+\cos^2x)(\sin^4x-\sin^2x\cos^2x+\cos^4x)\\[2ex]
&=\color{green}{\sin^4x}-\sin^2x\cos^2x+\color{green}{\cos^4x}\\[2ex]
&=\color{green}{(\sin^2x+\cos^2x)^2}-3\sin^2x\cos^2x\\[2ex]
&=1-\frac{3}{\color{red}4}(\color{red}4\sin^2x\cos^2x)&\text{($\because 4\sin^2x\cos^2x=\sin^22x$)}\\[2ex]
&=\fbox{$1-\frac{3}{4}(\sin^22x)$}\\
\end{aligned}\end{equation}$$

You start by writing

$\cos^6x + (3\cos^4x\sin^2x) + (3\cos^2x\sin^4x) + \sin^6x$

but that's not a "sentence".  It's just noun without a verb.  What about $\cos^6x + (3\cos^4x\sin^2x) + (3\cos^2x\sin^4x) + \sin^6x$?  what are you saying about it?  Are you claiming it is equal to something? To what?
Then you go from this line

$\cos^6x + (3\cos^2x\sin^2x) + \sin^6x$

which is also a noun without a verb to this line

$\cos^6x + \sin^6x = -3\cos^2x\sin^2x$

Which has a verb ("is equal to") and you moved the chunk "$(3\cos^2x\sin^2 x$" to the other side of the equation.  But  that assumes $\cos^6x + (3\cos^2x\sin^2x) + \sin^6x$ had to have been equal to $0$ all along.  Was $\cos^6x + (3\cos^2x\sin^2x) + \sin^6x= 0$?
I think you assumed that because you had the "noun"  $\cos^6x + (3\cos^2x\sin^2x) + \sin^6x$ just sitting there by itself with nothing else when you moved "$(3\cos^2x\sin^2 x$" to "the other side" there was no other side (because you never made an equation sentence in the first place) you didn't think it matter.
In essence what you did was equivalent to the following:
$ 7$
$10- 3$
$10=3 $
Which .... would be true if we assume that $7=0$.  But wouldn't be true otherwise.
So lets do this with full sentences.
We start with $(\cos^2 x + \sin^2 x)^3$.  Will what about it. It's equal to something but to what?  Well we know $(\cos^2 + \sin^2 x) = 1$ so:

$\cos^2 x + \sin^2 x = 1$

$(\cos^2 x + \sin^2 x)^3 = 1^3$

$\cos^6x + (3\cos^2x\sin^2x)(\cos^2x+\sin^2x) + \sin^6x = 1$

$\cos^6x + (3\cos^2x\sin^2x) + \sin^6x=1$

$\cos^6x + \sin^6x = 1-3\cos^2x\sin^2x$

Now we we can complete this but showing that $3\cos^2\sin^2 x = \frac 34 \sin 2x$.
And here made a second mistake.  You figured that $sin^2 2x = 2\cos^2x\sin^2 x$
In actuality  $\sin 2x = \sin(x+x) = \cos x\sin x + \sin x \cos x =$ \cos x \sin x$.
So $sin^2 2x = (2 \cos x \sin x) = 2^2 \cos^2 x \sin^2 x=4 \cos^2 sin^2 x$.
So....

$\cos^6x + \sin^6x = 1-3\cos^2x\sin^2x$

$\cos^6x + \sin^6x = 1-\frac 34(4\cos^2x\sin^2x)$

$\cos^6x + \sin^6x = 1 - \frac 34 \sin^2 x$.


Approximation of a sum with an integral................... Let $G$ a continuous function in $C([0,1], \mathbb R)$. I think that $$\frac{1}{N}\sum_{x \;\text{odd}\in \{1,\ldots, N\}}G\Big (\frac{x}{N}\Big )\xrightarrow{N\to +\infty}\frac{1}{2}\int_0^1G(r)dr,$$
and I would like to prove that. I think to do a change of variables as follows:
$$\frac{1}{N}\sum_{x \;\text{odd}\in \{1,\ldots, N\}}G\Big (\frac{x}{N}\Big )=\frac{1}{N}\sum_{k=0}^{\frac{N-1}{2}}G\Big(\frac{2k+1}{N}\Big)=\frac{1}{2}\frac{1}{N}\sum_{z=1}^NG\Big(z\Big),$$
where in the last step I defined $z=2k+1$ and I applied a kind of change of variables for the series that usually holds for integrals ($dk=\frac{1}{2}dz$). Is that correct?

It would perhaps be worth recalling that for a sequence of partitions $ \Big  \{ 0=y_0^{(m)}< y_1^{(m)}<....< y_{n^{(m)}}^{(m)} =1  \Big\}_{m=1}^\infty  $  of $[0,1]$ such that $\underset{k\in n^{(m)}}{\min}  \vert y_k^{(m)}-y_{k-1}^{(m)} \vert \overset {m\rightarrow \infty}{\rightarrow}0$, that:

$\underset{k=1}{ \overset{n^{(m)} }{\sum} }  G(\zeta_k^{(m)}) \cdot (y_k^{(m)}-y_{k+1}^{(m)}) \overset{m\rightarrow \infty}{\rightarrow} \int_0^1 G(t) dt $

where $\zeta_k^{(m)}\in [y_k^{(m)}, y_{k+1}^{(m)}]$ for all $k\in \{1,...,n^{(m)} \}$.

The points $x/N$ (add $0,1$ if needed) for odd $x$ form a partition of $[0,1]$ with norm $2/N$ and hence the Riemann sum $$\frac{2}{N}\sum_{x\text{ odd}} G(x/N) $$ tends to $\int_{0}^{1}G(r)\,dr$ as $N\to\infty $ and the proof of the result in question in complete. Note that the result holds for all Riemann integrable functions $G$ and not just for continuous functions.


Building a box from smaller boxes John has 77 boxes each having dimensions 3x3x1. Is it possible for John to build one big box with dimensions 7x9x11?

I'm leaning towards no, but I would like others opinion.

The answer is no; John can't even fill up the topmost $7\times 11\times 1$ slice of the $7\times 11\times 9$ box.  Consider just the top $7\times 11$ face of this box; look just at this face and ignore the rest of the box.  A solution to the problem would fill up this $7\times 11$ rectangle with large $3\times3$ rectangles and small $3\times 1$ rectangles.  But $7\times 11$ is not a multiple of $3$.

The volume of the big box is $V_B = 7\cdot 9 \cdot 11 = 693$, the total volume of the small boxes is $V_b = 77 \cdot 3 \cdot 3 \cdot 1 = 693$.

This means the volume of the small boxes is sufficient and we need to use all small boxes.

Let us try to model this problem Tetris style:

We have a base field, e.g. $7\times 9$, and need to drop all 77 small boxes over it.
For each drop we have two decisions:

where to put the center of the box $c = (c_x, c_y, c_z)$ over the base field $(c_x, c_y) \in I_x \times I_y$ with $I_x = \{ 1, \ldots, 7 \}$ and $I_y = \{ 1, \ldots, 9 \}$
how to orientate the $3\times 3\times 1$ box. There seem only three feasible orientations:

a large $3\times 3$ side as base, like a pizza box ("O")
a small $3 \times 1$ side as base, orientated along the $x$-axis ("-")
a small $3 \times 1$ side as base, orientated along the $y$-axis ("|")

We loose if after the drop some part of the box sticks outside the big volume
We win if we dropped all $77$ boxes without loosing.

This is a search space of $77\times 7 \times 9 \times 3 = 14553$ drop configurations. Not that much for a machine.

We could avoid the drop simulation and instead have $c_z$ as another choice. This would enlarge the search space to $77\times 7 \times 9 \times 11 \times 3 = 160083$ configurations. In both cases we need to check that boxes do not intersect.

This should be sufficient to code a solver which visits all configurations of the search space (brute force) and will answer the question by either listing feasible configurations or reporting that there is no solution.

Note: I submitted this before MJD published a counter argument.


Difference between Metric Space and Topological Space I am reading Chapter 11 of Real Analysis written by Royden and Patrick (4th). It says "The concept of uniform convergence of a sequence of functions is a metric concept. The concept of pointwise convergence is NOT a metric concept." (page 222) I know the definitions for uniform and pointwise convergence of a sequence of functions. However, I could not understand the quote above. Could anyone explain it to me, please? Thank you!

Uniform convergence of a sequence of functions implies convergence of the sequence in the metric space of all functions.So it is a  metric concept.


Compute $\lim_{n\to\infty}{a_n}$ Given $a$ and $b$  such that $a \ge b > 0,$ define the sequence ${a_n}$ by
$$a_1 = a+b  , \ \ \ a_n= a_1  - \frac {ab}{a_{n-1}} , \ \ \ \ \ n \ge 2.$$

Determine the $n^{\rm th}$ term of the sequence and compute $\lim_{n\to\infty}{a_n}$

I take $l = l - \frac {ab}{l}$ after that $ l= l - \frac{ab}{l}$, $l^2 =l^2-ab$, and I get $ab = 0$.

I don't know how I can  find $\lim_{n\to\infty}{a_n}$.

The limit, assuming it exists, will satisfy
$$
L=a+b-\frac{ab}L.
$$
This has roots $a$ and $b$, so this is not enough.

When $a=b$, we get with ease that $a_n=a(1+\frac1n)$, and so the limit is $a$.

So now assume that $a>b$.
With a little playing with the formulas, one can guess that
$$\tag1
a_n=\frac{a^{n+1}-b^{n+1}}{a^n-b^n}.
$$
Indeed, if $a_n$ is as above,
\begin{align}
a_{n+1}&=a+b-\frac{ab}{\frac{a^{n+1}-b^{n+1}}{a^n-b^n}}
=a+b-\frac{ab(a^n-b^n)}{a^{n+1}-b^{n+1}}\\ \ \\
&=\frac{(a+b)(a^{n+1}-b^{n+1})-ba^{n+1}+ab^{n+1}}{a^{n+1}-b^{n+1}}\\ \ \\
&=\frac{a^{n+2}-b^{n+2}}{a^{n+1}-b^{n+1}},\\ \ \\
\end{align}
which implies by induction that $a_n$ is as in $(1)$ for all $n$.
Now, looking at $(1)$, and since $a> b\geq0$,
$$
a_n=a\,\frac{1-\left(\frac ba\right)^{n+1}}{1-\left(\frac ba\right)^{n}}\xrightarrow[n\to\infty]{}a.
$$

Assuming the limit exists, you would have (since $a_1 = a+b$)
$$
l = a_1 - \frac{ab}{l} \implies l^2-(a+b) l +ab =0
$$
so you get that the limit is $l=a$.


Area enclosed by an equipotential curve for an electric dipole on the plane I am currently teaching Physics in an Italian junior high school. Today, while talking about the electric dipole generated by two equal charges in the plane, I was wondering about the following problem:

Assume that two equal charges are placed in $(-1,0)$ and $(1,0)$.
There is an equipotential curve through the origin, whose equation is
given by:
$$\frac{1}{\sqrt{(x-1)^2+y^2}}+\frac{1}{\sqrt{(x+1)^2+y^2}}=2 $$ and
whose shape is very lemniscate-like:

Is there a fast&tricky way to compute the area enclosed by such a curve?

Numerically, it is $\approx 3.09404630427286$.

Consider following parametrization of the first quadrant of the $(x,y)$ plane:

$$[1,\infty) \times [0,1] \ni (u,v)
\quad\mapsto\quad (x,y) \in [0,\infty)^2 \quad\text{s.t.}\quad
\begin{cases}
r_1 &= \sqrt{(x+1)^2+y^2} = u+v\\
r_2 &= \sqrt{(x-1)^2+y^2} = u-v
\end{cases}$$
In this parametrization, the area element is given by
$$dx \wedge dy = -\omega\quad\text{ where }\quad \omega \stackrel{def}{=} \frac{u^2-v^2}{\sqrt{(u^2-1)(1-v^2)}} du \wedge dv$$
Let $D$ be the region in $(u,v)$ plane corresponds to the dipole in first quadrant. Its boundary $\partial D$ consists of 3 pieces

$C_1$ : a curve start at $(1,0)$, end at $(\phi,1)$ where $\phi = \frac{1+\sqrt{5}}{2}$ is the Golden ratio.
$$[1,\phi] \in t \quad\mapsto\quad (u,v) = \left(t,\sqrt{t(t-1)}\right) \in [1,\infty) \times [0,1]$$
$C_2$ : a line segment from $(\phi,1)$ to $(1,1)$.
$C_3$ : a line segment from $(1,1)$ to $(1,0)$.

Notice $\omega = \frac12 d\Omega$ where
$$\Omega \stackrel{def}{=} \frac{u (u^2 - 1) dv - v(1-v^2) du}{\sqrt{(u^2-1)(1-v^2)}}$$
The area $\mathcal{A}$ we seek equals to
$$\mathcal{A} = 4 \int_D \omega = 2\int_{\partial D}\Omega = 2\left(\int_{C_1} + \int_{C_2} + \int_{C_3}\right) \Omega$$

Introduce another parametrization for the region $[1,\infty) \times [0,1]$ in the $(u,v)$ plane:

$$[0,\infty) \times [0,\pi] \ni (\rho,\eta) \quad\mapsto\quad (u,v) = (\cosh\rho,\cos\eta) \in [1,\infty) \times [0,1]$$

One can use this to verify the line segments $C_2$ and $C_3$ contribute nothing to $\mathcal{A}$. As a result,

$$\mathcal{A} = 2\int_{C_1} \Omega
= 2\int_{C_1} \left(u\sqrt{\frac{u^2-1}{1-v^2}} dv - v\sqrt{\frac{1-v^2}{u^2-1}} du\right)$$

Since $v^2 = u(u-1)$ on curve $C_1$, we can transform the $1^{st}$ piece of the integrand as
$$\begin{align}
u\sqrt{\frac{u^2-1}{1-v^2}} dv
&= \sqrt{\frac{u(u+1)}{1-v^2}} vdv
= \sqrt{u(u+1)} d(-\sqrt{1-v^2})\\
&= -d \sqrt{u(u+1)(1-v^2)} + \sqrt{1-v^2}d\sqrt{u(u+1)}\\
&= -d\sqrt{u(u+1)(1-v^2)} + \sqrt{\color{red}{\frac{1-v^2}{u(u+1)}}}\left(\color{red}{u} + \frac12\right) du
\end{align}
$$
Notice the piece in red can be rewritten as
$\displaystyle\;\sqrt{\frac{u(1-v^2)}{u+1}} du = v\sqrt{\frac{1-v^2}{u^2-1}} du\;$
which is nothing but the $2^{nd}$ piece. This leads to

$$\begin{align}
\mathcal{A}
&= -2 \left[\sqrt{u(u+1)(1-v^2)}\right]_{(u,v) = (1,0)}^{(\phi,1)} +  \int_{C_1} \sqrt{\frac{1-v^2}{u(u+1)}} du\\
&= \sqrt{8} + \int_1^\phi \sqrt{\frac{1+u-u^2}{u(u+1)}} du \tag{*1}
\end{align}
$$

As a double check, one can throw following command to wolfram alpha,

Sqrt[8]+Integrate[Sqrt[(1+u-u^2)/(u*(u+1))],{u,1,GoldenRatio}]

to evaluate in $(*1)$ numerically. WA returns
$$\mathcal{A} \approx
3.0940463058814386237217800770286020796565427678...$$
a number matching what has been stated on question.

This is as far as I can get. I hope someone can further simplify the integral in $(*1)$. Please note that WA do know how to compute the anti-derivative for the integral at $(*1)$. It is a page long expression in terms of elliptic integrals
and I won't reproduce it here.

HINT:

Almost sure area can be evaluated between limits $(u_1,u_2),(v_1,v_2)$ for holomorphic functions of complex variables in conformal maps.

The equipotentials and lines of force form an orthogonal net  of curvilinear rectangle curves (resemble Cassinian Ovals, but different.. one out of which is shown above), and force lines which are all concurrent hyperbolas passing through the pole of same polarity / charge and asymptotic to y-axis. For these $(u,v)$ parameter plots that satisfy Laplace equation all we need before evaluating integral of  area is to identify limits of u and v for any oval chosen. (shall upload equation , if it is found in sites e.g. 2d curves.com)

EDIT1:

The closest that I can get to the function is sketched by Mark McClure in another context for  $ f(z)= z^2 (z-1)^3 $:

Orth Traj to Hyperbolae

I think we should choose another complex variable part so that our hyperbolae pass through $ (\pm 1,0)$ instead of $ ( 0,0),(1,0)$ as given above. We are interested in a particular orthogonal trajectory doubly intersecting at origin. Calculation of area may be easier.


Probability brainteaser Normal 52 card deck. Cards are dealt one-by-one. You get to say when to stop. After you say stop you win a dollar if the next card is red, lose a dollar if the next is black. Assuming you use the optimal stopping strategy, how much would you be willing to pay to play? Proof?

If there are $r$ red cards on a total of $n$ cards let $p(r,n)$ be the probability to win with the optimal strategy.
If you stop immediately you win with probability $r/n$.
If you don't stop you can get a red card with probability $r/n$ and then you win with probability $p(r-1,n-1)$. If instead you get a black card you win with probability $p(r,n-1)$. Hence with the best strategy you win with probability
$$
p(r,n) = \max\left\{\frac r n, \frac r n p(r-1,n-1) + \frac{n-r} n p(r,n-1)\right\}.
$$
Let's prove by induction that $p(r,n)=r/n$. Suppose it is true for $n-1$ that $p(r,n-1)=r/(n-1)$ then
$$
p(r,n) = \max\left\{\frac r n, \frac r n \frac{r-1}{n-1}+\frac{n-r}n\frac{r}{n-1} \right\}
= \max\left\{\frac r n, \frac{nr-r}{n(n-1)}\right\}
= \frac r n.
$$
In the case $n=1$ you immediately find that $p(0,1)=0$ and $p(1,1)=1$.

So at anytime you stop you always get the same probability to win. If you start with the same number of red and black cards, you win with probability $1/2$ hence you should pay nothing to play.

You should pay 0.5 because you can decide just before the last card is dealt. The probability that the last card is red is 1/2 and you will win 1; otherwise you don't say stop. Thus, the expectation of this game should be 0.5


Not understanding the wrong logic in this proof The problem is :

Suppose $a,b \in Z$. If $a^2 + b^2 $ is a perfect square, then $a$ and $b$ are not both odd.

My question is why can't I answer like so:

Proof by Contradiction -- Suppose $a^2 + b^2 $ is a perfect square, and $a$ and $b$ are both odd. Let $a = 5$ and $b = 7$. Then $5^2 + 7^2$ is a perfect square. $5^2 + 7^2 = 74$, so 74 is a perfect square. However, we know that 74 is not a perfect square. Therefore there is a contradiction. So if $a^2 + b^2 $ is a perfect square, then $a$ and $b$ are not both odd.

The reason why this proof is invalid is that the quantifier is not included.

The preposition should be:

$\forall a,b \in Z, $ if $a^2 + b^2$ is a prefect square, then $a$ and $b$ are not both odd.

The counter-positive of this notion is:

$\forall a,b \in Z, $  if $a$ and $b$ are both odd then $a^2 + b^2$ is not a prefect square.

So one should not pick up specific example to show the counter-positive holds.

EDIT: to clarify logical reason, consider the following example:

The background is that $R$ is an algebraic structure.

The preposition is: $\forall a,b \in R$, if $a\times b$ is $0$, then $a = 0$ or $b =0 $.

What's the counter-positive of this statement?

It should not be: $\exists a,b \in R$, if $a \neq 0$ and $b \neq 0 $,$a\times b$ is not $0$.

Because if $R = \mathbb Z/6\mathbb Z$, then $a = 2$ and $b =2 $, then   $a\times b = 4$ is not $0$. But in $R$ there indeed pair$(2,3)$ such that  $2\times 3 = 0$ but $2$ is not zero and $3$ is not zero. Therefore it should not be an counter-positive for the preposition.

One thing  which should be borne into my mind is that when one counter the preposition, the quantifier should not change otherwise one may be trapped into logical loophole.

hint: consider $\mod 4$ . A square can only be $0,1 \mod 4$. Note that this is a proof that for the sum of two squares to be a square again, both can't be odd. For your proof, you are incomplete hence wrong because your argument is true only for the case $a = 5, b = 7$ but you don't cover all cases for $a,b$.


conditional expectation and independence. Let $X_1, X_2,Y_1, Y_2$ be random variables and $F$ be subsigma field.
Suppose that $X_i$ is measurable on $F$, $Y_1$ and $Y_2$ are independent given $F$. Then is this ture? $E(f(X_1,Y_1)g(X_2,Y_2)|F)=E(f(X_1,Y_1)|F)E(g(X_2,Y_2)|F)$

This is false even in the simplest set up when $\mathcal{F}$ is the entire trivial $\sigma$-algebra of the probability space. In this case, conditional expectation is just normal expectation. Let $Y_1$ and $Y_2$ be two independent coin flip ($\pm 1$ with probability $1/2$) and set $X_1 = Y_2$, $X_2 = Y_1$, $f(x,y) = g(x,y) = x+y$. Then LHS $= 2$ but RHS $= 0$.


Can $3p^4-3p^2+1$ be square number? I know $4p^4+1$ can't be square number, cause $4p^4<4p^4+1<4p^4+4p^2+1$ for all natural number p.
But I don't know the way to prove $3p^4-3p^2+1$ can(not) be square number. Is there a well known way to prove it?

Partial solution if $p$ is prime.

Write $$3p^4-3p^2+1=n^2\implies 3p^2(p^2-1) = (n-1)(n+1)$$

If $p\ne 2$ (which is not a solution) then $p^2\mid n-1$ or $p^2\mid n+1 $

First case: If $p^2\mid n-1$ then $n+1\mid 3p^2-3$ so $ n-1= p^2k$ and $n+1\leq 3p^2-3$.

If $k\geq 3$ then $$3p^2-3\geq n+1 >n-1 \geq 3p^2$$ which is impossible. So $k\leq 2$

$\bullet$ If $k=2$ then $n= 2p^2+1$ so $$2p^2+2\mid 3p^2-3 \implies 2p^2+2\mid 2(3p^2-3)-3(2p^2+2) = -12$$

So $p^2+1\mid 6 \implies p^2+1\in \{1,2,3,6\}$ which is impssible.

$\bullet$ If $k=1$ then $n= p^2+1$ so $$p^2+2\mid 3p^2-3 \implies p^2+2\mid (3p^2-3)-3(p^2+2) =-9 $$

So $p^2+2\mid 9 \implies p^2+2\in \{1,3,9\}$ which is impossible again.

Second case: If $p^2\mid n+1$ then $n-1\mid 3p^2-3$ so $ n+1= p^2k$ and $n-1\leq 3p^2-3$.

Again, if $k\geq 3$ then $$3p^2-3\geq n-1 = n+1-2\geq  3p^2-2$$ which is impossible. So $k\leq 2$

$\bullet$ If $k=2$ then $n= 2p^2-1$ so $2p^2-2\mid 3p^2-3$ which is impossible.

$\bullet$ If $k=1$ then $n= p^2-1$ so $$p^2-2\mid 3p^2-3 \implies p^2-2\mid (3p^2-3)-3(p^2-2) =3 $$

So $p^2-2\mid 3 \implies p^2-2\in \{-1,1,3\}$ which is impossible again.

So the answer is negative if $p$ is prime.

Hint about method:

$3m^2 - 3m + 1 = n^2$ for any n $\in$ Natural, for $p^2 = m$.

$$3m^2 - 3m + 1 - n^2 = 0$$
$$\implies m = \frac {3 +\sqrt{12n^2-3}}6$$
$$\implies p^2 = \frac {3 +\sqrt{12n^2-3}}6$$ or
$$\implies p^2 = \frac {3 -\sqrt{12n^2-3}}6$$

Now you can just make logical comments yourself about this is valid for above given constraints or not, and make out a bit about the equation.


For which angles we know the $\sin$ value algebraically (exact)? For example:

$\sin(15^\circ) = \frac{\sqrt{6}}{4} - \frac{\sqrt{2}}{4}$
$\sin(18^\circ) = \frac{\sqrt{5}}{4} - \frac{1}{4}$
$\sin(30^\circ) = \frac{1}{2}$
$\sin(45^\circ) = \frac{1}{\sqrt{2}}$
$\sin(67 \frac{1}{2}^\circ) = \sqrt{ \frac{\sqrt{2}}{4} + \frac{1}{2} }$
$\sin(72^\circ) = \sqrt{ \frac{\sqrt{5}}{8} + \frac{5}{8} }$
$\sin(75^\circ) = \frac{\sqrt{6}}{4} + \frac{\sqrt{2}}{4}$
?

Is there is a list of known exact values of $\boldsymbol \sin$ somewhere?

Found a related post here.

$\sin 3^\circ=\frac{(\sqrt{3}+1) (\sqrt{5}-1)}{8 \sqrt{2}}-\frac{(\sqrt{3}-1) \sqrt{5+\sqrt{5}}}{8}$.

Solving a cubic equation you can get a huge expression for $\sin 1^\circ$ in radicals, and therefore, for any $\sin n^\circ$.

Algebraically exact value of Sine for all integer angles is possible. Please visit https://archive.org/details/ExactTrigonometryTableForAllAnglesFinal for the list of exact values for Sine of integer angles in degrees.


How do you read this logical statement aloud, and how do you notate it in symbols? Harry Potter and the Methods of Rationality is a wonderful work of fan fiction by AI researcher and decision theorist Eliezer Yudkowsky. In Chapter 39, this exchange takes place between Dumbledore and Harry:

"…I don't want everyone to die, Harry!"
"You just don't want anyone to be immortal," Harry said with considerable irony. It seemed that elementary logical tautologies like All x: Die(x) = Not Exist x: Not Die(x) were beyond the reasoning abilities of the world's most powerful wizard.

(Harry is a bit more intelligent in this work, in case you failed to notice.)
My question pertains to that tautology. He seems to have converted individual logic notation symbols or groups of symbols to single English words. I can't read logical notation in the first place, so even if I could find examples of similar notation I probably wouldn't be able to parse them without several hours of study. And it may be that you can't notate this particular statement without getting creative with the syntax in ways only a proper math/logic expert could do intelligently.
So I ask you wonderful people to take it in both directions for me: How would you notate that statement properly? And then how would you read it aloud in spoken English?

Let $\text{Die}(x)$ denote "Dumbledore wants $x$ to die." Then Harry claims that

  $(\forall x) \text{Die}(x) \Leftrightarrow (\neg \exists x) \neg \text{Die}(x)$

which follows from standard properties of how quantifiers and negation behave in logic. $\forall$ is "for all" (the universal quantifier), $\neg$ is "not" (negation), and $\exists$ is "exists" (the existential quantifier). The above should be read (depending on how closely you like to adhere to notation)

  "For all $x$, Dumbledore wants $x$ to die" is equivalent to "There does not exist $x$ such that Dumbledore does not want $x$ to die."

or, as the text says,

  "Dumbledore wants everyone to die" is equivalent to "Dumbledore does not want anyone to be immortal."

Of course what is really going on here is a framing effect: it is a well-documented psychological phenomenon that people can have very different reactions to two logically equivalent rephrasings of the same situation.

It would seem that the author made an error. Like Qiaochu says,

  "Dumbledore wants everyone to die" is equivalent to "Dumbledore does not want anyone to be immortal."

But Dumbledore says, "I don't want everyone to die, Harry!"

Therefore,

  "Dumbledore doesn't want everyone to die" is equivalent to "Dumbledore wants at least one person to be be immortal."

Therefore, in the quotation,

  "You just don't want anyone to be immortal," Harry said with considerable irony.

Harry is making a mistake; actually, the author is making a mistake.