Associative property with a two element set Suppose we have the set A{a,b}.

Can this set have the associative property?

All the definitions talk about 3 element sets, and not about a two element set.

A={a,b}. Suppose that *is a binary operation, can a set have that property with only two elements belong to it?
Thank you.

The definition of associativity, being a sentence in first order logic, has three variables, but has no requirements on the size of the set it operates on. In fact, the empty function $\emptyset\to\emptyset$ is trivially associative (and commutative and many other things). A binary operation on a singleton set will be, of necessity, associative, commutative, unital, etc. These cases are trivial, and we would hardly need to even conceptualize these properties if they were all we deal with. But since we do deal with bigger domains,  we do need three variables to express the full associative property over larger sets.

As per wikipedia (read closely):

"In mathematics, the associative property is a property of some binary OPERATIONS (multiple)..."

"Within an expression containing two or more occurrences in a row of the same associative operator, the order in which the operations are performed does not matter as long as the sequence of the operands is not changed. That is, rearranging the parentheses in such an expression will not change its value. Consider the following equations..."

"Associativity is not the same as commutativity, which addresses whether or not the order of two operands changes the result. For example, the order doesn't matter in the multiplication of real numbers, that is, a × b = b × a, so we say that the multiplication of real numbers is a commutative operation."

So the answer is no, that would be commutativity for two operators.

The very reason for the property is that you are testing if those three (or more) elements would have two (or more) binary operators where you could alter which operation comes first and still get the same result.

This also extends that you can not perform this test for property on a one element set because there is no such thing as a binary operator for a single element.  A unary operator operates on a one element set.  This is not a property of the operator itself but on the set because it tests against more than one operator (remember it takes two operators to make this test for this property.)


Integral form of $\Gamma (x)$ While trying to represent the poles and analytic continuation of $\Gamma (x)$ , the author uses the following equality:

$$\int\nolimits_{0}^{1}t^{x-1}e^{-t}dt=\sum_{n=0}^{+\infty}\frac{{(-1)}^{n}}{(n+x)n!}.$$
Any help in figuring out how?

In order to expand my comment: put for $0\leq t\leq 1$: $\displaystyle S_n(t)=\sum_{k=0}^n\frac{(-t)^k}{k!}$. We have
$$\sup_{0\leq t\leq 1}|\exp(-t)-S_n(t)| = \sup_{0\leq t\leq 1}\sum_{k=n+1}^{+\infty}\frac{(-t)^k}{k!}\leq \sum_{k=n+1}^{+\infty}\frac 1{k!},$$
and since the series $\displaystyle\sum_{k=0}^{+\infty}\frac 1{k!}$ is convergent, the sequence $\{S_n\}$ converges uniformly to $t\mapsto \exp (-t)$ on $\left[0,1\right]$. Therefore, we can switch the series and the integral for $x\geq 1$:

$\begin{align*}
\int_0^1t^{x-1}e^{-t}dt&=\int_0^1t^{x-1}\left(\sum_{k=0}^{+\infty}\frac{(-1)^kt^k}{k!}\right)dt\\
&=\sum_{k=0}^{+\infty}\frac{(-1)^k}{k!}\int_0^1 t^{x+k-1}dt\\
&=\sum_{k=0}^{+\infty}\frac{(-1)^k}{k!(x+k)}.
\end{align*}$

For $0<x<1$, we can use the dominated convergence theorem since $|t^{x-1}S_n(t)|\leq e\cdot t^{x-1}$ which is integrable on $\left[0,1\right]$ (we can use a more simple argument in the case $x\geq 1$).

If it does help you please look at this link.


Find the limit of $\prod_{k = 4}^{\infty}\cos\left(\pi \over k\right)$ Find the limit of
$$\prod_{k = 4}^{\infty}\cos\left(\pi \over k\right)$$

The limit does exist, but I can not get it.

Thanks Willie-Wong &  Lee Mosher for correcting the expression.

This is somewhat in between a comment and an answer.

To my surprise, the corresponding sum starting at $k = 3$ actually has a name. It is known as the Kepler-Bouwkamp constant or polygon-inscribing constant (OEIS A085365).

Start from a circle of radius $1$. Inscribe a triangle in it and take the in-cirlce.
Inscribe a square in the new circle and then take the in-circle. Repeat this procedure
for every regular $n$-gon, the limiting radius is this Kepler-Bouwkamp constant $K'$.

$$K' \approx 0.11494204485329620070104015765681268475360043148473...$$

The product we have is simply twice of this constant:

$$\prod_{k=4}^\infty \cos\frac{\pi}{k} = 2 K'$$

Aside form this, I can't find any useful information about this sum. The references in the wiki and OEIS link above may have more information for the Kepler-Bouwkamp constant, you should take a look at them.

Let  $x_n = \prod_{k=4}^{n} \cos(\frac{\pi}{k})$ where $k$ is natural number and $n>3$.

Since $x_n$ is positive for all $n$ and decreasing since $\cos(\frac{\pi}{k})$ is less than $1$, then $x_n$ converges to $\inf \{x_n | n=4,5,...\}$, by monotone convergence theorem.

Now, show that $x_n \rightarrow 0$:

Consider $$x_{n+1} = x_n \cdot \cos(\frac{\pi}{n+1});$$

Since $x_n \rightarrow a$ for some $0 \le a \le \cos(\frac{\pi}{4})$, then $x_{n+1} \rightarrow a $ too, and $\cos(\frac{\pi}{n+1}) \rightarrow 0$.

Therefore $a = \lim \ x_{n+1} = \lim \ x_n  \cdot \lim \ \cos(\frac{\pi}{n+1})  = 0 $.


What does the false infinite sum of a series mean? For any geometric series with |$r$| < 1 , I know that

$$\sum_{k=1}^{∞} ar^{k-1} =\frac{a}{1-r}$$

But if |$r$| > 1 and you try to use the formula, you'll get a weird answer. For instance:

$$4+8+16+32+64+128+... =\sum_{k=1}^{∞} (4)2^{k-1}= \frac{4}{1-2} = -4$$

That answer obviously doesn't make sense; the series diverges. So what does -4 mean? Where did it come from, and how is it related to the series? It must be significant somehow.

For a truncated series, we have

$$\sum_{k=1}^Kar^{k-1}=a\frac{1-r^K}{1-r} \tag 1$$

For $a=4$ and $r=2$, use of $(1)$ reveals

$$\sum_{k=1}^K4\left(2\right)^{k-1}=4\frac{1-2^K}{1-2}=2^{K+2}-4$$

The $-4$ appears as the "convergent component" of the divergent series (as $K\to \infty$).

This is a way
of assigning meaning
to an otherwise divergent sum.

Look up "divergent series."

The subject is large.


If $(P \implies Q),$ then $\lnot(P\land\lnot Q)$ In this correct:

If $(P \implies Q)$ is true, then $\lnot(P\land\lnot Q)$ is true.

I came up with this in my search to understand implication and the two troublesome, for me, lines in the truth table.  I am only able to write this sentence, I do not have the knowledge to prove it - yet. I can show that the truth table columns for two statements are the same.

This is either my first glimmer of light or my first false step.

I wrote "¬(P∧¬Q) is true" to describe both the line in the truth table where P is true and Q is false and further explore the implication connective.  I thought that "if (P⟹Q) is true, then ¬(P∧¬Q) is true" would either have the same truth table as each of it's component statements or it would not.  De Morgan's theorem is something that I have read and may have understood.  It is not something that I can use yet.  I know there are some who can just look at it and tell something, but I do not know yet what that something is.  I assume that there may come a time when I will be able to do so.  If that time arrives, it will be because of the patient effort those who wrote the answers below.

There are two ways to approach this question.

The first one it to start with natural language and with the ordinary expression " if...then" and, from this starting point, to ask ourselves: what do we mean when we utter " if A, then B". For example what do I mean if I do the promise : " If you travel to Mars before the end of this month, I'll buy a car for you.".

I think you will agree that, the only way for my promise to turn into a false one is the case where (1) the person actually manages to travel to Mars before the end of the month, and (2) I do not buy a car for her. In all other cases ( the 3 remaining ones on the truth table) , I will not have said something false, my promise-statement will be a true one.

In the second approach, one forgets natural language, starts with the truth table of the " $\rightarrow$ " operator ( without even trying to "read" the symbol in natural language) and considers  this truth table as its definition. By inspecting the truth table, you will see that the proposition $(P{\rightarrow}Q)$ is true on line $1$, $2$, and $4$. That is to say, $(P{\rightarrow}Q)$  is true just in case we are not on line $2$, where $P$ is true and $Q$ is false. Translating " just in case" as a biconditional or as an equivalence, we therefore have

  $(P{\rightarrow}Q)$  if and only if  $NOT(P\wedge NOT-Q)$

( Read : P implies Q is true iff it is not the case that ( P is true and Q is false).

*As you see,  in the second approach, there is no real point in asking "why" this is true. This is simply the definition of the " $\rightarrow$" operator.*
The "construction" of propositional calculus could be explained by the following story:  (1) we have a truth table ( which is one amongst the 16 posssible truth tables for a binary connective). (2) We therefore know that there is such a binary connective with this truth table. (3) Then, we decide to assign to it the symbol " $\rightarrow$ ". (4) And after that, due to the fact we notice that this operator will be useful to define logical implication, we decide to read it as " material implication" or " if...then".

Note : on the distinction between material implication and logical implication, you may have a look at Seymour Lipschutz, Outline Of Set Theory, Chapter on The Algebra Of Propositions ( at archive.org).

Notice that
$$P\Longrightarrow Q$$
is the same as
$$\neg P\vee Q$$
which is the same as
$$\neg(P\wedge \neg Q)$$
by de Morgan's law, which is the expression you are asking about.


Increasing sequence of divisors of a quadratic trinomial This question is from a Russian contest, the 2011 Tuymaada Olympiad. It's the fourth question on day two for the problems at grade level 2.

Let $P(n)$ be a quadratic trinomial with integer coefficients. For each positive integer $n$, the number $P(n)$ has a proper divisor $d_{n}$, i.e., $1 < d_{n} < P(n)$, such that the sequence $d_{1},d_{2},d_{3},\ldots$ is increasing. Prove that either

$P(n)$ is the product of two linear polynomials with integer coefficients, or
all the values of $P(n)$, for positive integers $n$, are divisible by the same integer $m > 1$.

Part (2) of the last sentence says that if $P(n)=an^2+bn+c$, where $a,b,c$ are integers such that $b^2-4ac$ is not a perfect square, then the sequence $d_{1},d_{2}, \ldots$ is increasing only if there is a positive integer $m>1$ which divides all $P(n)$.
I tried to analyze two different cases: one when $b^2-4ac$ is negative
and one when $b^2-4ac$ is positive and not a perfect square,
but I couldn't go anywhere.
Any suggestion would be appreciated.

This is a hint really but long for a comment I wanted. Conditions {(i) or (ii)} are deny by {not (i) and not (ii)} i.e. $p(n)=an^2+bn+c$  is irreducible and for all m > 1 there is $n_m$ such that  p($n_m$) and m are coprimes.

NOTE.- When p is irreducible quadratic  (or of a greater degree) and it is not constantly multiple of a number (such as $x^2$ + x + 2 which is always even) it was conjectured by Bouniakowsky that p(n) is infinitely many times a prime (this is so far not proven and partial advances have been made by Sierpinski, Garrison, Forman  and probably  other people). The fact here is that just “not (i)” by itself (without “not (ii)”) in general produce some prime with which the condition 1 < $d_n$ < p(n) would be deny. The irreducible binomial $x^{12}$ +488669 is a known example  which is composite for 0 < x < 616980 giving a first prime at x = 616980 but for irreducible quadratic  often it is not hard to produce a prime.

It seems to be plausible try to find an answer without the NOTE but always denying the condition (i) and (ii) so get a proof by Reductio Ad Absurdum.


Is it mathematically correct to write $a \bmod n \equiv b$? This is not a technical question, but a question on whether we can use a particular notation while doing modular arithmetic.

We write $a \equiv b \bmod n$, but is it right to write $a \bmod n \equiv b$?

We have two different, but related, notions:

The equivalence relation "congruent modulo $n$".

Let $n$ be a fixed integer. If $a$ and $b$ are integers, we say that "$a$ and $b$ are congruent modulo $n$" if and only if $n|b-a$. We write it this way:
$$a\equiv b\pmod{n}.$$
The symbol $\equiv$ is read "is congruent to" (as opposed to the symbol $=$ which is read "is equal to").
The binary operator $\bmod$.

Let $n$ be a positive integer. If $a$ is an integer, then $a\bmod n$ is the remainder (from a distinguished set, see below) of dividing $a$ by $n$. This is read "$a$ modulo $n$".

In mathematics, $a\bmod n$ is usually defined to be the unique integer $r$ such that $a=nq + r$ for some integer $q$ and $0\leq r \lt n$. In other areas, such as computer science (and sometimes in mathematics), one often requires that $a\bmod n$ be the unique integer $r$ such that $-\frac{n}{2}\lt r\lt \frac{n}{2}+1$ and $a-r$ is a multiple of $n$.

More generally, one may specify a "distinguished set of remainders modulo $n$", a set $R_n=\{a_0,\ldots,a_{n-1}\}$ such that every integer $x$ is congruent modulo $n$ to one and only one element of $R_n$, and define $\bmod$ as the operator such that $x\bmod n$ is the unique element of $a\in R_n$ such that $x\equiv a\pmod{n}$.

The operator $\bmod$ is like any other infix notation operator such as $+$; we write $2+3 = 5$, because the result of doing the operation $+$ to $2$ and $3$ is $5$. We write "$a\bmod n = b$" to signify that $b$ is the result of performing the operation "modulo $n$" to $a$.

The two notions are related in that if $a\bmod n = b$, then $a\equiv b\pmod{n}$. The converse does not hold in general, since we have, for example, $5\equiv 9\pmod{4}$, but $5\bmod 4 = 1\neq 9$.

Writing "$a\bmod n \equiv b$" confuses the two notions and is syntactically incorrect.  You should use $=$, not $\equiv$. With $=$, it would be "mathematically correct" if and only if $b$ is the result of computing $a\bmod n$ (so $5\bmod 4 = 5$ would be wrong, but $5\bmod 4=1$ would be correct).

Writing $a\equiv b\bmod n$ also invites confusion of the two notions.

(Note, however, that "$a\bmod n \equiv b \pmod{n}$" would be syntactically correct, and would be mathematically correct if $a\equiv b\pmod{n}$.)

It is often correct.  $\TeX$ distinguishes the two usages: the \pmod control sequence is for "parenthesized" $\pmod n$ used to contextualize an equivalence, as in your first example, and the \bmod control sequence is for "binary operator" $\bmod$ when used like a binary operator (in your second example).

But in the latter case, you should use $=$, not $\equiv$.  $7\bmod4 = 3$, and the relation here is a numeric equality, indicated by $=$, not a modular equivalence, which would be indicated by $\equiv$.


Determine whether the list is linearly independent. $S=\{(1+i,1-i,1),(i,0,1),(-2,-1+i,0)\}$

I am having trouble solving the coefficient matrix, where column 1 is vector 1, column 2 is vector 2, and column 3 is vector 3 and set that equal to 0.

If you can, provide a step by step.

You can check for linear independence (over either of $\Bbb R$ or $\Bbb C$) by performing row operations on the matrix whose rows are these vectors.

If you are testing for independence over $\Bbb R$, you can only multiply rows with real scalars, and if you are testing over $\Bbb C$ you can then use complex scalars. If you get to row-echelon form and there are no zero rows, then they are independent: otherwise, they're dependent.

Strategically you should test for $\Bbb C$ linear dependence first because if you find they are $\Bbb C$ independent, then they have to be $\Bbb R$ independent as well. (See why?) But anyhow, you've said in a comment you wanted to check for $\Bbb C$ dependence anyway, so we'll definitely focus on that.

Here is a start checking the matrix over $\Bbb C$:

$$\begin{bmatrix}1+i&1-i&1\\
i&0&1\\
-2&-1+i&0\end{bmatrix}\rightarrow
\begin{bmatrix}
1&1-i&0\\
i&0&1\\
-2&-1+i&0\end{bmatrix}\rightarrow
\begin{bmatrix}
1&1-i&0\\
i&0&1\\
0&1-i&0\end{bmatrix}\rightarrow
\begin{bmatrix}
0&1-i&i\\
i&0&1\\
0&1-i&0\end{bmatrix}$$

The first operation was to replace $R_1$ with $R_1+R_2$, then the second operation was to replace $R_3$ with $2R_1+R_3$, and in the third $R_1$ got replaced with $R_1+iR_2$. In just a few more steps, you should have your answer.

I will hand it off to you at this point! Let me know in comments if you get stuck.


What's the negation of "One of the sentence is false"? I think is "Any of the sentence is wrong" but I'm not sure, maybe "Any of the sentences is right"?

If we interpret the word "one" as meaning "exactly one" then negating "one of the sentences is false" means that we should not have exactly one of the sentences false thus we should have the sentence

$$\text{All sentences are true or more than one sentence is false}$$

We could of course interpret "one" as meaning "at least one" (something which may be argued to be the most common mathematical interpretation) in which case we would translate the sentence to
$$\text{All sentences are true }$$
Which is what you answered (formulated a bit differently).

To negate a sentence, we negate the primary operator. For example, to negate "$\exists x. f(x)=4$", we negate both the quantifier and the "=" operator but leave $f$ alone:

  Original: $\exists x. f(x)=4$
  Negated: $\forall x. f(x)\ne4$

The quantifier in your example is "one of", that is, a 'there exists' quantifier. The primary operator in the sentence is "is". To negate the sentence, negate the quantifier to get 'for all' and the operator to get "is not" (or "are not"):

  Original: One of the sentences is false.
  Negated: All of the sentences are not false.


Some four clubs have exactly $1$ student in common There are $100$ students in a school, and they form $450$ clubs. Any two clubs have at least $3$ students in common, and any five clubs have no more than $1$ student in common. Must it be that some four clubs have exactly $1$ student in common?

I am not completely sure my argument is correct, but I would say that it is not possible to have at least 3 students in common with all other groups, and at most one between 5 groups.

If we look at the size $s$ of a club, there are ${s\choose 3}$ combinations of 3 members. Any other club must contain at least one of those $s\choose 3$ combinations. Thus, the average number of times such a combination occurs among other clubs, is $449/{s\choose 3}$. If this number is strictly greater than 3, there must be at least one of those combinations that occurs among 4 other clubs. This contradicts the second assumption of no five clubs sharing more than one member. Therefore, $s$ satisfies $449/{s\choose 3}>3$. This gives that $s\geq 11$.

This means that the average number of clubs that a person participates in is at least $11\cdot 450/100=49,5$. Therefore, there is at least one person $p$ participating in at least 50 clubs. Consider these 50 clubs. By the second assumption, no five of these clubs share any other member than $p$. However, the total number of other members of these clubs is at least $10\cdot 50=500$, and there are 99 other persons. Therefore, at least one of these 99 other persons must occur in 5 of those clubs. This gives a contradiction.

The problem can be made easier to solve if we observe that if a set of clubs has X students in common then all subsets containing at least two clubs will have at least X students in common. For example, if we have five clubs : A, B, C, D, and E, and three students in all five of these clubs then clubs A, C, and E will have at least three students in common. Clubs B and E will have at least three students in common.

It may not be clear from the problem statement that the O.P. doesn't mean that every two club combination must have at three students in common. There are ${450*449\over 2} = 101025$ two club combinations in 450 clubs which way outside the 100 student parameter we are limited to. Looking at higher club combinations just makes things worse. There are ${450*449*448\over 6} = 15086400$ three club combinations

What I think the O.P. meant to say was that each of the 450 clubs must have three students in common with at least one other club and if any club has students in common with four or more clubs then it cannot have more than one student in common. Given these requirements must there be a club where it has exactly one student in common with three other clubs.

To provide a counter example I must show that all four club combinations have 0 students in common or it must have two or more students in common while satisfying the other conditions.

Let's assume that every three club combination doesn't have any students in common, so to solve this we divide the 450 clubs into 225 sets of 2 clubs. To satisfy the first requirement, that each club must have three students in common with at least one other club, we put three students in each set where all students are apart of both clubs in their respective set this would mean that a minimum of 675 students are required.

Now let's assume instead that every four club combination doesn't have any students in common. To solve this we divide the 450 clubs into 150 sets of 3 clubs. This would require 450 students by applying the same process the above paragraph and using the first observation above.

From this we can deduce that the more clubs students participate in the less students are required to satisfy the requirements.

So if one student is in all 450 clubs. Then every five club combination has one student in common. To provide a counter example, adding at least one student in common to each four club combination without adding students in common to any five club combination, requires ${450*449*448*447\over 24}=1685905200$ additional students.

Let's look at a slightly altered version of the problem where we have 20 clubs instead of 450 and instead of having 100 students we just want to find the minimum number of students to provide a counter example. Keeping all other requirements the same. Dividing the 20 clubs into four sets of five clubs, where each set has one student in five clubs, then adding two students to each four club combination in each set. This requires (2 students)(5 four club combinations in each set)(4 sets)+(4 original students) = 44 students. Trying a second case where dividing the 20 clubs into five sets of four clubs so each set has three students in all clubs so that only 15 students are required to satisfy the requirements with no four club combination having exactly one student in common.

Thus having a student in more than four clubs causes more problems than it solves. By dividing the 450 clubs into 112 sets of four clubs and one set of two clubs, we have three students in each set where they are in all clubs in their respective set so we need a minimum of 339 students to show a counter example. Thus there must be at least one four club combination with exactly one student in common, because the more clubs students are in the less students are required to provide a counter example, unless the student is in five or more clubs in which case the number of students increases greatly.


Differentiation with respect to matrix I have matrices $W$ and $X$ of dimensions $h\times d$ and $d\times1$ respectively. I want to calculate the partial derivative of $WX$ with respect to $W$. Will that be $X$?

Let's write your function using index notation
$$y_i = W_{ij} x_j$$
Before we begin, we need the gradient of a matrix with respect to itself
$$\frac{\partial W_{ij}}{\partial W_{km}} = \delta_{ik}\,\delta_{jm}$$

Now we can find the differential and then the gradient of your function
$$\eqalign{
dy_i &= dW_{ij} x_j \cr
\frac{\partial y_i}{\partial W_{km}}
  &= \delta_{ik}\,\delta_{jm}\,x_j = \delta_{ik}\,x_m \cr
}$$
Note that the result is a 3rd order tensor.

The definition of "partial derivative of [...] with respect to a matrix" is unclear to me. What is clearly defined is the notion of directional derivative.

Let $X \in \mathbb{R}^d$ and $f \, : \, \mathrm{Mat}\big( (h,d), \mathbb{R} \big) \, \rightarrow \, \mathbb{R}^h$ such that:

$$\forall W \in \mathrm{Mat}\big( (h,d), \mathbb{R} \big), \; f(W) = WX.$$

By definition, the directional derivative of $f$ at point $W \in \mathrm{Mat}\big( (h,d), \mathbb{R} \big)$ in the direction of the vector $V \in \mathrm{Mat}\big( (h,d), \mathbb{R} \big)$ is defined by:

$$ \lim \limits_{t \to 0} \frac{ f(W + tV) - f(W) }{t}. $$

The value of this limit is usually denoted by $\mathrm{D}_{W} f \cdot V$ or $df(W)(V)$ or even $(\partial f / \partial W)(V)$. Therefore, we could say that:

$$ \frac{\partial f}{\partial W}(V) = VX. $$


Determining when $(\sin(\theta) - \cos(\theta))(2+\sin(\theta) \cos(\theta)) \leq 2$ Question:
$(\sin(\theta)-\cos(\theta))(2+\sin(\theta)\cos(\theta)) \leq 2 \qquad \text{ LHS} \\ $
Answer key:
$\implies  \frac{1}{2}(\cos(\theta)-\sin(\theta)+2\sin(\theta)\cos(\theta)+3)(\sin(\theta)-\cos(\theta)-1) \leq 0 \qquad \text{ RHS} $
I verified RHS = LHS. However, to get to the RHS part, they have factored it somehow and I can't figure out an intuitive way to do so. If anybody has a more intuitive solution (does not have to be the same as what is given here), please provide it. From this step onwards we can easily solve the question because:
$\implies  (\sqrt{2}\sin\left(\frac{\pi}{4} - \theta\right)+\sin(2 \theta)+3)(\sin(\theta)-\cos(\theta)-1) \leq 0\\ $
$ \implies  (\sin(\theta)-\cos(\theta)-1) \leq0 \because  (3 + \sqrt{2}\sin\left(\frac{\pi}{4} - \theta\right)+\sin(2 \theta)) >0 \text{ }\forall \theta \in \mathbb{R} \\ $

Doubt:

I have no idea how the went from the LHS part to the RHS part. Is there an intuitive way to solve $(\sin(\theta)-\cos(\theta))(2+\sin(\theta)\cos(\theta)) \leq 2$? In this solution they have simply said:
$$(\sin(\theta)-\cos(\theta))(2+\sin(\theta)\cos(\theta)) -2 \leq 0 \\ \implies
\frac{1}{2}(\cos(\theta)-\sin(\theta)+2\sin(\theta)\cos(\theta)+3)(\sin(\theta)-\cos(\theta)-1) \leq 0 \\$$
Please provide a logical way to solve it. Thanks in advance.

I'm looking for a no calculator solution where each step is motivated. And prove one factor is always positive or negative and use the other factor to find the region would be appreciated. Although, if there is another method, (as long as its intuitive) that works too

$f(x)$ has period $2$.
What happens in $[0,2]$ is repeated $50$ times in the same way, thus the ratio we have in this interval is the ratio of all the race.
Run points are $1/4$ and swim point are $3/4$, therefore the ratio $swim/run$ is $3$.
How did I find the points in the image below.
Solve
$$(\sin (2 \pi  x)-3) \sin \left(\frac{\pi }{4}-\pi  x\right)-\sin \left(3 \pi  x+\frac{\pi }{4}\right)=2 \sqrt{2}$$
solutions are $x=\frac12+2k;\;x=1+2k;\;k\in\mathbb{Z}$.
In the interval $[0,2]$ the are $\frac12,1$.
Solve
$$(\sin (2 \pi  x)-3) \sin \left(\frac{\pi }{4}-\pi  x\right)-\sin \left(3 \pi  x+\frac{\pi }{4}\right)=0$$
solutions are $x=\frac14+2k;\;\frac54+2k;\;k\in\mathbb{Z}$
In the interval $[0,2]$ the are $\frac14,\frac54$.
The set where $0\le f(x)\le 2\sqrt 2$ is $\left[\frac14,\frac12\right]\cup\left[1,\frac54\right]$
The length is $\frac12$ and represents $\frac14$ of the interval $[0,2]$ while the other part is $\frac34$. Thus the second part is three times the first part.

$$...$$

I have re-written this answer because, with the help of WolframAlpha here, I was surprised to discover
$$0\le \big(3-\sin(2\pi x)\big)\sin(\pi x - \frac{\pi}{4})-  \sin(3\pi x +\frac{\pi}{4})\le 2\sqrt{2}\\
\implies (2 n - 1)<x\le \frac{2 \big(\pi n - \frac{3 π}{8}\big)}{\pi} \land n \in\mathbb{ Z}\\
\land \implies \frac{2 \big(\pi n + \frac{\pi}{8}\big)}{\pi}\le x\le\frac{(4 n + 1)}{2} \land n\in\mathbb{Z} $$
What the first "implies" means for $\space 0\le x\le 100\space$ is that there are discreet ranges of values that make this true as in these samples for $1\le n\le 6$
$$(1\le x \le \frac{5}{4}=1.25)\quad
(3\le x \le \frac{13}{4}=3.25)\quad
(5\le x \le \frac{21}{4}=5.25)\quad \\
(7\le x \le \frac{29}{4}=7.25)\quad
(9\le x \le \frac{37}{4}=9.25)\quad
(11\le x \le \frac{45}{4}=11.25)\quad $$
What the second "implies" means is that the following ranges apply for $\space x$ for $1\le n\le 6$.
$$\frac{9}{4}=2.25\le x \le \frac{5}{2}=2.5\qquad
\frac{17}{4}=4.25\le x \le \frac{9}{2}=4.5\\
\frac{25}{4}=6.25\le x \le \frac{13}{2}=6.5\qquad
\frac{33}{4}=8.25\le x \le \frac{17}{2}=8.5\\
\frac{41}{4}=10.25\le x \le \frac{21}{2}=10.5\qquad
\frac{49}{4}=12.25\le x \le \frac{25}{2}=12.5$$
We can see that each value of $n$ generates $\space x\space$ with a total "coverage of $\space 0.5\qquad $ Note that $\quad 1\le n \le 24\implies 1\le x \le 97\quad$ so there are $24\times0.5=12$ "full-numbers-worth" of $0\le x \le 100$ that satisfy $I.\quad$ However, the first "implies" above permits
$n=25\implies 99\le x \le 99.25\space $ and the second "implies" peermits  $n=0.0\implies 0.25\le x \le 0.5\quad $. There are a total of $100$ intervals of $0.25$ each so the members run $\frac14$ of the time.
This means that there members swim $\frac34$ of the time and the ratio of $\frac{swim}{run}$ is $\quad 3:1$


How do you explain the concept of logarithm to a five year old? Okay I understand that it cannot be explained to a 5 year old. But, how do you explain the logarithm to primary school students?

Roughly speaking, a logarithm is like the the number of digits in a
decimal number.

I realize this is quite old a thread (7+yrs old!). I do think though I can provide a meaningful new perspective to the answers given so far. Let's see.

Short answer.
Present the kid with the following riddle (set up whatever preface you want for making the challenge more appealing to the kid):

  You a have bag of candies when you come across a friend who had a bad day and he's sad. To cheer him up you divide your amount of candies in two equal-sized halves and you give one half to your friend and keep the other. You keep on walking when you meet another friend. She's also sad. Again you divide the amount of candies you have in two halves and give one to this friend too. After a little while you find a third friend and you do the same. You keep doing the same with other friends until you have only one candy left. With how many friends can you split your candies?
  Answer: $lg_2(\#candies)$

Long answer.

I posted a question a little while ago that may help further clarify my point. See here.

If the kid is at least in grade 9, I've successfully used this approach to introduce the concept of a logarithm. A grade 12 student can easily use it to estimate arbitrary logarithms up to 1 decimal places.

  $\log_b(x)\,\equiv\,$ the number of repeated divisions ($b>1$) / multiplications ($b<1)$ of $x$ by $b$ until you get a 1

Examples:
1. $\log_58\,?\,Ans:8/5=1.6$ So the actual value is between $1$ and $2$, although closer to the first. For guessing a value, let's divide that interval in 4 parts.   As we expect it closer to 1 than to 2, we can pick a guess like $1.25$. The actual value is $1.29$.
2. $\log_{13}57\,?\,Ans:57/13\approx 4.4$, hence again the value of this log lies in $[1,2]$. As $4.4/13\approx 0.3$, we may guess the value as $1.3$. The actual value with one decimal is $1.6$.
3. We can do better by first enlarging the number. Example: $\ln 2\,?\,Ans:\mbox{Let's consider first say } \ln (2^{10})$. Now $1000$ can be divided by $3$ six times before the result is smaller than $1$: $1000/3^6\approx 1.37$. That's about half of $3$ and as $e<3$, we'll guess $\ln(1024)\approx 7$. Hence, $\ln(2)\approx 7/10=0.70$. The actual value is $\ln 2\approx 0.69$.

  A geometric interpretation has to do with zoom levels. Let's consider the following game.

The rules are basically as follows. Two players compete against each other each in turns. Each turn is time constrained. Each player has access to a zoom-dial that controls the zoom level of a picture. Each dial works in a different scale. Say player 1's dial zooms in(turn clockwise)/out(turn counter-clockwise) by a factor of 2, while that of player 2 by a factor of 8. That information is known to the players. What a player does to the picture the other has to undo. The first player that fails to undo a change in the allotted time loses the game.

Let's call the players Alice and Bob. One player, say Alice, starts by zooming in or out the picture using the dial she's been given. She tells Bob how many notches she turn hers -say $4.5$. Now Bob must undo that using his own dial. How much does Bob need to turn his dial to undo Alice's zoom? Answers: $4.5\cdot\log_{\mbox{Bob's zoom factor}}(\mbox{Alice's zoom factor})\,=\,4.5\cdot\log_8(2)\,=\,4.5/3\sim 1.5$.

Addendum:
What does $\log_{0.7}(2)$ mean? When the base is smaller than one, the log refers to the number of times we multiply $x$ by $b$ until we get $1$. The result is convened to be written negative to indicate that the process to get to $1$ is now through multiplications instead of divisions.

Summary:
The $\log_b x$ has to do with the number of steps needed to get to $1$ starting on $x$ with the only possible operations being multiplication  $*$ and division $/$ by $b$.

Conclusions:
Id' say that both pictures, the samaritan and the zooming challenge, may be grasped by at least a teenager (grade 7 on...not sure when they start learning division nowadays).

The persistent problem when explaining logarithms is that no straight answer is taken, but instead a detour is taken by relating it to the exponential -worst is when referring to the log as the inverse of the exponential: Isn't there a (non-written?) rule that explanation of something should never be given in the form of "the opposite of" or "the negation of"? I, at least, feel that's true. The approach I present introduces an exponential only implicitly.

Additional details on this point of view of mine can be found here.


How do I choose between $\lim_{x\to a} \frac {f(x) - f(a)}{x-a}\ $ and $\lim_{x\to a} \frac{f(a+h)-f(a)}{h}$? How do I choose between $\lim_{x\to a} \color{red}{\frac {f(x) - f(a)}{x-a}}$ and $\lim_{x\to a} \color{blue}{\frac{f(a+h)-f(a)}{h}}$?

Is it when I have more than two powers? For example, can I use the former for $\ y=3+4x^2-2x^3$?

They are equivalent definitions: We know

$$ f'(a) = \lim_{x \to a } \frac{ f(x) - f(a) }{x-a} $$

Now, put $h = x -a $. Notice $x \to a \iff x - a \to 0 \iff h \to 0 $. Hence,

$$ f'(a) = \lim_{h \to 0 } \frac{ f(h+a) - f(a) }{h } $$

How does one show that $\dfrac d {dx} x^n = nx^{n-1}$?  The way I first learned it was this:
\begin{align}
\frac d {dx} x^n & = \lim_{h\to 0}\frac{(x+h)^n-x^n}{h} \\[8pt]
& = \lim_{h\to0}\frac{\left( x^n + nx^{n-1}h + \frac{n(n-1)}{2}x^{n-2}h^2+\frac{n(n-1)(n-2)}6x^{n-3}h^3+\cdots+h^n \right)-x^n}{h} \\[8pt]
& \text{etc.}
\end{align}
This is perfectly comprehensible, and I was amazed that it was possible to find the exact slope, but it is overkill.  Let's apply it to a concrete case:
\begin{align}
\frac d {dx} x^4 & = \lim_{h\to0} \frac{(x+h)^4-x^4}h \\[8pt]
& = \lim_{h\to0} \frac{(x^4+4x^3h+6x^2h^2+4xh^3+h^4)-x^4}h \qquad\longleftarrow\text{overkill} \\[8pt]
& = \lim_{h\to0} \frac{4x^3h+6x^2h^2+4xh^3+h^4}h \\[8pt]
& = \lim_{h\to0} (4x^3+6x^2h+4xh^2+ h^3) \\[8pt]
& = 4x^3 + 0 + 0 + 0.
\end{align}
Now here it is the other way:
\begin{align}
\frac d {dx} x^4 & = \lim_{w\to x}\frac{w^4-x^4}{w-x} \\[8pt]
& = \lim_{w\to x}\frac{(w-x)(w^3+w^2 x+wx^2 + x^3)}{w-x} \qquad\longleftarrow\text{not overkill} \\[8pt]
& = \lim_{w\to x} (w^3+w^2x+wx^2+x^3) \\[8pt]
& = x^3+x^3+x^3+x^3.
\end{align}
The reason the first version is overkill is that it requires you to use every binomial coefficient when you actually only need the first two.

Imagine this in the case of $x^{20}$
$$
(x^{20} + 20x^{19}h + 190 x^{18}h^2 + 1140 x^{17}h^3 + 4845 x^{16}h^4 + \cdots+h^{20})-x^{20}
$$
(and then $x^{20}$ cancels and then $h$ cancels)

versus

$$
(w-x)(w^{19}+w^{18}x+w^{17}x^2+w^{16}x^3+\cdots+x^{19})
$$
(and then $w-x$ cancels).

In the first version we have all those numbers:
$$
1, 20, 190, 1140, 4845, \ldots
$$
but only the first two are really needed.  Even showing that there are some such numbers, without evaluating them, is immense overkill for this problem.

Let's apply this to show $\dfrac d{dx}\sin x = \cos x$:
\begin{align}
\frac d {dx} \sin x & = \lim_{w\to x}\frac{\sin w - \sin x}{w-x} \\[8pt]
& = \lim_{w\to x}\frac{2\cos\left(\frac{w+x}2\right)\sin\left(\frac{w-x}2\right)}{w-x} \text{ (a trigonometric identity)} \\[8pt]
& = \left( \lim_{w\to x} \cos\left(\frac{w+x}2 \right)\right)\left( \lim_{w\to x} \frac{\sin\left(\frac{w-x}2\right)}{\left(\frac{w-x}2\right)} \right) \\[8pt]
& = \left( \lim_{w\to x} \cos\left(\frac{w+x}2 \right)\right)\left( \lim_{v\to0}\frac{\sin v} v \right) \\[8pt]
& = (\cos x)\cdot 1.
\end{align}
In this argument, only one basic limit, $\displaystyle\lim_{v\to0}\frac{\sin v}v=1$, is needed, whereas the more conventional argument needs two: that one and also that $\displaystyle\lim_{v\to0}\frac{1-\cos v}{v}=0$.


In how many arrangements of the letters of the word INTERMEDIATE 2 vowels never come together? I went on to proceed with this problem by subtracting the number of arrangements in which all vowels were together, from the total number of arrangement which proved time consuming. An alternative solution, given by the textbook was what they called the gap method.

They find the number of ways of arranging $6$ consonants.
"Then they say that there are $7$ gaps remaining (how!!!!!)" in which the remaining $6$ vowels are arranged in $\frac{7p6}{3!2!}$.
The answer is $151200$

The vowels are: AEEEII.

The non-vowels are: DMNRTT.

The number of ways to arrange the vowels is $\frac{(1+3+2)!}{1!\times3!\times2!}=60$.

The number of ways to arrange the non-vowels is $\frac{(1+1+1+1+2)!}{1!\times1!\times1!\times1!\times2!}=360$.

The number of ways to choose slots for the $6$ vowels between the $6$ non-vowels is $\binom{6+1}{6}=7$.

So the number of ways to arrange this word under the given restriction is $60\cdot360\cdot7=151200$.

how may gaps are there between the consonants..$6$ consonants so for vowels there are $7$ places.first arrange the consonants in $(6!/2)$ ways.now choose any 6 places from the 7 and arrange the 6 vowels that can be done in    ($7\choose 6$$×6!)/(2!×3!)$ and finally multiply both the arrangements


Can $(-1)^{a+i b}$ be expressed without negative based exponentiation, complex exponentiation, complex logarithms or trigonometric functions? Can this expression, where $a$ and $b$ are both real, be expressed without negative based exponentiation (i.e. $a^b$ where $a$ is negative), complex exponentiation, complex logarithms or trigonometric functions?

$$(-1)^{a+i b}$$

I've got it to this, but can't work out how to refactor the negative based exponentiation.

$$e^{-b\pi}(-1)^a$$

The closest I've come to an answer works when $a$ is a positive multiple of $1\over4$
$$
e^{-b\pi}(\sqrt {0.5} + i \sqrt {0.5})^{4a}
$$
and since simple multiplication can be used like so
$$
(a + bi)(c + di) = (ac – bd) + (ad + bc)i.
$$
$$
(a+bi)^2 = (a^2-b^2)+(2ab)i
$$
this doesn't require complex exponentiation.

For $a$ not a multiple of $1\over4$, other values can be used. For example, slightly more unwieldy is this, which works with values of $a$ multiples of $1\over60$.
$$
e^{-b\pi}\left(\frac{1}{16} \left(\sqrt{2}-\sqrt{6}-\sqrt{10}+\sqrt{30}+\sqrt{20+4 \sqrt{5}}+\sqrt{60+12 \sqrt{5}}\right) + i \frac{1}{16} \left(-\sqrt{2}-\sqrt{6}+\sqrt{10}+\sqrt{30}+\sqrt{20+4 \sqrt{5}}-\sqrt{60+12 \sqrt{5}}\right)\right)^{60a}
$$

Interesting.
$$
\mathrm{Re}\big((-1)^{ib}\big) = \cos(b\pi)
$$
to be expressed without trig functions...  And without any of the known ways to epxress trig functions.


Showing that sum of angles of hyperbolic triangle is strictly less than $\pi$ I am hoping that someone can help me see understand a proof that the sum of angles of a hyperbolic triangle $\triangle ABC$ is strictly less than $\pi$.

I want to stick to the upper-half-plane model $\mathbb H:=\{z\in \mathbb C : Im (z)>0\}$ of hyperbolic geometry where lines are either vertical lines or semicircles centered on (but excluding) the $x$-axis.

To simply things, by using an LFT we can take one vertex $A$ to be the point $i$ and another $B$ to be $(0,k)\in \mathbb H$ for some $k>0$.

Now, call the third vertex $C$. We have the other two sides $AC$ and $BC$ as arcs of the circles $C_1 =(x-a)^2+y^2=r_1^2$ and $C_2=(x-b)^2+y^2=r_2^2$, respectively, so that $x^2+1=r_1^2$ and $x^2+k^2=r_2^2$.

In my class notes, there is a brief mention of how this simplification can help us with the proof. However, I do not see at all how this helps us get the result that $\triangle ABC$ sums to less than $\pi$. Therefore, any help is very appreciated.

P.S., My knowledge is elementary, so I am hoping for a proof using basic tools.

Take your triangle and move it to the standard position. Now apply a Cayley transform to take the upper half plane to the unit disk. It maps circles/lines perpendicular to the real line to circles/lines perpendicular to the unit circle, and it maps $i\mapsto 0$, so your triangle will map to a triangle with one vertex at $0$.

Two of its sides will be segments that lie on diameters of the unit circle and the third will be an arc of a circle that is perpendicular to the unit circle. Then it's clear from inspection that the sum of the angles is less than $\pi$.

Because the Cayley transform is a LFT it's conformal, so the angles of the image of your triangle are the same as the images of your original triangle.

I think we have to start at the very basics

how do you measure/ calculate an angle between an intersecting vertical line and half circle?
How do you measure/ calculate an angle between two intersecting half circles?

That is in fact all you need to know

But now in analytical geometry and with the simplification that the center of the half circle is always on the x-axis

Start by calculating the intersection point

This really should be enough

Good luck


An ice-cream shop sells $11$ kinds of ice-cream, including mango and lemon. An ice-cream  shop sells $11$ kinds of ice-cream, including mango and lemon. For a bowl, one chooses at random five kinds (not necessarily different).

$(a)$ How many different bowls can be made?  $A=11 \cdot 11\cdot 11\cdot 11\cdot 11$

$(b)$ How many different bowls contain both lemon and mango? $A=1 \cdot 1\cdot 11\cdot 11\cdot 11$

$(c)$ How many bowls contain lemon, but not mango?
 $A=1 \cdot 10\cdot 10\cdot 10\cdot 10$

I don't know if my answers are correct. Can someone explain me this problem please? Thank you.

You are a bit off.

Let's go with order.

The main question is whether the order of the selection is important or not. That is to say, is a [Mango Mango Mango Lemon Lemon] bowl different than a [Lemon Lemon Mango Mango Mango] one? Let's see how this changes the things

Question 1: How many possible bowls can exist?

If the order is important, you are right. There are 11^5 possibilities. More specifically, this is called Permutations (with repetitions) of 11 elements in class 5. In general, the formula for P(n, k) = n^k.

If the order does not matter, then we need to consider how many of those 11^5 are actually duplicated. This is called Combinations (with repetitions) of 11 elements in class 5. In general, the formula for C(n, k) is (n+k-1)! / (k! * (n-1)!) , so in your case that is 15! / (5! * 10!)

Question 2: How many contain both lemon and mango?
Well, we need at least 1 mango and 1 lemon, so we can lock those down and then consider the rest as either:
P(11, 3) or C(11, 3) (2 flavors are locked, the rest can be any)

Question 3: How many contain lemon but not mango?

Again, we can lock down the lemon, but the other flavors must be anything but mango, so it becomes
P(10, 4) or C(10, 4) (we remove mango from the options for the remaining 4 flavors)

You are right if you consider mango and lemon to be different from lemon and mango. I mean to say, If the order of adding the different components to the ice-cream matters


Decomposing tensor product of lie algebra representations I'm given a lie algebra representation $\pi$ of some semi-simple algebra and that it decomposes into a sum of irreducible representations.

What technique should I use to show the decomposition of $\pi \otimes \pi$ into irreducible represenations?

Any clues will be highly appreciated.

Thanks in advance.

One approach to the general problem of decomposing a tensor product of irreducible finite-dimensional representations (hence any finite-dimensional representations) into irreducibles is to use the theory of crystals.  The crystal of a representation is a colored directed graph associated to that representation.  There is a purely combinatorial algorithm for producing the tensor product of two crystals.  Then the connected components of the crystal graph correspond to the irreducible representations you're looking for.  For many simple Lie algebras, the crystals of the irreducible finite-dimensional representations are described very explicitly.  For instance, for $\mathfrak{sl}_n$, they are in terms of semistandard tableaux.  So finding the decomposition you seek becomes combinatorics.

There is a product formula for product of two irreducible representations. This is standard. Just find it out in a standard textbook.


The real line is not homeomorphic to any non-trivial product space I came across a question that interested me recently. It asked the following:

Prove that if $\mathbb R$ is homeomorphic to $X \times Y$, then $X$ or $Y$ is a singleton set.

I have an easy proof using path-connectedness. I was interested if there is an even more elementary argument. The notion of connectedness had not yet been introduced in the text.

Let $X$, $Y$ be topological spaces so that $\mathbb{R}$ is homeomorphic to $X \times Y$. Since $\mathbb{R}$ is connected, clearly so is $X \times Y$. Now $X$ is a surjetive image of $X\times Y$, and so is $Y$. Hence both $X$ and $Y$ are also connected.

Note now that $\mathbb{R}$- and so $X\times Y$- has the property that complement of any $1$ point subset is not connected. Let us show then that either $X$ and $Y$ contains only one element. Assume the contrary, that $X$ contains at least two elements $x_1$, $x_2$, and $Y$ contains $y_1$, $y_2$. Let us show that in fact the space $Z\colon =X \times Y \backslash\{ ( x_1, y_1)\}$ is connected. For this it enough to notice that any point $(x,y)$ of $Z$ is in the same connected component of $Z$ with $(x_2, y_2)$. Indeed, any $(x,y)$ with $x\ne x_1$ is contained together with $(x, y_2)$ in the connected subset $\{x\} \times Y$ of $Z$.

Note: What we showed in fact was that any connected space such the complement of some ( thanks @bof) point is not connected, is not a product space in a non-trivial way.

UPDATE 2: Ok, I realize critical assertion that $\pi_X \circ h \colon \mathbb{R} \to X$ is a homeomorphism was wrong. Going to see if I can stab at it without connectedness when I wake up.

UPDATE 1: Without loss of generality, suppose that $|X|=\mathbb{R}$. Let $h \colon \mathbb{R} \to X \times Y$ be a homeomorphism. It is easy to verify that $\pi_X \circ h \colon \mathbb{R} \to X$ is a homeomorphism, where $\pi_X \colon X \times Y \to X$ is the projection map.

Suppose to contradiction that $|Y|>1$?

Pretty sure there's something you can do there but I'm gonna sleep on that for now.

Hope that helps.


Limit of a recursive sequence $a_{n+1}=\frac{1}{2}\left(a_n + \frac{5}{a_n}\right)$ A sequence is given by $a_{n+1}=\dfrac{1}{2}\left(a_n + \dfrac{5}{a_n}\right)$ for each integer $n \geq 0$.  Does the limit of $a_n$ as $n$ goes to infinity equal $\sqrt{5}$ for $a_0 =2$?  What if $a_0=3$?

Fix $k>0$ and $t>0$.  I shall prove that the sequence $\left\{a_n\right\}_{n\in\mathbb{Z}_{\geq 0}}$ defined by $a_0=t$ and
$$a_{n+1}=\frac{1}{2}\,\left(a_n+\frac{k^2}{a_n}\right)\text{ for every }n=0,1,2,3,\ldots\tag{*}$$ satisfies
$$\lim_{n\to\infty}\,a_n=k\,.$$  This problem is a particular case where $k:=\sqrt{5}$ and $t\in\{2,3\}$.

First of all, it is clear that $a_n>0$ for all $n\in\mathbb{Z}_{\geq 0}$.  By the AM-GM Inequality, $$a_n=\frac{1}{2}\,\left(a_{n-1}+\frac{k^2}{a_{n-1}}\right)\geq \sqrt{a_{n-1}\left(\frac{k^2}{a_{n-1}}\right)}= k$$ for every $n=1,2,3,\ldots$.  Note from (*) that
$$a_{n+1}-a_n=\frac{1}{2}\left(\frac{k^2-a_n^2}{a_n}\right)\leq 0\text{ for }n=1,2,3,\ldots\,.$$
That is, the subsequence $\left\{a_n\right\}_{n\in\mathbb{Z}_{>0}}$ is nonincreasing and is bounded from below by $k$.  Hence, $\lim\limits_{n\to\infty}\,a_n$ exists (and equals $\inf\big\{a_n\,\big|\,n=1,2,3,\ldots\big\}$).  If $L$ is this limit, then $L\geq k>0$.  By (*), we have
$$L=\frac{1}{2}\,\left(L+\frac{k^2}{L}\right)\text{ or }L=k\,.$$

Disclaimer: I'm in a hurry so I'll just show, if the base value is acceptable, that the sequence converges but I don't think its hard to find the limit using subsequences.

$\textbf{Claim 1}: \forall y>0, y+25/y\geq 10$.

$\textit{Proof:} 0\geq (y-5)^2=y^{2}-10y+25\Rightarrow y^{2}+25\geq 10y\Rightarrow y+y/25\geq 10$.

$\textbf{Theorem}: \text{The sequence} \hspace{.5pc} (x_{n}), x_{n}=\displaystyle \frac{1}{2}\left(x_{n}+\frac{5}{x_{n}} \right)$ converges.

$\textit{Proof:} \forall x>0, \displaystyle \left(x+\frac{5}{x}\right)^2=x^{2}+\frac{25}{x^{2}}+10\underset{x^{2}>0\wedge\text{Claim 1}}{\geq}10+10=20\Rightarrow x_{n}^{2}=\frac{1}{4}\left(x_{n}+\frac{5}{x_{n}}\right)^{2}\geq \frac{1}{4}\cdot 20=5\Rightarrow x_{n}^{2}\geq 5\forall n\Rightarrow x_{n}-x_{n+1}=x_{n}-\frac{1}{2}\left(x_{2}+\frac{5}{x_{n}}\right)=\frac{1}{2}x_{n}-\frac{5}{x_{n}}=\frac{x_{n}^{2}-5}{2x_{n}}\underset{x_{n}^{2}\geq 5}{\geq}0\Rightarrow (x_{n})$ is decreasing, bounded above by $x_{1}$ (if base value is appropriate) and bounded below by $\sqrt{5}$ (why?). Then $(x_{n})$ converges [1].

What this means is that we can find a sequence of rationals that approximate square roots. Can you generalize this idea to any $\sqrt{c}, c>0$?

I didn't check out the source but just google monotone convergence theorem or trust wiki :)

[1] https://en.wikipedia.org/wiki/Monotone_convergence_theorem

[2] Understanding Analysis; Stephen Abbott, 2nd ed.


Explanation for differentiating $y= \frac 1{\ln x}$ The solution in my book shows

$$\frac{dy}{dx} = \frac{\ln(x) \cdot 0 - 1 \cdot \frac{1}{x}}{\ln^2(x)}$$

Can you please explain how the differentiation is done?

I can easily differentiate it with substitution and I can understand the denominator easily  but I have no idea how he came up with that numerator

$y=\frac{1}{\ln(x)}=(\ln(x))^{-1}.$

Now, use the power rule for differentiation and then apply the chain rule.

$y'=(-1)(\ln(x))^{-2}\frac{1}{x}=-\frac{1}{x\ln(x)^2}$.

An Alternative way would be to use the quotient rule:

$y=\frac{1}{\ln(x)}=\frac{u}{v} \implies y'=\frac{u'v-uv'}{v^2}=\frac{(0)'\ln(x)-1(\ln(x))'}{\ln(x)^2}=-\frac{1/x}{\ln(x)^2}$

y = 1/ln x

y= log e (base x)

x^y = e

taking log of both sides

y ln x =ln e

differentiate wrt x

y(1/x)+y'(ln x) = 0

y'(ln x) = -(y/x)

y' =-y/ x(ln x)

y' =-1/x(ln x)^2


Is $\mathbb{R}$ isomorphic to $\mathbb{R}(x)$? Is $\mathbb{R}$ isomorphic (as a field) to $\mathbb{R}(x)$? (where $x$ is an indeterminate on $\mathbb{R}$)

Another argument.

In the field $\Bbb{R}$ every element $z$ or its additive inverse is a square of some element of the field. This property is preserved under an isomorphism. But the element $x\in\Bbb{R}(x)$ is not a square of any element. Neither is $-x$. Therefore we can conclude that $\Bbb{R}$ and $\Bbb{R}(x)$ are not isomorphic.

This question raise from another question: does there exist a field $k$ such that $k$ is isomorphic to $k$(x)?
The answer to this question seems to be yes. It is enough to consider a generic field $F$ and let $k = F(x_i : i \in \mathbb{N})$. Then we have the following field isomorphism
$$ \varphi:k(x) \rightarrow k \quad \text{such that } \varphi(x) = x_0, \: \varphi(x_i) = x_{i+1},\; \varphi_{|k} = 1_k \text{ (the identity on $k$)}.$$

Thus every field $k$ of the type $F(x_i : i \in I)$ where $I$ is a set of indices at least countable is isomorphic to $k(x)$.

By the last statement we can view $\mathbb{R} = \mathbb{Q}(x_i: i \in I)$ where $\{ x_i : i \in I \}$ is a basis of $\mathbb{R}$ as a $\mathbb{Q}$-vector space which must be at least countable. Therefore $\mathbb{R}$ is isomorphic to $\mathbb{R}(x)$.


Nonpiecewise Function Defined at a Point but Not Continuous There I make a big fuss that my calculus students provide a "continuity argument" to evaluate limits such as $\lim_{x \rightarrow 0} 2x + 1$, by which I mean they should tell me that $2x+1$ is a polynomial, polynomials are continuous on $(-\infty, \infty)$, and therefore $\lim_{x \rightarrow 0} 2x + 1 = 2 \cdot 0 + 1 = 1$.

All the examples they encounter where it is not correct to simply evaluate at $a$ when $x \rightarrow a$ fall into one of two categories:

The function is not defined at $a$.
The function is piecewise and expressly constructed to have a discontinuity at $a$.

  I'd like to find a function $f$ with the following properties:

  $f(a)$ exists
  $f(a)$ is not (obviously) piecewise defined
  $f(x)$ is not continuous at $a$
  $f$ is reasonably familiar to a Calculus I student - trigonometry would be admissible, but power series would not (though they might
  still make for interesting reading)

A very easy way to construct a function that is piecewise without being "obviously piecewise" is functions defined in terms of limits:

$$f(x) = \lim_{a \to +\infty} \exp\left(-ax^2\right) = \begin{cases}1, & x = 0 \\ 0, & \text{otherwise}\end{cases}$$

This example has the advantage of being easily-comprehensible to beginning calculus students.

An interesting example of "natural discontinuity" that I know, is easy to absorb on any level and it comes from classical textbooks. It requires some basic imagination, however.

Textbooks usually start from defining the function, and then ask a student to prove some technical stuff about it. I prefer to start from the other way around.

Consider $(x,y,z)$-space. Take both $x$- and $y$- axes and exclude the origin. We want our function to go through them, so that whenever $x$ or $y$ equals $0$, $z$ equals $0$ as well.

Now, consider the diagonals $x+y=0$ and $x-y=0$ lifted above $(x,y)$-plane to $z=1$, and exclude the lifted origin $(0,0,1)$ from this construction. What happens if we want our continuous everywhere except for the origin function to go through these lines as well?

To help imagine that. A bisection by any vertical plane $y=c\neq0$ should be a continuous M-shaped function going through $(x,z)=(0,0)$ as well as $(x,z)=(\pm c,1)$. The closer is $c$ to $0$, the closer are the last two points to each other. Similarly, with bisection by any vertical $x$-plane.

When you move to origin from north, east, south or west along $x=0$ or $y=0$ you are always at the bottom of this "canyon" at sea-level height of $z=0$. However, when you are on one of the two diagonals moving, for example, from north-east, you are always on top of the range at height $z=1$.

Interestingly enough, such a function can be easily defined, for example, as follows: $$\frac{x^2y^2}{x^4+y^4},(x,y)\in\mathbb{R}-\{(0,0)\}$$

Now, without specifying the value at $(0,0)$ what should it be? Depending on what direction you are coming from, it can be any value within the whole interval. But in any case it will remain discontinuous.


Prove $P(X\geq1)\geq\frac{(\mathbb{E}X)^2}{\mathbb{E}X^2}$, assuming that $X$ has only natural values. I have to prove:
$$P(X\geq1)\geq\frac{(\mathbb{E}X)^2}{\mathbb{E}X^2}$$

Assuming that $X$ have only values from $\mathbb{N}$.

So, if I am correct we can write $\mathbb{E}X^2=\sum x_i^2p_i$ and $(\mathbb{E}X)^2=(\sum x_ip_i)^2$. If $X$ have only natural values, then $P(X\geq1)=1$

I think we should use Cauchy-Schwarz inequality here. So we start
$$
\frac{(\mathbb{E}X)^2}{\mathbb{E}X^2}=\frac{(\sum x_ip_i)^2}{\sum x_i^2p_i}\leq\frac{(\sum x_i^2)(\sum p_i^2)}{\sum x_i^2p_i}
$$
And I do not know how to take it from here.

Solution

Since $Var(X) = \mathbb{E}X^2 - (\mathbb{E}X)^2 \geq 0$

We can write $\mathbb{E}X^2 \geq (\mathbb{E}X)^2$

Dividing both sides by $\mathbb{E}X^2$ gives:
$1 \geq \frac{(\mathbb{E}X)^2}{\mathbb{E}X^2}$

So $$P(X\geq1)\geq\frac{(\mathbb{E}X)^2}{\mathbb{E}X^2}$$


Double obstructing wall problem, what is the optimal walk path and length? Every day, you walk from point A to point B which are exactly $2$ miles apart straight line distance, however, each day, there is a $50$% chance of there being an obstructing wall perpendicular to the direct AB segment.  The wall cannot be seen so you wont know it is there until you actually bump it.  It is like an invisible force field that forces you to walk around it when you bump it and you will know immediately when you have cleared it , thus you can change your path once cleared.  The wall extends $1$ mile in both directions perpendicular to the direct AB path so if that wall is at the midpoint of AB, it would create a symmetrical + shape with the direct AB path.  Additionally, there is a 2nd obstructing wall that we have to deal with $25$% of the time (on average) but is only half of the length of the larger wall so it extends only $.5$ miles in both directions perpendicular to the direct AB path.  The $2$ walls can be present independently of each other.

You can assume all ground is flat and that neither wall will ever be within the first or last half mile of the direct path line segment between A and B.  That is, the $2$ walls can only be in the middle mile between A and B if at all.  For any given walk, there could be $0$, $1$, or $2$ walls present.    Also, any walls will be uniformly distributed in the middle mile.  If the $2$ walls are at the same exact spot, you can just treat that as if only the large wall is present since the obstruction would be identical.

What walk strategy will minimize the walk distance on average going from A to B?  That is, if you were to connect the dots of all the optimal (x,y) coordinates to be at during an average walk, what would the shape of the path look like (on a non-wall day)?

What is that minimum average distance to walk?

This answer has been through so many revisions, but now I've gotten all the pieces completed and I am trying to make something readable out of it all. There are really $3$ main cases to deal with:
1. The path before any wall has been encountered
2. The path after the small wall but before the big wall
3. The path after the big wall but before the small wall.
Then the results of the $3$ parts can be combined to find an average distance walked.

Part 1. The path before the first wall.

The big wall is present $50\%$ of the time, and it's uniformly distributed in $[\frac12,\frac32]$ when present. Thus the probability that the big wall has not been seen for $\frac12\le x\le\frac32$ is $P_b=\frac12+\frac12\left(\frac32-x\right)=\frac54-\frac12x$, and the small wall is only present $25\%$ of the time, so the same probability for the it is $P_s=\frac34+\frac14\left(\frac32-x\right)=\frac98-\frac14x$. So the probability that no walls have been encountered is $P_{bs}=P_bP_s=\frac18x^2-\frac78x+\frac{45}{32}$. Then the probability of the first wall being between $x$ and $x+dx$ is $P_{bs}(x)-P_{bs}(x+dx)=-\frac{dP_{bs}}{dx}dx=\left(-\frac14+\frac78x\right)dx$. We now compute the mean path length from the starting point to the first wall encountered, subtracting the distance to its center, or to the goal at $B$ if no wall is ever encountered. This is
$$\begin{align}\bar s=&\int_{\frac12}^{\frac32}\left[\sqrt{\frac14+\left(y(x_1)\right)^2}+\int_{\frac12}^{x_2}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx-y(x_2)\right]\left(-\frac14x_2+\frac78\right)dx_2+\\
&\frac38\left[\sqrt{\frac14+\left(y(x_1)\right)^2}+\int_{\frac12}^{\frac32}\sqrt{1\left(+y^{\prime}(x)\right)^2}dx+\sqrt{\frac14+\left(y(x_3)\right)^2}\right]\tag{1}\end{align}$$
Where $x_1=\frac12$ and $x_3=\frac32$. Now we change order of integration as usual to get
$$\begin{align}&\int_{\frac12}^{\frac32}\left(-\frac14x_2+\frac78\right)\int_{\frac12}^{x_2}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\,dx_2\\ \tag{2}
&=\int_{\frac12}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}\int_{x}^{\frac32}\left(-\frac14x_2+\frac78\right)dx_2\,dx\\
&=\int_{\frac12}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}\left(\frac18x^2-\frac78x+\frac{33}{32}\right)dx\end{align}$$
Combining this with that $-y$ in the original integral and a similar integral from the part that took into account the contribution to the mean path length if no walls were present and the straight line parts, the path simplifies to
$$\begin{align}\bar s&=\int_{\frac12}^{\frac32}\left[\left(\frac18x^2-\frac78x+\frac{45}{32}\right)\sqrt{1+\left(y^{\prime}(x)\right)^2}-\left(\frac78-\frac14x\right)y(x)\right]dx\\ \tag{3}
&+\sqrt{\frac14+\left(y(x_1)\right)^2}+\frac38\sqrt{\frac14+\left(y(x_3)\right)^2}\end{align}$$
The effect of a small deviation from the optimal path, $\delta y(x)$ is
$$\begin{align}\delta\bar s&=\int_{\frac12}^{\frac32}\left[\left(\frac18x^2-\frac78x+\frac{45}{32}\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\delta y^{\prime}(x)-\left(\frac78-\frac14x\right)\delta y(x)\right]dx\\
&+\frac{y(x_1)}{\sqrt{\frac14+\left(y(x_1)\right)^2}}\delta y(x_1)+\frac38\frac{y(x_3)}{\sqrt{\frac14+\left(y(x_3)\right)^2}}\delta y(x_3)\\
&=-\int_{\frac12}^{\frac32}\left[\frac d{dx}\left\{\left(\frac18x^2-\frac78x+\frac{45}{32}\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right\}+\left(\frac78-\frac14x\right)\right]\delta y(x)dx\\
&+\left[\frac{y(x_1)}{\sqrt{\frac14+\left(y(x_1)\right)^2}}-\frac{y^{\prime}(x_1)}{\sqrt{1+\left(y^{\prime}(x_1)\right)^2}}\right]\delta y(x_1)\tag{4}\\
&+\frac38\left[\frac{y(x_3)}{\sqrt{\frac14+\left(y(x_3)\right)^2}}+\frac{y^{\prime}(x_3)}{\sqrt{1+\left(y^{\prime}(x_3)\right)^2}}\right]\delta y(x_3)\end{align}$$
Since the variation in $\bar s$ must be invariant under small but arbitrary variations in path, the contents of each of the square brackets must be zero. The first line will yield the differential equation for the curved part of the path, and the second line has the solution
$$y^{\prime}(x_1)=2y(x_1)=\frac{y(x_1)-0}{\frac12-0}\tag{5}$$
Which shows that the first derivative is continuous across $x=\frac12$. The third line similarly has the solution
$$y^{\prime}(x_3)=-2y(x_3)=\frac{0-y(x_3)}{2-\frac32}\tag{6}$$
Which is the statement of continuity of the first derivative across $x=\frac32$.
Now back to that differential equation. We have an immediate integral which we can write as
$$\left(\frac18x^2-\frac78x+\frac{45}{32}\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}=\left(\frac18x^2-\frac78x+\frac{45}{32}\right)+\frac{1-c_1^2}{4}\tag{7}$$
We can solve for $y^{\prime}(x)$ to get
$$y^{\prime}=\frac{\left(\frac72-x\right)^2-c_1^2-(c_1^2-1)}{2\sqrt{c_1^2-1}\sqrt{\left(\frac72-x\right)^2-c_1^2}}\tag{8}$$
Then we can substitute $\frac72-x=c_1\cosh\theta$ so this translates to
$$y^{\prime}=\frac{c_1^2\sinh^2\theta-(c_1^2-1)}{2c_1\sqrt{c_1^2-1}\sinh\theta}=\frac{c_1^2\cosh^2\theta+1-2c_1^2}{2c_1\sqrt{c_1^2-1}\sinh\theta}\tag{9}$$
Recalling that $dx=-c_1\sinh\theta\,d\theta$ we can integrate to get
$$\begin{align}y&=-\int\frac{c_1^2\sinh^2\theta-(c_1^2-1)}{2c_1\sqrt{c_1^2-1}\sinh\theta}c_1\sinh\theta\,d\theta\tag{10}\\
=&\frac1{4\sqrt{c_1^2-1}}\left(-c_1^2\sinh\theta\cosh\theta+(3c_1^2-2)\theta\right)+c_2\end{align}$$
We can insert these expressions into the first derivative continuity conditions to get
$$\frac{10-2c_1^2}{2\sqrt{c_1^2-1}\sqrt{9-c_1^2}}=\frac1{2\sqrt{c_1^2-1}}\left(-3\sqrt{9-c_1^2}+(3c_1^2-2)\ln\left(\frac{3+\sqrt{9-c_1^2}}{c_1}\right)\right)+2c_2\tag{11}$$
$$\frac{5-2c_1^2}{2\sqrt{c_1^2-1}\sqrt{4-c_1^2}}=\frac{-1}{2\sqrt{c_1^2-1}}\left(-2\sqrt{4-c_1^2}+(3c_1^2-2)\ln\left(\frac{2+\sqrt{4-c_1^2}}{c_1}\right)\right)-2c_2\tag{12}$$
We can eliminate $c_2$ between these two equations so we only have one difficult equation to solve for $c_1$ with the result $c_1=1.814022405933661$ and $c_2=0.004495637179259$.
We have a relatively nice expression for
$$\sqrt{1+\left(y^{\prime}(x)\right)^2}=\frac{c_1^2\cosh^2\theta-1}{2c_1\sqrt{c_1^2-1}\sinh\theta}\tag{13}$$
In terms of $\theta$.
With full knowledge of the curve in hand, from the continuity equations we have a simplified expression for the straight line path from $(0,0)$ to $\left(\frac12,y\left(\frac12\right)\right)$
$$\begin{align}L_1&=\sqrt{\frac14+\left(y\left(\frac12\right)\right)^2}=\frac12\sqrt{1+\left(y^{\prime}\left(\frac12\right)\right)^2}\tag{14}\\
&=\frac2{\sqrt{c_1^2-1}\sqrt{9-c_1^2}}=0.553038982525363\end{align}$$
$$\begin{align}L_3&=\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}=\frac12\sqrt{1+\left(y^{\prime}\left(\frac32\right)\right)^2}\tag{15}\\
&=\frac3{4\sqrt{c_1^2-1}\sqrt{4-c_1^2}}=0.588379287212860\end{align}$$
We can integrate to find the curved part of the undisturbed path
$$\begin{align}L_{13}&=\int_{\frac12}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx=\int_{\theta_1}^{\theta_3}\frac{1-c_1^2\cosh^2\theta}{2\sqrt{c_1^2-1}}d\theta\\
&=\frac1{4\sqrt{c_1^2-1}}\left[3\sqrt{9-c_1^2}-2\sqrt{4-c_1^2}+(c_1^2-2)\ln\left(\frac{3+\sqrt{9-c_1^2}}{2+\sqrt{4-c_1^2}}\right)\right]\tag{16}\end{align}$$
Where $c_1\cosh\theta_1=3$ and $c_1\cosh\theta_3=2$. Since this works out to $L_{13}=1.042233793405411$, the total path length on a non-wall day will be $L_1+L_{13}+L_3=2.183652063143634$ miles.
The maximum excursion from the straight line path happens when $y^{\prime}=0$. This happens at $\theta_{\max}=0.759253746502349$, $x_{\max}=1.137510935801247$, and has a value of $y_{\max}=0.401134051668599$.
To get the average path length we have one more integral to evaluate
$$\begin{align}\bar s&=L_1+\frac38L_3+\int_{\frac12}^{\frac32}\left[\left(\frac18x^2-\frac78x+\frac{45}{32}\right)\sqrt{1+\left(y^{\prime}(x)\right)^2}-\left(\frac78-\frac14x\right)y(x)\right]dx\\
&=\frac1{32\sqrt{c_1^2-1}}\left\{(-4c_1^2-2)\sqrt{4-c_1^2}+(-2c_1^4+15c_1^2-10)\ln\left(\frac{2+\sqrt{4-c_1^2}}{c_1}\right)\right.\\
&\left.+(6c_1^2+18)\sqrt{9-c_1^2}+(2c_1^4-30c_1^2+20)\ln\left(\frac{3+\sqrt{9-c_1^2}}{c_1}\right)\right\}\tag{17}\\
&-\frac58c_2+L_1+\frac38L_3=1.250510547155483=\text{Cost}_1\end{align}$$
This is the average length up to the first wall encountered, with the distance to the wall center subtracted, or to point $B$ if no wall was present.
I have included a graph of the path and a table for those who like discrete solutions.

$$\begin{array}{cc}x&y\\
0.000000&0.000000\\
0.500000&0.236331\\
0.540000&0.254769\\
0.580000&0.272258\\
0.620000&0.288778\\
0.660000&0.304305\\
0.700000&0.318815\\
0.740000&0.332282\\
0.780000&0.344676\\
0.820000&0.355965\\
0.860000&0.366113\\
0.900000&0.375080\\
0.940000&0.382821\\
0.980000&0.389287\\
1.020000&0.394421\\
1.060000&0.398157\\
1.100000&0.400423\\
1.140000&0.401131\\
1.180000&0.400180\\
1.220000&0.397452\\
1.260000&0.392800\\
1.300000&0.386048\\
1.340000&0.376976\\
1.380000&0.365301\\
1.420000&0.350650\\
1.460000&0.332511\\
1.500000&0.310145\\
2.000000&0.000000\\
\end{array}$$

Part 2. The path after the small wall but before the big wall.

The probability of meeting the big wall between $x_2$ and $x_2+dx_2$ was $P(x_2)dx_2=\frac12dx_2$ at the outset, but the probability that we would get to $x_1$ without seeing the big wall was
$$P(x_1)=\frac12+\int_{x_1}^{\frac32}P(x_2)dx_2=\frac54-\frac12x_1\tag{18}$$
So the probability of meeting the big wall between $x_2$ and $x_2+dx_2$ given that we made it to $x_1$ without seeing it is
$$P(x_2|x_1)dx_2=\frac{P(x_2)}{P(x_1)}dx_2=\frac{2dx_2}{5-2x_1}\tag{19}$$
With this probability density function, we can assess the average cost of a given path $y(x)$ starting from $(x_1,0)$. It is
$$\begin{align}\bar s(x_1)&=\int_{x_1}^{\frac32}\left[\frac12+\int_{x_1}^{x_2}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx+1-y(x_2)+\sqrt{(2-x_2)^2+1}\right]\frac{2dx_2}{5-2x_1}\tag{20}\\
&+\left(1-\int_{x_1}^{\frac32}\frac{2dx_2}{5-2x_1}\right)\left[\frac12+\int_{x_1}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx+\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\right]\end{align}$$
The integral on the first line is to average the path length over all possible remaining positions of the big wall and the second line multiplies the probability of reaching $x_2=\frac32$ unscathed by the undisturbed (after hitting the small wall at $x_1$) path length to get the cost of the undisturbed path.
The first item in each of the square brackets is the $\frac12$ mile to get around the small wall because our accounting scheme subtracted our distance from the straight line path when the first wall was met.
The integral that comes next is the length of the curved part of our path up to $x_2$ where the big wall is or to $\frac32$ if the big wall leaves us alone.
If we meet the big wall, we will have to detour $1-y(x_2)$ but then we can go in a straight line from $(x_2,1)$ to $(2,0)$.
If no big wall, then after making it through the danger zone we can go straight from $(\frac32,y\left(\frac32\right))$ to $(2,0)$. The probability of no big wall can be seen to be $\frac2{5-2x_1}$ and the cost contributed by the constants is
$$K_1=\frac12\left(\frac{3-2x_1}{5-2x_1}\right)+\left(\frac{3-2x_1}{5-2x_1}\right)+\frac12\left(\frac2{5-2x_1}\right)=\frac12+\frac{3-2x_1}{5-2x_1}\tag{21}$$
The average cost of all the straight line paths from the edge of the big wall to point $B$ is
$$\begin{align}K_2&=\frac2{5-2x_1}\int_{x_1}^{\frac32}\sqrt{(2-x_2)^2+1}dx_2\\
&=\frac2{5-2x_1}\left(-\frac12\right)\left[(2-x_2)\sqrt{(2-x_2)^2+1}+\ln\left((2-x_2)+\sqrt{(2-x_2)^2+1}\right)\right]_{x_1}^{\frac32}\tag{22}\\
&=\frac1{5-2x_1}\left[(2-x_1)\sqrt{(2-x_1)^2+1}+\ln\left((2-x_1)+\sqrt{(2-x_1)^2+1}\right)-\frac{\sqrt5}4-\ln\left(\frac{\sqrt5+1}2\right)\right]\end{align}$$
The average cost of the curved path is
$$\begin{align}V_1&=\frac2{5-2x_1}\int_{x_1}^{\frac32}\int_{x_1}^{x_2}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\,dx_2+\frac2{5-2x_1}\int_{x_1}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\\
&=\frac2{5-2x_1}\int_{x_1}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}\int_{x}^{\frac32}dx_2\,dx+\frac2{5-2x_1}\int_{x_1}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\\
&=\frac2{5-2x_1}\int_{x_1}^{\frac32}\left(\frac32-x\right)\sqrt{1+\left(y^{\prime}(x)\right)^2}dx+\frac2{5-2x_1}\int_{x_1}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\\
&=\frac1{5-2x_1}\int_{x_1}^{\frac32}\left(5-2x\right)\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\tag{23}\end{align}$$
The average benefit of our path's deviation from the straight line path is
$$V_2=\frac2{5-2x_1}\int_{x_1}^{\frac32}-y(x)dx\tag{24}$$
And the average cost of the straight line part of the undisturbed path is
$$V_3=\frac2{5-2x_1}\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\tag{25}$$
The part of we can do something about by varying our path is
$$V_1+V_2+V_3=\frac1{5-2x_1}\left\{\int_{x_1}^{\frac32}\left[\left(5-2x\right)\sqrt{1+\left(y^{\prime}(x)\right)^2}-2y(x)\right]dx+2\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\right\}\tag{26}$$
We want our path to be invariant to first order to small changes to the path $\delta y$. The change in the contents of the curly braces above is
$$\begin{align}\delta V&=\int_{x_1}^{\frac32}\left[\left(5-2x\right)\frac{\partial}{\partial y^{\prime}}\sqrt{1+\left(y^{\prime}(x)\right)^2}\delta y^{\prime}-2\frac{\partial}{\partial y}y(x)\delta y\right]dx+\left[2\frac{\partial}{\partial y}\sqrt{\frac14+\left(y\left(x\right)\right)^2}\delta y\right]_{x=\frac32}\\
&=\left[\left(5-2x\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\delta y\right]_{x_i}^{\frac32}-\int_{x_1}^{\frac32}\left[\frac d{dx}\left(\left(5-2x\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right)+2\right]\delta ydx\tag{27}\\
&+\left[2\frac{y(x)}{\sqrt{\frac14+\left(y\left(x\right)\right)^2}}\delta y\right]_{x=\frac32}\end{align}$$
Now, we know the value of $y(x_1)$, so $\delta y(x_1)=0$, but $y\left(\frac32\right)$ is free to wander so $\delta y\left(\frac32\right)$ can take on any value. Thus
$$\begin{align}\delta V&=\left[\frac{2y^{\prime}\left(\frac32\right)}{\sqrt{1+\left(y^{\prime}\left(\frac32\right)\right)^2}}+\frac{2y\left(\frac32\right)}{\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}}\right]\delta y\left(\frac32\right)\tag{28}\\
&-\int_{x_1}^{\frac32}\left[\frac d{dx}\left(\left(5-2x\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right)+2\right]\delta y(x)dx\end{align}$$
Since this has to be invariant to first order in $\delta y$, the contents of both sets of square brackets must be zero. The solution for the algebraic brackets is $y^{\prime}\left(\frac32\right)=-2y\left(\frac32\right)$. This has the physical significance that the slope of the path from $\left(\frac32,y\left(\frac32\right)\right)$ to $(2,0)$ is
$$m=\frac{0-y\left(\frac32\right)}{2-\frac32}=-2y\left(\frac32\right)=y^{\prime}\left(\frac32\right)\tag{29}$$
This proves the continuity of the first derivative of the optimal path at the kink point $x=\frac32$. This was considered likely because there wasn't an obvious kink in the paths there, but it wasn't a given because light follows an optimal, too, but has kinks in its path where the refractive index of the medium changes discontinuously.
Now we have to solve the differential equation implied by the contents of the second set of square brackets.
$$\frac d{dx}\left(\left(5-2x\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right)=-2\tag{30}$$
This integrates to
$$\left(5-2x\right)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}=5-2x-2c_1^2\tag{31}$$
Solving for $y^{\prime}(x)$ and letting $u=5-2x-c_1^2$,
$$y^{\prime}(x)=\frac{5-2x-2c_1^2}{2c_1\sqrt{5-2x-c_1^2}}=\frac{u-c_1^2}{2c_1u^{1/2}}=\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dx}=-2\frac{dy}{du}\tag{32}$$
Integrating,
$$y=\frac1{2c_1}\left(-\frac13u^{3/2}+c_1^2u^{1/2}\right)+c_2\tag{33}$$
At the start of the curved path,
$$y(x_1)=\frac12=\frac1{2c_1}\left(-\frac13u_1^{3/2}+c_1^2u_1^{1/2}\right)+c_2\tag{34}$$
Where $u_1=u(x_1)=5-2x_1-c_1^2$. Then
$$y=\frac1{2c_1}\left(-\frac13u^{3/2}+c_1^2u^{1/2}+\frac13u_1^{3/2}-c_1^2u_1^{1/2}\right)+\frac12\tag{35}$$
Our condition that determines $c_1$ is then
$$-2\left(\frac1{2c_1}\right)\left(u_3^{1/2}-c_1^2u_3^{-1/2}\right)=-2\left(\frac1{2c_1}\right)\left(-\frac13u_3^{3/2}+c_1^2u_3^{1/2}+\frac13u_1^{3/2}-c_1^2u_1^{1/2}\right)-1\tag{36}$$
Where $u_3=u\left(\frac32\right)=2-c_1^2$. Now, this equation is much easier to solve than was the case before I had proved continuity of the first derivative! With this value of $c_1$ in hand, we do the integral implied by $V_1+V_2$ to get
$$\begin{align}V_1+V_2&=-\frac12\left(\frac1{5-2x_1}\right)\left[\frac1{3c_1}u_3^{5/2}+c_1^3u_3^{1/2}\right.\tag{37}\\
&\left.-\frac1{3c_1}u_1^{3/2}u_3+c_1u_1^{1/2}u_3-c_1^3u_1^{1/2}-c_1u_1^{3/2}-u_3+u_1\right]\end{align}$$
Then we can compute $c_1(x_1)$ and $\text{Cost}_2(x_1)=K_1+K_2+V_1+V_2+V_3$ and tabulate some results and plot some paths.
$$\begin{array}{ccc}x_1&c_1&\text{Cost}_2(x_1)\\
0.5&1.2653039739&2.5451782877\\
0.6&1.2610954013&2.4328788766\\
0.7&1.2576330600&2.3174265702\\
0.8&1.2551457826&2.1983182953\\
0.9&1.2539248955&2.0749566112\\
1.0&1.2543450503&1.9466409733\\
1.1&1.2568937316&1.8125729376\\
1.2&1.2622157699&1.6719005163\\
1.3&1.2711914424&1.5238692094\\
1.4&1.2851258355&1.3682848227\\
1.5&1.3065629649&1.2071067812\\
\end{array}$$

Now we want the contribution to the total cost of this part of the path.
In part 1 that we separated the probability of not having encoutered a wall by $x_1$ into $P_{bs}(x_1)=P_b(x_1)P_s(x_1)$.
Then the probability of encountering any wall between $x_1$ and $x_1+dx_1$ is
$$-\frac{dP_{bs}}{dx_1}dx_1=-P_b\frac{dP_s}{dx_1}dx_1-P_s\frac{dP_b}{dx_1}dx_1\tag{38}$$
This separates the probability into probabilities that the small wall or big wall will be encountered, so the one we want is that for the small wall
$$-P_b\frac{dP_s}{dx_1}dx_1=\left(\frac54-\frac12x_1\right)\left(\frac14\right)dx_1=\frac1{16}(5-2x_1)dx_1\tag{39}$$
Then we multiply by $\text{Cost}_2(x_1)$ and integrate over the domain of the small wall to get
$$\text{Cost}_2=\int_{\frac12}^{\frac32}\text{Cost}_2(x_1)\frac{5-2x_1}{16}dx_1=0.374353894107649\tag{40}$$

Part 3. The path after the big wall but before the small wall.

When starting out on our journey, the probability of finding the small wall between $x_3$ and $x_3+dx_3$ was $P(x_3)dx_3=\frac14dx_3$ because of its uniform distribution.
However, there was only a probability of $P(x_1)=\frac34+\frac14\left(\frac32-x_1\right)=\frac18(9-2x_1)$ of making it to $x=x_1$ without encountering the small wall between $x=\frac12$ and $x=x_1$,
so the probability of finding the small wall between $x_3$ and $x_3+dx_3$ given that we have made it to $x_1$ unscathed is
$$P(x_3|x_1)dx_3=\frac{P(x_3)dx_3}{P(x_1)}=\frac{2dx_3}{9-2x_1}\tag{41}$$
Now that we have the right probability distribution function, we can use it to find the mean distance to point $B$ given a path $y(x)$:
$$\begin{align}\bar s&=\int_{x_2}^{\frac32}\left[1+\sqrt{(x_2-x_1)^2+\frac14}+\int_{x_2}^{x_3}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\right.\tag{42}\\
&\left.+\frac12-y(x_3)+\sqrt{(2-x_3)^2+\frac14}\right]\frac{2dx_3}{9-2x_1}\\
&+\left(1-\int_{x_2}^{\frac32}\frac{2dx_3}{9-2x_1}\right)\left[1+\sqrt{(x_2-x_1)^2+\frac14}\right.\\
&\left.+\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx+\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\right]\end{align}$$
The integral on the first line above computes the contribution to the path length from days when the small wall was present.
The first $2$ terms are the width of the big wall, $1$ mile, and the straight-line path taken from the far edge of the big wall at $(x_1,1)$ down to where we are in danger of bumping the small wall at $(x_2,\frac12)$.
Then there is the length of the curved path up to where the small wall is at $(x_3,y(x_3))$, then the detour we must make around the small wall to $(x_3,\frac12)$ and then the straight line from there to point $B$ at $(2,0)$.
The stuff in the parentheses at the beginning of the second line is the probability that we would make it all the way through to $(\frac32,y\left(\frac32\right))$ without the small wall being there,
$$P_{\text{undisturbed}}=1-\frac{3-2x_2}{9-2x_1}=\frac{6-2x_1+2x_2}{9-2x_1}\tag{43}$$
And then we have the $1$-mile detour around the big wall (recall that we subtracted $y(x_1)$ in part 1), the straight line from $(x_1,1)$ to $(x_2,\frac12)$, the length of the curved path from $(x_2,\frac12)$ to $(\frac32,y\left(\frac32\right))$, and the straight line path from there to point $B$.
We can change the order of integration to simplify the arc length integral.
$$\begin{align}&\frac2{9-2x_1}\int_{x_2}^{\frac32}\int_{x_2}^{x_3}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\,dx_3+\frac{6-2x_1+2x_2}{9-2x_1}\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\tag{44}\\
&=\frac2{9-2x_1}\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}\int_{x}^{\frac32}dx_3\,dx+\frac{6-2x_1+2x_2}{9-2x_1}\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\\
&=\frac1{9-2x_1}\int_{x_2}^{\frac32}(9-2x_1+2x_2-2x)\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\end{align}$$
And that integral that represents the average straight line path from the small wall to point $B$ may be evaluated as
$$\begin{align}&\frac2{9-2x_1}\int_{x_2}^{\frac32}\sqrt{(2-x_3)^2+\frac14}dx_3=\frac2{9-2x_1}\int_{x_3=x_2}^{x_3=\frac32}-\frac14\cosh^2\theta\,d\theta\tag{45}\\
&=\frac1{9-2x_1}\left[(2-x_2)\sqrt{(2-x_2)^2+\frac14}\right.\\
&\left.+\frac14\ln\left(2-x_2+\sqrt{(2-x_2)^2+\frac14}\right)-\frac1{2\sqrt2}-\frac14\ln\left(\frac{1+\sqrt2}2\right)\right]\end{align}$$
The rest of the integral doens't vary in the interval of integration so we can add things up to
$$\begin{align}\bar s&=1+\sqrt{(x_2-x_1)^2+\frac14}+\frac12\left(\frac{3-2x_2}{9-2x_1}\right)+\frac{6-2x_1+2x_2}{9-2x_1}\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\tag{46}\\
&+\frac1{9-2x_1}\left[(2-x_2)\sqrt{(2-x_2)^2+\frac14}\right.\\
&\left.+\frac14\ln\left(2-x_2+\sqrt{(2-x_2)^2+\frac14}\right)-\frac1{2\sqrt2}-\frac14\ln\left(\frac{1+\sqrt2}2\right)\right]\\
&+\frac1{9-2x_1}\int_{x_2}^{\frac32}\left[(9-2x_1+2x_2-2x)\sqrt{1+\left(y^{\prime}(x)\right)^2}-2y(x)\right]dx\end{align}$$
Now that we have the length expressed so simply in term of the path $y(x)$ we will apply a variation $y(x)+\delta y(x)$ and make the dependence on $\delta y(x)$ vanish to first order.
$$\begin{align}&\delta\frac1{9-2x_1}\int_{x_2}^{\frac32}\left[(9-2x_1+2x_2-2x)\sqrt{1+\left(y^{\prime}(x)\right)^2}-2y(x)\right]dx\tag{47}\\
&=\frac1{9-2x_1}\left[(6-2x_1+2x_2)\frac{y^{\prime}\left(\frac32\right)}{\sqrt{1+\left(y^{\prime}\left(\frac32\right)\right)^2}}\delta y\left(\frac32\right)-(9-2x_1)\frac{y^{\prime}(x_2)}{\sqrt{1+\left(y^{\prime}(x_2)\right)^2}}\delta y(x_2)\right]\\
&-\frac1{9-2x_1}\int_{x_2}^{\frac32}\left[\frac d{dx}\left((9-2x_1+2x_2-2x)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right)\delta y(x)+2\delta y(x)\right]dx\end{align}$$
The integrand above must vanish for any small variation $\delta y(x)$ so in due course that will give us a differential equation for the path but we don't know the values of the endpoints $(x_2,\frac12)$ and $(\frac32,y\left(\frac32\right))$ so we have to take into account how the rest of the terms in $\bar s$ vary with the path.
The right endpoint is relatively simple
$$\delta\frac{6-2x_1+2x_2}{9-2x_1}\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}=\frac{6-2x_1+2x_2}{9-2x_1}\frac{y\left(\frac32\right)}{\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}}\delta y\left(\frac32\right)\tag{48}$$
(Neglecting for the moment the dependence on $x_2$) Combining with  the $\delta y\left(\frac32\right)$ term from integration by parts and considering that the variation must be invariant to first order in $\delta y$,
$$\frac{6-2x_1+2x_2}{9-2x_1}\frac{y\left(\frac32\right)}{\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}}+\frac{6-2x_1+2x_2}{9-2x_1}\frac{y^{\prime}\left(\frac32\right)}{\sqrt{1+\left(y^{\prime}\left(\frac32\right)\right)^2}}=0\tag{49}$$
The solution is $$y^{\prime}\left(\frac32\right)=-2y\left(\frac32\right)\tag{50}$$
Since that is the slope of the line from $\left(\frac32,y\left(\frac32\right)\right)$ to $(2,0)$ this demonstrates the continuity of the first derivative at the right endpoint. The left endpoint is messier. As the path $y(x)$ varies it moves the left endpoint around because $y(x_2)=y(x_2+\delta x_2)+\delta y(x_2)=y(x_2)+y^{\prime}(x_2)\delta x_2+\delta y(x_2)=\frac12$ is fixed. Thus
$$\delta x_2=-\frac{\delta y(x_2)}{y^{\prime}(x_2)}\tag{51}$$
So we have to differentiate $\bar s$ with respect to $x_2$, including the lower bound of the integral via the fundamental theorem of calculus, divide by $y^{\prime}(x_2)$, and subtract from the term we got from the lower limit from integration by parts to get
$$\begin{align}0&=-\frac{y^{\prime}(x_2)}{\sqrt{1+\left(y^{\prime}(x_2)\right)^2}}-\frac1{y^{\prime}(x_2)}\left[\frac{x_2-x_1}{\sqrt{(x_2-x_1)^2+\frac14}}-\frac1{9-2x_1}+\frac2{9-2x_1}\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}\right.\\
&\left.-\frac2{9-2x_1}\sqrt{(2-x_2)^2+\frac14}-\frac1{9-2x_1}\left\{(9-2x_1)\sqrt{1+\left(y^{\prime}(x_2)\right)^2}-2y(x_2)\right\}\right.\tag{52}\\
&\left.+\frac2{9-2x_1}\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\right]\end{align}$$
Not pretty but it cleans up to
$$\begin{align}&\frac{x_2-x_1}{\sqrt{(x_2-x_1)^2+\frac14}}-\frac1{\sqrt{1+\left(y^{\prime}(x_2)\right)^2}}\tag{53}\\
&=\frac2{9-2x_1}\left[\sqrt{(2-x_2)^2+\frac14}-\sqrt{\frac14+\left(y\left(\frac32\right)\right)^2}-\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx\right]\end{align}$$
The left hand side can be recognized as the difference between $\sin\theta_i-\sin\theta_r$, so there is refraction at this boundary!
Now we can get back to the differential equation for the path $y(x)$. We had
$$\frac d{dx}\left((9-2x_1+2x_2-2x)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}\right)=-2\tag{54}$$
We can integrate to
$$(9-2x_1+2x_2-2x)\frac{y^{\prime}(x)}{\sqrt{1+\left(y^{\prime}(x)\right)^2}}=9-2x_1+2x_2-2x-2c_1^2\tag{55}$$
Solving for $y^{\prime}(x)$,
$$y^{\prime}(x)=\frac{9-2x_1+2x_2-2x-2c_1^2}{2c_1\sqrt{9-2x_1+2x_2-2x-c_1^2}}=\frac{dy}{dx}=-2\frac{dy}{du}=\frac{u-c_1^2}{2c_1u^{1/2}}\tag{56}$$
Where we have made the substitution $u=9-2x_1+2x_2-2x-c_1^2$, $u_2=u(x_2)=9-2x_1-c_1^2$, and $u_4=u\left(\frac32\right)=6-2x_1+2x_2-c_1^2$. We can integrate this to get
$$y=\frac1{2c_1}\left(-\frac13u^{3/2}+c_1^2u^{1/2}\right)+c_2\tag{57}$$
We know that
$$y(x_2)=\frac12=\frac1{2c_1}\left(-\frac13u_2^{3/2}+c_1^2u_2^{1/2}\right)+c_2\tag{58}$$
So we have our path
$$y=\frac1{2c_1}\left(-\frac13u^{3/2}+c_1^2u^{1/2}+\frac13u_2^{3/2}-c_1^2u_2^{1/2}\right)+\frac12\tag{59}$$
To solve for $c_1$ and $x_2$ first we have to evaluate that integral
$$\begin{align}\int_{x_2}^{\frac32}\sqrt{1+\left(y^{\prime}(x)\right)^2}dx&=\int_{x_2}^{\frac32}\frac1{2c_1}\left[u^{1/2}+c_1^2u^{-1/2}\right]\left(\frac{-du}{2}\right)\tag{60}\\
&=\frac1{2c_1}\left[\frac13u_2^{3/2}+c_1^2u_2^{1/2}-\frac13u_4^{3/2}-c_1^2u_4^{1/2}\right]\end{align}$$
So now we can put everything in the equations for continuity of the first derivative at the right endpoint and our version of Snell's law at the left endpoint and solve for $c_1$ and $x_2$. Then we have paths plotted in the large and in detail.

Even in the closeup it's pretty much impossible to see the refraction at $y=\frac12$.
We can then evaluate the integral we optimized with such difficulty and find the cost of each path. Here is a table.
$$\begin{array}{ccccc}x_1&c_1&x_2&y\left(\frac32\right)&\text{Cost}_3(x_1)\\
0.5&2.4687532134&1.3131625215&0.3733857985&2.8090608793\\
0.6&2.4622847219&1.3501274970&0.3917097193&2.7249375529\\
0.7&2.4566369485&1.3874433837&0.4127942541&2.6429339266\\
0.8&2.4518060881&1.4249923978&0.4372691891&2.5634550764\\
0.9&2.4477477457&1.4625992592&0.4659645229&2.4870044450\\
1.0&2.4443554844&1.5000000000&0.5000000000&2.4142135624\\
1.1&\unicode{x2014}&\unicode{x2014}&\unicode{x2014}&2.3453624047\\
1.2&\unicode{x2014}&\unicode{x2014}&\unicode{x2014}&2.2806248475\\
1.3&\unicode{x2014}&\unicode{x2014}&\unicode{x2014}&2.2206555616\\
1.4&\unicode{x2014}&\unicode{x2014}&\unicode{x2014}&2.1661903790\\
1.5&\unicode{x2014}&\unicode{x2014}&\unicode{x2014}&2.1180339887\\
\end{array}$$
If $1\le x_1\le\frac32$, there was no interference from the small wall because the straight line path to $B$ went around $\left(\frac32,\frac12\right)$.
To get the cost we multiply by the probability of encountering the big wall first at $x_1$, which from our analysis of parts 1 and 2 is
$$-P_s\frac{dP_b}{dx_1}dx_1=\left(\frac98-\frac14x_1\right)\left(\frac12\right)dx_1=\frac1{16}(9-2x_1)dx_1\tag{61}$$
And integrate over the domain of the big wall to get
$$\begin{align}\text{Cost}_3&=\int_{\frac12}^1\text{Cost}_3(x_1)\frac{9-2x_1}{16}dx_1+\int_1^{\frac32}\left[1+\sqrt{(2-x_1)^2+1}\right]\frac{9-2x_1}{16}dx_1\tag{62}\\
&=0.611754747093525+0.458894932339652=1.070649679433177\end{align}$$
And we can add up the contributions to the total cost from each of the parts to get
$$\begin{align}\text{Cost}&=\text{Cost}_1+\text{Cost}_2+\text{Cost}_3\\ \tag{63}
&=1.250510547155483+0.374353894107649+1.070649679433177\\
&=2.695514120696309\end{align}$$

Since I am not very mathematically inclined, I can only do computer simulation to first try simple paths, then slowly try more sophisticated paths.  My computer simulation will just pick $2$ random positions for the walls if they are present based on their probabilities.  There are $5$ main cases to handle for this problem... $1$) no wall, $2$) small wall only, $3$) large wall only, $4$) small wall before large wall, $5$) large wall before small wall.  I will be doing a simulation of this breaking it into these $5$ cases.

Also, if you attempt to always walk directly at B (except when you are walking around a wall) and both walls are present, I calculated (by hand) that the worst case with the small wall close to $0.5$ mile marker and large wall close to $1.5$ mile marker causes a walk distance of about $4.1$ miles.  (someone please check this).  The $5$ walks segments lengths (in order) are: $.5$, $.25$, $1.275$, $.958$, $1.118$ for a total of $4.101$ miles (more than double the direct path when no walls are present).

Also worth mentioning is the "pessimistic path" which circumvents the walls in all cases by using a slope of $2$ in the first half mile, holding y=$1$ for the middle mile, the dropping back down to B with a slope of $-2$.  This path is about $3.24$ miles.

Slightly better than this "pessimistic path" might be to instead hold y=$0.99$ instead of y=$1$, so that if the large wall is encountered, we will know where it is and can then adjust our path more directly towards B.

Another possible strategy is to "play the probabilities".  It would involve  figuring out what is the chance of the large wall showing up first, and then aiming up that percentage of its uplength.  Problem is you don't know where it will be until you hit it so maybe pick the middle spot of mile marker $1$ initially and see what happens.  That is, from A, immediately slope up to (1, P(large wall encountered first)).  Both units being in miles.  This will almost certainly not be optimal but is a decent strategy for simulation cuz it is simple and it considers the larger wall.

Another "simple" strategy is to figure out a good slope for the extremes (large wall at mile $0.51$ and large wall at mile $1.49$ and pick some intermediate slope.  I doubt that would go much above y=$0.5$.

If someone has a possible solution to a minimal walk path but doesn't want to type in all of their solution cuz it is time consuming, just enter a table of x,y values from x = $0$ to $2$ in $0.1$ steps.

$UPDATE~~1$ - I wrote the simulation program for the simple strategy that always tries to walk directly towards B but still having to go around any walls.  I broke this up into $4$ subcases as follows:

Case $1$: Small wall only. I get an average walk distance of $2.6262$.
Case $2$: Large wall only. I get an average walk distance of $3.4293$.
Case $3$: Both walls.  I get an average walk distance of $3.5181$.
Case $4$: no walls. Average walk distance is $2.0000$.

Remember cases $1$ and $3$ each only happen $12.5$% of the time, while cases $2$ and $4$ both each happen $37.5$% of the time , so the weighted average yields an average walk length of $2.804$ miles which is consistent with my other "Monte Carlo" type simulation.  This one busts up the middle mile into $999$ equidistant pieces so I am simulating possible wall positions every $5.28$ feet.  The walls in my simulation can be at mile markers $.501$, $.502$... $1.498$, $1.499$ but never at $0.5$ and never at $1.5$.

Runtime, (using an interpreted language), is about $1.5$ seconds.

$UPDATE~~2$ - My first effort to beat the simple always try to aim at B strategy worked but was kinda slow on my computer.  I just picked $3$ variable slopes, one for each half mile segment.  The $4$th slope is a given it just aims back down to B.  I gave the $3$ slopes "liberty" like from $0.1$ to $1.0$ for the first $2$.  I suspected the optimal shape would be a curve so I allowed the program to slope back down for the $3$rd slope (but still investigated some upslopes too for that segment).  When I got the general shape of the curve via the $3$ "ballpark" slopes (not yet optimal), then I tightened the range on the slopes but with more precision.  This seemed to almost work but since it was a Monte Carlo type simulation with random values, problem was I was not getting the same results each run.  I could somehow change the simulation to be more like my direct at B simulation where I walk each subcase with all possible wall positions and then just assign a weight to those cases then come up with an overall weighted average which works, but  requires some accurate programming.  This problem is pretty impressive in that shortcuts will get you close but then someone else more sophisticated with better tools can come along and get a better answer.  It is also impressive in that the math and simulation required is advanced, yet conceptually the problem is easy to understand (for example a child could likely understand the problem but not likely solve it).

$UPDATE~~3$ - I have an idea I will be pursuing. For simulation,  the optimal solution is somewhat elusive cuz it would require walking virtually all possible paths (within reason) and that takes too much computational time.  If however, I can just pick a reasonable number of slopes such as $8$ of them as I did to well approximate the optimal curve from the previous single wall problem,  perhaps I can get very close to optimal.

So far all I have are $3$ slopes with the $4$th slope being automatic as it will always go from mile marker $1.5$ directly to B since no wall will ever be there.  Here is what I have so far:

Segment $1$: From $0.0$ to $0.5$ : slope $.49$
Segment $2$: From $0.5$ to $1.0$ : slope $.25$
Segment $3$: From $1.0$ to $1.5$ : slope $-.22$
Segment $4$: From $1.5$ to $2.0$ : slope $-.52$

Average walk distance is $2.7089$ miles. ($1,000,000$ random wall walks).

Perhaps next what I can do is pick some midslope between segment $1$ and $2$ for example and see if that improves things any.  For example, keep $.49$ slope the first half mile but instead of a fixed slope of $.25$ the next half mile, perhaps try $.35$ and $.15$ each a $1/4$ mile.  Those have the same average slope but better approximates a curve.  When I did this I got a slight improvement to $2.7065$ (also $1,000,000$ random wall walks).

$UPDATE~~4$ - Here is the graph of the best walk path I have so far.  The axis are y values on the left (miles above the centerline), and across the bottom are the x values in $1/4$ mile increments.  Notice the near symmetry of the graph.  I get about $2.704$ miles average walk length for this.  The length of the rough curve itself is about $2.152$ miles.

$UPDATE~~5$ - A function, y=f(x) which creates a symmetric curve and is fairly simple is y = $-0.0257143x^2 + 0.205714x - 0.05$.  This is using units of $1/4$ mile for the x axis and not including the starting point A and stopping point B which we know are at y=$0$.  For the x values we go from $1$ to $7$ which represents $1/4$ to $7/4$ of a mile from A along the x axis.  The y points we hit are $.13, .26, .33, .37, .33, .26, .13$ and of course $0$ at A and B.  This function generates a smoother curve of the approximated curve shown above.

Actually something "suspicious" is going on here.  This answer seems too simple yet it works...  Notice that on the graph, the middle mile (from x values $2$ to $6$ which represents mile markers $2/4$ to $6/4$) go roughly from y positions $.25$ at the corners to $.375$ in the middle.  $.25$ is half the height of the small wall and $.375$ is half the average of the $2$ wall heights.  If you just pick those y values and then connect them with a smooth curve, it should be near optimal!  How is that for simple?   Someone could have actually guessed this solution and be very close to optimal with virtually no math! (they just have to know how to take the average of $2$ numbers) and connect dots.  I think probably a $7$ year old can do that.

A super simple approximation to this curve would be $0.5$ slope the first half mile, then $0.25$ slope the next half mile, then a mirror image on the other side of mile marker $1$ (symmetrically going back down to B).  It seems ironic that a near optimal solution to a very complex problem appears to be super simple (once I did some simulation and got the general shape of the curve).  I wonder if this is a coincidence or if it is somehow related to the height of the $2$ walls.  I suppose I could change the height of the $2$ walls in my simulation program and see what I get if the relationship holds.  It may also be related to the probabilities of each wall.


show that every continuous real-valued function defined on $S_{\mathbb{\Omega}}$ is eventually constant show that every continuous real-valued function defined on $S_{\mathbb{\Omega}}$ is eventually constant.Where $S_{\mathbb{\Omega}}$ denote the first uncountable ordinal.

There is a hint that for each $\epsilon$,there is an element $\alpha$ of $S_{\mathbb{\Omega}}$  such that $|f(\alpha)-f(\beta)|<\epsilon$ for all $\beta>\alpha$. However, I couldn't figure out how to prove this statement.

This result is quite difficult if you don’t know the most basic form of the pressing-down lemma:

Lemma. If $f:S_\Omega\to S_\Omega$ is a pressing-down function, meaning that $f(\alpha)<\alpha$ for each $\alpha\in S_\Omega\setminus\{0\}$, then there is an unbounded $A\subseteq S_\Omega$ on which the function $f$ is constant.

You can find a proof here, immediately followed by a proof of the result that you want. Before reading those proofs, however, you might like to try using the pressing-down lemma to prove your result. Here’s a hint to get you started: if $f:S_\Omega\to\Bbb R$ is continuous, then for each $n\in\Bbb N$ and $\alpha\in S_\Omega\setminus\{0\}$ there is a $\varphi_n(\alpha)<\alpha$ such that $|f(\beta)-f(\alpha)|<2^{-n}$ whenever $\varphi_n(\alpha)<\beta\le\alpha$. For each $n\in\Bbb N$, $\varphi_n$ is a pressing-down function.
(The full form of the lemma involves the notion of a stationary set, a complication that you don’t need here; if you’re interested, you can find it here.)

Hint: Here the ordinal $\Omega$ is identified with the set $S_\Omega$ of ordinals $\le \Omega$, in the order topology.
What does a neighbourhood of $\Omega$ look like?  What does continuity of $f$ at $\Omega$ say?


Markov process which is not martingale I have seen the examples of a discrete time martingale that is not a Markov Process. Can you construct me an example of discrete time Markov Process that is not a martingale?

In order for a discrete time Markov process to be a martingale the transition probabilities would have to lead to a "fair" probability distribution in the long run. So just take a two state Markov chain where $P(0|0) = 3/4$ and $P(1|0) = 1/4$ and $P(0|1) = P(1|1) = 1/2$ for the transition probabilities. This will not be a martingale, as can be easily verified by computing conditional expectations.

The process $X_{t}:=t+B_{t}$ where $B_{t}$ is BM is Markov but not Martingale.

Not Martingale b/c

$E[X_{t}|F_{s}]=t+B_{s}=t-s+X_{s}$

and Markov b/c

$E[e^{u(t+s+B_{t+s})}|F_{t}]=e^{u(t+s+B_{t})}E[e^{u(B_{t+s}-B_{t})}|F_{t}]=E[e^{u(t+s+B_{t+s})}|B_{t}].$