# Why doesn't Integrate evaluate an elliptic integral?

My code is

Integrate[ 1/Sqrt[(x - a) (x - b) (x - c) (x - d)], {x, a,  ∞},
Assumptions -> 0 < d < c < b < a]

I know this can be expressed be the incomplete elliptic integral of first kind (EllipticF), but the output remains unevaluated

Integrate[ 1/Sqrt[(-a + x) (-b + x) (-c + x) (-d + x)], {x, a,  ∞},
Assumptions -> 0 < d < c < b < a]

Why does this happen? I am desperate

• If the output is echoed, it means Mathematica doesn't know what to do with it. – J. M.'s torpor May 20 '20 at 12:02
• Seems to work OK for the indefinite integral. And the result can be evaluated at a and Infinity using the Limit function – Gustavo Delfino May 20 '20 at 12:09
• But isn't it strange Mathematica can't calculate it? I also tried changing the integration from a to a generic M but the result is the same. From Gradshteyn Ryzhik I know this is equal to EllipticF(...,...), should I doubt the tables of Gradshteyn Ryzhik or is it common that Mathematica can't do integrals like this one? – Filippo Caleca May 20 '20 at 12:11

Actually V 12.1 can do it directly, you just have to wait a little bit long:

Clear["Global*"];

int = Integrate[1/Sqrt[(x - a) (x - b) (x - c) (x - d)], {x, a, Infinity},
Assumptions -> 0 < d < c < b < a]

May be OP used different Mathematica version? It will be good to post which version was used. Screen shot below:

A Workaround for now: (assuming proper integral)

 int = Integrate[1/Sqrt[(x - a) (x - b) (x - c) (x - d)], x]

low = Assuming[0 < d < c < b < a, Limit[int, x -> a]]
(* 0 *)

high = Assuming[0 < d < c < b < a, Limit[int, x -> Infinity]]

The above is then the final result.

• Thank you! I am using 11.3 – Filippo Caleca May 20 '20 at 12:52
• @FilippoCaleca integrate in V12.1 has improved over 11.3 – Nasser May 20 '20 at 12:56
• my output is different, in fact writing: int = Integrate[1/Sqrt[(x - a) (x - b) (x - c) (x - d)], x] the output is -((2 (-a + x) (-b + x) Sqrt[((a - b) (-c + x))/((b - c) (a - x))] Sqrt[((a - b) (-d + x))/((b - d) (a - x))] EllipticF[ ArcSin[Sqrt[((a - d) (-b + x))/((b - d) (-a + x))]], ((a - c) (b - d))/((b - c) (a - d))])/((a - b) Sqrt[((a - d) (b - x))/((b - d) (a - x))] Sqrt[(-a + x) (-b + x) (-c + x) (-d + x)])) the argument of EllipticF are different, how is it? – Filippo Caleca May 20 '20 at 13:09
• Note that you shouldn't expect the technique used in your workaround to work in all cases. See this old Wolfram blog post for some of the mathematical nitty-gritty as to why. – Michael Seifert May 20 '20 at 19:58
• Sure, if you go back to the concept of "area under a curve", then one might expect that an antiderivative ought to be continuous if the original function is continuous. But yes, it's not always easy to do. That's why Mathematica has to try harder for definite integrals, tho it has been known to still make mistakes sometimes. – J. M.'s torpor May 21 '20 at 1:41

In the newest version (i.e. 12.1) this integral evaluates a bit long, however changing the variable $$x \mapsto t = x-a\;$$ this can be evaluated a few times faster.

int2 = Integrate[ 1/Sqrt[t (t + a - b) (t + a - c) (t + a - d)], {t, 0, ∞},
Assumptions -> 0 < d < c < b < a]

2 EllipticF[ ArcSin[ Sqrt[(b - d)/(a - d)]],
((b - c)(a - d))/((a - c)(b - d))]/Sqrt[(a - c)(b - d)]

TraditionalForm[%]

I'm working with the system in cloud and sometimes it appears that the integral in question may remain unevaluated while int2 evaluates well even in version 11.2 on my machine.

Mathematica functions evolve with time even if its usage remains tha same. This aspect of the system is perhaps the most obvious in case of symbolic integration (Integrate), exact solutions of differential equations (DSolve) and the special functions (among them EllipticF). Elliptic functions and integrals appeared in Mathematica 1, however since then many new related functionalities would have been added later e.g. EllipticF was introduced in version 1.0 year 1988 and updated in 3.0 (1996). WeierstrassP was introduced in version 1.0 and updated in 3.0 (1996), however several new functionalities related appeared in version 11.2 (2017) like e.g. WeierstrassHalfPeriodW1 or WeierstrassE1 see e.g. this answer Integrate yields complex value, while after variable transformation the result is real. Bug?. Inspecting another answers therein one can see how Integrate can be sensitive when new functions or functionalities appear. It relates not only to new functionalities but also to widening domain of existing functions (in documentation pages one finds information when a function was introduced and when it was last updated, nevertheless there are also hiden changes that are not reported, however they may be crucial when certain different functions involved were updated). One should take attention to this aspect related to better handling of symbolic input of e.g. WeierstrssHalfPeriodW1 in version 12.1 with respect to 11.2 and it is advantageous to pay atention to this post. Elliptic functions and integrals play very important role in mathematics, physics, engineering and they are still better handled in newer versions of the system. This does not mean that Mathematica is defective but rather that perfect handling of special functions can be approached asymptotically and it is still in interest of developers of the system, e.g. one of leading experts in the field of special functions Oleg Marichev is a member of the special functions group in WRI. Having said that we can accept the state of art and the fact that things can change at least on the symbolic level.

Let's come back to version 11.2 with help of a simple change of variables: $$x \mapsto t+a$$

int3 = Integrate[ 1/Sqrt[t (t + a - b) (t + a - c) (t + a - d)], {t, 0, ∞},
Assumptions -> 0 < d < c < b < a]

(2 (EllipticF[ ArcSin[Sqrt[(a - d)/(b - d)]], ((a - c) (b - d))/((b - c) (a - d))]
+ I EllipticK[((a - b) (c - d))/((-b + c) (a - d))]))/Sqrt[(b - c) (a - d)]

TraditionalForm[%]

This might seem strange that there appears an imaginary number however the full integral is indeed real even though FullSimplify cannot demonstrate (in 11.2) that both results are equal. In 12.1 this still cannot be done, although a simpler identity can be proved, assuming that parameters are related somehow (in 12.1 not in 11.2), e.g.

FullSimplify[(8(EllipticF[ArcSin[Sqrt[3/2]], 4/3] +
I EllipticK[-(1/3)]))/(Sqrt[3] Sqrt[a^2])
- (4 EllipticF[ArcSin[Sqrt[2/3]], 3/4])/Sqrt[a^2], a > 0]

0

We can show that this is the case evaluating numerically, e.g.

With[{a = 4, b = 3, c = 2, d = 1}, {
(2 (EllipticF[ ArcSin[Sqrt[(a - d)/(b - d)]], ((a - c) (b - d))/((b - c) (a - d))]
+ I EllipticK[((a - b) (c - d))/((-b + c) (a - d))]))/Sqrt[(b - c) (a - d)],
( 2 (EllipticF[ ArcSin[Sqrt[(b - d)/(a - d)]],
((b - c)(a - d))/((a - c)(b - d))]))/Sqrt[(a - c)(b - d)]} // N // Chop]

{1.07826, 1.07826}

For example of a bit more testy case see e.g. Why does Integrate declare a convergent integral divergent?

Making appropriate plot of the functions and their difference might be helpful as well:

Plot[{#, # - (4 EllipticF[ArcSin[Sqrt[2/3]], 3/4])/Sqrt[a^2]}, {a, 0, 6},
PlotStyle -> Thick, AxesOrigin -> {0, 0}] &[ (
8(EllipticF[ArcSin[Sqrt[3/2]], 4/3] + I EllipticK[-1/3]))/(Sqrt[3]Sqrt[a^2])]
`


It is currently 17 Oct 2017, 12:13

### 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

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# The positive integers x, y, and z are such that x is a

Author Message
TAGS:

### Hide Tags

Intern
Joined: 19 Jun 2009
Posts: 29

Kudos [?]: 122 [1], given: 1

The positive integers x, y, and z are such that x is a [#permalink]

### Show Tags

17 Oct 2009, 14:15
1
KUDOS
13
This post was
BOOKMARKED
00:00

Difficulty:

55% (hard)

Question Stats:

58% (00:59) correct 42% (01:07) wrong based on 1007 sessions

### HideShow timer Statistics

The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

(1) xz is even

(2) y is even.
[Reveal] Spoiler: OA

Last edited by Bunuel on 25 Feb 2012, 02:35, edited 1 time in total.

Kudos [?]: 122 [1], given: 1

Math Expert
Joined: 02 Sep 2009
Posts: 41873

Kudos [?]: 128579 [6], given: 12180

### Show Tags

17 Oct 2009, 14:32
6
KUDOS
Expert's post
16
This post was
BOOKMARKED
amitgovin wrote:
The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

(1) xz is even

(2) y is even.

Given:
x is a factor of y --> $$y=mx$$, for some non-zero integer $$m$$;
y is a factor of z --> $$z=ny$$, for some non-zero integer $$n$$;
So, $$z=mnx$$.

Question: is z even? Note that $$z$$ will be even if either $$x$$ or $$y$$ is even

(1) $$xz$$ even --> either $$z$$ even, so the answer is directly YES or $$x$$ is even (or both). But if $$x$$ is even and as $$z=mnx$$ then z must be even too (one of the multiples of z is even, so z is even too). Sufficient.

(2) $$y$$ even --> as $$z=ny$$ then as one of the multiples of z even --> z even. Sufficient.

_________________

Kudos [?]: 128579 [6], given: 12180

SVP
Joined: 29 Aug 2007
Posts: 2472

Kudos [?]: 841 [1], given: 19

### Show Tags

19 Oct 2009, 23:18
1
KUDOS
amitgovin wrote:
The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

1) xz is even
2) y is even.

y/x = k where k is an integer.
y = xk ....................i

z/y = m where m is an integer.
z = ym = xkm .....................ii

If a factor is even, then the source of the factor must be even.

1) If xz is even, z must be even because x may or may not be an even because x is a factor of z but z must be even. SUFF.
2) If y is even, z must be even because y is a factor of z. SUFF..

D..
_________________

Gmat: http://gmatclub.com/forum/everything-you-need-to-prepare-for-the-gmat-revised-77983.html

GT

Kudos [?]: 841 [1], given: 19

Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 7670

Kudos [?]: 17334 [10], given: 232

Location: Pune, India

### Show Tags

02 Dec 2010, 11:16
10
KUDOS
Expert's post
2
This post was
BOOKMARKED
amitgovin wrote:
The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

1) xz is even

2) y is even.

Though Bunuel has provided the solution, I would just like to bring to your notice a train of thought.

When we say, "The positive integers x, y, and z are such that x is a factor of y and y is a factor of z.", it implies that if x or y is even, z will be even.

e.g. x = 4. Since x is a factor of y, y will be a multiple of 4 and will be even. Since z is a multiple of y, it will also be even. So, in a way, the 2 in x will drive through the entire sequence and make everything even.

Once this makes sense to you, it will take 10 secs to arrive at the solution.
Stmnt 1: Either x or z (or both which will happen if x is even) is even. In either case, z is even.
Stmnt 2: y is even, so z must be even
_________________

Karishma
Veritas Prep | GMAT Instructor
My Blog

Get started with Veritas Prep GMAT On Demand for $199 Veritas Prep Reviews Kudos [?]: 17334 [10], given: 232 Retired Moderator Status: 2000 posts! I don't know whether I should feel great or sad about it! LOL Joined: 04 Oct 2009 Posts: 1637 Kudos [?]: 1104 [0], given: 109 Location: Peru Schools: Harvard, Stanford, Wharton, MIT & HKS (Government) WE 1: Economic research WE 2: Banking WE 3: Government: Foreign Trade and SMEs Re: positive integers [#permalink] ### Show Tags 12 Dec 2010, 10:22 Bunuel, you always try to solve the questions algebraically, don't you? _________________ "Life’s battle doesn’t always go to stronger or faster men; but sooner or later the man who wins is the one who thinks he can." My Integrated Reasoning Logbook / Diary: http://gmatclub.com/forum/my-ir-logbook-diary-133264.html GMAT Club Premium Membership - big benefits and savings Kudos [?]: 1104 [0], given: 109 Math Expert Joined: 02 Sep 2009 Posts: 41873 Kudos [?]: 128579 [2], given: 12180 Re: positive integers [#permalink] ### Show Tags 12 Dec 2010, 10:48 2 This post received KUDOS Expert's post metallicafan wrote: Bunuel, you always try to solve the questions algebraically, don't you? Not at all. There are certain GMAT questions which are pretty much only solvable with plug-in or trial and error methods (well at leas in 2-3 minutes). Also many questions can be solved with logic and common sense much quicker than with algebraic approach. So you shouldn't always rely on algebra. Having said that I must add that there are of course other types of questions which are perfect for algebraic approach, plus I often use algebra just to explain a solution. _________________ Kudos [?]: 128579 [2], given: 12180 Intern Joined: 06 Dec 2010 Posts: 17 Kudos [?]: [0], given: 1 Re: positive integers [#permalink] ### Show Tags 12 Dec 2010, 19:36 I like to thing of the boxes method. If you draw them out, then x is inside y which is inside z. zx, a 2 will exist inside the box of either z or x (which is itself inside z) so YES y a 2 will exist inside the box of y which is itself z so YES Kudos [?]: [0], given: 1 Moderator Joined: 01 Sep 2010 Posts: 3355 Kudos [?]: 9042 [1], given: 1152 Re: positive integers [#permalink] ### Show Tags 26 Dec 2010, 17:37 1 This post received KUDOS VeritasPrepKarishma wrote: amitgovin wrote: The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even? 1) xz is even 2) y is even. Please explain. thanks. Though Bunuel has provided the solution, I would just like to bring to your notice a train of thought. When we say, "The positive integers x, y, and z are such that x is a factor of y and y is a factor of z.", it implies that if x or y is even, z will be even. e.g. x = 4. Since x is a factor of y, y will be a multiple of 4 and will be even. Since z is a multiple of y, it will also be even. So, in a way, the 2 in x will drive through the entire sequence and make everything even. Once this makes sense to you, it will take 10 secs to arrive at the solution. Stmnt 1: Either x or z (or both which will happen if x is even) is even. In either case, z is even. Stmnt 2: y is even, so z must be even awesome. your explanations and bunuel as well, are amazing thanks _________________ Kudos [?]: 9042 [1], given: 1152 Manager Joined: 19 Dec 2010 Posts: 136 Kudos [?]: 32 [0], given: 12 Re: positive integers [#permalink] ### Show Tags 17 Mar 2011, 23:07 Easy if you realize the following: When a is a factor of b AND b is a factor of c THEN a is a factor of c as well. Hence when either one of these numbers is even, the other has to be even too.. D Kudos [?]: 32 [0], given: 12 SVP Joined: 16 Nov 2010 Posts: 1599 Kudos [?]: 592 [0], given: 36 Location: United States (IN) Concentration: Strategy, Technology Re: positive integers [#permalink] ### Show Tags 17 Mar 2011, 23:52 z = ky y = mx so z = (km)xy (1) -> xz is eve means at least x or z is even, and if x = even, then z is also even as it has an even factor. 2 -> y is even so z having an even factor is even too. Answer D _________________ Formula of Life -> Achievement/Potential = k * Happiness (where k is a constant) GMAT Club Premium Membership - big benefits and savings Kudos [?]: 592 [0], given: 36 Intern Joined: 06 Sep 2010 Posts: 40 Kudos [?]: 7 [0], given: 0 Re: positive integers [#permalink] ### Show Tags 15 Apr 2011, 05:24 At first, mistook "factor" for "multiple" came with answer E. Later, understood that the problem was so easy...just plug and play !! Kudos [?]: 7 [0], given: 0 Manager Joined: 16 May 2011 Posts: 71 Kudos [?]: 18 [0], given: 2 Re: The positive integers x, y, and z are such that x is a [#permalink] ### Show Tags 24 Feb 2012, 10:06 if we plug and play, why can't we test X = 1? then y/n.. Kudos [?]: 18 [0], given: 2 Manager Joined: 21 Feb 2012 Posts: 116 Kudos [?]: 148 [0], given: 15 Location: India Concentration: Finance, General Management GMAT 1: 600 Q49 V23 GPA: 3.8 WE: Information Technology (Computer Software) Re: The positive integers x, y, and z are such that x is a [#permalink] ### Show Tags 24 Feb 2012, 10:46 The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even? 1) xz is even 2) y is even. Please explain. thanks.[/quote] Ans. let us take any 3 numbers, say x=3,y=18,z=54, or x=2,y=4,z=20 1)if xz is even then it means that either x or z is even,say that x is even, now there is no even number which is a factor of odd number, so z is definitely even, now if x is odd as in the above case, still then we can point out that z is even. 2)if y is even then it is clear that z will be even. Thus this question could be answered by any of the two questions. Kudos [?]: 148 [0], given: 15 Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 7670 Kudos [?]: 17334 [1], given: 232 Location: Pune, India Re: The positive integers x, y, and z are such that x is a [#permalink] ### Show Tags 27 Feb 2012, 05:20 1 This post received KUDOS Expert's post dchow23 wrote: if we plug and play, why can't we test X = 1? then y/n.. Plug in method would be far more painful for this question (and most other questions in my opinion). Think how you would go about it: Checking whether stmnt 1 is enough: xz is even If x = 1, y = 1 and z = 2 (so that xz is even), then z is even. If x = 2, y = 2 and z = 4, z is again even. Then you start thinking if you can take some values such that xz is even but z is not... Now you start using logic... Wouldn't you say it is far better to use logic in the first place itself? _________________ Karishma Veritas Prep | GMAT Instructor My Blog Get started with Veritas Prep GMAT On Demand for$199

Veritas Prep Reviews

Kudos [?]: 17334 [1], given: 232

Senior Manager
Joined: 13 Aug 2012
Posts: 459

Kudos [?]: 540 [0], given: 11

Concentration: Marketing, Finance
GPA: 3.23
Re: The positive integers x, y, and z are such that x is a [#permalink]

### Show Tags

22 Jan 2013, 22:49
amitgovin wrote:
The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

(1) xz is even
(2) y is even.

What is given?

$$z = y*N$$
$$y = x*R$$

1.
$$xz = 2*I$$
If x is even, then z is even since $$z = x*R$$
If z is even, then z is even.
SUFFICIENT!

2. $$y = 2*I$$ ==> $$z = 2*I*N$$ Definitely EVEN
SUFFICIENT!

_________________

Impossible is nothing to God.

Kudos [?]: 540 [0], given: 11

Director
Joined: 29 Nov 2012
Posts: 868

Kudos [?]: 1409 [0], given: 543

### Show Tags

03 Aug 2013, 02:04
Bunuel wrote:

(1) $$xz$$ even --> either $$z$$ even, so the answer is directly YES or $$x$$ is even (or both). But if $$x$$ is even and as $$z=mnx$$ then z must be even too (one of the multiples of z is even, so z is even too). Sufficient.

Can you please provide a numerical example for this part it isn't very clear. Thanks in advance!

I thought it was insufficient as there were multiple cases either X or Y even or both....
_________________

Click +1 Kudos if my post helped...

Amazing Free video explanation for all Quant questions from OG 13 and much more http://www.gmatquantum.com/og13th/

GMAT Prep software What if scenarios http://gmatclub.com/forum/gmat-prep-software-analysis-and-what-if-scenarios-146146.html

Kudos [?]: 1409 [0], given: 543

Verbal Forum Moderator
Joined: 10 Oct 2012
Posts: 627

Kudos [?]: 1355 [1], given: 136

### Show Tags

03 Aug 2013, 04:26
1
KUDOS
fozzzy wrote:
Bunuel wrote:

(1) $$xz$$ even --> either $$z$$ even, so the answer is directly YES or $$x$$ is even (or both). But if $$x$$ is even and as $$z=mnx$$ then z must be even too (one of the multiples of z is even, so z is even too). Sufficient.

Can you please provide a numerical example for this part it isn't very clear. Thanks in advance!

I thought it was insufficient as there were multiple cases either X or Y even or both....

We know that x is a factor of $$y \to y = Ix$$
Again, $$z = yI^'$$. Now, given that xz - even.

Case I:Assume that x = even , z = odd. Now, as x is even, y = even(I can be odd/even,doesn't matter).
Again, as y is even, z HAS to be even($$I^'$$ is odd/even, doesn't matter). Thus, if x is even, z IS even.
Numerical Example :y = 2*I(x=2).
$$z = 6*I^'$$. z IS even.

Case II : z is even OR (x and z) both are even.

Hope this helps.
_________________

Kudos [?]: 1355 [1], given: 136

Current Student
Joined: 06 Sep 2013
Posts: 1980

Kudos [?]: 719 [0], given: 355

Concentration: Finance

### Show Tags

10 Oct 2013, 15:01
Bunuel wrote:
amitgovin wrote:
The positive integers x, y, and z are such that x is a factor of y and y is a factor of z. Is z even?

(1) xz is even

(2) y is even.

Given:
x is a factor of y --> $$y=mx$$, for some non-zero integer $$m$$;
y is a factor of z --> $$z=ny$$, for some non-zero integer $$n$$;
So, $$z=mnx$$.

Question: is z even? Note that $$z$$ will be even if either $$x$$ or $$y$$ is even

(1) $$xz$$ even --> either $$z$$ even, so the answer is directly YES or $$x$$ is even (or both). But if $$x$$ is even and as $$z=mnx$$ then z must be even too (one of the multiples of z is even, so z is even too). Sufficient.

(2) $$y$$ even --> as $$z=ny$$ then as one of the multiples of z even --> z even. Sufficient.

Perfect explanation. Remember the factor foundation rule.
Also, other properties of factors that might be helpful to have in mind.

Just to remind you, The factor foundation rule states that "if a is a factor of b, and b is a factor of c, then a is a factor of c"
Also, if 'a' is a factor of 'b', and 'a' is a factor of 'c', then 'a' is a factor of (b+c). In fact, 'a' is a factor of (mb + nc) for all integers 'm' and 'n'
If 'a' is a factor of 'b' and 'b' is a factor of 'a', then 'a=b'
If 'a' is a factor of 'bc' and gcd (a,b) = 1, then 'a' is a factor of 'c'
If 'p' is a prime number and 'p' is a factor of 'ab' then 'p' is a factor of 'a' or 'p' is a factor of 'b'
In other words,, any integer is divisible by all of its factors- and it is also divisible by all of the factors of its factors

Hope it helps

Kudos [?]: 719 [0], given: 355

GMAT Club Legend
Joined: 09 Sep 2013
Posts: 16758

Kudos [?]: 273 [0], given: 0

Re: The positive integers x, y, and z are such that x is a [#permalink]

### Show Tags

30 Jan 2015, 14:25
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________

Kudos [?]: 273 [0], given: 0

GMAT Club Legend
Joined: 09 Sep 2013
Posts: 16758

Kudos [?]: 273 [0], given: 0

Re: The positive integers x, y, and z are such that x is a [#permalink]

### Show Tags

05 Feb 2016, 17:31
Hello from the GMAT Club BumpBot!

Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos).

Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email.
_________________

Kudos [?]: 273 [0], given: 0

Re: The positive integers x, y, and z are such that x is a   [#permalink] 05 Feb 2016, 17:31

Go to page    1   2    Next  [ 24 posts ]

Display posts from previous: Sort by


# Generating a convex hull with the hull boundary points labeled

I'm very new to Mathematica, and I'm sure my question is trivial.

Suppose a have a (long) list whose elements are of the form {{x, y}, n}, where x and y are Real, and n is an Integer. I'd like to plot the convex hull of the corresponding points {x, y} in the plane. Moreover, for each point {x, y} that is a vertex of the convex hull should appear with its corresponding label n. Finally I'd like the coordinate axes to be displayed with the plot.

### Revision

Contrive some data.

SeedRandom[42];
With[{n = 42},
data = Transpose[{RandomReal[1., {n, 2}], RandomSample[Range[100], n]}]];
Short[data, 3]

{{{0.425905, 0.391023}, 51}, <<40>>, {{0.359445, 0.00772549},24}}

Separating the points from the labels.

pts = data[[All, 1]];
lbls = data[[All, 2]];

Generating the convex hull.

ch = ConvexHullMesh[pts];

Extracting the boundary point labels.

bpts = MeshCoordinates[RegionBoundary[ch]];
blbls = Extract[lbls, Flatten[Position[pts, #] & /@ bpts, 1]]

{94, 36, 21, 1, 88, 2, 14, 24}

Making the labels into graphics elements.

labels = MapThread[Text[#1, #2] &, {blbls, bpts}];

Showing the combined graphics.

Show[ch, Graphics[{Point[pts], labels}], Axes -> True]

Of course, the labels can be fancied up by using Inset rather than Text

labels =
Inset[
Graphics[{FaceForm[White], EdgeForm[Black], Disk[], Text[Style[#1, 9]]}],
#2, Automatic, Scaled[.0475]] &,
{blbls, bpts}];
Show[ch, Graphics[{Point[pts], labels}],
Method -> {"AxesInFront" -> False}, Axes -> True]

• My label is not necessarily the index. Jul 4 '17 at 23:35
• @JairoBochi. I have revised my answer in a way that I hope you find better attuned to your needs. Jul 5 '17 at 2:19
• @MichaelE2 Right, I should have provided sample data, sorry. Jul 5 '17 at 22:39
• @JairoBochi. Your nagging me about the indices motivated me to improve my answer, so I'm glad you did it. Jul 6 '17 at 5:02
SeedRandom[1]
data = Transpose[{RandomReal[1, {10, 2}], RandomInteger[100, 10]}];

xy = data[[All,1]];
labels = data[[All,2]];

ConvexHullMesh[xy,  Prolog -> Point[xy], Frame -> True,
MeshCellStyle -> {2 -> Opacity[0.5, LightBlue]},
MeshCellShapeFunction -> {0 -> ({Opacity[1, Yellow], Disk[#, .05],
Text[Style[# /. rule, Red, 16], #]} &)}]

Also

labeled = Labeled[#, # /. rule] & /@ MeshCoordinates[ConvexHullMesh[xy]];

Show[ConvexHullMesh[xy], ListPlot[labeled], Graphics[Point[xy]], Frame ->True]

• I understand that you generate the plot from two lists, "xy" and "labels". But my list is given of the form "data". So I would need to extract "xy" and "labels" from data to have a working solution... Jul 4 '17 at 23:48
– kglr
Jul 4 '17 at 23:52

There are potential shortcomings in using Rule to map points to labels, which I have occasionally come across. The purpose in creating a NearestFunction using Nearest below to map coordinates {x, y} to a label is overcome these shortcoming, at only a small expense of computational time. Given the general nature of the question, this seemed the best approach.

Often in an application, one might arrive at coordinates in various ways. If we're using floating-point numbers, rounding error might make simple rules of the form {x, y} -> label fail, because the coordinates {x, y} of the rule might not exactly match the computed coordinates in the figure. Or one might start with exact coordinates, which at some point might be numericized (converted to floating point), and again the replacement rule will fail. Nearest takes care of those issues, unless rounding error is so great that one computed point ends up closer to a different point than the intended one (in such a case, the problem is completely different, a numerics one). Whether or not to numericized the points with N[] depends on whether data is already numericized; it's not strictly necessary in either case, but it should speed up nf, which might be an issue with a very long list data.

points = data[[All, 1]];
nf = Nearest[N@points -> data[[All, 2]]]; (* map coordinates to labels in data *)
hull = ConvexHullMesh[data[[All, 1]]];

With[{coords = MeshCoordinates[hull]},
Show[
MeshRegion[
coords,
MeshCells[hull, 2],
MeshCellLabel -> Table[{0, i} -> First@nf[coords[[i]]], {i, Length@coords}]
],
Axes -> True] (* or Frame -> True *)
]


# covering designs of the form $(v,k,2)$

A covering design $(v,k,t)$ is a family of subsets of $[v]$ each having $k$ elements such that given any subset of $[v]$ of $t$ elements it is a subset of one of the sets of the family. A problem is to find the minimum number of subsets such a family can have.

I am interested in the case $(v,k,2)$. It seems to be equivalent to the problem of finding the minimum number of copies of $K_k$ that are needed to cover the graph $K_v$.

When $k=3$ this problem may be solved optimally with a Steiner triple system if it exists, which happens if and only if $v$ is $1$ or $3 \bmod 6$, in this case $\frac{v(v-1)}{6}$ subsets are required.

My questions are the following:

• Is the minimum of subsets for $(v,3,2)$ known when the congruence does not hold?
• If not what are good bounds?
• Does the problem with $t=2$ have another name (It seems like it may be more common than the general covering design)
• Is the minimum number of subsets for $(v,k,2)$ known?
• If not, which are some good bounds (specific values of $k$ are also welcome)
• I would call the covering designs $\ (v\ k\ 2)\$-- sloppy planes. – Włodzimierz Holsztyński Jan 3 '15 at 22:28
• Your $\ \frac{n(n-1)}2\$ must be a typo(?). A simple calculation shows that the number of 3-subset of a $\ (\nu\ 3\ 2)\$ perfect system must be $\ \frac{\nu\cdot(\nu-1)}3\$ (it's $\ 3,\$ not $\ 2,\$ in the denominator). Also then $\ \nu\equiv 1\ or\ 3\mod 6\$ (rather than $\ 0\ or\ 3).\$ Thus I feel that it would be nice and useful for non-specialists like me to have a short list of basic results in a separate Answer. – Włodzimierz Holsztyński Jan 4 '15 at 1:43
• @WłodzimierzHolsztyński You can find basic facts in the paper I linked to in my post (or those given by Thomas Kalinowski as well, I think). Handbook of Combinatorial Designs is a good reference book for this sort of basic knowledge; coverings are treated in Section 11 of Chapter IV in the 2nd edition. As for the typos, yes, they are not correct, although the number of $3$-subsets in this case is not $\frac{v(v-1)}{3}$ but $\frac{\binom{v}{2}}{\binom{3}{2}} = \frac{v(v-1)}{6}$. I'll edit OP's post. – Yuichiro Fujiwara Jan 4 '15 at 6:31
• @YuichiroFujiwara -- thank you for the links. And I let $\ \frac{\binom{\nu}2}{\binom 32}=\frac{\nu\cdot (\nu-1)}{3\cdot 2}\$ to have somehow just $\ 3\$ in the denominator--ooops! Sorry. – Włodzimierz Holsztyński Jan 4 '15 at 6:46

Edit: The possible "gap" of sort in Caro and Yuster's proof of their upper bound has just been fixed! See Ben Barber's comment below (and his joint paper with Daniela Kühn, Allan Lo and Deryk Osthus on arXiv. This shows Gustavsson's theorem (whose proof by Gustavsson himself might have been regarded as incomplete but was used by Caro and Yuster). So this result proves the general upper bound on the smallest coverings mentioned in Thomas Kalinowski's post is indeed correct.

The most up to date account (except the above mentioned paper) on the minimum number of subsets for a $(v,k,2)$ covering is here:

Y. M. Chee, C. J. Colbourn, A. C. H. Ling, R. M. Wilson, Covering and packing for pairs, J. Combin. Theory Ser. A 120 (2013) 1440–1449.

One important remark about Thomas Kalinowski's answer is that the asymptotic solution by Caro and Yuster may be incomplete, although the claimed upper bound is likely the correct one. They rely on Gustavsson's theorem on graph decomposition (Lemma 2.1 in Caro and Yuster's paper), which is claimed to be proved in the following thesis:

T. Gustavsson, Decompositions of Large Graphs and Digraphs with High Minimum Degree,'' Doctoral Dissertation, Dept. of Mathematics, Univ. of Stockholm, 1991.

However, here's an excerpt from the 2013 paper by Chee, Colbourn, Ling, and Wilson:

Their approach relies in an essential manner on a strong statement by Gustavsson:

Proposition 1.1: . Let $H$ be a graph with $v$ vertices and $h$ edges, having degree sequence $(d_1,\dots,d_v)$. Then there exist a constant $N_H$ and a constant $\epsilon_H>0$, both depending only on $H$, such that for all $n>N_H$, if $G$ is a graph on $n$ vertices, $m$ edges, and degree sequence $(\delta_1,\dots,\delta_n)$ so that $\min(\delta_1,\dots,\delta_n) \geq n(1−\epsilon_H)$, $\gcd(d_1,\dots,d_v)\ \vert\ \gcd(\delta_1,\dots,\delta_n)$, and $h\ \vert\ m$, then $G$ has an edge partition (decomposition) into graphs isomorphic to $H$.

We have not been able to verify the proof of Proposition 1.1. Indeed, while the result has been used a number of times in the literature, no satisfactory proof of it appears there. While we expect that the statement is true, we do not think that the proof in [12] is sufficient at this time to employ the statement as a foundation for further results. Therefore we adopt a strategy that is completely independent of Proposition 1.1, and independent of the results built on it.

So, one might want to be careful about Caro and Yuster's claimed solution. Chee, Colbourn, Ling, and Wilson gave a slightly weaker upper bound on the minimum size of a $(v,k,2)$ covering, which essentially states that for sufficiently large $v$, Caro and Yuster's claimed upper bound is correct within a constant that depends on $k$. (And the proof of Gustavsson's theorem by Barber, Kühn, Lo and Osthus shows it is correct.)

• Together with Daniela Kühn, Allan Lo and Deryk Osthus I have a submitted a paper that proves that statement of Gustavsson and gives quantitative bounds on the value of $\epsilon_H$. The most recent version can be found on the arXiv. arxiv.org/abs/1410.5750 – Ben Barber Jan 5 '15 at 13:35
• @BenBarber That's awesome! Thank you for the comment and link, and thank you for your work! – Yuichiro Fujiwara Jan 5 '15 at 13:40
• And please feel free to make this post more informative and/or correct errors, or post another answer. – Yuichiro Fujiwara Jan 5 '15 at 14:55

Fort and Hedlund determined the minimum size of a $(v,3,2)$-covering design: Minimal coverings of pairs by triples, Pacific J. Math. 8(4), 709-719, 1958.

The case $(v,4,2)$ was solved by Mills: On the covering of pairs by quadruples I, JCTA 13, 55–78, 1972 and II, JCTA 15, 138–166 (1973).

For the case $(v,5,2)$ with $v\equiv 0\pmod 4$, Abel, Assaf, Bennett, Bluskov and Greig established that the Schönheim bound $\left\lceil\frac{v}{5}\left\lceil \frac{v-1}{4}\right\rceil\right\rceil$ is tight for $v\geqslant 28$ with 17 possible exceptions in the range $40\leqslant v\leqslant 280$: Pair covering designs with block size 5, Discrete Mathematics 307(14), 1776-1791, 2007.

The same authors have results for $(v,6,2)$: Pair covering and other designs with block size 6, J Comb Des 15(6), 511-533, 2007

Caro and Yuster proved that for sufficiently large $v$ the minimum size of a $(v,k,2)$ covering design is $\left\lceil\frac{v}{k}\left\lceil \frac{v-1}{k-1}\right\rceil\right\rceil$: Covering Graphs: The Covering Problem Solved, JCTA 83 (2) 273–282, 1998.

The La Jolla Covering repository is a good source for covering designs. According to this table the smallest open case with $t=2$ is $(v,k,t)=(23,6,2)$ where the minimum size is either 20 or 21.

• Thanks, that's usefull, I allready knew about la Jolla, the second source is great! Do you know if there has been any work on the bounds for arbitrary $(v,k,2)$? – Jorge Fernández Jan 3 '15 at 21:24
• I know there are resuts for $(v,k,t)$ in general, but I though maybe with $(v,k,2)$ they could be sharper – Jorge Fernández Jan 3 '15 at 21:25
• Caro and Yuster's proof might be incomplete (although the statement itself is probably correct). See my answer (and the paper I linked to) for more detail. – Yuichiro Fujiwara Jan 3 '15 at 23:41


# How to prove and interpret $\operatorname{rank}(AB) \leq \operatorname{min}(\operatorname{rank}(A), \operatorname{rank}(B))$?

Let $$A$$ and $$B$$ be two matrices which can be multiplied. Then $$\operatorname{rank}(AB) \leq \operatorname{min}(\operatorname{rank}(A), \operatorname{rank}(B)).$$

I proved $$\operatorname{rank}(AB) \leq \operatorname{rank}(B)$$ by interpreting $$AB$$ as a composition of linear maps, observing that $$\operatorname{ker}(B) \subseteq \operatorname{ker}(AB)$$ and using the kernel-image dimension formula. This also provides, in my opinion, a nice interpretation: if non-stable, under subsequent compositions the kernel can only get bigger, and the image can only get smaller, in a sort of loss of information.

How do you manage $$\operatorname{rank}(AB) \leq \operatorname{rank}(A)$$? Is there a nice interpretation like the previous one?

• Your proof is fine. Furthermore, the same reasoning will get your desired fact. Again rank-nullity will tell you that the dimension of your vector space minus the dimension of the kernel will give you the rank. Jul 28, 2010 at 16:08

Yes. If you think of A and B as linear maps, then the domain of A is certainly at least as big as the image of B. Thus when we apply A to either of these things, we should get "more stuff" in the former case, as the former is bigger than the latter.

• Thank you. I was so obsessed with the kernel-image dimension formula that I could't recognize this simple fact.
– user365
Jul 30, 2010 at 8:52

Once you have proved $$\operatorname{rank}(AB) \le \operatorname{rank}(A)$$, you can obtain the other inequality by using transposition and the fact that it doesn't change the rank (see e.g. this question).

Specifically, letting $$C=A^T$$ and $$D=B^T$$, we have that $$\operatorname{rank}(DC) \le \operatorname{rank}(D) \implies \operatorname{rank}(C^TD^T)\le \operatorname{rank} (D^T)$$, which is $$\operatorname{rank}(AB) \le \operatorname{rank}(B)$$.

• Very nice! Thank you.
– user365
Sep 2, 2010 at 10:01
• I am doing this problem now too. Why is proving both inequalities enough? Where does the proof take the min idea into account? Apr 12, 2016 at 3:27
• @MathisHard $x<y \wedge x<z \implies x<\min(y,z)$. May 25, 2018 at 15:47

Note that $$\text{Col}(AB) ⊆ \text{Col}(A)$$ since given $$y ∈ \text{Col}(AB)$$ we can choose $$x ∈ F$$ and then we have $$y = (AB)x = A(Bx) ∈ \text{Col}(A)$$.

Since $$\text{Col}(AB) ⊆ \text{Col}(A)$$, any basis for $$\text{Col}(AB)$$ can be extended to a basis for $$\text{Col}(A)$$ and so $$\dim \text{Col}(AB) ≤ \dim \text{Col}(A)$$, that is $$\text{rk}(AB) ≤ \text{rk}(A).$$

Note that $$\text{Null}(B) ⊆ \text{Null}(AB)$$ since given $$x ∈ \text{Null}(B)$$ we have $$(AB)x = A(Bx) = A 0 = 0$$ so that $$x ∈ \text{Null}(AB)$$.

Since $$\text{Null}(B) ⊆ \text{Null}(AB)$$, as above we have $$\dim \text{Null}(B) ≤ \dim \text{Null}(AB)$$, that is, $$\text{Nullity}(B) ≤\text{Nullity}(AB)$$. Thus $$\text{rk}(AB) = n − \text{Nullity}(AB) ≤ n − \text{Nullity}(B) = \text{rk}(B).$$

• You should use MathJax to format your answer. Oct 15, 2015 at 21:06
• Very nice proof! +1
– ZFR
Apr 23, 2020 at 1:41

Prove first that if $f:X\to Y$ and $g:Y\to Z$ are functions between finite sets, then $|g(f(X))| \leq \min \{ |f(X)|, |g(Y)| \}.$

Then use the same idea.

• Categorification... :-) Jul 29, 2010 at 21:50
• I am not familiar with the 'categorification'. How can one go from this to the rank inequality ? What functor is to be applied ? Apr 13, 2014 at 12:10
• So you're saying that rank of linear map is somehow like image of a function? Feb 12, 2015 at 10:15
• @Mihail, it is like the size of the image of a function. in fact, if $f$ is a linear map, the rank of $f$ is the dimension of the image of $f$ and the dimension is a measure of the size of a space. Feb 12, 2015 at 18:22

Here is another simple answer. When you multiply a matrix and a vector $Ax$ you end up with a linear combination of the columns of $A$.

$$Ax = \; x_1\,A_1 \;+\; x_2\,A_2 \;+\; x_3\,A_3 \;+\;\; ...\;\; \\$$

When we multiply two matrices $AB = C$, we have $AB_i = C_i$, which means that each column of $C$ is a linear combination of the columns of $A$, so $\text{rank}(AB) \leq \text{rank}(A)$. To show that $\text{rank}(AB) \leq \text{rank}(B)$ we follow a similar argument -- when you multiply $x^{\top}B$, you end up with a linear combination of the rows of $B$.

Already you have proved $$rank(AB)\leq rank(B)$$

For other part

rank of $A=$ dim range $A$

As range $AB \subset$ range $A\implies$ dim range $AB\leq$ dim range $A$ . Hence $$rank(AB)\leq rank (A)$$

• Hello!! Why does it hold that "range AB $\subset$ range A" ? Jan 7, 2017 at 10:01
• If $x\in$ range $AB,$ then $x=(AB)y$ for some $y.$ Thus $x=A(By).$ Thus $x\in$ range $A.$@ Mary Star Jan 8, 2017 at 17:48

Let $m \le n, A \in M_{m\times n}, B\in M_{n\times m}$.

$\mbox{rank } A\le m$ and $\text{rank }B\le m$. (Obvious fact as rank A = dimension of the columnspace of A = dimension of the row space of A.)

Let $E_{n\times n}B$ be the row echelon form of $B$ and let $AE_{m\times m}$ be the column echelon form of $A$. ($E_{n\times n} ,E_{m\times m}$ are elementary matrices.)

We know $\operatorname{rank}(BA)=\operatorname{rank}(E_{n\times n}BA )=\operatorname{rank}(E_{n\times n}BAE_{m\times m} )$.

But $E_{n\times n}BAE_{m\times m} =\begin{pmatrix} L&0\\ 0&0\\ \end{pmatrix},$ where $L$ is an $k\times l$ matrix with $k\le \operatorname{rank}(B),l\le \operatorname{rank}(A)$.

So $\operatorname{rank}(E_{n\times n}BAE_{m\times m} )=\operatorname{rank}\begin{pmatrix} L&0\\ 0&0\\ \end{pmatrix}\le \min\{k,l\}\le \min\{\mbox{rank } A,\mbox{rank }B\}.$

Another way of showing that $\text{Rank} (AB) \leq \text{Rank}(B)$ without using rank-nullity: Note that if $v_1,\dots,v_n$ is a basis of $\text{Range} B$, then $Av_1,\dots,Av_n$ is a spanning list of $\text{Range} AB$.

Each column of $$AB$$ is a linear combination of columns of $$A$$ so $$\text{Range}(AB)\subseteq \text{Range} (A)$$ equivalently $$rank(AB)\leq rank(A).$$

Similarly, Each row of $$AB$$ is a linear combination of rows of $$B$$ so $$rowspace(AB)\subseteq rowspace(B)$$.

Since rowspace=columnspace. Thus $$rank(AB)\leq rank(B)$$.

From both of the inequality we deduce that $$rank(AB)\leq \min\{rank A, rank B\}$$.


# Groups with “few” subgroups

If $G$ is a finite group of order $n,$ and the number of divisors of $n$ is $k,$ can $G$ have fewer than $k$ subgroups?

A cyclic group $G$ of order $n$ has exactly one subgroup for each divisor of $n$, so in this case $G$ has exactly $k$ subgroups.

For the alternating group $G=A_4,$ $n=12$ and $k=6.$ There is no subgroup of order $6$ in $A_4,$ yet there are ten subgroups, which exceeds $k=6$ for this case. I began to wonder if there could be a group for which so many divisors of the order of $G$ had no subgroups of that order, that there wound up being fewer subgroups in $G$ than the number of divisors of $|G|,$ hence my question.

• Recall that a CLT (Converse of Lagrange's Theorem) group is a group with the property that for any divisor of the order of the group there exists a subgroup of that order. Since it is known that finite abelian groups, as well as $p$-groups are CLT groups, this leaves a smaller class of subgroups to consider. – user1337 Apr 23 '15 at 13:16
• A finite group $G$ of order $n$ such that the number of elements $x$ with $x^d=1$ is less than $d$ for all divisors $d$ of $n$ has to be cyclic. I wonder, if a variation of this topic can lead to a proof that there are at least as many subgroups as divisors. – j.p. Apr 23 '15 at 13:24
• @j.p. That idea looks promising. One thing, should the phrase "is less than $d$" be replaced by "is at most $d$" in your comment? [though that would imply your version, I seem to recall one approach to doing the counting argument for showing some group is cyclic as involving the number being at most $d$] And +1 on the comment. – coffeemath Apr 23 '15 at 13:42
• A short script in Maple shows that there are no such groups among the 793 groups of order $< 2^5 \cdot 3 = 96$. – Travis Willse Apr 23 '15 at 13:43
• @coffeemath: Yes, you are right. It should have been "at most". – j.p. Apr 23 '15 at 14:04

The answer to your question is no, that is not possible. This is a consequence of the following slightly more general result. Let $d(n)$ is the number of divisors of $n$.

Theorem Let $G$ be a finite group of order $n$. Then for any divisor $m$ of $n$, there exist at least $d(m)$ subgroups of $G$ of order dividing $m$.

Proof We prove the statement by induction on $m$, for all finite groups $G$. It's clear for $m=1$.

For $m>1$, let $p$ be a prime dividing $m$, and let $m = p^r k$ with $\gcd(p,k)=1$.

Since $d(m) = (r+1)d(k)$, it is sufficient to prove that, for each $i$ with $0 \le i \le r$, there are at least $d(k)$ subgroups of $G$ of order $p^i j$, for some $j$ that divides $k$.

So fix an $i$, let $P$ be any subgroup of $G$ of order $p^i$, let $N = N_G(P)$ be the normalizer of $P$ in $G$, and let $h = \gcd(|N|,k)$.

Since $h \le k < m$ and $h$ divides $|N/P|$, by inductive hypothesis, the number $s$ of subgroups $S/P$ of $N/P$ of order dividing $h$ satisfies $s \ge d(h)$. For each of these subgroups, the inverse image $S$ of $S/P$ in $N/P$ is a subgroup of $G$ of order $p^i j$, where $|S/P| = j$ divides $h$, and so $j$ divides $k$.

Now $P$ has $|G|/|N|$ distinct conjugates $P^g$ in $G$, and the $s|G|/|N|$ subgroups $S^g$ are all distinct. But $|G|/|N| \ge k/h$, so $s|G|/|N| \ge d(h)k/h \ge d(k)$, which completes the proof.

After thinking about it again, I think we can say that a group of order $n$ with exactly $d(n)$ subgroups must be cyclic. The above proof produces at least $d(n)$ subgroups with a normal $p$-subgroup for any prime divisor $p$ of $n$. So if there were exactly $d(n)$ subgroups, then all subgroups would have all of their Sylow subgroups normal, so they would all, including $G$ itself, be nilpotent. But a non-cyclic $p$-group $P$ has more than one subgroup of index $p$, and hence has more than $d(|P|)$ subgroups, so all Sylow subgroups of $G$ are cyclic and hence so is $G$.

By the way, I first posted this proof here in 2003. I would welcome any references to any other proofs.

• Derek-- Nice proof (seems to me). +1 on it for now, and likely I'll "accept" after I get a chance to go over it in detail. – coffeemath Apr 23 '15 at 14:46
• How do you know that $P$ exist ? – Belgi Apr 23 '15 at 14:57
• @Belgi $G$ has a $p$-Sylow subgroup $T$. Let's say $T$ is of size $p^k$; then $T$ will have a subgroup of order $p^i$ provided $i\leq k$. – mathmandan Apr 23 '15 at 15:06
• @mathmandan - How do you know such subgroups of $T$ exist ? – Belgi Apr 23 '15 at 15:10
• I was thinking of the proof as an induction on $m$ for all $n$ simultaneously. That is, when doing the proof for $m$, we assume that the result is true for all smaller $m$ and all $n$. We don't use induction on $n$ anywhere. I remember when thinking about this originally, the chief problem was to get an induction to work, and the key idea in the proof is actually to induct on $m$ rather than on $n$. – Derek Holt Apr 23 '15 at 17:06


# Generating Sets From Given Information

The problem I am working on is:

The three most popular options on a certain type of new car are a built-in GPS (A), a sunroof (B), and an automatic transmission (C). If 40% of all purchasers request A, 55% request B, 70% request C, 63% request A or B, 77% request A or C, 80% request B or C, and 85% request A or B or C, determine the probabilities of the following events. [Hint: “Aor B” is the event that at least one of the two options is requested; try drawing a Venn diagram and labeling all regions.]

a.The next purchaser will request at least one of the three options.

b.The next purchaser will select none of the three options.

c. The next purchaser will request only an automatic transmission and not either of the other two options.

d.The next purchaser will select exactly one of these three options.

I am absolutely positive that $P(A)=40\%$, $P(B)=55\%$, $P(C)=70\%$, and $P(A \cup B \cup C)=85\%$. However, the pieces of data I am not quite certain about are $P(A \cup B \cap C')=63\%$, $P(A \cup C \cap B')=77\%$, $P(B \cup C \cap A')=80\%$, do these values correspond to the rest of the data? If so, then I seems nearly impossible to be able to generate the Venn Diagram. Could someone help?

EDIT: What I am having a difficult time interpreting is, when they say in the question, "...63% request A or B." To me, that says only A or only B; and under this interpretation I would write $P(A \cup B \cap C')=63\%$. Under André Nicolas' interpretation, "63% request A or B," means $P(A \cup B)=63\%$. If it is the case that André Nicolas is correct, then it seems like they should have stated in the question, "63% request A or B, A and C, B and C, or A and B and C."

Also, I solved the problem under André Nicolas' assumption, and for part d), I know the answer but I am sure how to put in it math symbols. How would I do that?

-

Here is a start:

a) The answer to this is written down in the data: It is $\Pr(A\cup B\cup C)$.

b) This can be immediately written down from the answer to a).

As for the rest of the probabilities, we need to work. It can be figured out completely from a Venn diagram. But since one cannot point to a picture on a blackboard, what follows will be formula-heavy.

Recall that $$\Pr(X\cup Y)=\Pr(X)+\Pr(Y)-\Pr(X\cap Y).\tag{1}$$

We know $\Pr(A)$, $\Pr(B)$, and $\Pr(A\cup B)$. Using Formula $(1)$, we can see that $0.63=0.40+0.55-\Pr(A\cap B)$. That gives $\Pr(A\cap B)=0.32$.

Similarly, we can find $\Pr(A\cap C)$ and $\Pr(B\cap C)$ from the given information.

Recall also that

$$\Pr(A\cup B\cup C)=\Pr(A)+\Pr(B)+\Pr(C)-\Pr(A\cap B)-\Pr(A\cap C)-\Pr(B\cap C)+\Pr(A\cap B\cap C).$$

We are told $\Pr(A\cup B\cup C)$, and we computed the next three items in the above formula, so now we know $\Pr(A\cap B\cap C)$.

OK, time to fill in the bits in the Venn Diagram. First write the computed $\Pr(A\cap B\cap C)$ in the space where it should go.

We know $\Pr(A\cap B)$. Since we also know $\Pr(A\cap B\cap C)$, we can find the probability of "the rest of" $A\cap B)$, called $A\cap B\cap C'$ in set language. Compute, write the number in.

Do the same for the other similar bits, namely $A\cap C\cap B'$ and $B\cap C\cap A'$.

Now from $\Pr(A)$ you can find the probability of the "outside" part of $A$, that is, $\Pr(A\cap B'\cap C')$. Do the same for the "outside" part of $B$, also the "outside" part of $C$.

The probability of the outer world $A'\cap B'\cap C'$ of cheapskates who want nothing can now be found in various ways.

We now know everything, and can answer any question!

Remark: You can be more fancy, and let $X$, $Y$, and $Z$ respectively be $A'$, $B'$, and $C'$. By taking every one of the given numbers and subtracting it from $1$, you can write down immediately $\Pr(X)$ (namely $1-0.40$), $\Pr(Y)$, $\Pr(Z)$, $\Pr(X\cap Y)$, and so on. Now we end up with a problem of a type that you have probably done several times.

-
So, in the question, when it said something like, "63% request A or B," you assumed that two be $P(A \cup B)=63\%$? Why isn't it really $P(A \cup B \cap C')=63\%$? If you take, "63% request A or B," to mean the former, why wouldn't you include something about C? Because when you write the Venn diagram, A and B both intersect C. –  Mack Feb 1 '13 at 14:56
The reason I ask is because $P(A \cup B)$ also includes the probability of getting $A$ and $C$ and $B$ and $C$, and it just seems odd that you wouldn't mention something like that in the question. –  Mack Feb 1 '13 at 15:17
@EliMackenzie: The problem setter should make things clear. But I am reasonably sure that the intent here is that "or" be interpreted as $\lor$, logical or, meaning in this case union. There is a somewhat similar potential issue with "and" in standard Venn diagram work problems. When I say $A$ and $B$, does that imply anything about $C$, $D$? No, and you are accustomed to that. –  André Nicolas Feb 1 '13 at 16:49
One can also go through the Venn diagram, trying to see whether your interpretation is numerically consistent with the data. The probabilities of $A\lor B$, $B\lor C$, $A\lor C$ are quite large, one can't find a Venn diagram that works. Some of the percentages of "subareas" would turn out negative. –  André Nicolas Feb 1 '13 at 16:56
Also, if you look at the text of the problem, it says explicitly as a hint what is meant by $A$ or $B$. That is neutral about $C$. It looks as if the problem setter was worried people might have trouble with the meaning of or. –  André Nicolas Feb 1 '13 at 17:03


# legendreP

Legendre polynomials

## Description

example

legendreP(n,x) returns the nth degree Legendre polynomial at x.

## Examples

### Find Legendre Polynomials for Numeric and Symbolic Inputs

Find the Legendre polynomial of degree 3 at 5.6.

legendreP(3,5.6)
ans =
430.6400

Find the Legendre polynomial of degree 2 at x.

syms x
legendreP(2,x)
ans =
(3*x^2)/2 - 1/2

If you do not specify a numerical value for the degree n, the legendreP function cannot find the explicit form of the polynomial and returns the function call.

syms n
legendreP(n,x)
ans =
legendreP(n, x)

### Find Legendre Polynomial with Vector and Matrix Inputs

Find the Legendre polynomials of degrees 1 and 2 by setting n = [1 2].

syms x
legendreP([1 2],x)
ans =
[ x, (3*x^2)/2 - 1/2]

legendreP acts element-wise on n to return a vector with two elements.

If multiple inputs are specified as a vector, matrix, or multidimensional array, the inputs must be the same size. Find the Legendre polynomials where input arguments n and x are matrices.

n = [2 3; 1 2];
xM = [x^2 11/7; -3.2 -x];
legendreP(n,xM)
ans =
[ (3*x^4)/2 - 1/2,        2519/343]
[           -16/5, (3*x^2)/2 - 1/2]

legendreP acts element-wise on n and x to return a matrix of the same size as n and x.

### Differentiate and Find Limits of Legendre Polynomials

Use limit to find the limit of a Legendre polynomial of degree 3 as x tends to -∞.

syms x
expr = legendreP(4,x);
limit(expr,x,-Inf)
ans =
Inf

Use diff to find the third derivative of the Legendre polynomial of degree 5.

syms n
expr = legendreP(5,x);
diff(expr,x,3)
ans =
(945*x^2)/2 - 105/2

### Find Taylor Series Expansion of Legendre Polynomial

Use taylor to find the Taylor series expansion of the Legendre polynomial of degree 2 at x = 0.

syms x
expr = legendreP(2,x);
taylor(expr,x)
ans =
(3*x^2)/2 - 1/2

### Plot Legendre Polynomials

Plot Legendre polynomials of orders 1 through 4.

syms x y
fplot(legendreP(1:4, x))
axis([-1.5 1.5 -1 1])
grid on

ylabel('P_n(x)')
title('Legendre polynomials of degrees 1 through 4')
legend('1','2','3','4','Location','best')

### Find Roots of Legendre Polynomial

Use vpasolve to find the roots of the Legendre polynomial of degree 7.

syms x
roots = vpasolve(legendreP(7,x) == 0)
roots =
-0.94910791234275852452618968404785
-0.74153118559939443986386477328079
-0.40584515137739716690660641207696
0
0.40584515137739716690660641207696
0.74153118559939443986386477328079
0.94910791234275852452618968404785

## Input Arguments

collapse all

Degree of polynomial, specified as a nonnegative number, vector, matrix, multidimensional array, or a symbolic number, vector, matrix, function, or multidimensional array. All elements of nonscalar inputs should be nonnegative integers or symbols.

Input, specified as a number, vector, matrix, multidimensional array, or a symbolic number, vector, matrix, function, or multidimensional array.

collapse all

### Legendre Polynomial

• The Legendre polynomials are defined as

$P\left(n,x\right)=\frac{1}{{2}^{n}n!}\frac{{d}^{n}}{d{x}^{n}}{\left({x}^{2}-1\right)}^{n}.$

• The Legendre polynomials satisfy the recursion formula

$\begin{array}{l}P\left(n,x\right)=\frac{2n-1}{n}xP\left(n-1,x\right)-\frac{n-1}{n}P\left(n-2,x\right),\\ \text{where}\\ P\left(0,x\right)=1\\ P\left(1,x\right)=x.\end{array}$

• The Legendre polynomials are orthogonal on the interval [-1,1] with respect to the weight function w(x) = 1, where

• The relation with Gegenbauer polynomials G(n,a,x) is

$P\left(n,x\right)=G\left(n,\frac{1}{2},x\right).$

• The relation with Jacobi polynomials P(n,a,b,x) is

$P\left(n,x\right)=P\left(n,0,0,x\right).$


# Meaning of a Subspace

## Main Question or Discussion Point

Hi PF!

I want to make sure I understand the notion of a subspace. Our professor gave an example of one: the set of degree n polynomials is a subspace of continuous functions. This is because a) a polynomial is intrinsically a subset of continuous functions and b) summing any polynomials yields another polynomial (closed under addition) and c) any polynomial multiplied by a constant is still a polynomial (closed under scalar multiplication).

If my reasoning is correct, then I think the set of discontinuous functions is NOT a subset of all real functions. To see why, consider $f(x) = 1$ everywhere except non-existent at $x=1$. Then take the function $g(x)=1$ when $x=1$ and non-existent everywhere else. Then the sum is clearly continuous. (How would this change though if I changed non-existent to zero? I know the result is the same, but is $g(x)$ as I have defined it even discontinuous--I realize this is a real analysis question.)

Related Linear and Abstract Algebra News on Phys.org
PeroK
Homework Helper
Gold Member
Hi PF!

I want to make sure I understand the notion of a subspace. Our professor gave an example of one: the set of degree n polynomials is a subspace of continuous functions. This is because a) a polynomial is intrinsically a subset of continuous functions and b) summing any polynomials yields another polynomial (closed under addition) and c) any polynomial multiplied by a constant is still a polynomial (closed under scalar multiplication).

If my reasoning is correct, then I think the set of discontinuous functions is NOT a subset of all real functions. To see why, consider $f(x) = 1$ everywhere except non-existent at $x=1$. Then take the function $g(x)=1$ when $x=1$ and non-existent everywhere else. Then the sum is clearly continuous. (How would this change though if I changed non-existent to zero? I know the result is the same, but is $g(x)$ as I have defined it even discontinuous--I realize this is a real analysis question.)
You can't choose functions that are not defined at some point, as functions that have different domains can't be added so they don't form a vector space. The space of all real-valued functions would imply that they all all defined on some fixed domain.

Also, functions that are not defined at a point are not necessarily discontinuous. They may be continuous on their domain. A good example is the function $1/x$, which is a continuous function on its domain.

Instead, you need to think of two genuinely discontinuous functions that can be added to form a contiuous function.

Or, perhaps you could think of a simpler example using a subset of the polynomials that does not form a subspace?

S.G. Janssens
I would say: "The set of polynomials of degree at most $n$". (Here you regard the zero polynomial as having degree $-\infty$ or you should stipulate that this set includes the zero polynomial.)


# How to find the partial sum of a given series?

On my last exam there was the question if the series $\sum_{n=2}^{\infty}\frac{1}{(n-1)n(n+1)}$ converges and which limit it has. During the exam and until now, I am not able to solve it. I tried partial fraction decomposition, telescoping sum, etc. But I am not able to find the partial sum formula (Wolfram|Alpha):

$$\sum_{n=2}^{m}\frac{1}{(n-1)n(n+1)} = \frac{m^2+m-2}{4m(m+1)}.$$

Could somebody push me in the right direction? Is there any trick or scheme how to find partial sum formulas for given series?

-
Each term is less than $1/n^2$, so it converges. You don't need to know what a series converges to to know that it converges. –  Thomas Andrews Mar 25 '12 at 14:46
Two things to observe(Unrelated to the Math): Please do not sign your posts with signature as faq explicitly lists it! Accepting answers is a sign of appreciation for someone who put in effort compiling an answer for you. Please accept answers which you think helped you a lot in solving that problem or cleared up your concepts and whatever. It is done by clicking on the tick mark besides every answer. –  user21436 Mar 25 '12 at 14:51
The ratio test with $1/n^3$ proves it converges. As often happens, finding the sum takes more work than that. –  Michael Hardy Mar 25 '12 at 16:29
martini's answer is the right thing to do. Just wanted to add that if you know the answer (given by wolfram) you can just prove the it with recursion arguments –  Thomas Dec 15 '13 at 15:11

So let's try partial fraction decomposition. Writing $$\frac 1{(n-1)n(n+1)} = \frac a{n-1} + \frac bn + \frac c{n+1}$$ we obtain $$1 = a(n^2 + n) + b(n^2 - 1) + c(n^2 - n)$$ and therefore \begin{align*} 1 &= -b\\ 0 &= a - c\\ 0 &= a + b + c. \end{align*} This gives $b = -1$, $a = c = \frac 12$. Hence \begin{align*} \sum_{n=2}^m \frac 1{(n-1)n(n+1)} &= \sum_{n =2}^m \frac 1{2(n-1)} - \sum_{n=2}^m \frac 1n + \sum_{n=2}^m \frac 1{2(n+1)}\\ &= \frac 12 + \sum_{n=2}^{m-1} \frac 1{2n} - \sum_{n=2}^m \frac 1n + \sum_{n=3}^m \frac 1{2n} + \frac 1{2(m+1)}\\ &= \frac 12 + \frac 14 - \frac 12 - \frac 1m + \frac 1{2m} + \frac 1{2m+2}\\ &= \frac 14 + \frac{-2(m+1) + m+1 + m}{2m(m+1)}\\ &= \frac 14 + \frac{-1}{2m(m+1)}\\ &= \frac{m(m+1) - 2}{4m(m+1)}. \end{align*}
I got little confuse here, why the term $\frac{1}{4}$ doesnt vanish? In my calculation the third step from below, I got $$=\frac{1}{2}+ (\frac{1}{4}+ \frac{1}{6}+\dots+ \frac{1}{2(m-1)})-( \frac{1}{2}+ \frac{1}{3}+\dots+ \frac{1}{m})+( \frac{1}{6}+ \frac{1}{8}+\dots+ \frac{1}{2m})+ \frac{1}{2(m+1)} = \\ =-( \frac{1}{3}+ \frac{1}{5}+\dots+ \frac{1}{m})+(\frac{1}{6}+\frac{1}{8}+\dots+ \frac{1}{2m})+\frac{1}{2(m+1)}$$ How can I get to the next step? –  DadangAH Feb 20 '14 at 5:41
What did you try for a telescoping sum? Your denominator here is the product of three successive terms (this is often called a rising or falling factorial, depending on which side you take as your baseline); this points to looking at a difference of terms that are of the same form but with denominators one degree less. In particular, looking at $t_n=\dfrac{1}{n(n+1)}$ then $t_n-t_{n-1}$ $=\dfrac{1}{n(n+1)}-\dfrac{1}{(n-1)n}$ $=\dfrac1n\left(\dfrac1{n+1}-\dfrac1{n-1}\right)$ $=\dfrac1n\left(\dfrac{(n-1)-(n+1)}{(n-1)(n+1)}\right)$ $=\dfrac{-2}{(n-1)n(n+1)}$; in other words, $\dfrac{1}{(n-1)n(n+1)} = -\dfrac12(t_n-t_{n-1})$, and from here the telescopy should be fairly clear.


Precise proof of S Open set iff contains only interior points - Complex Analysis

In "Complex Variables and Applications" by Brown and Churchill (McGraw-Hill) the proof of: $$\textit{S is an open set \implies each of its points is an interior point}$$ is left as an exercise. Here are the important definitions that one can use: $$\textbf{\epsilon Neighbourhood}: |z-z_0|<\epsilon$$ $$\textbf{z_0 Interior point}: \exists\,\,\ \text{an}\,\,\, \epsilon\text{-neighbourhood containing only}\, z\in S$$ $$\textbf{z_0 Exterior point}: \exists\,\,\ \text{an}\,\,\, \epsilon\text{-neighbourhood containing no}\, z\in S$$ $$\textbf{z_0 Boundary point}: \text{all neighbourhood of z_0 have at least a point in S and one not in S}$$ $$\textbf{S Open}: \text{does not contain any of its boundary points}$$

I've tried to prove this in the following way, however I got stuck. Can someone tell me how to make it mathematically rigorous, using the above definitions?

$S$ is an Open Set $\implies$ $S$ does not contain any any of its boundary points. So $$\text{if} \,\, [\forall \epsilon>0, (\exists z_1\in S\,\,\ \text{and}\,\,\ \exists z_2\notin S ):(|z_1-z_0|<\epsilon \,\,\text{and} \,\,\ |z_2-z_0|<\epsilon)] \implies z_0\notin S$$ Hence taking the converse of the above we have $$\text{if}\,\, z_0\in S \implies \exists \epsilon>0, (\forall z_1\in S\,\,\ \text{or}\,\,\ \forall z_2\notin S ):|z_1-z_0|\geq \epsilon \,\,\text{or} \,\,\ |z_2-z_0|\geq \epsilon)$$

Which doesn't really tell me much. I am really not sure I've even negated it correctly or that my definition with the quantifiers is correct.

• This are the exact words in the book "A point $z_0$ is said to be an interior point of a set $S$ whenever there is some neighborhood of $z_0$ that contains only points of $S$". Is it different from what I wrote? Or is it different from what you wrote? They look pretty similar to me, please tell me if there's some gap between them – Euler_Salter Dec 3 '16 at 18:48
• Forgive me, I misunderstood you definition. However it is a bit confusing because it seems that you are referring to a specific point $z$. Specifically, if I say that $A$ contains only $z\in S$ what I immediately think is that $A=\{z\}$, whatever $z$ is, while you only meant $A\subseteq S$. – Caligula Dec 3 '16 at 18:54
• I removed the "logic" tag - that's for questions within the specific field of mathematical logic. – Noah Schweber Dec 3 '16 at 19:00

Using your definitions (of which some are not very well stated), we can proceed this way.

You want to prove that each point $z$ of an open set $S$ is an interior point. Now, since $S$ is open, $z$ can't be a boundary point, so negating the definition of boundary point, it follows that there exists a neighborhood $U$ of $z$ such that two things can happen:

• or $U$ contains only point of $S$;

• or $U$ contains only point outside $S$.

Since $U$ intersect $S$ at least in $z$, the latter is impossible, so you have proved that $U\subseteq S$. This means that $z$ is interior in $S$.

Following the comment, I'll try to rephrase the proof in more logically strict terms - but note that using words instead of quantifiers is not something to despise, as it increases greatly the clearity of proofs.

The fact $S$ is open means that

$\forall\,z\in S, z\notin \partial S$

where $\partial S$ is the boundary. Now, $z\in \partial S$ if and only if

$\forall \,U\in\mathscr{U}_z,\,U\cap S\neq \varnothing \text{ and } U\cap (S^c)\neq \varnothing$

where $(-)^c$ is the complement and $\mathscr{U}_z$ denotes the set of all open neighborhoods for $z$ (it has the structure of a filter if you know what it means). Hence, negating the latter will imply that

$\exists \,U\in \mathscr{U}_z$ such that $U\cap S = \varnothing$ or $U\cap (S^c)=\varnothing$

Then you conclude as before: the only possible conclusion is that $U\cap (S^c)=\varnothing$ and that is equivalent to $U\subseteq S$.

• I like your wordy proof, I'm quite a fan of these, as in most of my homework I exactly do them. However I wanted to train myself in proving things in a "tedious" way, i.e. using a logic definition and using either negations of it or contrapositives to get to the statement we want to prove. Would you know how I could rephrase those definitions or actually going from there to the wanted result? Thanks – Euler_Salter Dec 3 '16 at 18:58
• I edited my answer with some more logic inside it. – Caligula Dec 3 '16 at 22:12
• Thank you! It makes sense! It's a nice proof, based a lot on sets! I have no idea what a filter is in mathematics, however the set $U_z$ makes sense – Euler_Salter Dec 4 '16 at 2:13


1. ## Area

Find c>0 such that the area of the region enclosed by the parabolas y = x^2 - c^2 and y = c^2 -x^2 is 230.
c =?

2. Originally Posted by qbkr21
Find c>0 such that the area of the region enclosed by the parabolas y = x^2 - c^2 and y = c^2 -x^2 is 230.
c =?
you are integrating with respect to x, so you cannot integrate the c terms like that. you would just attach x to them. by the way, when i did it your way i got 0 = 230, which means you probably made another mistake somewhere

3. ## Re:

Could you trying working it out? or at least some of it... so that I can get a feel for what you mean...

Sure appreciate it....

-qbkr21

4. Originally Posted by qbkr21
Could you trying working it out? or at least some of it... so that I can get a feel for what you mean...

Sure appreciate it....

-qbkr21
$\int_{-c}^{c}\left[ c^2 - x^2 - \left( x^2 - c^2 \right) \right]dx$

$=2 \int_{0}^{c} \left( 2c^2 - 2x^2 \right) dx$

$= 4 \int_{0}^{c} \left( c^2 - x^2 \right)dx$

$= 4 \left[ c^2 x - \frac {1}{3}x^3 \right]_{0}^{c}$

$= \frac {8}{3}c^3$

check my computation, i was in a rush. i have to leave for a little while

did you see the difference with how i integrated c? i treated it as a constant--which it is

5. ## Re:

Yes you were right on the money as always!!

c = 4.41828

Thanks so much!!!

-qbkr21

6. ## find c

Originally Posted by Jhevon
$\int_{-c}^{c}\left[ c^2 - x^2 - \left( x^2 - c^2 \right) \right]dx$

$=2 \int_{0}^{c} \left( 2c^2 - 2x^2 \right) dx$

$= 4 \int_{0}^{c} \left( c^2 - x^2 \right)dx$

$= 4 \left[ c^2 x - \frac {1}{3}x^3 \right]_{0}^{c}$

$= \frac {8}{3}c^3$

check my computation, i was in a rush. i have to leave for a little while

did you see the difference with how i integrated c? i treated it as a constant--which it is
I think you are right

7. Originally Posted by curvature
I think you are right
i know, qbkr21 already confirmed it. i believe he has the answer to the question in the back of his text. i hope he gets why i could have integrated between 0 and c though and then multiply by two, furthermore, i hope he gets why i would want to do that in the first place

8. Originally Posted by Jhevon
$\int_{-c}^{c}\left[ c^2 - x^2 - \left( x^2 - c^2 \right) \right]dx$

$=2 \int_{0}^{c} \left( 2c^2 - 2x^2 \right) dx$
hi
what did you do to the 2 outside to make the lower integral -c 0?
can it be any constants?

hi
what did you do to the 2 outside to make the lower integral -c 0?
can it be any constants?
Note that your integrand is an even function: f(-x) = f(x). In this case
$\int_{-c}^c dx \, f(x) = \int_{-c}^0 dx \, f(x) + \int_0^c dx \, f(x)$

Use the substitution y = -x in the first integral:

$= \int_{c}^0 (-dy) \, f(-y) + \int_0^c dx \, f(x)$

$= -\left ( -\int_0^c dy \, f(-y) \right ) + \int_0^c dx \, f(x)$

But f(-y) = f(y) when f is an even function:

$= \int_0^c dy \, f(y) + \int_0^c dx \, f(x)$

and now just replace the dummy variable y in the first integration with x:

$= \int_0^c dx \, f(x) + \int_0^c dx \, f(x)$

$= 2 \int_0^c dx \, f(x)$

-Dan


If the circle has radius $$r$$ then the circumference is $$2\pi r$$. It gives the ratio of circumference to the diameter of a circle or the ratio of circumference to twice the radius. At Cuemath, our team of math experts is dedicated to making learning fun for our favorite readers, the students! This section of Revision Maths defines many terms in relation to circles, including: Circumference, Diameter, Radius, Chord, Segment, Tangent, Point of contact, Arc, Angles on major and minor arcs, Angle of Centre and Sectors. Meaning of circumference. There is an error: “Area of the segment = ( θ /360) x π r 2 + ( 1 /2) x sinθ x r 2” …should be “Area of the segment = ( θ /360) x π r 2 – ( 1 /2) x sinθ x r 2” sivaalluri (January 22, 2019 - 3:31 pm) Reply. More About Circumference. 3.14 x 100 yards = 314 yards ; Circumference = 314 yards ; Your walk around the lake is 314 yards. Hollow Cylinder Calculator . I consulted a standard dictionary, which said it was the length of a closed curve enclosing an area, so it would seem to apply under that definition. 9 thoughts on “ Circle formulas in math | Area, Circumference, Sector, Chord, Arc of Circle ” Steve LeVine (December 31, 2018 - 10:05 pm) Reply. Capsule Calculator . For example, the Latin root of the word circumference is circum, meaning around. The circumference of a circle is the distance around the circle. Related Calculators: Helix Curve Calculator . Definition: Pi is a number - approximately 3.142 It is the circumference of any circle divided by its diameter. Circumference is the linear distance around a circle. If you're seeing this message, it means we're having trouble loading external resources on our website. Also learn the facts to easily understand math glossary with fun math worksheet online at SplashLearn. If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked. The boundary line of a circle. We will be listening the word “perimeter” frequently in the problems which are based on geometry. The circumference of a circle is the distance around the circle. Learn about terms radius, diameter, circumference, chord, pi, etc.. ... what is the official definition of a circle? What does circumference mean? A circle has many different radii and many different diameters, each passing through the center. Download FREE Right circumference of a Circle Worksheets where, R is the radius of the circle. All Free. Circumference, diameter and radii are measured in linear units, such as inches and centimeters. Perimeter is the distance around a two-dimensional object. If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked. Learn more. By Mary Jane Sterling . The circumference of a circle of radius 3 is $$2\cdot\pi\cdot 3$$, which is $$6\pi$$, or about 18.85. View our Lesson on Circumference of a Circle. The circumference of a circle is the distance around it, but if, as in many elementary treatments, distance is defined in terms of straight lines, this cannot be used as a definition. Radius definition, a straight line extending from the center of a circle or sphere to the circumference or surface: The radius of a circle is half the diameter. The complete distance around a circle or a closed curve is called its Circumference. Math Goodies Glossary. What is circumference? Learn and know what is the perimeter meaning in geometry chapter. See more. These are the two important words for which we have to know the meanings in geometry. Below are our grade 5 geometry worksheets on determining the circumference of circles.Students are provided the radius or the diameter in customary units (worksheets 1-3) or metric units (worksheets 4-6). The Circumference (or) perimeter of a circle = 2πR. Circumference: The circumference of a circle is the distance around it. If you imagine the circle as a piece of string, it is the length of the string. * By signing up, you agree to receive useful information and to our privacy policy. Definition: Circumference. What does that mean? Top Calculators. Formally, a circumference is defined as the locus of points from the plane equidistant to another point, called the center of the circumference. Circumference to diameter. You can also measure the perimeter of three-dimensional objects like houses, stadiums, buildings and similar shapes. It includes unlimited math lessons on number counting, addition, subtraction etc. The distance around a circle is called the circumference. Courses. Math Made Easy! The length of such a line. Also find the definition and meaning for various math words from this math dictionary. Now you will be able to easily solve problems on circumference definition, circumference geometry definition, c ircumference of a circle formula, circumference equation, and circumference of circle. Definition of circumference in the Definitions.net dictionary. c or circ. Math; Trigonometry; Radius, Diameter, Circumference, and Area of Circles; Radius, Diameter, Circumference, and Area of Circles. What is a circle? the length of a perimeter. While I would never actually refer to the circumference of a circle as its "perimeter," a discussion recently arose about whether the term "perimeter" can even APPLY to a circle. Learn area of different shapes here. Circle Geometry math for kids. Jan 31, 2013 - go to this link for a math dictionary tool to use at school or at home (Circumference - the distance around the edge of a circle) A real-life example of a radius is the spoke of a bicycle wheel. Learn the relationship between the radius, diameter, and circumference of a circle. Worksheets > Math > Grade 5 > Geometry > Circumference of circles. Along with the perimeter, we should also know the meaning of “Area”. M Another name for circumference is perimeter. Again, Pi (π) is a special mathematical constant; it is the ratio of circumference to diameter of any circle. Circumference definition, the outer boundary, especially of a circular area; perimeter: the circumference of a circle. b. Abbr. Definition Of Circumference. perimeter: [noun] the boundary of a closed plane figure. Related Topics: Math Worksheets Objective: I know how to calculate the circumference of a circle. For any given circle, this ratio will remain π. A circle is a geometric figure that needs only two parts to identify it and classify it: its center (or middle) and its radius (the distance from the center to any point on the circle). The margin or area surrounding something. circumference definition: 1. the line surrounding a circular space, or the length of this line: 2. the outside edge of an…. circumference - WordReference English dictionary, questions, discussion and forums. E-Mail Address * Featured … Search for courses, skills, and videos. Learn what is circumference. Area and Perimeter is an important topic in Mathematics, which is used in everyday life. If you're seeing this message, it means we're having trouble loading external resources on our website. Learn the relationship between the radius, diameter, and circumference of a circle. Search. Circumference. 2. a. How to use circumference in a sentence. Did You Know? Circumference definition is - the perimeter of a circle. The boundary line of an area or object. ence (sər-kŭm′fər-əns) n. 1. Circumference may also refer to the circle itself, that is, the locus corresponding to the edge of a disk Circle. A circle is a shape that is made up of all the points on a plane (a flat surface) that are the same distance from a given point. Perimeter defines the distance of the boundary of the shape whereas area explains the region occupied by it. Area and perimeter, in Maths, are the two important properties of two-dimensional figures. Circum is now considered a prefix also meaning around or round about. 3. The formula for the circumference of a circle, C = 2 × π × r = π × d, where r is the radius and d is the diameter of the circle.π =22/7 = 3.141. Donate Login Sign up. A circle is a two-dimensional shape that is created by drawing a line that is curved so that its ends meet and every point on the line is the same distance from the center. π is the mathematical constant with an approximate (up to two decimal points) value of 3.14. Search . The number Pi, denoted by the Greek letter π - pronounced 'pie', is one of the most common constants in all of mathematics. Learn More at mathantics.comVisit http://www.mathantics.com for more Free math videos and additional subscription based content! Search form. where C = π D. C is the circumference of the circle Sign Up For Our FREE Newsletter! Definition of Perimeter explained with real life illustrated examples. Circumference = 3.14 x 100 yards ; Do the Math. It is the circumference of any circle, divided by its diameter. Make your child a Math Thinker, the Cuemath way. Sign Up For Our FREE Newsletter! It is a constant so whatever be the circumference and the radius the ratio will be equal to π. π is an irrational number hence it cannot be written down as a finite decimal number. Tip. You have probably noticed that, since diameter is twice the radius, the proportion between the circumference and the diameter is equal to π: C/D = 2πR / 2R = π. Okay, so let's start out with the "given point". See more. SplashLearn is an award winning math learning program used by more than 30 Million kids for fun math practice. The formula is πd or 2πr. Sal uses formulas and a specific example to see how area and circumference relate. Learn the circumference of a circle with Definition, Solved examples, and Facts. Circumference: The distance around a circle; the perimeter of a circle. Read the lesson on circumference of circle if you need to learn how to calculate the circumference of a circle. The following is a list of definitions relating to the circumference of a circle. About Cuemath. Information and translations of circumference in the most comprehensive dictionary definitions resource on the web. Circle worksheets: Finding the circumference. It is used in many areas, such as physics and mathematics. If you have trouble remembering geometry terms, it helps to think of other words from the same root with which you may be more familiar. We must never confuse the concept of a circle with the concept of circumference, circumference is actually a curve that encloses a circle (the circumference is a curve, the circle is an area.) This proportion (circumference to diameter) is the definition of the constant pi. Main content. Perimeter Definition; Perimeter of a Triangle; Perimeter of a Square or Rhombus; Perimeter of a Rectangle or Parallelogram; Perimeter of an N-gon; Perimeter Definition. Calculators and Converters ↳ Math Dictionary ↳ C ↳ Circumference ; Ask a Question . Home » Glossary » Term » Math Goodies Glossary.

Dublin To Westport, Jason Pierre-paul Hand Video, Venom Vs Superman, Marco Reus Fifa 13, Purple Tier Covid, Easyjet Flights From Luton To Isle Of Man, South Mayo Family Research Centre, Stainless Steel Meaning In Kannada, What Channel Is The Washington Redskins Game On Today, Venom Vs Superman, Elon Women's Soccer Id Camp 2020, St Vincent Dental Clinic Cleveland Ohio, Blue Anodized Ar-15 Grip,


# Math Help - Quick question about position due to gravity.

1. ## Quick question about position due to gravity.

I have a problem where I'm given a bunch of info. about a ballon dropping a bomb, etc. The thing is that I am not given any functions but I know that I have to use the function for position of falling bodies with respect to time.
It's been a while since I saw this formula, so i'm not sure if this is right:

In feet: $s(t)=-16t^2 + v_0 t + s_0$
where $v_0$ is initial velocity and $s_0$ is starting position.

Is any of this right?

2. I'm not sure what you are trying to do.

You have a bomb floating to the earth on a balloon, and you have to construct the equation which describes the displacement the balloon as fallen from its original position after time t?

3. Originally Posted by Arturo_026
I have a problem where I'm given a bunch of info. about a ballon dropping a bomb, etc. The thing is that I am not given any functions but I know that I have to use the function for position of falling bodies with respect to time.
It's been a while since I saw this formula, so i'm not sure if this is right:

In feet: $s(t)=-16t^2 + v_0 t + s_0$
where $v_0$ is initial velocity and $s_0$ is starting position.

Is any of this right?
None of what you're asking can be answered without knowing the question. It's always better to post the original question instead of hoping that our crystal balls are in good working order.

4. Try one (or more) of the kinematic equations:

$v = v_0 + at$

$y - y_0 = v_0t + \frac{1}{2}t^2$

$v^2 = v_0^2 + 2a(y - y_0)$

$y - y_0 = \frac{1}{2}(v_0 + v)t$

Where v is the final velocity, $v_0$ is the initial velocity, y is the final height, $y_0$ is the initial height, a is the acceleration due to gravity near Earth's surface ( $g = 9.8 \frac{m}{s^2}$), and t is the time.

Patrick

5. Originally Posted by mr fantastic
None of what you're asking can be answered without knowing the question. It's always better to post the original question instead of hoping that our crystal balls are in good working order.
Ok, here is the problem:

A bomb is dropped from a ballon hovering at an altitude of 800 ft. From directly below the balloon, a projectile is fired directly upward toward the bomb exactly 2 seconds after the bomb is released. With what initial speed should the projectile be fired in order to hit the bomb at an altitude of exactly 400 ft.?

6. The problem is for some reason in the Standard system (feet) instead of the Metric (meters), so be sure to consider that when solving the problem (This is where the -16 comes from in your original equation).

The bomb accelerates downward at a rate of 9.8 $\frac{m}{s^2}$ or just over 32 $\frac{ft}{s^2}$. After t seconds, it will be halfway down, from 800 ft to 400ft. At this precise moment, the projectile from the surface will intercept it. Therefore, you need to solve for t, the time it takes the bomb to drop 400 ft, from an initial velocity of zero.

Then, when you have t, you must subtract 2 seconds to get the time for the projectile's flight from the surface to the bomb, over a distance of 400 ft. When you have this time, you can then use the kinematic equations to solve for the initial velocity, knowing that the acceleration due to gravity will slow the projectile so that the final velocity is less than the initial velocity.

You will have the variables of t, a, and y. Using the second equation listed (a is not needed), you can solve for the initial velocity. Let me know what the answer is.

Patrick

7. I get t=5 for the bomb to be at an altitude of 400 ft. and when t=3 the projectile needs to be launched with an initial velocity of 181.33 ft. per second.


# Two masses connected by a spring

I have a question about a problem I saw on a website

A mass is attached to one end of a spring, and the other end of the spring is attached to an immovable wall. The system oscillates with period T. If the wall is removed and replaced with a second mass identical to the first, what is the new period of oscillation of the system?

My answer: $$\frac{T}{\sqrt{2}}$$

Website's answer (Incorrect thanks to trula): $$T\sqrt{2}$$

My thought process (pretty hand-wavy I know):

Because the spring constant is inversely proportional (I think) to length of the spring, the spring constant will be doubled if you halve the length of the spring, which is what is essentially happening with two identical massess. Because $$T=2\pi\sqrt{\frac{m}{k}}$$, if you double $$k$$, you divide $$T$$ by $$\sqrt{2}$$. I don't know why they got $$T\sqrt{2}$$, but if I am wrong, please correct my misunderstandings.

Thanks for reading if you made it this far, and if my question is unclear, please tell me what I can fix about it.

• Your argument is right, and the published answer probably just a typing error. Jul 21 at 21:17
• Ok, thanks for the clarification!
– JD12
Jul 21 at 21:24
• the spring constant will be doubled if you halve the length of the spring, which is what is essentially happening with two identical massess. I really don't see why that would be true. If instead $m\to 2m$ then $T\to\sqrt{2}T$, as stated in the answer key.
– Gert
Jul 22 at 0:08

The approach you have used appears to be correct. The correct answer should be $$\frac{T}{\sqrt 2}$$. As you have noted, halving the length of spring with spring constant $$k$$ results in a doubling of the spring constant.
Since we know that $$T=2\pi\sqrt{\frac{m}{k}}$$ and if we let $$k\rightarrow 2k$$, then $$T=2\pi\sqrt{\frac{m}{k}} \rightarrow 2\pi\sqrt{\frac{m}{2k}}=\frac{2\pi}{\sqrt 2}\sqrt{\frac{m}{k}}=\frac{1}{\sqrt 2} 2\pi\sqrt{\frac{m}{k}}=\frac{1}{\sqrt 2}T$$
The answer posted - $$T\sqrt 2$$ - could very well be a typo as also pointed out by @trula in the comments above.
Equal masses, centre of mass does not move, stretch $$x$$ relative to centre of mass position for both masses, force exerted by spring $$k\cdot 2x$$, equation of motion for each of the masses of the form $$-2kx = m\ddot x$$, period is reduced by factor $$1/\sqrt 2$$.


# Is there a continuous function from $[0,1]$ to $\mathbb R$ that satisfies

Is there a continuous function $f:[0,1] \to \mathbb R$ such that $f(x) = 0$ uncountably often and, for every $x$ such that $f(x) = 0$, in any neighbourhood of $x$ there are $a$ and $b$ such that $f(a) > 0$ and $f(b) < 0$?

Let $K$ be the Cantor set; recall that $K$ is uncountable. Then the function $x\to d(x,K),$ where $d(x,K)$ denotes the distance from $x$ to $K,$ is continuous on $[0,1].$ Define

$$f(x) = \begin{cases} 0, x \in K\\ d(x,K)\sin (1/d(x,K)), x \in [0,1]\setminus K. \end{cases}$$

Let $I_1, I_2, \dots$ be the open intervals thrown out in the construction of $K.$ In each $I_n,$ $f$ is continuous. Hence $f$ is continuous on $[0,1]\setminus K.$ If $x_n \to x \in K,$ then $d(x_n,K)\to 0,$ hence so does $f(x_n),$ which implies $f$ is continuous at $x.$ Thus $f$ is continuous on $[0,1].$

Now in any neighborhood of a point in $K,$ one of the $I_n$ will be contained in that neighborhood, hence $f$ will be both positive and negative in that neighborhood because of the $\sin (1/d(x,K))$ term.

Added: I just noticed that I omitted discussing points in $[0,1]\setminus K$ where $f=0.$ That happens at an $x$ such that $d(x,K)=1/(m\pi)$ for some $m\in \mathbb {N}.$ Because each $I_n$ has length $1/3^k$ for some $k,$ such an $x$ could not be the midpoint of any $I_n.$ So then $x$ is to the right or left of the midpoint of whatever $I_n$ it belongs to, and thus $d(\cdot,K)$ will be strictly increasing or decreasing in a neighborhood of $x,$ which implies a change in the sign of $f$ at that $x$ as desired.

• Very clever! How'd you come up with that? – Moya Aug 30 '15 at 23:24
• $x\sin(1/x)$ and its relatives are the gift that keeps on giving. – zhw. Aug 30 '15 at 23:28

In addition to the carefully constructed examples others have given, I just want to note that with probability $1$ one-dimensional Brownian motion starting at $0$ has these properties.

Absolutely. For example, we can proceed in a similar fashion to the definition of the Cantor function, using the "middle third construction of the Cantor set. In the first stage, we remove the "middle third" $(\frac13,\frac23)$ of $[0,1],$ and on this interval, we define $f(x)=(x-\frac12)^2+c_1$, where $c_1$ is the unique number such that $f(x)\to 0$ as $x\searrow\frac13$ and $x\nearrow\frac23.$ (I leave its determination to you.)

In the second stage, we remove the two "middle thirds" $(\frac19,\frac29)$ and $(\frac79,\frac89)$. On the first of these, we define $f(x)=-(x-\frac16)^2+c_2,$ where $c_2$ is the unique number so that $f(x)\to 0$ as $x\searrow\frac19$ and $x\nearrow\frac29.$ on the second, we define it by $f(x)=-(x-\frac56)^2+c_2,$ and we can show that $f(x)\to 0$ as $x\searrow\frac79$ and $x\nearrow\frac89.$ (I leave it to you to find $c_2$ and verify this.

We proceed in much the same manner. At the $n$th stage, we remove $2^{n-1}$ open intervals of the form $\left(m-\frac1{2\cdot3^n},m+\frac1{2\cdot3^n}\right),$ and there is some $c_n$ such that for any such "middle third" interval, we define the function on that interval by $f(x)=(-1)^{n-1}(x-m)^2+c_n,$ and we have the property that $f(x)\to0$ as $x\searrow m-\frac1{2\cdot3^n}$ and $x\nearrow m+\frac1{2\cdot3^n}.$

Finally, we define $f(x)=0$ on the Cantor set, itself. Then $f$ has exactly the properties you need, and is in fact differentiable everywhere but at the endpoints of the "middle third" intervals, I believe.

Yes.

Our function will be $0$ on the Cantor set and nowhere else. For convenience we define a spike function $S(a, b)(x) = \mathbb{1}_{[a, b]}(x) \cdot \min\{|a-x|, |b-x|\}$ which is a continuous, positive, compact support function on the interval $[a, b]$. The idea will be to add a countable collection of spike functions to eventually satisfy your conditions.

So, lets approximate our function in a series of countable steps. Firstly, let $f_1 = S(1/3, 2/3)$. The greatest distance from a point with positive function value is now $1/3 = \delta_1$. Let $f_2 = f_1 - (S(1/9, 2/9) + S(7/9, 8/9))$. Now, the greatest distance from a point in $x\in [0, 1]$ with $f_2(x) = 0$ to a point with $y\in [0, 1]$ with $f_2(y)<0$ is now $1/9 = \delta_2$. Proceeding in this way, we would next add $4$ spikes to get $f_3 = f_2 + \sum_{i = 1, 7, 19, 25} S(i/27, (i+1)/27)$, and $\delta_3 = 1/27$, subtract $8$ spikes to get $f_4$

I claim that the limit of the $\{f_n\}$ exists, is well defined, and satisfies your conditions because the $\delta_n\to 0$.

Completed as a pennance for not reading the question properly.

• The question doesn't ask for the function to be surjective, just that it takes real values. – Mark Bennet Aug 30 '15 at 22:50
• +1: Nice fix. That's pretty much the direction I was considering, initially, but I decided to try for more differentiability (for no particular reason). – Cameron Buie Aug 30 '15 at 23:41
• Its the natural solution, though Robert Israel has a nice example/class of examples too. – user24142 Aug 31 '15 at 5:49


# The difference between inverse function and a function that is invertible?

My discrete mathematics book says:

But I read an answer, https://math.stackexchange.com/a/2415543/390226, said:

["...]There are invertible functions which are not bijective,[..."]

["]A function is invertible if and only if it is injective[."]

So for a function to have a inverse, it must be bijective. But any function that is injective is invertible, as long as such inverse defined on a subset of the codomain of original one, i.e. the image of the original function?

• See Inverse function : "To be invertible a function must be both an injection and a surjection. Such functions are called bijections. The inverse of an injection $f : X → Y$ that is not a bijection, that is, a function that is not a surjection, is only a partial function on $Y$, which means that for some $y ∈ Y, f^{ −1}(y)$ is undefined." This id the case with $\exp$ in the post you have linked. – Mauro ALLEGRANZA Apr 10 '18 at 14:10
• The issue is simply with $A,B$ of $f : A \to B$. If we "build in" domain and co-domain in the def of $f$ we have that the function $\exp : \mathbb R \to \mathbb R$ is not invertible. But there is an old tradition of calling $\log : \mathbb R^+ \to \mathbb R$ its inverse. As per Gentlemen Prefer Blondes: "nobody is perfect". – Mauro ALLEGRANZA Apr 10 '18 at 14:28
• @MauroALLEGRANZA: Thank you so much, now it's clear to me... Because the same book says to define a function, the domain, co-domain, image/range are needed. I didn't know the tradition. – linear_combinatori_probabi Apr 10 '18 at 14:33

It all depends on the co-domain of your function.

When you have a function $$f:A\to B$$ which is one-to-one but not onto $B$, you may restrict your co-domain to a subset of $B'\subset B$ which is the range of $f$.

For example $$f:N \to N$$ defined by $$f(n)=2n$$ is not onto but it is one-to-one.

If we define, $$f^* : N\to 2N$$ with the same definition $f^*(n)=2n$

We have an inverse function, $(f^*)^{-1} (n) = n/2.$

• So when I see "f is invertible", I should connect this idea to "f must be bijective"? If f is not bijective, then I must change its co-domain? – linear_combinatori_probabi Apr 10 '18 at 14:16
• Yes you need a one-to-one correspondence which means bijective. – Mohammad Riazi-Kermani Apr 10 '18 at 14:17

When people said a function is "invertible", they mean it can be made invertible. And the rigorous definition of inverse function of $f$ in my book is:


# Smallest Prime Factor - Why does this algorithm find prime numbers?

I have been looking at the problems on Project Euler and a number of them have required me to be able to find the prime factorisation of a given number.

While looking for quick ways to do this, I came across a website that could perform this calculation and had it's source code available too.

The crux of the algorithm was this method: (I hope java code on this site is OK)

public static long smallestPrimeFactor( final long n ) {
if (n==0 || n==1) return n;
if (n%2==0) return 2;
if (n%3==0) return 3;
if (n%5==0) return 5;

for (int i = 7; (i*i) <= n; i += 30 ) {
if ( n % i == 0 ) {
return i;
}
if ( n % ( i+4 ) == 0) {
return i+4;
}
if ( n % ( i+6 ) == 0) {
return i+6;
}
if ( n % ( i+10 ) == 0) {
return i+10;
}
if ( n % ( i+12 ) == 0) {
return i+12;
}
if ( n % ( i+16 ) == 0) {
return i+16;
}
if ( n % ( i+22 ) == 0) {
return i+22;
}
if ( n % ( i+24 ) == 0) {
return i+24;
}
}
return n;
}

The part that really fascinates me is the loop that starts at 7, then considers some gaps and then increments by 30 before carrying on. This is the list of the first few numbers from the sequence:

  7,  11,  13,  17,  19,  23,  29,  31,
37,  41,  43,  47,  49,  53,  59,  61,
67,  71,  73,  77,  79,  83,  89,  91,
97, 101, 103, 107, 109, 113, 119, 121,
127, 131, 133, 137, 139, 143, 149, 151,
157, 161, 163, 167, 169, 173, 179, 181,
187, 191, 193, 197, 199, 203, 209, 211

Obviously this loop generates some numbers that are not prime numbers (49, 77, 91 for example) but it does appear to produce every possible prime number less than the square root of the given number.

Am I correct in believing that this loop will produce every prime number? And if so, is there a proof or some mathematical reasoning behind why that is the case?

• See prime sieves and esp. wheel sieves. – Bill Dubuque May 23 '14 at 15:57
• The loop looks for divisors without checking if they are primes. It provides all possible prime divisors. The reason to exclude some possible divisors is that they are not prime. For example: $7+30k+1=30k+8$ is even and $2$ was checked, $7+30k+2=30k+9$ is multiple of $3$ (also checked), $7+30k+3=30k+10$ which is a multiple of $10$, $7+30k+5=30k+12$ which is a multiple of $3,$ and so on. – mfl May 23 '14 at 16:00

In the loop $i$ is equal to $30k+7$, where $k$ is a non-negative integer. Let's consider what values can't be prime. I'll list the offsets and remove them as they're eliminated. $$0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29$$

We start with $7$, which is odd. Adding another odd number would give us an even number, which is divisible by $2$. Eliminate those. $$0,2,4,6,8,10,12,14,16,18,20,22,24,26,28$$

We're adding multiples of $30$, which are divisible by $3$. The last digit is $7$. Adding $2$ would make it $9$, making the whole number divisible by $3$. So $2$ gets skipped, so well as $2+3k$. Eliminate those. $$0,4,6,10,12,16,18,22,24,28$$

Same logic for $5$. Since the last digit is $7$ without an offset, then adding $3,8,13$, etc, would make it a multiple of $5$. Eliminate those. $$0,4,6,10,12,16,22,24$$

And you're left with the numbers that are checked. We increment by $30$ since $2\cdot3\cdot5=30$, and we checked those at the very beginning. Adding $30$ produces the same pattern of divisibility by those numbers at the same offsets. So from then on we just need to dodge those offsets.

• That explanation is super clear! – Dan Temple May 23 '14 at 16:21

This should produce all primes. First, $i=30j+7$ for some $j$. Now with this in mind, take a look at the values that get skipped. Obviously, first thing, it skips all even numbers. As an example though, look at the first odd number it skips, $i+2=30j+9=3(10j+3)$. You will find that all the numbers skipped are similarly multiples of $3$ or $5$. In other words, everything it skips is composite.

The code you posted in fact is not very efficient. The way it works is this:

The purpose is ro return the smallest prime factor of number n.

At first it does checks for trivial/simple cases (whether n is divisable by 2,3,5, the first 3 prime numbers)

Then the loop starts fromt the next prime number (=7) and checks up to sqrt(n) (which is enough, but not the most efficient check for factoring n)

The checks inside the loop check for square-free factors and not multiples of 2,3,5 (limited Eratosthenes' sieve) (thus primes)