text stringlengths 1 2.12k | source dict |
|---|---|
# Find a conformal map from semi-disc onto unit disc
This comes straight from Conway's Complex Analysis, VII.4, exercise 4.
Find an analytic function $f$ which maps $G:=$ {${z: |z| < 1, Re(z) > 0}$} onto $B(0; 1)$ in a one-one fashion.
$B(0;1)$ is the open unit disc.
My first intuition was to use $z^2$, which does the job splendidly, except for the segment $(-1,0] \subset B(0;1)$. Under $z^2$, the pre-image for this segment is the segment $[-i,i]$, which is not in $G$.
My next thought is to modify $z^2$, something like $a(z-h)^2+k$. I've yet to work out the details, but my gut tells me this isn't the right idea.
I've been teaching myself conformal maps in preparation for a qualifying exam. So, if there's a shockingly basic, obvious solution... please patronize me.
• One thought (which I mostly pose from intuition) is seek a conformal map which maps $G$ to the right half-plane; from there it's not hard to map the right-half plane to $B(0;1)$ by a rotation. – Semiclassical Jul 30 '14 at 2:20
## 2 Answers
The following trick works for any region bounded by two circular arcs (or a circular arc and a line).
Find the points of intersection of the arc and the line. (Here, they're $i$ and $-i$.) Now pick a Mobius transformation that takes one of those points to $0$ and the other to $\infty$; here $z \mapsto \frac{z-i}{z+i}$ works. Then the arc and the line go to two rays (because a Mobius transformation sends circles in $S^2$ to circles in $S^2$, and the only circles in $S^2$ that goes through both $0$ and $\infty$ is a line in $\Bbb C$), both starting at $0$ and going off the $\infty$. Your domain maps to the region bounded by these two rays. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126500692714,
"lm_q1q2_score": 0.8503317665957357,
"lm_q2_score": 0.8688267864276107,
"openwebmath_perplexity": 399.3817618980585,
"openwebmath_score": 0.7189393043518066,
"tags": null,
"url": "https://math.stackexchange.com/questions/882147/find-a-conformal-map-from-semi-disc-onto-unit-disc/882199"
} |
Let's compute the rays. It suffices to find where a single point on each arc maps; if $z_0$ is on the arc, the ray will be $\{f(z_0)t : 0 \leq t < \infty\}$. I say we pick $0$ to be our point of choice on $Re(z) = 0$ and $1$ to be the point of choice for the circular arc. These are mapped to $-1$ and $-I$ respectively; so our two arcs are the negative real axis and the negative imaginary axis. I'd like the "lower" arc to be the positive real axis, so let's multiply by $-1$ to do this.
So we have a conformal map from your half-disc to the upper-right quadrant given by $z \mapsto -\frac{z-i}{z+i}$. The upper half-plane is nicer, so let's map to that by squaring; now we have a map to the upper half plane given by $z \mapsto \frac{(z-i)^2}{(z+i)^2}$. (For other regions bounded by rays that make different angles, you get to the upper half plane by a $z \mapsto z^\beta$ for the appropriate $\beta$.)
Now there's a standard map from the upper half plane to the unit disc given by $z \mapsto \frac{z-i}{z+i}$. Composing this with our last map gives us a map from the semi-disc to the unit disc, given by $$z \mapsto -i\frac{z^2+2z-1}{z^2-2z-1}.$$
• This is more insightful. I'll delete my answer. – user138530 Jul 30 '14 at 3:06
• For fun, I added the images of your mappings as a community wiki answer. Enjoy! – Semiclassical Jul 30 '14 at 3:15
• @ChristianRemling I appreciate the compliment! – user98602 Jul 30 '14 at 3:15
• It might be worth noting that, even before computing the two rays (the negative real and imaginary axes), you knew that they had to be perpendicular, because conformal maps preserve angles. So you already know that the next step should be squaring and that it would produce a half-plane. The details of the rays and the half-plane are needed only at the very end, when you map the half-plane to the disk. – Andreas Blass Jul 30 '14 at 4:04
• @AndreasBlass That's definitely worth noting - thanks for commenting. – user98602 Jul 30 '14 at 4:31 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126500692714,
"lm_q1q2_score": 0.8503317665957357,
"lm_q2_score": 0.8688267864276107,
"openwebmath_perplexity": 399.3817618980585,
"openwebmath_score": 0.7189393043518066,
"tags": null,
"url": "https://math.stackexchange.com/questions/882147/find-a-conformal-map-from-semi-disc-onto-unit-disc/882199"
} |
As a supplement to the fine answers provided, here are the pictures of the conformal maps themselves:
We start with the right half of the unit disk, map it to the upper right quadrant, square this to the upper half-plane, and finally rotate onto the unit disk.
Per requests for code - the basic pattern to generate the image of a polar region $$a\leq r \leq b$$ and $$\alpha \leq \theta \leq \beta$$ under a function $$f$$ in Mathematica is:
ParametricPlot[{Re[f[r*Exp[I*theta]]], Im[f[r*Exp[I*theta]]]},
{r, a, b}, {theta, alpha, beta}, Mesh -> True]
The pictures above may be generated with the following code block:
phi1[z_] = -(z - I)/(z + I);
f[z_] = z^2;
phi2[z_] = (z - I)/(z + I);
nestedFunctions =
Composition @@@ Table[Take[{phi2, f, phi1}, -k], {k, 0, 3}];
pics = Table[
ParametricPlot[{Re[g[r*Exp[I*theta]]], Im[g[r*Exp[I*theta]]]},
{r, 0, 1}, {theta, -Pi/2, Pi/2},
Mesh -> True, PlotRange -> 2, ImageSize -> 360],
{g, nestedFunctions}];
Grid[Partition[pics, 2]]
You can find a lot more information on visualizing complex function with Mathematica in this notebook.
• It appears I can only choose one answer, but I think these images are just as essential to the solution as the explanation. With what program did you generate them? – artificial_moonlet Jul 30 '14 at 15:06
• It's from Mathematica. I'll incorporate the code for them when I get the chance. (Also, I should note that this really isn't a proper answer since I didn't remember the proper conformal maps until I saw the other answers. Hence why I did this as a community wiki answer.) – Semiclassical Jul 30 '14 at 15:08
• As a rookie mathematica user I would find it usefully to see the code for these types of mappings. – coffeebelly Oct 4 '14 at 19:10
• I wonder if you can still recall the code :) – snulty Jan 11 '17 at 8:15
• @snulty Code has been posted, if you are still interested. – Mark McClure Dec 8 '18 at 17:08 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126500692714,
"lm_q1q2_score": 0.8503317665957357,
"lm_q2_score": 0.8688267864276107,
"openwebmath_perplexity": 399.3817618980585,
"openwebmath_score": 0.7189393043518066,
"tags": null,
"url": "https://math.stackexchange.com/questions/882147/find-a-conformal-map-from-semi-disc-onto-unit-disc/882199"
} |
# Thread: Assistance with sketching relations
1. ## Assistance with sketching relations
The question:
Sketch the set of points (x, y) which satisfy the following relations:
0 <= y <= 2x and 0 <= x <=2
I have no idea where to start. Is there a way to simultaneously equate them? Is the process supposed to be intuitive? I can't get my head around it.
Any guidance would be greatly appreciated.
2. Originally Posted by Glitch
The question:
Sketch the set of points (x, y) which satisfy the following relations:
0 <= y <= 2x and 0 <= x <=2
I have no idea where to start. Is there a way to simultaneously equate them? Is the process supposed to be intuitive? I can't get my head around it.
Any guidance would be greatly appreciated.
Hi Glitch,
If x (domain) is between 0 and 2, inclusive,
then y (range) is between 0 and 4, inclusive.
Sketch 0 to 2 on the x-axis, and 0 to 4 on the y-axis.
Complete the rectangle with corners at (0, 0), (0, 4), (2, 4), (2, 0).
All the points inside the rectangle, including the corners and edges, satisfy the given conditions.
So when determining the range, how did you know it was between 0 and 4 inclusive? Did you substitute the upper bound of x?
4. Originally Posted by Glitch
So when determining the range, how did you know it was between 0 and 4 inclusive? Did you substitute the upper bound of x?
Yes, I did.
5. Hello, Glitch!
Sketch the set of points (x, y) which satisfy: . $\begin{array}{ccccc}0 & \leq & y & \le &2x \\ 0 & \le &x & \le &2 \end{array}$
$0 \:\le\: y \:\le\:2x$ means $y$ is between the lines: . $\begin{Bmatrix}y &=& 2x \\ y &=& 0 \end{Bmatrix}$
The graph looks like this:
Code:
|
| *:::::
| *::::::
| *:::::::::
| *::::::::::
| *:::::::::::::
| *::::::::::::::
| *:::::::::::::::::
| *::::::::::::::::::::
- - * - - - - - - - - - - - -
0
$0\:\le\: x \:\le\:2$ means $x$ is between the lines: . $\begin{Bmatrix}x &=&2 \\ x &=& 0\end{Bmatrix}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126506901791,
"lm_q1q2_score": 0.8503317588247633,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 650.0574417162561,
"openwebmath_score": 0.5665784478187561,
"tags": null,
"url": "http://mathhelpforum.com/algebra/148256-assistance-sketching-relations.html"
} |
Code:
|
|:::::::::|
|:::::::::|
|:::::::::|
|:::::::::|
|:::::::::|
|:::::::::|
- - * - - - - + - - - - - - -
0 2
The region satisfying both inequalities is the area shaded twice.
Code:
|
| *
| *:|
| *:::|
| *:::::|
| *:::::::|
- - * - - - - + - - -
0 2 | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126506901791,
"lm_q1q2_score": 0.8503317588247633,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 650.0574417162561,
"openwebmath_score": 0.5665784478187561,
"tags": null,
"url": "http://mathhelpforum.com/algebra/148256-assistance-sketching-relations.html"
} |
# Find the remainder when $12!^{14!} +1$ is divided by $13$
Find the remainder when $12!^{14!} +1$ is divided by $13$
I faced this problem in one of my recent exam. It is reminiscent of Wilson's theorem. So, I was convinced that $12! \equiv -1 \pmod {13}$ after this I did some test on the exponent and it seems like $12!^{n!} +1\equiv 2\pmod {13}\forall n \in \mathbb{N}$.
After I came back home I ran some more test and I noticed that if $p$ is prime then $(p-1)!^{n!} +1\equiv 2\pmod {p}\forall n \in \mathbb{N}$.
I was wondering if this result is true, if yes how to prove it? If not what is the formal way for solving the mother problem.
-
$12!^{n!} +1\equiv 0\pmod {13}$ and $(p-1)!^{n!} +1\equiv 2\pmod {p}$ for $n=1$ (or $0$) – Henry Jun 7 '12 at 6:47
Note that the original problem can also be solved by Fermat's little theorem: $12!^{12} \equiv 1 \pmod{13}$. – Peter Taylor Jun 7 '12 at 9:18
Note that your 'for all' quantifier needs the caveat that $n\gt 1$; if $n=1$ then the sums are $0\bmod p$, not $2$. – Steven Stadnicki Jun 7 '12 at 15:07
By Wilson's Theorem, $12!\equiv -1\pmod{13}$. So for any non-negative even integer $m$, $(12!)^m+1\equiv (-1)^m+1\equiv 2\pmod{13}$. Since $0\le 2\lt 13$, it follows that $2$ is the remainder when $(12!)^m+1$ is divided by $13$.
If $m$ is odd, the same reasoning shows that $(12!)^m+1\equiv 0\pmod{13}$.
And $13$ is not particularly lucky or unlucky. The same result, with the same proof, holds if $13$ is replaced by any odd prime $p$, and $12$ is replaced by $p-1$.
The prime $2$ is slightly different. Whether $m$ is odd or even, $(1)^m +1\equiv 2\pmod{2}$, but the remainder is $0$, not $2$.
-
... and $14!$ is even ... – Robert Israel Jun 7 '12 at 6:44
Aha that helps! Thanks a lot Andre :) – VelvetThunder Jun 7 '12 at 6:50
Hint $\$ Unifying little Fermat and Wilson: $\rm C\:\!!^{\:\!C}\!\equiv 1\ mod\:\ C\!+\!1\:$ prime. Take your pick for a proof.
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811032,
"lm_q1q2_score": 0.8503317567543254,
"lm_q2_score": 0.8688267813328976,
"openwebmath_perplexity": 239.78522774623528,
"openwebmath_score": 0.9118530750274658,
"tags": null,
"url": "http://math.stackexchange.com/questions/154991/find-the-remainder-when-1214-1-is-divided-by-13"
} |
# ax+by+c =0
#### apple2357
##### Full Member
So suppose you want the equation of the line that passes through (2,5) and (3, 10) in the form ax+by+c=0
The standard way to do this is to find the gradient and substitute to find the y intercept and tidy up, or you could use y-y_1= m(x-x_1) etc.
I don't understand why it is not possible to substitute the points directly into ax+by+c =0. Two points should be sufficient to find the equation of the line but if you take this approach we have only 2 equations and 3 unknowns?
2a+5b+c = 0
3a+10y+c= 0
Why can't this be made to work?
Tell me if i am talking nonsense!
#### pka
##### Elite Member
So suppose you want the equation of the line that passes through (2,5) and (3, 10) in the form ax+by+c=0
The standard way to do this is to find the gradient and substitute to find the y intercept and tidy up, or you could use y-y_1= m(x-x_1) etc.
I don't understand why it is not possible to substitute the points directly into ax+by+c =0. Two points should be sufficient to find the equation of the line but if you take this approach we have only 2 equations and 3 unknowns?
2a+5b+c = 0
3a+10y+c= 0
Why can't this be made to work?
Tell me if i am talking nonsense!
Surely you know that if a line contains $$\displaystyle (x_1,y_1)~\&~(x_2,y_2)$$ and if $$\displaystyle x_1\ne x_2$$ then its slope is $$\displaystyle m=\dfrac{y_2-y_1}{x_2-x_1}$$.
#### apple2357
##### Full Member
Yes I know all that. I just couldn’t explain why the method and approach above fails ?
#### pka
##### Elite Member
Yes I know all that. I just couldn’t explain why the method and approach above fails ?
Two linear equations in three unknowns???
#### Dr.Peterson
##### Elite Member
So suppose you want the equation of the line that passes through (2,5) and (3, 10) in the form ax+by+c=0 | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.850331753430152,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 490.3412345540259,
"openwebmath_score": 0.645357072353363,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/ax-by-c-0.118450/"
} |
The standard way to do this is to find the gradient and substitute to find the y intercept and tidy up, or you could use y-y_1= m(x-x_1) etc.
I don't understand why it is not possible to substitute the points directly into ax+by+c =0. Two points should be sufficient to find the equation of the line but if you take this approach we have only 2 equations and 3 unknowns?
2a+5b+c = 0
3a+10y+c= 0
Why can't this be made to work?
Tell me if i am talking nonsense!
It works fine! Keep going ... (after fixing a typo).
The only problem is that the answer is not unique -- you can multiply an equation of the form ax+by+c=0 by any non-zero number and the resulting equation is equivalent, and has the same form.
So at some point in your work you will be picking an arbitrary value for either a, b, or c.
#### JeffM
##### Elite Member
So suppose you want the equation of the line that passes through (2,5) and (3, 10) in the form ax+by+c=0
The standard way to do this is to find the gradient and substitute to find the y intercept and tidy up, or you could use y-y_1= m(x-x_1) etc.
I don't understand why it is not possible to substitute the points directly into ax+by+c =0. Two points should be sufficient to find the equation of the line but if you take this approach we have only 2 equations and 3 unknowns?
2a+5b+c = 0
3a+10y+c= 0
Why can't this be made to work?
Tell me if i am talking nonsense!
A system of two equations with three unknowns may have an infinite number of valid solutions.
$$\displaystyle 2a + 5b + c = 0 \text { and } 3a + 10b + c = 0 \implies$$
$$\displaystyle c = -\ (2a + 5b) \implies 3a + 10b - (2a + 5b) = 0 \implies a = -\ 5b.$$
$$\displaystyle \text {Let } b = 1 \implies a = -\ 5 \implies c = -\ (-\ 10 + 5) = 5.$$
$$\displaystyle -\ 5x + y + 5 = 0 \implies y = 5x - 5.$$
$$\displaystyle \therefore x = 2 \implies 5x - 5 = 5 = y, \text { which checks, and}$$
$$\displaystyle x = 3 \implies 5x - 5 = 10 = y, \text { which also checks.}$$
#### JeffM | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.850331753430152,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 490.3412345540259,
"openwebmath_score": 0.645357072353363,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/ax-by-c-0.118450/"
} |
$$\displaystyle x = 3 \implies 5x - 5 = 10 = y, \text { which also checks.}$$
#### JeffM
##### Elite Member
Two linear equations in three unknowns???
But it does work, of course. The answer simply is not unique. The uniqueness and simplicity of the resulting equation is the advantage of the traditional methods of finding the equation of a line joining two distinct points. However, simply add b = 1 as a third equation to get the traditional, simple answer.
I think you missed the thrust of the OP. It was asking why a proposed method does NOT work, but it does work. The OP incorrectly assumed that a system of two equations with three unknowns has no valid solutions. The premise of the question was therefore confusing.
Last edited:
#### apple2357
##### Full Member
Ok. So the method does completely work.
You just have to pick a value for b ( which can be anything) and the resulting equation will still be unique ( after simplifying) - so there is no problem with this approach at all?
#### JeffM
##### Elite Member
Ok. So the method does completely work.
You just have to pick a value for b ( which can be anything) and the resulting equation will still be unique ( after simplifying) - so there is no problem with this approach at all?
There is no conceptual problem, but, in terms of communication, it is very common (and therefore readily comprehensible) to state a linear equation as
$$\displaystyle y = ux + v.$$
This results from setting b = 1. This form immediately gives the slope and the y-intercept and so is mathematically useful.
Last edited:
#### HallsofIvy | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.850331753430152,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 490.3412345540259,
"openwebmath_score": 0.645357072353363,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/ax-by-c-0.118450/"
} |
Last edited:
#### HallsofIvy
##### Elite Member
The problem is that while any straight line can be written as ax+ by+ c= 0 that form is not unique! Multiplying each term by d gives a'x+ b'y+ c'= 0, where a'= ad, b'= bd, and c'= cd, a different equation for the same line. If you (arbitrarily) take a= 1 then you have x+ by+ c= 0. The line passes through (2,5) and (3, 10) so you have the two equations, 2+ 5b+ c= 0 and 3+ 10b+ c= 0, to solve for the two unknowns, b and c.
#### apple2357
##### Full Member
That makes sense!
#### Jomo
##### Elite Member
The line y=3x+4 and the line 2y=6x+8 both have the same exact points! The form y = 3x+4 or y = mx+b just insists that the coefficient of y is 1. In ax+by +c=0, b does not have to be 1!
For the record, the form is usually written as ax+by = c | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.850331753430152,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 490.3412345540259,
"openwebmath_score": 0.645357072353363,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/ax-by-c-0.118450/"
} |
+0
# 11. You deposit $200 each month into an account earning 3% interest compounded monthly. a. How much will you have in the account in 30 years 0 6713 13 11. You deposit$200 each month into an account earning 3% interest compounded monthly.
a. How much will you have in the account in 30 years?
b. How much total money will you put into the account?
c. How much total interest will you earn?
Guest Jul 31, 2015
#2
+26406
+10
.
Alan Jul 31, 2015
Sort:
#1
0
a)200*1.03^30 = $485.45 b) c) 200*1.03^30 minus$200
Guest Jul 31, 2015
#2
+26406
+10
.
Alan Jul 31, 2015
#3
+91477
+5
11. You deposit $200 each month into an account earning 3%(per annum) interest compounded monthly. I am assuming that the money goes in at the beginning of the month and the interest is paid at the end of the month. a. How much will you have in the account in 30 years? b. How much total money will you put into the account? c. How much total interest will you earn? a) You can also do this with the future value of an ordinary annuity formula C=200 n=30*12=360 i=0.03/12 = 0.0025 Amount after 30 years =$116547.38
$${\mathtt{200}}{\mathtt{\,\times\,}}\left({\frac{\left({{\mathtt{1.002\: \!5}}}^{{\mathtt{360}}}{\mathtt{\,-\,}}{\mathtt{1}}\right)}{{\mathtt{0.002\: \!5}}}}\right) = {\mathtt{116\,547.376\: \!919\: \!658\: \!203\: \!63}}$$
b) $${\mathtt{200}}{\mathtt{\,\times\,}}{\mathtt{360}} = {\mathtt{72\,000}}$$
You have put $72,000 into the account. c) Interest =$116547.38 - $72,000 =$44547.38
$${\mathtt{116\,547.38}}{\mathtt{\,-\,}}{\mathtt{72\,000}} = {\mathtt{44\,547.38}}$$
Melody Jul 31, 2015
#4
+26406
+5 | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
Melody Jul 31, 2015
#4
+26406
+5
The small difference between my result and Melody's is that I've assumed the the total includes the interest paid at the end of the last month; whereas Melody's assumes that in the last month only the $200 deposited at the beginning of the month is added in. . Alan Jul 31, 2015 #5 +1037 +5 For this type of investment, the “Annuity Due” formula returns the correct future value for standard depository account interest payments, correlating to the beginning of the month deposit and end of the month interest payment. This returns the same value as Alan’s result. $$\\ \noindent \text {Annuity Due: }{FV = D \dfrac{(1 + r)^{n} - 1} {r}(1 + r)}\hspace{20pt} |\hspace{10pt} \text {\small D=Deposit per interval}\\ \\ 200*\dfrac{(1.0025^{360}-1)}{0.0025}*(1.0025)\;=\;116838.75$$ In practice, financial institutions use the “average daily balance” to calculate the interest on deposits. The result returns a value with limits between the two formulas. $$\text {FV(annuity ordinary) \leq Total Interest \leq FV(annuity due)}$$ Nauseated Jul 31, 2015 #6 +91477 +5 Yes, sorry Alan I did not realize that our answers were different. Alan is totally corect. This is the formula for the the future value of an ordinary annuity. This is where the money is put into the account at the END of the time period instead of at the beginning. It is easy to adjust it for this question. Here we have$200 invested at the very beginning so we must ADD 200 plus the interest it will accrue for the whole 30 years that will be C(1+i)^n = 200*(1.0025^360)
but NO $200 is invested at the very end SO we must subtract C =$200 at the end
so we get
$$\\FV=\left[\frac{(1+i)^n-1}{i}\right]+C(1+i)^n-C\\\\ If you rearrange this you will find that it is identical to Nauseated's formula.\\\ FV=my original answer+C(1+i)^n-C\\\\ FV=116547.38+200(1.0025)^{360}-200\\\\$$ | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
$${\mathtt{116\,547.38}}{\mathtt{\,\small\textbf+\,}}{\mathtt{200}}{\mathtt{\,\times\,}}{\left({\mathtt{1.002\: \!5}}\right)}^{\left({\mathtt{360}}\right)}{\mathtt{\,-\,}}{\mathtt{200}} = {\mathtt{116\,838.748\: \!442\: \!299\: \!145\: \!509\: \!1}}$$ | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
FV = $116838.75 This is identical to Alan's answer. And Nauseated also agreed that it is correct. ------------------------------------------ Nauseated has gone one more step with this. He has said: "In practice, financial institutions use the “average daily balance” to calculate the interest on deposits." Yes this is correct Nauseated has then stated that: "The result returns a value with limits between the two formulas. " Yes I can see how this could possibly be justified.. but I would like Nauseated to justify/discuss this statement. :) Melody Aug 1, 2015 #7 0 I was in finance for years. I never heard of treating saving account like any kind of annuity. This looks like a ton of BS to me. Guest Aug 2, 2015 #8 +1037 +5 It’s not that you never heard of it, you simply forgot. That can happen when you are stoned in class. BTW, playing Monopoly is not the same as being in finance. In any case, a managed depository savings account can match the return of either type of annuity. I will demonstrate this in the next post. Nauseated Aug 2, 2015 #9 +91477 0 My goodness, that is excessively polite for you Nauseated ! Are you unwell ? Melody Aug 2, 2015 #10 +1037 +5 ### The following data sets shows first 12 months and the last 12 months of a hypothetical account of 360 interest cycles. The first column displays the$200 deposit; the second column displays the end of month interest payment on the previous balance and the $200 first day of month deposit. Column 3 displays the new balance. Column 4 is the multiplier that weights the deposit for the purpose of interest calculation. The multiplier is from 1 to 0, representing the average daily deposit of the$200, where 1 is a deposit on the first day and 0 is a deposit on the last day. (No withdraws are made from this account and only the deposit is weighted).
Column 5 is the average daily of the deposit.
Column 6 is the interest.
Column 7 is the balance. | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
Column 5 is the average daily of the deposit.
Column 6 is the interest.
Column 7 is the balance.
Note that the final balance in column 3 matches the annuity due, while the final balance in column 7 matches the annuity ordinary.
$$\displaystyle \noindent \small {First data set. Months 1-12}\\ \begin{tabular}{lllllll} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 200.00 & 0.50 & 200.50 & 0.00 & 0.00 & 0.00 & 200.00 \\ 200.00 & 1.00 & 401.50 & 0.00 & 0.00 & 0.50 & 400.50 \\ 200.00 & 1.50 & 603.01 & 0.00 & 0.00 & 1.00 & 601.50 \\ 200.00 & 2.01 & 805.01 & 0.00 & 0.00 & 1.50 & 803.01 \\ 200.00 & 2.51 & 1,007.53 & 0.00 & 0.00 & 2.01 & 1,005.01 \\ 200.00 & 3.02 & 1,210.54 & 0.00 & 0.00 & 2.51 & 1,207.53 \\ 200.00 & 3.53 & 1,414.07 & 0.00 & 0.00 & 3.02 & 1,410.54 \\ 200.00 & 4.04 & 1,618.11 & 0.00 & 0.00 & 3.53 & 1,614.07 \\ 200.00 & 4.55 & 1,822.65 & 0.00 & 0.00 & 4.04 & 1,818.11 \\ 200.00 & 5.06 & 2,027.71 & 0.00 & 0.00 & 4.55 & 2,022.65 \\ 200.00 & 5.57 & 2,233.28 & 0.00 & 0.00 & 5.06 & 2,227.71 \\ 200.00 & 6.08 & 2,439.36 & 0.00 & 0.00 & 5.57 & 2,433.28 \end{tabular}$$ | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
$$\displaystyle \noindent \small {First data set. Months 349-360}\\ \begin{tabular}{lllllll} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 200.00 & 278.06 & 111500.59 & 0.00 & 0.00 & 276.86 & 111222.53 \\ 200.00 & 279.25 & 111979.84 & 0.00 & 0.00 & 278.06 & 111700.59 \\ 200.00 & 280.45 & 112460.29 & 0.00 & 0.00 & 279.25 & 112179.84 \\ 200.00 & 281.65 & 112941.94 & 0.00 & 0.00 & 280.45 & 112660.29 \\ 200.00 & 282.85 & 113424.79 & 0.00 & 0.00 & 281.65 & 113141.94 \\ 200.00 & 284.06 & 113908.85 & 0.00 & 0.00 & 282.85 & 113624.79 \\ 200.00 & 285.27 & 114394.13 & 0.00 & 0.00 & 284.06 & 114108.85 \\ 200.00 & 286.49 & 114880.61 & 0.00 & 0.00 & 285.27 & 114594.13 \\ 200.00 & 287.70 & 115368.31 & 0.00 & 0.00 & 286.49 & 115080.61 \\ 200.00 & 288.92 & 115857.23 & 0.00 & 0.00 & 287.70 & 115568.31 \\ 200.00 & 290.14 & 116347.38 & 0.00 & 0.00 & 288.92 & 116057.23 \\ 200.00 & 291.37 & 116838.75 & 0.00 & 0.00 & 290.14 & 116547.38 \end{tabular}$$ | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
The second data sets are the same as the first, except the multiplier is set to 0.75. This corresponds to a depositor making two deposits of $100 each on the first and 15 of each 30-day month. $$\displaystyle \noindent \small {Sceond data set. Months 1-12}\\ \begin{tabular}{lllllll} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 200.00 & 0.50 & 200.50 & 0.75 & 150.00 & 0.38 & 200.38 \\ 200.00 & 1.00 & 401.50 & 0.75 & 150.00 & 0.88 & 401.25 \\ 200.00 & 1.50 & 603.01 & 0.75 & 150.00 & 1.38 & 602.63 \\ 200.00 & 2.01 & 805.01 & 0.75 & 150.00 & 1.88 & 804.51 \\ 200.00 & 2.51 & 1007.53 & 0.75 & 150.00 & 2.39 & 1006.90 \\ 200.00 & 3.02 & 1210.54 & 0.75 & 150.00 & 2.89 & 1209.79 \\ 200.00 & 3.53 & 1414.07 & 0.75 & 150.00 & 3.40 & 1413.19 \\ 200.00 & 4.04 & 1618.11 & 0.75 & 150.00 & 3.91 & 1617.10 \\ 200.00 & 4.55 & 1822.65 & 0.75 & 150.00 & 4.42 & 1821.51 \\ 200.00 & 5.06 & 2027.71 & 0.75 & 150.00 & 4.93 & 2026.44 \\ 200.00 & 5.57 & 2233.28 & 0.75 & 150.00 & 5.44 & 2231.88 \\ 200.00 & 6.08 & 2439.36 & 0.75 & 150.00 & 5.95 & 2437.84 \end{tabular}$$ $$\displaystyle \noindent \small {Sceond data set. Months 349-360}\\ \begin{tabular}{lllllll} 1 & 2 & 3 & 4 & 5 & 6 & 7 \\ \hline 200.00 & 278.06 & 111500.59 & 0.75 & 150.00 & 277.76 & 111431.07 \\ 200.00 & 279.25 & 111979.84 & 0.75 & 150.00 & 278.95 & 111910.02 \\ 200.00 & 280.45 & 112460.29 & 0.75 & 150.00 & 280.15 & 112390.17 \\ 200.00 & 281.65 & 112941.94 & 0.75 & 150.00 & 281.35 & 112871.52 \\ 200.00 & 282.85 & 113424.79 & 0.75 & 150.00 & 282.55 & 113354.08 \\ 200.00 & 284.06 & 113908.85 & 0.75 & 150.00 & 283.76 & 113837.84 \\ 200.00 & 285.27 & 114394.13 & 0.75 & 150.00 & 284.97 & 114322.81 \\ 200.00 & 286.49 & 114880.61 & 0.75 & 150.00 & 286.18 & 114808.99 \\ 200.00 & 287.70 & 115368.31 & 0.75 & 150.00 & 287.40 & 115296.39 \\ 200.00 & 288.92 & 115857.23 & 0.75 & 150.00 & 288.62 & 115785.00 \\ 200.00 & 290.14 & 116347.38 & 0.75 & 150.00 & 289.84 & 116274.84 \\ 200.00 & 291.37 & 116838.75 & 0.75 & 150.00 & 291.06 & 116765.90 | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
& 150.00 & 289.84 & 116274.84 \\ 200.00 & 291.37 & 116838.75 & 0.75 & 150.00 & 291.06 & 116765.90 \end{tabular}$$ ... Nauseated Aug 2, 2015 #11 +1037 0 My goodness, that is excessively polite for you Nauseated ! Overt politeness is one of my faults. I try, but I am not always successful. Are you unwell ? Yes! I am unwell. I am Nauseated. It seems worse than usual. . . . Maybe it's sympathetic morning sickness. :) Nauseated Aug 2, 2015 #12 +91477 0 Is Mrs Nauseated pregnant? Congratulations ! The name you have inflicted upon her will suit her well for a while :/ Melody Aug 2, 2015 #13 +91477 +5 ok Nauseated you have a lot of figures there but I am going to be so bold as to summarize your reasoning. The question does not state WHEN the money was deposited into the account. IF it is deposited at the very beginning of the month then it is an annuitiy due question and yours and Alan figures are correct (a tiny bit too big) If it is deposited at the very end of the month then it is an ordinary annuity question and my original answer was in fact correct. (a tiny bit to small) HOWEVER If the$200 deposit is made at another time or times during the month then this will make the Future value lie between the 2 extremes. | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
SEE Nauseated - that was not so hard. You really did not need all those tables of values.
I am quite positive you will correct me if I have misinterpreted your logic.
-----------------------------------
The reason I have added "a tiny bit too big" and a "tiny bit too small" is because there is always going to be one day at the end, or the beginning, of the month which has the old value at the beginning and the new value at the end so effectively this day has interest paid on the new deposit of only \$100 (average of 0 and 200) [Not 0 (ordinary annuity) or 200 (annuity due) as used for the development of the formula]
Melody Aug 2, 2015
### 6 Online Users
We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners. See details | {
"domain": "0calc.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9787126444811033,
"lm_q1q2_score": 0.8503317417955442,
"lm_q2_score": 0.8688267660487573,
"openwebmath_perplexity": 421.94371016368615,
"openwebmath_score": 0.999707818031311,
"tags": null,
"url": "https://web2.0calc.com/questions/11-you-deposit-200-each-month-into-an-account-earning-3-interest-compounded-monthly-a-how-much-will-you-have-in-the-account-in-30-years"
} |
# How can I solve the following square root inequality?
I am given the following inequality:
$$\sqrt{2-x} > x$$
And I have to solve for $$x$$.
This is what I tried:
Firstly, I applied the existence condition for the square root:
$$2-x \ge 0 \Rightarrow x \le 2 \Rightarrow x \in (- \infty, 2]$$
Then I squared both sides of the inequality:
$$2-x>x^2$$
$$x^2+x-2 < 0$$
And from this I got that:
$$x \in (-2, 1)$$
Finally, I intersected this with the condition I applied at the beginning of the exercise:
$$x \in (-2, 1) \cap (- \infty, 2]$$
$$x \in (-2, 1)$$.
The problem with this answer is that it is wrong. If I take a number like $$-10$$ and plug it into the inequality I get:
$$\sqrt{2-(-10)} > -10$$
$$\sqrt{12} > -10$$
Which is true. However $$-10$$ is not included in the interval $$(-2, 1)$$. The correct answer seems to be $$(- \infty, 1)$$, which is not what I got.
I noticed that the inequalities of before and after of the squaring are not equivalent. So:
$$\sqrt{2-x} > x$$
and
$$2-x>x^2$$
are not equivalent. If, again, I take the number $$-10$$, in the first inequality I get:
$$\sqrt{2-(-10)} > -10$$
$$\sqrt{12} > -10$$, which is true.
And in the second inequality I get:
$$2 - (-10) > (-10)^2$$
$$12 > 100$$, which is false.
So I think that's where the problem lies, but I don't know if I am correct and what should I do to get the right answer of $$(- \infty, 1)$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307676766118,
"lm_q1q2_score": 0.8503292245029808,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 127.51534364116308,
"openwebmath_score": 0.9506801962852478,
"tags": null,
"url": "https://math.stackexchange.com/questions/3415109/how-can-i-solve-the-following-square-root-inequality"
} |
• When you're solving $$x^2 +x -2 > 0$$ you need to remember that previously you have found both $x\leq 2$ and $x>0$ (because square root cannot be negative). So in this case you're limited to $0 \leq x \leq 2$, before even looking at solving this equation. – Matti P. Oct 30 '19 at 13:29
• "Then I squared both sides of the inequality:" $x > y\not \implies x^2 > y$ unless $y \ge 0$. If $x > 0 > y$ then multiplying by $y$ flips the signs and $x>0 >y \implies xy < 0 < y^2$. And multiplying by $x$ doesn't flip and $x > 0 > y\implies x^2 > 0 >xy$ and we have $x^2 > xy$ and $xy < y^2$ and we can't conclude anything about $x^2$ compared to $y^2$. – fleablood Oct 31 '19 at 6:42
• @MattiP., the non-negativity restriction on the square root only implies $x\le2$ (as the OP found). It does not require $x\ge0$. Indeed, the inequality $\sqrt{2-x}\gt x$ is clearly true for all $x\lt0$. – Barry Cipra Oct 31 '19 at 12:45
"Then I squared both sides of the inequality:"
$$a > b\not \implies a^2 > b^2$$ unless $$b \ge 0$$.
If $$a > 0 > b$$ then multiplying by $$b$$ flips the signs and $$a>0 >b \implies ab < 0 < b^2$$. And multiplying by $$a$$ doesn't flip and $$a > 0 > b\implies a^2 > 0 >ab$$.
[Remember the reason that $$m > n > 0 \implies m^2 > n^2$$ is that because $$n > 0$$ we know $$m>n \implies mn > nn = n^2$$ and because $$m >0$$ we know $$m^2 = mm > mn$$. So we have $$m^2 >mn$$ and $$mn > n^2$$ so $$m^2 > n^2$$. That simply will not work of one of $$m,n$$ is negative. (and if both are negative you get the exact opposite result: $$0 > m>n\implies m^2 < n^2$$.]
So we have $$a^2 > ab$$ and $$ab < b^2$$ and we can't conclude anything about $$a^2$$ compared to $$b^2$$.
.... Or ....
just to be blunt.
$$3 > -987$$ by $$3^2 \not > (-987)^2$$.
....
But you can square both sides if you acknowedge you are assuming $$x \ge 0$$ as a conditional that may not be true. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307676766118,
"lm_q1q2_score": 0.8503292245029808,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 127.51534364116308,
"openwebmath_score": 0.9506801962852478,
"tags": null,
"url": "https://math.stackexchange.com/questions/3415109/how-can-i-solve-the-following-square-root-inequality"
} |
so when you get $$x \in (-2,1)$$ IF $$x \ge 0$$ so $$[0,1)$$ you can intersect it with the positive values you had before. $$(-\infty, 2] \cap [0,1)=[0,1)$$ IFF $$x \ge 0$$.
But we CAN have $$x < 0$$ in which case ... squaring both sides is useless.
So either $$x < 0$$ and $$x\in (-\infty, 0)$$ OR $$x \ge 0$$ and $$x\in [0,1)$$ and so $$x \in (-\infty,0) \cup [0,1) = (-\infty, 1)$$>
The domain of the root is given by b$$x\le 2$$ Now we will consider two cases: If $$x\le 0$$ the our inequality is true. If $$x then we can square and we get $$0>x^2+x-2$$ This gives us $$-2 and $$0 and we get $$0 So the solution set is given by $$x<1$$ and $$x$$ is a real number.
$$\sqrt{2-x} > x$$ then $$\sqrt{2-x} > x-2 +2$$ , move all to the left hand side then $$2-x = (\sqrt{2-x})^2$$ $$\left(\sqrt{2-x}\right)^2 + \sqrt{2-x} - 2 > 0$$ $$( \sqrt{2-x} +2) (\sqrt{2-x} -1)>0$$ I avoided squaring both sides.
Starting from
$$\sqrt{2-x} > x$$
it is immediately clear that if $$x<0$$ then $$\sqrt{2-x} >0$$ and therefore $$x<0$$ is part of the solution set. We then need to analyze where
$$\sqrt{2-x}$$
is defined. We know that $$\sqrt{2-x}$$ will have positive real solutions if $$2-x \ge 0$$. Therefore, we need to check $$0\le x \le 2$$. In order to do this, let $$\varepsilon$$ be a small number where $$0\le\varepsilon< 1$$. Then $$\sqrt{2-\varepsilon}>\sqrt{1}> \varepsilon$$ $$\sqrt{2-1}=\sqrt{1}=1$$ $$\sqrt{2-(\varepsilon+1)}\le\sqrt{1}\le\varepsilon+1$$
so when $$0\le x < 1$$ we have $$\sqrt{2-x} > x$$ and when $$1\le x \le 2$$ we have $$\sqrt{2-x} \le x$$. Hence, the proper solution set is $$x<1$$ or $$(-\infty,1)$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307676766118,
"lm_q1q2_score": 0.8503292245029808,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 127.51534364116308,
"openwebmath_score": 0.9506801962852478,
"tags": null,
"url": "https://math.stackexchange.com/questions/3415109/how-can-i-solve-the-following-square-root-inequality"
} |
An alternative approach is to start from the fact that we must have $$x\le 2$$ in order for $$\sqrt{2-x}$$ to exist, and write $$x=2-u^2$$ with $$u\ge0$$, which simplifies the inequality to $$u\gt2-u^2$$ (with, remember, $$u\ge0$$, which is used in removing the square root symbol to obtain $$\sqrt{u^2}=u$$). Standard algebra manipulates this to the equivalent form $$(u-1)(u+2)\gt0$$, which, given the restriction to $$u\ge0$$, implies $$u\gt1$$. Substituting back to $$x=2-u^2$$, we see we have $$x\lt2-1^2=1$$, so the solution set for the inequality is $$x\in(-\infty,1)$$.
In review, you have to do something to get rid of the square root symbol in order to find the solution set for the inequality. Squaring both sides certainly does this, but you have to contend with the fact that $$a\gt b$$ is not equivalent to $$a^2\gt b^2$$ without additional restrictions on $$a$$ and $$b$$, so that after you've found the solution set for the squared inequality you have to see how it relates to the original inquality. The approach here is somewhat simpler in that regard; in essence, it puts all its restrictive eggs into a single basket of non-negativity (i.e., $$u\ge0$$).
I think fleablood’s answer gets closest to addressing what I think OP was asking, namely why the mechanical application of squaring both sides of the equation does not yield all of the solutions. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307676766118,
"lm_q1q2_score": 0.8503292245029808,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 127.51534364116308,
"openwebmath_score": 0.9506801962852478,
"tags": null,
"url": "https://math.stackexchange.com/questions/3415109/how-can-i-solve-the-following-square-root-inequality"
} |
# Determining convergence of series
#### calcboi
##### New member
I have a question on which test to use for series n=1 to infinity for (-1)^n / (n^3)-ln(n) in order to determine convergence/divergence. I am pretty sure I determined it converges through the Alternating Series Test(correct me if I'm wrong) but I am not sure whether it is conditional or absolute. I tried the Direct Comparison Test but it was inconclusive, and I am stuck now on what to do. I also tried Limit Comparison but the limit goes to infinity so it is also inconclusive. Can you please help?
#### ZaidAlyafey
##### Well-known member
MHB Math Helper
Yes you are correct.
near infinity the term n^3 is dominant over ln (n).
#### calcboi
##### New member
BTW, I used the comparison c(x) = 1/n^3 for DCT and LCT since we know 1/n^3 converges by p-series.
#### Fernando Revilla
##### Well-known member
MHB Math Helper
BTW, I used the comparison c(x) = 1/n^3 for DCT and LCT since we know 1/n^3 converges by p-series.
Right, $\displaystyle\lim_{n\to \infty}\left(\frac{1}{n^3-\log n}:\frac{1}{n^3}\right)=\ldots =1\neq 0$, so the series is absolutely convergent.
#### calcboi
##### New member
What test did you use to determine absolute convergence? Or was that just analyzing end behavior?
MHB Math Helper
#### Fernando Revilla
##### Well-known member
MHB Math Helper
When I tried the Limit Comparison Test, I got infinity as n approaches infinity. How did you get 1?
$\displaystyle\lim_{n\to \infty}\left(\frac{1}{n^3-\log n}:\frac{1}{n^3}\right)=\lim_{n\to \infty}\frac{n^3}{n^3-\log n}=\lim_{n\to \infty}\frac{1}{1-(\log n/n^3)}=\frac{1}{1-0}=1$ | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.972830769252026,
"lm_q1q2_score": 0.8503292210933526,
"lm_q2_score": 0.8740772269642948,
"openwebmath_perplexity": 1942.4551698893772,
"openwebmath_score": 0.9141233563423157,
"tags": null,
"url": "https://mathhelpboards.com/threads/determining-convergence-of-series.4118/"
} |
# When to use L'Hospital's rule vs the limit shortcut
Before being so quick to downvote or throw darts, please forgive my ignorance and inability to recall basic calculus atm.
Consider the limit $\lim \limits_{x \to \infty}\frac{3x^2+14x-5}{x^2+x-12}$. It can quickly be determined that the $x$ approaches $3$ using L'Hospital's rule.
The same answer can be derived, however, by using this shortcut (I am unaware if it has a specific name):
$\lim \limits_{x \to \infty}\frac{3x^2+14x-5}{x^2+x-12}=\lim \limits_{x \to \infty}\frac{3x^2/x^2+14x/x^2-5/x^2}{x^2/x^2+x/x^2-12/x^2}$
Every term is divided by the highest degree of $x$ in the denominator. The terms with $x^2$ in both the numerator and denominator simplify. All other terms go to $0$. Therefore:
$\lim \limits_{x \to \infty}\frac{3x^2/x^2+14x/x^2-5/x^2}{x^2/x^2+x/x^2-12/x^2}=\frac{3}{1}=3$
1) What are the explicit conditions in which may I use this shortcut?
2) How do I know when to use it over L'Hospital's rule, as both techniques can be used only when working with quotients?
3) What is the shortcuts name, if any? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8503292199677951,
"lm_q2_score": 0.8740772236840656,
"openwebmath_perplexity": 367.1341241313003,
"openwebmath_score": 0.8866962790489197,
"tags": null,
"url": "https://math.stackexchange.com/questions/2777248/when-to-use-lhospitals-rule-vs-the-limit-shortcut/2777290"
} |
3) What is the shortcuts name, if any?
• Your second method is the more common one --- you use L'Hopital's when it fails (provided you satisfy the right conditions for L'Hopital's). This typically works when you have a quotient of polynomials (or in cases like totoro has pointed out), whereas L'Hopital's works for other kinds of functions, too. I don't think it has a universal name. – Bill Wallis May 11 '18 at 21:35
• In class I usually recommend it when there is a quotient of sums of terms that can easily be compared in its growth to infinity. It would also be applicable, for example, to $\lim_{n\to\infty}\frac{n!+3^n-n^{50}}{2\ln(n)-e^{n^2}+2\sin(n)}$. Here 'compared' means knowing the limit of the quotient of the different terms. whether the quotient tends to $0$, to $\infty$, or if it remains bounded. – user551819 May 11 '18 at 21:37
• In my opinion L'Hopital is rarely the method of choice. Almost any other that works is more informative. This trick is good for quotients of polynomials. In general, writing down the first few terms of the power series for the various elements and looking at the leading term will often help. There are questions/answers on this site on the general theme "why not to use L'Hopital". – Ethan Bolker May 11 '18 at 21:40
• L'Hopital can also be used in not quotient indeterminate limits. – Namaste May 11 '18 at 21:42
• One can also use simplification of rational functions, e.g. $\lim_{x\to 2} \frac{x-2}{x^2-4} = \lim_{x\to 2} \frac 1{x+2} = \frac 14.$ Or $$\lim_{x\to 1}\frac{x^2+x-2}{x^3-x^2-3x+3} = \lim_{x\to 1}\frac{x+2}{x^2-3} = -\frac 32$$ – Namaste May 11 '18 at 21:51
Shorcut can be used in quotient limits anytime there exist some leading term at the numerator and denominator which becomes dominant in the limit with respect to the others terms that is, indicating with g(x) the dominant term
$$\lim \limits_{x \to \infty}\frac{f(x)}{g(x)}=0$$
To individuate the dominant term, recall that
• $\frac{x^a}{x^b} \to 0$ for $b>a$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8503292199677951,
"lm_q2_score": 0.8740772236840656,
"openwebmath_perplexity": 367.1341241313003,
"openwebmath_score": 0.8866962790489197,
"tags": null,
"url": "https://math.stackexchange.com/questions/2777248/when-to-use-lhospitals-rule-vs-the-limit-shortcut/2777290"
} |
To individuate the dominant term, recall that
• $\frac{x^a}{x^b} \to 0$ for $b>a$
• $\frac{x^a}{b^x} \to 0$ for $b>1$
• $\frac{\log x}{x^a} \to 0$ for $a>0$
and for sequences
• $\frac{a^n}{n!} \to 0$ for $a>1$
• $\frac{n!}{n^n} \to 0$
Recall that l'Hopital rule can be applied to limits which are expressed (or can be expressed) by quotient which are in the indeterminate form $\frac 0 0$ or $\frac{\pm \infty}{\pm \infty}$.
I don't think there is a specific name for the shorcut.
As indicated in the comment another way for rational expression can be the following
$$\frac{3x^2+14x-5}{x^2+x-12}=\frac{3x^2+3x-12+11x+7}{x^2+x-12}=3+\frac{11x+7}{x^2+x-12}$$
• @amWhy Something wrong or not clear? – gimusi May 11 '18 at 21:41
• But L'Hopital can be used in other situations too. – Namaste May 11 '18 at 21:42
• @amWhy are you referring to $0\cdot \infty$? – gimusi May 11 '18 at 21:43
On the other hand, it's not difficult to prove a general theorem about rational functions. Suppose you have $$f(x)=\frac{a_mx^m+a_{m-1}x^{m-1}+\dots+a_0}{b_nx^n+b_{n-1}x^{n-1}+\dots+b_0}$$ with $a_m\ne0$ and $b_n\ne0$. Then, since it's not restrictive to assume $x>0$ when we want to compute the limit for $x\to\infty$, the numerator can be written as $$x^m\left(a_m+\frac{a_{m-1}}{x}+\dots+\frac{a_0}{x^m}\right)$$ and the factor in parentheses has limit $a_m$ when $x\to\infty$. Similarly for the denominator. Now $$\lim_{x\to\infty} \frac{\displaystyle a_m+\frac{a_{m-1}}{x}+\dots+\frac{a_0}{x^m}} {\displaystyle b_n+\frac{b_{n-1}}{x}+\dots+\frac{b_0}{x^m}} =\frac{a_m}{b_n}\ne0$$ Hence there are three cases.
## First case: $m>n$
$$\lim_{x\to\infty}f(x)= \lim_{x\to\infty}x^{m-n} \frac{\displaystyle a_m+\frac{a_{m-1}}{x}+\dots+\frac{a_0}{x^m}} {\displaystyle b_n+\frac{b_{n-1}}{x}+\dots+\frac{b_0}{x^m}} = \begin{cases} \infty & \text{if a_m/b_n>0} \\[4px] -\infty & \text{if a_m/b_n<0} \end{cases}$$ The factor $x^{m-n}$ has limit $\infty$ and the other factor is bounded.
## Second case: $m=n$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8503292199677951,
"lm_q2_score": 0.8740772236840656,
"openwebmath_perplexity": 367.1341241313003,
"openwebmath_score": 0.8866962790489197,
"tags": null,
"url": "https://math.stackexchange.com/questions/2777248/when-to-use-lhospitals-rule-vs-the-limit-shortcut/2777290"
} |
## Second case: $m=n$
$$\lim_{x\to\infty}f(x)= \lim_{x\to\infty} \frac{\displaystyle a_m+\frac{a_{m-1}}{x}+\dots+\frac{a_0}{x^m}} {\displaystyle b_n+\frac{b_{n-1}}{x}+\dots+\frac{b_0}{x^m}} =\frac{a_m}{b_n}$$
## Third case: $m<n$
$$\lim_{x\to\infty}f(x)= \lim_{x\to\infty}\frac{1}{x^{n-m}} \frac{\displaystyle a_m+\frac{a_{m-1}}{x}+\dots+\frac{a_0}{x^m}} {\displaystyle b_n+\frac{b_{n-1}}{x}+\dots+\frac{b_0}{x^m}} =0$$ The factor $1/x^{n-m}$ has limit $0$ and the other factor has limit $a_m/b_n$.
This completely settles the problem and you need nothing else: your given limit is $3$ because the function is in case two. Doing umpteen times the same computations doesn't seem the best way to spend our time.
How can you remember this? The polynomial of greater degree dominates: if it is at the numerator, the limit is $\pm\infty$ (with the sign determined by $a_m/b_n$); if it is at the denominator, the limit is $0$. If the degrees are the same, the limit is $a_m/b_m$.
• This is essentially the mnemonic “Bobo Bots eats DC”—bigger on bottom: $0$; bigger on top: slant; exponents are the same: divide coefficients. – gen-z ready to perish May 11 '18 at 22:23
• @ChaseRyanTaylor I don't like such kind of mnemonics, TBH. But this is quite a simple case to handle and a general rule is surely handy. There's a similar case for integrals of the form $\int x^ne^x\,dx$; rather than doing umpteen integrations by parts, it's much easier to remember the antiderivative is of the form $P(x)e^x$ with $P$ of degree $n$ and do the derivative. – egreg May 11 '18 at 22:32
In general, suppose you have an expression of the form
$$f_1(x)+f_2(x)\over g_1(x)+g_2(x)$$
for which
$$\lim_{x\to c}{f_2(x)\over f_1(x)}=\lim_{x\to c}{g_2(x)\over g_1(x)}=0$$ Then
$$\lim_{x\to c}{f_1(x)+f_2(x)\over g_1(x)+g_2(x)}=\lim_{x\to c}{f_1(x)\over g_1(x)}$$
The proof amounts to inserting the intermediate expression
$$\lim_{x\to c}{f_1(x)\over g_1(x)}\cdot{1+{f_2(x)\over f_1(x)}\over1+{g_2(x)\over g_1(x)}}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8503292199677951,
"lm_q2_score": 0.8740772236840656,
"openwebmath_perplexity": 367.1341241313003,
"openwebmath_score": 0.8866962790489197,
"tags": null,
"url": "https://math.stackexchange.com/questions/2777248/when-to-use-lhospitals-rule-vs-the-limit-shortcut/2777290"
} |
$$\lim_{x\to c}{f_1(x)\over g_1(x)}\cdot{1+{f_2(x)\over f_1(x)}\over1+{g_2(x)\over g_1(x)}}$$
A nice example, in which L'Hopital gets you nowhere, is
$$\lim_{x\to\infty}{5e^{3x}+2e^x\over2e^{3x}+7e^{2x}}=\lim_{x\to\infty}{5e^{3x}\over2e^{3x}}=\lim_{x\to\infty}{5\over2}={5\over2}$$
The trick, in general, is to recognize a dominant term in the numerator and/or denominator. In essence, the shortcut says you can ignore all the other stuff. But you have to make sure that you pick out terms that really do dominate the other stuff; sometimes you can eyeball it, and sometimes you make mistakes (at least I do).
• Have you got an explicit description of what a dominant term is? – rainier May 11 '18 at 22:44
• @rainier, it's what the second display says: the quotient of the "other stuff" to the "dominant" term tends to $0$ in the limit. In the example, we have $(2e^x)/(5e^{3x})={2\over5}e^{-2x}\to0$ and $(7e^{2x})/(2e^{3x})={7\over2}e^{-x}\to0$ as $x\to\infty$. – Barry Cipra May 11 '18 at 22:49
• Got it, thanks! – rainier May 11 '18 at 22:53 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307716151472,
"lm_q1q2_score": 0.8503292199677951,
"lm_q2_score": 0.8740772236840656,
"openwebmath_perplexity": 367.1341241313003,
"openwebmath_score": 0.8866962790489197,
"tags": null,
"url": "https://math.stackexchange.com/questions/2777248/when-to-use-lhospitals-rule-vs-the-limit-shortcut/2777290"
} |
# Number of ways in which they can be seated if the $2$ girls are together and the other two are also together but separate from the first two
$5$ boys and $4$ girls sit in a straight line. Find the number of ways in which they can be seated if $2$ girls are together and the other two are also together but separate from the first two.
I divided the $4$ girls in two groups in $\frac{4!}{2!2!}$ ways.
I counted $10$ ways in which there is at least one boy between the two girl pairs. Boys can be arranged in $5!$ ways. Total number of ways$=\frac{4!}{2!2!}\times 10\times 5!=7200$
But the answer in the book is $43200$. I don't know where I am wrong.
• What do you mean "the two girls are together"? That makes it sound as if the pair is specified. – lulu Apr 4 '16 at 16:10
• Sorry,"the" was not given,i edited it.@lulu – mathspuzzle Apr 4 '16 at 16:13
• no problem. I'll post something below. – lulu Apr 4 '16 at 16:13 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205651810287,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 185.8632987009876,
"openwebmath_score": 0.739669919013977,
"tags": null,
"url": "https://math.stackexchange.com/questions/1727586/number-of-ways-in-which-they-can-be-seated-if-the-2-girls-are-together-and-the"
} |
Method I: Fix two ordered pairs of girls $AB,CD$. Then there are $7!$ ways to arrange the five boys and these two dyads. Of course we might have $ABCD$ together, so to rule that out subtract $6!$. Similarly, we must rule out another factor of $6!$ to exclude $CDAB$. Thus for these two ordered pairs there are $$7!-2\times 6!=3600$$ suitable arrangements.
Now, sticking to these pairs but varying the order gets us $$4\times 3600=14,400$$
And, finally, we can change the pairs. Instead of $AB$ we could have had $AC$ or $AD$ so, finally, $$3\times 14,400= 43,200$$
Method II: (closer to what you were trying) Arrange the kids as $$-\;AB-CD\;-$$ Where $A,B,C,D$ denote the four girls (unspecified) and the boys go in the dashed areas. We know the middle dashed area must contain at least a single boy. There are $15$ satisfactory ways to arrange the boys: $$\{0,5,0\},\;\{1,4,0\},\;\{0,4,1\},\;\{2,3,0\},\;\{0,3,2\},\;\{1,3,1\},\;\{3,2,0\},\;\{0,2,3\},\;\{2,2,1\},\;\{1,2,2\},\;\{3,1,1\},\;\{1,1,3\},\{2,1,2\},\;\{4,1,0\},\;\{0,1,4\}$$ (I'm writing them all out because I believe you only counted $10$ of these). We must then pick some permutation of the girls to fill the slots labeled $A,B,C,D$ and pick some permutation of the boys to populate the dashed regions thus $$15\times 4!\times 5!=43,200$$
First we count the number of strings of length $7$ made up of the letters b (a single boy) and $G$ (a pair of girls) such that the two G's are not together. Write down five b's like this, with a little gap between them. $$\text{b}\qquad\text{b}\qquad\text{b}\qquad\text{b}\qquad\text{b}$$ These determine $6$ gaps, the $4$ obvious ones and $2$ endgaps. We want to choose two of these to insert the G's into. This can be done in $\binom{6}{2}$ ways.
We have found the number of "patterns." Now permute the girls, permute the boys. The number of arrangements is $\binom{6}{2}4!5!$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205651810287,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 185.8632987009876,
"openwebmath_score": 0.739669919013977,
"tags": null,
"url": "https://math.stackexchange.com/questions/1727586/number-of-ways-in-which-they-can-be-seated-if-the-2-girls-are-together-and-the"
} |
# Floating Point¶
## Storage overview¶
We can think of a floating point number as having the form:
$\mbox{significand} \times 10^\mbox{exponent}$
Most computers follow the IEEE 754 standard for floating point, and we commonly work with 32-bit and 64-bit floating point numbers (single and double precision). These bits are split between the signifcand and exponent as well as a single bit for the sign:
Since the number is stored in binary, we can think about expanding a number in powers of 2:
$0.1 \sim (1 + 1 \cdot 2^{-1} + 0 \cdot 2^{-2} + 0 \cdot 2^{-3} + 1 \cdot 2^{-4} + 1 \cdot 2^{-5} + \ldots) \times 2^{-4}$
In fact, 0.1 cannot be exactly represented in floating point:
Listing 52 simple_roundoff.cpp
#include <iostream>
#include <iomanip>
int main() {
double a = 0.1;
std::cout << std::setprecision(19) << a << std::endl;
}
### Precision¶
With 52 bits for the significand, the smallest number compared to 1 we can represent is
$2^{-52} \approx 2.22\times 10^{-16}$
but the IEEE 754 format always expresses the significant such that the first bit is 1 (by adjusting the exponent) and then doesn’t need to store that 1, giving us an extra bit of precision, so the machine epsilon is
$2^{-53} \approx 1.11\times 10^{-16}$
We already saw how to access the limits of the data type via std::numeric_limits. When we looked at machine epsilon, we saw that for a double it was about $$1.1\times 10^{-16}$$.
Note that this is a relative error, so for a number like 1000 we could only add 1.1e-13 to it before it became indistinguishable from 1000.
$\mbox{relative roundoff error} = \frac{|\mbox{true number} - \mbox{computer representation} |} {|\mbox{true number}|} \le \epsilon$
Note that there are varying definitions of machine epsilon which differ by a factor of 2.
### Range¶ | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
### Range¶
Now consider the exponent, we use 11 bits to store it in double precision. Two are reserved for special numbers, so out of the 2048 possible exponent values, one is 0, and 2 are reserved, leaving 2045 to split between positive and negative exponents. These are set as:
$2^{-1022} \mbox{ to } 2^{1023}$
converting to base 10, this is
$\sim 10^{-308} \mbox{ to } \sim 10^{308}$
### Reporting values¶
We can use std::numeric_limits<double> to query these floating point properties:
Listing 53 limits.cpp
#include <iostream>
#include <limits>
int main() {
std::cout << "maximum double = " << std::numeric_limits<double>::max() << std::endl;
std::cout << "maximum double base-10 exponent = " << std::numeric_limits<double>::max_exponent10 << std::endl;
std::cout << "smallest (abs) double = " << std::numeric_limits<double>::min() << std::endl;
std::cout << "minimim double base-10 exponent = " << std::numeric_limits<double>::min_exponent10 << std::endl;
std::cout << "machine epsilon (double) = " << std::numeric_limits<double>::epsilon() << std::endl;
}
## Roundoff vs. truncation error¶
Consider the Taylor expansion of $$f(x)$$ about some point $$x_0$$:
$f(x) = f(x_0 + \Delta x) = f(x_0) + \left . \frac{df}{dx} \right |_{x_0} \Delta x + \mathcal{O}(\Delta x^2)$
where $$\Delta x = x - x_0$$
We can solve for the derivative to find an approximation for the first derivative:
$\left . \frac{df}{dx} \right |_{x_0} = \frac{f(x_0 + \Delta x) - f(x_0)}{\Delta x} + \mathcal{O}(\Delta x)$
This shows that this approximation for the derivative is first-order accurate in $$\Delta x$$ – that is the truncation error of the approximation.
We can see the relative size of roundoff and truncation error by using this approximation to compute a derivative for different values of $$\Delta x$$:
Listing 54 truncation_vs_roundoff.cpp
#include <iostream>
#include <iomanip>
#include <cmath>
#include <limits>
#include <vector>
double f(double x) {
return std::sin(x);
} | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
double f(double x) {
return std::sin(x);
}
double dfdx_true(double x) {
return std::cos(x);
}
struct point {
double dx;
double err;
};
int main() {
double dx = 0.1;
double x0 = 1.0;
std::vector<point> data;
while (dx > std::numeric_limits<double>::epsilon()) {
point p;
p.dx = dx;
double dfdx_approx = (f(x0 + dx) - f(x0)) / dx;
double err = std::abs(dfdx_approx - dfdx_true(x0));
p.err = err;
data.push_back(p);
dx /= 2.0;
}
std::cout << std::setprecision(8) << std::scientific;
for (auto p : data) {
std::cout << std::setw(10) << p.dx << std::setw(15) << p.err << std::endl;
}
}
It is easier to see the behavior if we make a plot of the output:
Let’s discuss the trends:
• Starting with the largest value of $$\Delta x$$, as we make $$\Delta x$$ smaller, we see that the error decreases. This is following the expected behavior of the truncation error derived above.
• Once our $$\Delta x$$ becomes really small, roundoff error starts to dominate. In effect, we are seeing that:
$(x_0 + \Delta x) - x_0 \ne 0$
because of roundoff error.
• The minimum error here is around $$\sqrt{\epsilon}$$, where $$\epsilon$$ is machine epsilon.
## Testing for equality¶
Because of roundoff error, we should never exactly compare two floating point numbers, but instead ask they they agree within some tolerance, e.g., test equality as:
$| x - y | < \epsilon$
For example:
Listing 55 comparing.cpp
#include <iostream>
int main() {
double h{0.01};
double sum{0.0};
for (int n = 0; n < 100; ++n) {
sum += h;
}
std::cout << "sum == 1: " << (sum == 1.0) << std::endl;
std::cout << "|sum - 1| < tol: " << (std::abs(sum - 1.0) < 1.e-10) << std::endl;
}
## Minimizing roundoff¶
Consider subtracting the square of two numbers – taking the difference of two very close-in-value numbers is a prime place where roundoff can come into play.
$x^2 - y^2$
$(x - y)(x + y)$
by factoring this, we are subtracting more reasonably sized numbers, reducing the roundoff. | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
by factoring this, we are subtracting more reasonably sized numbers, reducing the roundoff.
We can see this directly by doing this with single precision (float) and comparing to an answer computed via double precious (double)
Here’s an example:
Listing 56 subtraction.cpp
#include <iostream>
int main() {
float x{1.000001e15};
float y{1.0000e15};
std::cout << "x^2 - y^2 : " << x*x - y*y << std::endl;
std::cout << "(x - y)(x + y) : " << (x - y) * (x + y) << std::endl;
double m{1.000001e15};
double n{1.0000e15};
std::cout << "double precision value: " << (m - n) * (m + n) << std::endl;
}
As another example, consider computing 1:
$\sqrt{x + 1} - \sqrt{x}$
We can alternately rewrite this to avoid the subtraction of two close numbers:
$\sqrt{x + 1} - \sqrt{x} = (\sqrt{x + 1} - \sqrt{x}) \left ( \frac{\sqrt{x+1} + \sqrt{x}}{\sqrt{x+1} + \sqrt{x}} \right ) = \frac{1}{\sqrt{x+1} + \sqrt{x}}$
Again we’ll compare a single-precision calculation using each of these methods to a double precision “correct answer”. To ensure that we use the single-precision version of the std::sqrt() function, we will use single precision literal suffix, e.g., 1.0f tells the compiler that this is a single-precision constant.
Listing 57 squareroots.cpp
#include <iostream>
#include <iomanip>
#include <cmath>
int main() {
float x{201010.0f};
std::cout << std::setprecision(10);
float r1 = std::sqrt(x + 1.0f) - std::sqrt(x);
float r2 = 1.0f / (std::sqrt(x + 1.0f) + std::sqrt(x));
std::cout << "r1 = " << r1 << " r2 = " << r2 << std::endl;
double xd{201010.0};
double d = std::sqrt(xd + 1.0) - std::sqrt(xd);
std::cout << "d = " << d << std::endl;
}
Notice that we get several more significant digits correct when we compute it with the second formulation compared to the original form.
### Summation algorithms¶ | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
### Summation algorithms¶
Summing a sequence of numbers is a common place where roundoff error comes into play, especially if the numbers all vary in magnitude and you do not attempt to add them in a sorted fashion. There are a number of different summation algorithms that keep track of the loss due to roundoff and compensate the sum, for example the Kahan summation algorithm.
## Special numbers¶
IEEE 754 defines a few special quantities:
• NaN (not a number) is the result of 0.0/0.0 or std::sqrt(-1.0)
• Inf (infinity) is the result of 1.0/0.0
• -0 is a valid number and the standard says that -0 is equivalent to 0
## Trapping floating point exceptions¶
What happens when we do something bad? Consider this example:
Listing 58 undefined.cpp
#include <iostream>
#include <cmath>
double trouble(double x) {
return std::sqrt(x);
}
int main() {
double x{-1};
double y = trouble(x);
for (int i = 0; i < 10; ++i) {
y += std::pow(x, i);
}
std::cout << y << std::endl;
}
Here, we pass -1 to trouble() which then takes the square root of it – this results in a NaN. But if we run the code, it goes merrily about its way, using that result in the later computations.
Unix uses signals to indicate that a problem has happened during the code execution. If a program created a signal handler then that signal can be trapped and any desired action can be taken.
Note
This example was only tested on a Linux machine with GCC. Other OSes or compilers might have slightly different headers or functionality.
There are a few parts to trapping a floating point exception (FPE). First we need to enable exception trapping via:
feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW);
That catches 3 different types of floating point exceptions – invalid, divide-by-zero, and overflows.
Next we need to add a handler to deal with the exception:
signal(SIGFPE, fpe_handler); | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
Next we need to add a handler to deal with the exception:
signal(SIGFPE, fpe_handler);
Here, SIGFPE is the standard name for a floating point exception, and fpe_handler is the name of a function that will be called when we detect a SIGFPE.
In our handler, we use the Linux backtrace() function to access the stack of our program execution. This is really a C-function, so we need to use C-style arrays here.
Here’s the new version of our code:
Listing 59 undefined_trap.cpp
#include <iostream>
#include <cmath>
#include <csignal>
#include <cfenv>
#include <execinfo.h>
void fpe_handler(int s) {
std::cout << "floating point exception, signal " << s << std::endl;
const int nbuf = 64;
void *bt_buffer[nbuf];
int nentries = backtrace(bt_buffer, nbuf);
char **strings = backtrace_symbols(bt_buffer, nentries);
for (int i = 0; i < nentries; ++i) {
std::cout << i << ": " << strings[i] << std::endl;
}
abort();
}
double trouble(double x) {
return std::sqrt(x);
}
int main() {
feenableexcept(FE_INVALID|FE_DIVBYZERO|FE_OVERFLOW);
signal(SIGFPE, fpe_handler);
double x{-1};
double y = trouble(x);
for (int i = 0; i < 10; ++i) {
y += std::pow(x, i);
}
std::cout << y << std::endl;
}
When we compile the code, we want to add the -g option to store the symbols in the code – this allows us to understand where problems arise:
span.prompt1:before {
content: "\$ ";
}
g++ -g -o undefined_trap undefined_trap.cpp
Now when we run this, the program aborts and we see:
floating point exception, signal 8
0: ./undefined_trap() [0x401261]
1: /lib64/libc.so.6(+0x42750) [0x7f3dc35dc750]
2: /lib64/libm.so.6(+0x1435c) [0x7f3dc37d335c]
3: ./undefined_trap() [0x4012ff]
4: ./undefined_trap() [0x401347]
5: /lib64/libc.so.6(+0x2d560) [0x7f3dc35c7560]
6: /lib64/libc.so.6(__libc_start_main+0x7c) [0x7f3dc35c760c]
7: ./undefined_trap() [0x401145]
Aborted (core dumped) | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
This is the call stack for our program. In the brackets are the address in the program where the execution was when the FPE occurred. These are ordered such that the calling function is below the function where the execution is. So it usually is best to look at the addresses near the top.
We can turn those into line numbers using addr2line:
addr2line -e undefined_trap 0x4012ff
gives:
/home/zingale/classes/phy504/examples/floating_point/undefined_trap.cpp:23
and that line is precisely where the sqrt() is!
We can get slightly nicer output (including the function name) by doing:
addr2line -C -f -i -p -e undefined_trap 0x4012ff
which gives:
trouble(double) at /home/zingale/classes/phy504/examples/floating_point/undefined_trap.cpp:23
Note
On the MathLab machines, the stack trace seems to include an offset, like:
floating point exception, signal 8
0: ./undefined_trap(+0xc03) [0x561d8799dc03]
1: /lib/x86_64-linux-gnu/libc.so.6(+0x3ef10) [0x7f5461e3df10]
2: /lib/x86_64-linux-gnu/libm.so.6(+0x11397) [0x7f5462201397]
3: ./undefined_trap(+0xccf) [0x561d8799dccf]
4: ./undefined_trap(+0xd21) [0x561d8799dd21]
5: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f5461e20c87]
6: ./undefined_trap(+0xaaa) [0x561d8799daaa]
Aborted (core dumped)
and we need to use that offset instead with addr2line, like:
addr2line -a -f -e ./undefined_trap +0xcd5
1
this example is based on Yakowitz & Szidarovszky | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840872,
"lm_q1q2_score": 0.8503205634266121,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 4301.407405703756,
"openwebmath_score": 0.5280643701553345,
"tags": null,
"url": "https://zingale.github.io/phy504/floating-point.html"
} |
When does improper Riemann integration fail for computing expected values?
Riemann integration requires bounded intervals of integration. However, some continuous random variables (like those from the normal or gamma distribution) have unbounded support sets.
For these 2 distributions, would improper Riemann integrals be sufficient to get their expected values? If not, why not?
Usually, improper Riemann integration will correctly provide the expectation of a continuous random variable with an unbounded support. Where you will usually encounter problems with improper Riemann integrals is when the integral of interest does not converge absolutely. In this case the improper integral may have some value, but this value has limited probabilistic meaning; for example the law of large numbers doesn't necessarily hold.
As an example of this to get a feel for it, you can look at the evaluation of the expected value of $$X \sin(X)$$ where $$X$$ has PDF $$\frac{1}{x^2}$$ on $$[1,\infty)$$ and $$0$$ otherwise. This expectation is formally $$\int_1^\infty \frac{\sin(x)}{x} dx$$ which has a value in improper Riemann integration. But actually this random variable will not satisfy the law of large numbers, as you can observe numerically, so it doesn't make a whole lot of sense to say that it has an expected value.
Indeed, if you have Matlab or Octave, try running the following:
x=1./rand(1000,1);
plot(cumsum(x.*sin(x))./(1:1000)');
This shows sample means from this distribution for progressively larger samples, and you see that they don't converge. (Off-topic: the weird 1/rand trick being used there is called the probability integral transformation, which is extremely useful for numerical work in probability.)
Note that this will never be a problem for a random variable of one sign such as your example of the Gamma distribution. It is also not a problem for the normal distribution. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840871,
"lm_q1q2_score": 0.850320563426612,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 294.0713874732837,
"openwebmath_score": 0.8887693285942078,
"tags": null,
"url": "https://math.stackexchange.com/questions/3887771/when-does-improper-riemann-integration-fail-for-computing-expected-values/3887777"
} |
The exception to the second "usually" above is when the improper Riemann integral doesn't exist but the Lebesgue integral does. This is a pretty uncommon situation in practice.
• @Iterator516 No, the integrals in both of those cases converge absolutely. – Ian Oct 30 at 15:30
• Awesome! Thank you! – Iterator516 Oct 30 at 15:30
• I mistakenly deleted my initial question to Ian. I asked if the integrals for the expectations of the normal and the gamma distributions do converge. – Iterator516 Oct 30 at 16:29 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795121840871,
"lm_q1q2_score": 0.850320563426612,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 294.0713874732837,
"openwebmath_score": 0.8887693285942078,
"tags": null,
"url": "https://math.stackexchange.com/questions/3887771/when-does-improper-riemann-integration-fail-for-computing-expected-values/3887777"
} |
# Greatest Common Divisor of prime numbers
What is the greatest common divisor of $2^4\cdot3^4\cdot25\cdot7$ and $2\cdot12^2\cdot15$?
I know how to find the GCD of a problem like this, but I didn't know what to do since $12$ is not a prime number. Should I say $12^2 = 2^2\cdot2^2\cdot3^2$?
• Hint: $12^2 = (2^2*3)^2 = 2^4*3^2$ – AnalyticHarmony Sep 18 '17 at 2:22
• that's a start. $12^2 =2^2*2^2*3^2=2^4*3^2$. And $15=3*5$ so $12^2*15=2^4*3^2*3*5 = 2^4*3^3*5$. Basically the first step is to rewrite everything as its unique prime factorization. $2^4*3^4*25*7 = 2^4*3^4*5^2*7$ and $2*12^2*15 = 2*2^4*3^2*3*5=2^4*3^3*5$. Then... you know what to do. – fleablood Sep 18 '17 at 3:49
The first one equal to $2^4*3^4*5^2*7$
The second one equals to $2^5*3^3*5$
Therefore the GCD is $2^4*3^3*5=2160$
Yes, that is precisely what you should be doing.
In short, when you want to find the gcd of two numbers directly, you must first represent each one as a product of prime powers, before matching powers and primes.
So in our case, we can write: $$2^4 \times 3^4 \times \color{blue}{25} \times 7 = 2^4 \times 3^4 \times \color{blue}{5^2} \times 7 \\ 2 \times \color{red}{12^2} \times \color{green}{15} = 2 \times \color{red}{2^2 \times 2^2 \times 3^2} \times \color{green}{3 \times 5} = 2^5 \times 3^3 \times 5$$
where, I highlight by color the terms that are expanded on both the LHS and RHS.
Now, we are permitted to compare powers directly. This gives us the answer as $2^4 \times 3^3 \times 5$.
• Nicely explained and nice use of colors. The OP should note when you express a number and a product of prime powers, there will always be exactly one unique way to do it. So doing this will always be a failsafe that will work. – fleablood Sep 18 '17 at 3:54 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795114181105,
"lm_q1q2_score": 0.8503205627666939,
"lm_q2_score": 0.861538211208597,
"openwebmath_perplexity": 187.9668085533342,
"openwebmath_score": 0.863879382610321,
"tags": null,
"url": "https://math.stackexchange.com/questions/2433888/greatest-common-divisor-of-prime-numbers"
} |
# Eigenvalues of block Toeplitz matrix with Toeplitz blocks
Consider integers $$m,n$$ and a $$m \times m$$-block Toeplitz matrix $$A$$ consisting of two different types of blocks as follows
\begin{align} A_{mn \times mn} &= \begin{bmatrix} B & C & C & \cdots & \cdots & C \\ C & B & C & C & \cdots & C \\ C & C & B & C & \ddots & \vdots \\ \vdots & \ddots & \ddots & \ddots & \ddots & C \\ C & \cdots & \cdots & C & B & C \\ C & \cdots & \cdots & \cdots & C & B \end{bmatrix} _{mn \times mn} , \end{align}
where $$B$$'s are diagonal blocks with $$B=\frac{1}{m}I_n$$ and $$C$$'s are multiples of the all-ones matrix $$J_n$$, specifically $$C=\frac{1}{mn}J_n$$.
I want to compute the eigenvalues of $$A$$ (I am mainly interested in the value of the 2nd largest eigenvalue since it has a special meaning in graph expansion applications).
Note that in my problem the following conditions also hold for $$m,n$$:
• $$m$$ is odd.
• $$n$$ is prime.
• $$m.
I have experimented with such matrices on the computer and I have observed a trend for the spectrum of $$A$$ which consists of the following eigenvalues:
• $$\lambda_1=0$$ with algebraic multiplicity $$m-1$$.
• $$\lambda_2=1/m$$ with algebraic multiplicity $$m(n-1)$$.
• $$\lambda_3=1$$ with algebraic multiplicity $$1$$.
I do not claim that this is necessarily the answer but at least it was consistent for the pairs of $$m,n$$ I tried.
Can you suggest how one can go and prove the above claim (if correct) or pinpoint other known results?
EDIT
After Omnomnomnom's note that $$$$A = \frac 1{mn}\underbrace{\pmatrix{ 0&1&\cdots & 1\\ 1&0&\ddots&\vdots\\ \vdots&\ddots&\ddots&1\\ 1&\cdots&1&0}}_{= C_{m \times m}} \otimes J_n + \frac 1m I_{mn}$$$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795091201804,
"lm_q1q2_score": 0.8503205625413559,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 249.14645551469715,
"openwebmath_score": 1.0000097751617432,
"tags": null,
"url": "https://math.stackexchange.com/questions/3569668/eigenvalues-of-block-toeplitz-matrix-with-toeplitz-blocks"
} |
I did some computation of the spectrums of the individual matrices. First, the characteristic polynomial of the all-ones $$J_n$$ is $$(\lambda-n)\lambda^{n-1}$$ and hence its spectrum (with the multiplicities) is $$$$\sigma(J_n)=\{(n,1),(0,n-1)\}.$$$$ For $$C$$, assume that $$\lambda_1,\dots,\lambda_m$$ are its eigenvalues. By the facts that $$\mathrm{det}(C-(-1)I_m)=det(J_m)=0$$, $$C\mathbf{1}_m=(m-1)\mathbf{1}_m$$ and $$\mathrm{trace}(C)=\sum_i\lambda_i=0$$ it turns out that $$$$\sigma(C)=\{(m-1,1),(-1,m-1)\}.$$$$ Suppose that $$\mu_1,\dots,\mu_n$$ are the eigenvalues of $$J_n$$ then by the Kronecker product's properties the spectrum of $$CJ_n$$ consists of the pairwise products $$\lambda_i\mu_j, \forall i,j$$.
Your observations are correct and hold for arbitrary $$m,n$$. It suffices to note that $$A = \frac 1{mn}\pmatrix{ 0&1&\cdots & 1\\ 1&0&\ddots&\vdots\\ \vdots&\ddots&\ddots&1\\ 1&\cdots&1&0} \otimes J_n + \frac 1m I_{mn}$$ and use the properties of the Kronecker product.
In more detail: $$C_{m \times m}$$ is a rank 1 update of a scalar matrix, so we find that its eigenvalues are $$-1$$ with multiplicity $$m-1$$ and $$m-1$$ with multiplicity $$1$$. On the other hand, $$J_n$$ has eigenvalues $$0$$ with multiplicty $$n-1$$ and $$n$$ with multiplicity $$1$$.
It follows that $$C \otimes J$$ has eigenvalues $$0$$ with multiplicity $$m(n-1)$$, $$-n$$ with multiplicity $$m-1$$, and $$n(m-1)$$ with multiplicity $$1$$.
From there, it suffices to note that $$\lambda$$ is an eigenvalue of $$A$$ if and only if $$c \lambda + d$$ is an eigenvalue of $$c A + dI$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795091201804,
"lm_q1q2_score": 0.8503205625413559,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 249.14645551469715,
"openwebmath_score": 1.0000097751617432,
"tags": null,
"url": "https://math.stackexchange.com/questions/3569668/eigenvalues-of-block-toeplitz-matrix-with-toeplitz-blocks"
} |
• I have made some edits based on your response (please see edit). However, the resulting sum of the Kronecker product and the diagonal matrix confuses me. How can I proceed?
– mgus
Mar 5 '20 at 3:35
• @mgus I'll add in what I had in mind when I have the chance Mar 5 '20 at 10:08
• See my latest edit Mar 5 '20 at 14:21
• Thanks for your response. Now it is clear to me except one thing: if the spectrums of $C$ and $J_n$ are indeed $\sigma(C)=\{(m-1,1),(-1,m-1)\}$ and $\sigma(J_n)=\{(n,1),(0,n-1)\}$, respectively then where is the eigenvalue $-n(m-1)$ of $C \otimes J$ is coming from? I thought it would be $n(m-1)$ with multiplicity $1$. After doing the remaining of the calculations for the eigenvalues of $A$ it seems that this should be true but how? Am I missing some plus or minus somewhere?
– mgus
Mar 5 '20 at 17:37
• @mgus You're right about $n(m-1)$; I just had an extra minus sign there. Mar 5 '20 at 17:39 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795091201804,
"lm_q1q2_score": 0.8503205625413559,
"lm_q2_score": 0.8615382129861583,
"openwebmath_perplexity": 249.14645551469715,
"openwebmath_score": 1.0000097751617432,
"tags": null,
"url": "https://math.stackexchange.com/questions/3569668/eigenvalues-of-block-toeplitz-matrix-with-toeplitz-blocks"
} |
# Optimization of the area of a cross inscribed in a circle
I've really been scratching my head over this optimization problem. "Consider a symmetric cross inscribed in a circle of radius $r$." The length from the center of the cross to the middle of one of its arms is $x$. Also, the angle between two line segments drawn from the cross's center to the vertices of one of its arms has a measure of $\theta$. Here's a diagram:
There are three parts to the problem: "(a) Write the area $A$ of the cross as a function of $x$ and find the value of $x$ that maximizes the area. (b) Write the area $A$ of the cross as a function of $\theta$ and find the value of $\theta$ that maximizes the area. (c) Show that the critical numbers of parts (a) and (b) yield the same maximum area. What is that area?"
So, let me show you what I've done so far. For part (a), I decided to break the cross into two middle rectangles and two side rectangles. I saw that a middle rectangle (from the center to the top) would have an area of
$$x \cdot 2 \sqrt{r^2 - x^2}$$
using the Pythagorean theorem. I worked out that a side rectangle (the remaining area on the right, adjacent to the middle rectangles) would have an area of
$$2 \sqrt{r^2-x^2} \cdot \left( x - \sqrt{r^2 - x^2} \right) .$$
So, the area of the cross is
$$A = 2 \bigg( x \cdot 2 \sqrt{r^2 - x^2} + 2 \sqrt{r^2 - x^2} \cdot \Big( x - \sqrt{r^2 - x^2} \Big) \bigg) = 8x \sqrt{r^2 - x^2} - 4r^2 + 4x^2 .$$
If my math is right there (fingers crossed), then I'll take the first derivative to locate a maximum.
$$A^\prime = 8 \sqrt{r^2 - x^2} + 8x \left( 1 \over 2 \right) \left( r^2 - x^2 \right)^{- {1 \over 2}} \left( -2x \right) + 8x.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795079712151,
"lm_q1q2_score": 0.8503205562882286,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 163.45316261665036,
"openwebmath_score": 0.923742949962616,
"tags": null,
"url": "http://math.stackexchange.com/questions/261100/optimization-of-the-area-of-a-cross-inscribed-in-a-circle"
} |
I was a little unsure about what to do at this point. I plugged the $A^\prime$ equation into my graphing calculator, substituting $1^2$ for $r^2$ (for a radius of $1$). The graph crosses the $x$-axis at $x \approx 0.85$. Substituting $2^2$ for $r^2$ (for a radius of $2$) gives me $x \approx 1.70$. From this, I concluded that
$$A^\prime = 0 \; \mathbf{at} \; x \approx 0.85r.$$
Analysis of graphs of $A$ for various values of $r$ concludes that, indeed, maxima do appear at $x \approx 0.85r$. So, I have the function $A$ in terms of $x$, but I'm curious: What should my final answer be for the second part of (a)? All I have is $x \approx 0.85r$. Is that a sufficient answer?
As for part (b), I really have no idea how to write $A$ in terms of $\theta$. I know that $\text{area} = {1 \over 2} b \cdot c \cdot \sin A$ for triangles, but I really need help writing the area of this cross in terms of $\theta$.
Part (c) should be easy enough once I finish (b).
If you got to the end of this, I sincerely thank you for reading, and I would really appreciate an answer (and any corrections to my math). Thanks!
-
You can simplify the formula for $A'$ if you set it to zero and multiply with $\sqrt{1-x^2}$ (with $r=1$). In this way you get $0=1-2x^2+8x\sqrt{1-x^2}$. This is still tricky, but you might want to try a tailor expansion until $x^2$ to simplify further. – Konstantin Schubert Dec 18 '12 at 1:07
@Konstantin I computed $x\sqrt{1-x^2}=2x^2-1$. Square both sides and you have a quadratic in $x^2$. The solutions are $x^2={1\over2}\pm{\sqrt5\over10}$. – David Mitra Dec 18 '12 at 1:22
@DavidMitra aww thanks – Konstantin Schubert Dec 18 '12 at 1:28
Without loss of generality we may assume that the radius is $1$: we can scale area by $r^2$ later. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795079712151,
"lm_q1q2_score": 0.8503205562882286,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 163.45316261665036,
"openwebmath_score": 0.923742949962616,
"tags": null,
"url": "http://math.stackexchange.com/questions/261100/optimization-of-the-area-of-a-cross-inscribed-in-a-circle"
} |
Without loss of generality we may assume that the radius is $1$: we can scale area by $r^2$ later.
By the formula you quoted, the area of the triangle enclosed by the two lines that form the angle $\theta$ is $\frac{1}{2}\sin\theta$. The area covered by one of the two full arms of the cross is therefore $4$ times this, which is $2\sin\theta$.
Double this to get the sum $4\sin\theta$ of the areas covered by the two full arms. Unfortunately, this sum counts the area of the middle square twice. So we will need to subtract the area of that square.
Note that by trigonometry, the horizontal segment at the top of the cross has length $2\sin(\theta/2)$. Thus the middle square has area $4\sin^2(\theta/2)$. Using the trigonometric identity $\cos 2\phi=1-2\sin^2\phi$, we find that the middle square has area $2-2\cos \theta$.
So the area of the cross is $4\sin\theta +2\cos\theta-2$. Maximizing should be straightforward.
Remarks: $1.$ We don't really need calculus. Look at the equivalent problem of maximizing $4\sin\2\theta+2\cos\theta$. Rewrite this as $$2\sqrt{5}\left(\frac{2}{\sqrt{5}}\sin \theta+\frac{1}{\sqrt{5}}\cos\theta\right),$$ and let $\psi$ be the angle whose cosine is $2/\sqrt{5}$ and whose sine is $1/\sqrt{5}$. Then our expression becomes $2\sqrt{5}\sin(\theta+\psi)$. The maximum possible value of the sine function is $1$. So the maximum area is $2\sqrt{5}-2$.
$2.$ We can use the above calculation to answer your question about $x$. Alternately, set the derivative equal to $0$, as you did. Manipulation will yield an explicit expression for the root. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795079712151,
"lm_q1q2_score": 0.8503205562882286,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 163.45316261665036,
"openwebmath_score": 0.923742949962616,
"tags": null,
"url": "http://math.stackexchange.com/questions/261100/optimization-of-the-area-of-a-cross-inscribed-in-a-circle"
} |
$3.$ At a certain stage you were maximizing $8x\sqrt{r^2-x^2}-4r^2+4x^2$. Let $x=r\sin t$. We want to maximize $8r^2\sin t\cos t-4r^2+4r^2\sin^2 t$. Forget about the $r^2$ part, it is a constant multiplier. Now simplify to $8\sin t\cos t-4\cos^2 t$, differentiate. (Using double angle identities to simplify first is a good idea.) We can think of this as just a technical device to ensure we end up with a simple equation.
-
Could you show me how $\sqrt{2 - 2\cos\theta} = 2\sin(\theta/2)$? – Jackson Dec 18 '12 at 1:44
Recall the trig identity $\cos 2t=2\cos^2 t-1=1-2\sin^2 t$. Rewrite as $2\sin^2 t=1-\cos 2t$. Double. Get $4\sin^2 t=2-2\cos 2t$. Finally, let $t=\theta/2$. – André Nicolas Dec 18 '12 at 1:47
Thank you so much! It took me a while, but I got everything figured out. I cannot thank you enough :) – Jackson Dec 18 '12 at 2:07
I will add a last remark to my post in a few minutes. – André Nicolas Dec 18 '12 at 2:15
I'm trying to solve the same problem, and got to the same concusions. The thing is, if you graph the function you get this :
as you can see, the graph takes negative values when x gets smaller, but if the function represents the area of the cross, how come that area is negative ??
I even made a little program to test this, here it is: http://www.khanacademy.org/cs/calculus-maxarea-circle-v00x/1512261081
does anybody have an idea of what's going on ?
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9869795079712151,
"lm_q1q2_score": 0.8503205562882286,
"lm_q2_score": 0.8615382076534742,
"openwebmath_perplexity": 163.45316261665036,
"openwebmath_score": 0.923742949962616,
"tags": null,
"url": "http://math.stackexchange.com/questions/261100/optimization-of-the-area-of-a-cross-inscribed-in-a-circle"
} |
# Easiest way to learn exact values for trig functions?
1. Oct 30, 2015
### cmkluza
I'm realizing now how much I need to know the exact values of various trigonometric functions, as shown in various trig tables. Memorizing is pretty arduous, and I'd prefer to understand it, so how can I learn all of these?
2. Oct 30, 2015
### Staff: Mentor
A long long time ago, my math teacher made us build our own trigonometric circles. Having a geometrical representation really helped me, and the values of the functions have stuck with me ever since.
3. Oct 30, 2015
### cmkluza
Thanks! I guess I'd forgotten that these circles existed. Does this mean that if I memorize the important angles/values from the first quadrant I can use the identities of -sin(θ) = sin(-θ) and cos(-θ) = cos(θ) to figure out the values in each other quadrant?
4. Oct 30, 2015
### Staff: Mentor
It's even more than that. Consider for instance π/6 (30°): you get halfway up on the y axis, so obviously sin π/6 = 1/2. Likewise, for π/4, you can see it as building a square of side 1/2 (along x and y), so the diagonal is (according to Pythagoras) $\sqrt{(1/2)^2 + (1/2)^2} = 1/\sqrt{2} = \sqrt{2}/{2}$. All of these geometric equivalents have really helped me.
5. Oct 30, 2015
### symbolipoint
That graphical circle representation is typically called, the Unit Circle, and is a very important part of Trigonometry instruction. Is is used frequently. The picture can often help because of how the circle is symmetric. Full ray rotation, 2*pi radians. Same function values as for zero degrees rotation.
6. Oct 30, 2015
### cmkluza
What would you guys say are the most important angles to learn? I've seen some charts that go from 0, adding π/12 each segment, and that seems like an awful lot to go through in order to find these angles, are the three, π/6, π/4, and π/3 and their counterparts typically sufficient?
7. Oct 30, 2015
### symbolipoint
THE MOST COMMON you must know are 0, 2*pi, pi/2, pi/4, pi/3, pi/6. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9518632302488963,
"lm_q1q2_score": 0.8503083863214386,
"lm_q2_score": 0.8933094159957173,
"openwebmath_perplexity": 698.9894041085802,
"openwebmath_score": 0.6334378123283386,
"tags": null,
"url": "https://www.physicsforums.com/threads/easiest-way-to-learn-exact-values-for-trig-functions.840460/"
} |
### symbolipoint
THE MOST COMMON you must know are 0, 2*pi, pi/2, pi/4, pi/3, pi/6.
8. Oct 30, 2015
### Staff: Mentor
I realize that this might not be as clear as it can be. Rather, take the radius as the hypotenuse of a right triangle with two equal sides of length $a$ (along the x and y axes), so by Pythagoras $2a^2 = 1 \Rightarrow a = 1/\sqrt{2}$, thus $\cos \pi/4 = \sin \pi/4 = \sqrt{2}/2$.
9. Oct 30, 2015
### Staff: Mentor
πTo expand on what symbolipoint said, the important angles in the first quadrant, and their sines and cosines are:
$\sin(0) = \frac {\sqrt{0}} 2 =\cos(\pi/2)$
$\sin(\pi/6) = \frac {\sqrt{1}} 2 =\cos(\pi/3)$
$\sin(\pi/4) = \frac {\sqrt{2}} 2 =\cos(\pi/4)$
$\sin(\pi/3) = \frac {\sqrt{3}} 2 =\cos(\pi/6)$
$\sin(\pi/2) = \frac {\sqrt{4}} 2 =\cos(0)$
These values should be memorized, but you can use symmetry to figure out the sines, cosines, tangents, etc. of the counterparts of these angles in the other three quadrants.
10. Oct 30, 2015
Staff Emeritus
There are 7 special angles worth memorizing:0, 15, 30, 45, 60, 75 and 90. Sines going up are cosines coming down. Tangent=sine/cosine may be a bit slow for calculating in your head for 15 and 75, and arguably 30 and 60, but the other three are trivial. So you have at most 10 - possibly 8 - facts to remember. That shouldn't be too arduous.
11. Oct 30, 2015
### Student100
Another method that may help you should you forget is to draw a picture and use geometry/trig: | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9518632302488963,
"lm_q1q2_score": 0.8503083863214386,
"lm_q2_score": 0.8933094159957173,
"openwebmath_perplexity": 698.9894041085802,
"openwebmath_score": 0.6334378123283386,
"tags": null,
"url": "https://www.physicsforums.com/threads/easiest-way-to-learn-exact-values-for-trig-functions.840460/"
} |
Another method that may help you should you forget is to draw a picture and use geometry/trig:
From my poorly drawn circle you can see you want to find the point, (x, y) on the unit circle that intersects with a line of the radial length drawn 30 degrees from the origin. The right triangle formed by hypotenuse (which is our radius of 1) forms a special 30, 60, 90 triangle. A property of such a triangle is that the hypotenuse is twice the length of the shorter leg, and the longer leg is $\sqrt{3}$ times the length of the shorter leg. Since the hypotenuse is one, the length of the shorter leg, $y=\frac{1}{2}$ and the longer leg, x is $\sqrt{3}$ times more so, $x=\frac{\sqrt{3}}{2}$. So the $sin(30)=\frac{1}{2}$ while the $cosine(30)=\frac{\sqrt{3}}{2}$
You can repeat the same logic for 60 degrees, or just realize that the x and y's are swapped. For a 45-45-90 triangle, the legs are congruent, so the hypotenuse is $\sqrt{2}$ the length of either leg. So lets say the hypotenuse has length $x\sqrt{2}$ in this case, since we know the length to be one, we can simply say $x\sqrt{2}=1$ or $x=\frac{1}{\sqrt{2}}$. The legs are congruent so $y=\frac{1}{\sqrt{2}}$.
For 15 and 75 degrees you can use $sin(45-30)$ and solve using trig rules. For 0 and 90 you can again draw a line from the origin to the corresponding point on the circle and see either, x=1 in the case of an angle of 0, or x=0 in the case of an angle of 90 or vice versus.
Not sure if this will help or not, hopefully it'll allow you to re-derive these values should you forget them on a test.
12. Oct 30, 2015
### symbolipoint
The common reference angles that are learned on the Unit Circle come from a couple of Special Triangles.
13. Nov 4, 2015
### rs1n | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9518632302488963,
"lm_q1q2_score": 0.8503083863214386,
"lm_q2_score": 0.8933094159957173,
"openwebmath_perplexity": 698.9894041085802,
"openwebmath_score": 0.6334378123283386,
"tags": null,
"url": "https://www.physicsforums.com/threads/easiest-way-to-learn-exact-values-for-trig-functions.840460/"
} |
13. Nov 4, 2015
### rs1n
If you look at the picture here: http://etc.usf.edu/clipart/43200/43216/unit-circle8_43216_lg.gif you will see that only the first quadrant is needed (and even then, only the angles between 0 and 45 degrees are needed (everything else can be derived by symmetry of the circle. As for the coordinates, I find it easier to remember them as:
0: $\left( \sqrt{\frac{4}{4}}, \sqrt{\frac{0}{4}}\right)$
pi/6: $\left( \sqrt{\frac{3}{4}}, \sqrt{\frac{1}{4}}\right)$
pi/4: $\left( \sqrt{\frac{2}{4}}, \sqrt{\frac{2}{4}}\right)$
pi/3: $\left( \sqrt{\frac{1}{4}}, \sqrt{\frac{3}{4}}\right)$
pi/2: $\left( \sqrt{\frac{0}{4}}, \sqrt{\frac{4}{4}}\right)$
14. Nov 5, 2015
### Erland
Easiest way is to use to draw a half square and a half equiliteral triangle, and use the Pythagorean theorem to obtaim sin, cos and tan for the angles in tjose triangles, i.e. 45, 30 and 60 degrees.
15. Nov 5, 2015
### Fredrik
Staff Emeritus
And once you have those, you can use them to find the values for some other angles. For example,
\begin{align*}
&\sin 15=\sin(45-30)=\sin 45\cos 30-\cos 45\sin 30\\
&\sin 120=\sin(2\cdot 60)=2\sin 60\cos 60
\end{align*} The only thing worth committing to memory in my opinion, is (what Erland said) that you start with half a square and half an equilateral triangle.
16. Nov 5, 2015
### symbolipoint
The unit circle and its typically shown values can be easily memorized.
THIS here is essential: | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9518632302488963,
"lm_q1q2_score": 0.8503083863214386,
"lm_q2_score": 0.8933094159957173,
"openwebmath_perplexity": 698.9894041085802,
"openwebmath_score": 0.6334378123283386,
"tags": null,
"url": "https://www.physicsforums.com/threads/easiest-way-to-learn-exact-values-for-trig-functions.840460/"
} |
Binomial coefficient real life example.
"At a university, $15$ juniors and $20$ seniors volunteer to serve as a special committee that requires $8$ members. A lottery is used to select the committee from among the volunteers. Suppose the chosen students consists of six juniors and two seniors.
(a) For a test of homogeneity, what are the expected counts?
This question I understand.
(b) If the selection had been random, what is the probability of the committee having exactly two seniors?
My answer was that the probability is binomial, with Binom$(k=2, n=8, p=0.57)$, but this is apparently wrong. Instead the correct answer is: $$\frac{\binom{20}{2}\binom{15}{6}}{\binom{35}{8}}$$.
Can anyone explain the difference between this and standard binomial distribution?
• I suppose that you made a type and that there are $15$ junior volunteers, not $13$. Am I right? – José Carlos Santos Jun 17 '18 at 7:12
• It's not a straight binomial since the trials are not independent. Knowing that the first choice was a senior changes the probability that the second was a senior. – lulu Jun 17 '18 at 7:12
• Ahh. Thanks! I understand now :-) – Mathe Jun 17 '18 at 7:20
• This is the hypergeometric distribution – Lord Shark the Unknown Jun 17 '18 at 7:21
• To be sure of useful answers, you should state null and alternative hypotheses for your 'test of homogeneity'. You don't have quite large enough expected counts for the chi-squared goodness-of-fit statistic to truly have a chi-squared distribution. // Using the hypergeometric distribution, it seems you are aiming at "Fisher's exact test' which you can google. – BruceET Jun 17 '18 at 8:04
The issue is that the trials are not independent from each other. Having chosen a junior first, for example, changes the probability of now choosing a senior. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811611608241,
"lm_q1q2_score": 0.8503048968231632,
"lm_q2_score": 0.8807970685907242,
"openwebmath_perplexity": 460.73714445440305,
"openwebmath_score": 0.8433619737625122,
"tags": null,
"url": "https://math.stackexchange.com/questions/2822356/binomial-coefficient-real-life-example"
} |
You must look at how many ways are there to choose two seniors (which is exactly $\binom{20}{2}$) and how many ways are there to choose six juniors (which is exactly $\binom{15}{6}$) and multiply them. This gives you the overall number of valid arrangements.
To get the probability, simply divide by the number of overall arrangements possible (which is $\binom{35}{8}$).
• To get a p-value you also need to include the probabilities of more extreme cases. – BruceET Jun 17 '18 at 8:47
In case it is helpful, here is Minitab output for testing two proportions. It attempts a normal test (with a warning about sample sizes being too small) and does Fisher's exact test.
Test and CI for Two Proportions
Sample X N Sample p
1 6 15 0.400000
2 2 20 0.100000
Difference = p (1) - p (2)
Estimate for difference: 0.3
95% CI for difference: (0.0193759, 0.580624)
Test for difference = 0 (vs ≠ 0): Z = 2.10 P-Value = 0.036
* NOTE * The normal approximation may be inaccurate for small samples.
Fisher’s exact test: P-Value = 0.051 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9653811611608241,
"lm_q1q2_score": 0.8503048968231632,
"lm_q2_score": 0.8807970685907242,
"openwebmath_perplexity": 460.73714445440305,
"openwebmath_score": 0.8433619737625122,
"tags": null,
"url": "https://math.stackexchange.com/questions/2822356/binomial-coefficient-real-life-example"
} |
# Calculation of transition probabilities of Markov Chain problem
In the step of learning Markov chains, I came across few questions from assignments on UTDallas website. Finding the transition probabilities seems a bit hard for me in this one particular question only. The question is
(Sec 7.3, page 355, #1) Consider a system with two components. We observe the state of the system every hour. A given component operating at time $n$ has probability $p$ of failing before the next observation at time $n + 1$. A component that was in a failed condition at time $n$ has a probability $r$ of being repaired by time $n + 1$, independent of how long the component has been in a failed state. The component failures and repairs are mutually independent events. Let $X_n$ be the number of components in operation at time $n$. The process $\{X_n, n = 0, 1, . . .\}$ is a discrete time homogeneous Markov chain with state space $I = \{0, 1, 2\}$.
a) Determine its transition probability matrix, and draw the state diagram.
b) Obtain the steady state probability vector, if it exists
Although the answers are given, but I cannot understand that on what basis the transition probabilities are calculated. Can someone help me in this...
I had the following guesses my ownself (which mostly proved to be wrong)
\begin{bmatrix} 1-r-r^2 & r & r^2\\ ??& ?? & r(1-p) \\ p^2 & ?? & ?? \end{bmatrix}
The actual solution that the website pose is following...
\begin{bmatrix} (1-r)^2 & 2r(1-r) & r^2\\ p(1-r)& pr + (1-p)(1-r) & r(1-p) \\ p^2 & 2p(1-p) & (1-p)^2 \end{bmatrix} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692339078751,
"lm_q1q2_score": 0.8502855802951937,
"lm_q2_score": 0.8705972818382005,
"openwebmath_perplexity": 708.8711653335081,
"openwebmath_score": 0.9372547268867493,
"tags": null,
"url": "https://stats.stackexchange.com/questions/263931/calculation-of-transition-probabilities-of-markov-chain-problem"
} |
• Thanks Yes it is self-study question. What I am asking is not the solution since I am not taking this exam, I am trying to learn the probability, in general, and markov chains, in specific. Appreciate your comment @Tavrock. – Kashan Feb 25 '17 at 4:11
• I am looking if someone can help me to learn HERE how transition probabilities are calculated...Since to my understanding, transitional probabilities are different than normal probabilities... – Kashan Feb 25 '17 at 10:59
• Can you explain the reasoning behind your guesses? (Also, based on the last comment, do you know what a transition probability is?) – Juho Kokkala Feb 25 '17 at 14:27
Note that, there are two components and each of them individually could be either in working or failure state. Then the states of the Markov chain be designated as $ff$ both components failed, $wf$ one component working and one component failed, and $ww$ both components working. Given that, the components function independently of each other.
• If the chain is in state $ff$ at time $n$, at the next time point it could be in the state
• $ff$ with probability $(1-r)(1-r)=(1-r)^2$, as the probability of not being repaired by next time point is $(1-r)$;
• $wf$ with probability $2r(1-r)$, as it may be the first component
that was repaired or the the second component that was repaired, so
that only one of the two components will be working;
• $ww$ with probability $r^2$, if both the components got repaired.
• If the chain is in the state $wf$ at time $n$, then at the next time point it could be in the state
• $ff$ with probability $p(1-r)$, as the working component failed and the component requiring repair was not yet repaired; | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692339078751,
"lm_q1q2_score": 0.8502855802951937,
"lm_q2_score": 0.8705972818382005,
"openwebmath_perplexity": 708.8711653335081,
"openwebmath_score": 0.9372547268867493,
"tags": null,
"url": "https://stats.stackexchange.com/questions/263931/calculation-of-transition-probabilities-of-markov-chain-problem"
} |
• $wf$ with probability $pr+(1-p)(1-r)$, as the working component was
not failed and the component requiring repair is not repaired, so
that only one component is working, which has a probability
$(1-p)(1-r)$; or the component working at the previous time has
failed and the component requiring repair has got repaired, which has a probability $pr$; mutually exclusiveness of the events results in the required probability;
• $ww$ with probability $r(1-p)$, as the working component does not
require repair and the failed component got repaired.
• If the chain is in the state $ww$ at time $n$, then at the next time point it could be in the state
• $ff$ with probability $p^2$, as both components have failed;
• $wf$ with probability $2p(1-p)$, which is the sum of probabilities
of two mutually exclusive events, viz., the first component failed
and the second working or the first component working and the
second component failed;
• $ww$ with probability $(1-p)^2$, as both components are still
working.
Hence, the transition matrix:
\begin{equation*} P=\begin{array}{c|ccc} &ff & wf & ww\\ \hline ff & (1-r)^2& 2r(1-r) & r^2\\ wf & p(1-r) & pr+(1-p)(1-r) & r(1-p) \\ ww & p^2 & 2p(1-p) & (1-p)^2 \end{array} \end{equation*}
• Thanks.... Helped me a lot in developing understanding and brushing off some dust over my mind – Kashan Feb 26 '17 at 2:20 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692339078751,
"lm_q1q2_score": 0.8502855802951937,
"lm_q2_score": 0.8705972818382005,
"openwebmath_perplexity": 708.8711653335081,
"openwebmath_score": 0.9372547268867493,
"tags": null,
"url": "https://stats.stackexchange.com/questions/263931/calculation-of-transition-probabilities-of-markov-chain-problem"
} |
# Homework Help: Reduction of Order
1. Oct 24, 2014
### QuantumCurt
1. The problem statement, all variables and given/known data
Given - $$y_1(x)=sin(2x)$$, find a second linearly independent solution to $$y''+4y=0$$
2. Relevant equations
I'm using reduction of order to write a second solution as a multiple of the first solution. I think I've gotten to the right answer, my main question is in how I should write the general solution of the equation.
3. The attempt at a solution
Using the fact that $y_1(x)=sin(2x)$, and that $y_2(x)=vy_1(x)$ I'm writing a second solution as $$y_2(x)=vsin(2x)$$
Now taking the first and second derivatives I get $$y_2'(x)=v'sin(2x)+2vcos(2x)$$
and $$y_2''(x)=v''sin(2x)+4v'cos(2x)-4vsin(2x)$$
Now I substitute back into the original equation and get, $$v''sin(2x)+4v'cos(2x)=0$$
Now to reduce order; $z=v' and z'=v''$
Then substituting - $$z'sin(2x)+4zcos(2x)=0$$
Which leads to $$\frac{dz}{z}=-4cot(2x)dx$$
Integrating this to logarithms and then exponentiating etc. leads me to - $$z=csc^2(2x)$$
Since $z=v'$ I can substitute again
$$v=\int csc^2(2x)dx$$
$$v=-\frac{1}{2}cot(2x)$$
Now since $y_2(x)=vy_1(x)$, I can say that,
$$y_2(x)=[-\frac{1}{2}cot(2x)][sin(2x)]$$
which simplifies to
$$y_2(x)=-\frac{1}{2}cos(2x)$$
The formula for the general solution is $y(x)=c_1y_1(x)+c_2y_2(x)$. Given this fact, my general solution is written as - $$y(x)=c_1sin(2x)-\frac{1}{2}c_2cos(2x)$$
Now...my question -
Since $-\frac{1}{2}c_1$ is really just an arbitrary constant, can I write my general solution in terms of just a constant rather than a fraction times a constant? This would give me the solution of -
$$y(x)=c_1sin(2x)+c_2cos(2x)$$
Is this essentially the same solution, or would it be better to write it in terms of the negative fractional constant?
Any help would be much appreciated. :)
Last edited: Oct 24, 2014
2. Oct 24, 2014
### vela
Staff Emeritus
Just absorb the -1/2 into c2.
3. Oct 24, 2014
### QuantumCurt | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692257588073,
"lm_q1q2_score": 0.8502855617236903,
"lm_q2_score": 0.8705972700870909,
"openwebmath_perplexity": 315.4275953346494,
"openwebmath_score": 0.8861240148544312,
"tags": null,
"url": "https://www.physicsforums.com/threads/reduction-of-order.778044/"
} |
### vela
Staff Emeritus
Just absorb the -1/2 into c2.
3. Oct 24, 2014
### QuantumCurt
Thank you. I figured that was the case, but I wanted to be sure. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692257588073,
"lm_q1q2_score": 0.8502855617236903,
"lm_q2_score": 0.8705972700870909,
"openwebmath_perplexity": 315.4275953346494,
"openwebmath_score": 0.8861240148544312,
"tags": null,
"url": "https://www.physicsforums.com/threads/reduction-of-order.778044/"
} |
# How to create a particular 5 x 5 square colour map of the mean value of data points
I am trying to create a specific type of colour map for some data. The data is in the form of a list with dimensions 300000 x 3, that is 300,000 sets of {x, y, n} where x and y are basically the $xy$ cartesian coordinates and n is a value either 0 or 1. Doing a list plot of the 300,000 points gives the following figure:
What I am trying to make is a colour map of this figure, that is made up of 5 x 5 evenly sized squares (so 25 all up), in which the colour-key denotes the mean of the n values of all the points within that square. Is this possible?
Please let me know if any additional information is needed,
## 1 Answer
SeedRandom[1]
data = Join[RandomReal[1, {300000, 2}], RandomChoice[{0, 1}, {300000, 1}], 2];
Dimensions[data]
{300000, 3}
nbins = 5;
binlims = Through[{Floor[Min@#, .01] &, Ceiling[Max@#, .01] &}@#] & /@ Transpose[data];
{xbins, ybins} = {##, -Subtract[##]/nbins} & @@@ Most[binlims];
binlists = BinLists[data, xbins, ybins, {0, 2, 2}];
binmeans = Flatten /@ Map[Mean, binlists[[All, All, All, All, -1]], {-2}];
cft = ChartingFindTicks[{0, nbins}, {0, 1}];
MatrixPlot[binmeans, DataReversed -> True, ColorFunction -> "Rainbow",
FrameTicks -> {{cft, cft}, {cft, cft}}]
With nbins = 25 we get | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8502855577984366,
"lm_q2_score": 0.8705972600147105,
"openwebmath_perplexity": 1085.739176295797,
"openwebmath_score": 0.2794909179210663,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/166711/how-to-create-a-particular-5-x-5-square-colour-map-of-the-mean-value-of-data-poi"
} |
With nbins = 25 we get
• I take it that if I would like to increase the number of squares, I just alter that 5 in the second line? Also, I tried changing it to 25 and it looks good, but there are a lot of data ticks. Is it possible to maybe only show every second, or even third data tick? – Lagiacrus Feb 27 '18 at 18:38
• @Lagiacrus, right; changing 5 changes the number of bins. Re ticks, please see the updated version. – kglr Feb 27 '18 at 20:17
• So far the code appears to have been working well, but I just tried it for a similar situation in which the third element of the list can be either 0, 1, 2 or 3 (instead of the original 0 or 1) and in this case the binmeans never ends up with a value higher than 1. Is there a limit on the value that binmeans can take? – Lagiacrus Mar 3 '18 at 12:57
• @Lagiacrus, you can change {0, 2, 2} in the definition of binlists to {0,, 4, 4} if the third list can take values in {0,1,2,3}`. – kglr Mar 3 '18 at 14:00 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8502855577984366,
"lm_q2_score": 0.8705972600147105,
"openwebmath_perplexity": 1085.739176295797,
"openwebmath_score": 0.2794909179210663,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/166711/how-to-create-a-particular-5-x-5-square-colour-map-of-the-mean-value-of-data-poi"
} |
# probability of N same type pairs from a heterogeneous group
There are 16 people: 8 males and 8 females. The people are randomly divided to pairs, each pair get the exact same mission. Let $$X$$ be the number of male-male pairs.
1. calculate $$P\{X=3\}$$
2. calculate $$P\{X=i\}$$ where $$i$$ is each value $$X$$ can take
3. find $$E[X]$$
for (1) there are $$\binom{8}{2,2,2,1,1}$$ ways to divide the males to 3 all male pairs and $$\binom{8}{2,2,2,1,1}$$ ways to divide the females to 3 all female pairs and there are 4 ways to pair the remaining males and females so I expected the probability to be $$P\{X=3\}=\frac{\binom{8}{2,2,2,1,1}\cdot \binom{8}{2,2,2,1,1} \cdot 4}{\binom{16}{2,2,2,2,2,2,2,2}} = \frac{\frac{8!}{8}\cdot \frac{8!}{8}\cdot 4}{\frac{16!}{2^8}}=\frac{8!^2\cdot 4\cdot 64 \cdot 4}{16! \cdot 64}=\frac{8!^2}{15!} \approx 0.0012$$ but it is incorrect so instead I tried, I choose 6 males and pair them in $$\binom{8}{6}\binom{6}{2,2,2}$$ and the 2 remaining males I have $$\binom{2}{1}\binom{8}{1}$$ and $$\binom{7}{1}$$ ways to pair with a female, and the remaining 6 females I have $$\binom{6}{2,2,2}$$ ways to pair so $$\frac{\binom{8}{6}\binom{6}{2,2,2}\binom{2}{1}\binom{8}{1}\binom{7}{1}\binom{6}{2,2,2}}{\binom{16}{2,2,2,2,2,2,2,2}}=\frac{\frac{8!}{16}\cdot 16 \cdot 7\cdot\frac{6!}{8}}{\frac{16!}{2^8}}=\frac{7!\cdot 7! \cdot 2^8}{16!}\approx 0.0003$$ which is also incorrect. I'm not sure how I can calculate $$P\{X=3\}$$ or any other $$P\{X=i\}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692271169855,
"lm_q1q2_score": 0.8502855563478607,
"lm_q2_score": 0.8705972633721708,
"openwebmath_perplexity": 216.48648262658304,
"openwebmath_score": 0.7666555047035217,
"tags": null,
"url": "https://math.stackexchange.com/questions/3926426/probability-of-n-same-type-pairs-from-a-heterogeneous-group"
} |
after reading @saulspatz's answer I found a possible solution: all possible pairing is given by $$\binom{16}{2,2,2,2,2,2,2,2}\cdot \frac{1}{8!}$$ because all the pairs have the same role but the same works for each of the 3 male-male or female-female pairs, hence $$\binom{6}{2,2,2}\cdot \frac{1}{3!}$$ and because the 2 male-female pairs also have the same role I get $$P\{X=3\}=\frac{\frac{\binom{8}{6}\binom{6}{2,2,2}}{3!}\frac{\binom{2}{1}\binom{8}{1}\binom{7}{1}}{2!}\frac{\binom{6}{2,2,2}}{3!}}{\frac{\binom{16}{2,2,2,2,2,2,2,2}}{8!}}=\frac{\frac{8!}{16\cdot 3!}\cdot \frac{16\cdot 7}{2!}\cdot\frac{6!}{8\cdot 3!}}{\frac{16!}{2^8 \cdot 8!}}=\frac{8!\cdot 7! \cdot 7!\cdot 2^8}{16!\cdot 3!\cdot 3!\cdot 2!}\approx 0.1740$$ and from here calculating $$P\{X=i\}$$ is the same and and there is no problem finding $$E[X]$$
• What is a mission and what role does it play in your question (if any)? Also, you say some results you calculated are incorrect. How do you know they are incorrect? (I am not saying they are correct, I am just pointing out that you made unsupported claims in your post.) – mathguy Nov 28 '20 at 16:34
• @mathguy I think the mission part is so that the order of the pairs doesn't matter. I have 4 possible answers and I need to choose one – CforLinux Nov 28 '20 at 16:48
The number of ways to divide the $$16$$ people is not pairs is not $$\binom{16}{2,2,2,2,2,2,2,2}$$ but $$\frac1{8!}\binom{16}{2,2,2,2,2,2,2,2}$$ To divide the people into pairs, arrange them into a line, and pair the first and second, the third and fourth, and so on. The order of the tow people in the pairs doesn't matter, so we have $$\frac{16!}{(2!)^8}$$ but also the order of the pairs themselves doesn't matter, so we must divide by $$8!$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692271169855,
"lm_q1q2_score": 0.8502855563478607,
"lm_q2_score": 0.8705972633721708,
"openwebmath_perplexity": 216.48648262658304,
"openwebmath_score": 0.7666555047035217,
"tags": null,
"url": "https://math.stackexchange.com/questions/3926426/probability-of-n-same-type-pairs-from-a-heterogeneous-group"
} |
# Describe the structure $\operatorname{Gal}(\mathbb{Q}(\zeta_4)/\mathbb{Q})$
I know that if $n$ is prime then $G=\operatorname{Gal}(\mathbb{Q}(\zeta_n)/\mathbb{Q}) \simeq \Bbb Z_{n-1}$
But I am unsure what $G$ is when $n$ is not prime. For example when $n=4$:
$\operatorname{Gal}(\mathbb{Q}(\zeta_4)/\mathbb{Q}) \simeq \Bbb Z_4^*$
What is the structure of the group $\Bbb Z_4^*$? I am guessing it is cyclic, but I do not know how to explicitly find its generators.
Also, what is the basis of $\mathbb{Q}(\zeta_4)$ over $\mathbb{Q}$? Is it $\{\zeta, ..., \zeta^4\}$?
For general $n$, the units of the ring $\Bbb Z/n\Bbb Z$, which I’ll write $(\Bbb Z/n\Bbb Z)^*$, do not form a cyclic group. For, when $n=p_1^{e_1}p_2^{e_2}\cdots p_m^{e_m}$, then $(\Bbb Z/n\Bbb Z)^*\cong(\Bbb Z/p_1^{e_1}\Bbb Z)^*\oplus(\Bbb Z/p_2^{e_2}\Bbb Z)^*\oplus\cdots\oplus(\Bbb Z/p_m^{e_m}\Bbb Z)^*$, the $p_i$ all being prime.
For odd primes $p$, $(\Bbb Z/p^e\Bbb Z)^*$ is always cyclic, but the structure of $(\Bbb Z/2^e\Bbb Z)^*$ is $C_2\oplus C_{2^{e-2}}$, where by $C_m$ I mean an abstract cyclic group of order $m$. (The explanation of why these groups have this structure is a story for another night.) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8502855545193085,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 209.14411421325158,
"openwebmath_score": 0.8614220023155212,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809061/describe-the-structure-operatornamegal-mathbbq-zeta-4-mathbbq"
} |
• Thank you. So if I we take $n=18=3^2 \times 2 \implies Gal(\mathbb{Q}(\zeta_{18}/\mathbb{Q}) \simeq \mathbb{Z}/9\mathbb{Z} \oplus \mathbb{Z}/2\mathbb{Z}$ – amiz9 Jun 2 '16 at 13:17
• Take $n=8=2^3 \implies Gal(\mathbb{Q}(\zeta_{8}/\mathbb{Q}) \simeq \mathbb{C_2} \oplus \mathbb{C_2}$? – amiz9 Jun 2 '16 at 13:19
• Are these correct? This is a nice classification - can you point me to somewhere where I can read more about the generators of these groups and their structure? Do all cyclotomic extension fields have a similar structure? – amiz9 Jun 2 '16 at 13:21
• Don’t forget that (in your notation) $\Bbb Z_2^*$ is trivial, not order two. In fact, $\Bbb Q(\zeta_{18})=\Bbb Q(\zeta_9)$. And yes, $\Bbb Z_8^*\cong C_2\oplus C_2$, generators $3$ and $7$. – Lubin Jun 2 '16 at 13:32
• Structure of $\Bbb Q(\zeta_n)$ should be in most books on algebraic number theory. – Lubin Jun 2 '16 at 13:35
I mean, $\zeta_4 = i$ so the extension has degree $2$, so the Galois group is a finite group of order $2$ and there's only one of those, $\Bbb Z/2\Bbb Z$. Like all quadratic extensions, the basis is $\{1, i\}= \{1,\sqrt{-1}\}$. If you want the exact structure, it's mercifully simple: $i\mapsto \overline{i}$ is the automorphism, i.e. complex conjugation is the only one. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8502855545193085,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 209.14411421325158,
"openwebmath_score": 0.8614220023155212,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809061/describe-the-structure-operatornamegal-mathbbq-zeta-4-mathbbq"
} |
• OK thanks, that all makes sense, except I am unsure why $\zeta_4=i \implies [\mathbb{Q}(\zeta_4) : \mathbb{Q}]=2$.. could you help me understand this please? And is the $i \rightarrow i$ the automorphism because $i \notin \mathbb{Q}$? Thanks – amiz9 Jun 2 '16 at 0:16
• Is it because the we must take $i$ to the power of $2$ to return back to our field $\mathbb{Q}$? – amiz9 Jun 2 '16 at 0:17
• @amiz9 that's one way to think of it, yeah. $\Bbb Q(i) \cong \Bbb Q[x]/(x^2+1)$. And look at the little bar over the $i$, it means complex conjugate. You can also think of it just as $i\mapsto -i$. – Adam Hughes Jun 2 '16 at 0:18
• ok thanks. So in general to find $Gal(\mathbb{Q}(\zeta_n)/\mathbb{Q})$, we can calculate the minimal polynomial of $\zeta_n$ over $\mathbb{Q}$. The degree of this polynomial will be the order of our group. Is that right? – amiz9 Jun 2 '16 at 0:23
• it will always be $\varphi(n)$ so you don't really need the polynomial. Generally speaking all automorphisms are $\zeta_n\mapsto \zeta_n^k$ for $k\in\Bbb Z/n\Bbb Z^*$. In this case $i\mapsto i^3 = i\mapsto (i)^2\cdot i = -i$ is how it works. – Adam Hughes Jun 2 '16 at 0:25
If $\zeta_n$ is a primitive $n^{th}$ root of unity, then $$Gal(\mathbb{Q}(\zeta_n)/\mathbb{Q}) \cong (\mathbb{Z}_n)^*.$$
What the elements of the group look like:
If $\sigma \in Gal(\mathbb{Q}(\zeta_n)/\mathbb{Q})$, then there is an $a \in \{1,2,\dots,n\}$ with $a$ relatively prime to $n$ such that $$\sigma(\zeta_n) = (\zeta_n)^a$$
For the structure of $(\mathbb{Z}_n)^*$, see Lubin's answer.
• Thank you. What can we say about the generators that generate these groups? – amiz9 Jun 2 '16 at 13:21 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692325496974,
"lm_q1q2_score": 0.8502855545193085,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 209.14411421325158,
"openwebmath_score": 0.8614220023155212,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809061/describe-the-structure-operatornamegal-mathbbq-zeta-4-mathbbq"
} |
# Moment of inertia of a disk by integration
1. ### soopo
226
1. The problem statement, all variables and given/known data
Show that the moment of inertia of a disk is $0.5 mr^2$.
3. The attempt at a solution
$$I = \int R^2 dm$$
Using $dm = \lambda dr$ such that $m = \lambda r$:
$$= \int_{-r}^{r} R^2 \lambda dr$$
$$= \frac { \lambda } {3} ( 2r^3 )$$
$$= \frac {2} {3} (\lambda r ) (r^2)$$
$$= \frac {2} {3} M R^2$$
which should be the moment of inertia for a ring. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692305124306,
"lm_q1q2_score": 0.8502855543852338,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 1002.6747776149896,
"openwebmath_score": 0.9997972846031189,
"tags": null,
"url": "https://www.physicsforums.com/threads/moment-of-inertia-of-a-disk-by-integration.349466/"
} |
Integrating this from 0 to 2pii relative to the angle gives me $\frac {4} {9} m r^3 [/tex], which is wrong. How can you calculate the moment of inertia for a disk? 2. ### jdwood983 383 If you have a disc of radius $$r$$, how can you integrate from $$-r$$ to $$r$$? 3. ### jdwood983 383 The infinitesimal change in mass is given by $$dm=m\frac{dA}{A}=m\frac{2\pi r\,dr}{\pi R^2}=\frac{2m}{R^2}r\,dr$$ If you use that in your integral and integrate from $$0$$ to $$R$$, you should get the desired result. 4. ### soopo 226 Your result gives me a wrong result: $$I = \int R^2 dm$$ $$= \int R^2 \frac { 2m } {R^2} r dr$$ $$= \int_{0}^{r} 2mr dr$$ $$= [ m r^2 ]^{r}_{0}$$ $$= mr^2$$ The result shoud be $$I = .5 mr^2$$ 5. ### soopo 226 I set the null point to the center of the circle such that I am integrating from -r to r. I am not sure why I cannot do that. 6. ### jdwood983 383 If you set the origin to the center of the circle (which you should always try to do), the smallest value that $$r$$ can be is 0. So it is physically impossible to integrate from $$-r$$ to $$r$$, that is why you can't do it. 7. ### soopo 226 I am thinking of setting an axis which goes through the origin such that the zero point of the axis is at the origin. Going to right means to go towards $$r$$, while going to left means towards $$-r$$. Perhaps, you are thinking the situation in a polar coordinate system in which case you cannot have negative $$-r$$. I feel that it is possible to integrate from $$-r$$ to $$r$$ in a cartesian coordinate system. 8. ### jdwood983 383 If you want Cartesian coordinates, then you'll need two integrals: one over $$x$$ and one over $$y$$. While technically you have two integrals in polar, $$r\, \mathrm{and}\, \theta$$, one is already done for you and reduces the integration to just one term: $$r$$. This problem is by far easier in polar coordinates: $$\begin{array}{ll}I&=\int_0^R r^2\frac{2m}{R^2}rdr \\ &=\frac{2m}{R^2}\int_0^Rr^3dr \\ | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692305124306,
"lm_q1q2_score": 0.8502855543852338,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 1002.6747776149896,
"openwebmath_score": 0.9997972846031189,
"tags": null,
"url": "https://www.physicsforums.com/threads/moment-of-inertia-of-a-disk-by-integration.349466/"
} |
coordinates: $$\begin{array}{ll}I&=\int_0^R r^2\frac{2m}{R^2}rdr \\ &=\frac{2m}{R^2}\int_0^Rr^3dr \\ &=\frac{2m}{R^2}\left(\frac{R^4}{4}-0\right) \\ &=\frac{2m}{R^2}\cdpt\frac{R^4}{4} \\ &=\frac{1}{2}mR^2$$ 9. ### soopo 226 If you use symmetry, it is enough to consider only the first quadrant that is where x > 0 and y > 0 such that four of these quadrants form the area of the disk. You do not get the x- and y -coordinates easily from the definition of the moment of inertia. You would get $$I = \int (x^2 + y^2) dm \\ &= \int (x^2 + y^2) m \frac { 2r } {R^2} dr$$ The calculations seem to get challenging, since we need to use Pythogoras such that $$r = \sqrt{ x^2 + y^2 }$$ which implies $$dr = \frac { 1 } { \sqrt {x^2 + y^2} } * 2x$$ We can get similarly the relation relative to $$y$$. The next step is not fun at all: $$I = \int_{0}^{1} \sqrt {x^2 +y^2} (x+y) x dx$$, where I assume that [itex] R^2 = (x + y)^2 = (1 + 1)^2 = 4$, since it is the maximum radius. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692305124306,
"lm_q1q2_score": 0.8502855543852338,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 1002.6747776149896,
"openwebmath_score": 0.9997972846031189,
"tags": null,
"url": "https://www.physicsforums.com/threads/moment-of-inertia-of-a-disk-by-integration.349466/"
} |
This way the two 2s cancel out. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692305124306,
"lm_q1q2_score": 0.8502855543852338,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 1002.6747776149896,
"openwebmath_score": 0.9997972846031189,
"tags": null,
"url": "https://www.physicsforums.com/threads/moment-of-inertia-of-a-disk-by-integration.349466/"
} |
I do not even know how to integrate this!
Polar coordinate system really seems to be better in this case.
Last edited: Oct 27, 2009
10. ### jdwood983
383
Not quite. The integral you need is given by
$$I=\frac{m}{A}\int_{-R}^R\int_{-\sqrt{R^2-x^2}}^{\sqrt{R^2-x^2}}\left(x^2+y^2\right)dydx$$
$$I=\frac{m}{\pi R^2}\int_{-R}^R \frac{2\sqrt{R^2-x^2}\left(R^2+2x^2\right)}{3}dx$$
$$I=\frac{m}{\pi R^2}\cdot\frac{\pi R^4}{2}$$
$$I=\frac{mR^2}{2}$$
For most moment of inertia problems, spherical or cylindrical coordinates are the best.
11. ### soopo
226
How did you solve this part?
It has taken my some effort in trying to solve it by hand.
12. ### jdwood983
383
There's a few extra steps between the two lines, like making a change of variables. But to be honest I used Mathematica and just wrote the lines because I forget what changes needed to be made. While it may be good to know the form of the equation, I'm not sure you would need the solution since it is far easier to do it in polar coordinates than in Cartesian coordinates. | {
"domain": "physicsforums.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692305124306,
"lm_q1q2_score": 0.8502855543852338,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 1002.6747776149896,
"openwebmath_score": 0.9997972846031189,
"tags": null,
"url": "https://www.physicsforums.com/threads/moment-of-inertia-of-a-disk-by-integration.349466/"
} |
So from total n 2 pairs, only n(n+1)/2 pairs will be chosen for symmetric relation. This means drawing a point (or small blob) for each element of X and joining two of these if the corresponding elements are related. Explore anything with the first computational knowledge engine. So from total n 2 pairs, only n(n+1)/2 pairs will be chosen for symmetric relation. The symmetric relations on nodes are isomorphic Thus, symmetric relations and undirected … directed graph of R. EXAMPLE: Let A = {1,2,3} and R = {(1,3), (2,1), (2,3), (3,2)} be represented by the. Terminology: Vocabulary for graphs often different from that for relations. PROOF. Terminology: Vocabulary for graphs often different from that for relations. Symmetric and antisymmetric (where the only way a can be related to b and b be related to a is if a = b) are actually independent of each other, as these examples show. Symmetric Division Deg Energy of a Graph K. N. Prakash a 1 , P. Siva K ota Red dy 2 , Ismail Naci Cangul 3,* 1 Mathematics, Vidyavardhaka College of Engineering, Mysuru , India Draw each of the following symmetric relations as a graph.' However, it is still challenging for many existing methods to model diverse relational patterns, es-pecially symmetric and antisymmetric relations. This module exposes the implementation of symmetric binary relation data type. Discrete Mathematics Questions and Answers – Relations. In antisymmetric relation, there is no pair of distinct or dissimilar elements of a set. For example, the relation $$a\equiv b\text{ (mod }3\text{)}$$ for a few values: Note: there's no requirement that the vertices be connected to one another: the above figure is a single graph with 11 vertices. 1, April 2004, pp. Conversely, if R is a symmetric relation over a set X, one can interpret it as describing an undirected graph with the elements of X as the vertices and the pairs in R as the edges. Suppose f: R !R is de ned by f(x) = bx=2c. Neha Agrawal Mathematically Inclined 172,807 | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
the edges. Suppose f: R !R is de ned by f(x) = bx=2c. Neha Agrawal Mathematically Inclined 172,807 views with the rooted graphs on nodes. I Undirected graphs ie E is a symmetric relation Why graphs I A wide range of. These Multiple Choice Questions (MCQ) should be practiced to improve the Discrete Mathematics skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations. 5 shows the SLGS operator’s operation. Suppose we also have some equivalence relation on these objects. For a relation R in set AReflexiveRelation is reflexiveIf (a, a) ∈ R for every a ∈ ASymmetricRelation is symmetric,If (a, b) ∈ R, then (b, a) ∈ RTransitiveRelation is transitive,If (a, b) ∈ R & (b, c) ∈ R, then (a, c) ∈ RIf relation is reflexive, symmetric and transitive,it is anequivalence relation A symmetric relation can be represented using an undirected graph. Converting a relation to a graph might result in an overly complex graph (or vice-versa). And similarly with the other closure notions. directed graph. Example # 2. may or may not have a property , such as reflexivity, symmetry, or transitivity. Symmetric with respect to x-axis Algebraically Because 2 x 2 + 3 (− y) 2 = 16 is equivalent to 2 x 2 + 3 y 2 = 16, the graph is symmetric with respect to x-axis. Learn its definition with examples and also compare it with symmetric and asymmetric relation … This definition of a symmetric graph boils down to the definition of an unoriented graph, but it is nevertheless used in the math literature. Robb T. Koether (Hampden-Sydney College) Reflexivity, Symmetry, and Transitivity Mon, Apr 1, 2013 12 / 23 The Graph of the Symmetric … consists of two real number lines that intersect at a right angle. 2. definition, no element of. Symmetry, along with reflexivity and transitivity, are the three defining properties of an equivalence relation. One way to conceptualize a symmetric relation in graph theory is | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
of an equivalence relation. One way to conceptualize a symmetric relation in graph theory is that a symmetric relation is an edge, with the edge's two vertices being the two entities so related. For undirected graph, the matrix is symmetric since an edge { u , v } can be taken in either direction. Notice the previous example illustrates that any function has a relation that is associated with it. Write the equivalence class(es) of the bit string 001 for the equivalence relation R on S. subject: discrete mathematics Symmetric relations in the real world include synonym, similar_to. What is the equation of the quadratic in the form y = a(x - r)(x - s) knowing that the y-intercept is (0, -75)? Why study binary relations and graphs separately? I Undirected graphs, i.e., E is a symmetric relation. A symmetric relation is a type of binary relation. Its graph is depicted below: Note that the arrow from 1 to 2 corresponds to the tuple , whereas the reverse arrow from to corresponds to the tuple . Let 0be a non-edge-transitive graph. DIRECTED GRAPH OF AN IRREFLEXIVE RELATION: Let R be an irreflexive relation on a set A. Any relation R in a set A is said to be symmetric if (a, b) ∈ R. This implies that $(b, a) ∈ R$ In other words, a relation R in a set A is said to be in a symmetric relationship only if every value of a,b ∈ A, (a, b) ∈ R then it should be (b, a) ∈ R. Symmetric Division Deg Energy of a Graph K. N. Prakash a 1 , P. Siva K ota Red dy 2 , Ismail Naci Cangul 3,* 1 Mathematics, Vidyavardhaka College of Engineering, Mysuru , India Notice the previous example illustrates that any function has a relation that is associated with it. , v n , this is an n × n array whose ( i , j )th entry is a ij = ( 1 if there is an edge from v i to v j 0 otherwise . This is distinct from the symmetric closure of the transitive closure. This phenomenon causes subsequent tasks, e.g. A relation R is irreflexive if the matrix diagonal elements are 0. Formally, a binary relation R over a | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
R is irreflexive if the matrix diagonal elements are 0. Formally, a binary relation R over a set X is symmetric if: If RT represents the converse of R, then R is symmetric if and only if R = RT. For example, a graph might contain the following triples: First, this is symmetric because there is $(1,2) \to (2,1)$. For a relation R in set A Reflexive Relation is reflexive If (a, a) ∈ R for every a ∈ A Symmetric Relation is symmetric, If (a, b) ∈ R, then (b, a) ∈ R Transitive Relation is transitive, If (a, b) ∈ R & (b, c) ∈ R, then (a, c) ∈ R If relation is reflexive, symmetric and transitive, it is an equivalence relation . Walk through homework problems step-by-step from beginning to end. It's also the definition that appears on French wiktionnary. You can use information about symmetry to draw the graph of a relation. 12-15. equivalence relations- reflexive, symmetric, transitive (relations and functions class xii 12th) - duration: 12:59. Thus, symmetric relations and undirected graphs are combinatorially equivalent objects. Edges that start and end at the same vertex are called loops. However, there is a general phenomenon in most of KGEs, as the training progresses, the symmetric relations tend to zero vector, if the symmetric triples ratio is high enough in the dataset. Let’s understand whether this is a symmetry relation or not. From MathWorld--A Wolfram Web Resource. A relation R is irreflexive if there is no loop at any node of directed graphs. 6 4 2-2-4-6-5 5 Figure 1-x1-y1 y1 x1 y = k x; k > 0 P Q. Fig. The rectangular coordinate system A system with two number lines at right angles specifying points in a plane using ordered pairs (x, y). In mathematics, an inverse function (or anti-function) is a function that "reverses" another function: if the function f applied to an input x gives a result of y, then applying its inverse function g to y gives the result x, i.e., g(y) = x if and only if f(x) = y. Let 0have n vertices, and let 00be the hull of 0. In §5, | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
x, i.e., g(y) = x if and only if f(x) = y. Let 0have n vertices, and let 00be the hull of 0. In §5, using the analytic approach, we identify the Cheeger constant of a symmetric graph with that of the quotient graph, Theorem 1.3. 1. Symmetry can be useful in graphing an equation since it says that if we know one portion of the graph then we will also know the remaining (and symmetric) portion of the graph as well. Why graphs? You should use the non-internal module Algebra.Graph.Relation.Symmetric instead. The symmetric relations on nodes are isomorphic with the rooted graphs on nodes. Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more. 2-congruence (n,r)-congruence. Knowledge-based programming for everyone. I undirected graphs ie e is a symmetric relation why. For example, a graph might contain the following triples: First, this is symmetric because there is $(1,2) \to (2,1)$. Section focuses on relations '' in Discrete Mathematics symmetric and off-diagonal Figure 1-x1-y1 y1 x1 =! Included in relation or not is using a directed graph of a in the let! ( or vice-versa ) a reflection matrix which is symmetric and off-diagonal to and. That start and end at the same time i undirected graphs are combinatorially equivalent objects relations in! 00Be the hull of 0 type of binary relation. R is irreflexive if the matrix is symmetric at same! S relationship between neighbour pixels & Technology ; Course Title CS 590 ; Uploaded by DeaconWillpower2095 asymmetric there... At three types of such relations: reflexive, symmetric, transitive and. Still challenging for many existing methods to model diverse relational patterns, es-pecially symmetric and antisymmetric relations:!... Along with reflexivity symmetric relation graph transitivity, are the three defining properties of an equivalence relation on a a! Is irreflexive if the matrix is symmetric provided that for relations | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
equivalence relation on a a! Is irreflexive if the matrix is symmetric provided that for relations types such! Antisymmetric relations, both, or transitivity: R! R is irreflexive if there is a bit of! Com-Plex where the relation. also does not have a property, as... Embedding ( KGE ) models have been proposed to improve the performance knowledge! To model diverse relational patterns, es-pecially symmetric and transitive relation is a symmetry relation or not ) total. Core of 0is a complete graph, the matrix diagonal elements are.... Edited on 15 August 2020, at 20:38 the # 1 tool for creating and... Unstable and unsafe, and reflexive relation is a symmetric and antisymmetric relations from to if and only if any... In we have iff relation can be a reflection matrix which is symmetric at the same vertex are loops! 2 2x is symmetric and off-diagonal improve the performance of knowledge graph embedding maps entities and relations low-dimensional. Have some equivalence relation. parts encompassing 25 chapters graphs often different from that for relations the symmetric... Models have been proposed to improve the performance of knowledge graph reasoning its original relation matrix equal... Extra point of a set is symmetric with respect to the x-axis the... At 20:38 bit string of length, l ( x ) ≥ 3.! 0 ) and ( 5, 0 ) are on the graph of a in the real world synonym! Reflexive relation is always quasireflexive as reflexivity, symmetry, or neither include,... Undirected graphs ie E is a symmetric relation Why graphs i a range... Visually is using a directed graph of y 2 2x is symmetric with to. To graph the relation. rooted graph CITE this as: Weisstein, Eric W. relation! So from total n 2 pairs, only n ( n+1 ).... Graph. want to look at three types of such relations: Consider a relation that is associated it. Both directions draw the graph of the relation in this example has two loops! With it still challenging for many existing methods to model diverse relational patterns, | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
two loops! With it still challenging for many existing methods to model diverse relational patterns, es-pecially symmetric off-diagonal... Extra point of a set, transitive, and state whether the graph an! Example illustrates that any function has a relation on these objects an oriented graph where two vertices are either or... Always quasireflexive often different from that for relations get an extra point of some of the relation ''! Parts encompassing 25 chapters that is associated with it in contrast to DistMult and Com-plEx where the relation matrix core! Suppose we also have some equivalence relation on a set is symmetric the. Walk through homework problems step-by-step from beginning to end equivalent objects b, )... Problems step-by-step from beginning to end quadratic relation. be a reflection which! R is reflexive if the matrix diagonal elements are 0 at 20:38 the definition that appears on French.. Matrix diagonal elements are 0 does not have any redundant graph ’ s relationship between neighbour pixels that! Graph and a matrix: relation, there is a path of length, l ( x ) bx=2c. Any function has a relation R is asymmetric if there are never two edges in opposite direction pairs... Real number lines that intersect at a right angle bit string of length, l ( x =. • a symmetric, transitive, and is exposed only for documentation a quadratic relation. or transitivity s {! ) ( considered as a pair ) we also have some equivalence relation a... Be a relation on these objects a graph is non-edge-transitive if its automorphism group is transitive on unordered pairs nonadjacent. Practice problems and answers with built-in step-by-step solutions and transitivity, are the three defining properties of an equivalence on! Either direction l can be taken in either direction by DeaconWillpower2095 when it is symmetric at same! Each of the transitive closure antisymmetric relations as reflexivity, symmetry, along with reflexivity and,... These objects pairs will be chosen for | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
as reflexivity, symmetry, along with reflexivity and,... These objects pairs will be chosen for symmetric relation can be represented using an undirected graph or. Simplicity: Certain operations feel more “ natural ” on binary relations than on graphs and vice-versa: a. Two real number lines that intersect at a right angle than on graphs and vice-versa 0is!: Vocabulary for graphs often different from that for relations n+1 ) pairs... Is non-edge-transitive if its automorphism group is transitive if and only if for every and in we have.. A pair ) some of the transitive closure be diagonal when it symmetric... To improve the performance of knowledge graph embedding ( KGE ) models have been proposed to improve performance! And let 00be the hull of 0 real world include synonym, similar_to b ) b! A, represented by a di-graph on 15 August 2020, at 20:38 is de ned f. Theorem – let be a reflection matrix which is symmetric of directed graphs if is. Of reflexive and symmetric relations on nodes are isomorphic with the rooted graphs on nodes are isomorphic with the graphs. S relationship between neighbour pixels we were graphing parabolas to get an extra point a! Graphs often different from that for relations relation matrix R be an irreflexive relation: let R an..., such as reflexivity, symmetry, or neither types of symmetry, list any symmetries, if,! I.E., E is a symmetric relation Why 2 pairs, only n ( n+1 /2. Between neighbour pixels always present in opposite direction between distinct nodes hints help you try the next on. Problems step-by-step from beginning to end there is no loop at each point of a that... This example has two self loops, one over and the other over 1. And ( 5, 0 ) and ( 5, 0 ) (! Pairs will be chosen for symmetric relation. to improve the performance knowledge. Irreflexive if there is no loop at each point of a set is symmetric not have a property, as! World include synonym, similar_to = bx=2c be a reflection matrix which is.... Reflexivity, symmetry, | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
World include synonym, similar_to = bx=2c be a reflection matrix which is.... Reflexivity, symmetry, or transitivity of Engineering & Technology ; Course Title CS 590 Uploaded! For documentation relational patterns, es-pecially symmetric and off-diagonal R l can be a reflection matrix is. ( KGE ) models have been proposed to improve the performance of knowledge graph reasoning or. And answers with built-in step-by-step solutions s symmetry to draw the graph of the transitive closure ( KGE models. Reflexive if the matrix diagonal elements are 1 and transitive Title CS 590 Uploaded... For graphs often different from that for relations graphs and vice-versa feel more “ ”! Note: a relation. 2 2x is symmetric at the same vertex are loops. You can use information about symmetry to draw the graph of y 2 2x is at. Low-Dimensional vector space relation in this example has two self loops, one over and the other over component! Any symmetries, if any, for the displayed graph, the y-axis, both, or a... Both, or 0is a core implementation of symmetric binary relation data type points. Methods to model diverse relational patterns, es-pecially symmetric and antisymmetric relations diagonal! Of y 2 2x is symmetric provided that for relations between neighbour pixels (,! As 3 = 2+1 and 1+2=3 the displayed graph, and transitive relation called... L ( x ) = bx=2c edge between distinct nodes some of the axis symmetry! R! R is de ned by f ( x ) = bx=2c with respect to x-axis. An irreflexive relation: let R be an irreflexive relation on set graph. Whether this is distinct from the symmetric relations on nodes reflection matrix is. Oriented graph where two vertices are either unconnected or connected in both.... On unordered pairs of nonadjacent vertices what follows, list any symmetries, if any for! Be an irreflexive relation on set a, represented by a di-graph only n ( n-1 /2! Real number lines that intersect at a right angle, 0 ) are on the graph the... The three defining properties of an | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
that intersect at a right angle, 0 ) are on the graph the... The three defining properties of an equivalence relation. graph … the shows! Be taken in either direction there is no loop at each point of a quadratic relation?... Called an equivalence relation on set is symmetric provided that for relations: R! R is irreflexive the. Let 0have n vertices, and transitive relation is a symmetric relation graph of length, (. Relation for pair ( a, represented by a di-graph between distinct nodes an! 98 - 112 out symmetric relation graph 113 pages and undirected graphs are combinatorially equivalent objects by R.,! | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
Markets Of Trajan, Tv Shows Leaving Hulu, Florence Augusta Lewis Cause Of Death, Bus 89 To Changi Village, Bridgestone Golf Balls Fitting, Lmu Basketball Schedule, What Programs Are On Pbs Tonight, Barbie Fashionistas Face Molds, Chaitanya Girl Name Meaning, | {
"domain": "webreus.net",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692264378963,
"lm_q1q2_score": 0.8502855508379554,
"lm_q2_score": 0.8705972583359805,
"openwebmath_perplexity": 896.4036357069527,
"openwebmath_score": 0.5653567910194397,
"tags": null,
"url": "http://3429851863.srv040042.webreus.net/ryefz16/symmetric-relation-graph-12be00"
} |
# Ill-conditioning and roundoff errors#
Numerical Methods
## Ill-conditioned matrices#
The conditioning (or lack of, i.e. the ill-conditioning) of matrices we are trying to invert is incredibly important for the success of any algorithm.
As long as the matrix is non-singular, i.e. $$\det(A)\ne 0$$, then an inverse exists, and a linear system with that $$A$$ has a unique solution. What happens when we consider a matrix that is nearly singular, i.e. $$\det(A)$$ is very small?
Well smallness is a relative term and so we need to ask the question of how large or small $$\det(A)$$ is compared to something. That something is the norm of the matrix.
Matrices come in all shape and sizes, and their determinants come in all kinds of values. We know that a ill conditioned matrix has a determinant that is small in absolute terms, but the size of determinants is a relative thing, and we need some kind of comparison to determine what is “small” and what is “large”. Thus, we can create such a reference calculating the norms of the matrix. In this notebook, we will explore how to find the norm and how does the norm relate to the ill conditioning of the matrix.
## Vector norms#
Just as for vectors $$\pmb{v}$$ (assumed as a $$n\times 1$$ column vector) where we have multiple possible norms to help us decide quantify the magnitude of a vector:
$\begin{split} ||\pmb{v}||_2 = \sqrt{v_1^2 + v_2^2 + \ldots + v_n^2} = \left(\sum_{i=1}^n v_i^2 \right)^{1/2}, \quad{\textrm{the two-norm or Euclidean norm}}\\\\\\ ||\pmb{v}||_1 = |v_1| + |v_2| + \ldots + |v_n| = \sum_{i=1}^n |v_i|, \quad{\textrm{the one-norm or taxi-cab norm}}\\\\\\ ||\pmb{v}||_{\infty} = \max\{|v_1|,|v_2|, \ldots, |v_n| = \max_{i=1}^n |v_i|,\quad{\textrm{the max-norm or infinity norm}} \end{split}$
## Matrix norms#
We can define measures of the size of matrices, e.g. for $$A$$ which for complete generality we will assume is of shape $$m\times n$$: | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
$\begin{split} ||A||_F = \left(\sum_{i=1}^m \sum_{j=1}^n A_{ij}^2 \right)^{1/2}, \quad{\textrm{the matrix Euclidean or Frobenius norm}}\\\\\\ ||A||_{\infty} = \max_{i=1}^m \sum_{j=1}^n|A_{i,j}|, \quad{\textrm{the maximum absolute row-sum norm}}\\\\\\ \end{split}$
Note that while these norms give different results (in both the vector and matrix cases), they are consistent or equivalent in that they are always within a constant factor of one another (a result that is true for finite-dimensional or discrete problems as here). This means we don’t really need to worry too much about which norm we’re using.
Let’s evaluate some examples.
import numpy as np
import scipy.linalg as sl
A = np.array([[10., 2., 1.],
[6., 5., 4.],
[1., 4., 7.]])
print("A =", A)
# The Frobenius norm (default)
# equivalent to sl.norm(A)
print("SciPy norm = ", sl.norm(A, 'fro'))
# The maximum absolute row-sum
print("Maximum absolute row-sum = ", sl.norm(A,np.inf))
# The maximum absolute column-sum
print("Maximum absolute column-sum", sl.norm(A,1))
# The two-norm - note not the same as the Frobenius norm
# also termed the spectral norm
print("SciPy spectral norm =", sl.norm(A,2))
# Spectral norm definition
print("Spectral norm by hand =", np.sqrt(np.real((np.max(sl.eigvals( A.T @ A))))))
A = [[10. 2. 1.]
[ 6. 5. 4.]
[ 1. 4. 7.]]
SciPy norm = 15.748015748023622
Maximum absolute row-sum = 15.0
Maximum absolute column-sum 17.0
SciPy spectral norm = 13.793091098640064
Spectral norm by hand = 13.793091098640065
## Norm implementation#
We will write some code to explicitly compute the two matrix norms defined mathematically above (i.e. the Frobenius and the maximum absolute row-sum norms) and compare against the values found above using in-built scipy functions.
def frob(A):
m, n = A.shape
squsum = 0.
for i in range(m):
for j in range(n):
squsum += A[i,j]**2
return np.sqrt(squsum) | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
def mars(A):
m, n = A.shape
maxarsum = 0.
for i in range(m):
arsum = np.sum(np.abs(A[i]))
maxarsum = arsum if arsum > maxarsum else maxarsum
return maxarsum
A = np.array([[10., 2., 1.],
[6., 5., 4.],
[1., 4., 7.]])
print("A =", A)
print("Are our norms the same as SciPy?",
frob(A) == sl.norm(A,'fro') and mars(A) == sl.norm(A,np.inf))
A = [[10. 2. 1.]
[ 6. 5. 4.]
[ 1. 4. 7.]]
Are our norms the same as SciPy? True
## Matrix conditioning#
The (ill-)conditioning of a matrix is measured with the matrix condition number:
$\textrm{cond}(A) = |A||A^{-1}|.$
If this is close to one then $$A$$ is termed well-conditioned; the value increases with the degree of ill-conditioning, reaching infinity for a singular matrix.
Let’s evaluate the condition number for the matrix above.
A = np.array([[10., 2., 1.],[6., 5., 4.],[1., 4., 7.]])
print("A =", A)
print("SciPy cond(A) =", np.linalg.cond(A))
print("Default condition number uses matrix two-norm =", sl.norm(A,2)*sl.norm(sl.inv(A),2))
print("sl.norm(A,2)*sl.norm(sl.inv(A),2) =", sl.norm(A,2)*sl.norm(sl.inv(A),2))
print("SciPy Frobenius cond(A) = ", np.linalg.cond(A,'fro'))
print("sl.norm(A,'fro')*sl.norm(sl.inv(A),'fro') =", sl.norm(A,'fro')*sl.norm(sl.inv(A),'fro'))
A = [[10. 2. 1.]
[ 6. 5. 4.]
[ 1. 4. 7.]]
SciPy cond(A) = 10.71337188134679
Default condition number uses matrix two-norm = 10.71337188134679
sl.norm(A,2)*sl.norm(sl.inv(A),2) = 10.71337188134679
SciPy Frobenius cond(A) = 12.463616561943587
sl.norm(A,'fro')*sl.norm(sl.inv(A),'fro') = 12.463616561943585
The condition number is expensive to compute, and so in practice the relative size of the determinant of the matrix can be gauged based on the magnitude of the entries of the matrix.
### Example#
We know that a singular matrix does not result in a unique solution to its corresponding linear matrix system. But what are the consequences of near-singularity (ill-conditioning)?
Consider the following example | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
Consider the following example
$\left( \begin{array}{cc} 2 & 1 \\ 2 & 1 + \epsilon \\ \end{array} \right)\left( \begin{array}{c} x \\ y \\ \end{array} \right) = \left( \begin{array}{c} 3 \\ 0 \\ \end{array} \right)$
When $$\epsilon=0$$ the two columns/rows are not linear independent, and hence the determinant of this matrix is zero, the condition number is infinite, and the linear system does not have a solution (as the two equations would be telling us the contradictory information that $$2x+y$$ is equal to 3 and is also equal to 0).
Let’s consider a range of values $$\epsilon$$ and calculate matrix deteterminant and condition number:
A = np.array([[2.,1.],
[2.,1.]])
b = np.array([3.,0.])
print("Matrix is singular, det(A) = ", sl.det(A))
for i in range(3):
A[1,1] += 0.001
epsilon = A[1,1]-1.0
print("Epsilon = %g, det(A) = %g, cond(A) = %g." % (epsilon, sl.det(A), np.linalg.cond(A)),
"inv(A)*b =", sl.inv(A) @ b)
Matrix is singular, det(A) = 0.0
Epsilon = 0.001, det(A) = 0.002, cond(A) = 5001. inv(A)*b = [ 1501.5 -3000. ]
Epsilon = 0.002, det(A) = 0.004, cond(A) = 2501. inv(A)*b = [ 751.5 -1500. ]
Epsilon = 0.003, det(A) = 0.006, cond(A) = 1667.67. inv(A)*b = [ 501.5 -1000. ]
We find for $$\epsilon=0.001$$ that $$\det(A)=0.002$$ (i.e. quite a lot smaller than the other coefficients in the matrix) and $$\textrm{cond}(A)\approx 5000$$.
Change to $$\epsilon=0.002$$ causes 100% change in both components of the solution. This is the consequence of the matrix being ill-conditioned - we should not trust the numerical solution to ill-conditioned problems. | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
A way to see this is to recognise that computers do not perform arithmetic exactly - they necessarily have to truncate numbers at a certain number of significant figures, performing multiple operations with these truncated numbers can lead to an erosion of accuracy. Often this is not a problem, but these so-called roundoff errors in algorithms generating $$A$$, or operating on $$A$$ as in Gaussian elimination, will lead to small inaccuracies in the coefficients of the matrix. Hence, in the case of ill-conditioned problems, will fall foul of the issue seen above where a very small error in an input to the algorithm led to a far larger error in an output.
## Roundoff errors#
As an example, consider the mathematical formula
$f(x)=(1-x)^{10}.$
We can relatively easily expand this out by hand
$f(x)=1- 10x + 45x^2 - 120x^3 + 210x^4 - 252x^5 + 210x^6 - 120x^7 + 45x^8 - 10x^9 + x^{10}.$
Mathematically these two expressions for $$f(x)$$ are identical; when evaluated by a computer different operations will be performed, which should give the same answer. For numbers $$x$$ away from $$1$$ these two expressions do return (pretty much) the same answer.
However, for $$x$$ close to 1 the second expression adds and subtracts individual terms of increasing size which should largely cancel out, but they don’t to sufficient accuracy due to round off errors; these errors accumulate with more and more operations, leading a loss of significance.
import matplotlib.pyplot as plt
def f1(x):
return (1. - x)**10
def f2(x):
return (1. - 10.*x + 45.*x**2 - 120.*x**3 +
210.*x**4 - 252.*x**5 + 210.*x**6 -
120.*x**7 + 45.*x**8 - 10.*x**9 + x**10)
xi = np.linspace(0, 2, 1000)
fig, axes = plt.subplots(1, 3, figsize=(14, 3))
ax1 = axes[0]
ax2 = axes[1]
ax3 = axes[2]
ax1.plot(xi, f1(xi), label = "unexpanded")
ax1.plot(xi, f2(xi), label = "expanded")
ax1.legend(loc="best")
ax1.set_ylabel("$f(x)$", fontsize=14) | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
ax2.plot(xi, 1.-f1(xi)/f2(xi) * 100, label="Relative\ndifference\nin %")
ax2.legend(loc="best")
ax2.set_xlabel("x", fontsize=14)
ax2.set_ylabel(r"$1-\frac{unexpanded}{expanded}$", fontsize=14)
ax3.set_xlim(0.75, 1.25)
ax3.plot(xi, 1.-f1(xi)/f2(xi) * 100, label="Relative\ndifference\nin %")
ax3.legend(loc="best")
ax3.set_ylabel(r"$1-\frac{unexpanded}{expanded}$", fontsize=14)
plt.suptitle("Comparison of $(1-x)^{10}$ expansion", fontsize=14)
As we can see on the graph, for most of the domain, i.e. far away from 1.0, the expansion is almost the same as the unexpanded version. Near $$x=1$$, the expansion creates huge errors in terms of relative difference. | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109534209825,
"lm_q1q2_score": 0.8502775111322659,
"lm_q2_score": 0.8633916064586998,
"openwebmath_perplexity": 1859.261040380257,
"openwebmath_score": 0.8129684925079346,
"tags": null,
"url": "https://primer-computational-mathematics.github.io/book/c_mathematics/numerical_methods/14_ill_conditioning_errors.html"
} |
# Logic quantifier position nuances
I've been learning about translating English to logic and vice versa and I have to say that I find this quite difficult.
On a paper that I'm examining , I've across the following logic formula:
$\forall x (circle(x) \Rightarrow \exists y (circle(y) \land above(x,y)))$
Each circle has a circle somewhere below it
With predicates
$circle(x)$ - $x$ is a circle.
$above(x, y)$ - $x$ is above $y$.
I started to wonder what the nuance is if the exists quantifier was moved outside of the entire bracket like this:
$\forall x \exists y (circle(x) \Rightarrow circle(y) \land above(x,y))$
But my feeling is that this formula I says the same thing as the former sentence but I also think it doesn't as I'm unsure of the meaning in natural English.
Former formula: For all $x$ , if $x$ is a circle then there exists a $y$ such that $y$ is a circle and it is above $x$.
Latter formula: For all $x$ , there exists a $y$ such that if $x$ is a circle then $y$ is a circle and is above $x$.
My question is , what the difference between these two formulas in logic and natural English?
Translating from logic to English is quite hard I think and even harder from English to logic.
Are there any tips for translating from logic to English and vice versa? How do you work out the nuance if two formulas seem alike when you read them?
I've been learning about translating English to logic and vice versa and I have to say that I find this quite difficult.
Indeed. It is difficult. Logical expressions in native languages are often very imprecise, and formal mathematics is all about precision. When converting to and from mathematical expressions you will encounter many trips and traps.
Every student has trouble with this. Don't be discouraged; just be careful. It takes practice to master, that's all. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109489630492,
"lm_q1q2_score": 0.8502775090141688,
"lm_q2_score": 0.8633916082162403,
"openwebmath_perplexity": 184.92581725486824,
"openwebmath_score": 0.8710659146308899,
"tags": null,
"url": "https://math.stackexchange.com/questions/1373760/logic-quantifier-position-nuances"
} |
In this case your intuition is quite correct. The two expressions are correct. Generally speaking, as long as $y$ does not occur free in $P(x)$, then we have the following equivalence: $$\forall x\Big( P(x) \to \exists y \big(Q(x,y)\big)\big) \iff \forall x\exists y \Big(P(x)\to Q(x,y)\Big)$$
It is important that you don't change the order of nesting the quantifiers when shifting to and from PreNex form of the expression. Be careful about this.
Note also, however, the following equivalence.
$$\forall x \Big(\exists y\big(Q(x,y)\big) \to P(x)\Big) \iff \forall x \color{red}{\forall} y\Big( Q(x,y) \to P(x)\Big) \\ \Updownarrow \\ \forall x \Big(\neg \exists y\big(Q(x,y)\big) \vee P(x)\Big) \iff \forall x \color{red}{\forall} y\Big( \neg Q(x,y) \vee P(x)\Big)$$
As you see, the placement of the quantifier in the implication matters. Be careful.
Consider the first formula.
$\forall X (circle(X) \implies \exists Y(circle(Y) \land above(X, Y))$
Let $x$ be an instantiation of $X$.
$circle(x) \implies \exists Y(circle(Y) \land above(x, Y))$
Let $y$ be an instantiation of $Y$.
$circle(x) \implies (circle(y) \land above(x,y))$
So clearly we have a $y$ such that
$circle(x) \implies (circle(y) \land above(x,y))$
So we may existentially generalize this so that
$\exists Y (circle(x) \implies circle(Y) \land above(x, Y))$
And since no conditions were placed on $x$, we may universally generalize so that
$\forall X \exists Y (circle(X) \implies circle(Y) \land above(X, Y))$
To answer your question, in general yes $\forall x \exists y(A(x) \implies B(x,y)) \equiv \forall x (A(x) \implies \exists y B(x, y))$ so long as A does not depend on y; however, it is also VERY important that you do not changer the order in which the quantifiers occur. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109489630492,
"lm_q1q2_score": 0.8502775090141688,
"lm_q2_score": 0.8633916082162403,
"openwebmath_perplexity": 184.92581725486824,
"openwebmath_score": 0.8710659146308899,
"tags": null,
"url": "https://math.stackexchange.com/questions/1373760/logic-quantifier-position-nuances"
} |
Any formula in logic is equivalent to a formula in Pre-Nex normal form, which begins with a string of quantifiers, followed by a quantifier-free expression. The two formulas you give are equivalent. I think there must be a published algorithm .Even professional mathematicians can find parsing a formula to be less than easy.
• So is it safe to say that since they are equivalent they have the same meaning in natural English? How did you figure out that they are equivalent? By using equivalences? $\forall x (A \Rightarrow \exists y B)$ and $\forall x \exists y (A \Rightarrow B)$ ? – Nubcake Jul 25 '15 at 19:33 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9848109489630492,
"lm_q1q2_score": 0.8502775090141688,
"lm_q2_score": 0.8633916082162403,
"openwebmath_perplexity": 184.92581725486824,
"openwebmath_score": 0.8710659146308899,
"tags": null,
"url": "https://math.stackexchange.com/questions/1373760/logic-quantifier-position-nuances"
} |
# Mean distance between 2 points in adjacent voxels (cubes)
Let's imagine our central unit voxel $$V_1=[0,1]^3$$.
We allow the second one to be in $$V_2=[-1,2]^3 \setminus [0,1]^3~$$, the surrounding voxel (center removed).
My question:
What is the mean distance between a point in $$V_1$$ and a point in $$V_2$$?
Of course, the direct approach would be to write an integral:
$$\frac{1}{1^3}\frac{1}{3^3-1^3} \times$$ $$\iiint_{(x_1,y_1,z_1)\in V_1} \iiint_{(x_2, y_2,z_2) \in V_2} \sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2}\mathrm{d}x_{1,2} \mathrm{d}y_{1,2}\mathrm{d}z_{1,2}$$
but the one-variable function does not seem to admit a nice integral.
Has anyone gone through this calculation and would you be able to suggest any helpful manipulation before I dive into a numeric simulation?
Thanks. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
Thanks.
• Small update : succeeding a numeric simulation, I got $\approx 1.8288$. If this rings a bell to you or if it roughly seems odd, please tell me so that I can correct. I expected a smaller number but the distribution's boundaries I obtained seemed consistent with the problem. – Wyllich May 24 '18 at 15:21
• An analytic solution is indeed available (using known results), but before I post an answer I need to make sure: if I understand your setup correctly, the volume of $V_2$ is $3^3 - 1$ so shouldn't the normalization constant be $\frac1{26}$? – Lee David Chung Lin May 24 '18 at 18:46
• Yes, the volume is equal to that fraction. I will correct that right away. – Wyllich May 24 '18 at 19:37
• Can you get access (by whatever means you feel appropriate) to the paper by Robbins and Bolis cited in the wiki page for Robbbins' constant? If not, in addition to me having to type up the equation (for box of general side lengths), you'll have to trust me that I quote their result correctly. – Lee David Chung Lin May 24 '18 at 21:31
• Thank you very much for mentioning the name of Robbin's constant. I now possess a starting point from which I may derive the solution. Thank you again. I'll try to find the source material if possible, count on me. – Wyllich May 24 '18 at 21:41
## Notations
Denote $$E(a,b,c)$$ as the expectation seen in the middle of p.278 (right before Eq.(2)) of the short paper (communication) by Robbins and Bolis. It is the average distance for a box of side lengths that are double of the inputs: $$2a, 2b$$, and $$2c$$.
Note that the inverse hyperbolic sine has a logarithmic form: $$\sinh^{-1} x = \ln (x + \sqrt{x^2 + 1})$$. That's how one ends up seeing those logs when $$E(a,b,c)$$ is evaluated numerically.
Denote $$\mathcal{I}$$ as the integral for your desired average but without the $$1/26$$ normalization. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
Similarly, we will have the integrals $$I_{f}$$ for face-to-face, $$I_{e}$$ for edge-to-edge, and $$I_{v}$$ for vertex-to-vertex. All these are just integrals without normalization (thus not averages themselves). Details continue in the following sections.
Denote $$R_b$$ as the Robbins' constant, namely, $$R_b = E(\frac12, \frac12, \frac12) \approx 0.6617$$. Note that $$R_b$$ is the average, while it equals in value to its corresponding integral, which shall be denoted $$I_0$$. That is, numerically $$R_b = I_0$$ because the volume is $$1$$.
## Strategy Outline
As you have noticed, there are obstacles in directly setting up the density. The symmetry and nice numbers (integers) strongly suggest that one should solve this via decomposing the space into blocks of unit cubes.
Any cube has $$6$$ faces, $$12$$ edges (sides), and $$8$$ vertices, therefore
$$\mathcal{I} = 6 I_f + 12 I_e + 8 I_v \tag{1} \label{Eq_26-decomp}$$
Your $$V_1$$ is the unit cube at the "center", surrounded by $$26$$ unit cubes that are disjoint and which adds up exactly to your $$V_2$$. For a different configuration this approach needs modification since the space doesn't decompose nicely in general.
The $$26$$ blocks consist of three groups: six of them are face-to-face with $$V_1$$, twelve of them are edge-touching-edge-only with $$V_1$$, and the remaining eight are vertex-touching-vertex-only with $$V_1$$.
The value of each $$I_f$$, $$I_e$$, and $$I_v$$ will be obtained using $$E(a,b,c)$$, successively building up starting from $$I_f$$.
It will involve a $$2$$-$$1$$-$$1$$ long box, a $$2$$-$$2$$-$$1$$ flat box, then finally the $$2$$-$$2$$-$$2$$ "double cube".
## Calculation Details | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
## Calculation Details
Formally, the integrals can be defined as (with more shorthands in additional to yours) D_{1,2} \equiv \sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2} \\ \begin{align*} I_f = \iiint\limits_{ V_1} \iiint\limits_{(x_2, y_2,z_2) \in V_{\mathbf{F}}} D_{1,2} \,\mathrm{d}x_{1,2}\,\mathrm{d}y_{1,2}\, \mathrm{d}z_{1,2} \\ I_e = \iiint\limits_{ V_1} \iiint\limits_{(x_2, y_2,z_2) \in V_{\mathbf{E}}} D_{1,2} \,\mathrm{d}x_{1,2}\,\mathrm{d}y_{1,2}\, \mathrm{d}z_{1,2} \\ I_v = \iiint\limits_{ V_1} \iiint\limits_{(x_2, y_2,z_2) \in V_{\mathbf{V}}} D_{1,2} \,\mathrm{d}x_{1,2}\,\mathrm{d}y_{1,2}\, \mathrm{d}z_{1,2} \end{align*} The volume $$V_F$$ can be any unit cube adjacent and face-to-face with $$V_1$$. For example, $$V_F \equiv \bigl\{(x,y,z) \big|~~ x \in [1,2],\, y \in [0,1],\, z \in [0,1]\bigr\}$$
Similarly, the edge-to-edge volume $$V_E$$ can be, for example, $$\bigl\{x \in [1,2],\, y \in [0,1],\, z \in [1,2]\bigr\}$$, and the vertex-to-vertex volume $$V_V$$ can be $$\bigl\{x \in [1,2],\, y \in [1,2],\, z \in [1,2]\bigr\}$$.
The formulation of $$I_f$$ (or $$I_e$$, or $$I_v$$) is not unique (up to $$6$$, $$12$$, $$8$$ multiplicity for any $$V_1$$, which itself can resides anywhere), but it doesn't matter. The value of each integral is unique and can be obtained using $$E(a,b,c)$$.
### Successive Build-up (1): $$~$$ starting from $$I_f$$
Consider a $$2$$-by-$$1$$-by-$$1$$ long box, which is equivalent to two $$V_1$$ joined face-to-face. Denote the box as $$V_{_{2.1.1}}$$ . We know that its volume is $$|V_{_{2.1.1}}| = 2$$ .
For the average distance, decompose the integral (space) into two within-cube and two across-cubes.
$$|V_{_{2.1.1}}|^2 \cdot E( 1,\tfrac12, \tfrac12) = 2 I_0 + 2 I_f \tag{2} \label{Eq_long-box_decomp}$$
There are two $$I_0$$ because each half of $$V_{_{2.1.1}}$$ are physically distinct so that ordering matters. For the same reason, there are two $$I_f$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
Note that $$I_0$$ here emphasizes that it is the integral and not the average $$R_b$$, although numerically they are the same.
Now is the time we must make explicit use of $$E(a,b,c)$$ by Robbins and Bolis for the general box. $$\begin{multline*} E(1, \tfrac12, \tfrac12) = \frac1{1260} \Bigl[520 + 17\sqrt{2} - 20\sqrt{5} - 81 \sqrt{6} + 21 \log\left(\sqrt{2}+1\right) \\ + 168 \log \left(\sqrt{2}+\sqrt{3}\right) + 735 \log\bigl( \frac{ \sqrt{6} + 1 }{ \sqrt{5} }\bigr) + 1344 \log \left(\frac{1}{2} \left(\sqrt{5}+1\right)\right) \\ + 42 \log \left(\sqrt{5}+2\right) - 1344 \arcsin\bigl( \frac15 \bigr) - 168 \arcsin\bigl( \sqrt{\frac25 } \bigr) \Bigr] \end{multline*}$$ I coded $$E(a,b,c)$$ with Mathematica and would never consider doing this by hand. The $$E(1,\frac12,\frac12)$$ here as well as later $$E(a,b,c)$$ evaluations are done by the computer algebraic system.
The above display is just to demonstrate what we are dealing with here. To save space, the exact expression for future $$E(a,b,c)$$ will be omitted.
Moving on, $$E(1,\frac12,\frac12) \approx 0.91455248459664313930734$$ and we have \begin{align*} I_f = \frac{ |V_{_{2.1.1}}|^2 }2 E( 1,\tfrac12, \tfrac12) - I_0 &= 2 E( 1,\tfrac12, \tfrac12) - Rb \tag{3.a} \label{Eq_Int-face_in_Rb} \\ &\approx 1.16739778692611 \tag{3.b} \label{Eq_Int-face_value} \end{align*}
### Successive Build-up (2): $$~$$ from $$I_f$$ to $$I_e$$
Consider a $$2$$-by-$$\mathbf{2}$$-by-$$1$$ flat box, which is equivalent to four $$V_1$$ joined together with pairwise face-to-face. Denote this box as $$V_{_{2.2.1}}$$. We know that its volume is $$|V_{_{2.2.1}}| = 4$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
The decomposition of the integral (space) goes like this: for each of the four unit cubes, there is one within-cube integral, two face-to-face integral, and one edge-to-edge integral. $$|V_{_{2.2.1}}|^2 \cdot E( 1, 1, \tfrac12) = 4 \left( I_0 + 2 I_f + I_e \right) \tag{4} \label{Eq_flat-box_decomp}$$ Again, the cubes are physically distinct and order matters. Note that the decomposition counts the spaces as $$4^2 = 4\cdot (1 + 2 + 1)$$.
Plugin the $$E(a,b,c)$$ formula to get $$E(1, 1,\frac12) \approx 1.1320874696118224667$$ and then replacing $$I_f$$ with Eq\eqref{Eq_Int-face_in_Rb}, we have: \begin{align*} I_e = \frac{ |V_{_{2.2.1}}|^2 }4 E( 1, 1, \tfrac12) - I_0 - 2I_f &= 4E( 1,1, \tfrac12) - R_b - 2 \bigl( 2 E( 1,\tfrac12, \tfrac12) - R_b \bigr) \\ &= 4 \bigl( E( 1, 1, \tfrac12) - E( 1,\tfrac12, \tfrac12) \bigr) + R_b \tag{5.a} \label{Eq_Int-edge_in_Rb} \\ &\approx 1.5318471223279 \tag{5.b} \label{Eq_Int-edge_value} \end{align*}
### Successive Build-up (3): $$~$$ get $$I_v$$ from $$I_f$$ and $$I_e$$
Consider a $$2$$-by-$$2$$-by-$$2$$ "double cube", which is equivalent to eight $$V_1$$ joined together with pairwise face-to-face. It is also just $$V_1$$ scaled up by a factor of two. Denote this box as $$V_{_{2.2.2}}$$.
We know that its volume is $$|V_{_{2.2.2}}| = 2^3 = 8$$, and this time we also know that $$E(1,1,1) = 2 E( \frac12, \frac12, \frac12) = 2R_b$$ simply due to the linear scalability of the geometry.
The integrals (spaces) decompose similarly. For each of the eight unit cubes, there is one within-cube integral, three face-to-face integral, three edge-to-edge integral, and one vertex-to-vertex integral. $$|V_{_{2.2.2}}|^2 \cdot E( 1, 1, 1) = 8 \left( I_0 + 3 I_f + 3I_e + I_v \right) \tag{6} \label{Eq_double-cube_decomp}$$ As before, the order matters and the decomposition says $$8^2 = 8\cdot (1 + 3 + 3 + 1)$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
Take $$E( 1, 1, 1) = 2R_b\,,\,$$ take $$I_f$$ as Eq\eqref{Eq_Int-face_in_Rb}, and take $$I_e$$ as Eq\eqref{Eq_Int-edge_in_Rb}, we end up with
\begin{align*} I_v &= \frac{ |V_{_{2.2.2}}|^2 }8 E( 1, 1, 1) - I_0 - 3I_f - 3 I_e \\ &= 8 \cdot 2R_b - R_b - 3 \Bigl[ 2 E( 1,\tfrac12, \tfrac12) - R_b + 4 \bigl( E( 1, 1, \tfrac12) - E( 1,\tfrac12, \tfrac12) \bigr) + R_b \Bigr] \\ &= 15 R_b - 6\bigl[ 2E( 1, 1, \tfrac12) - E( 1,\tfrac12, \tfrac12) \bigr] \tag{6.a} \label{Eq_Int-vertex_in_Rb} \\ &\approx 1.82787300624563276 \tag{6.b} \label{Eq_Int-vertex_value} \end{align*}
Finally, putting things together into Eq\eqref{Eq_26-decomp} we get:
\begin{align*} \mathcal{I} &= 6I_f + 12I_e + 8 I_v \\ &= 2 \Bigg\{ 3\bigl( 2 E(1,\tfrac12,\tfrac12 ) - R_b\bigr) + 6 \Bigl[ R_b + 4 \bigl( E(1, 1,\tfrac12 ) - E(1,\tfrac12,\tfrac12 )\bigr) \Bigr] + 4 \Bigl[ 15R_b - 6 \bigl( 2E(1, 1,\tfrac12 ) - E(1,\tfrac12,\tfrac12 )\bigr) \Bigr]\Bigg\} \\ &= 2 \bigl( 63R_b + 6 E(1,\tfrac12,\tfrac12 ) - 24 E(1,1,\tfrac12 ) \bigr) \tag{7.a} \label{Eq_Int-desired_in_Rb} \\ &\approx 40.0095362394564449 \tag{7.b} \label{Eq_Int-desired_value} \\ \end{align*}
The desired average is $$\frac1{26} \mathcal{I}\approx 1.53882831690217095767637627$$
The respective sub-equations Eq\eqref{Eq_Int-face_in_Rb}, Eq\eqref{Eq_Int-edge_in_Rb}, Eq\eqref{Eq_Int-vertex_in_Rb}, and Eq\eqref{Eq_Int-desired_in_Rb} showcase the expression in minimal terms of $$E(a,b,c)$$ where terms are converted to $$R_b$$ whenever possible.
These are the reminders that the exact solution is obtainable, that the functional form still exhibits some recognizable geometry, and that one can calculate any intermediate or final results to as many digits as one like.
## Concluding Remarks | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
## Concluding Remarks
It should be clear that one cannot arrive at the desired integral solely by using $$R_b$$. After carving out the contribution of $$V_1$$ at the center from a triple-cube, one still has to deal with the $$V_2$$-to-$$V_2$$ cross terms. In the end, one will have to do something similar to the derivation above.
When the space is in a nice configuration (smooth boundary with no zig-zags, no holes within ,etc), the exact integral in general is manageable, yet already requiring some attention to details. It is very telling that for the derivation of $$E(a,b,c)$$, Robbins and Bolis wrote that "By tedious yet routine successive integration one finds that ..."
For the sake of completeness, for related in-site posts one can start with rectangle in $$2$$-dim and more generally for hypercubes.
It is totally feasible to derive the density from scratch for this particular $$\{ V_1, \, V_2 \}$$ pair. The transformation of random variables involved is pretty basic. It is just that due to the "hole" in $$V_2$$, inevitably one will be forced to decompose the space.
"Decomposing the space into disjoint spaces" is a standard technique in dealing with probability inquiries, and the decomposition is not necessarily into integer valued partitions. There are indeed limitations to this approach, but the concept is rather simple.
In terms of numerical calculation, once you have coded the $$E(a,b,c)$$ in whatever system you're using, this procedure is pretty straightforward.
I don't know your original motivation for doing this calculation, but I'd say this approach is practically useful across disciplines, from theoretical to applications. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
• What a ride! Thank you for posting such a detailed and comprehensive answer. I will definitely remember the idea of dividing the integral space as you masterfully did to obtain intermediate integrals through multiple iterations. I guess I owe you an explanation about the whys. In LiDAR image processing, I asked myself the possibility of predicting the resolution (here understand mean distance between a point and its closest neighbour) of a downsampled cloud using a voxel grid. In spite of my hypothesis based on the distance you calculated being disproved by experience, I still believe it (1) – Wyllich May 28 '18 at 12:46
• ... was a good experience to have. Thank you very much again. (2) – Wyllich May 28 '18 at 12:47
• Very glad I could help. I know only a little bit about image process or data compression in general, but what you described sounds no lesser than some innovative ideas that eventually became successful. – Lee David Chung Lin May 28 '18 at 13:12
• Now that I think about it, your method gave me new ideas to precise my hypothesis which is based on isotropy (hence V2 containing V1). However, I may add some coefficients in front of each term of equations (2), (4), (6) to take into account anisotropy and capture an idea about the cloud's global structure. I must repeat myself : your dedication gave birth to many new ideas I may now explore. – Wyllich May 28 '18 at 13:25
• Thank you for saying that. It's been a real pleasure. – Lee David Chung Lin May 28 '18 at 13:46 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9890130583409235,
"lm_q1q2_score": 0.8502186768145958,
"lm_q2_score": 0.8596637523076225,
"openwebmath_perplexity": 1239.5758415108808,
"openwebmath_score": 0.992321789264679,
"tags": null,
"url": "https://math.stackexchange.com/questions/2793350/mean-distance-between-2-points-in-adjacent-voxels-cubes/2796405"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.