Formula to determine the number of possible dice combination to reach certain value I am having a headache to this simple problem.

The goal is to find the number of total combination to reach the target value.

For example:

target = 5
number of combination is 7

5
4, 1
3, 2
3, 1, 1
2, 2, 1
2, 1, 1, 1
1, 1, 1, 1, 1

This helped me for the logic:

en.wikipedia.org/wiki/Partition_(number_theory)

I am a programmer and I needed a function to determine the partition

function partition(goal, maxNumber){

    if (maxNumber==0)
        return 0;
    if (goal==0)
        return 1;
    if (goal<0)
        return 0;

    return partition(goal,maxNumber-1)
    + partition(goal-maxNumber,maxNumber);
}

var goal = 700;
var maxNumber = 6; //because dice

document.write(partition(goal,maxNumber));


Homomorphism $R$-linear between $\Bbb {Z}$ and $\Bbb{Z_n}$ I was wondering how many $R$-linear homomorphisms between modules there were between $\Bbb Z$ and $\Bbb{Z_n}$. I think that the answer is "it depends on the ring" even if the exercise says "only $s(k) = 0$ for each $k\in \Bbb Z$". However, if I define $f:\Bbb Z \to \Bbb Z_n$ as $f(k) = [k]$ and $R=\Bbb Z$ with the standard $\Bbb Z$ product as extern product, this sounds like a $R$-linear homomorphism.

So the answer would be: If we do not specify the ring, then we can only assure that the zero homomorphism exists. In other cases, it depends on the ring.

Is that correct? Could anybody please provide an example of ring in which only the null homomorphism exists?

$R=\mathbb{Z}$, since $\mathbb{Z}_n$ has torsion and $\mathbb{Z}$ doesn't, only the null homomorphism exists.


How can I simplify $\sqrt{3^2 + 3^2\tan^2\theta}$? $$\sqrt{3^2 + 3^2\tan^2\theta}$$

$$ = (3)(3\tan\theta) = 9\tan\theta $$

I've simplified it like this but I'm not sure if that's correct.

$$\begin{align} \sqrt{3^2 + 3^2\tan^2\theta} &= \sqrt{9(1+\tan^2 \theta)} \\
& = \sqrt 9 \cdot \sqrt {1 + \tan^2 \theta} \\
& = 3\sqrt{\sec^2\theta} \\
&= 3|\sec \theta| \end{align}$$


Mean Value Theorem in two intervals Suppose that $a<b<c$ for real numbers $a, b, c$. Suppose that $f(x)$ is continuous on $[a, c]$ and differentiable on $(a, c)$. Then prove that there exists $a<\alpha<\beta<c$ such that
$$\frac{f(b)-f(a)}{b-a}=f'(\alpha), \frac{f(c)-f(a)}{c-a}=f'(\beta)$$

I understand that there exists $\alpha$, $\beta$, but how would I prove that $\alpha<\beta$?
Do I have to divide into cases? Can anyone give me any hints?

Define $S(x, y) = \frac {f(y) - f(x)} {y - x}$.

We have $\alpha \in (a, b), \gamma \in (b, c)$ such that $f'(\alpha) = S(a, b)$ and $f'(\gamma) = S(b, c)$.

$S(a, c)$ lies between $S(a, b)$ and $S(b, c)$, so the intermediate value property for derivatives gives us $\beta \in (\alpha, \gamma)$ such that $f'(\beta) = S(a, c)$.

Is your function convex or concave?
For convex function it's proved easily using the second order derivative.
But for concave,I don't know


Clarification needed on finding last two digits of $9^{9^9}$ I stumbled across this problem here. In the answer given by the user Gone, I don't see how he makes use of the second line in the last line. Could someone explain why he calculated $9^{10}$ via binomial theorem and where it is applied?

The idea is that he wanted to calculate a value of $N$ such that $9^N \equiv 1 \pmod{100}$. (He determined that $N = 10$ would work.)

Once we found such an $N$, in order to calculate $9^M \pmod{100}$, we merely need to look at $M \pmod{N}$, and then we know that

$9 ^ M \equiv 9^{M \pmod{N}} \pmod{100}$.

In particular, this gives us that

$$9^{9^9} \equiv 9^{ 9 ^ 9 \pmod{10} } \pmod{100}.$$

As to how it is proven, you can read the answer by anon (to the original question).

The binomial theorem states $$(a + b)^n = \sum_{i = 0}^n \binom{n}{i} a^i b^{n-i}$$
Gone made use of the fact that $ \binom{n}{i}$ is an integer, along with the fact that $10|10^k$ for any $k \geq 1$.  So we see that $10| \binom{10}{i}10^i (-1)^{10-i}$ for any $i \geq 1$, and we may reduce the expression

$$9 ^ {10} = (10 - 1)^{10} = \sum_{i = 0}^{10} \binom{10}{i}10^i (-1)^{10-i} = 1 + 10 \cdot 10 \cdot(-1) + 90 \cdot 10^2 + \ldots$$

modulo 10 to see
$$9^{10} = 1 + 0 + 0 + \ldots$$

Although, we have an even simpler way... In the same vein,

$$9^{10} = (10-1)^{10} \equiv -1^{10} \equiv 1$$

Without having to do any binomial work.


How to solve this integral $\int \frac 1{\sqrt { \cos x \sin^3 x }} \mathrm dx $ Question :  $$\int \frac 1{\sqrt { \cos x \sin^3 x }} \mathrm dx $$

I don’t know where to start. I had tried many methods but they didn’t work.

Can anyone help me solving this ?
Thank you

HINT: substitute $\text{u}:=\tan\left(x\right)$. Then the integrand will change to $\frac{1}{\text{u}^\frac{3}{2}}$.

$\int \frac 1{\sqrt { \cos x \sin^3 x }} \mathrm dx$

multiply by $\sec^{2}x$
then you get

$\int \frac{\sec^{2}x}{\sqrt{\tan^{3}x}} \mathrm dx$

now let  $\tan x=t$

One gets $\int\frac{dt}{\sqrt{t^{3}}}$

Now I think u can do  it


Probability that someone has the disease The percentage of people that have a disease A is $0,01$.
  We apply twice a test for that disease, each of which give the correct answer with probability $0,95$.
  What is the probability that someone has that disease if at least one test is positive and what is the probability if both tests are positive?

I have done the following:

We have that $$P(\text{at least one positive})=1-P(\text{no positive})=1-P(NN)$$ where N: "negative".

Let D:"has the disease".

Then we have that $$P(NN)=P(NN\cap D)+P(NN\cap D^C)=P(NN\mid D)\cdot P(D)+P(NN\mid D^C)\cdot P(D^C)$$ We have that $P(D)=0,01$ and $P(D^C)=0,99$.

Does it hold that $P(NN\mid D)=P(N\mid D)^2$ and $P(NN\mid D^C)=P(N\mid D^C)^2$ ?

If yes, does it hold that $P(N\mid D)=0,05$ and $P(N\mid D^C)=0,95$ ?

Suppose a population of 100000.  0,01 of them, 1000, have the disease and 99000 do not.  Of the 1000 who have the disease 95%, 950, test positive and 50 test negative.

Testing the positives again, 95% of 950, 902.5 test positive again and 5%, 47.5 test negative. Testing the negatives again 95% of 50, 47.5, test negative again and 5% of 50, 2.5, test positive.

That is, 902.5 test positive twice, 50 test negative twice, and 47.5+ 2.5= 50, test positive once, negative once.

Of the 99000 who do not have the disease 5%, 4950, test positive and 95%, 94050, test negative.

Testing the positives again, 5% of 4950, 247.5, test positive again and 95% of 4950, 4702.5, test negative on the second test. Testing the negatives again, 5% of 94050, 4702.5, test positive and 95% of 94050, 89347.5, test negative again.

That is, of the 99000 who do not have the disease, 247.5 test positive twice,89347.5 test negative twice, and 4702.5+ 4702.5= 9405 test positive once, negative once.

Of the 902.5+ 247.5+ 9405+ 50= 10605 who tested positive [I]at least once, 902.5+ 50= 952.5 actually have the disease.  If a person test positive at least once, the probability they have the disease is 952.5/10605= 0.085 or 8.5%.

Of the 4950+ 247.5= 5197.5 who tested positive twice, 902.5 actually have the disease.  If a person tested positive twice, the probability they actually have the disease is 902.5/5197.5= 0.173 or 17.3%.


What is the term for a component of a quantity's units? Imagine a company pays for a service for each employee.  The service costs $10/employee/month.  Written another way, the cost is "10 dollars per employee per month."

My question focuses on 10 dollars per employee per month and finding a name for some of the parts or pieces of this phrase.  I've been calling 10 the value and dollars per employee per month the unit (or units).  If we further examine the units, dollar seems to hold different meaning than employee and month.

What term can I use to describe dollar and what term can I use to describe employee or month?

So far I've come up with "unit rate" (but that ignores that there may be an additional rate "month") and "dimension".

This is more of a scientific question than linguistic, but "dollars per employee per month" is a perfectly good unit. It is not fundamentally different from "miles per hour" or "metres per second squared" (a common unit of acceleration). Another similar usage of unit might be "dollars per person" or "dollars per capita", which are commonly used to measure relative GDP, for example.

"Dimension" has a different meaning in the calculation of units and refers to different types of units - for example Length, Time or Money (Dimension 'Length' for example has units such as metre, inch or furlong)

If you want to differentiate between units 'above' and those 'below' the line, try the terminology of fractions - i.e. 'numerator' and 'denominator'.

Dollars, employees and months are all units.  Dollars per employee per month is also a unit.  You can distinguish between these by calling "dollars" a base unit or a fundamental unit.  Dollars per employee per month is a composite unit or a derived unit.

Turning dollars per employee per month into, for instance, dollars per team per workday is performing a base unit conversion, just the same as converting miles per hour into meters per second is a base unit conversion.  The metric remains the same (money over staffing by time, or distance over time) but the value changes as the units change.

There is a difference between base and fundamental.  The SI standard establishes one fundamental unit for each base.  Any unit of time, for instance, is a base unit -- centuries, years, months, days, whatever.  Time cannot be expressed as a composite of other units.  The fundamental unit of time in SI is the second.  If you're not certain which one unit of a base metric counts as the fundamental unit, just use the phrases "base unit" and "composite unit".

It's true that base units measure single dimensions.  Unfortunately, the word "dimension" can be confusing.  Time counts as a dimension.  So do money and staffing (although those aren't dimensions in physics).  It's far simpler to speak of units and metrics, and leave the confusion of dimensions unmentioned.


How to find a basis for the kernel and image of a linear transformation matrix Let $$A=
        \begin{bmatrix}
        0 & 0 & 6 & -18 \\
        0 & 0 & -1 & 3 \\
        0 & 0 & -2 & 6 \\
        \end{bmatrix}
$$
  Find a basis for the kernel and image of the linear transformation $T$ defined by $T(x) =Ax$.

My question is how do you handle the first 2 columns of A which are all zero's?  Does that mean the top 2 values of the basis of the kernel are variables? both zero?  The methods I know for calculating the basis for the kernel and image of a transformation matrix are not producing the correct answers in WebWork.

By elimination, you will end up with
$$
        \begin{bmatrix}
        0 & 0 & 0 & 0 \\
        0 & 0 & -1 & 3 \\
        0 & 0 & 0 & 0 \\
        \end{bmatrix}
$$
which gives you the dimension of the image of $T$ and the kernel of $T$.

Now, you can read from the matrix a basis for the image of $T$. On the other hand
$$
-x_3+3x_4=0
$$
tells you how to find a basis for the kernel of $T$.

The kernel basis is:

$$ \left[
    \begin{array}{cc}
      0&0&1&1/3\\
    \end{array}
\right]^T, \left[
    \begin{array}{cc}
      1&0&0&0\\
    \end{array}
\right]^T, \left[
    \begin{array}{cc}
      0&1&0&0\\
    \end{array}
\right]^T$$

The image basis is:

$$\left[
    \begin{array}{cc}
      6&-1&-2\\
    \end{array}
\right]^T$$


Probability of being picked more than once in a simple random sample. A school has $500$ girls and $500$ boys. A simple random sample is obtained by selecting names from a box (with replacement) to a get a sample of $10$.

Find the probability of someone being picked more than once.

My working is:
\begin{align}
P(\text{being picked more than once}) &= 1 - P(\text{not being picked}) - P(\text{being picked exactly once})\\
&=1 - \left(\frac{999}{1000}\right)^{10} - 10\left(\frac{1}{1000}\right)\left(\frac{999}{1000}\right)^9 = 0.00004476
\end{align}
However, this is not correct. Any ideas?

This is a variation on the Birthday Problem, with names instead of birthdays and drawings from the hat instead of people in a room.

The answer is $1$ minus the probability that all ten names are different,
which is the product of the probabilities that the $n$th name is different from all previous names, given that all previous names were unique.
The probability for the $n$th name is $\frac{1000 + 1 - n}{1000},$ so the answer is

$$ \frac{1000}{1000} \cdot \frac{999}{1000}
\cdot \frac{998}{1000} \cdot \frac{997}{1000}
\cdot \frac{996}{1000} \cdot \frac{995}{1000}
\cdot \frac{994}{1000} \cdot \frac{993}{1000}
\cdot \frac{992}{1000} \cdot \frac{991}{1000}
= \frac{1000!}{1000^{10}\,990!}.$$

Probability of anybody being picked more than once:

$$
\frac{\binom{10^{3}}{10}\times 10!}{\left(10^{3}\right)^{10}}
$$

Probability of a particular person being picked more than once:

$$
1-\frac{\left(10^{3}-1\right)^{10}+10\times\left(10^{3}-1\right)^{9}}{\left(10^{3}-1\right)^{10}}
$$


Best Method for Factoring this Expression I'm wondering if anyone has an opinion on the best way of factoring the following expression. As one can see it is quite complicated.

$$(15x^2)(x^3+{4})^{4}(1-2x^{2})^{3}+(12x)(x^{3}+4)^{5}(1-2x^{2})^{2}\over (1-2x^{2})^{6}$$

Any help is of course extremely appreciated

There isn't really a best way, but here's how I would do it (sorry in advance for the messy work, I'm bad at formatting my answers :/).

First, analyze the entire expression and look for like terms.
$(x^3+4)$,  $x$, and  $(1-2x^2)$  are like terms.
Now, try to factor these like terms out (to the highest possible exponent).

$$ \frac{(x^3+4)^4⋅(1−2x^2)^2⋅x⋅[5⋅3x(1−2x^2)−(x^3+4)⋅3⋅(−4)]}{(1−2x^2)^6}$$

Notice that the denominator, $(1−2x^2)^6$, has the same term as the top, $(1−2x^2)^2$
Thus, you can divide the top term by the bottom term, cancelling the top term to get:

$$ =\frac{(x^3+4)^4⋅x⋅[5⋅3(1−2x^2)−(x^3+4)⋅3⋅(−4)]}{(1−2x^2)^4}$$

Now, simplifying some of the coefficients to get:

$$ =\frac{(x^3+4)^4⋅x⋅[15x(1−2x^2)−(x^3+4)⋅(-12)]}{(1−2x^2)^4}$$

You can expand the terms inside of the brackets to combine the terms inside and further simplify the expression.

$$=\frac{(x^3+4)^4⋅x⋅[15x−30x^3+12x^3+48]}{(1−2x^2)^4}\\
 =\frac{(x^3+4)^4⋅x⋅[−18x^3+15x+48]}{(1−2x^2)^4}$$

Notice that the terms inside the brackets all share a common factor: 3. Factor 3 out and you get:

$$=\frac{3x(x^3+4)^4(−6x^3+5x+16)}{(1−2x^2)^4}$$

And this is your final answer. You can possibly factor out a negative from $(−6x^3+5x+16)$ if you wanted to, but it's not necessary.

I'm not really sure if you're more interested in the final result, or on how to achieve it. Anyway, Mathematica factors it as
\begin{equation}
-\frac{3x(4+x^3)^4(-16-5x+6x^3)}{(-1+2x^2)^4}.
\end{equation}
Apologies if you were after something with more detail (and you could of course verify this result yourself using WolframAlpha).


Finding $\int_{0}^{2\pi} \frac {(1+2\cos\theta)^n\cos(n\theta)}{3+2\cos\theta} \operatorname{d}\theta$ If $n$ is a positive integer find
$$
\int_{0}^{2\pi} \frac {(1+2\cos\theta)^n\cos(n\theta)}{3+2\cos\theta} \operatorname{d}\theta
$$

I know that I have to use contour integral with a circle of radius 1 centered at the origin, but I am having trouble converting the integral into the form $\int_{|z|}$

$$\int_{|z| = 1} \frac{(1+z+1/z)^n\cos(n\theta)}{3+(z+1/z)} \frac{1}{iz} \operatorname{d}z$$

I cant seem to find a way to expand $\cos(n\theta)$ into a function of $z$.

From the above equation, I can get that the poles of is at $z = -1.5 \pm \frac{\sqrt{5}}{2}$ and only the residual of $z = -1.5 + \frac{\sqrt{5}}{2}$ should be included.

Note that

$$\cos{n \theta} = \frac12 \left ( z^n + z^{-n}\right )$$

so upon your substitution, you get

$$-\frac{i}{2} \oint_{|z|=1} \frac{dz}{z} \frac{(1+z+z^{-1})^n (z^n+z^{-n})}{3+z+z^{-1}}$$

This can be rearranged to get

$$-\frac{i}{2} \oint_{|z|=1}  \frac{dz}{z^{2 n}} \frac{(1+z+z^2)^n (1+z^{2 n})}{1+3 z+z^2} $$

There are poles where $z^2+3 z+1=0$, or

$$z_{\pm} = \frac{-3\pm \sqrt{5}}{2}$$

i.e., $z_- = -\phi^2$, $z_+=-1/\phi^2$, where $\phi=(\sqrt{5}+1)/2$.  Thus only $z_+$ is within the unit circle and contributes to the integral.

For the pole at $z=0$, it may be easiest to find the coefficient of $z^{2 n-1}$ in the Maclurin expansion of

$$\frac{(1+z+z^2)^n (1+z^{2 n})}{1+3 z+z^2} $$

Not an easy task.  Good luck.


Sample complexity of quantile approximation (I am re-posting from cross-validated where this questions did not get any answers)
I was looking into the sample complexity of $\epsilon$-approximate quantiles. The problem is defined as when having distribution and looking for quantile $\phi$, one has to answer with an element which has quantile between $\phi - \epsilon$ and $\phi + \epsilon$.
I have found the paper "Approximate Aggregation for Tracking Quantilesin Wireless Sensor Networks" which claims that "The work in [27] shows that a random sample of size $Θ(1/\epsilon^2 )$ is needed to be drawn from a dataset to compute $\epsilon$-approximate quantiles with a constant probability". However, the referenced paper [27] is the paper "ON THE UNIFORM CONVERGENCE OF RELATIVE FREQUENCIES OF EVENTS TO THEIR PROBABILITIES". Not only does this paper not claim anything about quantile estimation but it does not seem to talk about lower-bounds.
Is that a mistake in the paper I found or am I missing something? Or is there some other way to easily see that the complexity is $\Omega(1/\epsilon^2)$?

Take a specific example. Suppose your distribution is
$\mathsf{Norm}(\mu=100, \sigma=15).$ You want to take
a sufficiently large sample from this distribution to
get at least one observation between the 74th and 76th
percentiles. That is between quantiles $.75 \pm .01.$
With $\epsilon = .01$ we might have to take as many
as $1/\epsilon^2 = 10\,000$ observations.
Specifically, we need to have at least one observation in
the interval $(109.6502, 110.5945).$ [Computations and simulations in R.]
q = qnorm(c(.74,.76), 100, 15); q
[1] 109.6502 110.5945

Because the 75th percentile is in a fairly dense part of this
distribution, I'll see if I can get by, sampling only $1000.$
set.seed(628)
x = rnorm(1000, 100, 15)
summary(x)
    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  50.15   90.36   99.69  100.09  110.35  150.90

Observations matching our specifications are found as follows:
x[x>q[1] & x<q[2]]
 [1] 110.1191 109.9076 110.0786 110.1584 109.8379 109.9022 110.2740
 [8] 110.3990 109.8314 110.4582 110.1659 109.9493 109.8731 109.9490
[15] 110.3925 109.9099 110.1190 110.4647 109.8851 110.3344

From the summary we already know that the upper quartile (75th percentile, quantile 0.75) is 110.35. If 110.35 isn't exactly one of the observations, there are
likely to be a couple of observations close by.
If I had been looking for the $98$th percentile $\pm 1,$ where observations
are less dense, maybe 1000 observations wouldn't have been enough.
Notes: (a) I'm not exactly sure about some of your notation. I guessed that
$\Theta(1/\epsilon^2)$ might have been big-O notation. (b) It may have been
a mistake in your posting here and on our sister 'cross-validated' site
to mention a reference that you're not sure is really relevant.  (c) Anyway, I hope some parts of my Answer are near enough to what you need that
you can figure out any remaining details.


Maximum board position in 2048 game A game called 2048 is making rounds on social media. I am trying to determine the maximum score attainable for this game.  Let's assume WLOG that only 2s are returned (if 4s are possible the max score is doubled).

First, I'll relax some of the rules to create a game, $\mathcal{G}$, that can achieve a score at least as high as the original, 2048 game.  A run $R$  of $\mathcal{G}_n$ consists of a sequence of moves $m_1,\ldots,m_k$ which manipulate a multiset, $\mathcal{S}$ of maximum size n.  Each $m_i$ is either:

a put $p$, which inserts a 2 into $\mathcal{S}$, or
a merge, $\alpha_i$, which replaces two $2^i$ elements from $\mathcal{S}$ with a single $2^{i+1}$ elt.

I allow sequential moves of the same type because 2048 allows multiple merges or no-merge turns.  The score of a position is the sum of $\mathcal{S}$.

What is the maximum score possible on a game of order n?

Note: The final position must have only unique values, else a merge and put would be possible in increase score.

I claim it is $\sum_{i=1}^{n} 2^i$, but couldn't come up with any good induction arguments.  It's pretty easy to prove that an element $2^k$ is producible in a game $\mathcal{G}_k$, but proving an upper bound for production got a bit hairy, and also doesn't cover the full space.

An optimum board just before the last number is played on 4x4:

$$\begin{array} {|c|c|c|c|}
\hline
& 256 & 512 & 65536 \\ \hline
4  & 128 & 1024 & 32768 \\ \hline
8  & 64 & 2048 & 16384 \\ \hline
16 & 32 & 4096 & 8192 \\ \hline
\end{array}$$

... and then a 4 luckily falls into the empty square giving the largest number that can be created is $2^{17} = 131072$ .  The fact is, in order to make a number $2^n$, then you have to have all the numbers $[4 \dots 2^{n-1}]$ already present on the board.

The largest number that can be made is then $2^{\left(n^2 + 1\right)}$, or if you assume that no 4s will fall, then it is $2^{\left(n^2\right)}$.

Such a board position can be easily constructed by always having an increasing sequence in the nonempty squares of the path starting at the top left:

$$\begin{array} {|c|c|c|c|}
\hline
\downarrow & \rightarrow & \downarrow & \circ \\ \hline
\downarrow & \uparrow & \downarrow & \uparrow \\ \hline
\downarrow  & \uparrow  & \downarrow  & \uparrow \\ \hline
\rightarrow & \uparrow & \rightarrow & \uparrow \\ \hline
\end{array}$$

and then having the next number fall on the last empty square of the path.

Aside, this turns out to be a very effectively strategy for playing the game with non-optimal drops as well.

Edit: James Grime to the rescue again.  He made a fairly entertaining youtube video to address this question.

For highest score i calculated 3,932,060 , largest tile 131072 & for a game without 4's appearing it would be 1,834,972 largest tile 65536


Why is $x_1 i = i x_1$ for quaternions? According to Wikipedia,

$$x+y = (x_0+y_0)+(x_1+y_1) i+(x_2+y_2) j+(x_3+y_3) k$$

and

$$\begin{align}
x  y
&=( x_0 y_0 - x_1 y_1 - x_2 y_2 - x_3 y_3)\\
&+( x_0 y_1 + x_1 y_0 + x_2 y_3 - x_3 y_2) \mathrm i\\
&+( x_0 y_2 - x_1 y_3 + x_2 y_0 + x_3 y_1) \mathrm j\\
&+( x_0 y_3 + x_1 y_2 - x_2 y_1 + x_3 y_0) \mathrm k
\end{align}$$

It's clear how to get the addition, but how do you get the multiplication? Especially, why is

$x_1 \cdot \mathrm i \cdot y_0 = x_1 \cdot y_0 \cdot \mathrm i$ for $x_1, y_0 \in \mathbb{R}$

It might be a dumb question, but I really don't get it. I would appreciate if you use only what I know for your answer, if possible.

What I know

$$i^2 = j^2 = k^2 = -1$$
$$ijk=-1$$

which implies

$$\begin{align} ij &= k\\ ji &= -k\\ jk &= i\\ kj &= -i\\ ki &= j\\ ik &= -j \end{align}$$

and

$$\begin{align}
(-1) \cdot \mathrm i &= \mathrm i \cdot (-1)\\
(-1) \cdot \mathrm j &= \mathrm j \cdot (-1)\\
(-1) \cdot \mathrm k &= \mathrm k \cdot (-1)
\end{align}$$

One thing that should be said (that Tunococ has mentioned in the comments) is that

  elements of $\Bbb F$ in any associative $\Bbb F$-algebra are essentially assumed to be central.

(The "elements of $\Bbb F$" are of course $\{\lambda 1\mid \lambda\in \Bbb F\}$, their usual embedding.)

This is hiding in the axiom of compatibility with scalars. For any $\Bbb F$ algebra $A$, and any $x\in A$, that axiom gives $\lambda x=((\lambda 1)x)1=(1(\lambda x))1=(\lambda x)1=x(\lambda 1)=x\lambda$.

The quaternions are, after all, an $\Bbb R$-algebra generated by $i,j$ with special relations. The historical perspective at the quaternion article does not really do a good job of explaining that point.

A common alternative definition of algebras makes this even more obvious. It goes something like "an $\Bbb F$-algebra is a ring $A$ and a ring homomorphism $r:\Bbb F\to Z(A)$" where $Z(A)$ is the center of $A$. Assuming this definition, one easily sees the "regular" algebra axioms are satsified by $r(\Bbb F)$, which is (isomorphic to, hence) identified with $\Bbb F$.


Finding the least value for points in a locus The question goes like this: On an Argand diagram, sketch the locus representing complex numbers $z$ satisfying $|z+i|=1$ and the locus representing the complex numbers $w$ satisfying $\arg(w-2)=\dfrac{3π}{4}$. Find the least value of $|z-w|$ for points on these loci.

I know how to do the first two sketches; a radius 1 circle in coordinate $(0,-1)$ and a line starting from $(2,0)$ at that angle from the origin, but how do you find the last one? The answer has an exact value, so I can't do it by looking at the diagram. Thanks in advance.

Well... you have that $x-2 = -y$, where $y>0$. This is just a line. Well, $w \equiv (-v+2) + vi$ and $z = \cos(\theta) + (\sin(\theta)-1)i$. So, $|z-w|^2 = (-v+2-\cos(\theta))^2 + (v+1-\sin(\theta))^2$, so we can easily optimise by choosing $v-\sin(\theta) = 1$ and $v+\cos(\theta) = 2$ yields $\cos(\theta) + \sin(\theta) = 1$ and so $\sin(\theta+\pi/4) = 1/\sqrt{2}$ and so $\theta = 0$ or $\theta = \pi/2$. This then implies that $v = 1$ or $v = 2$ respectively. Now fill in the details.

The general situation here is that you have a variable point on a circle ($z$) and a variable point on a line ($w$). What you're being asked to do is minimize $|z-w|$ or bring the points as close as possible. Now ask yourself the question, how close can a circle and a line get. If the line is a tangent or a secant to the circle, the answer is $0$ since they are practically touching each other. However, if the line does not touch the circle (as in this case), the closest they can get if the perpendicular distance of the centre of the circle to the line minus the radius of the circle. Hopefully you can work out what you need to do now from this clue.


Laurent expansion with different annuli Find the Laurent expansion about $0$ of $$f(z)= \frac{1}{(z-i)(z-2)}$$ on the annuli:

$0 \lt \lvert z \rvert \lt 1 $,
$ 1 \lt \lvert z \rvert \lt 2$,
$ 2 \lt \lvert z \rvert \lt \infty $.

So far I have put the function into partial fractions so $ \frac{i+2}{5} \left(\frac{1}{z-i} - \frac{1}{z-2} \right)$ but I'm not sure how to continue

First, we need to address your partial fraction decomposition since it is missing a multiplication by $-1$. You should have obtained
$$
\frac{1}{(z-i)(z-2)}=\frac{2+i}{5}\Bigl[\frac{1}{z-2}-\frac{1}{z-i}\Bigr]
$$
Recall that for $\lvert z\rvert < 1$, the geometric series $\sum_{n=0}^{\infty}z^n$ converges to $\frac{1}{1-z}$.
For $0<\lvert z\rvert < 1$, we have
\begin{align}
\frac{1}{z-2}&=\frac{-1}{2(1-z/2)}\\
&= -\frac{1}{2}\sum_{n=0}^{\infty}\Bigl(\frac{z}{2}\Bigr)^n\\
\frac{-1}{z-i}&= \frac{1}{i(1-z/i)}\\
&=-i\sum_{n=0}^{\infty}\Bigl(\frac{z}{i}\Bigr)^n\\
&=\sum_{n=0}^{\infty}(-i)^{n+1}z^n
\end{align}
Our series is then
$$
\frac{2+i}{5}\sum_{n=0}^{\infty}z^n\biggl[(-i)^{n+1}-\Bigl(\frac{1}{2}\Bigr)^{n+1}\biggr]
$$
For $1<\lvert z\rvert < 2$, we have $1/\lvert z\rvert < 1$ and $\lvert z\rvert/2<1$ which means we can use our first geometric series again.
\begin{align}
\frac{1}{z-2}&=\frac{-1}{2(1-z/2)}\\
&= -\frac{1}{2}\sum_{n=0}^{\infty}\Bigl(\frac{z}{2}\Bigr)^n\\
\frac{-1}{z-i}&= \frac{-1}{z(1-i/z)}\\
&=\frac{-1}{z}\sum_{n=0}^{\infty}\Bigl(\frac{i}{z}\Bigr)^n\\
&=\sum_{n=-\infty}^{0}(-i)^{n+2}z^{n-1}
\end{align}
Our series is then
$$
\sum_{n=-\infty}^{0}(-i)^{n+2}z^{n-1}-\frac{1}{2}\sum_{n=0}^{\infty}\Bigl(\frac{z}{2}\Bigr)^n
$$
where if we peel of the zero term of the first series, we have what is referred to as the principal part of the Laurent series. That is,
$$
\frac{1}{z}+\underbrace{\sum_{n=-\infty}^{-1}(-i)^{n+2}z^{n-1}}_{\text{principal part}}
$$
For the final region $1<2<\lvert z\rvert$, we have $1/\lvert z\rvert < 1$ and $2/\lvert z\rvert < 1$.
\begin{align}
\frac{1}{z-2}&=\frac{1}{z(1-2/z)}\\
&= \frac{1}{z}\sum_{n=0}^{\infty}\Bigl(\frac{2}{z}\Bigr)^n\\
&=\sum_{n=-\infty}^0\Bigl(\frac{1}{2}\Bigr)^nz^{n-1}\\
\frac{-1}{z-i}&= \frac{-1}{z(1-i/z)}\\
&=\frac{-1}{z}\sum_{n=0}^{\infty}\Bigl(\frac{i}{z}\Bigr)^n\\
&=\sum_{n=-\infty}^0(-i)^{n+2}z^{n-1}
\end{align}
Our series is then
$$
\sum_{n=-\infty}^0\biggl[\Bigl(\frac{1}{2}\Bigr)^n+(-i)^{n+2}\biggr]z^{n-1}
$$

Let's do it at $\;0<|z|<1\;$ , you do the other ones:

$$\frac1{z-i}=-\frac1i\frac1{1-\frac zi}=i\left(1+\frac zi-\frac{z^2}1+\ldots\right)$$

$$\frac1{z-2}=-\frac12\frac1{1-\frac z2}=\frac12\left(1+\frac z2+\frac{z^2}4+\ldots\right)$$

Now use your decomposition in partial fractions (but be careful with its sign!)


Construction of a Borel set with positive but not full measure in each interval I was wondering how one can construct a Borel set that doesn't have full measure on any interval of the real line but does have positive measure everywhere.

To be precise, if $\mu$ denotes Lebesgue measure, how would one construct a Borel set $A \subset \mathbb{R}$ such that
$$0 < \mu(A \cap I) < \mu(I)$$
for every interval $I$ in $\mathbb{R}$?

Moreover, would such a set necessarily have to contain infinite measure?

If you got this from Rudin (it is Exercise 8, Ch. 2 in his Real & Complex Analysis), here is his personal answer (excerpted from Amer. Math Monthly, Vol. 90, No.1 (Jan 1983) pp. 41-42). He works with the unit interval $[0,1]$, but of course this can be extended to $\mathbb R$ by doing the same thing in each interval (and by scaling these replications appropriately you can get the final set with finite measure). Anyways, here's how it goes:

"Let $I=[0,1]$, and let CTDP mean compact totally disconnected subset of $I$, having positive measure. Let $\langle I_n\rangle$ be an enumeration of all segments in $I$ whose endpoints are rational.

Construct sequences $\langle A_n\rangle,\langle B_n\rangle$ of CTDP's as follows: Start with disjoint CTDP's $A_1$ and $B_1$ in $I_1$. Once $A_1,B_1,\dots,A_{n-1},B_{n-1}$ are chosen, their union $C_n$ is CTD, hence $I_n\setminus C_n$ contains a nonempty segment $J$ and $J$ contains a pair $A_n,B_n$ of disjoint CTDP's. Continue in this way, and put
$$
A=\bigcup_{n=1}^{\infty}A_n.
$$

If $V\subset I$ is open and nonempty, then $I_n\subset V$ for some $n$, hence $A_n\subset V$ and $B_n\subset V$. Thus
$$
0<m(A_n)\leq m(A\cap V)<m(A\cap V)+m(B_n)\leq m(V);
$$
the last inequality holds because $A$ and $B_n$ are disjoint. Done.

The purpose of publishing this is to show that the highly computational construction of such a set in [another article] is much more complicated than necessary."

Edit: In his excellent comment below, @ccc managed to isolate the necessary components of my solution, and after incorporating his observation it has been greatly simplified. (Actually, after trimming the fat, I've realized that it is actually not entirely dissimilar from Rudin's.) Here it is:

Let $\{r_n\}$ be an enumeration of the rationals, let $V_1$ be a segment of finite length centered at $r_1$, and let $V_n$ be a segment of length $m(V_{n-1})/3$ centered at $r_n$. Set
$$
W_n=V_n-\bigcup_{k=1}^{\infty}V_{n+k},
$$
and observe that
\begin{equation}
m(W_n)\geq m(V_n)-\sum_{k=1}^{\infty}m(V_{n+k})=m(V_n)-m(V_n)\sum_{k=1}^{\infty}3^{-k}=\frac{m(V_n)}{2}.
\end{equation}
In particular, $m(W_n)>0$.

For each $n$, choose a Borel set $A_n\subset W_n$ with $0<m(A_n)<m(W_n)$. Finally, put $A=\bigcup_{n=1}^{\infty}A_n$. Because $A_n\subset W_n$ and the $W_n$ are disjoint,  $m(A\cap W_n)=m(A_n)$. That is to say,
$$
0<m(A\cap W_n)<m(W_n)
$$
for every $n$. But every interval contains a $W_n$, so $A$ meets the criteria, and has finite measure (specifically, $m(A)\leq\sum_n m(V_n)=2 m(V_1)<\infty$).

As a curiosity, here's my own "unnecessarily computational" way (though it's not quite as lengthy as that in the article Rudin was referring to), which I can't resist including because I slaved over it when I first came across this problem, before finding Rudin's solution:

Let $\{r_n\}$ be an enumeration of the rationals, and put
$$
V_n=\left(r_n-3^{-n-1},r_n+3^{-n-1}\right),\qquad W_n=V_n-\bigcup_{k=1}^{\infty}V_{n+k}.
$$
Observe that
\begin{equation}
m(W_n)>m(V_n)-\sum_{k=1}^{\infty}m(V_{n+k})=m(V_n)-m(V_n)\sum_{k=1}^{\infty}3^{-k}=\frac{m(V_n)}{2}.\qquad\qquad(1)\label{8.1}
\end{equation}
(We have strict inequality because there exist rationals $r_i$, with $i>n$, in the complement of $V_n$.)

For each $n$, let $K_n$ be a Borel set in $V_n$ with measure $m(K_n)=m(V_n)/2$.  Finally, put
$$A_n=W_n\cap K_n,\qquad A=\bigcup_{n=1}^{\infty}A_n.$$

To prove that $A$ has the desired property, it is enough to verify that the inequalities
$$0<m(A\cap V_n)<m(V_n)\qquad\qquad(3)\label{8.3}$$
hold for every $n$. (This is because every interval contains a $V_n$.) For the left inequality, it is enough to prove that $m(A_n\cap V_n)=m(A_n)=m(W_n\cap K_n)>0$. This follows from the relations
$$m(W_n\cup K_n)\leq m(V_n)<m(W_n)+m(K_n)=m(W_n\cup K_n)+m(W_n\cap K_n),$$
the second inequality being a consequence of (1) and the fact that $m(K_n)=m(V_n)/2$.

For the right inequality of (3), observe that $V_n\subset W_i^c$ for $i<n$, and that therefore
$$
m(A\cap V_n)=m\left(\bigcup_{k=0}^{\infty}A_{n+k}\cap V_n\right)\leq\sum_{k=0}^{\infty}m(K_{n+k}\cap V_n)
$$
$$
<\sum_{k=0}^{\infty}m(K_{n+k})=\sum_{k=0}^{\infty}\frac{m(V_{n+k})}{2}=\sum_{k=0}^{\infty}\frac{m(V_n)}{2^{k+1}}=m(V_n).
$$
The strict inequality above follows from three observations: (i) $m(K_i)>0$ for every $i$; (ii) $K_i\subset V_i$; and (iii) there exist neighborhoods $V_i$, with $i>n$, that are contained entirely in the complement of $V_n$.

So $A$ meets the criteria (and also has finite measure).

Well, suppose you enumerated the rational intervals $I_n$, and for each $I_n$, let $J_n = I_n \setminus \cup_{i=1}^{n-1}I_i$.  If $J_n$ has measure 0, let $A_n = \varnothing$.  Otherwise, let $A_n$ be a subset of $I_n$ such that $\mu(A_n) < \max\{\mu(I_n)/2, \epsilon\cdot 2^{-n}\}$.  Then let $A$ be the union of the sets $A_n$.  Doesn't that do it?


How to think in terms of Polar Coordinates? I am currently studying Polar Coordinates and many times I've noticed that one converts polar equations in cartesian form to do further analysis. Is there a way to think in terms of Polar Coordinates? Answers to this question must include a way in which one can reason within the domain of polar coordinates.

For starters, consider the following problem:

Find the equation of the line perpendicular to $l\over{r}$=$\cos(\theta-\alpha)+e\cos(\theta)$ and passing through the point $(r_1,\theta_1)$. How should one go about solving this problem without making use of cartesian coordinates?

There seem to be too many constants in your equation for a line.

In Cartesian a line has a slope and an intercept.

In polar, the line has a direction, and a distance from the origin.

So I would make my line:
$r = l \csc (\theta + \alpha)$  Where $\alpha$ is the direction, and $l$ is the distance.

And, $\theta = \alpha$ for lines through the origin.

Or, $r = l \sec (\theta + \alpha)$ where alpha is the normal.

Now in your example which variables are we tuning?  There are infinitely many lines that go through ($r_1, \theta_1$) So, what is the direction of our line.

Lets assume that the direction is fixed, using $\alpha$ is normal to our line.

What is the distance of a line perpendicular to $\alpha$ that goes through ($r_1, \theta_1$)?

$l = r_1 \cos (\alpha - \theta_1)$

$r = r_1 \cos (\alpha - \theta_1) \sec (\theta + \alpha)$


There is the Eisenstein's criteria : let $P=a_0+\ldots+a_nX^n\in\mathbb{Z}[X]$ and $p$ a prime number such that :
$$ \forall i\in[\![0,n-1]\!],\,p|a_i $$
$$ p\!\not| a_n $$
$$ p^2\!\not|a_0 $$
Then $P$ is irreductible in $\mathbb{Q}[X]$. Moreover, if $a_0\wedge\ldots\wedge a_n=1$, then $P$ is irreductible in $\mathbb{Z}[X]$ according to Gauss' lemma.

Proof : Let $$ \overline{P}=\overline{a_0}+\ldots+\overline{a_n}X^n\in\mathbb{Z}/p\mathbb{Z}[X] $$
Since $p|a_i$ for $i\in[\![0,n-1]\!]$, $\overline{P}=\overline{a_n}X^n$. Let us suppose there exists $Q,R\in\mathbb{Q}[X]$ such that $P=QR$, $\deg Q\geqslant 1$ and $\deg R\geqslant 1$. According to Gauss' lemma, we can suppose that $P,Q\in\mathbb{Z}[X]$. We samely define $\overline{Q}$ and $\overline{R}$ so that $\overline{P}=\overline{Q}\cdot\overline{R}$. Thus $\overline{Q}=\alpha X^k$ and $\overline{R}=\beta X^{n-k}$ for $(\alpha,\beta)\in(\mathbb{Z}/p\mathbb{Z})^2$ and $k\in[\![1,n-1]\!]$. Since $\overline{Q(0)}=\overline{R(0)}=0$ and $a_0=P(0)R(0)$, $p^2|a_0$ which is not. Finally $P$ is irreductible in $\mathbb{Q}[X]$.


Algorithm for diophantine equation From p. 38 of Richard Hodel's An Introduction to Mathematical Logic,

"Construct an algorithm that, given an integer $a$, decides in a finite number of steps whether the equation $x^2+y^3-a=0$ has a solution in integers."

I don't see how to place any bound on $x$ or $y$ in terms of $a$, and given the nature of the text I don't think Hodel was expecting any heavy-duty number theory.

POSTSCRIPT: It seems most likely that Hodel meant "a solution in POSITIVE integers", as I don't think the author was expecting familiarity with the  bound mentioned by Qiaochu.

The above equation is shown below:

$$x^2+y^3-a=0  \tag1\label1$$

Consider restricting value of $a$ to $a=(x+y)^2$ then, the solution to equation \eqref{1} above is given below:

\begin{align}
x &= \frac{6k^2-7k+2}{k^2} \\
y &= \frac{-3k^2+2k}{k^2}.
\end{align}


How to start with mathematics? I fell in love with mathematics a bit too late when I've already taken decisions regarding my future, career-wise. Now I would like to learn math on my own but I'm a bit confused as where to start. My knowledge of mathematics is comparable to that of a 15-16 year old highschool freshman. I would like to know how would you (if you were in my position) start your learning adventure on your own. There are a lot of resources online, of that I'm sure but I would like to follow a path. I'm pretty sure I can learn mathematics on my own and been thinking about this decision for almost a year.

Thank you!

I'm also an older person trying to teach myself math. I took math till high school and since then I have taught myself to beginning-graduate level in one area (analysis) and bits and pieces of other areas at an undergraduate level. My suggestions,

Time is limited, don't waste it on popular books. Study high-school and undergraduate textbooks and do the problems.  It may be a good idea to     go to an older generation of textbooks since they are less chatty than the current ones.      The Chicago Undergradute Mathematics Bibliography is useful. But don't obsess too much on which book to read. At this level it is hard to get things very wrong. Pick one book and persevere with it.
Work in sprints. It takes    time to get into a
productive frame    of mind. So trying to do
math for a little    while each day
does not lead to any    progress and
results in frustration.    Instead,   dedicate
a week of your vacation or at least a
whole weekend for learning something
new. Between these sprints revise what you have learned by doing more problems.
Get it right the first time. While studying a text if you feel that you don't understand something fully, stop and work on your difficulty. Look at other books. Ask for help on forums like this. Go and brush up on the prerequisites if need be. But never leave a gap. Don't skip more than one exercise in ten.
Be    patient. A good undergraduate     training takes 4 years of     work with teachers and peers. My      guess is it will take at least a      dozen years to achieve the same level   of mathematical maturity working      part-time on your own. But at the end your understanding will be better than an undergraduate's since you will have had the benefit of greater intellectual maturity and more time to reflect.
Is it worth it? Math is no doubt beautiful. But the time you give to it comes at the cost of your career, personal life and other interests. Are you willing to make the necessary sacrifices? If you are then it might be a good idea to make the sacrifices upfront and go back to school to learn math. The chances of fulfillment would be much higher.

Before starting Basic Arithmetic(Pre-Arithmetic) study the definition of mathematics/Its history/influential scientists/mathematicians in it. Then the branches of mathematics and their definitions and then learn the number system and mathematical skills and number skills and think deeply about it like why it is based on ten digit then go on learning Arithmetic(all the operations and their definitions) Practice it Master it completely then memorize and mesmerize(Think every time about what your memorizing) all the arithmetical tables(Addition tables, subtraction tables, Multiplication tables) which will help you for mental calculations and remember always visualize numbers.
Then when your Mental Calculation is awesome!!! then move on to PreAlgebra master it then Algebra master it and then modular arithmetic which will give you nice understanding of how mathematics work then Geo , Trig , Calc all other things then study their relations do extensive word problems and numericals master them then do research on them. Take part in IMO , discover your own theorems. Solve a millionaire problems . take part in mathematical discussions and study science.


Existence of a Surjective Linear Map $\mathbb{R}^3$ to $\mathbb{R}^4$? Is it possible for there to be a surjective linear transformation from $\mathbb{R}^3$ to $\mathbb{R}^4$?

I feel like this isn't possible because $\mathbb{R}^3$ has fewer vectors than $\mathbb{R}^4$. If so, linear transformations between the two spaces should be injective. But if that's the case, for all linear transformations $\mathbb{R}^3\to\mathbb{R}^4$, the kernel should only ever contain the zero vector. But this is not the case. Why?

There are functions from $\Bbb R^3$ to $\Bbb R^4$ which are surjective, but none of them preserve the vector space structures. By the rank-nullity formula: $$3 = \dim \ker T + \dim {\rm Im } \ T,$$ so we can't have $\dim {\rm Im } \ T = 4 $.

They have the same cardinality but I don't believe cardinality implies existence of surjective linear transformation.


How should this equation be read, $|z+1+3i|=|z-5-7i|$ $$|z+1+3i|=|z-5-7i|$$
$z$ represents a complex number right? Then if
$$|z+1+3i|=0$$
$${\implies}|z|=|-1-3i|$$
In which sense does this
$$|z+1+3i|=|z-5-7i|$$
imply,
$$\implies|-4-4i|$$
But $z$ has vanished, which begs the question what is the point of including $z$ at all?

I know I'm getting something wrong, but what? Regards Tom

It has nothing to see with $\lvert z+1+3\mathrm i\rvert=0$. Geometrically, the equation means the image of $z$ is at the same distance from the image $A$ of $-1-3\mathrm i$ as from the image $B$ of $5+7\mathrm i$.

The locus of such points is the midperpendicular of $[AB]$; the midpoint of  $[AB]$ is the point with affix $\frac12(4+4\mathrm i)$.

Now the line $(AB)$ is directed by the vector $(3,5)$, hence perpendicular is directed by the vector $(-5,3)$, with affix $-5+3\mathrm i$. A point of the midperpendicular is $(2,2)+t(-5,3)(2-5t,2+3t),\enspace t\in\mathbf R$.
Thus the solutions are:
$$z=2-5t+(2+3t)\mathrm i.$$

The notation should be interpreted as magnitude, not absolute value signs.

If we let $z$, the complex number, be represented as $z = a + bi$, we can then say that:

$$\left|a+1 + i(b+ 3)\right| = \sqrt{(a+1)^2 + (b+3)^2}$$

and that:

$$\left|a-5 + i(b-7)\right| = \sqrt{(a-5)^2 + (b-7)^2}$$

Setting them equal to one another, we get that:

$$\sqrt{(a+1)^2 + (b+3)^2} = \sqrt{(a-5)^2 + (b-7)^2}$$

$$(a+1)^2 + (b+3)^2 = (a-5)^2 + (b-7)^2 $$

$$a^2 + 2a + 1 + b^2 + 6b + 9 = a^2 - 10a + 25 + b^2 -14b + 49$$

$$12a + 20b = 64,\ 3a + 5b = 16$$

One  possible solution is $a = -3$, $b = 5$. You can derive a set of solutions that satisfy this condition using the Euclidean Algorithm.

Therefore, $z$ can be: $z = -3 + 5i$


How to set interesting integrals I'm teaching integration by substitution and integration by parts and I'd like to make some interesting problems. I'd like to be able to use the chain rule and the product rule to reverse engineer some nice problems.

I would really like a non-obvious substitution to lead to an integral that needs to be integrated by parts, or an integral by parts that leads to an integral needing a substitution.

Like I said: I would like a method to reverse engineer. Any ideas?

Edit: I could, of course, pick a complicated function and differentiate it. But that would give an even more complicated integrand. I want a nice problem. A nice, compact integrand that - via a cunning substitution - becomes do-able. An Example would be:
$$\int \cos 2x \cdot \ln\left(\cos x \right) \cdot \mathrm{d}x$$

You can use the fact that:
$$
\int f(g(x))g'(x)dx = \int f(t)dt
$$
with $t=g(x)$

e.g.
$$
f(x)=\dfrac{1}{x^2+a^2} \qquad g(x) = e^{x^2+b}
$$
gives:
$$
g'(x)= 2xe^{x^2+b}
$$

and a integral of the form:

$$
\int \dfrac{2xe^{x^2+b}}{e^{2(x^2+b)}+a^2}dx
$$
can be integrated with the substitution
$$
t=e^{x^2+b}
$$

If you want to hide better the substitution you can write:

$$
\int \dfrac{2exe^x}{e^{2(x^2+1)}+\pi^2} dx
$$

You can try taking some complicated derivatives and integrating them to obtain their integral counterparts. For example, try this:

  $ y= \{arctan {In{x^3} + {x^6}sin{4x} + {e^{4x}}\$

Differentiate and then set it up as an integral. That should keep both you and your students busy for awhile..........lol


Not getting the same solution when using the rule sin(x)\x=1 on a limit There is a rule in limits that when $x$ approaches zero:
$$\frac{\sin\left(x\right)}{x}=1$$
So I used this rule on the following exercise:

  Evaluate
  $$
\lim _{x\to 0}\:\frac{x-\sin\left(x\right)}{\sin\left(2x\right)-\tan\left(2x\right)}
$$

I substituted $\sin(2x)$ with $2x$ by the following way:

$$\sin\left(2x\right)=\frac{\sin\left(2x\right)}{2x}\cdot 2x=1\cdot 2x=2x \Rightarrow \lim _{x\to 0}\:\frac{x-\sin\left(x\right)}{2x-\tan\left(2x\right)}$$

But according to symbolab:
$$\lim _{x\to 0}\:\frac{x-\sin\left(x\right)}{2x-\tan\left(2x\right)}=-\frac{1}{16}$$

while
$$\lim _{x\to 0}\:\frac{x-\sin\left(x\right)}{\sin(2x)-\tan\left(2x\right)}=-\frac{1}{24}$$

Why am I getting this contradiction?

More over if I susbsitute the following I do get the right answer
$$\tan\left(2x\right)=\frac{\sin\left(2x\right)}{\cos\left(2x\right)}=\frac{2x}{\cos\left(2x\right)}\Rightarrow \lim \:_{x\to \:0}\:\frac{x-\sin\left(x\right)}{2x-\frac{2x}{\cos\left(2x\right)}}=-\frac{1}{24}$$

If you want to test yourself: Symbolab with the excersice preloaded

The first order terms cancel in nominator and denominator, so the contributions for the limit are in the third order terms. Replace $\sin(x)$ with $x-\frac16x^3+x^5r(x)$ to get the correct result.

Transforming the term gives
$$
\frac{\cos 2x}{\cos 2x-1}·\frac{x-\sin x}{2\sin x\cos x}
=
\frac{\cos 2x}{\cos x}·\frac{x-\sin x}{-2\sin^2 x·2\sin x}
$$
The limit of the cosines is $1$, in the denominator one can replace $\sin x$ with $x$ and in the numerator the third order formula to get
$$
\frac{x-(x-\frac16 x^3+O(x^5))}{-4x^3+O(x^5)} = -\frac{1-O(x^2)}{24}
$$

When taking limits of an expression you cannot arbritraily replace parts of the expression in isolation. You need to calculate the limit of the entire expression.

In your case you could use l'Hopital three times to get:
$$\begin{align}
\lim_{x\to0}\:\frac{x-\sin(x)}{\sin(2x)-\tan(2x)}&=\lim_{x\to0}\:\frac{1-\cos(x)}{2\cos(2x)-2\sec^2(2x)}\\
&=\lim_{x\to0}\:\frac{\sin(x)}{-4\sin(2x)-8\tan(2x)\sec^2(2x)}\\
&=\lim_{x\to0}\:\frac{\cos(x)}{-8\cos(2x)-16\sec^4(2x)-32\tan^2(2x)\sec^2(2x)}
\end{align}$$
Now you can simply replace $x$ with $0$ to obtain:
$$
\lim_{x\to0}\:\frac{\cos(x)}{-8\cos(2x)-16\sec^4(2x)-32\tan^2(2x)\sec^2(2x)}=\frac{1}{-8*1-16*1-32*0*1}=-\frac{1}{24}
$$


Why do we not have to prove definitions? I am a beginning level math student and I read recently (in a book written by a Ph. D in Mathematical Education) that mathematical definitions do not get "proven." As in they can't be proven. Why not? It seems like some definitions should have a foundation based on proof. How simple (or intuitive) does something have to be to become a definition? I mean to ask this and get a clear answer. Hopefully this is not an opinion-based question, and if it is will someone please provide the answer: "opinion based question."

I'd like to take a somewhat broader view, because I suspect your question is based on a very common problem among people who are starting to do "rigorous" or "theorem-proof" mathematics.  The problem is that they often fail to fully recognize that, when a mathematical term is defined, its meaning is given exclusively by the definition.  Any meaning the word has in ordinary English is totally irrelevant.  For example, if I were to define "A number is called teensy if and only if it is greater than a million", this would conflict what English-speakers and dictionaries think "teensy" means, but, as long as I'm doing mathematics on the basis of my definition, the opinions of all English-speakers and dictionaries are irrelevant. "Teensy" means exactly what the definition says.

If the word "teensy" already had a mathematical meaning (for example, if you had already given a different definition), then there would be a question whether my definition agrees with yours.  That would be something susceptible to proof or disproof. (And, while the question is being discussed, we should use different words instead of using "teensy" with two possibly different meanings; mathematicians would often use "Zduff-teensy" and "Blass-teensy" in such a situation.)

But if, as is usually the case, a word has only one mathematical definition, then, there is nothing that could be mathematically proved or disproved about the definition.  If my definition of "teensy" is the only mathematical one (which I suspect is the case), and if someone asked "Does 'teensy' really mean 'greater than a million'?" then the only possible answer would be "Yes, by definition."  A long discussion of the essence of teensiness would add no mathematically relevant information.  (It might show that the discussants harbor some meaning of "teensy" other than the definition. If so, they should get rid of that idea.)

(I should add that mathematicians don't usually give definitions that conflict so violently with the ordinary meanings of words. I used a particularly bad-looking example to emphasize the complete irrelevance of the ordinary meanings.)

Definitions are not within math, they within linguistics, on the edge of math.

Saying "A is true of B by definition" simply states that you are assuming (an axiom) that the subject B has a property A, and that you will not be trying to prove it.  If the listener does not agree that B has a property A, then the listener needs to stop right there and say "this proof may be valid, but its underlying assumptions do not match mine, so I cannot apply the conclusion to my understanding of what B is without digging further into that assumption."


Determine vectors that are in the solution space of a matrix I am doing a past exam question that gives a $4 \times 6$ matrix $A$ along with four $6 \times 1$ vectors and asks you to determine which vectors are in the solution space of $A$.

$$
A=\pmatrix{-1&2&3&-3&6&7\\1&-1&-2&2&-5&-6\\-1&1&2&-1&2&4\\-2&2&4&-2&4&8}.
$$

I have already calculated the solution space of $A$ but cannot find any of the $4$ vectors in the solution space. Could somebody tell me what to do for this question?

Let the vector be $\mathbf x$, using Matlab to test whether $\mathbf{Ax=0}$. If the product is $\mathbf0$, then we say that the vector is in the solution space.


Explicit bijection between equipotent sets? I'm thinking about the proof of the following theorem:

If $\mathcal A$ is a denumerable family of denumerable sets then $\bigcup \mathcal A$ is denumerable. (denumerable means that there is a bijection to $\mathbb N$)

The proof shows $|\mathbb N| \leq |\bigcup \mathcal A|$ and $|\mathbb N| \geq |\bigcup \mathcal A|$ rather than giving an explicit bijection $f: \mathbb N \to \bigcup \mathcal A$.

Question 1: In this case, is it possible to give an explicit bijection?

Question 2: In general, is it possible to find a bijection between set $A$ and $B$ if we know that $|A| = |B|$?

First note that the Cantor-Bernstein is constructive and does give us a bijection.

Secondly, if we require the sets in $\cal A$ are pairwise disjoint then we can explicitly define a map by sending $A_i$ to $\{i\}\times\Bbb N$ and composing the whole thing with the Cantor pairing function. However if we don't have this assumption then we cannot do it that way because the function from the union is not well-defined anymore. We could require that an element is mapped to $\langle i,k\rangle$ where $i$ is the least index such that $a\in A_i$, but then the function is not a bijection anymore.

For this reason it is often simpler just to show mutual bijections (or in the $\mathbb N$ case, a surjection from $\mathbb N$ onto the union is also enough).

As for your second question, the answer is no. By the assumption that $|A|=|B|$ we can prove that there exists a bijection between $A$ and $B$, but it is not necessary that we can define it. This of course, depends on the meaning of "define", but if we take it to mean write an explicit formula that the collection of sets satisfying it is a bijection between $A$ and $B$, then the answer is no.

For example, if we can write down a definitive bijection between $\mathbb R$ and some ordinal then we invariably solve the continuum hypothesis. We could of course parameterize, but that would depend on parameters which are not definable themselves. In fact, if your underlying theory is merely ZF then such bijection would also prove that $\mathbb R$ can be well-ordered, which cannot be done without choice.

The answer to question one is given in did's answer and is yes, in this case we can write down a bijection explicitly, even if we don't assume $A$ and $B$ to be disjoint.

The answer to question two is given in Asaf's answer and is no, in general we cannot expect to write down the bijection even if we know that it exists. For example, let's assume we know that there is a bijection $f: \mathbb R \to \omega_2$. Since $\omega_2$ is an ordinal it is well-ordered so that $\mathbb R$ would automatically also be well-ordered, without the need for AC. But we know that $\mathbb R$ is not well-ordered unless we assume AC.


Show that {∨, ¬} is adequate. So, I've been thinking lately on how to show that set {$\lor, \lnot$} is adequate.
I've came across few ideas on how I'd have to build my proof, albeit I am not fairly sure how to process nor if my thoughts are good.

First, I thought I could rely on the fact that for every formula $\psi$, there is equivalent formula $\omega$ in DNF. That'd would give me adequate set of S = {$\land, \lnot, \lor$}. Then, I'd have to show, I can construct $\land$ connective out of B = {$\lor, \lnot$} set. How, however, do I prove, that if I can build connectives of adequate set S, using only set B connectives, then set B is adequate?

Another idea was to use structural induction to show set {$\lor, \lnot$} is adequate, for this, however, I am not certain how to build both base as well as induction step.

Say that an $n$-place Boolean function $G$ is realized by a wff $\alpha$ whose atomic sentence symbols are $A_1,...,A_n$ if $G(X_1,...,X_n)$ is equal to the truth value of $\alpha$ when $A_1,...,A_n$ are given the truth values $X_1,...,X_n$ respectively.

The key to answering your question is the following result.

Theorem. Every $n$-place Boolean function $G$ is realized by some $\alpha$.

Proof. If $G$ is constantly false then $A_1 \wedge \neg A_1$ realizes $G$. Otherwise, suppose there are $k$ points at which $G$ is true: $$X_1 = (X_{11},...,X_{1n}),...,X_k=(X_{k1},...,X_{kn}).$$

Now let $\beta_{ij}$ be $A_j$ or $\neg A_j$ according as $X_{ij}$ is true or false. Let $\gamma_i = \beta_{i1} \wedge ... \wedge \beta_{in}$ and let $\alpha = \gamma_1 \vee ... \vee \gamma_k$. Now check that $\alpha$ realizes $G$ (I leave this to you as an instructive exercise). QED

Remark. Notice that $\alpha$ in the foregoing proof is in DNF. From this observation and the theorem just proved, we see that $\{\vee, \wedge, \neg \}$ is adequate.

Finally, we have

Theorem. The set $\{\vee, \neg \}$ is adequate.

Proof. Let $\alpha$ be a wff using only connectives in $\{\vee, \wedge, \neg \}$. We can show by induction on $\alpha$ that there is a tautologically equivalent wff $\alpha '$ using only connectives in $\{\vee, \neg \}$. And from this it follows that $\{ \vee, \neg \}$ is adequate, since if $\alpha$ realizes $G$ and $\alpha \equiv \alpha '$, then $\alpha '$ realizes $G$ too.

The base case in which $\alpha$ is an atomic sentence symbol is trivial (let $\alpha '$ be $\alpha$).

For the inductive step, first suppose $\alpha$ is $\neg \beta$. Then let $\alpha '$ be $\neg \beta '$.

Second, suppose $\alpha$ is $\beta \wedge \gamma$. Then let $\alpha '$ be $\neg(\neg \beta ' \vee \neg \gamma ')$. It's easy to check that $\alpha \equiv \alpha '$. QED

B will work out as adequate, by reinterpreting $\land$ in S as an abbreviation for a formula with just the connectives $\lor$ and $\lnot$.

Thus, disjunctive normal forms would work out as having abbreviations in them.

For example, a disjunctive normal form like

((A$\land$B)$\lor$($\lnot$A$\land$B))

would consist of an abbreviation for

($\lnot$($\lnot$A$\lor$$\lnot$B)$\lor$$\lnot$($\lnot$$\lnot$A$\lor$$\lnot$B)).

But, is the above in disjunctive normal form?  (my book implies it is not in disjunctive normal form by definition and so does Wikipedia)

If not, then disjunctive normal form is not necessary for proving expressive adequacy.

So, here's another possibility:

Note that every expressive adequacy means we can represent every truth-function.  We could represent all truth-functions of an arity n by all possible bits having (2^n) members (by (2^n) I mean 2 to the nth power).

Thus, we have a sort of natural ordering for the outputs of truth-functions as follows:

[0, 1]

[00, 01, 10, 11]

[0000, 0001, 0010, ..., 1110, 1111]

[00000000, 000000001, ..., 11111111]

So, you might try to show that there exists a formula with $\lor$ and $\lnot$ which can always output any of those bits for a truth function of a given arity n, and then have some sort of induction that allows us to move up an arity.

Edit: Post basically shows the key idea in his paper A General Theory of Elementary Propositions.

Roughly, the idea goes that you show that you can obtain the following truth tables:

p  F1(p)  F2(p)  F3(p)  F4(p)
0  0      0      1      1
1  0      1      0      1

Then we show that for any truth table where the function has arity n, we can build every truth table for arity (n+1).  Post uses the term 'order' for what we call arity.


Questions on "All Horse are the Same Color" Proof by Complete Induction I'm bugged by the following that's summarized on p. 109 of this PDF.

  False theorem: All horses are the same color.

  Proof by induction:

  $\fbox{$P(n)$ is the statement: In every set of horses of size $n$, all $n$ horses are the same color.}$
  $\fbox{Base Case or $P(1)$:}$ One horse is the same color as itself. This is true by inspection.
  $\fbox{Induction Step:}$ Assume $P(k)$ for some $k \geq 1$.
  $\fbox{Proof of $P(k + 1) :$}$
  Since $\{H_1, H_2, ... , H_n\}$ is a set of $n$ horses, the induction hypothesis applies to this set. Thus, all the horses in this set are the same color.
  Since $\{H_2, H_3, ... , H_{n+1}\}$ is also a set of $n$ horses, the induction step likewise holds for this set. Thus, all the horses in this set are the same color too.

  Therefore, all $n +1$ horses in $\{H_1, H_2, H_3, ... , H_n , H_{n+1}\}$ are the same color. QED.

The issue the instructor was trying to point out is clearly valid. For the case $n = 1$, there is only ${H_1}$. So this case says nothing about possible overlapping elements of each set of $(n + 1)$, for instance $H_2$ in the above proof.

But it was proposed in the class discussion that this was the only problem. Had you been able to prove $P(2)$ true, then a proof of the above format would have been fine.

My interpretation is that yes, you could prove all horses are the same color, if you can prove that any set of two horses will be the same color. But this format would not work.

Why not? The problem I see is that the above proof is for the existence of at least one particular pair of sets of horses of sizes $n$ and $n + 1$, such that in each set, all horses are the same color.  Particularly when the set of size $n$ is a subset of the set of size $n + 1$.  In order to prove the induction step, don't you need to prove that sets of sizes $n$ and $n + 1$, do not necessarily contain the same, overlapping elements?

You could prove that any horse can be added to a set of 2 horses.  Take the last two, and they must be the same color, and so on.  Wwhatever color the first two happen to be, all other horses must thus be the same color.

Am I misinterpreting the example, or am I making a logical error? Thanks in advance.

It’s clear from the question and from your discussion with @DonAntonio that you don’t actually understand the induction step of the argument. You seem to think that it involves comparing some previously chosen set of $n$ horses with some new set of $n+1$ horses, but it does not. Let me see if I can explain more clearly just how it does work.

We assume as our induction hypothesis that if $H$ is any set whatsoever of $n$ horses, then the horses in $H$ are all the same color. Now let $H=\{h_1,h_2,\dots,h_{n+1}\}$ be any set of $n+1$ horses; our goal is to show that all of the horses in $H$ are the same color. To do this, we look at the subsets

$$H_0=\{h_1,\dots,h_n\}\quad\text{and}\quad H_1=\{h_2,\dots,h_{n+1}\}\;.$$

Each of these subsets contains $n$ horses, so by hypothesis all of the horses in $H_0$ are the same color, and all of the horses in $H_1$ are the same color.

  Note: The two $n$-horse sets that we’re looking at here were not given to us ahead of time: they are just two different $n$-horse subsets of $H$. And in fact any two different $n$-horse subsets of $H$ will work equally well for the argument.

Now if $n\ge 2$, the horse that I’ve called $h_2$ is in both $H_0$ and $H_1$. (In fact every horse except $h_1$ and $h_{n+1}$ is in both $H_0$ and $H_1$.) Since $h_2$ is in $H_0$, and we already know from the induction hypothesis that all of the horses in $H_0$ are the same color, it follows that every horse in $H_0$ is the same color as $h_2$. But $h_2$ is in $H_1$ as well, so by exactly the same reasoning we conclude that every horse in $H_1$ is the same color as $h_2$. But every horse in $H$ is in $H_0$ or $H_1$ (or both), so every horse in $H$ is the same color as $h_2$, and therefore the horses in $H$ are all the same color. This completes the induction step.

There is absolutely nothing wrong with that argument — provided that $n\ge 2$. In particular, it does not involve starting with some particular set of $n$ horses known to be the same color and trying to use that set to show that the horses in some arbitrary set of $n+1$ horses are all the same color. The argument starts with a set of $n+1$ horses and proceeds by looking at two $n$-horse subsets of the given set. It’s important here to realize that the induction hypothesis does not say that there is some particular set of $n$ horses that are all the same color: it says that in any set of of $n$ horses, all of the horses are the same color.

The argument fails only when $n=1$. In that case it fails because the sets $H_0=\{h_1\}$ and $H_1=\{h_2\}$ no longer overlap: there is no horse in both sets. Thus, while it’s true that all of the horses in $H_0$ are the same color and that all of the horses in $H_1$ are the same color, we can no longer infer that those two colors must be the same. But if we could somehow show that in every set of two horses, both horses were the same color, the induction argument as given would work just fine: we’d always be considering some $n\ge 2$, so the sets $H_0$ and $H_1$ would overlap.

Just want to add a quick summary.

The proof is "almost" perfect. It simply fails on n=1.

Yes obviously any set with 1 horse will have the same color. However, you can't extend that to n=2.

If you can somehow proof that any set of 2 horses have the same color then yes, you got something right, that any set with any number of horses will have the same color.


Proving Pascal's Rule : ${{n} \choose {r}}={{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$ I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.

I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.

I want to see an actual proof behind this equation.  Does anyone have any ideas?

Consider $n$ balls in a basket. Let there be $1$ red ball and $n-1$ blue balls. Now look at the number of ways of choosing $r$ balls in two different ways

One way is to choose $r$ balls out of the $n$ balls. So the number of ways is $C(n,r)$

The other way is to look at the cases when out of the $r$ balls chosen if we have a red ball or not. We have only two options namely out of the $r$ balls we could have one red ball or no red balls

The number of ways of having $1$ red ball is to choose the one red ball which can be done in $C(1,1)$ ways and choose the remaining $(r-1)$ balls from the $(n-1)$ blue balls which can be done in $C(n-1,r-1)$ ways

Similarly, the number of ways of having no red balls is to choose all the balls as blue balls which can be done in $C(n-1,r)$ ways

These are the only two cases and these are mutually exclusive and hence the total number of ways is $C(n-1,r-1)+C(n-1,r)$

Hence, we get $$C(n,r) = C(n-1,r-1) + C(n-1,r)$$

The same idea could be extended to prove a generalization of the above $$C(m+n,r) = \displaystyle \sum_{k=\max(0,r-n)}^{\min(r,m)} C(m,k) C(n,r-k)$$

Consider a basket with $m$ red balls and $n$ blue balls and we want to count the number of ways in which $r$ balls can be drawn. Argue by two different ways to count (same as above) to prove this.

I don't care if your question has already been answered or this is posted 4 years ago! The basic idea is $\Omega=A+A^c$. Say we take one element out, the permutation $k$ does not have that number in ${n}\choose{k}$ is ${n-1}\choose{k}$. In order to get the permutations that have this element in is "to make room for this element", i.e. ${n-1}\choose{k-1}$.


Prove that $a^b\cdot b^c \cdot c^a \leq 1$ I have to prove that

$a^b\cdot b^c\cdot c^a \leq 1$ given that $a+b+c=3$ and $a,b,c$ are positive real numbers

My approach:

By AM-GM,

$a^b\cdot b^c \cdot c^a \leq (\frac{ab+bc+ac}{3})^3$

Now I am not sure how to proceed and in the solution, it goes like this:

${ab+bc+ca\over 3}\leq {a+b+c\over 3}=1$

I dont get the above statement, am I missing something?

Thanks

1=$\frac {(a+b+c)^2}{9}$=$\frac {a^2+b^2+c^2+2ab+2bc+2ca}{9} \ge \frac {ab+bc+ca+2ab+2bc+2ca}{9}$

$\Rightarrow 1 \ge \frac {3(ab+bc+ca)}{9}$

$\Rightarrow 1 \ge \frac {(ab+bc+ca)}{3}$

We have used standard inequality that $a^2+b^2+c^2$ $\ge$ ab+bc+ca

By Jensen for the concave function $\ln$ and by the Batominovski's reasoning we obtain:
$$\prod_{cyc}a^b=e^{\sum\limits_{cyc}b\ln{a}}=e^{3\sum\limits_{cyc}\frac{b}{3}\ln{a}}\leq e^{3\ln\left(\sum\limits_{cyc}\left(\frac{b}{3}\cdot a\right)\right)}=e^{3\ln\frac{ab+ac+bc}{3}}\leq e^{3\ln\left(\frac{a+b+c}{3}\right)^2}=1.$$


Proof of Linear Independence involving vector spaces Consider a vector space V , vectors v1,...,vn ∈ V and

w = $α_1v_1$ + $α_2v_2$ +···+ $α_nv_n$, where $α_1$,...,$α_n$ ∈R and $α_1$ $\neq$ 0.

Prove that:
a) If $v_1$,$v_2$,...,$v_n$ are linearly independent, then w,$v_2$,...,$v_n$ are linearly independent

How would I a formulate proof for this or even the starting step?

HINT

Let apply the definition to the set $w,v_2,\ldots,v_n$ to obtain

$$c_1w+c_2v_2+\ldots+c_nv_n=c_1(α_1v_1 + α_2v_2 +\cdots+ α_nv_n)+c_2v_2+\ldots+c_nv_n=\ldots=0$$

Can you continue form here? What condition do we find for $c_1,c_2,\ldots,c_n$.

Suppose $a_1w+a_2v_2+\cdots + a_nv_n = 0$. If $a_1 \neq 0$, then $\alpha_1v_1+\alpha_2v_2+\cdots + \alpha_nv_n = w = -\dfrac{a_2}{a_1}v_2 - \dfrac{a_3}{a_1}v_3 - \cdots - \dfrac{a_n}{a_1}v_n\implies \alpha_1v_1+\displaystyle \sum_{k=2}^n \left(\alpha_k+\dfrac{a_k}{a_1}\right)v_k = 0\implies v_1,v_2,..., v_n$ are linearly dependent, since $\alpha_1 \neq 0$ - a contradiction. Thus $a_1 = 0$ and since $v_2,v_3,...,v_n$ are linearly independent, we have $a_2=a_3=...=a_n = 0$, proving that $w, v_2,v_3,...,v_n$ are linearly independent.


Expanding a differential equation in powers of $\epsilon$ How does one expand the right hand side of

$$\frac{da}{d\theta}=\frac{\epsilon h\sin(\theta)}{1+\epsilon a^{-1}h\cos(\theta)}$$

in powers of $\epsilon$ and obtain

$$\frac{da}{d\theta}=\epsilon h\sin(\theta)+O(\epsilon^{2})?$$

Note: For brevity, $h$ stands for $h(a\cos(\theta), a\sin(\theta))$ and $\epsilon$ is a small parameter, i.e., $|\epsilon|\ll 1$.

Context: I am trying to work along with the textbook Nonlinear Ordinary Differential Equations by Jordan and Smith and came across this step in section 4.2 Amplitude and frequency estimates: polar coordinates. We are looking at a differential equation in the form

$$\ddot{x} + \epsilon h(x,\dot{x})+x = 0, $$

which has an equivalent system

$$\dot{x}=y, \dot{y}=-\epsilon h(x,y)-x. $$

The system itself can be represented parametrically by time-dependent polar coordinates $a(t), \theta(t)$ which allows the polar form of the system

$$\dot{a}=-\epsilon h\sin(\theta)$$

$$\dot{\theta}=-1-\epsilon a^{-1}hcos(\theta).$$

The goal is to eventually derive some estimates for the amplitude and frequency of the periodic time solutions of $\ddot{x} + \epsilon h(x,\dot{x})+x = 0$, if any, which are represented by closed paths on its corresponding phase diagram.

$\dfrac{da}{d\theta}=\dfrac{\epsilon h\sin\theta}{1+\epsilon a^{-1}h\cos\theta}$

$(a\epsilon h\sin\theta)\dfrac{d\theta}{da}=a+\epsilon h\cos\theta$

$-a\epsilon h\dfrac{d(\cos\theta)}{da}=a+\epsilon h\cos\theta$

$-a\epsilon h\dfrac{du}{da}=a+\epsilon hu$ by letting $u=\cos\theta$

$\dfrac{du}{da}+\dfrac{u}{a}=-\dfrac{1}{\epsilon h}$

$\dfrac{d(au)}{da}=-\dfrac{a}{\epsilon h}$

$au=C-\dfrac{a^2}{2\epsilon h}$

$\cos\theta=\dfrac{C}{a}-\dfrac{a}{2\epsilon h}$


How do I show the Wronskian of $(J_{a}(x),Y_{a}(x)) = \dfrac {2} {\pi x}$ Based of using my undergrad class notes. I know that the wronskian of $(J_{a}(x),Y_{a}(x))$ is
$ W(J_{a}(x),Y_{a}(x)) = \left|
\begin{matrix}
    J_{a}(x) & Y_{a}(x)  \\
    J_{a}'(x) & Y_{a}'(x)
\end{matrix} \right| $ = $J_{a}(x) Y_{a}'(x)-J_{a}'(x)Y_{a}(x)$.
Where $J_{a}(x)$ is the bessel function of the first kind and is defined as $J_{a}(x) = |\dfrac{x} {2}|^a \sum_{k=0} ^{\infty} \dfrac{(-x^2/4)^k} {k! \Gamma(a+k+1)}$. While $Y_{a}$ is bessels function of the second kind and is defined as $ Y_{a}(x) =\dfrac{J_{a}(x) \cos(\pi a)-J_{-a}(x)} {\sin(\pi a).}$.I am using the some fact from my class that the wronskian satisfies $\dfrac{dW} {dx}=\dfrac{-1} {x} W$ which implies $ W(x) = \dfrac{c} {x}$ for some constant C. (I have no idea where this comes from, I tried to "google" Abel's Identity and found nothing like that.  So I am supposed to find $C = lim_{x \rightarrow 0} \; xW(x)$.  Then I suppose I divide the limit I get for $c$ to then divide by $x$ to get the wronskian $W(x)$. Am I thinking about this right? I could not figure out the limit of the Wronskian of this series.How should I proceed? I am looking for mathematical manipulations to solve this, no graduate theory will help since I have no background for this. Just a reference sheet of bessel functions and gamma properties.

What you're looking for in the first place is a solution to the equation
$$
W'(x) = \frac {-1}x W(x).
$$
Note that you can re-write this equation as
$$
(xW(x))' = W(x) + xW'(x) = 0,
$$
which means
$$
xW(x) = C,
$$
hence $W(x) = c/x$.
At this point all you need is to be able to compute the limit of $xW(x) = xW(J_a(X), Y_a(x))$ at only one value $\alpha$ of $\mathbb R$ and/or $\mathbb C$ depending on where you work. If $\alpha = 0$ works fine for you, then so be it ; but another value would work fine too.  After you've computed this limit, you know its value is $C$, so you're done.
Hope that helps,

Take the differential equation that defines them and u get your result from there immediately!


If $A$ and $B$ are events such that $P(A\mid B)=P(B\mid A)$, then If $A$ and $B$ are events such that $P(A\mid B)=P(B\mid A)$, then

(A) $A \subset B$ but $A \neq B$

(B) $A=B$

(C) $A \cap B = \emptyset $

(D) $P(A)= P(B)$

My try

It is given that $P(A\mid B)=P(B\mid A)$

$ \implies \dfrac {P\left( A\cap B\right) }{P\left( B\right) } =\dfrac {P\left( B\cap A\right) }{P\left( A\right) }$

$\implies ( P\left( A\cap B\right))(P(A)-P(B))=0$

$\implies \  either \ P(A)=P(B) \ or \ P(A\cap B)=0$

$\implies \  either \ P(A)=P(B) \ or \ A\cap B=\emptyset$

But the correct answer is P(A)=P(B)

Can anyone explain why $A\cap B=\emptyset$ is wrong?

Your logic implies, either $\mathbb{P}[A] = \mathbb{P}[B]$ or $\mathbb{P}[A \cap B] = 0$. Certainly, if $A \cap B = \emptyset$ the second condition holds, but consider $A \cap B$ being some discrete event out of a continuous probability, so $A \cap B \ne \emptyset$ but $\mathbb{P}[A\cap B] = 0$...

Thus it is possible (i.e. sufficient) that $A\cap B = \emptyset$ but it is not really necessary, and your question's style clearly implies a necessary condition...

Hello Girish Kumar chandora that's a good try but you just missed the point close
What you did is correct to an extent but you have taken
 $P(A∩B)$as common but think about this
If it is given that $P(A∩B)/P(B)=P(B∩A)/P(A)$
Then the $P(A∩B)$ would be cancelled on both L.H.S and R.H.S as they both are same (basic rule in division)
So then u will be left behind with
$P(A)=P(B)$


Prove that if $d$ divides $n$ then $φ(d)$ divide $φ(n)$ for $φ$ denotes Euler’s φ-function. Prove that if $d$ divides $n$ then $φ(d)$ divide $φ(n)$ for $φ$ denotes Euler’s $φ$-function.

I know that $d|n$ mean there exists some integer $k$ such that $n=kd$, but how can I use this to prove $φ(d)$ divide $φ(n)$

It is true for $\rm\color{#0a0}{prime\ powers}$, so for all naturals, because  $\phi$ is $\color{#c00}{\rm multiplicative},$ i.e. $\,\phi(ab) = \phi(a)\phi(b)\,$ for coprime $a,b,\,$ therefore $\ \phi(p_1^{n_1}\cdots p_k^{n_k}) = \phi(p_1^{n_1})\cdots \phi(p_k^{n_k})\,$ for distinct primes $\,p_i$. Explicitly

$$\begin{eqnarray} &&\qquad\qquad\qquad\ \ \ p^i \cdots q^j\ \mid\  p^I\cdots q^J\quad\ {\rm for\ distinct\ primes}\ \ p,\ldots, q \\
\Rightarrow\ &&\qquad \quad\ \ \color{#0a0}{p^i\mid p^I},\qquad\quad\ \ldots,\qquad\quad \ \  q^j\mid q^J \\
\Rightarrow\ &&\color{#0a0}{(p\!-\!1)p^{i-1}\mid (p\!-\!1)p^{I-1}},\ldots,(q\!-\!1)q^{j-1}\mid (q\!-\!1)q^{J-1} \\
\Rightarrow\ &&\qquad\ \color{#0a0}{\phi(p^i)\mid \phi(p^I)},\qquad\ldots,\qquad\,\phi(q^j)\mid\phi(q^J)\\
\Rightarrow\  &&\qquad\qquad\ \, \phi(p^i)\cdots\phi(q^j)\mid \phi(p^I)\cdots\phi(q^J)\\
\Rightarrow\  &&\qquad\qquad\qquad\!\phi(p^i\cdots q^j)\mid \phi(p^I\cdots q^J)\quad\ \   \rm by\ \phi\ is\ \color{#c00}{multiplicative}
\end{eqnarray}$$

Remark $\,\ $ Similarly, generally a "multiplicative" statement about a multiplicative function is true if it is true for prime powers.

You may know that $\phi(pd)=p\phi(d)$ and $\phi(pd)=(p-1)\phi(d)$ if $p\not\mid d$ (where $p$ is a prime).


Linear algebra: Finding the number of parameters of a system given dimensions and rank Suppose the system Ax = b is consistent and A is a 6 x 7 matrix and rank(A) = 2. How many parameters does the system have?

Since the rank is the number of non zero rows, there will be 4 zero rows (the number of rows is 6, the rank is 2, another 4 are zero rows). Each zero row represents 1 parameter. Therefore there will be 4 parameters. Consistent means either many solutions or unique solution.


trigonometric angle tangent identity, a and b are equivalent? I have a question about trigonometric angle identities.

if $\tan(a)=\cot(b)$

can I say $a=b$?

$a$ and $b$ are in rads respectively. Thanks for your help.

Then: $\dfrac{sina}{cosa} = \dfrac{cosb}{sinb} \to cosa\cdot cosb - sina\cdot sinb = 0 \to cos(a+b) = 0 \to a+b = (2n+1)\cdot \dfrac{\pi}{2}$, $n \in \mathbb{Z}$

No probably not as -
$$tan (a) = cot (b)$$
$$\implies tan (a) = 1/tan(b)$$
$$\implies tan (a) tan(b)=1 $$
$$\implies 1-tan(a)tan(b)=0 ...\alpha$$
Now
$$\begin{align}
\tan(a+b)&=\frac{tan(a)+tan(b)}{1-tan(a) tan(b)}\\\end{align}$$
But from $\alpha$ we have
$$1-tan(a)tan(b)=0$$
$$\implies tan(a+b)=\infty$$
$$\implies a+b=arctan\infty$$
$$\implies a+b=90$$
$$\implies a=90-b$$
So if $$tan(a)=cot(b)$$,then $$a=90-b$$


2 Right triangles, which ratio is equal to 1? Say you have a right triangle, you know the length of the 2 sides of the 90 degree corner (so you know everything, the hypotenuse and all 3 angles). Inside this triangle, you draw a line (not the height) so you create 2 new (non-similar) triangles: 1 new right triangle and another one.

Is there something that the original big right triangle (ABD) and the new smaller triangle (ABC) have in common? I am looking for a ratio that stays constant, using some property of both triangles: angles, surface, circumference, inside circle ratio, height,... I.e. the ratio of some function of alpha / (AC/AE) = that function of beta / (AD/AF), something like that, or BC/BD= ...* some function (alpha/Beta), or ... I've looked at http://en.wikipedia.org/wiki/Right_triangle, but it's not clear to me. Thanks for the help!

There is nothing that the two triangles have in common.

Execpt one line and the right angle, but nothing else. It's a complete new triangle. There aren't any ratios or something else, that stays constant.

That wouldn't be logical.

You know, that (using Pythagorean theorem)
$$\sqrt{AC^2-BC^2} = \sqrt{AD^2-BD^2}$$

In the $\triangle ABC$, $BE^2=AE*EC$

we, have $BE^2=BC^2-EC^2=AE*EC$

i.e. $BC^2=AC*EC$ -------(1)

In the $\triangle ACD$, $CF^2=AF*FD$

we, have $CF^2=CD^2-FD^2$

i.e. $CD^2=AD*FD$ -------(2)

Let, $a$=AREA of $\triangle ABC=\frac{1}{2}(BC)*(AB)$

Let, $b$=AREA of $\triangle ABD=\frac{1}{2}(BD)*(AB)$

we, now have, $\frac{a}{b}=\frac{BC}{BD}$ -------(3)

we, also have, $\frac{b-a}{a}=\frac{CD}{BC}$ -------(4)

$\frac{\tan\alpha}{\tan\beta}=\frac{a}{b}$

$\tan(\beta-\alpha)=\frac{1-\frac{\tan\alpha}{\tan\beta}}{\frac{1}{\tan\beta}+{\tan\alpha}}$

$\tan(\beta-\alpha)=\frac{1-\frac{a}{b}}{\frac{a}{b\tan\alpha}+{\tan\alpha}}$

$\tan(\beta-\alpha)=\frac{b-a}{\frac{a}{\tan\alpha}+{b\tan\alpha}}$

$\tan(\beta-\alpha)=\frac{(b-a)\tan\alpha}{a+b({\tan\alpha})^2}$

$\frac{\tan(\beta-\alpha)}{b-a}=\frac{\tan\alpha}{a+b({\tan\alpha})^2}$


Is there a number that's right in the middle of this interval $(0, 1)$? This might seem like a silly question, but is there a number that's right in the middle of this interval $(0, 1)$?

And the half-open intervals: $(0, 1]$, $[0, 1)$? I know for a fully closed interval $[0, 1]$ it's $1/2$ because that's half the length of the interval but for $(0 ,1)$, I can't say. What's the interval's length? Certainly not $1$.

Edit: In response to the comment below: I said, in my mind, it can't be $1$ because that that length of the interval $[0, 1]$, and that's not the same as $(0, 1)$. I suppose it approaches 1, but that's not the same, or is it?

And I think by 'length' I mean the the difference in the end points: $|x_2 - x_1|$. $(0, 1)$ does't include $0$ or $1$. There are no end-points to subtract!

To answer this question, you need to first answer the following question. $$\text{What is the `length' of a single point?}$$
If you take it to be zero, then note that $$[0,1] = \{0\} \cup (0,1) \cup \{1\}$$
And assuming that length of these disjoint sets can be added, we get that the length of the interval $(0,1)$ is the same as the length of the interval $[0,1]$.

No one has actually defined the length of an interval precisely. Any interval can be written in exactly on of the forms: (a,b) or (a,b] or [a,b) or [a,b], where b >= a. In any of the 4 cases, call the interval I, a subset of R. Then define the length of the interval to be sup{x: x is in I} - inf{x: x is in I}.


Probability of a coin falling within a tile Consider the following question:
Question

I considered leaving a border of 3 cm on each side of the tile.
Image

Now if the center of the coin falls anywhere within this region, the coin stays inside the tile. Otherwise it moves, fully or partly, outside the tile.

So favourable area = 4*4 = 16

Area of sample space = 10*10 = 100

Probability = 16/100 = 0.16

But the correct answer is 0.36

Could anyone please explain?

(My previous answer was wrong - we all make mistakes, as suggested in this new response)

You seem to be correct to be concerned

Your calculation is effectively $\dfrac{(10-2\times 3)^2}{10^2}=\dfrac{4^2}{10^2}=0.16$ and looks sensible

There are two obvious ways to get $0.36 =\dfrac{6^2}{10^2}$, either as $\dfrac{(10-2\times 2)^2}{10^2}$  or as  $\dfrac{(2\times 3)^2}{10^2}$, where the former uses the wrong radius of the coin and the latter fails to subtract from the side of the square.  Both would be wrong, and I would guess that both errors could be possible


Quadratic Equality Constraints via SDP I want to know if it is possible to solve a QCQP problem with quadratic equality constraints in SDP. I know it is possible to convert a QCQP to an SDP by using the Shur complement. The following worked for me thus far:
$$
\begin{equation}
\begin{array}{cccccc}
\underset{x}{min} & x^{T}Q_{0}x+q_{0}^{T}x+c_{0} &  & \underset{t,x}{min} & t\\
s.t & x^{T}Q_{i}x+q_{i}^{T}x+c_{i}\leq0 & \Longleftrightarrow & s.t & \left(\begin{array}{cc}
I & M_{0}x\\
x^{T}M_{0}^{T} & -c_{0}-q_{0}^{T}x+t
\end{array}\right) & \succeq0\\
 &  &  &  & \left(\begin{array}{cc}
I & M_{i}x\\
x^{T}M_{i}^{T} & -c_{i}-q_{i}^{T}x
\end{array}\right) & \succeq0\\
 & i=1,2,...,m &  &  & i=1,2,...,m &
\end{array}
\end{equation}
$$
Where $M_{j}M_{j}^{T}=Q_{j}$ (Eigen Decomposition can also be used, thanks Alt)

However it seems this only applies to quadratic inequality constraints.

I considered converting the desired inequality constraints to equalities by using slack variables but I think that technique only works with linear constraints.
I also considered having two constraints like:
$$
\begin{equation}
\begin{array}{c}
x^{T}Qx+q^{T}x+c\leq0\\
-(x^{T}Qx+q^{T}x+c)\leq0
\end{array}
\end{equation}
$$
To force an equality but the second constraint is not convex so it wont work.

So is there another way to do it?

Edit: turns out quadratic equality constraints are non-convex thus cant be solved directly with this approach

Hint:

You don't need the constraints $M_{j}M_{j}^{T}=Q_{j}$. For example if $UDU^T$ is the eigen decomposition of $Q_j$, Then $M_j=UD^{\frac{1}{2}}$ (if $Q_j$ is symmetric)

Note that if you introduce new variable $M_j$, then the bilinear forms in the constraints make your problem non-convex, (Besides the fact that equality constraints with quadratic  form  $M_{j}M_{j}^{T}=Q_{j}$that you have to  add also makes the problem non-convex.)

I cannot see why you should convert a QCQP in an SDP problem. You may want instead to move to a SOCP formulation, which is usually more robust and enjoy a simpler duality theory.

Solvers for QCQP are far more efficient and reliable than SDP ones.


Calculate the sum of first $n$ natural numbers taken $k$ at a time So sum of first $n$ natural numbers taken $1$ at a time is $n\cdot(n+1)/2$
but what about $2,3,\dots,k$ at a time?
Is there a general formula?

For example, taking 1 at a time
$$\sum_{i = 1}^{n} i = \frac{n(n+1)}{2}$$

taking 2 at a time
$$\sum_{i = 1}^{n}\sum_{j = 1}^{n - i} i\cdot(i+j) = \frac{1}{24} n(n+1)(n-1)(3n+2)$$

taking 3 at a time
$$\sum_{i = 1}^{n}\sum_{j = 1}^{n - i}\sum_{h = 1}^{n - j - i} i\cdot(i+j)\cdot(i + j +h) = \frac{1}{48} n^2(n+1)^2(n-1)(n-2)$$

taking $k$ at a time?

Overview: This answer consists of three parts

  At first we develop summation formulae for slightly different $k$-fold sums for $k=1,2,3$. We take indices starting from $0$ instead of $1$, which makes calculation somewhat more convenient.
  We obtain for general $k\geq 1$ a nice expression of the $k$-fold sum
  \begin{align*}
\sum_{i_1=0}^{n}\sum_{i_2=0}^{n-i_1}&\ldots\sum_{i_k=0}^{n-i_1-i_2-\ldots-i_{k-1}}i_1(i_1+i_2)\cdots(i_1+i_2+\ldots+i_k)\\
\end{align*}
  as sum of binomial coefficients .
  We look at the difference of the $k$-fold sums when starting from $0$ and when starting from $1$.

Hint: If you are not familiar with generating functions you might want to look at the backstage info at the end of this answer.

  Part 1: Summation formula for $k=1,2,3$ and start index $0$

  The following is valid

  \begin{align*}
\sum_{i=0}^ni&=\binom{n+1}{2}=\frac{1}{2}n(n+1)\tag{1}\\
\sum_{i=0}^n\sum_{j=0}^{n-i}i(i+j)&=\binom{n+3}{4}+2\binom{n+2}{4}\\
&=\frac{1}{24}n(n+1)(n+2)(3n+1)\tag{2}\\
\sum_{i=0}^n\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i(i+j)(i+j+k)&=\binom{n+5}{6}+8\binom{n+4}{6}+6\binom{n+3}{6}\\
&=\frac{1}{48}n^2(n+1)^2(n+2)(n+3)\tag{3}\\
\end{align*}

Note, the representation of binomial coefficients looks promising, cause a pattern for $k>3$ can easily be derived. We will see in Part 2, that the multiplicities of the binomial coefficients also follow a well-known pattern.

In order to show these formulae we need a repertoire of $\left(x\frac{d}{dx}\right)^k\frac{1}{1-x}$ for $k=1,\ldots,3$.

We obtain
\begin{align*}
\left(x\frac{x}{dx}\right)\frac{1}{1-x}&=\frac{x}{(1-x)^2}
=\sum_{n=0}^{\infty}nx^n\\
\left(x\frac{x}{dx}\right)^2\frac{1}{1-x}&=\frac{x(1+x)}{(1-x)^3}
=\sum_{n=0}^{\infty}n^2x^n\\
\left(x\frac{x}{dx}\right)^3\frac{1}{1-x}&=\frac{x(1+4x+x^2)}{(1-x)^4}
=\sum_{n=0}^{\infty}n^3x^n\\
\end{align*}

It's also convenient to use the coefficient of operator $[x^n]$ to denote the coefficient of $x^n$ in a generating series.

  We obtain for $k=1$
  \begin{align*}
\sum_{i=0}^{n}i&=\sum_{i=0}^{n}i\cdot1\\
&=\sum_{i=0}^n[x^i]\left(x\frac{x}{dx}\right)\frac{1}{1-x}[x^{n-i}]\frac{1}{1-x}\tag{4}\\
&=\sum_{i=0}^n[x^i]\frac{x}{(1-x)^2}[x^{n-i}]\frac{1}{1-x}\\
&=[x^n]\frac{x}{(1-x)^3}\tag{5}\\
&=[x^n]x\sum_{k=0}^{\infty}\binom{-3}{k}(-x)^k\\
&=[x^{n-1}]\sum_{k=0}^{\infty}\binom{k+2}{2}x^k\tag{6}\\
&=\binom{n+1}{2}\\
&=\frac{1}{2}n(n+1)
\end{align*}
  and (1) follows.

Comment:

In (4) we use $$i=[x^i]\sum_{k=0}^{\infty}kx^x=[x^i]\left(x\frac{x}{dx}\right)\frac{1}{1-x}$$ and $$1=[x^{n-i}]\sum_{k=0}^{\infty}x^k=[x^{n-i}]\frac{1}{1-x}$$
In (5) we use $[x^n]A(x)B(x)=\sum_{i=0}^{n}\left([x^i]A(x)\right)\left([x^{n-i}]B(x)\right)$
In (6) we use the formula $\binom{-n}{k}=\binom{n+k-1}{k}(-1)^k=\binom{n+k-1}{n-1}(-1)^k$

  We obtain for $k=2$
  \begin{align*}
\sum_{i=0}^{n}&\sum_{j=0}^{n-i}i(i+j)\\
&=\sum_{i=0}^ni^2\sum_{j=0}^{n-i}1+\sum_{i=0}^ni\sum_{j=0}^{n-i}j\\
&= \sum_{i=0}^n[x^i]\left(x\frac{x}{dx}\right)^2\frac{1}{1-x}[x^{n-i}]\frac{1}{(1-x)^2}\\
&\qquad+\sum_{i=0}^n[x^i]\left(x\frac{x}{dx}\right)\frac{1}{1-x}[x^{n-i}]\frac{1}{1-x}\left(x\frac{x}{dx}\right)\frac{1}{1-x}\\
&= \sum_{i=0}^n[x^i]\frac{x(1+x)}{(1-x)^3}[x^{n-i}]\frac{1}{(1-x)^2}+\sum_{i=0}^n[x^i]\frac{x}{(1-x)^2}[x^{n-i}]\frac{x}{(1-x)^3}\\
&=[x^n]\frac{x+2x^2}{(1-x)^5}\\
&=\left([x^{n-1}]+2[x^{n-2}]\right)\sum_{k=0}^{\infty}\binom{-5}{k}(-x)^k\\
&=\left([x^{n-1}]+2[x^{n-2}]\right)\sum_{k=0}^{\infty}\binom{k+4}{4}x^k\\
&=\binom{n+3}{4}+2\binom{n+2}{4}\\
&=\frac{1}{24}n(n+1)(n+2)(3n+1)
\end{align*}
  and (2) follows.

$$ $$

  We obtain for $k=3$
  \begin{align*}
\sum_{i=0}^{n}&\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i(i+j)(i+j+k)\\
&=\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}(i^3+2i^2j+i^2k+ij^2+ijk)\\
&=\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}(i^3+4i^2j+ijk)\tag{7}\\
&=\sum_{i=0}^{n}i^3\sum_{j=0}^{n-i}1\sum_{k=0}^{n-i-j}1
+4\sum_{i=0}^{n}i^2\sum_{j=0}^{n-i}j\sum_{k=0}^{n-i-j}1\tag{8}\\
&\qquad+\sum_{i=0}^{n}i\sum_{j=0}^{n-i}j\sum_{k=0}^{n-i-j}k\\
\end{align*}

Note, in (7) we use the symmetry
\begin{align*}
\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i^2j
=\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i^2k
=\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}ij^2
\end{align*}

The calculation of the three sums in (8) is straight forward and can be done similarly to $k=1,2$.

  We obtain

  \begin{align*}
\sum_{i=0}^{n}i^3\sum_{j=0}^{n-i}1\sum_{k=0}^{n-i-j}1&=[x^n]\frac{x(1+4x+x^2)}{(1-x)^7}
=\binom{n+3}{6}+4\binom{n+4}{6}+\binom{n+5}{6}\\
\sum_{i=0}^{n}i^2\sum_{j=0}^{n-i}j\sum_{k=0}^{n-i-j}1&=[x^n]\frac{x^2(1+x)}{(1-x)^7}
=\binom{n+4}{6}+\binom{n+3}{6}\\
\sum_{i=0}^{n}i\sum_{j=0}^{n-i}j\sum_{k=0}^{n-i-j}k&=[x^n]\frac{x^3}{(1-x)^7}
=\binom{n+3}{6}\\
\end{align*}

  Combining  the three sums according to (7) results in

  \begin{align*}
\sum_{i=0}^{n}\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}(i^3+4i^2j+ijk)
&=6\binom{n+3}{6}+8\binom{n+4}{6}+\binom{n+5}{6}\\
&=\frac{1}{48}n^2(n+1)^2(n+2)(n+3)
\end{align*}
  and the claim (3) follows.

$$ $$

  Part 2: Summation formula for all $k\geq 1$ and startindex $0$.

  In the following we don't give a proof for general $k$, but we provide some aspects which give strong evidence for the correctness of the claim.

  When looking at

  \begin{align*}
\sum_{i=0}^ni&=\color{blue}{1}\binom{n+1}{2}\\
\sum_{i=0}^n\sum_{j=0}^{n-i}i(i+j)&=\color{blue}{1}\binom{n+3}{4}+\color{blue}{2}\binom{n+2}{4}\\
\sum_{i=0}^n\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i(i+j)(i+j+k)&=\color{blue}{1}\binom{n+5}{6}+\color{blue}{8}\binom{n+4}{6}+\color{blue}{6}\binom{n+3}{6}\\
\end{align*}
  the shape of the binomial coefficients can be easily generalized. The coefficients
  \begin{align*}
\color{blue}{1};\quad \color{blue}{1},\color{blue}{2};\quad \color{blue}{1},\color{blue}{8},\color{blue}{6}
\end{align*}
  are part of the OEIS sequence A008517 and give the values of the Second order Eulerian Triangle $T(k,l),1\leq l\leq k$.

The values $T(4,l), 1\leq l\leq 4$ are $\color{blue}{1},\color{blue}{22},\color{blue}{58},\color{blue}{24}$ and indeed, it is easy to verify that

\begin{align*}
\sum_{i=0}^n&\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}\sum_{l=0}^{n-i-j-l}i(i+j)(i+j+k)(i+j+k+l)\\
&=
\color{blue}{1}\binom{n+7}{8}+\color{blue}{22}\binom{n+6}{8}+\color{blue}{58}\binom{n+5}{8}+\color{blue}{24}\binom{n+4}{8}
\end{align*}

  We are now in the position to

  Claim: The following formula of the $k$-fold sum is valid
  \begin{align*}
\sum_{i_1=0}^{n}\sum_{i_2=0}^{n-i_1}&\ldots\sum_{i_k=0}^{n-i_1-i_2-\ldots-i_{k-1}}i_1(i_1+i_2)\cdots(i_1+i_2+\ldots+i_k)\\
&=\sum_{l=1}^{k}\color{blue}{T(k,l)}\binom{n+2k-l}{2k}\tag{9}
\end{align*}
  with $T(k,l)$ the numbers of the second order Eulerian Triangle (A008517).

$$ $$

  Part 3: Summation formula for all $k\geq 1$ and startindex $1$.

  Finally some aspects about the summation formula with indices starting with $1$.

  When looking at the differences of
  \begin{align*}
\sum_{i=0}^ni&-\sum_{i=1}^ni=0\\
\sum_{i=0}^n\sum_{j=0}^{n-i}i(i+j)&-\sum_{i=1}^n\sum_{j=1}^{n-i}i(i+j)=\frac{1}{6}n(n+1)(2n+1)\\
\sum_{i=0}^n\sum_{j=0}^{n-i}\sum_{k=0}^{n-i-j}i(i+j)(i+j+k)&-
\sum_{i=1}^n\sum_{j=1}^{n-i}\sum_{k=1}^{n-i-j}i(i+j)(i+j+k)\\
&\qquad=\frac{1}{12}(n+1)^2(n+2)^2(2n+3)\\
\end{align*}

  we can find them as A000330 ($k=2)$ and as A108674 ($k=3)$ in the OEIS database.

  Some further elaboration could be to look for a difference formula for general $k$ and combine it with the result of (9) to obtain a nice expression for OPs $k$-fold sum with indices starting from $1$.

Backstage info:

You might want to skip this section, if generating functions are already known.

When looking at the $2$-fold sum
\begin{align*}
\sum_{i=1}^n\sum_{j=1}^{n-i}i(i+j)=\sum_{i=1}^n\left(i^2\sum_{j=1}^{n-i}1\right)+\sum_{i=1}^n\left(i\sum_{j=1}^{n-i}j\right)
\end{align*}
the outer sum has the shape of a Cauchy product
\begin{align*}
\sum_{i=0}^{n}a_ib_{n-i}
\end{align*}
with index $i$ starting at $1$ instead of $0$.

Since we want to use generating functions $A(x)=\sum_{n= 0}^{\infty}a_nx^n$ to derive the summation formulae, and the product of generating function

\begin{align*}
A(x)B(x)=\sum_{k= 0}^{\infty}a_kx^k\sum_{l= 0}^{\infty}b_lx^l
= \sum_{n= 0}^{\infty}\left(\sum_{k=0}^{n-k}a_kb_{n-k}\right)x^n
\end{align*}
 gives Cauchy products, we consider $k$-fold sums with index starting from $0$ instead.

This is interesting by its own and later we can look at the difference to $k$-fold sums with indices starting from $1$.

We can successively apply the $\left(x\frac{d}{dx}\right)$-operator to a generating function $A(x)$ to obtain

\begin{align*}
  \left(x\frac{d}{dx}\right)A(x)&=\sum_{n=0}^{\infty}na_nx^n\\
  \left(x\frac{d}{dx}\right)^2A(x)&=\sum_{n=0}^{\infty}n^2a_nx^n
  \end{align*}

Multiplication of $A(x)$ with $\frac{1}{1-x}$ results in summing up the coefficients $a_n$
\begin{array}{crl}
  (a_n)_{n\geq 0}\qquad &\qquad A(x)=&\sum_{n=0}^{\infty}a_nx^n\\
  \left(\sum_{k=0}^{n}a_k\right)_{n\geq 0}\qquad&\qquad\frac{1}{1-x}A(x)=&\sum_{n=0}^{\infty}\left(\sum_{k=0}^{n}a_k\right)x^n
  \end{array}

This is quite easy if you keep one term constant then its simply $$\sum c.\sum \frac{(n)(n+1)}{2}-(\sum c\sum k)$$  where $c$ is the constant term and $n=c+1$ and $k=1..c$ for you example $c=1..4,n=1..5\ \text{and}\ k=i$ and if its random I hardly think there exists a method.


How to graph a Quadratic equation. I have an equation that goes: $0.0001x^2 - 0.22x + 197$. I'm not asking for the answer, but instead, how can I graph it without dealing with these insanely tough numbers.

As suggested by Claude Leibovici, you can define $x=100X$. Then you have

$$\begin{array}{ll} 0.0001x^2−0.22x+197 &= 0.0001\cdot (100X)^2−0.22\cdot 100X+197 \\ & = X^2+22X+197\end{array} $$

which is easier to work with.


Why is $\int_{0}^{2\pi} |\sin x| dx = 4$ I can't understand why $$\int_{0}^{2\pi} |\sin x| dx = 4$$while
$$\int_{0}^{2\pi} \sin x dx = 0$$
I did the calculus for the second varian but I can't reach result $4$ for the first integral. Thank you for helping.

It's simple: $\sin x$ on a single period has a "hill" between $0$ and $\pi$ and symmetrically, a "valley" between $\pi$ and $2\pi$. So the integrals cancel out. On the other hand, integration of $|\sin x|$ has to be split to a sum of integrals, where on the second part, the sign is reversed to produce two "hills". Because of symmetry, the integrals over half periods are the same:

$$\int_0^{2\pi} |sin x|{\,\rm d}x=2\int_0^\pi \sin x{\,\rm d}x$$


Finding the largest factorial with only three distinct decimal digits I want to find the largest factorial whose decimal representation contains only three distinct digits. I am using the following Python code to compute the above, but no results up to 16000!:

def check(x):
    s=str(x)
    m=0
    if s.count('0')>0:
        m=m+1
    if s.count('1')>0:
        m=m+1
    if s.count('2')>0:
        m=m+1
    if s.count('3')>0:
        m=m+1
    if s.count('4')>0:
        m=m+1
    if s.count('5')>0:
        m=m+1
    if s.count('6')>0:
        m=m+1
    if s.count('7')>0:
        m=m+1
    if s.count('8')>0:
        m=m+1
    if s.count('9')>0:
        m=m+1
    if m==3:
        return True
    else:
        return False
dp=[1,2]
for i in range(3,99999):
    x=dp[i-2]*i
    if check(x)==True:
        print x
    dp.append(x)

Is there a better approach?

Update:

Here is a table of the first $50$ factorials (in base 10 = decimal representation): link.

Its format is
$$
n: (n!)_{10}, l=\mbox{number of places}, di =\mbox{number of diverse digits}
$$

As noted by fellow user vuur in the comments, the number of diverse digits of $(n!)_{10}$ is listed in OEIS as A137580. The related sequence of non pandigital numbers (pandigital number = number with all digits of the base occurring) A182049 is conjectured to end with entry $n=41$.

Following is an heuristic argument, why it is likely that for larger $n$ the decimal representation $(n!)_{10}$ is pandigital, and thus not tridigital anymore, as searched for in the question, making 7! candidate for the largest tridigital factorial.

For this we need to look at the development of a fixed place $k$ with increasing $n$, e.g. $k = 3$, counting from the end of the string, first index being a zero.

This place is implicitly zero until $n = 7$, where $(n!)_{10}$ got large enough to reach this place and it takes the digit $d_3 = 5$, then changes its values a couple of times until it will stay $0$ for $n \ge 16$.
$$
d_3^{(n)}: 0, 0, 0, 0, 0, 0, 0, 5, 0, 2, 8, 6, 1, 0, 1, 8, 8, 6, 8, 2, 0, 0, 0, \ldots
$$
All places will sooner or later stay at the digit $0$ because the number of zeroes at the end of $n!$ grows with increasing $n$, as new factors $n$ introduce new factors $2$ and $5$ to the factorial, the number of trailing zeroes of $(n!_{10})$ corresponding to the power $j$ in $5^j$ of the prime factorization of $n!$.

The place $k = 3$ has a run of $r_3 = 13$ variable digits until it gets flooded by the trailing zeroes. As the length of $(n!)_{10}$ seems to grow faster than the number of trailing zeroes, those runs $r_k$ should get longer for places with increasing $k$.

The digits change with increasing $n$ from $d_k^{(n)}$ to $d_k^{(n+1)}$ according to the multiplication with carry algorithm is:
\begin{align}
d_0^{(n+1)} &= (n+1) \cdot d_0^{(n)} \mod 10 \\
d_k^{(n+1)} &= \left((n+1)\cdot d_k^{(n)} + c_k^{(n)}\right) \mod 10 \\
c_0^{(n)} &= 0 \\
c_{k+1}^{(n)} &= \left((n+1) \cdot d_k^{(n)} + c_k^{(n)}\right)
                 - 10 \cdot d_k^{(n+1)}
\end{align}
The above recursion scheme is similar to the one used in linear congruential pseudo random number generators
or MWC generators.

The quality of the random numbers regarding their cycle length (they go into a cycle after length iterations) or the distribution of their generated numbers varies with the choice of the parameters and initial value.

My heuristic argument is, that the digits $d_k^{(n)}$ of $(n!)_{10}$ behave similar like those pseudo random number generators and the longer the $(n!)_{10}$ string gets with increasing $n$, the more of those generators get introduced and start generating until caught by the flood of trailing zeroes. Nonetheless their number increases with increasing $n$ and they vary with parameters and initial values. So they produce all base digits, turning $(n!)_{10}$ pandigital. It would be highly unlikely that all those generators are such synched for a certain $n^*$ that they stick just to $3$ digits out of the $10$ possible.

My guess is that if one would apply the statistical tools of the analysis of pseudorandom number generators to the digits evolution of $(n!)_{10}$ one could show or at least better argue for this argument.