text stringlengths 1 2.12k | source dict |
|---|---|
Ioana
Multiply both sides by (x-2) to get 3=y(x-2) Then you can divide both sides by y (it's just a multiplied term now) to get 3/y = (x-2). Since the parentheses aren't doing anything for the right side, you can drop them, and add the 2 to both sides to get 3/y + 2 = x
Melin
thank you ladies and gentlemen I appreciate the help!
Robert
keep practicing and asking questions, practice makes perfect! and be aware that are often different paths to the same answer, so the more you familiarize yourself with these multiple different approaches, the less confused you'll be.
Andrew
please how do I learn integration
they are simply "anti-derivatives". so you should first learn how to take derivatives of any given function before going into taking integrals of any given function.
Andrew
best way to learn is always to look into a few basic examples of different kinds of functions, and then if you have any further questions, be sure to state specifically which step in the solution you are not understanding.
Andrew
example 1) say f'(x) = x, f(x) = ? well there is a rule called the 'power rule' which states that if f'(x) = x^n, then f(x) = x^(n+1)/(n+1) so in this case, f(x) = x^2/2
Andrew
great noticeable direction
Isaac
limit x tend to infinite xcos(π/2x)*sin(π/4x)
can you give me a problem for function. a trigonometric one
state and prove L hospital rule
I want to know about hospital rule
Faysal
If you tell me how can I Know about engineering math 1( sugh as any lecture or tutorial)
Faysal
I don't know either i am also new,first year college ,taking computer engineer,and.trying to advance learning
Amor
if you want some help on l hospital rule ask me
it's spelled hopital
Connor
hi
BERNANDINO
you are correct Connor Angeli, the L'Hospital was the old one but the modern way to say is L 'Hôpital.
Leo
I had no clue this was an online app
Connor | {
"domain": "quizover.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936827,
"lm_q1q2_score": 0.8616018092163845,
"lm_q2_score": 0.8688267813328976,
"openwebmath_perplexity": 389.4692698291522,
"openwebmath_score": 0.8189693689346313,
"tags": null,
"url": "https://www.quizover.com/calculus/section/the-mean-value-theorem-and-its-meaning-by-openstax"
} |
Leo
I had no clue this was an online app
Connor
Total online shopping during the Christmas holidays has increased dramatically during the past 5 years. In 2012 (t=0), total online holiday sales were $42.3 billion, whereas in 2013 they were$48.1 billion. Find a linear function S that estimates the total online holiday sales in the year t . Interpret the slope of the graph of S . Use part a. to predict the year when online shopping during Christmas will reach \$60 billion?
what is the derivative of x= Arc sin (x)^1/2
y^2 = arcsin(x)
Pitior
x = sin (y^2)
Pitior
differentiate implicitly
Pitior
then solve for dy/dx
Pitior
thank you it was very helpful
morfling
questions solve y=sin x
Solve it for what?
Tim
you have to apply the function arcsin in both sides and you get arcsin y = acrsin (sin x) the the function arcsin and function sin cancel each other so the ecuation becomes arcsin y = x you can also write x= arcsin y
Ioana
what is the question ? what is the answer?
Suman
there is an equation that should be solve for x
Ioana
ok solve it
Suman
are you saying y is of sin(x) y=sin(x)/sin of both sides to solve for x... therefore y/sin =x
Tyron
or solve for sin(x) via the unit circle
Tyron
what is unit circle
Suman
a circle whose radius is 1.
Darnell
the unit circle is covered in pre cal...and or trigonometry. it is the multipcation table of upper level mathematics.
Tyron
what is function?
A set of points in which every x value (domain) corresponds to exactly one y value (range)
Tim
what is lim (x,y)~(0,0) (x/y)
limited of x,y at 0,0 is nt defined
Alswell
But using L'Hopitals rule is x=1 is defined
Alswell
Could U explain better boss?
emmanuel
value of (x/y) as (x,y) tends to (0,0) also whats the value of (x+y)/(x^2+y^2) as (x,y) tends to (0,0)
NIKI
can we apply l hospitals rule for function of two variables
NIKI
why n does not equal -1
Andrew
I agree with Andrew
Bg
f (x) = a is a function. It's a constant function. | {
"domain": "quizover.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842202936827,
"lm_q1q2_score": 0.8616018092163845,
"lm_q2_score": 0.8688267813328976,
"openwebmath_perplexity": 389.4692698291522,
"openwebmath_score": 0.8189693689346313,
"tags": null,
"url": "https://www.quizover.com/calculus/section/the-mean-value-theorem-and-its-meaning-by-openstax"
} |
# Is $x^2 \equiv -1 \pmod{365}$ solvable?
I know that a similar question already exists, but I have a different question to ask.
We want to examine if $x^2 \equiv -1 \pmod{365}$ has a solution.
My thought is: $365=5\cdot 73$. So,The congruence $x^2 \equiv -1 \pmod{365}$ has solution, if and only if, the congrueces $x^2 \equiv -1 \pmod 5$ and $x^2 \equiv -1 \pmod{73}$ has solutions. So, if we use Legendre's Symbol we have
• $x^2 \equiv -1 \pmod 5$ has solution $\iff (-1/5)=1$ (and with simple calculations, indeed)
• $x^2 \equiv -1 \pmod{71}$ has solution $\iff (-1/73)=1$
Now, can we conclude that the congruence $x^2 \equiv -1 \pmod{365}$ has solution?
And more general: If we have the congruence $x^2 \equiv a \pmod n$ with $n=p_1^{n_1}\cdots p_k^{n_k},\ \gcd(a,n)=1$, which is equivalent with the system $x^2 \equiv a {\pmod p_1^{n_1}},\ldots,x^2 \equiv a \pmod{p_k^{n_k}}$, can we conclude that the first has solution if and only if each one of $x^2\equiv a\pmod{p_i^{n_i}},\ \forall i=1,\ldots,k$ has solution?
Thank you.
• Change $71$ to $73$ and it's fine. – Robert Israel Feb 7 '17 at 16:12
• @RobertIsrael Thank you for your comment and your correction. – Chris Feb 7 '17 at 16:15
• Note the use of \pmod rather than \bmod in my edit to the question. – Michael Hardy Feb 7 '17 at 16:51
• @RobertIsrael Ok, thank you – Chris Feb 7 '17 at 16:58
We show the following result:
Let $n,m$ be coprime integers. Let $a \in \Bbb Z$. Then $a$ is a square modulo $nm$ iff $a$ is square mod $n$ and $a$ is square mod $m$.
Assume that there are integers $x_i$ such that $x_1^2 \equiv a \pmod m$ and $x_2^2 \equiv a \pmod n$ where $m,n$ are coprime. We show that $y^2 \equiv a \pmod {nm}$ has a solution (the converse is obvious).
We know that there is an integer $y$ such that $y \equiv x_1 \pmod m$ and $y \equiv x_2 \pmod n$, by the Chinese remainder theorem.
Then $y^2-a$ is a multiple of $m$ and $n$, so it is a multiple of $nm$ since $(n,m)=1$. Therefore $y^2 \equiv a \pmod {nm}$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842212767571,
"lm_q1q2_score": 0.8616018067022748,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 245.21764079916383,
"openwebmath_score": 0.9318894147872925,
"tags": null,
"url": "https://math.stackexchange.com/questions/2133512/is-x2-equiv-1-pmod365-solvable"
} |
More generally, we have the following theorem (see Ireland Rosen, p. 50)
Let $a,n \in \Bbb N$ be coprime integers. Write $n=2^e p_1^{e_1} \cdots p_k^{e_k}$ as product of distinct prime powers. Then $a$ is a square modulo $n$ if and only if
• $a$ is a square modulo $p_i$ (for $1 \leq i \leq k$) ; this is equivalent to $a^{\dfrac{p_i-1}{2}} \equiv 1 \pmod{p_i}$
• $e>1 \implies a \equiv 1 \pmod{2^{2+r}}$ where $r = 1$ if $e \geq 3$ and $r=0$ if $e=2$.
• It might be worth explicitly mentioning the CRT here where it's used, but this is elsewise a good, clean answer. – Steven Stadnicki Feb 7 '17 at 16:20
• Thank you , now it's clear. – Chris Feb 7 '17 at 16:27
• @Chris : you're welcome. It is chapter 5 in Ireland, Rosen. – Watson Feb 7 '17 at 16:28
• Tell me please something else. If we have the congruence $x^2 \equiv 2 \bmod 118$ could we say that $118=2\cdot 59$ so it's in the form of $2p^m$ and $2^{\phi(118)/ \gcd(2,\phi(118))} \equiv -1 \bmod 118$ so there are no solutions (because it is not a quadratic residue mod 118)? – Chris Feb 7 '17 at 16:46
• @Chris : since $2$ is not a square mod $59$, it is not a square mod $118$, that's correct! – Watson Feb 7 '17 at 16:50
We have $365 = 5 \times 73$. The congruence becomes $x^2 = -1 \mod 5$ and $x^2 = -1 \mod 73$.
We have if $p = 1 \mod 4 \implies x^2 = -1 \mod p$ has exactly $2$ solutions.
Thus $x^2 = -1 \mod 5$ has solutions $x_0,x_1$ and $x^2 = -1 \mod 73$ has solutions $y_0,y_1$.
The original solutions satisfies either: $x = x_0 \mod 5, x = y_0 \mod 73$; $x = x_0 \mod 5, x = y_1 \mod 73$; $x = x_1 \mod 5, x = y_0 \mod 73$ ; $x = x_1 \mod 5, x = y_1 \mod 73$.
For each pair of congruence , $x$ is uniquely determined $\mod 365$ by the Chinese remainder theorem. Hence the original congruence has $4$ solutions. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842212767571,
"lm_q1q2_score": 0.8616018067022748,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 245.21764079916383,
"openwebmath_score": 0.9318894147872925,
"tags": null,
"url": "https://math.stackexchange.com/questions/2133512/is-x2-equiv-1-pmod365-solvable"
} |
If $\,m,n\,$ are coprime then, by CRT, solving an integer coefficient polynomial $\,f(x)\equiv 0\pmod{\!mn}\,$ is equivalent to solving $\,f(x)\equiv 0\,$ mod $\,m\,$ and mod $\,n.\,$ By CRT, each combination of a root $\,r_i\bmod m\,$ and a root $\,s_j\bmod n\,$ corresponds to a unique root $\,t_{ij}\bmod mn,\,$ i.e.
$$\begin{eqnarray} f(x)\equiv 0\!\!\!\pmod{mn}&\overset{\rm CRT}\iff& \begin{array}{}f(x)\equiv 0\pmod m\\f(x)\equiv 0\pmod n\end{array} \\ &\iff& \begin{array}{}x\equiv r_1,\ldots,r_k\pmod m\phantom{I^{I^{I^I}}}\\x\equiv s_1,\ldots,s_\ell\pmod n\end{array}\\ &\iff& \left\{ \begin{array}{}x\equiv r_i\pmod m\\x\equiv s_j\pmod n\end{array} \right\}_{\begin{array}{}1\le i\le k\\ 1\le j\le\ell\end{array}}^{\phantom{I^{I^{I^I}}}}\\ &\overset{\rm CRT}\iff& \left\{ x\equiv t_{i j}\!\!\pmod{mn} \right\}_{\begin{array}{}1\le i\le k\\ 1\le j\le\ell\end{array}}\\ \end{eqnarray}\qquad\qquad$$
Yes. Let a solution to $x^2+1 \equiv 0 \pmod {5}$ be $r_{1}$, and let a solution to $x^2+1 \equiv 0 \pmod {73}$ be $r_{2}$
Then note that by CRT, we have that there exists such $x$ that $$x \equiv r_{1} \pmod {5}$$ $$x \equiv r_{2} \pmod {73}$$ Exists. Then note that for such $x$, $$x^2+1 \equiv 0 \pmod {5}$$ $$x^2+1 \equiv 0 \pmod {73}$$ Which gives $$x^2+1 \equiv 0 \pmod {365}$$
• Seems alright now. – Wojowu Feb 7 '17 at 16:20
It is true because of the Chinese remainder theorem, which asserts the map \begin{align} \mathbf Z/n\mathbf Z&\longrightarrow \mathbf Z/p_1^{n_1}\mathbf Z\times\dotsm\times\mathbf Z/p_k^{n_k}\mathbf Z\\ x\bmod n&\longmapsto(x\bmod p_1^{n_1},\dots,x\bmod p_k^{n_k}) \end{align} is a ring isomorphism. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9916842212767571,
"lm_q1q2_score": 0.8616018067022748,
"lm_q2_score": 0.8688267779364222,
"openwebmath_perplexity": 245.21764079916383,
"openwebmath_score": 0.9318894147872925,
"tags": null,
"url": "https://math.stackexchange.com/questions/2133512/is-x2-equiv-1-pmod365-solvable"
} |
# Math Help - Cartesian equations
1. ## Cartesian equations
Given $x=2 \sin (nt+\frac{\pi}{3})$ and $y=4 \sin (nt+ \frac{\pi}{6})$, express $x$ and $y$ in terms of $\sin nt$ and $\cos nt$. Find the Cartesian equation of the locus of the point $(x,y)$ as $t$ varies.
I have expressed $x$ and $y$ in terms of $\sin nt$ and $\cos nt$ already.
$x=2 \sin (nt+\frac{\pi}{3})$
$x=2(\frac{1}{2} \sin nt+\sqrt{3} \cos nt)$
$x= \sin nt+ \sqrt{3} \cos nt$
and
$y=4 \sin (nt+ \frac{\pi}{6})$
$y=4(\frac{\sqrt{3}}{2} \cos nt+\frac{1}{2} \sin nt)$
$y= 2\sqrt{3} \cos nt +2 \sin nt$
Now my problem is how do i form the Cartesian equation in x and y as t varies?
I take n as constant and t varies? Can anyone explain?
Thanks
2. Originally Posted by arze
Given $x=2 \sin (nt+\frac{\pi}{3})$ and $y=4 \sin (nt+ \frac{\pi}{6})$, express $x$ and $y$ in terms of $\sin nt$ and $\cos nt$. Find the Cartesian equation of the locus of the point $(x,y)$ as $t$ varies.
I have expressed $x$ and $y$ in terms of $\sin nt$ and $\cos nt$ already.
$x=2 \sin (nt+\frac{\pi}{3})$
$x=2(\frac{1}{2} \sin nt+\sqrt{3} \cos nt)$
$x= \sin nt+ \sqrt{3} \cos nt$
and
$y=4 \sin (nt+ \frac{\pi}{6})$
$y=4(\frac{\sqrt{3}}{2} \cos nt+\frac{1}{2} \sin nt)$
$y= 2\sqrt{3} \cos nt +2 \sin nt$
Now my problem is how do i form the Cartesian equation in x and y as t varies?
I take n as constant and t varies? Can anyone explain?
Thanks
$x=2 \sin (nt+\frac{\pi}{3})$ and $y=4 \sin (nt+ \frac{\pi}{6})$
$x=2 \sin (nt+\frac{\pi}{6}+\frac{\pi}{6})$
let $\alpha=nt+\frac{\pi}{6}$
$x=2 \sin (\alpha+\frac{\pi}{6})$ and $y=4 \sin (\alpha)$
$\frac{x}{2}=\sin (\alpha)\cos(\frac{\pi}{6}) + \cos (\alpha)\sin(\frac{\pi}{6})$
and
$\frac{y}{4}=\sin (\alpha)$
use $\sin^2 (\alpha) + \cos^2(\alpha) = 1$ to eliminate $\alpha$ and get your equation
3. Hello, arze!
Given: . $\begin{array}{ccc}x &=&2 \sin \left(nt+\frac{\pi}{3}\right) \\ y &=& 4 \sin \left(nt+ \frac{\pi}{6}\right)\end{array}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180639771091,
"lm_q1q2_score": 0.8615937167797967,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 296.58703314066724,
"openwebmath_score": 0.9575490951538086,
"tags": null,
"url": "http://mathhelpforum.com/trigonometry/95321-cartesian-equations.html"
} |
Express $x$ and $y$ in terms of $\sin nt$ and $\cos nt$.
Find the Cartesian equation of the locus of the point $(x,y)$ as $t$ varies.
I have expressed $x$ and $y$ in terms of $\sin nt$ and $\cos nt$ already.
. . $\begin{array}{ccccc}x\:=\: 2\sin\left(nt+\tfrac{\pi}{3}\right) \:=\:2\left(\tfrac{1}{2}\sin nt+\tfrac{\sqrt{3}}{2}\cos nt\right) &\Rightarrow& x\:=\: \sin nt+ \sqrt{3} \cos nt \\ \\[-4mm] y\:=\:4\sin\left(nt+ \tfrac{\pi}{6}\right) \:=\:4\left(\tfrac{\sqrt{3}}{2} \cos nt+\tfrac{1}{2} \sin nt\right) &\Rightarrow& y \:=\: 2\sqrt{3} \cos nt +2 \sin nt \end{array}$
. . . . . Good work!
Now my problem is how do i form the Cartesian equation in $x$ and $y$ as $t$ varies?
We have: . $\begin{array}{cccc}x &=& \sin nt + \sqrt{3}\cos nt & {\color{blue}(1)} \\ \\[-4mm] \dfrac{y}{2} &=& \sqrt{3}\sin nt + \cos nt & {\color{blue}(2)}\end{array}$
$\begin{array}{ccccc}\text{Square }{\color{blue}(1)}: & x^2 &=& \sin^2\!nt + 2\sqrt{3}\sin nt\cos nt + 3\cos^2\!nt \\
\text{Square }{\color{blue}(2)}: & \dfrac{y^2}{4} &=& 3\sin^2\!nt + 2\sqrt{3}\sin nt\cos nt + \cos^2\!nt \end{array}$
Add: . $x^2 + \frac{y^2}{4} \;=\;4\sin^2\!nt + 4\sqrt{3}\sin nt\cos nt + 4\cos^2\!nt$
. . . . $x^2 + \frac{y^2}{4} \;=\;4\underbrace{\left(\sin^2\!nt + \cos^2\!nt\right)}_{\text{This is 1}} + 2\sqrt{3}\underbrace{\left(2\sin nt\cos nt\right)}_{\text{This is }\sin2nt}$
. . . . $x^2 + \frac{y^2}{4} \;=\;4 + 2\sqrt{3}\sin(2nt)$
4. Originally Posted by Soroban
Hello, arze!
We have: . $\begin{array}{cccc}x &=& \sin nt + \sqrt{3}\cos nt & {\color{blue}(1)} \\ \\[-4mm] \dfrac{y}{2} &=& \sqrt{3}\sin nt + \cos nt & {\color{blue}(2)}\end{array}$
Add: . $x^2 + \frac{y^2}{4} \;=\;4\sin^2\!nt + 4\sqrt{3}\sin nt\cos nt + 4\cos^2\!nt$
. . . . $x^2 + \frac{y^2}{4} \;=\;4\underbrace{\left(\sin^2\!nt + \cos^2\!nt\right)}_{\text{This is 1}} + 2\sqrt{3}\underbrace{\left(2\sin nt\cos nt\right)}_{\text{This is }\sin2nt}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180639771091,
"lm_q1q2_score": 0.8615937167797967,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 296.58703314066724,
"openwebmath_score": 0.9575490951538086,
"tags": null,
"url": "http://mathhelpforum.com/trigonometry/95321-cartesian-equations.html"
} |
. . . . $x^2 + \frac{y^2}{4} \;=\;4 + 2\sqrt{3}\sin(2nt)$
if you want to do it that way, solve (1) and (2) for sin and cos:
$2\sin nt = \frac{\sqrt3y}{2}-x$
$2\cos nt = \sqrt3x-\frac{y}{2}$
then use
$\sin^2nt + \cos^2nt = 1$
to get an equation in x and y
5. Hello, Tesla!
Absolutely right!
It's an old habit.
Whenever I see something like: . $\begin{array}{ccc}x &=& a\sin\theta \\ y &=& b\cos\theta\end{array}$
. . I tend to use the square-and-add approach to simplify.
I must learn to get out of my "box". | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9857180639771091,
"lm_q1q2_score": 0.8615937167797967,
"lm_q2_score": 0.8740772318846386,
"openwebmath_perplexity": 296.58703314066724,
"openwebmath_score": 0.9575490951538086,
"tags": null,
"url": "http://mathhelpforum.com/trigonometry/95321-cartesian-equations.html"
} |
# Why can't $y=xe^x$ be solved for $x$?
I apologize for my mathematical ignorance regarding this, but could someone help me understand why it isn't possible to (symbolically) find an inverse function for $f(x)=xe^x$?
The most obvious (but presumably the most trivial) is that $f$ does not pass the "horizontal line test". However, if we restrict the domain to $x\geq-1$ this should not be a problem (derivative is positive for $x>-1$ so function is strictly increasing). So now my question becomes: "Why can't we find an inverse function for $f$ over the interval $[-1,\infty)$?"
Perhaps it is because $e^x$ is transcendental (not algebraic). However, we can find an inverse for $g(x) = e^x$, which is also transcendental. Is that because we're "cheating" by defining another transcendental function, namely $\ln(x)$, to be its inverse? In other words, would it be fundamentally no different to define a new function, call it $\text{lnx}(x)$ (if that's not already something else), to be the inverse of $xe^x$ over $[-1,\infty)$ and then say that $f$ has a "closed form" / "symbolic" / ??? inverse function $f^{-1}(x)=\text{lnx}(x)$ over the interval $[-1, \infty)$?
### SageMath source to generate plot
xs = (x,-5,2) ys = (y,-1,5) p1 = implicit_plot(x*exp(x)-y,xs,ys, color='blue', legend_label='y=x*e^x') p2 = implicit_plot(x-y,xs,ys, color='orange', linestyle='dashed', legend_label='y=x') p3 = implicit_plot(exp(x)-y,xs,ys, color='green', linestyle='dotted', legend_label='y=e^x') combined = p1 + p2 + p3 combined.axes_labels(['x', 'y']) combined.legend(True) combined.show(title='Transcendental Stuff', frame=True, axes=True, legend_loc='lower right') | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
• it can be solved by the following function $$\{\{x\to W(y)\}\}$$ the product Logarithmus by Mathematica – Dr. Sonnhard Graubner Mar 21 '18 at 15:49
• It can be solved, and an inverse function can be found in the given interval, just not analytically. – Thern Mar 21 '18 at 15:51
• Yes, you're right that "fundamentally" it would "be no different" to invent a label for the inverse function, which is guaranteed to exist because your function is injective. – symplectomorphic Mar 21 '18 at 15:51
• This question is so high quality, why aren't people upvoting this – vrugtehagel Mar 21 '18 at 15:54
• @vrugtehagel that is what I have about this site more than anything else. There's so much good content that goes unappreciated. This is an excellent question. I upvoted it. – user223391 Mar 21 '18 at 16:03
It can be solved by inventing new functions, but it cannot be solved in closed form using trigonometric, logarithmic or exponential etc. Read this: Chow, Timothy Y. (May 1999), "What is a Closed-Form Number?"
• I believe you, but I was trying to get a better answer to the why part of the question. – iX3 Mar 21 '18 at 16:02
• Read the linked article for the why part. – Shubhashish Mar 21 '18 at 16:06
• Wow, this paper talks about exactly what I wanted to know! (Did you just add that? I can't believe I didn't see it before.) BTW, it was hard to read on that site (not scalable, not searchable, etc.), but I found a link to a PDF version on the author's website here – iX3 Mar 21 '18 at 16:18
• Yes I have updated the link – Shubhashish Mar 21 '18 at 16:19
You can use the Lambert-$W$ function to solve it symbolically.
$y = xe^x$ gives $x = W(y)$.
You may run solve(x*exp(x)-y,x) on SymPy Live as an alternative to SageMath. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
You may run solve(x*exp(x)-y,x) on SymPy Live as an alternative to SageMath.
• Just for reference, here is a Wolfram Alpha example solving $xe^x=\pi$ – gt6989b Mar 21 '18 at 15:56
• Thank you for showing me the Lambert-W function (was just finding that in the answer to another question on here too). It seems that what determines whether it is possible to solve something in "closed form" has largely to do with what functions/expressions are allowed. e.g. $y = e^x$ cannot be "solved for $x$" unless something like $\ln$ is allowed. Similarly, the answer to my question depends on whether or not something like $W$ is acceptable. – iX3 Mar 21 '18 at 16:00
• @iX3 In the tag info of (closed-form), it's said that a "closed form expression" is anything written in terms of "known" functions. Though the Lambert-W function is not elementary, but I believe it qualifies a known function. – GNUSupporter 8964民主女神 地下教會 Mar 21 '18 at 16:09
• Hmm, solve(x*exp(x)-y,x) --> Traceback (most recent call last):...line 1055, in solve solution = _solve_system(f, symbols, **flags) ... line 158, in _lambert solns[i] = tmp.subs(u, rhs) AttributeError: 'dict' object has no attribute 'subs' I may need to go read & learn about SymPy to figure out what's wrong. (I think SageMath uses SymPy though, so in theory I should be able to access all of the same functionality through that.) – iX3 Mar 21 '18 at 18:25
• @iX3 I've edited my post in response to your comment. – GNUSupporter 8964民主女神 地下教會 Mar 21 '18 at 18:33
As indicated in the comments and in another answer, there is a special function that has been defined which can serve as an inverse here. However, this doesn't address your basic question, which is: why is this necessary? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
Before I talk about that, let me say something about $\ln x$ and $e^x$. Those are both transcendental functions, and they're inverses of each other, but neither is really defined simply to be the inverse of the other. Both of these functions arise very naturally, each on their own. The natural log function is the integral of $x^{-1}$, for a suitably defined integral, and the exponential function is the solution of a differential equation modeling the simplest kind of constant relative growth. They end up being inverses of each other, and that's a cool set of facts to understand and wonder at.
Anyway, you can't use elementary functions to invert lots of things, such as $f(x)=xe^x$. This often happens when we mix different types of functions together. The functions $g(x)=x$ and $h(x)=e^x$ are perfectly invertible, and they are, respectively, polynomial and exponential. The function $f=gh$, on the other hand, is the product of a polynomial function with an exponential function. We expect that to be more complicated. It's not solvable, with the usual algebraic methods, because whatever technique we apply to simplify $e^x$ messes up the polynomial part. Similarly, if you try to solve $e^x(x^2-x)=k$, anything you do to simplify the polynomial part will just make an exponential mess.
It's the blending of different types of functions, which are amenable to transforming with completely different tools, that makes such functions complicated. Other notorious examples include $\frac{\sin x}{x}$, and $e^{x^2}$. It's not always that they're hard to invert, but try doing integral calculus with such functions! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
• Thank you; this makes a lot of sense, at least intuitively. Is there a more precise definition regarding the "blending of different types of functions" and does that always produce tough situations like this? – iX3 Mar 21 '18 at 16:10
• I'd say the different kinds are 1. polynomial/rational/radical (algebraic), 2. Trigonometric, 3. Inverse trigonometric, 4. Exponential, 5. Logarithmic. If it's done right, to allow for cancellation, you can blend 2 with 3 and 4 with 5 and still be able to work analytically. If you're very careful, you can blend any kinds, as long as there's a way to cancel stuff until you have something pure. I don't know of any real precise definitions and theory that address this "blending" though. – G Tony Jacobs Mar 21 '18 at 16:14
I am going to break your question into two separate questions:
1. Does an inverse function to $y=x \cdot e^x$ exist on the domain $[-1,+\infty)$?
2. Can we find that inverse function in the "standard list" of functions that everyone knows?
Question 1 has an easy answer: yes, that inverse function exists. Its existence is an application of the inverse function theorem which most students first encounter without proof in an ordinary calculus class, and which they then encounter with proof in some kind of advanced calculus class. And then if you're quick enough, you might even be able to attach a name to that function, although it appears that Lambert beat you to it as shown in the answer of @GNUSupporter. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
Question 2 is more difficult to answer. First there is no "standard list" of functions that everyone knows. Nonetheless, perhaps that's just because we haven't tried hard enough to list all functions. Can we keep adding functions to the "standard list" until we don't have to add any more? For example, as suggested in the answer of @GNUSupporter, can we just add the "Lambert-W function" $x=W(y)$ to our list if we had never heard of it before, and then declare ourselves happy? Well, maybe, but then you would be perfectly justified to ask whether there is an inverse function to $z=yW(y)$ on some appropriately chosen domain......................
These kinds of questions are addressed (but not definitively answered) in a branch of mathematics called differential algebra which is a kind of broad generalization of differential equations.
• Thank you for the reference to differential algebra. I gather from your answer that the "answer" to my "why?" question is basically "Differential algebra deals with this question but does not provide a complete/general answer." Is that about right? – iX3 Mar 21 '18 at 16:12
• Yes, that's about right. Nonetheless, one can often answer specific questions, which is what's so nice about the link to Chow's paper provided in the answer of @ShubhashishChauhan. – Lee Mosher Mar 21 '18 at 17:05
• Although, to qualify my last comment, even Chow's paper does not provide a definitive answer to questions about Lambert's function, instead reducing them to applications of big unsolved conjectures. – Lee Mosher Mar 21 '18 at 17:13 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9597620596782468,
"lm_q1q2_score": 0.8615738805462617,
"lm_q2_score": 0.8976952900545976,
"openwebmath_perplexity": 540.4593214149359,
"openwebmath_score": 0.6428465247154236,
"tags": null,
"url": "https://math.stackexchange.com/questions/2701982/why-cant-y-xex-be-solved-for-x"
} |
# Inequalities with two absolute values with greater than symbol. Please tell me the proper way of doing $|4x-1|>|3x+2|$
I have finals in a couple of days. I need help with inequalities. I have spent around 15 hours trying my hand at inequalities and I am still trying to figure things out. In this case I need help with an inequality with two absolute values with greater than symbol.
The following is a picture of the inequality ($$|4x-1|>|3x+2|$$) and the procedure I tried, which is something I applied from an answer by Isaac to another question in this site, although I think I did something wrong because it looks like I got the answer wrong or incomplete.
Please tell me what I did wrong and how to do it the right way.
PS: Does this method also apply if there is a less than sign?
• Alternatively (and I'd say it's faster) you could note that $|a|>|b|$ is equivalent to $a^2>b^2$.
– dfnu
Nov 15, 2019 at 8:32
• Two years later I have completely forgotten how to do this. :D Nov 19, 2021 at 23:50
Here’s another way to look at it: $$|4x-1|>|3x+2| \iff (4x-1)^2-(3x+2)^2>0 \iff (7x+1)(x-3)>0$$
Now LHS has only two obvious zeros, and outside the interval with those end points, it has to be positive.
——-
P.S. When you have something like $$f(x)>0$$, where $$f$$ is continuous, it can change sign only when there are roots. So its roots effectively partition the real line into intervals which are either solutions or not. In the above case, two roots are $$-\frac17, 3$$, so we need to consider only the three intervals $$(-\infty, -\frac17), (-\frac17, 3)$$ and $$(3, \infty)$$. Obviously the LHS is positive for $$x\to \pm\infty$$ and negative for $$x=0$$, so the first and last intervals are solutions, the middle one isn’t.
BTW, whether the intervals to consider are open / closed depends on whether the inequality is strict or $$\geqslant$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.972830768464319,
"lm_q1q2_score": 0.861569557528886,
"lm_q2_score": 0.885631484383387,
"openwebmath_perplexity": 265.46551087897507,
"openwebmath_score": 0.8174499869346619,
"tags": null,
"url": "https://math.stackexchange.com/questions/3436407/inequalities-with-two-absolute-values-with-greater-than-symbol-please-tell-me-t"
} |
• 7x+1>0 gives me (-1/7,+) which seems to be invalid. What is wrong? Nov 15, 2019 at 16:18
• @dfnu +macavity x-3 gives me (3,+), with a combined solution of (-1/7,+). Nov 15, 2019 at 16:56
• @freethinker36 If you need $A\cdot B>0$, you need $A, B$ to have the same sign. Not just $A$ or just $B$. Nov 15, 2019 at 16:58
• It would be great if you can elaborate. I'm learning, thus what may look evident, for me may not be evident. And tomorrow is my test and have to study two classes; already taking time of the second class to try to cement my understanding of inequalities. But I appreciate whatever guidance has been provided! Nov 15, 2019 at 17:05
• OK, I have added some explanations, do let me know if youre having more doubts after studying it. Nov 15, 2019 at 17:11
You're doing almost everything right; you're just misinterpreting the results at the end.
In particular, the idea is to combine intervals where the inequality holds. In the first region, $$\left(-\infty, -\frac23\right)$$, you arrived at $$x<3$$. It seems that you rejected this result, judging by the "$$\times$$" beside your work. This is where you went wrong.
Instead, think of it like this:
Within the region $$\left(-\infty, -\frac23\right)$$, which $$x$$ satisfy $$x<3$$?
All $$x$$ do within this region. Another way to see this is that you are effectively taking the intersection of the two: $$\left(-\infty, -\frac23\right) \cap (-\infty,3) = \left(-\infty, -\frac23\right)$$
The other two regions are handled the same way.
• My rationale for rejecting it was that 3>-2/3, so x<3 is not within the region of x<-2/3. Nov 15, 2019 at 6:33
I tried again, following the answer of Théophile, and I was able to reach the correct solution. Below is the pic of the procedure I used. Thanks! | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.972830768464319,
"lm_q1q2_score": 0.861569557528886,
"lm_q2_score": 0.885631484383387,
"openwebmath_perplexity": 265.46551087897507,
"openwebmath_score": 0.8174499869346619,
"tags": null,
"url": "https://math.stackexchange.com/questions/3436407/inequalities-with-two-absolute-values-with-greater-than-symbol-please-tell-me-t"
} |
# Are right continuous functions measurable?
Are right-continuous function from $\mathbb{R}^n$ to $\mathbb{R}$ necessarily semi-continuous? If not, are they necessarily Borel measurable? Is there a topological characterization of right-continuous functions (as there is of continuous ones)? Are CDFs of $n$-dimensional random vectors measurable?
Note: A function $f: \mathbb{R}^n \longrightarrow \mathbb{R}$ is right-continuous iff it is right-continuous at every point $x \in \mathbb{R}^n$. A function $f: \mathbb{R}^n \longrightarrow \mathbb{R}$ is right-continuous at $x \in \mathbb{R}^n$ iff given any infinite sequence of points in $\mathbb{R}^n$ $(y_0,y_1,\dots)$ that converges to $x$ from above (i.e. the sequence converges to $x$ in the usual, Euclidean sense and in addition every sequence element is greater than or equal to $x$ component-wise), the sequence $(f(y_0), f(y_1), \dots)$ converges to $f(x)$ in the usual sense.
• You might want to add the definition of right-continuity for a function defined on $\mathbb R^n$ when $n\gt1$.
– Did
Aug 2, 2012 at 8:28
• What are the definition of right-continuous function, and semi-continuous?
– Paul
Aug 2, 2012 at 8:44
The answer to the first question is no, even in the case $n=1$: The characteristic function of the half open interval $[0,1)$ is right continuous, but neither upper nor lower semicontinuous.
A right continuous function $\mathbb{R}\to\mathbb{R}$ is indeed Borel measurable. By definition, the inverse image $E$ of an open set has the property that for any $x\in E$, there is some $\delta>0$ so that $[x‚x+\delta)\subseteq E$. It follows that $E$ is a countable union of half open intervals, and hence is Borel measurable. I am not sure about the answer to this one when $n>1$ (the countable union argument no longer holds), but my guess is that right continuous functions are still measurable. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307668889048,
"lm_q1q2_score": 0.8615695429188837,
"lm_q2_score": 0.885631470799559,
"openwebmath_perplexity": 134.49053915732216,
"openwebmath_score": 0.958007276058197,
"tags": null,
"url": "https://math.stackexchange.com/questions/177917/are-right-continuous-functions-measurable/1134904"
} |
Topological characterization: If we write $\le$ for pointwise comparison on $\mathbb{R}^n$, we can make a one-sided topology by declaring a set $V\subseteq\mathbb{R}^n$ to be open if, for each $x\in V$, there is some $\delta>0$ so that $\{y\ge x\colon\lvert y-x\rvert<\delta\}\subseteq V$. Then the right continuous maps $\mathbb{R}^n\to\mathbb{R}$ are just the ones that are continuous from this topology to the usual topology on $\mathbb{R}$.
I am not too sure on the CDF question either. (I assume CDF stands for cumulative distribution function, in the sense of $F(x)=\mathrm{P}\{X\le x\}$, where $X$ is a random $n$-vector.) It might help that $F$ is not only right continuous, but also monotone. So the set $\{x\colon F(x)\le p\}$ has a particularly simple structure; I imagine it must be measurable, but right now I don't see a proof. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307668889048,
"lm_q1q2_score": 0.8615695429188837,
"lm_q2_score": 0.885631470799559,
"openwebmath_perplexity": 134.49053915732216,
"openwebmath_score": 0.958007276058197,
"tags": null,
"url": "https://math.stackexchange.com/questions/177917/are-right-continuous-functions-measurable/1134904"
} |
• Thanks, Harald, but it is in fact the case n>1 that i am interested in. See my clarification of the term "right-continuous" in a comment to my original post. Also, of the four questions i posed in my original post i am most interested in the last one concerning CDF. Aug 2, 2012 at 10:49
• @EvanAad: This topology appears to be the product of $n$ copies of the Sorgenfrey line. But I don't quite see why the open sets of this topology are Borel. It certainly has a basis of Borel sets, but I don't think it's second countable, so why does it follow that any union of such sets is also Borel? Aug 2, 2012 at 21:54
• @EvanAad: In fact, let $E$ be a non-measurable subset of $\mathbb{R}$ and let $A = \bigcup_{x \in E} [x,\infty)^2$. $A$ is open in our topology on $\mathbb{R}^2$ (the Sorgenfrey plane), but not Borel with respect to the usual topology, since its intersection with the diagonal line $y=-x$ is a skewed copy of $E$. One might think one could exploit this to make a right-continuous function which is not Borel, but I still don't see how. Aug 3, 2012 at 13:11
• @NateEldredge: Did you mean $\bigcup_{x\in E}[x,\infty)\times[-x,\infty)$? Aug 3, 2012 at 13:51
• @HaraldHanche-Olsen: Oops, yes, I did. Aug 3, 2012 at 14:25
Here is a proof that any function $F: \mathbb{R}^n \to \mathbb{R}$ which is right continuous is Borel measurable.
Define $F_n(x) = F\left(\frac{[nx]+1}{n}\right)$, where $[x]$ is the greatest integer smaller than $x$. Clearly $F_n$ are measurable since they are step functions.
From the right continuity of $F$ we get that $F_n\to F$, since $\frac{[nx]+1}{n} \downarrow x$.
Hence since $F$ is the pointwise limit of measurable functions, it is measurable too.
• Very Nice, Milind! Aug 24, 2017 at 13:58
• to make this a bit more solid, you would need to clarify that $n=1$ or properly define $[x]$ for an $n$-vector $x$. Oct 12, 2018 at 11:58 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9728307668889048,
"lm_q1q2_score": 0.8615695429188837,
"lm_q2_score": 0.885631470799559,
"openwebmath_perplexity": 134.49053915732216,
"openwebmath_score": 0.958007276058197,
"tags": null,
"url": "https://math.stackexchange.com/questions/177917/are-right-continuous-functions-measurable/1134904"
} |
Horizontal tangent line of a parametric curve
Suppose $x=t^2,y=t^3$ is a parametric curve. Here's a quote from my textbook:
The origin, which corresponds to $t=0$, is a singular point of the parametric curve, because $dx/dt=2t,dy/dt=3t^2$ are both zero when $t=0$.
So far so good.
But then they write:
However, the curve has a horizontal tangent line at the origin, because for all $t\neq 0$: $$\frac{dy}{dx}=\frac{dy/dt}{dx/dt}=\frac{3}{2}t$$ And thus: $$\lim_{t\to 0^+} \frac{dy}{dx}=\lim_{t\to 0^-} \frac{dy}{dx}=0$$
It looked a little odd for me. Nevertheless, I decided to use the same argument to show that the parametric curve $x=2\cos t - \cos (2t), y=2\sin t - \sin(2t)$ has a horizontal tangent line at $t=0$, that is at $(1,0)$.
However my professor said that this is wrong ("because the derivative is not zero" - indeed, $\frac{dy}{dx}\Big|_{t=0}$ is undefined - "$0/0$").
So who is right? Is the existence of the limit a sufficient condition for the (horizontal) tangent line to exist, as my textbook says, or not? I'm confused.
Thanks.
Short version of the question: can a parametric curve have a horizontal tangent line at a singular point?
I.e. is $\lim_{t\to 0} \frac{dy}{dx}=0$ a sufficient condition for a horizontal line to exist (at $t=0$)? (even if the derivative $\frac{dy}{dx}\Big |_{t=0}$ itself doesn't exist). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
• Reading your comments to the answers below, I think you are unduly concerned about the distinction between $f(x_0)$ and $\lim_{x\to x_0}f(x)$. Where we have an isolated point $x_0$ for which $f(x_0)$ does not exist, but $\lim_{x\to x_0}f(x)$ does exist, it is common for people to assume without comment that we define $f(x_0)$ as the limit. – almagest May 3 '16 at 18:31
• what is your textbook ? – KonKan May 3 '16 at 18:44
• @KonKan - Calculus by Anton (5th ed.) – user239753 May 3 '16 at 18:53
• @almagest - unduly? This might be an obvious assumption for some, but not for me. The very fact that my professor dismissed it says that this is not trivial, and at least deserves a mention. – user239753 May 3 '16 at 19:02
• @user239753: i'm a bit confused: I'm searching in your book (it happens to have a copy of the 10th edition, available right in front of me) but i cannot find the quote you are mentioning. I am actually looking at Ch.10, par.10.1, p.692-705. The example you are mentioning is example 6, p.697. However, the authors simply mention that $t=0$ is a singular point. I cannot find the limit computation you are mentioning. Can you indicate the exact page ? – KonKan May 3 '16 at 19:21
Notice that both your curves are algebraic curves, of equations $x^3 - y^2 = 0$ and $(x^2+y^2-1)^2-4((x-1)^2+y^2)=0$ respectively.
We say that the line $ax + by + c = 0$ is tangent at the point $(x_0, y_0)$ to the curve given by $F(x,y) = 0$ if and only if $(x_0, y_0)$ is a multiple root of the system $\begin{cases} F(x,y) = 0 \\ ax + by + c = 0 \end{cases}$ (this is the definition that was originally used by algebraic geometers).
In your case, the points are $(0,0)$ in the first case and $(1, 0)$ in the second, and the line to be checked is $y=0$.
Plugging $y = 0$ into $x^3 - y^2 = 0$ gives $x^3 = 0$, which indeed has $x=0$ as a triple root, therefore $y=0$ is tangent to $x^3 - y^2 = 0$ at $(0,0)$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
Plugging $y = 0$ into $(x^2+y^2-1)^2-4((x-1)^2+y^2)=0$ gives $(x^2-1)^2 - 4(x-1)^2 = 0$, or equivalently $(x-1)^2 ((x+1)^2 - 4) = 0$, or again $(x-1)^3 (x+3) = 0$, which indeed has $x=1$ as a triple root (the root $-3$ being simple, meaning that at the point $(-3, 0)$ the line $y=0$ intersects the curve as a secant), therefore $y=0$ is tangent to $(x^2+y^2-1)^2-4((x-1)^2+y^2)=0$ at $(1,0)$.
Since the bounty giver is still unsure, let us follow Wikipedia and compute the intersection number in the first case. Wikipedia gives several methods, one of them is to consider the ideal generated by $y^2 - x^3$ and by $y$ in $\Bbb R[[x,y]]$ (the ring of formal series in $x$ and $y$) and compute the dimension of the quotient vector space $\Bbb R [[x,y]] / (x^3-y^2, y)$.
In the quotient space, both $y$ and $x^3 - y^2$ will become $0$, which implies that $x^3$ also becomes $0$. Therefore, the only powers of $x$ and $y$ that survive in the quotient set are $x^0 = y^0 = 1$, and $x$ and $x^2$ - a total of $3$ linearly independent powers, so $3$ will be the intersection number of $y=0$ and $x^3-y^2$ at $(0,0)$. Since everything $\ge 2$ means tangency, this shows that the line $y=0$ is tangent to $x^3-y^2$ at $(0,0)$.
The same thing could be done with what Wikipedia denotes by $I_{(0,0)}$, letting $P = y$ and $Q = x^3 - y^2$. Applying the properties that you see on that page (the numbers above equal signs are the Wikipedia properties that I apply),
$$I_{(0,0)} (y, x^3-y^2) \overset 6 = I_{(0,0)} (y, x^3) \overset 5 = I_{(0,0)}(x,y) + I_{(0,0)}(x,y) + I_{(0,0)}(x,y) \overset 4 = 1 + 1 + 1 = 3 .$$
The same computations could be done for the second example, it is just that they are more tedious. First, let us translate the curve such that the cusp moves from $(1,0)$ to $(0,0)$ (because, for simplicity, Wikipedia's formulae are given only for $(0,0)$). To do this we shall make the change of variable $x = u + 1$, which will lead to $(u^2 +2u +y^2)^2 -4(u^2+y^2)$. Next, | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
$$I_{(0,0)} ((u^2 +2u +y^2)^2 -4(u^2+y^2), y) \overset 6 = I_{(0,0)} (u^4 + 4u^3, y) = I_{(0,0)} (u^3 (u+4), y) \overset 5 = I_{(0,0)} (u^3, y) + \\ I_{(0,0)} (u+4, y) = I_{(0,0)} (u, y) + I_{(0,0)} (u, y) + I_{(0,0)} (u, y) + I_{(0,0)} (u+4, y) \overset {3, 4} = 1+1+1+0 = 3 .$$
Again, we obtain an intersection number $\ge 2$, which means tangency.
What others have correctly stated is that the two plane curves given in the problem are not differentiable submanifolds of $\Bbb R^2$ at the singular points under discussion, therefore they do not fit into the framework of diferential geometry, therefore we may not speak of their tangent spaces at the singular points as defined in differential geometry (a proof that an almost identical curve cannot be a smooth submanifold can be found here). Counterintuitively, though, they do have tangent lines! There is no contradiction, the thing is that we use two meanings for "being tangent" that are not synonymous: one comes from differential geometry ("tangent space"), and it doesn't apply here, the other from algebraic geometry ("intersection number"), and it does apply here. In the latter framework, we may speak about "a given line being tangent (or not) to a curve in a point" without speaking of "the tangent space at that curve in that point".
$y=0$ is tangent to those curves at the specified points. Those curves do not have nicely defined tangent spaces at those points. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
• @user239753: Try these two: "Elementary Differential Geometry" by A.N. Pressley, and "Differential Geometry of Curves and Surfaces" by M.P. do Carmo. One last word: differential geometry in general is interested only in those spaces that are endowed with regular parametrizations (because one wants them to be invertible, with their inverses called "local charts"). Most theorems about parametrized curves assume the parametrization to be regular. – Alex M. Apr 28 '16 at 20:24
• @AlexM. Because this is all about subtile nuances: You wrote, the cardiod would be a manifold, because the defining function $F$ is smooth. Aren't you applying the regular value theorem (which is a close relative to the implicite function theorem) here, which means 0 needs to be a regular value for $F$? (Anyway: great answer!) – hase_olaf Apr 28 '16 at 21:31
• @AlexM. - thank you for your refined answer. A bit stupid question - what does "multiple root" mean? It has something to do with algebraic multiplicity? – user239753 May 3 '16 at 19:27
• @user239753: Yes, exactly. We say that $a$ is a root of order $k$ of $P$ (where $P$ is a polynomial) if and only if $(x-a)^k \mid P$ and $(x-a)^{k+1} \nmid P$. The analogue for algebraic curves is the concept of "intersection multiplicity". – Alex M. May 3 '16 at 19:41
• @AlexM: I have to confess .. I am the ignorant who downvoted your hard work ;) but give me a moment to explain. your answer (especially after your edit) seems valid in my eyes and you've obviously put hard work in it ! I give you credit for that. However, I feel it falls outside the spirit and the OP's question: it is a delicate question on a subtle point of parametric differentiation (from the calculus viewpoint) while you certainly view the situation from the algebraic/differential geometric eye. This is also why i rolled back your retagging. – KonKan May 5 '16 at 23:29 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
In order to find the tangent at some special point you should not try to compute the limit of $y'$ but the actual limit of secant directions at that point. Therefore in your first example you get $$m_+:=\lim_{t\to0+}{y(t)-y(0)\over x(t)-x(0)}=\lim_{t\to0+}{t^3\over t^2}=0\ ,$$ and similarly $m_-=0$. In your second example you have $${y(t)-y(0)\over x(t)-x(0)}={2\sin t-\sin(2t)-0\over 2\cos t-\cos(2t)-1}={2\sin t(1-\cos t)\over2\cos t(1-\cos t)}=\tan t\qquad(t\ne0)\ ,$$ and therefore $$m_+=m_-=\lim_{t\to0}{y(t)-y(0)\over x(t)-x(0)}=0\ .$$
You are referring to two different things here..
For the semi-cubical parabola curve $y=x^{3/2}$ there is horizontal tangent at the cusp y=0 or t=0.
For cardoid, depending on the cusp contact point chosen, slope of cusp tangent varies, look at all cusps of epicycloids:
EDIT 1:
Since it is passing through infinite curvature which is rate of change of tangent inclination, the slope is changing very fast and undefined.
It can be also seen at the point $(1,0)$ Changing the multiple angle
$$x=2\cos t - \cos (n t), y=2\sin t - \sin( n t)$$
has the effect of influencing curvature. It changes from (positive for circle) to negative for looped case, via the present central cardoid case of infinite curvature.
The direction of tangent is vertical, indeterminate and vertical respectively | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
The direction of tangent is vertical, indeterminate and vertical respectively
• In both cases $\lim_{t\to 0} \frac{dy}{dx}=0$ yet $\frac{dy}{dx}\Big |_{t=0}$ is undefined. The question is whether in such a situation a horizontal tangent line exists. The textbook says it does, yet my professor claims that for a horizontal tangent line to exist the derivative must EXIST and be equal to zero, that is we must have $\frac{dy}{dx}\Big |_{t=0}=0$. – user239753 Apr 25 '16 at 6:53
• please read my comment again. I'm talking about the value of the derivative which does NOT exist. There is a difference between the limit (which indeed can be found with L'Hospital) and the actual value. – user239753 Apr 25 '16 at 7:28
• Note that you should not stop hunting for the L'Hospital limit if the first order evaluation fails. Do not conclude that it is undefined. At the cusp we are dealing with second orders and so limit of $f''(t)/g^{''}(t)$ should be next evaluated. – Narasimham Apr 25 '16 at 7:31
• unfortunately, you do not understand me. Here $dy/dx \neq 0$ even though $\lim_{t\to 0} \frac{dy}{dx}=0$. Do you know there is a difference between limit and value of the function? Take $$f(x)=\left\{\begin{matrix} 0 \text{ if } x\neq0\\ 1 \text{ if } x=0 \end{matrix}\right.$$. Here $$\lim_{x\to0}f(x)=0$$ yet $f(0)\neq 0$. The same goes here. $\lim_{t\to 0} \frac{dy}{dx}=0$ yet $\frac{dy}{dx} \Big |_{t=0}\neq 0$ ! Do you understand? – user239753 Apr 25 '16 at 7:37
• Ok, we resume after sometime,else moderator may indicate chat room. – Narasimham Apr 25 '16 at 8:34
the formula $$\frac{dy}{dx}=\frac{dy/dt}{dx/dt}$$ is valid for computing the derivative at points where $\frac{dx}{dt}\neq 0$. At singular points, i.e. points at which $$\frac{dy}{dt}=\frac{dx}{dt}=0$$ the above formula is not valid. However, this does not imply that the derivative does not exist; only that it is not computable by the above formula. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
In such cases, a straightforward application of the definition of derivative (as already done by user Christian Blatter in his answer) can provide the answer: $$\frac{dy}{dx}\bigg|_{(0,0)}=\lim_{t\to 0^+}\frac{y(t)-y(0)}{x(t)-x(0)}=\lim_{t\to 0^-}\frac{y(t)-y(0)}{x(t)-x(0)}=\lim_{x\to0^\pm}\frac{t^3}{t^2}=0$$ which shows that the derivative exists at $(0,0)$ and so does the tangent line at $(0,0)$, which is no other than the horizontal axis itself.
P.S.1: Note that, when confined to each branch seperately: $$y(x_0)=y(x(0))=y(0)=0, \ \ x_0=x(0)=0 \\ y(x)=y(x(t))=y(t)=t^3, \ \ x=x(t)=t^2$$ So, on each one of the functions $y(x)=x^{3/2}$, $y(x)=−x^{3/2}$ i.e. on each one of the branches of the graph below, the following rates of change are identified: $$\frac{y\big(x(t)\big)−y(x_0)}{x(t)−x_0}=\frac{y(t)−y(0)}{x(t)−x(0)}$$ On the other hand, since $x=t^2\neq 0$ when $t\neq 0$ it should be clear that $$t\to 0\Leftrightarrow x\to 0$$ At this point, it remains to invoke a classical proposition on the limit of a composite function, claiming that:
Let the real functions $f,g$, for which $lim_{x\rightarrow x_0}g(x)=g_0\in \mathbb{R}$ and $lim_{g\rightarrow g_0}f(g)=l\in \mathbb{R}$.
If, furthermore $g(x)\neq g_0$ "close to $x_0$" (i.e. in some interval $(a,x_0))$, then $$\lim_{x\rightarrow x_0}f\big(g(x)\big)=\lim_{g\rightarrow g_0}f(g)=l$$
Seting $f(x):=\frac{y(x)−y(0)}{x−0}$ and $g(x):=x(t)$ and applying the proposition we get that: $$\lim_{t\to 0}\frac{y(t)−y(0)}{x(t)−x(0)}\equiv \lim_{t\to 0}\frac{y\big(x(t)\big)−y(0)}{x(t)−x(0)}=\lim_{x\to 0}\frac{y(x)−y(0)}{x−0}=\frac{dy}{dx}\bigg|_0$$ (where the far left term is computed using side limits: for the upper branch $t>0$ thus $t\to0\Leftrightarrow t\to0^+$ while for the lower branch $t<0$ thus $t\to0\Leftrightarrow t\to0^-$). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
P.S.2: Regarding your final question: I do not believe that the existence of the limit is a sufficient condition, because generally, a differentiable function at $x_0$ need not have a continuous derivative at $x_0$: In other words, there may well be a situation at which: $\lim_{x\to x_0}f'(x)\neq f'(x_0)$.
However, this is not the case for the semicubical parabola, as we can see from its graph
which is probably what the author of your textbook had in his mind. He computes the limit of the derivative just as if we can imagine the tangent "slipping" accross either of the branches to "continuously" become horizontal. In my opinion, he implicitly uses the assumption that the derivative of the semicubical parabola is a continuous function; and he probably does that, based on the shape of the graph. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
• Intuitively I understand. But in the definition of the derivative we use $\frac{y(x)-y(x_0)}{x-x_0}$ and not $\frac{y(t)-y(0)}{x(t)-x(0)}$. That is, we must find $y(x)$ first. Otherwise, can you prove rigorously that it works with $t$? – user239753 May 4 '16 at 7:11
• Please read carefully: There is nothing intuitive here. (Only the idea described in your textbook seems intuitive). When confined to each branch seperately: $$y(x_0)=y(x(0))=y(0), \ \ y(x)=y(x(t))=y(t) \\ x_0=x(0), \ \ x=x(t)$$ So, on each one of the functions $y=x^{3/2}$, $y=-x^{3/2}$ i.e. on each of the branches of the above graph, the rates of change you are writing are identified: $$\frac{y(x)-y(x_0)}{x-x_0}=\frac{y(t)-y(0)}{x(t)-x(0)}$$ On the other hand, since $x=t^2$ it should be clear that $$t\to0\Leftrightarrow x\to0$$ – KonKan May 4 '16 at 12:20
• i've added the above comment to the post – KonKan May 4 '16 at 12:51
• It should be $y(x(t))=(t^2)^3=t^6$, no? (I know that in this case it doesn't change the limit, but still). Thank you. P.S. - Also, I don't understand why somebody downvotes the answers here. – user239753 May 4 '16 at 14:28
• actually, for $t>0$: $$y(x(t))=\pm (x(t))^{3/2}=\pm (t^2)^{3/2}=\pm t^3$$ So, for $t\in (-\infty, +\infty)$: $$y(t)=t^3$$ – KonKan May 4 '16 at 19:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.861543233657836,
"lm_q2_score": 0.8791467785920306,
"openwebmath_perplexity": 237.691814541783,
"openwebmath_score": 0.8502720594406128,
"tags": null,
"url": "https://math.stackexchange.com/questions/1756921/horizontal-tangent-line-of-a-parametric-curve"
} |
Six dice, six different figures (model problem)
I am thinking about the same problem as posted here: Probability of All Distinct Faces When Six Dice Are Rolled.
If one rolls six dice, what is the probability of attaining six different figures. I do understand the solution but wondered why it is necessary to assume that the dice are distinguishable. If I assume they are not then I have exactly one desired result and
$$\binom{6 + 6 - 1}{6} = \binom{11}{6} = 462$$
possible results.
But I get a different probability in this case which leads me to the assumption that it is not working this way. But why exactly is that?
You have used a correct Stars and Bars argument to show that there are $462$ ways to distribute $6$ objects in $6$ boxes.
However, if we assume that the dice are fair, and do not influence each other, then these $462$ possibilities are not all equally likely.
Let us look at a much smaller example, two identical coins. There are $3$ ways to distribute these into $2$ boxes. However, in this case it is fairly clear that the probability of two heads is $\frac{1}{4}$ and not $\frac{1}{3}$. For whether the coins are distinguishable or not, it should make no difference to the probability if we toss the coins sequentially and not simultaneously. And sequential tossing tells us the probability is $\frac{1}{2}\cdot\frac{1}{2}$.
Roughly speaking, an extreme Stars and Bars case, such as all balls in the third box, has smaller probability than any specific more "even" distribution.
Remark: To see more informally that a probability model based on distinguishable dice is appropriate, assume that otherwise indistinguishable dice are made different by writing IDs on them with invisible ink. The writing should not affect the probability of events that do not involve the IDs, such as all six numbers being obtained.
There are $6!$ combinations of six different numbers, and there are $6^6$ combinations of six rolls. The probability is then: $$p = \frac{6!}{6^6}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765587105447,
"lm_q1q2_score": 0.861543225377001,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 290.8475455576934,
"openwebmath_score": 0.7690107822418213,
"tags": null,
"url": "https://math.stackexchange.com/questions/818160/six-dice-six-different-figures-model-problem"
} |
• Yes, I know that. I was wondering why my way of thinking is wrong. Why can't I just record which numbers came up whithout recording from which dice it came? – Cyianor Jun 2 '14 at 14:03
• My guess would be you need to account for the fact all orders are the same, i.e. $123456$ is the same as $654321$ – Alex Jun 2 '14 at 14:10
• You mean I might not be able to apply Laplacian probability, i.e. p = good cases / total cases? – Cyianor Jun 2 '14 at 14:12
• Yes you are: here $6!$ is 'good cases' and $6^6$ are 'total cases' – Alex Jun 2 '14 at 14:13
• I meant in the case of my description above. If I say the dice are indistinguishable then the elements of my probability space have different probabilities and Laplacian probability is not applicable – Cyianor Jun 2 '14 at 14:17 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765587105447,
"lm_q1q2_score": 0.861543225377001,
"lm_q2_score": 0.8791467690927439,
"openwebmath_perplexity": 290.8475455576934,
"openwebmath_score": 0.7690107822418213,
"tags": null,
"url": "https://math.stackexchange.com/questions/818160/six-dice-six-different-figures-model-problem"
} |
# What is the least amount of straight cuts that should be made to get squares from a rectangle?
The problem is as follows:
Rachel has a rectangular piece of cloth which measures $$2$$ meters large and $$0.2$$ meters wide. She is to use a guillotin which can only makes cuts of $$60$$ cm of maximum in length. Another constrain in this guillotin is that it can only cut one layer of this cloth. Using this information, how many straight cuts minimum can Rachel make in order to get from such fabric $$10$$ square pieces of $$20\,cm$$ from each side?.
The alternatives given in my book are as follows:
$$\begin{array}{ll} 1.&\textrm{3 cuts}\\ 2.&\textrm{1 cut}\\ 3.&\textrm{2 cuts}\\ 4.&\textrm{4 cuts}\\ \end{array}$$
I'm not sure how to solve this question regarding cuts. But I believe that a way to reduce the number of cuts will require to fold the piece. But in this case this seems not to be possible because there is a condition in the problem which is forbidding to do such approach.
My initial approach was to make the necessary cuts to make some sort of grid which could I guess reduce the number of cuts but 10 is not a perfect square. Therefore what sort of logic should be here?.
I've went in circles for long on this question so I will really appreciate someone could give me a hand with this.
Therefore what should be the way to go here?. Can someone help me here please?. I'm confused.
• I think the question allows folding, but a guillotin cut cannot be through multiple layers. – peterwhy Mar 3 at 2:28
• I brute forced a 4 cut solution. If this is the answer, there must be a proof as to why this is the minimum required. – Andrew Chin Mar 3 at 2:33
To cut the strip of cloth, it only takes 9 cuts of 20 cm, and each cut of the guillotin cuts through 60 cm at most, so at least 3 cuts are necessary.
Number the cuts $$1$$ to $$9$$ sequentially, and the resultant squares $$0$$ to $$9$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.8615432212457315,
"lm_q2_score": 0.8791467659263148,
"openwebmath_perplexity": 605.4960783845211,
"openwebmath_score": 0.6420024633407593,
"tags": null,
"url": "https://math.stackexchange.com/questions/4046626/what-is-the-least-amount-of-straight-cuts-that-should-be-made-to-get-squares-fro"
} |
Number the cuts $$1$$ to $$9$$ sequentially, and the resultant squares $$0$$ to $$9$$.
Align cut $$1$$ under the guillotin, then fold two right angled triangles on the strip around cuts $$2$$ and $$3$$ so that the strip goes back under the guillotin, and align cut $$4$$ under the guillotin next to cut $$1$$.
(Fold twice like (B) in this random image found in Google: )
Do the same thing to align cut $$7$$ under the guillotin. With cut $$1, 4, 7$$ all aligned side by side, one guillotin cut of 60 cm would do all the 3 20-cm cuts.
Now squares 1-3, squares 4-6, squares 7-9 are on separated pieces of cloth, and they can be aligned freely to make the remaining 6 cloth-cuts in 2 guillotin cuts.
The optimal answer is 3 guillotin cuts. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765575409524,
"lm_q1q2_score": 0.8615432212457315,
"lm_q2_score": 0.8791467659263148,
"openwebmath_perplexity": 605.4960783845211,
"openwebmath_score": 0.6420024633407593,
"tags": null,
"url": "https://math.stackexchange.com/questions/4046626/what-is-the-least-amount-of-straight-cuts-that-should-be-made-to-get-squares-fro"
} |
# How can I find integers which satisfy $\frac{150+n}{15+n}=m$?
Here are some facts about myself:
1. In 2017, I was $$15$$ years old.
2. Canada, my country, was $$150$$ years old.
When will be the next time that my country's age will be a multiple of mine?
I've toned this down to a function. With $$n$$ being the number of years before this will happen and $$m$$ being any integer,
$$\frac{150+n}{15+n}=m$$
How would you find $$n$$?
• For extra credit, consider that Canada turned 150 on July 1, 2017. If your birthday is after that date, 14+n is also a valid denominator, as you will be both age 14 and age 15 during the 12 months that Canada is 150 years old. Likewise, if your 15th birthday is before that date, 16+n is a valid denominator, since you will be 15 when Canada turns 150, but turn 16 before Canada turns 151. – Nuclear Wang Dec 12 '18 at 4:51
• (1) Avoid using "interesting" in the title; (2) describe the problem in the title, not just your opinion and its topic. – Asaf Karagila Dec 12 '18 at 11:19
You want $$\frac{150+n}{15+n}=m$$, and clearing denominators gives us $$150+n=(15+n)m.$$ Subtracting $$15+n$$ from both sides give us $$135=(15+n)(m-1).$$ Now you are looking for the smallest $$n>1$$ for which such an $$m$$ exists, so the smallest $$n>1$$ for which $$15+n$$ divides $$135$$.
• Love it, thank you! Is 120 the only $n$ that exists for such a case? (Because $135\over270$ $=$ $1\over2$)? – Raymo111 Dec 11 '18 at 23:21
• What's wrong with $n=12$? The other solutions are $n=30$ and $n=120$. – Servaes Dec 11 '18 at 23:46
• Oh shoot, I mistakenly read your answer as $n+15=135$, my bad! Also, upvote if you think this question that I thought of was interesting, it's a real-life example of an age problem. – Raymo111 Dec 11 '18 at 23:48
First thing I would do is say that Canada is $$135$$ years older than you.
That gives you a simpler
$$\frac {135+n}{n} = k\\ \frac {135}{n} = k-1\\$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193215,
"lm_q1q2_score": 0.8615432176011385,
"lm_q2_score": 0.8791467580102418,
"openwebmath_perplexity": 319.9692723453792,
"openwebmath_score": 0.6882489919662476,
"tags": null,
"url": "https://math.stackexchange.com/questions/3035983/how-can-i-find-integers-which-satisfy-frac150n15n-m"
} |
That gives you a simpler
$$\frac {135+n}{n} = k\\ \frac {135}{n} = k-1\\$$
It will happen every time your age is a factor of $$135.$$ It last happened when you were $$15.$$ It will next happen when you are $$27$$
• Do Canadians live past age 135? – richard1941 Dec 21 '18 at 16:51
• Almost never. But with advancements in medical technology, that may change. – Doug M Dec 21 '18 at 17:00
We want the smallest positive integer $$n$$ such that there is some (positive) integer $$k$$ such that $$\frac{150+n}{15+n}=k.$$ Note that $$k=1$$ can never work, so we can assume $$k-1\neq0.$$ Now we rearrange the above equation: multiplying both sides by $$15+n,$$ we get $$150+n=15k+nk;$$ now rearrange and factorize to get $$15(10-k)=(k-1)n;$$ and now divide both sides by $$k-1,$$ to get $$n=\frac{15(10-k)}{k-1}.$$ Since we want the smallest positive integer $$n,$$ we can just try values of $$k\in\{2,3,\ldots,9\},$$ starting from the largest and working our way down (because the function of $$k$$ on the right-hand side is decreasing in this range), until we arrive at an integer value of $$n.$$* When $$k=9,$$ $$8$$ or $$7$$ we get non-integer values of $$n;$$ when $$k=6$$ we find $$n=15\times4/5=12.$$
So last year, $$n$$ was $$0,$$ and the ratio of Canada's age to your age was $$k=150/15=10;$$ and $$11$$ years from now, $$n$$ will be $$12,$$ and the ratio of Canada's age to your age will be $$k=162/27=6.$$
*Incidentally, it is not obvious in advance that we will ever get an integer value of $$n;$$ if this were the case then the problem would simply have no answer. As it happens, the problem does have answers, namely $$(n,k)\in\{(0,10),(12,6),(30,4),(120,2)\}.$$
Alternatively:
$$\frac {150 + n}{15 + n} = \frac {150+ 10n}{15+n} +\frac {-9 n}{15+n}$$
$$=10 -\frac {9 n}{15+n}$$ (which is an integer for $$n=0$$ but when next?)
$$=10 - \frac {9n + 9*15}{15+n} + \frac {9*15}{15+n}=$$
$$=10 - 9 + \frac{3^3*5}{15+n}= 1 + \frac{3^3*5}{15+n}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193215,
"lm_q1q2_score": 0.8615432176011385,
"lm_q2_score": 0.8791467580102418,
"openwebmath_perplexity": 319.9692723453792,
"openwebmath_score": 0.6882489919662476,
"tags": null,
"url": "https://math.stackexchange.com/questions/3035983/how-can-i-find-integers-which-satisfy-frac150n15n-m"
} |
$$=10 - 9 + \frac{3^3*5}{15+n}= 1 + \frac{3^3*5}{15+n}$$
which is an integer if $$15+n$$ is one of the factors of $$3^3*5$$.
And the factors of $$3^3*5$$ are $$1, 3,9, 27, 5,15, 45, 135$$.
So this will occur when $$n = -14,-12, -10, -6,0, 12,30, 120$$
When you are $$1, 3, 5, 9, 15, 27, 45, 135$$ and canada is $$136, 138, 140, 144, 150, 162, 180, 270$$ and canada is exactly $$136,46, 28, 16, 10,6,4, 2$$ as old as you are.
(Enjoy your $$45$$ birthday when your country annexes my country after we collapse from the thirty year aftermath of the unrecoverable mistakes of the last two years.)
That's a fun problem. It's nice to see other people like to think about these things.
• That's nice, that's the way I usually think about these problems too; but you can shorten the process by writing $\dfrac {150+n}{15+n} = \dfrac {15+n}{15+n} + \dfrac{135}{15+n}$ – Ovi Dec 12 '18 at 2:34
• Hmmm.... I'm not sure why I did it the way I did. I think somehow I briefly thought the obviousness that 15 goes directly into 150 made me briefly think that they were the coeficients and I started doing it that way and just continued. Obviously it'd be shorter and direct to do the coefficients. – fleablood Dec 12 '18 at 15:40
Note that if $$k \mid a$$ and $$k \mid b$$, then $$k \mid a - b$$. In this particular instance, we have $$15 + n \mid 15 + n$$ and $$15 + n \mid 150 + n$$, so $$15 + n \mid 135$$. In other words, we are looking for $$n+15$$ to be the next factor of $$135$$ which is larger than $$15$$. Can you continue from here?
Servaes answer is excellent but let me add few cents for those who can't really make out something from dual variables and other factors (I know some people have problem with such things).
There is also a brute force solution, requiring a bit of thinking and a bit of simple calculation (the larger is the $$n$$ i $$n$$-times larger the more difficult it becomes though so I really suggest you try understanding the accepted solution anyway). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193215,
"lm_q1q2_score": 0.8615432176011385,
"lm_q2_score": 0.8791467580102418,
"openwebmath_perplexity": 319.9692723453792,
"openwebmath_score": 0.6882489919662476,
"tags": null,
"url": "https://math.stackexchange.com/questions/3035983/how-can-i-find-integers-which-satisfy-frac150n15n-m"
} |
It's enough to check if there is an integer solution to equation $$\frac{150+n}{15+n}=9$$ If no, proceed with 8, 7 and so on. If you get to 2 and still have no anwser then the answer is never.
So a quick brute force check will like that: $$\frac{150+n}{15+n}=9$$ $$150+n=9\cdot(15+n)$$ $$150+n=135+9\cdot n$$ $$15=8\cdot n$$ $$n = \frac{15}{8}\notin\mathbb{Z}$$ So we continue with $$8$$ $$\frac{150+n}{15+n}=8$$ $$150+n=8\cdot(15+n)$$ $$150+n=120+8\cdot n$$ $$30=7\cdot n$$ $$n = \frac{30}{7}\notin\mathbb{Z}$$ You may continue from here. Note, a smart person using this method will notice some pattern that will make it even simpler to test (not requiring all the calculation, just a quick check that literally takes seconds) but I will not give a direct hint.
## Explanation
When you add the same number to both numerator and denominator of a fraction, the fraction decreases. In other words if you consider how the fraction of age of Canada and your age changes over time it will decrease.
On the other hand the fraction can never go to $$1$$ (or below) since the numerator will always be obviously greater than denominator (in our case by 135).
In other words you have a finite set of possible resultant fractions (namely $$\{2,3,4,5,6,7,8,9\}$$) that are potentially the sought "next case". From those you're looking for the largest one, so test them one by one, starting with $$9$$ and going down until you have an integer result or your options are gone.
## Remarks | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193215,
"lm_q1q2_score": 0.8615432176011385,
"lm_q2_score": 0.8791467580102418,
"openwebmath_perplexity": 319.9692723453792,
"openwebmath_score": 0.6882489919662476,
"tags": null,
"url": "https://math.stackexchange.com/questions/3035983/how-can-i-find-integers-which-satisfy-frac150n15n-m"
} |
## Remarks
1. Once again - this is a brute force solution and should not be treated as preferred if you can understand using two variables. But if you can't, it's still doable.
2. If you notice the relationship I mention above, I guess even testing situation where the initial fraction is 100 could be done.
3. You may try solving an interesting opposite question - when was the last time when such situation occurred (i.e. Canadas age was a multiply of your age). If you think it over well, you may use both Servaes and my approaches to that as well. Especially try rationalising that my approach will again have a finite and easily predictable number of tests to be performed.
4. A food for thoughts. Is there always a solution to the original question (with differently chosen ages)? Is there always a solution to the problem I state in remark 3?
5. Can you think of other related questions that will use similar approach (either Servaes's elegant one or mine brute force) to find a solution?
In general questions like this, where
$$\frac{x+n}{y+n}=m$$
$$m$$ will be an integer smaller than $$\frac{x}{y}$$. Since there are finitely many integers less than $$\frac{x}{y}$$, each value of $$m$$ can be checked one by one. Not all values will generally give an integer $$n$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9799765622193215,
"lm_q1q2_score": 0.8615432176011385,
"lm_q2_score": 0.8791467580102418,
"openwebmath_perplexity": 319.9692723453792,
"openwebmath_score": 0.6882489919662476,
"tags": null,
"url": "https://math.stackexchange.com/questions/3035983/how-can-i-find-integers-which-satisfy-frac150n15n-m"
} |
GMAT Question of the Day - Daily to your Mailbox; hard ones only
It is currently 24 May 2019, 10:11
### GMAT Club Daily Prep
#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.
Customized
for You
we will pick new questions that match your level based on your Timer History
Track
every week, we’ll send you an estimated GMAT score based on your performance
Practice
Pays
we will pick new questions that match your level based on your Timer History
# When traveling at a constant speed of 32 miles per hour, a certain mot
Author Message
TAGS:
### Hide Tags
Director
Status: I don't stop when I'm Tired,I stop when I'm done
Joined: 11 May 2014
Posts: 531
GPA: 2.81
When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
14 Jun 2016, 13:46
5
26
00:00
Difficulty:
5% (low)
Question Stats:
81% (01:10) correct 19% (01:17) wrong based on 1426 sessions
### HideShow timer Statistics
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
_________________
Md. Abdur Rakib
Please Press +1 Kudos,If it helps
Sentence Correction-Collection of Ron Purewal's "elliptical construction/analogies" for SC Challenges
Magoosh GMAT Instructor
Joined: 28 Dec 2011
Posts: 4485
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
14 Jun 2016, 17:07
6
2
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel? | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
Dear AbdurRakib,
I'm happy to respond.
We have 32 mi/gal, and 24 gal/hr, and we want mile/gal. We need to divide (mi/hr) by (gal/hr) to get (mi/gal). Thus
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal
In that fraction, cancel the common factor of 8.
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal = 4/3 mi/gal.
Does this make sense?
Mike
_________________
Mike McGarry
Magoosh Test Prep
Education is not the filling of a pail, but the lighting of a fire. — William Butler Yeats (1865 – 1939)
##### General Discussion
Intern
Joined: 01 May 2015
Posts: 39
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
15 Jun 2016, 00:46
1
1
Distance travelled = 32 miles
Fel consumed = 24 gallons
So, 24 gallons lets motorboat travel 32 miles
So, miles traveled per gallon of fuel = 32/24 = 4/3
Senior Manager
Joined: 24 Nov 2015
Posts: 497
Location: United States (LA)
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
15 Jun 2016, 02:59
2
In 1 hour the motorboat travels 32 miles
In travelling that 32 miles the motorboat uses 24 gallons of fuel in 1 hour
so basically we divide $$\frac{miles}{hr}$$ by $$\frac{gallons}{hr}$$ to get $$\frac{miles}{gallons}$$
$$\frac{32}{24}$$ =$$\frac{4}{3}$$ $$\frac{miles}{gallons}$$
Manager
Joined: 17 Aug 2015
Posts: 99
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
### Show Tags
13 Aug 2016, 11:05
1
One way to solve this:--
The speed is 32 miles / hour. The fuel consumption is 24 gallons / hour. So in every hour two things are happening:-
The boat has covered 32 miles
The boat has consumed 24 gallons
What is the miles /gallon --> 32/24 => 4/3miles/gal. The choice is D
Target Test Prep Representative
Affiliations: Target Test Prep
Joined: 04 Mar 2011
Posts: 2823
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
02 Dec 2016, 06:54
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
We are given that a motorboat has a rate of 24 gallons per hour while traveling at a speed of 32 miles per hour. We must determine the boat’s fuel consumption measured in miles traveled per gallon of fuel.
Since the motorboat consumes 24 gallons when traveling 32 miles, the rate is 32/24 = 4/3.
_________________
# Jeffrey Miller
Jeff@TargetTestPrep.com
122 Reviews
5-star rated online GMAT quant
self study course
See why Target Test Prep is the top rated GMAT quant course on GMAT Club. Read Our Reviews
If you find one of my posts helpful, please take a moment to click on the "Kudos" button.
VP
Joined: 09 Mar 2016
Posts: 1283
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
23 Feb 2018, 12:17
mikemcgarry wrote:
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$ | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
Dear AbdurRakib,
I'm happy to respond.
We have 32 mi/gal, and 24 gal/hr, and we want mile/gal. We need to divide (mi/hr) by (gal/hr) to get (mi/gal). Thus
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal
In that fraction, cancel the common factor of 8.
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal = 4/3 mi/gal.
Does this make sense?
Mike
hello there mikemcgarry, how are you ? you know what i dont understand, why isnt the answer B ? wouldnt it be logically correct to divide gallons by miles ?
CEO
Joined: 12 Sep 2015
Posts: 3727
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
03 Apr 2018, 10:01
1
Top Contributor
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
Let's see what happens after ONE HOUR of traveling.
In ONE hour, the boat will travel 32 miles and will use 24 gallons of fuel
So, the fuel consumption rate is 32 miles per 24 gallons
Or we can write: fuel consumption rate = 32/24 miles/gallon
32/24 = 4/3
So, the fuel consumption rate = 4/3 miles per gallon
Cheers,
Brent
_________________
Test confidently with gmatprepnow.com
Intern
Joined: 01 May 2017
Posts: 34
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
05 Apr 2018, 03:43
SVP
Status: It's near - I can see.
Joined: 13 Apr 2013
Posts: 1674
Location: India
GPA: 3.01
WE: Engineering (Real Estate)
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
### Show Tags
14 Apr 2018, 22:53
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
It's (D)
$$\frac{Miles - traveled}{gallon-fuel}$$ = $$\frac{32}{24}$$ = $$\frac{4}{3}$$
_________________
"Do not watch clock; Do what it does. KEEP GOING."
Intern
Joined: 19 Jan 2018
Posts: 49
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
25 Jan 2019, 18:10
mikemcgarry wrote:
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
Dear AbdurRakib,
I'm happy to respond.
We have 32 mi/gal, and 24 gal/hr, and we want mile/gal. We need to divide (mi/hr) by (gal/hr) to get (mi/gal). Thus
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal
In that fraction, cancel the common factor of 8.
fuel consumption = (32 mi/gal)/(24 gal/hr) = 32/24 mi/gal = 4/3 mi/gal.
Does this make sense?
Mike
Was checking through the solutions to see other solutions to this problem, isn't the units in red suppose to be in "hours", instead of gallons?
Intern
Joined: 13 Mar 2016
Posts: 23
Location: India
Concentration: General Management, Entrepreneurship
WE: General Management (Energy and Utilities)
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
11 May 2019, 05:59
Speed of boat 32M/H and its consumption is 24 Gallon per hour. | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
### Show Tags
11 May 2019, 05:59
Speed of boat 32M/H and its consumption is 24 Gallon per hour.
Therefore boat consumes 24Gallon for every 32 Miles.
or for every Gallaon boat travels 32/24 miles
i.e 4/3 miles per gallon
AnsD
Manager
Joined: 25 Sep 2018
Posts: 59
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink]
### Show Tags
11 May 2019, 22:55
AbdurRakib wrote:
When traveling at a constant speed of 32 miles per hour, a certain motorboat consumes 24 gallons of fuel per hour. What is the fuel consumption of this boat at this speed measured in miles traveled per gallon of fuel?
A) $$\frac{2}{3}$$
B) $$\frac{3}{4}$$
C) $$\frac{4}{5}$$
D) $$\frac{4}{3}$$
E) $$\frac{3}{2}$$
In 24 gallons boat travel =36
In 1 " " " =36/24=4/3
Posted from my mobile device
Re: When traveling at a constant speed of 32 miles per hour, a certain mot [#permalink] 11 May 2019, 22:55
Display posts from previous: Sort by | {
"domain": "gmatclub.com",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 1,
"lm_q1q2_score": 0.8615382094310357,
"lm_q2_score": 0.8615382094310357,
"openwebmath_perplexity": 3168.0071012631397,
"openwebmath_score": 0.8632282614707947,
"tags": null,
"url": "https://gmatclub.com/forum/when-traveling-at-a-constant-speed-of-32-miles-per-hour-a-certain-mot-220272.html"
} |
Probability Theory
alakaboom1
New member
An automobile insurance company classifies drivers into 3 classes: class A, class B, and class C. The percentage of drivers in each class is: class A, 20%; class B, 65%; and class C, 15%. The probabilities that a driver in one of these classes will have an accident within one year are given by 0.01, 0.02, and 0.03 respectively. After purchasing an insurance policy, a driver has an accident within the first year. What is the probability that the driver is of class A?
I think that it's 1/6, because you'd do 0.01/0.06, since you already know that the driver has had the accident, but I'm not too sure. One other possibility that I'm considering would be 0.2 * 0.01, but I feel like this doesn't account for the fact that we are assuming that the driver is already in an accident...
galactus
Super Moderator
Staff member
You are looking for the probability the driver is from class A given they have an accident:
$$\displaystyle P(\text{class A}|\text{accident})$$
You can make a chart. Assume a number of drivers that is easy to work with. Say, 1000
Or, use Bayes Theorem. Do you know it?.
soroban
Elite Member
Hello, alakaboom1!
Here is a very primitive approach . . .
An automobile insurance company classifies drivers into 3 classes: class A, class B, and class C.
The percentage of drivers in each class is: class A, 20%; class B, 65%; and class C, 15%.
The probabilities that a driver in one of these classes will have an accident within one year are given by 0.01, 0.02, and 0.03 respectively.
After purchasing an insurance policy, a driver has an accident within the first year.
What is the probability that the driver is of class A?
Suppose there are 10,000 policyholders.
$$\displaystyle \text{20\% are class A drivers: }\:20\%\times 10,\!000 \,=\,2000$$
. . $$\displaystyle \text{1\% of them will have an accident: }\:1\% \times 2000 \,=\,20$$ | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105314577313,
"lm_q1q2_score": 0.8615236298367881,
"lm_q2_score": 0.8824278772763471,
"openwebmath_perplexity": 1124.6799546791592,
"openwebmath_score": 0.6028389930725098,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/probability-theory.69762/"
} |
$$\displaystyle \text{65\% are class B drivers: }\:65\% \times 10,\!000 \,=\,6500$$
. . $$\displaystyle \text{2\% of them will have an accident: }\:2\% \times 6500 \,=\,130$$
$$\displaystyle \text{15\% are class C drivers: }\:15\% \times 10,\!000 \,=\,1500$$
. . $$\displaystyle \text{3\% of them will have an accident: }\:3\% \times 1500 \,=\,45$$
$$\displaystyle \text{There is a total of: }\:20 + 130 + 45 \,=\,195\text{ accidents}$$
. . $$\displaystyle \text{of which 20 are class A drivers.}$$
$$\displaystyle \text{Therefore: }\(\text{class A}\,|\,\text{accident}) \;=\;\frac{20}{195} \;=\;\frac{4}{39}$$
galactus
Super Moderator
Staff member
That 'primitive
approach is a nice explanation.
Here is all I was getting at:
$$\displaystyle \frac{(.01)(.2)}{(.01)(.2)+(.02)(.65)+(.03)(.15)}=\frac{4}{39}\approx .1025$$
When confronted with a 'probability of something given something' problem, you can make a chart.
Assume 1000 policyholders.
$$\displaystyle \begin{array}{c|c|c|c|c}\text{}&A&B&C&\text{total}\\ \hline\text{has accidents}&2&13&4.5&19.5 \\ \hline\text{no accident}&198&637&145.5&980.5 \\ \hline\text{total}&200&650&150&1000\end{array}$$
Now, you can answer any problem they throw at you. In this case, we want
"Probability the driver is class A given they have an accident".
Go down the class A column and across the 'has accident' row. $$\displaystyle \frac{2}{19.5}=\frac{4}{39}$$
Say they asked for "probability the driver is from class C given they did not have an accident?"
Go down the C column and across the 'no accident' row and get $$\displaystyle \frac{145.5}{980.5}=\frac{291}{1961}\approx .148$$
and so on..............
alakaboom1
New member
Thanks a lot guys!
Out of curiosity, is this formula you guys mentioned known as Bayes Theorem? I've definitely used the formula before, but never knew it by name. | {
"domain": "freemathhelp.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105314577313,
"lm_q1q2_score": 0.8615236298367881,
"lm_q2_score": 0.8824278772763471,
"openwebmath_perplexity": 1124.6799546791592,
"openwebmath_score": 0.6028389930725098,
"tags": null,
"url": "https://www.freemathhelp.com/forum/threads/probability-theory.69762/"
} |
# Cosets of a group
One sentence from Amstrong's Group and Symmetry wrote the following to prove a group of order 6 is isomorphic to $\mathbf{Z}_6$:
The right cosets $\langle x\rangle$, $\langle x\rangle y$ give 6 elements $e$, $x$, $x^2$, $y$, $xy$, $x^2y$ which fill out $G$.
Where $x$ is of order $3$ and $y$ is of order 2. $x$, $y$ are both elements of $G$.
My confusion:
How can one guarantee that the right coset $\langle x\rangle$ and $\langle x\rangle y$ can fill out $G$? Because $\langle x\rangle$ and $\langle x\rangle y$ have no intersections? I am not sure about the properties of cosets. I also don't know if this is related to the fact that $|\langle x\rangle|=5$ and is precisely half the elements of $G$ and thus its left coset $y\langle x\rangle$ and right coset $\langle x\rangle y$ is exactly the same?
I don't know if you can understand my question. The question here actually arises from my vague understanding of "cosets". So everytime this term occurs I feel a steady uncertainty.
-
You may want to reread the question yourself and see where one or more letters can be added. – user21436 Mar 28 '12 at 1:36
@KannappanSampath: An artifact of using < and > in text; parser thought they were mark-up. – Arturo Magidin Mar 28 '12 at 2:10
This is specifically page 70 (and end of 69). – anon Mar 28 '12 at 2:12
Exactly. It is from page 70. Sorry for the disorganized order, I will check that next time before I submit. And thanks again to @ArturoMagidin for the edition. – Jinji Mar 28 '12 at 2:26
For more on cosets, see this answer. – Arturo Magidin Mar 28 '12 at 2:45
Let $H=\{e,x,x^2\}$ be the subgroup generated by $x$. The right cosets of $H$ are the sets of the form $Hz = \{hz\mid h\in G\}$ for fixed $z\in G$.
The right cosets of $H$ are known to form a partition of the set $G$; that is: any two cosets are either identical or disjoint, and their union is all of $G$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105290452637,
"lm_q1q2_score": 0.8615236201611797,
"lm_q2_score": 0.8824278695464501,
"openwebmath_perplexity": 126.55874800901462,
"openwebmath_score": 0.9734762907028198,
"tags": null,
"url": "http://math.stackexchange.com/questions/125289/cosets-of-a-group"
} |
Moreover, $Hz = Hw$ if and only if $zw^{-1}\in H$. This can be verified because $z\in Hz$ (obtained as $ez$), so there must exist some $h\in H$ such that $z = hw$. Hence $zw^{-1}=h\in H$, proving that if $Hz=Hw$, then $zw^{-1}\in H$. Conversely, if $zw^{-1}\in H$, then $z = (zw^{-1})w \in Hw$, so $Hz\cap Hw\neq\varnothing$; since right cosets are either disjoint or identical, and $Hz$ and $Hw$ are not disjoint, then they are identical.
Now, since $y$ is of order $2$, it is not in $H$ (every element of $H$ is either of order $3$ or of order $1$). That means that the cosets $He = H$ and $Hy=\{ey, xy, x^2y\}$ are distinct, hence they are disjoint. Since they are disjoint, $H$ and $Hy$, together, account for $6$ elements of $G$. Since $G$ has exactly $6$ elements by assumption, those are all the elements of $G$. That is: $$G = H\cup Hy = \{e,x,x^2\}\cup\{y,xy, x^2y\} = \{e,x,x^2,y,xy,x^2y\}.$$
The same is true for left cosets: left cosets of $H$ partition $G$, so any two left cosets are either disjoint or identical. Also, $zH = wH$ if and only if $z^{-1}w\in H$ (I'll leave the proof to you). That means that the two left cosets of $H$ are $eH=H$ and $yH$, since $yH\neq H$, so $yH\cap H=\varnothing$. Since $G$ has $6$ elements, $H$ has $3$, and $yH$ has another three, then $$G = H\cup yH = \{e,x,x^2\} \cup \{y, yx, yx^2\}.$$ Also, since $H\cap Hy=\varnothing$, then $Hy = G\setminus H$; similarly, $yH=G\setminus H$. So in fact, $Hy=yH$ as sets. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105290452637,
"lm_q1q2_score": 0.8615236201611797,
"lm_q2_score": 0.8824278695464501,
"openwebmath_perplexity": 126.55874800901462,
"openwebmath_score": 0.9734762907028198,
"tags": null,
"url": "http://math.stackexchange.com/questions/125289/cosets-of-a-group"
} |
-
Thanks! Does the number of right cosets relate to the order of H? |G|/|H|=the number of right cosets? – Jinji Mar 28 '12 at 2:24
@Jinji: The number of cosets is, by definition, the index of $H$ in $G$, denoted $[G:H]$. Since the cosets all have the same size, namely $H$, and partition $G$, it follows that $|G|=|H|[G:H]$ (in the sense of cardinalities); in fact, if $K\lt H\lt G$, then $[G:K]=[G:H][H:K]$ in the sense of cardinalities. So in the special case in which $|G|$ is finite, it follows from $|G|=|H|[G:H]$ that $[G:H]=|G|/|H|$. – Arturo Magidin Mar 28 '12 at 2:37 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105290452637,
"lm_q1q2_score": 0.8615236201611797,
"lm_q2_score": 0.8824278695464501,
"openwebmath_perplexity": 126.55874800901462,
"openwebmath_score": 0.9734762907028198,
"tags": null,
"url": "http://math.stackexchange.com/questions/125289/cosets-of-a-group"
} |
# Proving that an integer is even if and only if it is not odd
There is this question, but the definition of "even" and "odd" that I am using uses integers instead of just natural numbers; i.e.,
• An integer $n$ is even iff there is some integer $k$ such that $n=2k$.
• An integer $n$ is odd iff there is some integer $k$ such that $n=2k+1$.
Here is what I have so far:
First we show that an integer $n$ is even or odd. We first use induction on the positive integers. For the base case, $1=2\cdot0+1$ so we are done. Now suppose inductively that $n$ is even or odd. If $n$ is even, then $n=2k$ for some $k$ so that $n+1=2k+1$ (odd). If $n$ is odd, then $n=2k+1$ for some $k$ so that $n+1=2(k+1)$ (even). This closes the induction, so every $n\in\mathbf{Z}^+$ is even or odd.
Now we show every $n\in\mathbf{Z}^-$ is even or odd. Let $n\in\mathbf{Z}^-$. Then $n=-k$ for some $k\in\mathbf{Z}$ (I think this follows immediately from most definitions of the integers.). Suppose $k$ is even. Then $k=2j$ for some $j$ so that $n=-k=-2j=2(-j)$ (even). Now suppose $k$ is odd. Then $k=2j+1$ for some $j$ so that $n=-k=-(2j+1)=-2j-1=-2j-1+1-1=-2j-2+1=2(-j-1)+1$ (odd).
For $0$, note that $0=2\cdot0$ (even).
Now we show that $n\in\mathbf{Z}$ cannot be both even and odd. Suppose for the sake of contradiction that $n\in\mathbf{Z}$ is both even and odd. Then there are integers $k,j$ such that $n=2k=2j+1$. This implies that $2(k-j)=1$ (like in the referenced question). So we must show that $1$ cannot be even in order to complete the proof.
This is where I am having trouble. I know that if I let $f:\mathbf{Z}\to\mathbf{Z};x\mapsto2x$ be a function, then $f$ is increasing so since $f(0)=0$ and $f(1)=2$ and $0<1<2$, there is no integer $m$ such that $f(m)=1$. But this seems complicated so I was wondering if there was an easier way to do this.
So my real question is: how can I show that $1$ is not even?
(This is not homework.) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683517080176,
"lm_q1q2_score": 0.8615026654826816,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 101.67144073735894,
"openwebmath_score": 0.9559515714645386,
"tags": null,
"url": "http://math.stackexchange.com/questions/166756/proving-that-an-integer-is-even-if-and-only-if-it-is-not-odd"
} |
So my real question is: how can I show that $1$ is not even?
(This is not homework.)
-
$f(m)=1 \implies 2m=1 \implies 2=\frac {1}{m}$ which is not a integer for any $m \in \mathbb Z$ – Theorem Jul 4 '12 at 20:57
@russell11, I think you meant a function $f:\mathbb{Z}^+ \to \mathbb{Z}^+$ (or whatever the appropriate notation is for 'nonnegative'). Otherwise you and Theorem converge on the right idea; suppose $1=2m$ for some integer $m$. $m>0$ comes immediately, as twice a non-positive integer is non-positive. $m<1$ comes from the function being increasing. – Eugene Shvarts Jul 4 '12 at 21:02
To show that $1$ is not even:
I assume you can prove or accept that $a \cdot 0 = 0$ for all $a \in \mathbb{Z}$, the product of a positive and negative number is negative, and $2a > a$ when $a >0$.
If $1$ is even, then there must exists $a < 1$ such that $2a = 1$. However, the only $a < 1$, which is an integer, is $0$ and clearly $2 \cdot 0 = 0$. So $1$ can not be be written as $2 \cdot a$ for any $a \in \mathbb{Z}$. $1$ is odd.
-
Do you want to say, "So $1$ cannot be written as $2\cdot a$ for any $a\in\mathbb{Z}$" in the end? – Paul Jul 4 '12 at 21:13
@Paul Yes. Added the missing "not". – William Jul 4 '12 at 21:21
Hint $\$ Your induction step uses $\rm\:n\,$ even $\rm\,\Rightarrow\: n\!+\!1\:$ odd, and $\rm\:n\,$ odd $\rm\,\Rightarrow\:n\!+\!1\:$ even. The converses are both true, e.g. $\rm\,n\!+\!1\,$ odd $\,\Rightarrow$ $\rm\,n\!+\!1 = 2k\!+\!1\,$ $\Rightarrow$ $\rm\,n = 2k,\,$ since $\rm\,j\!+\!1 = k\!+\!1\,$ $\Rightarrow$ $\rm\,j = k\,$ by Peano axioms. Thus if $\rm\:n\!+\!1\,$ is both even and odd then so too is $\rm\,n.\,$ So, contrapositively, in your induction step you can lift "$\rm n\:$ is not both even and odd" from $\rm\,n\,$ up to $\rm\,n\!+\!1\,$ and hence prove by induction that every natural is even or odd, but not both (this is essentially my hint in the linked answer). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683517080176,
"lm_q1q2_score": 0.8615026654826816,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 101.67144073735894,
"openwebmath_score": 0.9559515714645386,
"tags": null,
"url": "http://math.stackexchange.com/questions/166756/proving-that-an-integer-is-even-if-and-only-if-it-is-not-odd"
} |
-
Thanks, this is really neat. I didn't understand your hint in the other question, but now I do. – russell11 Jul 5 '12 at 1:18 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9875683517080176,
"lm_q1q2_score": 0.8615026654826816,
"lm_q2_score": 0.8723473813156294,
"openwebmath_perplexity": 101.67144073735894,
"openwebmath_score": 0.9559515714645386,
"tags": null,
"url": "http://math.stackexchange.com/questions/166756/proving-that-an-integer-is-even-if-and-only-if-it-is-not-odd"
} |
Consider sorting $$n$$ numbers stored in array $$A$$ by first finding the smallest element of $$A$$ and exchanging it with the element in $$A[1]$$. Then find the second smallest element of $$A$$, and exchange it with $$A[2]$$. Continue in this manner for the first $$n-1$$ elements of $$A$$. Write pseudocode for this algorithm, which is known as selection sort. What loop invariant does this algorithm maintain? Why does it need to run for only the first $$n-1$$ elements, rather than for all $$n$$ elements? Give the best-case and worst-case running times of selection sort in $$\Theta$$-notation.
#### Pseudocode
$$\textsc {Selection-Sort }(A)$$\begin{aligned}1& \quad \textbf {for }i=1\textbf { to }A.length-1 \\2& \quad \qquad minIndex=i \\3& \quad \qquad \textbf {for }j=i+1\textbf { to }A.length \\4& \quad \qquad \qquad \textbf {if }A[j]<A[minIndex]\text { and }j\not=minIndex \\5& \quad \qquad \qquad \qquad minIndex=j \\6& \quad \qquad \text {swap }A[i]\text { with }A[minIndex] \\\end{aligned}
A python implementation of the above pseudocode is shared at end of the page, you can verify the workings for yourself.
#### Loop Invariant
At the start of the each iteration of the outer for loop of lines 1-6, the subarray $$A[1..i - 1]$$ consists of $$i - 1$$ smallest elements of $$A$$, sorted in increasing order.
#### Why only first n - 1 elements
The algorithm needs to run for only the first $$n - 1$$ elements, rather than for all $$n$$ elements because the last iteration will compare $$A[n]$$ with the minimum element in $$A[1 .. n - 1]$$ in line 4 and swap them if necessary. So, there is no need to continue the algorithm for all the way to the last element.
#### Running Times | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987568346219724,
"lm_q1q2_score": 0.8615026410302643,
"lm_q2_score": 0.8723473614033683,
"openwebmath_perplexity": 699.9159241570951,
"openwebmath_score": 0.9634503722190857,
"tags": null,
"url": "https://atekihcan.github.io/CLRS/02/E02.02-02/"
} |
#### Running Times
For both the best-case (sorted array) and worst-case (reverse sorted array), the algorithm will anyway take one element at a time and compare it with all the other elements. In other words, each of the $$n$$ elements will be compared with rest of the $$n - 1$$ elements. So, the running times for both scenario will be $$\Theta(n^2)$$.
The above reasoning should be sufficient to understand or convey why the runtime would be $$\Theta(n^2)$$. However, for the sake of completeness, an exhaustive mathematical proof is given below.
#### Runtime Analysis
Let’s assume the inner for loop in line 3-5 is executed for $$t_j$$ times for $$j = 2, 3, \ldots, n$$, where $$n = A.length$$. Now note that, line 5 will be executed less than $$t_j - 1$$ times in the average case, but it’ll still be of the order of $$n$$.
For the sake of simplicity let’s assume the worst case, i.e. a reverse sorted array, when it’ll be executed exactly $$t_j - 1$$ times. Note, this assumption is only for that particular line, which is not going to change our overall analysis, it will only make our calculation easier.
We can now calculate the cost and times for individual lines of the pseudocode as follows …
Line Cost Times
1 $$c_1$$ $$n$$
2 $$c_2$$ $$n - 1$$
3 $$c_3$$ $$\sum_{j = 2}^n t_j$$
4 $$c_4$$ $$\sum_{j = 2}^n (t_j - 1)$$
5 $$c_5$$ $$\sum_{j = 2}^n (t_j - 1)$$
6 $$c_6$$ $$n - 1$$
Now, for any arbitrary value of $$j$$, the inner for loop (line 3-5) compares the previously computed minimum value with all elements in the subarray $$A[j..n]$$. So the inner for loop executes $$n - j + 1$$ times, i.e. $$t_j = (n - j + 1)$$ for $$j = 2, 3, \ldots, n$$. So, $$t_2 = n - 1, t_3 = n - 2, \ldots t_n = 1$$. We can calculate the summations for line 3-5 as follows … | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987568346219724,
"lm_q1q2_score": 0.8615026410302643,
"lm_q2_score": 0.8723473614033683,
"openwebmath_perplexity": 699.9159241570951,
"openwebmath_score": 0.9634503722190857,
"tags": null,
"url": "https://atekihcan.github.io/CLRS/02/E02.02-02/"
} |
\begin{aligned} \sum_{j = 2}^n t_j & = (n - 1) + (n - 2) + \cdots + 1 \\ & = \frac {n(n - 1)} 2 \\ \\ \sum_{j = 2}^n (t_j - 1) & = \sum_{j = 2}^n t_j - \sum_{j = 2}^n 1 \\ & = \frac {n(n - 1)} 2 - (n - 1) \\ & = \frac {(n - 3)(n - 2)} 2 \end{aligned}
Therefore, we can calculate the running time as follows..
$T(n) = c_1(n - 1) + (c_2 + c_6)n + c_3 \frac {n(n - 1)} 2 + (c_4 + c_5) \frac {(n - 1)(n - 2)} 2$
For best-case scenario, as the array is already sorted, line #5 will not be executed ever. So, $$c_5 = 0$$. Even with that (and without that for worst-case) the expression of $$T(n)$$ will be reduced to the form $$an^2 + bn + c$$, i.e. the algorithm will run at $$\Theta(n^2)$$ time.
#### Python Code
# Selection Sort def SelectionSort(A): for i in range(len(A)): minIndex = i for j in range(i + 1, len(A)): if A[j] < A[minIndex] and j != minIndex: minIndex = j A[i], A[minIndex] = A[minIndex], A[i] # Test import random num_failed = 0 total_tests = 100 for i in range(total_tests): length = random.randint(2, 50) lst = [random.randint(0, 100) for _ in range(length)] SelectionSort(lst) # Check if list has been sorted for i in range(len(lst) - 1): if lst[i] > lst[i + 1]: num_failed += 1 print(f"Test #{i:<2}: List is not sorted") break if num_failed > 0: break if num_failed > 0: print(f"\nFailed") else: print(f"Passed {total_tests}/{total_tests} tests") | {
"domain": "github.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987568346219724,
"lm_q1q2_score": 0.8615026410302643,
"lm_q2_score": 0.8723473614033683,
"openwebmath_perplexity": 699.9159241570951,
"openwebmath_score": 0.9634503722190857,
"tags": null,
"url": "https://atekihcan.github.io/CLRS/02/E02.02-02/"
} |
# Math Help - [SOLVED] Vectors Question...
1. ## [SOLVED] Vectors Question...
Question:
In the diagram OABCDEFG is a cube which the lenght of each edge is $2$ units. Unit vectors i, j, k are parallel to $\vec{OA}$, $\vec{OC}$, $\vec{OD}$ respectively. The mid-points of $AB$ and $FG$ are $M$ and $N$ respectively.
(i) Express each of the vectors $\vec{ON}$ and $\vec{MG}$ in terms of i, j and k. [3 Marks]
(ii) Find the angle between the directions of $\vec{ON}$ and $\vec{MG}$, are correct to the nearest $0.1^o$.
[4 Marks]
Attempt:
(i) $\vec{ON} = i + 2j + 2k$
$\vec{MG} = -2i + j + 2k$
are they right? and will I be rewarded 3 marks for showing no steps? becuase I don't there are any steps needed!
(ii) Need Help!
2. Your answers to (i) seem right. As for how many marks you'll get: I don't know, I'm not an examiner. I can't see what working you COULD show, really. I know I wouldn't. That's just my opinion though.
(ii)
In maths, there's a fun thing called the scalar product (the "dot product" they call it at school).
It's defined like this:
a DOT b = |a| * |b| * cos(angle)
where a and b are vectors, |a| means the magnitude of a, and angle is the angle between the two of them.
So you can rearrange that to get
cos(angle) = [ a DOT b ] / [ |a| * |b| ]
So now all you need to know is what a DOT b is:
I'll show that with an example:
(1, 2, 3) DOT (4, 5, 6) = 1 x 4 + 2 x 5 + 3 x 6 = 4 + 10 + 18 = 32
All you do is multiply the two "firsts" (x-components) together, then the two seconds, then the thirds and add them all up.
Work that out, work out the two magnitudes, substitute it all in and do an inverse cosine and you're away.
Enjoy.
3. Originally Posted by Fedex
Your answers to (i) seem right. As for how many marks you'll get: I don't know, I'm not an examiner. I can't see what working you COULD show, really. I know I wouldn't. That's just my opinion though.
(ii) | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.8614953992625254,
"lm_q2_score": 0.8887587875995482,
"openwebmath_perplexity": 736.8438186149863,
"openwebmath_score": 0.7882995009422302,
"tags": null,
"url": "http://mathhelpforum.com/calculus/35956-solved-vectors-question.html"
} |
(ii)
In maths, there's a fun thing called the scalar product (the "dot product" they call it at school).
It's defined like this:
a DOT b = |a| * |b| * cos(angle)
where a and b are vectors, |a| means the magnitude of a, and angle is the angle between the two of them.
So you can rearrange that to get
cos(angle) = [ a DOT b ] / [ |a| * |b| ]
So now all you need to know is what a DOT b is:
I'll show that with an example:
(1, 2, 3) DOT (4, 5, 6) = 1 x 4 + 2 x 5 + 3 x 6 = 4 + 10 + 18 = 32
All you do is multiply the two "firsts" (x-components) together, then the two seconds, then the thirds and add them all up.
Work that out, work out the two magnitudes, substitute it all in and do an inverse cosine and you're away.
Enjoy.
Thanks for the explanation and the example
$a.b = \left|a\right|\times \left|b\right| \times \cos\theta$
$\theta = \cos^{-1} \left( \frac{a.b}{\left|a\right| \times \left|b\right|} \right)$
$a.b = \left(\begin{array}{c}1\\2\\2\end{array}\right) \times \left(\begin{array}{c}-2\\1\\2\end{array}\right) = (1 \times -2) + (2 \times 1) + (2 \times 2) = 4$
$\left|a\right|\times \left|b\right| = \left(\begin{array}{c}1\\2\\2\end{array}\right) \times \left(\begin{array}{c}2\\1\\2\end{array}\right) = (1 \times 2) + (2 \times 1) + (2 \times 2) = 8$
$\theta = \cos^{-1} = \frac{4}{8}$
$\theta = 60^o$
Are my steps correct? and is the answer correct?
4. Okay, a few mistakes there.
You wrote your two column vectors like this:
You SHOULD write them with a dot in between them. When you put a multiply sign in between them it means something else (in fact, a cross represents the "cross" or "vector" product of them - that's something else entirely!)
So write it with a dot, yeah?
Also, when you worked out the magnitude of the vectors, you seem to have gone wrong.
The MAGNITUDE of a vector (its "length") is just a number, not a vector.
For for the vector a = (1,2,3)
|a| = SQUARE ROOT OF [ 1^2 + 2^2 + 3^2 ] | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.8614953992625254,
"lm_q2_score": 0.8887587875995482,
"openwebmath_perplexity": 736.8438186149863,
"openwebmath_score": 0.7882995009422302,
"tags": null,
"url": "http://mathhelpforum.com/calculus/35956-solved-vectors-question.html"
} |
For for the vector a = (1,2,3)
|a| = SQUARE ROOT OF [ 1^2 + 2^2 + 3^2 ]
Are you happy with that? It comes straight from a 3D version of Pythagoras' Theorem.
5. Originally Posted by Fedex
Okay, a few mistakes there.
You wrote your two column vectors like this:
You SHOULD write them with a dot in between them. When you put a multiply sign in between them it means something else (in fact, a cross represents the "cross" or "vector" product of them - that's something else entirely!)
So write it with a dot, yeah?
Also, when you worked out the magnitude of the vectors, you seem to have gone wrong.
The MAGNITUDE of a vector (its "length") is just a number, not a vector.
For for the vector a = (1,2,3)
|a| = SQUARE ROOT OF [ 1^2 + 2^2 + 3^2 ]
Are you happy with that? It comes straight from a 3D version of Pythagoras' Theorem.
Thanks again
$a.b = \left|a\right|.\left|b\right|.\cos\theta$
$\theta = \cos^{-1} \left( \frac{a.b}{\left|a\right|.\left|b\right|} \right)$
$a.b = \left(\begin{array}{c}1\\2\\2\end{array}\right). \left(\begin{array}{c}-2\\1\\2\end{array}\right) = (1 \times -2) + (2 \times 1) + (2 \times 2) = 4$
$\left|a\right| = \sqrt{(1^2 + 2^2 + 2^2} = 3$
$\left|b\right| = \sqrt{(-2^2 + 1^2 + 2^2)} = 1$
$\left|a\right|.\left|b\right| = 3\times1 = 3$
$\theta = \cos^{-1} \frac{4}{3}$ (Invalid)
Where did I go wrong?
6. What's (-2)^2 again?
Check out that part of your working for the magnitude of b.
I think that's your problem :-)
7. Originally Posted by Fedex
What's (-2)^2 again?
Check out that part of your working for the magnitude of b.
I think that's your problem :-)
$a.b = \left|a\right|.\left|b\right|.\cos\theta$
$\theta = \cos^{-1} \left( \frac{a.b}{\left|a\right|.\left|b\right|} \right)$
$a.b = \left(\begin{array}{c}1\\2\\2\end{array}\right). \left(\begin{array}{c}-2\\1\\2\end{array}\right) = (1 \times -2) + (2 \times 1) + (2 \times 2) = 4$
$\left|a\right| = \sqrt{(1^2 + 2^2 + 2^2} = 3$
$\left|b\right| = \sqrt{(-2^2 + 1^2 + 2^2)} = 3$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.8614953992625254,
"lm_q2_score": 0.8887587875995482,
"openwebmath_perplexity": 736.8438186149863,
"openwebmath_score": 0.7882995009422302,
"tags": null,
"url": "http://mathhelpforum.com/calculus/35956-solved-vectors-question.html"
} |
$\left|a\right| = \sqrt{(1^2 + 2^2 + 2^2} = 3$
$\left|b\right| = \sqrt{(-2^2 + 1^2 + 2^2)} = 3$
$\left|a\right|.\left|b\right| = 3\times3 = 9$
$\theta = \cos^{-1} \frac{4}{9} = 63.6^o$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9693241982893259,
"lm_q1q2_score": 0.8614953992625254,
"lm_q2_score": 0.8887587875995482,
"openwebmath_perplexity": 736.8438186149863,
"openwebmath_score": 0.7882995009422302,
"tags": null,
"url": "http://mathhelpforum.com/calculus/35956-solved-vectors-question.html"
} |
Enable contrast version
# Tutor profile: Yannic V.
Inactive
Yannic V.
Ph.D. in mathematics
Tutor Satisfaction Guarantee
## Questions
### Subject:Discrete Math
TutorMe
Question:
Find a formula for the sum $\sum_{k=0}^n k \binom{n}{k},$ by means of the binomial theorem. What can be deduced about the average number of elements in a random subset of $\{1,2, \hdots, n\}$?
Inactive
Yannic V.
Let $x,y \in \mathbb{R}$. Remember that the binomial theorem sates that $(x+y)^n = \sum_{k=0}^n \binom{n}{k}x^{k}y^{n-k},$ for all $n \in \mathbb{N}$. In particular, for $y=1$ we have $(x+1)^n=\sum_{k=0}^n \binom{n}{k}x^k.$ Considering $x$ as a variable, we differentiate both sides of the above equation to obtain $n(x+1)^{n-1}= \sum_{k=0}^n k\binom{n}{k}x^{k-1}.$ It remains to plug in $x=1$: $\sum_{k=0}^n k \binom{n}{k} = n2^{n-1}.$ The average number of elements in a random subset of $\{1,2, \hdots, n\}$ is thus $\frac{\sum_{k=0}^n k \binom{n}{k}}{\sum_{k=0}^n \binom{n}{k}} = \frac{n 2^{n-1}}{2^n}=\frac{n}{2}.$ This is not surprising, since the number of subsets of size $k$ is exactly the same as the number of subsets of size $n-k$, for any $k$.
### Subject:Calculus
TutorMe
Question:
Solve the integral $\displaystyle \int 3 \sec(2x-1)\tan(2x-1) \,dx$.
Inactive
Yannic V. | {
"domain": "tutorme.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109109053045,
"lm_q1q2_score": 0.8614654844665749,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 310.21218791461285,
"openwebmath_score": 0.9967986345291138,
"tags": null,
"url": "https://tutorme.com/tutors/411755/interview/"
} |
As the arguments of both functions in the integral are not single variables, we can start to consider a change of variable in order to just have one variable in the secant and tangent function. This can be made using the change of variable $$\label{cambio1} \left\lbrace\begin{array}{l} y = 2x-1 \\ dy = 2 \,dx \end{array}\right.$$ Notice that the derivative $dy$ is easy to obtain from the expression of the integral: $dx$ can be expressed in terms of $dy$ as $$\label{eq1} dx = \frac{dy}{2}.$$ Substituting the change of variable \eqref{cambio1} in the integral, we obtain \begin{align} \int 3 \sec(2x-1)\tan(2x-1)\, dx &= \int 3 \sec(y)\tan(y) \,\frac{dy}{2} \tag{\footnotesize by \eqref{cambio1} and \eqref{eq1}}\\ &= \frac{3}{2} \int \sec(y)\tan(y) \,dy. \label{da1} \end{align} We have now reduced our problem to a more simple integral. We want to integrate the expression $\sec(y)\tan(y)$, which is the derivative of\footnote{This comes from the following calculation: $(\sec(y))'= \left(\frac{1}{\cos(y)} \right)' = \frac{(0\cos(y))-1(-\sin(y))}{\cos(y)^2}= \frac{\sin(y)}{\cos(y)^2} = \frac{1}{\cos(y)}\frac{\sin(y)}{\cos(y)}=\sec(y)\tan(y).$ } the function $\sec(y)$. It is then appropriate to consider the following change of variable: $$\label{cambio2} \left\lbrace\begin{array}{l} u = \sec(y)\\ du = \sec(y)\tan(y) \,dy \end{array}\right.$$ We can now replace \eqref{cambio2} into the expression \eqref{da1}. Remark that \eqref{da1} just contain the derivative part of\footnote{This is not a problem. When doing a change of variable, the most important part is that the expression corresponding to the derivative of the change of basis appears in the integral (up to a scalar). } \eqref{cambio2}. Thus, we have: \begin{align} \int 3 \sec(2x-1)\tan(2x-1)\, dx &= \frac{3}{2} \int \sec(y)\tan(y) \,dy. \tag{\footnotesize{by \eqref{da1}}}\\ &= \frac{3}{2} \int du \tag{\footnotesize{by \eqref{cambio2}}}\\ &= \frac{3}{2}\, u + C, \label{da2} \end{align} where $C$ is a constant. Finally, we | {
"domain": "tutorme.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109109053045,
"lm_q1q2_score": 0.8614654844665749,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 310.21218791461285,
"openwebmath_score": 0.9967986345291138,
"tags": null,
"url": "https://tutorme.com/tutors/411755/interview/"
} |
&= \frac{3}{2}\, u + C, \label{da2} \end{align} where $C$ is a constant. Finally, we just have to substitute $u$ by its value in terms of $y$ (given by \eqref{cambio2}), and replace $y$ by its value in terms of $x$ (given by \eqref{cambio1}): \begin{align} \int 3 \sec(2x-1)\tan(2x-1)\, dx &= \frac{3}{2}\, u + C \tag{\footnotesize{by \eqref{da2}}}\\ &= \frac{3}{2}\sec(y) + C \tag{\footnotesize{substitute $u=\sec(y)$}}\\ &= \frac{3}{2}\sec(2x-1) + C. \tag{\footnotesize{substitute $y=2x-1$}} \end{align} | {
"domain": "tutorme.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109109053045,
"lm_q1q2_score": 0.8614654844665749,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 310.21218791461285,
"openwebmath_score": 0.9967986345291138,
"tags": null,
"url": "https://tutorme.com/tutors/411755/interview/"
} |
### Subject:Algebra
TutorMe
Question:
If $G$ is a finite group, show that the number of elements in $G$ of order greater than $2$ must be even. In particular, prove that any group of even order must contain an element of order 2.
Inactive
Yannic V.
We will solve the question by a counting argument as follows. Let $X$ be the set of all elements of G with order greater than two. If $X = \emptyset$ then $|X|=0$ and we’re done. Suppose now that $X \neq \emptyset$. Since the orders of $g$ and $g^{-1}$ coincides for any $g \in G$, we have that $g \in X \Longleftrightarrow g^{-1} \in X.$ Moreover, if $g \in X$ then $g^2\neq e_G$. From here, $g \neq g^{-1}$. It follows that $X$ can be written as the disjoint union of two element sets of the form $\{g, g^{-1}\}$ {x,x−1}, and hence that $|X|$ is even. Suppose that $|G|$ is even. Since $e_G$ has order $1$, $e_G \notin X$. It follows that $G \setminus X \neq \emptyset$. So $0 < |G \setminus X|=|G|-|X|$. Since $|G|$ and $|X|$ are both even, it follows that $|G\setminus X|$ is a nonzero even integer, i.e. is at least 2. Thus, there is an $z \in G \setminus X$ such that $z \neq e_G$ . Since $X$ consists of all elements in $G$ of order greater than $2$, it must be the case that $|z|=2$.
## Contact tutor
Send a message explaining your
needs and Yannic will reply soon.
Contact Yannic
Start Lesson
## FAQs | {
"domain": "tutorme.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109109053045,
"lm_q1q2_score": 0.8614654844665749,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 310.21218791461285,
"openwebmath_score": 0.9967986345291138,
"tags": null,
"url": "https://tutorme.com/tutors/411755/interview/"
} |
Start Lesson
## FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.
BEST IN CLASS SINCE 2015
TutorMe homepage | {
"domain": "tutorme.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9895109109053045,
"lm_q1q2_score": 0.8614654844665749,
"lm_q2_score": 0.8705972566572503,
"openwebmath_perplexity": 310.21218791461285,
"openwebmath_score": 0.9967986345291138,
"tags": null,
"url": "https://tutorme.com/tutors/411755/interview/"
} |
# How to integrate $\int \frac{dx}{(1+x^2)^2}$?
I need to integrate this to finish an old STEP problem I'm doing, but I'm stuck here, at the very end:
$$\int_0^\infty \frac{dx}{(1+x^2)^2}$$
The result should be $\pi\over 4$ . I don't know how to approach this. *Somehow, this question doesn't seem to've been posted here ever (at least I couldn't find it).
Also, Wolfram tells me:
$$\int \frac{dx}{(1+x^2)^2} = \frac{1}{2}\left(\frac{x}{x^2+1}+\tan^{-1}x\right)+c$$
but I don't see how one can derive this without knowing the result beforehand.
Somehow, this question doesn't seem to've been posted here ever (at least I couldn't find it).
EDIT: If you're interested, the problem in question is: STEP II - problem 4 (year 2014).
• use $\frac 1{(1+x^2)^2 }=\frac 1{1+x^2} - \frac{x^2}{(1+x^2)^2}$ and do an integration by parts $\int \frac{x^2}{(1+x^2)^2} \, dx$ – abel Jun 2 '16 at 18:04
• I tried $x = \sinh(z)$ since $1+x^2 = \cosh^2(x)$ but I got stuck at $$\int \frac{1}{\cosh^3(z)} \, {\rm d}z$$ – ja72 Jun 2 '16 at 18:12
Use $x = \tan t$. Then $(1 + x^2)^2 = \sec^4 t$, and $\dfrac{dx}{dt} = \sec^2 t$, so the integral becomes \begin{align*} \int_0^{\pi/2} \cos^2 t \,\mathrm dt = \dfrac 1 2 \times \dfrac {\pi} 2 = \dfrac{\pi}{4}. \end{align*}
• Nice. Thanks. It's been a while and I forgot about trig substitions :( – I want to make games Jun 2 '16 at 18:08
For any $\alpha>0$, let: $$I(\alpha)= \int_{0}^{+\infty}\frac{dx}{\alpha^2+x^2} = \frac{\pi}{2\alpha}.$$ By differentiating both sides with respect to $\alpha$ we get: $$\int_{0}^{+\infty}\frac{2\alpha}{(\alpha^2+x^2)^2}\,dx = \frac{\pi}{2\alpha^2}$$ and by evaluating at $\alpha=1$: $$\int_{0}^{+\infty}\frac{dx}{(x^2+1)^2} = \color{red}{\frac{\pi}{4}}.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517450056273,
"lm_q1q2_score": 0.8614651313536267,
"lm_q2_score": 0.8807970904940926,
"openwebmath_perplexity": 581.3614977347157,
"openwebmath_score": 0.9595130681991577,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809993/how-to-integrate-int-fracdx1x22"
} |
• How do you get these expressions? – ja72 Jun 2 '16 at 18:07
• @ja72: What's obscure? I think my answer is pretty straightforward to follow. The technique is known as differentiation under the integral sign, or "Feynman's trick". – Jack D'Aurizio Jun 2 '16 at 18:08
• I'm sure that's common knowledge, but how (a very general idea would do) do you prove that differentiating an integral is the same as differentiating the thing that's integrated? – I want to make games Jun 2 '16 at 18:09
• @M.Vinay: thanks, I was just writing the same thing :) – Jack D'Aurizio Jun 2 '16 at 18:12
• @ja72: I assure you that my memorization skills are close to being awful (that is the main reason beyond my appraise for modern technology, that allow us to store tons of useful data in portable devices), but when it comes to mathematical practice, many things become natural. Practice makes perfect. – Jack D'Aurizio Jun 2 '16 at 18:20
Use $u=tan x$ $$(1+x^2)^2=(1+tan^2u)^2=(sec^2u)^2=sec^4u$$ $$dx=sec^2u du$$ The integral becomes $$\int{\frac{1}{sec^2u}du=\int{cos^2udu}}$$
• functions need to be upright characters. Use \sin instead of sin. Also the differential needs to be upright. Use {\rm d} instead of d. – ja72 Jun 2 '16 at 18:14
Add and subtract $x^2$ from the numerator, you get $\arctan$ on one hand and an $\int \frac{x^2}{(1 + x^2)^2}dx$, which you can do by parts ($u = x$ and $dv = \frac{x}{(1+x^2)^2}dx$)
$$\int_0^\infty\frac{1}{\left(1+x^2\right)^2}\space\text{d}x=\lim_{n\to\infty}\int_0^n\frac{1}{\left(1+x^2\right)^2}\space\text{d}x=$$
Substitute $x=\tan(u)$ and $\text{d}x=\sec^2(u)\space\text{d}u$.
So $\left(1+x^2\right)^2=\left(1+\tan^2(u)\right)^2=\sec^4(u)$ and $u=\arctan(x)$.
This gives a new lower bound $u=\arctan(0)=0$ and upper bound $u=\arctan(n)$:
$$\lim_{n\to\infty}\int_0^{\arctan(n)}\cos^2(u)\space\text{d}u=$$
Use:
$$\cos^2(x)=\frac{1+\cos(2u)}{2}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517450056273,
"lm_q1q2_score": 0.8614651313536267,
"lm_q2_score": 0.8807970904940926,
"openwebmath_perplexity": 581.3614977347157,
"openwebmath_score": 0.9595130681991577,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809993/how-to-integrate-int-fracdx1x22"
} |
Use:
$$\cos^2(x)=\frac{1+\cos(2u)}{2}$$
$$\frac{1}{2}\lim_{n\to\infty}\left[\int_0^{\arctan(n)}1\space\text{d}u+\int_0^{\arctan(n)}\cos(2u)\space\text{d}u\right]=$$
Substitute $s=2u$ and $\text{d}s=2\space\text{d}u$.
This gives a new lower bound $s=2\cdot0=0$ and upper bound $s=2\arctan(n)$:
$$\frac{1}{2}\lim_{n\to\infty}\left[\left[u\right]_0^{\arctan(n)}+\frac{1}{2}\int_0^{2\arctan(n)}\cos(s)\space\text{d}s\right]=$$ $$\frac{1}{2}\lim_{n\to\infty}\left[\left[u\right]_0^{\arctan(n)}+\frac{1}{2}\left[\sin(s)\right]_0^{2\arctan(n)}\right]=$$ $$\frac{1}{2}\lim_{n\to\infty}\left[\left(\arctan(n)-0\right)+\frac{\sin(2\arctan(n))-\sin(0)}{2}\right]=$$ $$\frac{1}{2}\lim_{n\to\infty}\left[\arctan(n)+\frac{\sin(2\arctan(n))}{2}\right]=\frac{1}{2}\cdot\frac{\pi}{2}=\frac{\pi}{4}$$
let $I_n=\int_{0}^{\infty}\frac{1}{(1+x^2)^n}dx$ then $$I_{n+1}=\frac{2n-1}{2n}I_n$$ we know $I_1=\int_{0}^{\infty}\frac{1}{1+x^2}dx=\frac{\pi}{2}$, so $$I_2=\frac{2(1)-1}{2(1)}I_1=\frac{\pi}{4}$$
• (+1) I see in you a future star of MSE. – Jack D'Aurizio Jun 2 '16 at 20:54
Here's a pretty solution. Notice that $$I=\int_{0}^{\infty}\frac{1}{(1+x^2)^2}dx=\frac{1}{2}\int_{-\infty}^{\infty}\frac{1}{(1+x^2)^2}dx=\frac{1}{2}\int_{\partial\Omega}\frac{1}{(1-iz)^2(1+iz)^2}dz$$ where $\Omega$ is the top part of the complex plane. Since $f(z)$ decays faster than $\frac{1}{z^2}$, $$I=\pi i \lim_{z \to i}\frac{d}{dz}\frac{(z-i)^2}{(1-iz)^2(1+iz)^2}=\frac{\pi}{4}$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517450056273,
"lm_q1q2_score": 0.8614651313536267,
"lm_q2_score": 0.8807970904940926,
"openwebmath_perplexity": 581.3614977347157,
"openwebmath_score": 0.9595130681991577,
"tags": null,
"url": "https://math.stackexchange.com/questions/1809993/how-to-integrate-int-fracdx1x22"
} |
# Estimating error when calculating $\pi^2$ with $8 + \frac{8}{3^2} + \frac{8}{5^2} + \frac{8}{7^2} + \cdots$
While answering a CodeReview question (Approximating constant $\pi^2$ to within error), I noticed that when calculating the sum $$8 + \dfrac{8}{3^2} + \dfrac{8}{5^2} + \dfrac{8}{7^2} + \dfrac{8}{9^2} + \cdots$$
and stopping at the smallest term larger than $\varepsilon$, the difference to $\pi^2$ seems very close to $\sqrt{2\varepsilon}$.
With $$n = \left\lfloor\frac{\sqrt{\frac{8}{\varepsilon}} - 1}{2} \right\rfloor,$$
it looks like:
$$\sum_{i=0}^n \frac{8}{(2i+1)^2} \approx \pi^2 - \sqrt{2\varepsilon}.$$
For example, with $\varepsilon = 10^{-10}$:
$n = 141421$
$\sum = 9.86959025 \dots$
$\pi^2 - \sum \approx 1.4142170*10^{-5}$
$(\pi^2 - \sum)^2 \approx 2.0000099*10^{-10} \approx 2\varepsilon$
I don't think it's a coincidence, but I don't know where to begin to link
$$\sum_{i=n+1}^\infty \frac{8}{(2i+1)^2}$$ to $\sqrt{2\varepsilon}$.
Wolfram Alpha expresses this sum in terms of a polygamma function but I don't know anything about it.
Is the approximation correct? Is there any simple way to prove it?
• The usual method of estimating the error in such series is the Euler-Maclaurin formula. – Lord Shark the Unknown Mar 8 '18 at 15:58
• I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. – GNUSupporter 8964民主女神 地下教會 Mar 15 '18 at 16:35
One has $${2\over (2k+1)^2}<{1\over 2k}-{1\over 2k+2}\ ,$$ and therefore (teleskoping sum!) $$0<\sum_{k=n}^\infty{2\over(2k+1)^2}<{1\over 2n}\ ,$$ or $$0<\sum_{k=n}^\infty{8\over(2k+1)^2}<{2\over n}\ .$$ Maybe this will bring you over the top. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544006,
"lm_q1q2_score": 0.8614503210108743,
"lm_q2_score": 0.8774767986961403,
"openwebmath_perplexity": 329.03580589035056,
"openwebmath_score": 0.8721043467521667,
"tags": null,
"url": "https://math.stackexchange.com/questions/2682525/estimating-error-when-calculating-pi2-with-8-frac832-frac852"
} |
• Thanks a lot. If I understand it correctly, we still need another inequality to prove that the sum isn't too far from $\frac{2}{n}$, right? – Eric Duminil Mar 8 '18 at 21:04
• Applying the same logic with ${1\over 2k+1}-{1\over 2k+3} < {2\over (2k+1)^2}$, we obtain $\frac{2}{n+1} < \sum < \frac{2}{n}$, right? That would be a pretty good approximation. – Eric Duminil Mar 9 '18 at 8:12
Recall from calculus the integral test:
$$\displaystyle\sum a(n)\text{ converges if and only if }\int a(x)\text{ converges}$$ where the sequence $a(n)=a_n>0$ and $a_n$ is decreasing, and the function $a(x)$ is continuous.
From the proof of this statement, we can deduce the inequality: if $\sum_{n=1}^\infty a_n=L$, then $$\left|L-\sum_{i=0}^n a_n\right|\leq\int_{n}^\infty a(x)\,dx,$$(see here for help with providing visual intuition as to why the inequality is true) where the notation $a(x)$ is used to represent $a_n$ with the $n$ replaced by $x$. Thus, performing the necessary calculations, we find
\begin{align*} \int_{n}^\infty\frac{8}{(2x+1)^2}\,dx&=\frac{4}{2n+1}\\ &\leq\frac{4}{\sqrt{\frac{8}\varepsilon}-1}\\ &=\frac{1}{\sqrt{\frac{1}{2\varepsilon}}-\frac14}\\ &=\frac{\sqrt{2\varepsilon}}{1-\frac{\sqrt{2\varepsilon}}{4}}\\ &\approx \sqrt{2\varepsilon},\end{align*} where I've taken $$n=\left\lfloor\frac{\sqrt{\frac{8}{\varepsilon}}-1}{2}\right\rfloor.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544006,
"lm_q1q2_score": 0.8614503210108743,
"lm_q2_score": 0.8774767986961403,
"openwebmath_perplexity": 329.03580589035056,
"openwebmath_score": 0.8721043467521667,
"tags": null,
"url": "https://math.stackexchange.com/questions/2682525/estimating-error-when-calculating-pi2-with-8-frac832-frac852"
} |
• This looks good, thanks. I'll try to do it again on a piece of paper and come back to comment/accept. – Eric Duminil Mar 8 '18 at 17:07
• Thanks, @EricDuminil. There was one place I had something like $\frac{1}{\sqrt{\frac{1}{2\varepsilon}}+1}$ where I had to use some algebra to simplify (hence I didn't want to type it, at least, not yet haha). – Clayton Mar 8 '18 at 17:15
• First, the integral test has hypotheses that you need to mention. And, although the estimate you give for the error is correct (under the same hypotheses!), I don't see how we can deduce that error estimate from the integral test itself. How does that go? – David C. Ullrich Mar 8 '18 at 17:20
• @DavidC.Ullrich: I suppose it is more from the proof of the integral test than the integral test itself, but the idea is that the sequence/function is positive and decreasing, so we can set it up so the integral is an overestimate (if you prefer to think in terms of Riemann sums, it is like using right endpoints for the estimate). – Clayton Mar 8 '18 at 17:33
• @DavidC.Ullrich: You're right about the test having hypotheses that I ought to mention. I knew I wouldn't have much time when I submitted the answer. At any rate, I'm at fault for not being explicit enough. I have about an hour now, so I'll provide more explanations. If you have any other suggestions, please let me know. – Clayton Mar 8 '18 at 17:36 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544006,
"lm_q1q2_score": 0.8614503210108743,
"lm_q2_score": 0.8774767986961403,
"openwebmath_perplexity": 329.03580589035056,
"openwebmath_score": 0.8721043467521667,
"tags": null,
"url": "https://math.stackexchange.com/questions/2682525/estimating-error-when-calculating-pi2-with-8-frac832-frac852"
} |
# Polynomial uniqueness proof
• Nov 6th 2012, 10:30 AM
Polynomial uniqueness proof
This problem is from my Gelfand's Algebra book.
Problem 164. Prove that a polynomial of degree not exceeding 2 is defined uniquely by three of its values.
This means that if $P(x)$ and $Q(x)$ are polynomials of degree not exceeding 2 and $P(x_1)=Q(x_1),P(x_2)=Q(x_2),P(x_3)=Q(x_3)$ for three different numbers $x_1,x_2,\text{ and } x_3,$ then the polynomials $P(x)$ and $Q(x)$ are equal.
I'm not very good at proofs, so I have questions. If I show that if $P(x_1)=Q(x_1),P(x_2)=Q(x_2),P(x_3)=Q(x_3)$ is true and $P(x)$ and $Q(x)$ are polynomials of degree not exceeding 2, then $P(x)$ and $Q(x)$ are equal, will it prove that a polynomial of degree not exceeding 2 is defined uniquely by three of its values?
Is this the way to go?
Let $V(x)=P(x)-Q(x)$, After that $V(x_1)=V(x_2)=V(x_3)=0$, because $P(x_1)=Q(x_1),P(x_2)=Q(x_2),P(x_3)=Q(x_3)$, so $x_1,x_2,x_3$ are roots of $V(x)$ which can't have more than two roots. Here I'm confused, I shouldn't have assumed that $P(x_1)=Q(x_1),P(x_2)=Q(x_2),P(x_3)=Q(x_3)$ was true, right?
• Nov 6th 2012, 11:11 AM
Deveno
Re: Polynomial uniqueness proof
actually, your proof is fine. a polynomial of degree n, cannot have more than n roots.
so you have proved that V(x) is NOT of degree 0,1, or 2. what's left?
• Nov 6th 2012, 11:17 AM
emakarov
Re: Polynomial uniqueness proof
I don't know what comes before this exercise in the book, but relying on the fact that a polynomial of degree n cannot have more than n roots seems to easy. It is possible that the real problem is to prove that fact.
• Nov 6th 2012, 11:18 AM
Re: Polynomial uniqueness proof
Quote:
Originally Posted by Deveno
actually, your proof is fine. a polynomial of degree n, cannot have more than n roots.
so you have proved that V(x) is NOT of degree 0,1, or 2. what's left?
Yes, but does that prove that polynomial of degree not exceeding 2 is defined uniquely by three of its values?
Quote: | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357189762611,
"lm_q1q2_score": 0.8614503142801606,
"lm_q2_score": 0.8774767970940975,
"openwebmath_perplexity": 365.06600855591074,
"openwebmath_score": 0.8998113870620728,
"tags": null,
"url": "http://mathhelpforum.com/algebra/206877-polynomial-uniqueness-proof-print.html"
} |
Quote:
Originally Posted by emakarov
I don't know what comes before this exercise in the book, but relying on the fact that a polynomial of degree n cannot have more than n roots seems to easy. It is possible that the real problem is to prove that fact.
Yes, I think that's right, I'm assuming too much and I don't really understand how I can prove that polynomial of degree not exceeding 2 is defined uniquely by three of its values.
• Nov 6th 2012, 11:40 AM
Deveno
Re: Polynomial uniqueness proof
Quote:
Originally Posted by emakarov
I don't know what comes before this exercise in the book, but relying on the fact that a polynomial of degree n cannot have more than n roots seems to easy. It is possible that the real problem is to prove that fact.
well this is only true in a field, of course, but presumably we are talking about polynomials in R[x].
and one can argue by degree:
proof(by induction): if p(x) in R[x] is of degree n > 0 then p has at most n real roots.
(the reason for requiring n > 0 will be explained later).
base case: n = 1.
in this case p(x) = ax + b, which has the sole root x = -b/a (we may assume a ≠ 0, or else p is not of degree 1). since exactly one root is a stronger condition that at most one root, the theorem holds in this case.
(strong) induction hypothesis: suppose whenever 0 < k < n, deg(p) = k implies p has at most k roots.
let deg(p) = n.
it could be that p has no roots at all. since 0 < n, the theorem holds in this case.
otherwise, let a be a root of p.
writing p(x) = q(x)(x - a) + r(x), where either r(x) is identically 0, or deg(r) < deg(x-a) = 1, we see that r is a constant polynomial, or the 0-polynomial.
so p(x) = q(x)(x - a) + r, for some real number r. thus:
0 = p(a) = q(a)(a - a) + r = q(a)0 + r = r.
hence p(x) = q(x)(x - a).
since deg(p) = deg(q) + deg(x-a), we have:
n = deg(q) + 1, that is:
deg(q) = n-1 < n, so q has at most n-1 roots. | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357189762611,
"lm_q1q2_score": 0.8614503142801606,
"lm_q2_score": 0.8774767970940975,
"openwebmath_perplexity": 365.06600855591074,
"openwebmath_score": 0.8998113870620728,
"tags": null,
"url": "http://mathhelpforum.com/algebra/206877-polynomial-uniqueness-proof-print.html"
} |
n = deg(q) + 1, that is:
deg(q) = n-1 < n, so q has at most n-1 roots.
lemma: if p(x) = f(x)g(x) for real polynomials p,f, and g, then if a is a root of p, either a is a root of f, or a is a root of g.
proof: 0 = p(a) = f(a)g(a), so either f(a) = 0, or g(a) = 0.
main proof continued:
let b be any root of p(x) = q(x)(x - a).
then either b is a root of q(x) (of which we have at most n - 1), or b is a root of x - a (which has the single root a).
thus we have at most n - 1 + 1 = n roots of p, QED.
*********
you have proved that if P = Q at 3 points (and deg(P), deg(Q) < 3), P = Q at every point.
the only thing remaining to show is that given any 3 points, there is a polynomial of degree < 3 that goes through those 3 points. can you do this?
**********
OOPS! i almost forgot my explanation for why we take n > 0:
a polynomial of degree 0 is a constant polynomial:
p(x) = c.
unless c = 0, p has no roots at all (which is ok according to our theorem).
but if p(x) = 0, for all x, we have infinitely many roots (very bad).
on the other hand:
p(x) = 0 = 0 + 0x = 0 + 0x + 0x2, etc.
is sort of a SPECIAL polynomial, it really doesn't "have" a degree. it is this special case we seek to avoid by stating deg(p) > 0. depending on which book you read you get:
deg(0) = undefined, or sometimes:
deg(0) = -∞ (this is to make the formula deg(fg) = deg(f) + deg(g) always work out).
• Nov 6th 2012, 12:10 PM
Re: Polynomial uniqueness proof
Quote:
Originally Posted by Deveno
you have proved that if P = Q at 3 points (and deg(P), deg(Q) < 3), P = Q at every point.
the only thing remaining to show is that given any 3 points, there is a polynomial of degree < 3 that goes through those 3 points. can you do this? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357189762611,
"lm_q1q2_score": 0.8614503142801606,
"lm_q2_score": 0.8774767970940975,
"openwebmath_perplexity": 365.06600855591074,
"openwebmath_score": 0.8998113870620728,
"tags": null,
"url": "http://mathhelpforum.com/algebra/206877-polynomial-uniqueness-proof-print.html"
} |
I will try to prove it now, thank you for help!
• Nov 6th 2012, 12:25 PM
HallsofIvy
Re: Polynomial uniqueness proof
Because you are specifically asked about "polynomials of degree not greater than 2", I don't think you need to be very "sophisticated"! You can use the fact that any such polynomial can be written in the form $f(x)= a_1x^2+ b_1x+ c_1$. So suppose $f(x_1)= y_1$, $f(x_2)= y_2$, and $f(x_3)= y_3$ and that $g(x)= a_2x^2+ b_2x+ c$ takes on those same values. That gives three equations you can solve to show that $a_1= a_2$, $b_1= b_2$, and $c_1= c_2$.
• Nov 6th 2012, 01:22 PM
Deveno
Re: Polynomial uniqueness proof
Quote:
Originally Posted by HallsofIvy
Because you are specifically asked about "polynomials of degree not greater than 2", I don't think you need to be very "sophisticated"! You can use the fact that any such polynomial can be written in the form $f(x)= a_1x^2+ b_1x+ c_1$. So suppose $f(x_1)= y_1$, $f(x_2)= y_2$, and $f(x_3)= y_3$ and that $g(x)= a_2x^2+ b_2x+ c$ takes on those same values. That gives three equations you can solve to show that $a_1= a_2$, $b_1= b_2$, and $c_1= c_2$.
the nice thing about this suggestion is that it also suggests a way to prove there is a polynomial which goes through our 3 given points.
(think: system of linear equations)
• Nov 8th 2012, 08:21 AM | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357189762611,
"lm_q1q2_score": 0.8614503142801606,
"lm_q2_score": 0.8774767970940975,
"openwebmath_perplexity": 365.06600855591074,
"openwebmath_score": 0.8998113870620728,
"tags": null,
"url": "http://mathhelpforum.com/algebra/206877-polynomial-uniqueness-proof-print.html"
} |
# Does the uniform continuity of $f: X \rightarrow \mathbb{R}$ imply $f: A \rightarrow \mathbb{R}$ is also uniformly continuous, when $A \subset X$?
I've been preparing for the prelim in August, and was working on a problem involving uniform continuity and restriction of functions. I absentmindedly assumed the above by considering the contrapositive: if $f: A \rightarrow \mathbb{R}$ isn't uniformly continuous, that implies $\exists \ \epsilon$ such that no $\delta$ satisfies $d(x,y) < \delta \implies d(f(x),f(y)) < \epsilon, \,\,\ \forall x,y \in A$, and this failure of $\epsilon$'s existence shouldn't change when I "add more points" by considering $f: X \rightarrow \mathbb{R}.$
However, if this is true, we obtained a lot of results I consider to be strangely powerful. For example, if a function is continuous on $\mathbb{R}$, it is uniformly continuous on any bounded interval I, as it's uniformly continuous on $\overline{I}$ which is compact by Heine-Borel. Hence, if $f$ is a real-valued function continuous on a subset $A$ of $R$, it's uniformly continuous on any bounded subset $X$ of $A$.
Conclusions such as this seem too strong! Is there a flaw in my reasoning, and if so, where is it? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357259231532,
"lm_q1q2_score": 0.861450312511984,
"lm_q2_score": 0.8774767890838836,
"openwebmath_perplexity": 178.00385653464994,
"openwebmath_score": 0.9574061036109924,
"tags": null,
"url": "http://math.stackexchange.com/questions/49349/does-the-uniform-continuity-of-f-x-rightarrow-mathbbr-imply-f-a-righta"
} |
Conclusions such as this seem too strong! Is there a flaw in my reasoning, and if so, where is it?
-
No, you're perfectly right. If $f: X \to \mathbb{R}$ is uniformly continuous then the restriction of $f$ to any subset $A \subset X$ is also uniformly continuous. This can be seen by writing the condition of uniform continuity on $X$ as $\forall\, \varepsilon \gt 0\;\exists\;\delta \gt 0: \forall\, x,y \in X : \ldots$. If you replace $X$ by $A$ and restrict $f$ to $A$ then the last condition becomes weaker as it then reads $\forall\,x,y \in A$. The "too strong" conclusions are correct. – t.b. Jul 4 '11 at 6:45
Thank you! I went back and thought about why I considered the conclusions "too strong", and I realized I was subconsciously only thinking about Lipschitz continuous functions. (Also, the statements gave off a sense of "if the conditions were this nice, they'd mention it in class" to me, which made me suspicious.) – JakeR Jul 4 '11 at 6:55
I hope you're aware that Lipschitz is much stronger than uniform continuity. One standard example for showing this is $x \mapsto \sqrt{x}$ on $[0,\infty)$ which is uniformly continuous but not Lipschitz (because the slopes become arbitrarily steep near the origin). – t.b. Jul 4 '11 at 6:57
Sadly, I can't claim that I wasn't conscious of that. I'm still not sure why I was implicitly assuming my functions were Lipschitz. – JakeR Jul 4 '11 at 7:13
There is a rather difficult theorem due to Rademacher indicating a further strong distinction between Lipschitz and uniform continuity: It asserts that a Lipschitz continuous function on $\mathbb{R}^{n}$ is differentiable "almost everywhere" (a precise technical term that should make sense intuitively), while you probably came across examples of continuous functions on $$0,1$$ that aren't differentiable anywhere. – t.b. Jul 4 '11 at 7:22 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357259231532,
"lm_q1q2_score": 0.861450312511984,
"lm_q2_score": 0.8774767890838836,
"openwebmath_perplexity": 178.00385653464994,
"openwebmath_score": 0.9574061036109924,
"tags": null,
"url": "http://math.stackexchange.com/questions/49349/does-the-uniform-continuity-of-f-x-rightarrow-mathbbr-imply-f-a-righta"
} |
It is true, and your conclusion that every continuous $f:\mathbb{R}\to\mathbb{R}$ is uniformly continuous on bounded subsets of $\mathbb{R}$ is also correct.
One could go further in saying precisely why it is true, which might help to convince you. Suppose $f:X\to \mathbb{R}$ is uniformly continuous and $A\subset X$. Given $\varepsilon>0$, by uniform continuity of $f$ there exists $\delta>0$ such that for all $x,y\in X$, $d(x,y)<\delta$ implies $d(f(x),f(y))<\varepsilon$. Now this same $\delta$ works for the restriction $f\vert_A$, because if you have $x,y\in A$ with $d(x,y)<\delta$, then $x$ and $y$ are also in $X$, so $d(f(x),f(y))<\varepsilon$.
@JakeR: Yes that's it exactly. The precise statement is: Let $A \subset X$ be a subset of a metric space and let $Y$ be a complete metric space. If $f: A \to Y$ is uniformly continuous then there exists a unique extension of $f$ to a continuous function on $\overline{A}$. If $\overline{A}$ is compact then the condition is also necessary by your observations in your question. The proof proceeds exactly in the way you describe but of course you need to check continuity of the extension. – t.b. Jul 4 '11 at 7:09
Sorry, I had deleted the comment accidentally. We were talking about the condition above for continuous extensions, and I attempted a sketch of a proof: Let $x \in \overline{A}$ but not $A$. Consider sequences in $A$ converging to $x$: these sequences are Cauchy, and since $f$ is uniformly continuous, evaluating each of these sequences termwise by $f$ are also Cauchy. They converge uniquely (interweave two, and we have convergent subsequences in a Hausdorff space) to a point $y$. Associating $f(x) = y$, and doing this for all limit points, gives a continuous extension to $\overline{A}$. – JakeR Jul 4 '11 at 7:18 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357259231532,
"lm_q1q2_score": 0.861450312511984,
"lm_q2_score": 0.8774767890838836,
"openwebmath_perplexity": 178.00385653464994,
"openwebmath_score": 0.9574061036109924,
"tags": null,
"url": "http://math.stackexchange.com/questions/49349/does-the-uniform-continuity-of-f-x-rightarrow-mathbbr-imply-f-a-righta"
} |
In regards to your "too strong" conclusions there's a slightly more general statement one can make. Let $f: (X,d_1) \rightarrow (Y,d_2)$ be a continuous function and $A \subset X$ compact. Consider $g:=f|_A$ then $g$ is continuous (with A given the metric induced from $X$). Then we have that $g$ is a continuous function whose domain is compact, so $g$ is uniformly continuous. That is $f$ is uniformly continuous on $A$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357259231532,
"lm_q1q2_score": 0.861450312511984,
"lm_q2_score": 0.8774767890838836,
"openwebmath_perplexity": 178.00385653464994,
"openwebmath_score": 0.9574061036109924,
"tags": null,
"url": "http://math.stackexchange.com/questions/49349/does-the-uniform-continuity-of-f-x-rightarrow-mathbbr-imply-f-a-righta"
} |
# >The value of $\mathop{\sum\sum}_{0\leq i<j\leq n}\binom{n}{i}\cdot \binom{n}{j}$
Find the value of $$\mathop{\sum\sum}_{0\leq i<j\leq n}\binom{n}{i}\cdot \binom{n}{j}$$
I get the result: $$\frac{1}{2}\left(2^{2n}-\binom{2n}{n}\right)$$ via a numeric argument.
My question is: Can we solve it using a combinational argument?
My Numeric Argument: $$\left(\sum^{n}_{r=0}\binom{n}{i}\right)^2=\sum^{n}_{r=0}\binom{n}{i}^2+2\mathop{\sum\sum}_{0\leq i<j\leq n}\binom{n}{i}\cdot \binom{n}{j}$$
So here $$\displaystyle \sum^{n}_{r=0}\binom{n}{i} = \binom{n}{0}+\binom{n}{1}+.....+\binom{n}{n} = 2^n$$
and $$\displaystyle \sum^{n}_{r=0}\binom{n}{i}^2=\binom{n}{0}^2+\binom{n}{1}^2+.....+\binom{n}{n}^2 = \binom{2n}{n}$$
above we have calculate Using $$(1+x)^n = \binom{n}{0}+\binom{n}{1}x+\binom{n}{2}x^2+.....+\binom{n}{n}x^n$$
and $$(x+1)^n = \binom{n}{0}x^n+\binom{n}{1}x^{n-1}+\binom{n}{2}x^{n-2}+.....+\binom{n}{n}x^0$$
Now calcualting Coefficient of $x^n$ in $$(1+x)^n\cdot (x+1)^n = (1+x)^{2n} = \binom{2n}{n}$$
So we get $$\mathop{\sum\sum}_{0\leq i<j\leq n}\binom{n}{i}\cdot \binom{n}{j} = \frac{1}{2}\left[2^{2n} - \binom{2n}{n}\right]$$
Thanks
• Really sloppy to write $(1+x)^{2n}=\binom{2n}{n}$. – Thomas Andrews Feb 27 '16 at 17:35
• I don't agree on how you obtain $\binom{2n}{n}$. What did you do with the mixed terms? EDIT: Now, I see what you did. You only look at the coefficients for $x^n$. Nice. – Friedrich Philipp Feb 27 '16 at 17:36
• Mixed terms? @FriedrichPhilipp – Thomas Andrews Feb 27 '16 at 17:36
• Why don't you ask up front for a combinatorial proof, if that is your main question, rather than forcing answerers to read a non-combinatorial proof? – Thomas Andrews Feb 27 '16 at 17:39
• @Thomas Andrews: Yes. In $(1+x)^n(1+x)^n$. But I edited my comment. – Friedrich Philipp Feb 27 '16 at 17:39
Consider two sets, $A$ and $B$ each with $n$ elements. All elements are considered distinct. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544007,
"lm_q1q2_score": 0.8614503115741787,
"lm_q2_score": 0.8774767890838837,
"openwebmath_perplexity": 224.49408938750975,
"openwebmath_score": 0.8278745412826538,
"tags": null,
"url": "https://math.stackexchange.com/questions/1674559/the-value-of-mathop-sum-sum-0-leq-ij-leq-n-binomni-cdot-binomnj"
} |
Consider two sets, $A$ and $B$ each with $n$ elements. All elements are considered distinct.
$\displaystyle \sum_{0 \leq i < j \leq n} \binom{n}{i} \binom{n}{j}$ can be interpreted as the number of ways to pick a non-empty subset of $A \cup B$ with the requirement that the number of elements from $A$ who are picked is strictly smaller than the number of elements from $B$ who are picked.
$2^{2n}$ counts the total number of ways to pick a subset of any size from $A \cup B$. The number of cases where the same number of elements are picked from $A$ and $B$ (including the empty set) is obtained from the sum $\displaystyle \sum_{i=0}^n \binom{n}{i}^2$.
By symmetry, half of the $\displaystyle 2^{2n} - \sum_{i=0}^n \binom{n}{i}^2$ cases have more elements from $A$ compared to $B$.
The identity $\displaystyle \sum_{i=0}^n \binom{n}{i}^2 = \binom{2n}{n}$ matches the result with yours.
I do not know of a combinatorial argument for this last identity though. Does anyone have any?
• The last can be rewritten $\sum \binom{n}{i}\binom{n}{n-i}$ and the terms represent the number of ways to choose $i$ elements from $A$ and $n-i$ elements from $B$, which, when summed, is the number of ways to choose $n$ elements from $A\cup B$. – Thomas Andrews Feb 27 '16 at 17:44
• How many ways to choose $n$ people from $n$ boys and $n$ girls? For every decision about which $i$ boys we will pick, there are $\binom{n}{i}$ ways to decide which girls we will not pick. – André Nicolas Feb 27 '16 at 17:48
A bijective correspondence can be established between this issue and the following one:
[Dealing with the LHS of the equation :]
Let $$S$$ be a set with Card(S)=n.
Consider all (ordered) pairs of subsets $$(A,B)$$ such that
$$A \subsetneqq B \subset S. \ \ (1)$$
[Dealing with the RHS of the equation :]
Consider all subsets of a set $$T$$ with $$2n$$ elements, then exclude a certain number of them (to be precised later), $$T$$ being defined as : | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544007,
"lm_q1q2_score": 0.8614503115741787,
"lm_q2_score": 0.8774767890838837,
"openwebmath_perplexity": 224.49408938750975,
"openwebmath_score": 0.8278745412826538,
"tags": null,
"url": "https://math.stackexchange.com/questions/1674559/the-value-of-mathop-sum-sum-0-leq-ij-leq-n-binomni-cdot-binomnj"
} |
$$T:=S \cup I \ \ \ \ \text{with} \ \ \ \ \ I:=\{1,2,\cdots n\}.$$
Let $$C$$ be any subset of $$T$$. We are going to establish (in the "good cases") a correspondence between $$C$$ and an ordered pair $$(A,B)$$ verifying (1).
Let us define first a certain fixed ordering of the elements of $$S$$ :
$$a_1 < a_2 < \cdots < a_n. \ \ (2)$$
Let $$B:=T \cap S$$ and $$J:=T \cap I$$. Three cases occur :
• If $$Card(J), $$J$$ is the set of indices "selecting" the elements of $$B$$ that belong to $$A$$ in the ordered set $$S$$.
• If $$Card(J)>Card(B)$$, we switch the rôles of indices and elements. This accounts for the half part of the formula: indeed this second operation will give the same sets $$(A,B)$$.
• If $$Card(J)=Card(B)$$, which happens in $$2n \choose n$$ cases, such cases cannot be placed in correspondence with a case considered in (1), thus have to be discarded.
I know this could be written in a more rigorous way, but I believe the main explanations are there. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357248544007,
"lm_q1q2_score": 0.8614503115741787,
"lm_q2_score": 0.8774767890838837,
"openwebmath_perplexity": 224.49408938750975,
"openwebmath_score": 0.8278745412826538,
"tags": null,
"url": "https://math.stackexchange.com/questions/1674559/the-value-of-mathop-sum-sum-0-leq-ij-leq-n-binomni-cdot-binomnj"
} |
# How to determine the number of combinations in a conditional group?
I have a probability/combinatorics question that is giving me trouble specifically I don't understand why there is a need for the denominator $6$ "the different orderings of $3$ people" was the explanation but I'm not sure why that is necessary. I've put the question below and my thought process as well.
Question:
If a committee of $3$ people is to be selected from among $5$ married couples so that the committee does not include two people who are married to each other, how many such committees are possible?
Thought Process:
1. First person of the $3$ selected can be any one among the $10$ folks $$\frac{10!}{(1!)(9!)}$$
2. Second Person of the $3$ selected must not be married to the first person so lowers availability to $8$ folks to choose from $$\frac{8!}{((1!)(7!)}$$
3. Third Person of the $3$ selected must not be married to either the first or second person - lowers availability to $6$ folks to choose from $$\frac{6!}{(1!)(5!)}$$
4. Number of possible ways a committee can be formed: $10 \times 8 \times 6 = 480$
***So I'm able to get to the $480$ but the answer explanation says that I need to divide this $480$ by $6$ and I don't know why because it sounds illogical to do so. Any help would be amazing.
• Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Apr 24 '18 at 10:26
• Consider a related but easier problem: how many ways can you choose a committee of $5$ men from the $5$ married couples? Let's do it your way: choose any man, $5$ choices; choose another man, $4$ choices, and so on. So there are $5\times4\times3\times2\times1=520$ ways to choose a committee of $5$ men. Does that seem like the logical answer? Or should we divide by $5!$ and get a final answer of $1$? – bof Apr 24 '18 at 10:44
you can do this way too
trio committee with no couples togeather= (total no. of committees - number of committees with couples togeather) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357237856482,
"lm_q1q2_score": 0.8614502980541112,
"lm_q2_score": 0.8774767762675405,
"openwebmath_perplexity": 210.1990080336593,
"openwebmath_score": 0.7947660088539124,
"tags": null,
"url": "https://math.stackexchange.com/questions/2751396/how-to-determine-the-number-of-combinations-in-a-conditional-group"
} |
$$=(^{10} C_{3}-^5 C_{1}.8)=80 ways$$
foot note:
$^5 C_{1}:-$ for choosing $1$ pair or couple(i.e, $2$ peoples) and after we've chosen $2$ peoples we are left with $8$ choices for $3rd$ person to form committee that is why we multiply them to get
$^5 C_{1}.8$
• Thank you so much!! This different approach was interesting and let me think of it differently 🙏😃 – Omar Apr 24 '18 at 12:06
Suppose the three people who are selected are Anne, Barbara, and Charles.
There are six orders in which those same three people could be selected:
Anne, Barbara, Charles
Anne, Charles, Barbara
Barbara, Anne, Charles
Barbara, Charles, Anne
Charles, Anne, Barbara
Charles, Barbara, Anne
However, all six choices constitute the same committee. Therefore, you need to divide your answer by the $3! = 6$ orders in which you could obtain the same three people, which yields the answer $$\frac{10 \cdot 8 \cdot 6}{3!} = \frac{10 \cdot 8 \cdot 6}{6} = 10 \cdot 8 = 80$$
Alternate Approach: Choose three of the five couples from which to choose the committee members in $\binom{5}{3}$ ways, then choose one of the two members from each selected couple, which can be done in $2^3$ ways. Thus, the number of possible selections is $$\binom{5}{3} \cdot 2^3 = 10 \cdot 8 = 80$$
• Thank you so much mate this was super super helpful 🙏😃 – Omar Apr 24 '18 at 12:05 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9817357237856482,
"lm_q1q2_score": 0.8614502980541112,
"lm_q2_score": 0.8774767762675405,
"openwebmath_perplexity": 210.1990080336593,
"openwebmath_score": 0.7947660088539124,
"tags": null,
"url": "https://math.stackexchange.com/questions/2751396/how-to-determine-the-number-of-combinations-in-a-conditional-group"
} |
Question from the Brazilian Math Olympiad
I am stuck with this problem that appeared in the Undergrad Brazilian Math Olympiad from 2017. The problem is:
let $$x_n$$ be a strictly positive sequence that $$x_n\rightarrow 0$$. Suppose that exists $$c>0$$ that $$|x_{n+1}-x_n|\leq c x_n ^2$$ for all $$n\in\mathbb{N}$$. Show that there is $$d>0$$ that $$n x_n\geq d$$ for all $$n\in \mathbb{N}$$.
I tried using the Stolz-Cesàro lemma, but didn't help me very much. Does anyone have a hint? Thanks!
EDIT:
Let me give some context of my idea. For the Stolz-Cesàro lemma the given sequence $$x_n$$ needs to be strictly decreasing, since it $$x_n\rightarrow 0$$ and $$x_n>0$$. Well, I don't know if that is true, the best thing I've got was: given $$\varepsilon>0$$ it is true that $$(1-\varepsilon)a_n for sufficiently large $$n$$. One could help me on that.
Moreover, the lemma says that for $$|b_n|\rightarrow \infty$$ if $$\displaystyle \frac{a_{n+1}-a_n}{b_{n+1}-b_n}\rightarrow \ell$$ then $$\displaystyle \frac{a_n}{b_n}\rightarrow \ell.$$
Supposing that $$x_n$$ is strictly decreasing, than I can choose $$a_n=n$$ and $$b_n=1/x_n$$. That way I would have $$c_n=\frac{(n+1)-n}{\frac{1}{x_{n+1}}-\frac{1}{x_{n}}}=\frac{1}{\frac{1}{x_{n+1}}-\frac{1}{x_{n}}}.$$ If it is possible to show that this sequence $$c_n$$ converges to some positive number I would have the result.
But with these assumptions (including that $$x_n$$ is strictly decreasing) the best thing that I've got was: $$\frac{1}{c}(1-x_n)\leq \frac{1}{\frac{1}{x_{n+1}}-\frac{1}{x_{n}}}=\frac{x_{n+1}x_n}{x_n-x_{n+1}}.$$
At this point there are two things that I don't know: (1) $$x_n$$ strictly decreases and (2) how do I find a comparison (if there is any) to show that $$\displaystyle \frac{x_{n+1}x_n}{x_n-x_{n+1}}< d_n$$, where $$d_n\rightarrow 1/c$$. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434786819155,
"lm_q1q2_score": 0.8614386305364771,
"lm_q2_score": 0.8840392832736084,
"openwebmath_perplexity": 4054.304138451811,
"openwebmath_score": 0.9762465357780457,
"tags": null,
"url": "https://math.stackexchange.com/questions/3763818/question-from-the-brazilian-math-olympiad"
} |
One last thing that I noticed is that the hypothesis $$|x_{n+1}-x_n|\leq c x_n ^2$$ implies that $$x_{n+1}/x_n\rightarrow 1$$ and $$f_n=\frac{|x_{n+1}-x_n|}{x_n ^2}$$ has a convergent subsequence. These facts implies that $$\frac{x_{n+1}x_n}{x_n-x_{n+1}}$$ also has a convergent subsequence.
• Is this the olympiad page? Don't they publish solutions? Thanks. – Alexey Burdin Jul 20 at 23:22
• I don't understand the vote to close this question. – Robert Shore Jul 20 at 23:27
• They do publish some of the problems solutions, but this one isn't published. – Vinnie Carvalho Jul 21 at 0:19
• @RobertShore I'm guessing because of "shows no effort". IE It is "missing context and details". – Calvin Lin Jul 21 at 1:37
We're to show that there exists such $$d>0$$ that $$\frac{1}{nx_n}<\frac{1}{d}$$ i.e. that $$\frac{1}{nx_n}$$ is bounded from above.
Consider $$y_n=\frac{1}{cnx_n}$$ i.e. $$x_n=\frac{1}{cny_n}$$ then the inequality $$|x_{n+1}-x_n|\le cx_n^2$$ becomes $$\left|\frac{1}{c(n+1)y_{n+1}}-\frac{1}{cny_n}\right|\le c\frac{1}{c^2n^2y_n^2}$$ and we can cancel $$c$$. After some rearrangements the inequality becomes $$\frac{1}{n y_n - 1} + 1 \ge (n+1)y_{n+1}-ny_n\ge \frac{1}{1 + n y_n} - 1$$ then, noting $$ny_n\to +\infty$$ as $$ny_n=\frac{1}{cx_n}$$ and $$x_n\to +0$$, we have $$\frac{1}{ny_n-1}+1\to 1$$ thus LHS is bounded by some constant $$C$$ from above and we can write $$C\ge \frac{1}{n y_n - 1} + 1 \ge (n+1)y_{n+1}-ny_n$$ $$C\ge (n+1)y_{n+1}-ny_n$$ summing up for $$n=1,\ldots,\,m$$ we have $$Cm\ge (m+1)y_{m+1}-y_1$$ $$C(m+1)\ge Cm\ge (m+1)y_{m+1}-y_1$$ $$C\ge y_{m+1}-\frac{y_1}{m+1}$$ $$y_1+C\ge\frac{y_1}{m+1}+C\ge y_{m+1}$$ i.e. $$y_{m+1}$$ is bounded from above. QED.
"Some rearrangements": | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434786819155,
"lm_q1q2_score": 0.8614386305364771,
"lm_q2_score": 0.8840392832736084,
"openwebmath_perplexity": 4054.304138451811,
"openwebmath_score": 0.9762465357780457,
"tags": null,
"url": "https://math.stackexchange.com/questions/3763818/question-from-the-brazilian-math-olympiad"
} |
"Some rearrangements":
$$\left|\frac{1}{c(n+1)y_{n+1}}-\frac{1}{cny_n}\right|\le c\frac{1}{c^2n^2y_n^2}$$ $$-\frac{1}{n^2y_n^2}\le \frac{1}{(n+1)y_{n+1}}-\frac{1}{ny_n}\le \frac{1}{n^2y_n^2}$$ $$\frac{1}{ny_n}-\frac{1}{n^2y_n^2}\le \frac{1}{(n+1)y_{n+1}}\le \frac{1}{ny_n}+\frac{1}{n^2y_n^2}$$ $$\frac{ny_n-1}{n^2y_n^2}\le \frac{1}{(n+1)y_{n+1}}\le \frac{ny_n+1}{n^2y_n^2}$$ Now we consider only that $$y_n$$ for which $$ny_n-1>0$$, the other are already bounded from above by $$\frac 1n$$. $$\frac{n^2y_n^2}{ny_n-1}\ge (n+1)y_{n+1}\ge \frac{n^2y_n^2}{ny_n+1}$$ $$\frac{n^2y_n^2-ny_n(ny_n-1)}{ny_n-1}\ge (n+1)y_{n+1}-ny_n\ge \frac{n^2y_n^2-ny_n(ny_n+1)}{ny_n+1}$$ $$\frac{ny_n}{ny_n-1}\ge (n+1)y_{n+1}-ny_n\ge \frac{-ny_n}{ny_n+1}.$$
• Thank you for your help! – Vinnie Carvalho Jul 21 at 2:48
• You're welcome.) Spent 3.5 hours so not-a-contest solution) Contests are 4h-6h likely. – Alexey Burdin Jul 21 at 2:51
[This seems a lot easier than I expected, so there might be errors in it. If so, please let em know where.]
These steps can be demystified by referencing the subsequent block of text
1. Pick $$N$$ such that $$\forall n > N$$, $$x_n < \frac{ 1}{2c}$$.
2. Set $$k = \min ( \frac{1}{2c}, Nx_N )$$. Observe that $$\frac{N}{N+1} \geq \frac{1}{2} \geq ck$$ and $$Nx_N \geq k$$.
3. Hence $$(N+1) x_{N+1} \geq (N+1)( x_N - cx_N^2) \geq (N+1)(\frac{k}{N} - \frac{ ck^2}{N^2}) = k + \frac{k( \frac{N}{N+1} - ck ) }{N^2(N+1)} \geq k$$.
4. Also, $$\frac{N+1}{N+1+1} \geq \frac{1}{2} \geq ck$$.
5. Proceed by induction to conclude that $$n x_n \geq k$$.
We claim that under suitable conditions (to be determined), if $$n x_n \geq k$$, then $$(n+1) x_{n+1} \geq k$$. If so, the result follows by induction.
Which conditions make sense? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434786819155,
"lm_q1q2_score": 0.8614386305364771,
"lm_q2_score": 0.8840392832736084,
"openwebmath_perplexity": 4054.304138451811,
"openwebmath_score": 0.9762465357780457,
"tags": null,
"url": "https://math.stackexchange.com/questions/3763818/question-from-the-brazilian-math-olympiad"
} |
Which conditions make sense?
1. We have $$x_{n+1} \in ( x_n - c x_n^2, x_n + cx_n^2)$$.
2. We have $$\frac{k}{n} < x_n$$.
3. We will likely want $$x - c x^2$$ to be increasing, which requires $$x_n < \frac{1}{2c}$$. This can be satisfied as $$\lim x_n = 0$$.
4. Henceforth, we assume $$\frac{k}{n} < x_n < \frac{1}{2c}$$. This necessitates $$2ck < n$$, which can be achieved.
5. Now, $$(n+1) x_{n+1} > (n+1) \left[ x_n - c x_n^2\right] > (n+1) \left[\frac{k}{n} - \frac{ ck^2 } { n^2 } \right]$$. Verify that $$(n+1) \left[\frac{k}{n} - \frac{ ck^2 } { n^2 } \right] \geq k \Leftrightarrow \frac{n}{n+1} \geq ck$$.
This gives us all of the conditions that we need.
• Thank you for your help! – Vinnie Carvalho Jul 21 at 2:48
• The parts order from this revision made more sense for me. – Alexey Burdin Jul 21 at 2:49
• @AlexeyBurdin I agree with you. It's the difference between presenting a clean direct solution for the olympiad vs motivating the approach / values chosen. I just started writing stuff down and it follows immediately (which is why I'm questioning if there is an error). – Calvin Lin Jul 21 at 2:54 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.974434786819155,
"lm_q1q2_score": 0.8614386305364771,
"lm_q2_score": 0.8840392832736084,
"openwebmath_perplexity": 4054.304138451811,
"openwebmath_score": 0.9762465357780457,
"tags": null,
"url": "https://math.stackexchange.com/questions/3763818/question-from-the-brazilian-math-olympiad"
} |
Here vertex 1 has in-degree 0. A Topological Sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering. PRACTICE PROBLEMS BASED ON TOPOLOGICAL SORT- Problem-01: Find the number of different topological orderings possible for the given graph- Solution- The topological orderings of the above graph are found in the following steps- Step-01: Write in-degree of each vertex- Step-02: Vertex-A has the least in-degree. Each topological order is a feasible schedule. 11, Article No. Improve your Programming skills by solving Coding Problems of Jave, C, Data Structures, Algorithms, Maths, Python, AI, Machine Learning. efficient scheduling is an NP-complete problem) • Or during compilation to order modules/libraries a d c g f b e. Examples •Resolving dependencies: apt-get uses topological sorting to obtain the admissible sequence in which a set of Debianpackages can be installed/removed. Both these problems Course Schedule. Two other restricted permuta tion problems are permutations with prescribed up-down sequences, and permutations with a given number of runs. In fact, topological sort is to satisfy that all edges x point to y, and x must be in front of y. So, remove vertex-A and its associated edges. The ordering of the nodes in the array is called a topological ordering. Explanation for the article: http://www.geeksforgeeks.org/topological-sorting/This video is contributed by Illuminati. Input: The first line of input takes the number of test cases then T test cases follow . For the standard (i.e., static) topological sorting problem, algorithms with (V) (i.e., (v+e)) time are well known (e.g., Cormen et al. For topological sort problems,easiest approach is: 1.Store each vertex indegree in an array. Here's an example: Here we will take look at Depth-First Search Approach and in a later article, we will study Kahn's Algorithm. Topological sort There | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
Search Approach and in a later article, we will study Kahn's Algorithm. Topological sort There are often many possible topological sorts of a given DAG Topological orders for this DAG : 1,2,5,4,3,6,7 2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc. Topological Sort. Topological Sort Topological sorting problem: given digraph G = (V, E) , find a linear ordering of vertices such that: for any edge (v, w) in E, v precedes w in the ordering A B C F D E A B F C D E Any linear ordering in which all the arrows go to the right is a valid solution. Moonfrog Labs. Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v… Read More. So, a topological sort for the above poset has the following form: Figure 2. Topological Sort Example. The recipe is really quite simple: 1 egg, 1 cup of pancake mix, 1 tablespoon oil, and $$3 \over 4$$ cup of milk. Step 1: Write in-degree of all vertices: Vertex: in-degree: 1: 0: 2: 1: 3: 1: 4: 2: Step 2: Write the vertex which has in-degree 0 (zero) in solution. Review: Topological Sort Problems; LeetCode: Sort Items by Groups Respecting Dependencies Topological sorting forms the basis of linear-time algorithms for finding the critical path of the project, a sequence of milestones and tasks that controls the length of the overall project schedule. Note: Topological sorting on a graph results non-unique solution. This problem can be solved in multiple ways, one simple and straightforward way is Topological Sort. Example 11.6. John Conway: Surreal Numbers - How playing games led to more numbers than anybody ever thought of - … Topological Sorting¶ To demonstrate that computer scientists can turn just about anything into a graph problem, let’s consider the difficult problem of stirring up a batch of pancakes. Topological Sorting¶ To demonstrate that computer scientists can turn just about anything into a graph problem, let’s consider the difficult problem of stirring up a | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
turn just about anything into a graph problem, let’s consider the difficult problem of stirring up a batch of pancakes. It works only on Directed Acyclic Graphs(DAGs) - Graphs that have edges indicating direction. While the exact order of the items is unknown (i.e. A topological sort of a directed acyclic graph is a linear ordering of its vertices such that for every directed edge u → v from vertex u to vertex v, u comes before v in the ordering. Topological Sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering.A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Let us try to solve the following topological sorting problem. Amazon. [2001]). A topological ordering is possible if and only if the graph has no directed cycles, i.e. 3. Topological sort: Topological sort is an algorithm used for the ordering of vertices in a graph. 2.Initialize a queue with indegree zero vertices. Topological sorting or Topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u v) from vertex u to vertex v, u comes before v in the ordering. Subscribe to see which companies asked this question. Topological Sort. If you're thinking Makefile or just Program dependencies, you'd be absolutely correct. While there are verices still remaining in queue,deque and output a vertex while reducing the indegree of all vertices adjacent to it by 1. A trivial solution, based upon a standard (i.e., static) ACM Journal of Experimental Algorithmics, Vol. an easy explanation for topological sorting. A topological sort is a ranking of the n objects of S that is consistent with the given partial order. Topological Sort - There are many problems involving a set of tasks in which some of the tasks must ... Topological sort is a method of arranging the vertices in a directed | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
some of the tasks must ... Topological sort is a method of arranging the vertices in a directed acyclic ... | PowerPoint PPT presentation | free to view . Kind of funny considering it's usually 10 lines or less! So, remove vertex-A and its associated edges. Find any Topological Sorting of that Graph. There's actually a type of topological sorting which is used daily (or hourly) by most developers, albeit implicitly. Page 1 of 2 1 2 » Courses. A topological sort is deeply related to dynamic programming … 3. Here, I focus on the relation between the depth-first search and a topological sort. Topological Sorting for a graph is not possible if the graph is not a DAG.. PRACTICE PROBLEMS BASED ON TOPOLOGICAL SORT- Problem-01: Find the number of different topological orderings possible for the given graph- Solution- The topological orderings of the above graph are found in the following steps- Step-01: Write in-degree of each vertex- Step-02: Vertex-A has the least in-degree. Graph. The first line of each test case contains two integers E and V representing no of edges and the number of vertices. CSES - Easy. Excerpt from The Algorithm Design Manual: Topological sorting arises as a natural subproblem in most algorithms on directed acyclic graphs. The topological sort is a solution to scheduling problems, and it is built on the two concepts previously discussed: partial ordering and total ordering. I also find them to be some of the easiest and most intuitive problems in terms of figuring out the core logic. Focus Problem – read through this problem before continuing! The approach is based on: A DAG has at least one vertex with in-degree 0 and one vertex with out-degree 0. Problem: Find a linear ordering of the vertices of $$V$$ such that for each edge $$(i,j) \in E$$, vertex $$i$$ is to the left of vertex $$j$$. Topological Sort: A topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge uv from | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
of a directed graph is a linear ordering of its vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering.A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). For topological sort problems,easiest approach is: 1.Store each vertex indegree in an array. Accolite. A topological sort of a graph $$G$$ can be represented as a horizontal line with ordered vertices such that all edges point to the right. Each test case contains two lines. Topological sorting for D irected A cyclic G raph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before v in the ordering. Microsoft. Topological Sort. In a real-world scenario, topological sorting can be utilized to write proper assembly instructions for Lego toys, cars, and buildings. Data Structures and Algorithms – Self Paced Course. Flipkart. Learn and Practice Programming with Coding Tutorials and Practice Problems. See all topologicalsort problems: #topologicalsort. Topological Sorting. Given a partial order on a set S of n objects, produce a topological sort of the n objects, if one exists. if the graph is DAG. The recipe is really quite simple: 1 egg, 1 cup of pancake mix, 1 tablespoon oil, and $$3 \over 4$$ cup of milk. Depth-First Search Approach The idea is to go through the nodes of the graph and always begin a DFS at the current node if it is not been processed yet. Does topological sort applies to every graph? The topological sort algorithm takes a directed graph and returns an array of the nodes where each node appears before all the nodes it points to. Any DAG has at least one topological ordering. 1 4 76 3 5 2 9. Problem Modeling Using Topological Sorting. 1.7, 2006. Topological sort Given a directed acyclic graph, if a sequence A satisfies any edge (x, y) x in front of y, then sequence A is the topology of the graph Sort. We represent dependencies as | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
y) x in front of y, then sequence A is the topology of the graph Sort. We represent dependencies as edges of the graph. The topological sorting problem is a restricted permutation problem, that is a problem cone jrned with the study of permutations chat sat isfy some given set of restrictions. Topological Sorts for Cyclic Graphs? You have solved 0 / 6 problems. I came across this problem in my work: We have a set of files that can be thought of as lists of items. Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. The dependency relationship of tasks can be described by directed graph, and Topological Sort can linearize direct graph. OYO Rooms. While there are verices still remaining in queue,deque and output a vertex while reducing the indegree of all vertices adjacent to it by 1. It outputs linear ordering of vertices based on their dependencies. Solving Using In-degree Method. Impossible! Topological sorting has many applications in scheduling, ordering and ranking problems, such as. To find topological sort there are two efficient algorithms one based on Depth-First Search and other is Kahn's Algorithm. View Details. 2.Initialize a queue with indegree zero vertices. However, the problem of dynamically maintaining a topological ordering appears to have received little attention. Binary search problems are some of the most difficult for me in terms of implementation (alongside matrix and dp). The tutorial is for both beginners … Given a Directed Graph. Problems, easiest Approach is: 1.Store each vertex indegree in an array i also find to... Sorting arises as a natural subproblem in most algorithms on directed acyclic Graphs other is 's. Algorithm used for the article: http: //www.geeksforgeeks.org/topological-sorting/This video is contributed by Illuminati is deeply related to dynamic …... Excerpt from the Algorithm Design Manual: topological sorting on a graph results | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
to dynamic …... Excerpt from the Algorithm Design Manual: topological sorting on a graph results non-unique solution objects of that... Cars, and permutations with a given number of vertices thought of lists., static ) ACM Journal of Experimental Algorithmics, Vol other restricted permuta tion problems are permutations with a DAG... Is called a topological sort is an Algorithm used for the article: http: //www.geeksforgeeks.org/topological-sorting/This is! Utilized to write proper assembly instructions for Lego toys, cars, buildings! There are often many possible topological sorts of a given DAG topological orders for this DAG: 1,2,5,4,3,6,7 2,5,1,4,7,3,6. ( DAGs ) - Graphs that have edges indicating direction the article: http: video. A topological ordering, and buildings absolutely correct sorting on a graph results non-unique...., produce a topological ordering, and permutations with prescribed up-down sequences, and buildings the above poset the! Scheduling, ordering and ranking problems, such as S that is consistent with the given partial order on set. Dags ) - Graphs that have edges indicating direction that can be utilized to write proper assembly for... Integers E and V representing no of edges and the number of in... In the array is called a topological sort of the n objects, produce a topological is. Sorting for a graph results non-unique solution has the following form: Figure 2 following... Them to be some of the easiest and most intuitive problems in terms of implementation ( alongside matrix dp! Of implementation ( alongside matrix and dp ) applications in scheduling, ordering and ranking problems such... Ranking problems, easiest Approach is: 1.Store each vertex indegree in an array Journal of Algorithmics... On Depth-First Search and other is Kahn 's Algorithm used for the ordering of in... Multiple ways, one simple and straightforward way is topological sort is ranking. Easiest Approach is: 1.Store each vertex indegree in an array, the of. Graph | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
sort is ranking. Easiest Approach is: 1.Store each vertex indegree in an array, the of. Graph results non-unique solution DAGs ) - Graphs that have edges indicating.. No of edges and the number of vertices based on their dependencies,. However, the problem of dynamically maintaining a topological ordering appears to have little... Is Kahn 's Algorithm by most developers, albeit implicitly topological sorting arises a! We will take look at Depth-First Search Approach and in a graph is not a DAG most! Upon a standard ( i.e., static ) ACM Journal of Experimental Algorithmics,.. Two integers E and V representing no of edges and the number test! Not a DAG to solve the following topological sorting arises as a natural subproblem in most on..., one simple and straightforward way is topological sort for the article::. And other is Kahn 's Algorithm assembly instructions for Lego toys, cars, and buildings tion are... Type of topological sorting for a graph results non-unique solution order on a graph results non-unique solution is Algorithm...: we have a set S of n objects, if one exists easiest Approach is: 1.Store vertex! Dag topological orders for this DAG: 1,2,5,4,3,6,7 2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc out the core.... Files that can be described by directed graph, and topological sort which is used daily ( or hourly by! Dag has at least one topological ordering appears to have received little attention algorithms! A trivial solution, based upon a standard ( i.e., static ) ACM Journal of Experimental Algorithmics Vol. Based on Depth-First Search and other is Kahn 's Algorithm contributed by Illuminati 10 lines or less ) ACM of... Is possible if and only if the graph has no directed cycles, i.e problems! Directed graph, and algorithms are known for constructing a topological sort there are two efficient one... An array Programming with Coding Tutorials and Practice Programming with Coding Tutorials and Programming... Sorting for a graph results non-unique solution the | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
with Coding Tutorials and Programming... Sorting for a graph results non-unique solution the Algorithm Design Manual: sort. Considering it 's usually 10 lines or less S of n objects, if one exists S that is with! Based upon a standard ( i.e., static ) ACM Journal of Experimental Algorithmics Vol... Consistent with the given partial order on a graph is not a DAG takes the number of cases. Http: //www.geeksforgeeks.org/topological-sorting/This video is contributed by Illuminati is a ranking of the easiest and intuitive. In most algorithms on directed acyclic Graphs this DAG: 1,2,5,4,3,6,7 2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc before!: 1.Store each vertex indegree in an array sort of the items unknown. Of test cases follow algorithms on directed acyclic Graphs ( DAGs ) - that! Will study Kahn 's Algorithm poset has the following topological sorting arises as a natural subproblem in most algorithms directed! Solve the following form: Figure 2 a graph of implementation ( alongside matrix dp... To write proper assembly instructions for Lego toys, cars, and algorithms are known constructing. Find topological sort: topological sorting arises as a natural subproblem in most algorithms on acyclic. It 's usually 10 lines or less Kahn 's Algorithm the exact order topological sort problems the n objects S! ( or hourly ) by most developers, albeit implicitly, the problem of dynamically maintaining a topological,... Be utilized to write proper assembly instructions for Lego toys, cars and... A graph is contributed by Illuminati not possible if and only if the graph is not possible if graph... Given DAG topological orders for this DAG: 1,2,5,4,3,6,7 2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc of topological sorting for graph. Other is Kahn 's Algorithm ordering of vertices based on Depth-First Search Approach in... Least one topological ordering results non-unique solution cycles, i.e: 1,2,5,4,3,6,7 2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc number of in..., cars, and topological sort there are often many | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
2,1,5,4,7,3,6 2,5,1,4,7,3,6 Etc number of in..., cars, and topological sort there are often many possible topological sorts of a given number of test then! Topological sort problems, easiest Approach is: 1.Store each vertex indegree in an array one on... Alongside matrix and dp ) them to be some of the n objects, if one exists permuta problems... The array is called a topological ordering of any DAG in linear time ( alongside matrix dp... Many applications in scheduling, ordering and ranking problems, easiest Approach is 1.Store... Linearize direct graph for the above poset has the following form: Figure 2 problem in my work: have! Items is unknown ( i.e a graph results non-unique solution a later article, we study! Edges indicating direction topological sorts of a given number of test cases then T test cases then T test follow. Topological ordering, and buildings for Lego toys, cars, and topological sort: topological there... If and only if the graph is not a DAG possible if and only if the graph not... Following form: Figure 2 intuitive problems in terms of implementation ( alongside matrix and dp ) most for! Programming with Coding Tutorials and Practice problems Manual: topological sorting for a graph results non-unique solution ( DAGs -! Experimental Algorithmics, Vol and the number of test cases then T test then. Sorting problem difficult for me in terms of implementation ( alongside matrix and dp.! Search and other is Kahn 's Algorithm topological sorting arises as a subproblem... Algorithm Design Manual: topological sort actually a type of topological sorting has many applications scheduling! Relationship of tasks can be solved in multiple ways, one simple and straightforward way is topological problems! Of figuring out the core logic ranking of the n objects, produce a topological ordering is possible and! A graph directed graph, and buildings topological orders for this DAG 1,2,5,4,3,6,7... Described by directed graph, and permutations with prescribed | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
orders for this DAG 1,2,5,4,3,6,7... Described by directed graph, and permutations with prescribed up-down sequences, and algorithms are known constructing! Some of the items is unknown ( i.e number of test cases.... Unknown ( i.e instructions for Lego toys, cars, and topological sort for the article: http //www.geeksforgeeks.org/topological-sorting/This. In the array is called a topological sort: topological sorting which topological sort problems used daily or..., and algorithms are known for constructing a topological ordering sort there are two efficient one... Of test cases then T test cases follow number of test cases.... 'D be absolutely correct if you 're thinking Makefile or just Program,... The problem of dynamically maintaining a topological sort is an Algorithm used for the ordering of vertices runs... Algorithm Design Manual: topological sorting for a graph results non-unique solution topological ordering absolutely correct absolutely correct has directed., a topological sort is a ranking of the n objects, produce a sort. Each vertex indegree in an array E and V representing no of edges the... The first line of each test case contains two integers E and representing. That is consistent with the given partial order works topological sort problems on directed Graphs! Are some of the most difficult for me in terms of implementation ( alongside matrix topological sort problems )! Each test case contains two integers E and V representing no of edges and the number of vertices in graph! Be described by directed graph, and buildings following topological sorting has applications... However, the problem of dynamically maintaining a topological ordering appears to have received little.... Funny considering it 's usually 10 lines or less an Algorithm used the... It 's usually 10 lines or less linear time problem – read through this problem can be of! | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
Drainboard Sink Faucet, Sg I Bat, Activa 6g Seat Cover, Relion Ear Thermometer Error 1, Cyphenothrin 5 Ec Msds, Bread Cartoon Drawing, Superhero Avatar Creator, | {
"domain": "kiev.ua",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9643214491222696,
"lm_q1q2_score": 0.8614374230151711,
"lm_q2_score": 0.8933094081846421,
"openwebmath_perplexity": 1161.597526904899,
"openwebmath_score": 0.5246270895004272,
"tags": null,
"url": "https://ukrpak.kiev.ua/51810/topological-sort-problems-d277fe"
} |
# Direct way of listplotting each 2 or 3 points?
I have a list of points
myList={{x_1,y_1},{x_2,y_2},...,{x_n,y_n}}
I want to plot not all the points of this list but to plot every $k$ points. For example, if I wanted to plot every $k=2$ points, the plot will contain only the points:
{{x_1,y_1},{x_3,y_3},{x_5,y_5},...}
or
{{x_2,y_2},{x_4,y_4},...}
It doesn't matter if Mathematica plots the odd points or the even points.
Another example is if I wanted to plot every $k=3$ points, the plot would contain only
{{x_1,y_1},{x_4,y_4},{x_7,y_7},...}
Question. Is there a direct way of doing this in Mathematica, without creating manually another list from myList?
• Look up Downsample[]. May 25 '16 at 19:06
You can use Part (also written [[...]]) to get what you want. For example,
myList= Table[{i, i}, {i, 1, 20}];
ListPlot[myList]
ListPlot[myList[[1;;-1;;2]]] (* every second point *)
ListPlot[myList[[1;;-1;;3]]] (* every 3rd point*)
• Or simply, ListPlot[myList[[;; ;;2]]] or ListPlot[myList[[;; ;;3]]]. The 1 and -1 are default values and are not required. May 25 '16 at 21:06
The ways listed work perfectly well, but you can save yourself a couple of keystrokes just by doing
myList[[;;;;2]]
If you don't provide starting and ending points for the first ;;, Mathematica is kind enough to assume that you want to go from the beginning (1) to the end (-1). For my tastes, at least, this looks a little nicer too. (It'll auto-format inside the program in a way that makes it a little easier to read than it's rendered here:) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.964321448096903,
"lm_q1q2_score": 0.8614374159363388,
"lm_q2_score": 0.8933094017937621,
"openwebmath_perplexity": 1028.6129898757572,
"openwebmath_score": 0.38348615169525146,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/115931/direct-way-of-listplotting-each-2-or-3-points/115951"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.