GMAT Question of the Day - Daily to your Mailbox; hard ones only

 It is currently 19 Oct 2018, 06:22

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

# Some part of a 50% solution of acid was replaced with an

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics
Author Message
TAGS:

### Hide Tags

Intern
Joined: 08 Aug 2008
Posts: 5
Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

Updated on: 19 Aug 2015, 12:12
2
12
00:00

Difficulty:

5% (low)

Question Stats:

81% (01:15) correct 19% (02:00) wrong based on 301 sessions

### HideShow timer Statistics

Some part of a 50% solution of acid was replaced with an equal amount of 30% solution of acid. If, as a result, 40% solution of acid was obtained, what part of the original solution was replaced?

A. $$\frac{1}{5}$$
B. $$\frac{1}{4}$$
C. $$\frac{1}{2}$$
D. $$\frac{3}{4}$$
E. $$\frac{4}{5}$$

M25Q30

Originally posted by chrissy28 on 12 Aug 2008, 14:27.
Last edited by ENGRTOMBA2018 on 19 Aug 2015, 12:12, edited 2 times in total.
Manager
Joined: 15 Jul 2008
Posts: 204
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

12 Aug 2008, 15:10
chrissy28 wrote:

Some part of the 50% solution of acid was replaced with the equal amount of 30% solution of acid. As a result, 40% solution of acid was obtained. What part of the original solution was replaced?

(A) 1/5
(B) 1/4
(C) 1/2 *correct answer
(D) 3/4
(E) 4/5

Original Acid : Total ratio = 50:100 . let us say you replaced x part of this. So you are left with (1-x) of the original. So volume of acid left is (1-x)50.

in the new solution.. you added x of 30% solution. i.e 30x acid

(1-x)50 + 30x is the volume of acid. The total volume is still 100. And this concentration is 40%

[(1-x)50 + 30x] / 100 = 40/100

solve to get x=1/2
SVP
Joined: 30 Apr 2008
Posts: 1835
Location: Oklahoma City
Schools: Hard Knocks
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

12 Aug 2008, 15:16
The reason that 1/2 is correct is this:

What would happen if you have 1 liter of 60% solution (NaCl with water) and add 1 liter of 50% solution? I'm not chemist but lets mix $$H_2O$$ (water) with Sodium Chloride ($$NaCl$$).

The result will be a solution of 55%. 60% will have .6 liters of NaCl and the 50% solution will have .5 liters of NaCl. Together that's 1.1 liters out of the total of 2 liters.

Here we see that 50% solution becomes 40% from adding 30%. 40% is just the average between the two, so we know that there must now be equal parts 50% solution and 30% solution. The only way to get equal parts is if you have 1/2 50% solution and 1/2 30% solution meaning 1/2 was replaced.

chrissy28 wrote:

Some part of the 50% solution of acid was replaced with the equal amount of 30% solution of acid. As a result, 40% solution of acid was obtained. What part of the original solution was replaced?

(A) 1/5
(B) 1/4
(C) 1/2 *correct answer
(D) 3/4
(E) 4/5

_________________

------------------------------------
J Allen Morris
**I'm pretty sure I'm right, but then again, I'm just a guy with his head up his a.

GMAT Club Premium Membership - big benefits and savings

Senior Manager
Joined: 15 Sep 2011
Posts: 335
Location: United States
WE: Corporate Finance (Manufacturing)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

16 Jun 2013, 16:55
2
2
If 50% solution becomes 40% solution, then 40% solution must be equally weighted between 50% solution and 30% solution - i.e. $$\frac{1}{2}$$ of 50% solution and $$\frac{1}{2}$$ of 30% solution. If the solution must be equally weighted, then 30% solution must replace $$\frac{1}{2}$$ of 50% solution (assuming original solution was 50% solution of acid).

Just another way of saying the same thing. Cheers
Math Expert
Joined: 02 Sep 2009
Posts: 50001
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

16 Jun 2013, 23:07
1
3
Some part of a 50% solution of acid was replaced with an equal amount of 30% solution of acid. If, as a result, 40% solution of acid was obtained, what part of the original solution was replaced?

A. $$\frac{1}{5}$$
B. $$\frac{1}{4}$$
C. $$\frac{1}{2}$$
D. $$\frac{3}{4}$$
E. $$\frac{4}{5}$$

Since the concentration of acid in resulting solution (40%) is the average of 50% and 30% then exactly half of the original solution was replaced.

Alternately you can do the following, say $$x$$ part of the original solution was replaced then: $$(1-x)*0.5+x*0.3=1*0.4$$ --> $$x=\frac{1}{2}$$.

_________________
Manager
Status: Working hard to score better on GMAT
Joined: 02 Oct 2012
Posts: 86
Location: Nepal
Concentration: Finance, Entrepreneurship
GPA: 3.83
WE: Accounting (Consulting)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

17 Jun 2013, 21:57
Hi Bunuel, What is wrong in this equation? Kindly guide me.

Let total solution =100
Replacement = x (say)

equation:
(100-x)*50% + X*30% = 40%
Solving this equation i am getting x= 248

I looked every way possible but could not figure out the problem in the equation....
_________________

Do not forget to hit the Kudos button on your left if you find my post helpful.

Math Expert
Joined: 02 Sep 2009
Posts: 50001
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

17 Jun 2013, 23:14
atalpanditgmat wrote:
Hi Bunuel, What is wrong in this equation? Kindly guide me.

Let total solution =100
Replacement = x (say)

equation:
(100-x)*50% + X*30% = 40%
Solving this equation i am getting x= 248

I looked every way possible but could not figure out the problem in the equation....

(100-x)*0.5+0.3x=100*0.4 --> x=50 --> 50/100=1/2.

Hope it's clear.
_________________
Manager
Status: Trying.... & desperate for success.
Joined: 17 May 2012
Posts: 64
Location: India
Schools: NUS '15
GPA: 2.92
WE: Analyst (Computer Software)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

18 Jun 2013, 00:03
1
atalpanditgmat wrote:
Hi Bunuel, What is wrong in this equation? Kindly guide me.

Let total solution =100
Replacement = x (say)

equation:
(100-x)*50% + X*30% = 40% Solving this equation i am getting x= 248

I looked every way possible but could not figure out the problem in the equation....

Try using below equation.
50% of (100-x) + 30% of x = 40% of 100
x=50litres.
So 50 of 100 litres got replaced would amount to 1/2 in ratio.
Manager
Status: Working hard to score better on GMAT
Joined: 02 Oct 2012
Posts: 86
Location: Nepal
Concentration: Finance, Entrepreneurship
GPA: 3.83
WE: Accounting (Consulting)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

18 Jun 2013, 00:33
Ahhhh!! I got it....Thank you both of you guys....I hope silly mistakes won't trouble me on the Real Test...
_________________

Do not forget to hit the Kudos button on your left if you find my post helpful.

SVP
Status: The Best Or Nothing
Joined: 27 Dec 2012
Posts: 1829
Location: India
Concentration: General Management, Technology
WE: Information Technology (Computer Software)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

10 Jul 2014, 02:09
2
Did using allegation method

Refer diagram below

Bunuel, kindly update the OA.

Attachments

all.png [ 3.61 KiB | Viewed 5115 times ]

_________________

Kindly press "+1 Kudos" to appreciate

Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 8397
Location: Pune, India
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

20 Jul 2015, 06:11
3
chrissy28 wrote:
Some part of a 50% solution of acid was replaced with an equal amount of 30% solution of acid. If, as a result, 40% solution of acid was obtained, what part of the original solution was replaced?

A. $$\frac{1}{5}$$
B. $$\frac{1}{4}$$
C. $$\frac{1}{2}$$
D. $$\frac{3}{4}$$
E. $$\frac{4}{5}$$

M25Q30

Responding to a pm:

It is worded to look like a replacement question but essentially, it is a simple mixtures problem only.

You have some 50% solution of acid and you remove some of it. Now to that 50% solution, you are adding 30% solution to get 40% solution. The ratio in which you mix the 50% solution and the 30% solution is given by w1/w2 = (50 - 40)/(40 - 30) = 1/1
Basically, you mix equal parts of 50% solution and 30% solution.
So initially you must have had 2 parts of 50% solution out of which you removed 1 part and replaced with 1 part of 30% solution. So you replaced half of the original solution.

The first question of this post discusses exactly this concept: http://www.veritasprep.com/blog/2012/01 ... -mixtures/
_________________

Karishma
Veritas Prep GMAT Instructor

Learn more about how Veritas Prep can help you achieve a great GMAT score by checking out their GMAT Prep Options >

GMAT self-study has never been more personalized or more fun. Try ORION Free!

Intern
Joined: 17 Aug 2015
Posts: 5
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

19 Aug 2015, 11:41
Can you please explain to me how you got the answer to this problem using the allegation methos?

Thanks
Current Student
Joined: 20 Mar 2014
Posts: 2633
Concentration: Finance, Strategy
Schools: Kellogg '18 (M)
GMAT 1: 750 Q49 V44
GPA: 3.7
WE: Engineering (Aerospace and Defense)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

19 Aug 2015, 11:44
tinnyshenoy wrote:
Can you please explain to me how you got the answer to this problem using the allegation methos?

Thanks

Look at: some-part-of-a-50-solution-of-acid-was-replaced-with-an-68805.html#p1381700
Intern
Joined: 17 Aug 2015
Posts: 5
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

19 Aug 2015, 12:02
I cannot understand how they divided 10/20 to get 10? Where did 20 come from?
Current Student
Joined: 20 Mar 2014
Posts: 2633
Concentration: Finance, Strategy
Schools: Kellogg '18 (M)
GMAT 1: 750 Q49 V44
GPA: 3.7
WE: Engineering (Aerospace and Defense)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

19 Aug 2015, 12:22
tinnyshenoy wrote:
I cannot understand how they divided 10/20 to get 10? Where did 20 come from?

It is from the alligation method

As shown in the post above, per the alligation method, the distrbution will be:

50 10 (=40-30) parts

40

30 10 (=50-40) parts

Thus, you see that you need 10 parts out of 20 (=(10+10)) parts of 50% solution, giving you 10/20 = 1/2 or 50% as your answer.

Hope this helps.
Moderator
Joined: 22 Jun 2014
Posts: 1030
Location: India
Concentration: General Management, Technology
GMAT 1: 540 Q45 V20
GPA: 2.49
WE: Information Technology (Computer Software)
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

09 Apr 2016, 00:38
chrissy28 wrote:
Some part of a 50% solution of acid was replaced with an equal amount of 30% solution of acid. If, as a result, 40% solution of acid was obtained, what part of the original solution was replaced?

A. $$\frac{1}{5}$$
B. $$\frac{1}{4}$$
C. $$\frac{1}{2}$$
D. $$\frac{3}{4}$$
E. $$\frac{4}{5}$$

M25Q30

w1 is the weight 50% acid solution which has concentration C1 = 50%
w2 is the weight of 20% acid solution which has concentration C1 = 30%
Concentration of mixture (average) = 40%

using weihted average formula w1/w2 = (c2 - avg) / (Avg-c1)
w1/w2 = (30-40)/(40-50)
w1/w2 = 1/1

w1 is 1 part and w2 is 1 part in a total 2 part of solution.

question is What part of the original solution was replaced?
w2 is what was replaced, hence 1 out of 2 i.e. 1/2 part was replaced.
_________________

---------------------------------------------------------------
Target - 720-740
http://gmatclub.com/forum/information-on-new-gmat-esr-report-beta-221111.html
http://gmatclub.com/forum/list-of-one-year-full-time-mba-programs-222103.html

Non-Human User
Joined: 09 Sep 2013
Posts: 8464
Re: Some part of a 50% solution of acid was replaced with an  [#permalink]

### Show Tags

19 Sep 2018, 02:52
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.
_________________
Re: Some part of a 50% solution of acid was replaced with an &nbs [#permalink] 19 Sep 2018, 02:52
Display posts from previous: Sort by

# Some part of a 50% solution of acid was replaced with an

 new topic post reply Question banks Downloads My Bookmarks Reviews Important topics

 Powered by phpBB © phpBB Group | Emoji artwork provided by EmojiOne Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.


Home > Taylor Series > Taylor Series Error Estimation

Taylor Series Error Estimation

Contents

Example What is the minimum number of terms of the series one needs to be sure to be within of the true sum? However, it holds also in the sense of Riemann integral provided the (k+1)th derivative of f is continuous on the closed interval [a,x]. This will present you with another menu in which you can select the specific page you wish to download pdfs for. Sometimes you'll see something like N comma a to say it's an Nth degree approximation centered at a. Source

The statement for the integral form of the remainder is more advanced than the previous ones, and requires understanding of Lebesgue integration theory for the full generality. Solution Here are the first few derivatives and the evaluations. Note that, for each j = 0,1,...,k−1, f ( j ) ( a ) = P ( j ) ( a ) {\displaystyle f^{(j)}(a)=P^{(j)}(a)} . Your cache administrator is webmaster. https://www.khanacademy.org/math/calculus-home/series-calc/taylor-series-calc/v/error-or-remainder-of-a-taylor-polynomial-approximation

Taylor Series Error Estimation Calculator

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. These estimates imply that the complex Taylor series T f ( z ) = ∑ k = 0 ∞ f ( k ) ( c ) k ! ( z − In the mean time you can sometimes get the pages to show larger versions of the equations if you flip your phone into landscape mode. In this example we pretend that we only know the following properties of the exponential function: ( ∗ ) e 0 = 1 , d d x e x = e

This kind of behavior is easily understood in the framework of complex analysis. Solution As with the last example we’ll start off in the same manner.                                       So, we get a similar pattern for this one.  Let’s plug the numbers into the MeteaCalcTutorials 55,406 views 4:56 Maclauren and Taylor Series Intuition - Duration: 12:59. Lagrange Error Bound Calculator The N plus oneth derivative of our Nth degree polynomial.

Show Answer If you have found a typo or mistake on a page them please contact me and let me know of the typo/mistake. Hence each of the first k−1 derivatives of the numerator in h k ( x ) {\displaystyle h_{k}(x)} vanishes at x = a {\displaystyle x=a} , and the same is true Where are the answers/solutions to the Assignment Problems?

Transcript The interactive transcript could not be loaded.

Up next Taylor's Inequality - Duration: 10:48. Remainder Estimation Theorem As in previous modules, let be the error between the Taylor polynomial and the true value of the function, i.e., Notice that the error is a function of . Recall that if a series has terms which are positive and decreasing, then But notice that the middle quantity is precisely . How close will the result be to the true answer?

Taylor Polynomial Approximation Calculator

And sometimes you might see a subscript, a big N there to say it's an Nth degree approximation and sometimes you'll see something like this. PaulOctober 27, 2016 Calculus II - Notes Parametric Equations and Polar Coordinates Previous Chapter Next Chapter Vectors Power Series and Functions Previous Section Next Section Applications of Series  Taylor Taylor Series Error Estimation Calculator In that situation one may have to select several Taylor polynomials with different centers of expansion to have reliable Taylor-approximations of the original function (see animation on the right.) There are Lagrange Error Formula If all the k-th order partial derivatives of f: Rn → R are continuous at a ∈ Rn, then by Clairaut's theorem, one can change the order of mixed derivatives at

If you are a mobile device (especially a phone) then the equations will appear very small. http://accessdtv.com/taylor-series/taylor-series-error-estimation-formula.html And you keep going, I'll go to this line right here, all the way to your Nth degree term which is the Nth derivative of f evaluated at a times x Solution 1 As with the first example we’ll need to get a formula for .  However, unlike the first one we’ve got a little more work to do.  Let’s first take However, because the value of c is uncertain, in practice the remainder term really provides a worst-case scenario for your approximation. Taylor Series Remainder Calculator

Here is the Taylor Series for this function.                                                     Now, let’s work one of the easier examples in this section.  The problem for most students is that it may So if you put an a in the polynomial, all of these other terms are going to be zero. Generated Sun, 30 Oct 2016 19:02:48 GMT by s_fl369 (squid/3.5.20) ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.9/ Connection http://accessdtv.com/taylor-series/taylor-series-error-estimation-problems.html What are they talking about if they're saying the error of this Nth degree polynomial centered at a when we are at x is equal to b.

This means that for every a∈I there exists some r>0 and a sequence of coefficients ck∈R such that (a − r, a + r) ⊂ I and f ( x ) Taylor's Inequality F of a is equal to P of a, so the error at a is equal to zero. To obtain an upper bound for the remainder on [0,1], we use the property eξSo the error of b is going to be f of b minus the polynomial at b.

From Site Map Page The Site Map Page for the site will contain a link for every pdf that is available for downloading. Note If you actually compute the partial sums using a calculator, you will find that 7 terms actually suffice. Sign in Transcript Statistics 38,950 views 81 Like this video? Lagrange Error Bound Problems And it's going to look like this.

Relationship to analyticity Taylor expansions of real analytic functions Let I ⊂ R be an open interval. Compute F ′ ( t ) = f ′ ( t ) + ( f ″ ( t ) ( x − t ) − f ′ ( t ) ) The second inequality is called a uniform estimate, because it holds uniformly for all x on the interval (a − r,a + r). Check This Out Krista King 14,459 views 12:03 Taylor's Theorem with Remainder - Duration: 9:00.

The N plus oneth derivative of our error function or our remainder function, we could call it, is equal to the N plus oneth derivative of our function. Download Page - This will take you to a page where you can download a pdf version of the content on the site. Sign in 82 5 Don't like this video? patrickJMT 130,005 views 2:22 Estimating error/remainder of a series - Duration: 12:03.

The goal is to find so that . Notice as well that for the full Taylor Series, the nth degree Taylor polynomial is just the partial sum for the series. Sign in to add this video to a playlist. So this is going to be equal to zero.

Now, what is the N plus onethe derivative of an Nth degree polynomial? Also, since the condition that the function f be k times differentiable at a point requires differentiability up to order k−1 in a neighborhood of said point (this is true, because It has simple poles at z=i and z= −i, and it is analytic elsewhere. Graph of f(x)=ex (blue) with its quadratic approximation P2(x) = 1 + x + x2/2 (red) at a=0.

Modulus is shown by elevation and argument by coloring: cyan=0, blue=π/3, violet=2π/3, red=π, yellow=4π/3, green=5π/3. Combining these estimates for ex we see that | R k ( x ) | ≤ 4 | x | k + 1 ( k + 1 ) ! ≤ 4 Since ex is increasing by (*), we can simply use ex≤1 for x∈[−1,0] to estimate the remainder on the subinterval [−1,0]. Solution Again, here are the derivatives and evaluations.                      Notice that all the negative signs will cancel out in the evaluation.  Also, this formula will work for all n,

Here's the formula for the remainder term: So substituting 1 for x gives you: At this point, you're apparently stuck, because you don't know the value of sin c. Algebra/Trig Review Common Math Errors Complex Number Primer How To Study Math Close the Menu Current Location : Calculus II (Notes) / Series & Sequences / Taylor Series Calculus II [Notes]


# Does there exist an open subset $A \subset [0,1]$ such that $m_*(A)\neq m_*(\bar{A})$?

Does there exist an open subset $$A \subset [0,1]$$ such that $$m_*(A)\neq m_*(\bar{A})$$?

I was thinking we could approximate any set from inside by a closed set . This need not true from outside.

So I was expecting there should be some counterexample to the above statement.

Any help will be appreciated

• Is $m_*$ outer or inner Lebesgue measure? – Alex Ortiz Feb 17 at 4:05
• Sir it is outer measure. Is answer will change if we put inner measure? As i had only studied outer measure. I was thinking till thar inner measure will work same. – MathLover Feb 17 at 4:08
• It is actually inconsequential since both inner and outer measure are subadditive with respect to countable unions; see my answer below. Cheers! – Alex Ortiz Feb 17 at 4:19

Enumerate the rational numbers in $$[1/4,3/4]$$ as $$\{r_n:n\in\mathbf{Z}_{>0}\}$$, and let $$\epsilon < 1/8$$. For each $$n$$, choose an interval $$I_n$$ centered at $$r_n$$ of width $$\epsilon/2^n$$, and put $$A = \bigcup_{n=1}^\infty I_n$$. Note that $$A$$ is an open subset of $$\mathbf R$$ contained in $$[0,1]$$ because it is a union of open intervals. Since $$A$$ contains the rationals in $$[1/4,3/4]$$, density of $$\mathbf Q$$ in $$\mathbf R$$ implies that the closure $$\overline A$$ contains the closed interval $$[1/4,3/4]$$.
By countable subadditivity (of Lebesgue outer or inner measure, this is an inconsequential point for the matter at hand), $$m_*(A) \le \sum_{n=1}^\infty m_*(I_n) = \sum_{n=1}^\infty \frac{\epsilon}{2^n} = \epsilon < 1/8.$$ On the other hand, by monotonicity, $$m_*\big(\overline A\big) \ge m_*\big([1/4,3/4]\big) = 1/2,$$ so $$m_*(A) < 1/8 < 1/2 = m_*\big(\overline A\big).$$
• Why not just let $A$ be an open subset of $(0,1)$ containing $\mathbb Q \cap (0,1)$ such that $m(A)<1/2?$ – zhw. Feb 17 at 4:43


# Question on modular arithmetic?

Would this ever be possible:

$$a b^2 ≡ a \pmod p$$

where $p$ is a prime number and $1<a<p$ and $1<b$

Please back your answer with some kind of proof other than Fermat's Little Theorem. This isn't homework.

-
Put $a=0$ then true for all $b$. –  john w. Apr 21 '12 at 22:03
Sorry, forgot to include $p$ and $b$ have to be greater than 1! –  user26649 Apr 21 '12 at 22:06
Any $b \equiv \pm 1 \pmod p.$ –  Will Jagy Apr 21 '12 at 22:07

Hint $\$ prime $\rm\: p\ |\ ab^2-a = a\:(b-1)(b+1)\ \Rightarrow\ p\ |\ a\ \ or\ \ p\ |\ b-1\ \ or\ \ p\ |\ b+1$

-
@Downvoter: Why? If something is not clear then please feel free to ask questions and I am happy to elaborate. –  Bill Dubuque Apr 21 '12 at 23:45
I don't see why the answer was downvoted... Anyways, your answer was perfect, thank you! –  user26649 Apr 22 '12 at 0:50

If $a\equiv0\bmod p$, the given relation is true for all $b$.

If $a\not\equiv0\bmod p$ then $a$ can be cancelled from both sides of the congruence which reduces to $b^2\equiv1\bmod p$, hence $b\equiv\pm1\bmod p$.

-
would the downvoter care to explain? –  Andrea Mori Apr 21 '12 at 22:47
It seems someone is unhappy with both of our answers. I cannot imagine why. But then voting is often irrational here. –  Bill Dubuque Apr 21 '12 at 23:48

Since $p$ is prime, we can cancel $a$ from both sides unless $a\equiv 0 \pmod p$ (this doesn't always work if $p$ is a composite number). We get $b^2 \equiv 1 \pmod p$. Again, since $p$ is prime, a number can have only two mod-$p$ square roots (it can have more than two in some cases if $p$ is composite). The two square roots of $1$ are $\pm 1$ and $-1$ is of course the same as $p-1$.

So $ab^2\equiv a\pmod p$ holds if either $a\equiv 0$ or $b\equiv\pm1$, but not otherwise.

So which parts of this do you want proofs of? The proof that nonzero numbers are invertible in mod $p$ (thereby justifying the cancelation from both sides)? I once posted an answer that shows how to find the inverse. The proof that there can't be more than two square roots if $p$ is prime? (That latter fact is a sort of corollary.)

-


# Math Help - proving the cantor set is integrable

1. ## proving the cantor set is integrable

I would like to know how to do this problem before my test tomorrow and I'm not really sure how to do it. Any guidance would be appreciated.

Let $C$ be the Cantor set. Let $f:[0,1]\rightarrow \mathbb{R}$ be determined by $$f(x)= \begin{cases} 1, &\text{when x\in C }\\ 0, &\text{when x\notin C }\\ \end{cases}$$

Show that $f$ is Riemann integrable on $[0,1]$ and $\int _{0}^{1}f=0$. [That is the "length of the Cantor set is 0.]

I want to approach it like this but I'm not sure if it is correct:
We want to show that $f$ is integrable we need to show that $\{\sum S|S \text {is a lower step function of f}\} - \{\sum s|s \text {is a lower step function of f}\}<\epsilon$ for some $\epsilon >0$.
We can make $\sum s=0$ when $x\notin C$. So i think all we have to do is to show that $\sum S< \epsilon$. However, I'm not sure how to do this.

2. Originally Posted by zebra2147
I would like to know how to do this problem before my test tomorrow and I'm not really sure how to do it. Any guidance would be appreciated.

Let $C$ be the Cantor set. Let $f:[0,1]\rightarrow \mathbb{R}$ be determined by $$f(x)= \begin{cases} 1, &\text{when x\in C }\\ 0, &\text{when x\notin C }\\ \end{cases}$$

Show that $f$ is Riemann integrable on $[0,1]$ and $\int _{0}^{1}f=0$. [That is the "length of the Cantor set is 0.]

I want to approach it like this but I'm not sure if it is correct:
We want to show that $f$ is integrable we need to show that $\{\sum S|S \text {is a lower step function of f}\} - \{\sum s|s \text {is a lower step function of f}\}<\epsilon$ for some $\epsilon >0$.
We can make $\sum s=0$ when $x\notin C$. So i think all we have to do is to show that $\sum S< \epsilon$. However, I'm not sure how to do this.
So start with the definition of the Cantor set. There are certain "removed" intervals, what are they?

3. The middle third of each line segment is removed. For example, for [0,1] we would have [0,1/3]U[2/3,1]. So, (1/3,2/3) would be removed.

4. Try proving that $[0,1] - C$ has measure 1, implying that C has measure 0.

5. Ok, here is what I want to say but I'm not sure how to write it correctly of if its even in the right direction...

If we let $s$ be a lower step function of $f$, then we see that $\sum s=0$. Then if we choose some upper step function, $S$, such that $\sum S=\sum A_{i}(x_{i}-x_{i-1})$ where $A_{i}=\text{height of the rectangle}$ then for any interval contained in $[0,1]$, we can find an element, $x_i$ that is contained in the Cantor set and is infinitely close to another element $x_{i-1}$ that is not contained in the Cantor set. Thus, we have $x_{i}-x_{i-1}\approx 0$. Thus, $\sum A_{i}(x_{i}-x_{i-1})\approx 0=\sum S$.
Thus, $\sum s+\sum S\approx 0$ which is less then any $\epsilon >0$. Thus, $\int_{0}^{1}f=0$.

I know that is not exactly the direction that you were leading me to but I think it is similar.

6. I think that it would be better to show that the upper sum and lower sum are equal to each other. Recall that

$\displaystyle U(f)=\inf_{P} U(f,P)$ and $\displaystyle L(f)=\sup_{P} L(f,P)$

where $P$ refers to some partition of $[0,1]$. We say that $f$ is Riemann-integrable if $U(f)=L(f)$.

Now I propose that we consider a sequence of partitions based on the cuts performed in the construction of the Cantor set. Let $P_1=\{0,1/3,2/3,1\}$ (corresponding to the removal of the middle third of the interval). Then, $U(f,P_1)=L(f,P_1)=2/3$. Let $P_2=\{0,1/9,2/9,1/3,2/3,7/9,8/9,1\}$ (again, corresponding to the middle thirds of the remaining intervals). Then, $U(f,P_2)=L(f,P_2)=4/9$. Perform this same procedure to get $P_3, P_4, \ldots, P_n,\ldots$. Now taking $n\to \infty$, we have $U(f,P_n)\to 0$ and $L(f,P_n)\to 0$. This shows that

$U(f)\leq U(f,P_n)\to 0$ and $L(f)\geq L(f,P_n)\to 0$

or in other words,

$U(f)\leq 0\leq L(f)$

But at the same time, from the definition of the upper and lower sums,

$U(f)\geq L(f)$

Therefore $U(f)=L(f)=0$, so this function $f$ is Riemann-integrable with integral value 0.


# Quotient rings of Gaussian integers $\mathbb{Z}[i]/(2)$, $\mathbb{Z}[i]/(3)$, $\mathbb{Z}[i]/(5)$,

I am studying for an algebra qualifying exam and came across the following problem.

Let $R$ be the ring of Gaussian Integers. Of the three quotient rings $$R/(2),\quad R/(3),\quad R/(5),$$ one is a field, one is isomorphic to a product of fields, and one is neither a field nor a product of fields. Which is which and why?

I know that $2=(1+i)(1-i)$ and $5=(1+2i)(1-2i)$, so neither $(2)$ nor $(5)$ is a prime ideal of $R$. Then (I think) these same equations in $R/(2)$ and $R/(5)$, respectively, show that neither is an integral domain. Regardless, I can show that 3 is a Gaussian prime, hence $(3)$ is maximal in $R$ and $R/(3)$ is the field. But if I am correct about the others not being integral domains, I fail to see how either could be a product of fields.

I hope that this can be answered easily and quickly. Thanks.

-
A product of fields is not an integral domain. Consider the zero divisors $(1,0)$ and $(0,1)$. –  Jared May 17 '13 at 1:07
That's helpful, thanks. Since R/(2) has just 4 elements, if it were isomorphic to a product of fields, then it would necessarily be isomorphic to Z/(2)xZ/(2). But $i^2=1$ in R/(2), and every element of Z/(2)xZ/(2) when squared equals itself. So... From the unusual phrasing of the question, I suppose R/(5) is isomorphic to a product of fields. Is this right? Would that product be Z/(5)/Z/(5)? –  John Adamski May 17 '13 at 1:34
You might find this helpful: Splitting of prime ideals in Galois Extensions (Wikipedia). –  kahen May 17 '13 at 1:51

Now is a very good time for a quick foray into the ideal-theoretic version of Sun-Ze (better known as the Chinese Remainder Theorem). Let $R$ be a commutative ring with $1$ and $I,J\triangleleft R$ coprime ideals, i.e. ideals such that $I+J=R$. Then

$$\frac{R}{I\cap J}\cong\frac{R}{I}\times\frac{R}{J}.$$

First let's recover the usual understanding of SZ from this statement, then we'll prove it. Thanks to Bezout's identity, $(n)+(m)={\bf Z}$ iff $\gcd(n,m)=1$, so the hypothesis is clearly analogous. Plus we have $(n)\cap(m)=({\rm lcm}(m,n))$. As $nm=\gcd(n,m){\rm lcm}(n,m)$, if $n,m$ are coprime then compute the intersection $(n)\cap(m)=(nm)$. Thus we have ${\bf Z}/(nm)\cong{\bf Z}/(n)\times{\bf Z}/(m)$. Clearly induction and the fundamental theorem of arithmetic (unique factorization) give the general algebraic version of SZ, the decomposition ${\bf Z}/\prod p_i^{e_i}{\bf Z}\cong\prod{\bf Z}/p_i^{e_i}{\bf Z}$.

(How this algebraic version of SZ relates to the elementary-number-theoretic version involving existence and uniqueness of solutions to systems of congruences I will not cover.)

Without coprimality, there are counterexamples though. For instance, if $p\in\bf Z$ is prime, then the finite rings ${\bf Z}/p^2{\bf Z}$ and ${\bf F}_p\times{\bf F}_p$ (where ${\bf F}_p:={\bf Z}/p{\bf Z}$) are not isomorphic, in particular not even as additive groups (the product is not a cyclic group under addition).

Now here's the proof. Define the map $R\to R/I\times R/J$ by $r\mapsto (r+I,r+J)$. The kernel of this map is clearly $I\cap J$. It suffices to prove this map is surjective in order to establish the claim. We know that $1=i+j$ for some $i\in I$, $j\in J$ since $I+J=R$, and so we further know that $1=i$ mod $J$ and $1=j$ mod $I$, so $i\mapsto(I,1+J)$ and $j\mapsto(1+I,J)$, but these latter two elements generate all of $R/I\times R/J$ as an $R$-module so the image must be the whole codomain.

Now let's work with ${\cal O}={\bf Z}[i]$, the ring of integers of ${\bf Q}(i)$, aka the Gaussian integers. Here you have found that $(2)=(1+i)(1-i)=(1+i)^2$ (since $1-i=-i(1+i)$ and $-i$ is a unit), that the ideal $(3)$ is prime, and that $(5)=(1+2i)(1-2i)$. Furthermore $(1+i)$ is obviously not coprime to itself, while $(1+2i),(1-2i)$ are coprime since $1=i(1+2i)+(1+i)(1-2i)$ is contained in $(1+2i)+(1-2i)$. Alternatively, $(1+2i)$ is prime and so is $(1-2i)$ but they are not equal so they are coprime. Anyway, you have

• ${\bf Z}[i]/(3)$ is a field and
• ${\bf Z}[i]/(5)\cong{\bf Z}[i]/(1+2i)\times{\bf Z}[i]/(1-2i)$ is a product of fields.

Go ahead and count the number of elements to see which fields they are. However, ${\bf Z}[i]/(2)={\bf Z}[i]/(1+i)^2$ is not a field or product of fields, although the fact that its characteristic is prime (two) may throw one off the chase. In ${\bf Z}[i]/(1+i)^2$, the element $1+i$ is nilpotent. Since this ring has order four, it is not difficult to check that it is isomorphic to ${\bf F}_2[\varepsilon]/(\varepsilon^2)$, which is not a product of fields since $\epsilon\leftrightarrow 1+i$ is nilpotent and products of fields contain no nonzero nilpotents.

-

Why don't you first think through the case of $\mathbb Z/n\mathbb Z$. When is this a field? When is it a product of fields? When is it neither? Try to relate your answer to the factorization of $n$ and the Chinese Remainder Theorem. Now see if you can generalize it to $\mathbb Z[i]$ (or to any PID).

-

I find quotients of polynomial rings easier to reason with algebraically than subfields of $\mathbb{C}$.

Because $\mathbb{Z}[i] \cong \mathbb{Z}[x] / (x^2 + 1)$, we can do arithmetic with rings and ideals. Calculating in more detail than is usually necessary:

\begin{align} \mathbb{Z}[i] / (3) &\cong \left( \mathbb{Z}[x] / (x^2 + 1) \right) / (3) \\&\cong \mathbb{Z}[x] / (3, x^2 + 1) \\&\cong \left( \mathbb{Z}[x] / (3) \right) / (x^2 + 1) \\&\cong \left(\mathbb{Z} / (3)\right)[x] / (x^2 + 1) \\&\cong \mathbb{F}_3[x] / (x^2 + 1) \end{align}

and so we've reduced the problem to one of quotients of polynomial rings over the finite field $\mathbb{F}_3$.

-

$\Bbb Z[i]/2\,$ isn't a field or $\color{#c00}{\Pi F}$ (product of fields), since it has a nonzero nilpotent: $\,(1\!+\!i)^2 = 2i = 0$.
$\Bbb Z[i]/5\,$ isn't a field by $\,(2\!-\!i)(2\!+\!i)= 5 = 0,\,$ so it is the $\color{#c00}{\Pi F},\,$ leaving $\,\Bbb Z[i]/3\,$ as the field. $\$ QED

-


# Visualizing the set of points in a regular polygon closer to center than to vrtices (Voronoi cell)?

Let $$P_n$$ be the regular convex $$n$$-gon centered at $$p_0$$ with $$n$$ vertices $$p_1, p_2, ..., p_n$$ and $$(n>2)$$.

Let $$S_n$$ be the set of all points "$$s$$" within the region bounded by $$P_n$$ where:

$$distance(s,p_0) \leq distance(s,p_k)$$... $$(\forall k=\{1,2,...,n\})$$.

For instance $$S_3$$ would look like this:

And $$S_4$$ would look like this:

And just thinking about this to the extreme... $$\lim_{n\to\infty}S_n$$ should look something like this (call it "$$S_\infty$$" for simplicity):

Is there a way to show (either using geometry or a simple brute-force code in Python) what $$S_n$$ should look like for any $$n>2$$?

I would really like to see what shapes emerge. Is there a way to animate it in Python? Like have circles radiate from each vertex $$p_k$$ and the center $$p_0$$ until they crash into each other to make straight lines defining the new region $$S_n$$?

Depending on the answer, I'd ideally like to transpose this question into 3-D for the 5 platonic solids.

For instance, examining a cube (i.e. 8 vertices), define $$D_8$$ as the set of all points "$$s$$" such that:

$$distance(s,p_0) \leq distance(s,p_k)$$... $$(\forall k=\{1,2,...,8\})$$.

Then $$D_8$$ is actually a truncated octahedron! I'm super curious what the other 4 platonic solids produce... As well as what higher $$S_n$$ regions look like (e.g. for a pentagon, hexagon, octagon, dodecagon, etc.).

Here's an insight that I find to be an elegant solution for n=3,4, or 6 (triangle, square, hexagon). Observe that you can tessellate all of 2-D space with regular triangles, squares, and regular hexagons. Now imagine each vertex $$p_k$$ is actually the center of a nearby triangle/square/hexagon (centered at $$p_k$$ instead of at $$p_0$$).

For instance: $$S_3$$ can be more easily distinguished by drawing 3 more triangles centered at $$p_1, p_2 and p_3$$.

Similarly for $$S_4$$, drawing 4 more squares centered at $$p_1, p_2, p_3 and p_4$$ would show us the shape below, which we can then easily discern needs to be distilled into the $$S_4$$ shading we saw above.

EDIT:

Based on the comment about Voronoi Diagrams, I did more research and tried it out in R. Here's the region $$S_8$$ for example (use your imagination to connect the 8 outer dots to form the enclosing octagon):

The upshot seems to be that actually only $$n=3$$ and $$n=4$$ were interesting. For $$n>4$$ the pattern is simply to create a smaller version of the n-gon rotated by the internal angle of that n-gon. The shrinkage continues forever, but is also slowing forever, with the limit being circle of radius $$\frac{r}{2}$$ shown in the $$S_\infty$$ diagram from above.

More directly:

$$\dfrac{Area(S_3)}{Area(P_3)}=\dfrac{2}{3}$$

$$\dfrac{Area(S_4)}{Area(P_4)}=\dfrac{1}{2}$$

$$\dots = \dots$$

$$\dfrac{Area(S_\infty)}{Area(P_\infty)}=\dfrac{1}{4}$$ (limit -> lower bound)

• You're talking about the Voronoi diagram of the vertices and the centroid.
– user856
Jan 26 '20 at 7:47
• Geometrically, that inequality represents the half-space containing $p_0$ defined by the perpendicular bisecting plane of the line segment connecting $p_0$ and $p_k$. Take the intersection of all these half-spaces with the original polyhedron. Jan 26 '20 at 22:24
• @mr_e_man As said in a compact way by Rahul, it is the Voronoi cell associated with the center $p_0$, in the Voronoi diagram generated by the $p_k$s. Jan 29 '20 at 19:08

You can obtain it easily with Wolfram Mathematica (see the pictures below).

P[n_] := Table[{Cos[2*Pi*i/n], Sin[2*Pi*i/n]}, {i, 0, n}];

graph[n_] := RegionPlot[AllTrue[Table[(x - P[n][[i, 1]])^2 + (y - P[n][[i, 2]])^2, {i, 1,n}], # > x^2 + y^2 &], {x, -1, 1}, {y, -1, 1}, PlotPoints -> 20];

The 3D version can be built in the same way. For instance, for the tetrahedron:

P = {{1, 1, 1}, {1, -1, -1}, {-1, 1, -1}, {-1, -1, 1}};

p2 = ConvexHullMesh[P, MeshCellStyle -> {1 -> {Thick, Black}, 2 -> Opacity[0.2]}];

p1 = RegionPlot3D[ RegionMember[p2, {x, y, z}] && AllTrue[ Table[ Norm[{x, y, z} - P[[i]]], {i, 1, Length[P]}], # > x^2 + y^2 + z^2 &] , {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, PlotPoints -> 60];

Show[p2, p1, ViewPoint -> {2, 4, 4}]

• It's neat that for the cube some of the faces are perfect hexagons.
– user856
Jan 29 '20 at 10:57
• @PierreCarre can you please provide the sample code for the cube? I'm not too familiar with these functions in mathematica unfortunately Jan 31 '20 at 2:45
• @Andrew I just added some code for the 3D case. Jan 31 '20 at 10:17


# Biased coin with a $3/4$ chance to land on the side it was before the flip

Consider a hypothetical coin (with two sides: heads and tails) that has a $3/4$ probability of landing on the side it was before the flip (meaning, if I flip it starting heads-up, then it will have an only $1/4$ probability of landing tails-up). If it begins on heads, what is the probability that it is on tails after 10 flips? What about 100 flips? Assume that each flip starts on the same side as it landed on the previous flip.

Note: this is not a homework problem, just something I thought up myself.

• I was with you all the way up to the last sentence (Assume that each flip...) - what does that mean? The rest makes perfect sense. – mathguy May 24 '16 at 3:27
• Coin flips have been shown to have a bias according to the side they start on actually. Don't remember the researcher name though, pretty famous person in California iirc, look it up. I'm guessing that the op wasn't aware of that though. – jdods May 24 '16 at 3:30
• This could probably be solved by setting up a simple 2 state Markov chain. I'd write it up but an away for the evening now. – jdods May 24 '16 at 3:33
• "this is not a homework problem, just something I thought up myself" -- then well done, because as it happens this is a fairly common kind of exercise! You've found the "right" problem, the one that (with others like it) provokes the theory of Markov chains. – Steve Jessop May 24 '16 at 10:18
• @mathguy It seems to me he's saying the side facing up doesn't change from the time the coin lands to the time that it's flipped again. Which sounds redundant, but it's better than being unclear. – Turambar May 24 '16 at 12:46

Let $p_n$ be the probability the coin is on tails after $n$ flips. Note that $p_0=0$.

The coin can be on tails after $n+1$ flips in two different ways: (i) it was on tails after $n$ flips, and the next result was a tail or (ii) it was on heads after $n$ flips, and the next result was a tail.

The probability of (i) is $(3/4)p_n$ and the probability of (ii) is $(1/4)(1-p_n)$. Thus $$p_{n+1}=\frac{1}{4}+\frac{1}{2}p_n.\tag{1}$$ Solve this recurrence relation. The general solution of the homogeneous recurrence $p_{n+1}=\frac{1}{2}p_n$ is $A\cdot \frac{1}{2^n}$. A particular solution of the recurrence (1) is $\frac{1}{2}$. So the general solution of the recurrence (1) is $$p_{n}=A\cdot \frac{1}{2^n}+\frac{1}{2}.$$ Set $p_0=0$ to find $A$. We find that $p_n=\frac{1}{2}-\frac{1}{2^{n+1}}$.

If you mean that $\Pr(H_i|H_{i-1}) = \Pr(T_i|T_{i-1}) = 3/4$ for all $i$, then this is a two-state homogeneous Markov chain. The transition matrix is

$$P = \begin{pmatrix} 3/4 & 1/4 \\ 1/4 & 3/4 \end{pmatrix}.$$

This should get you started....

I'd comment but I don't have the rep, strangely you require 50.

Also, with regards to the bias in a coin flip, it's a paper by Diaconis:

Let $p_n$ be the probability that the coin is heads up after $n$ tosses. Then $p_0=1$ since it starts on heads, and $$p_n=\frac34p_{n-1}+\frac14(1-p_{n-1})$$ which simplifies to $$\left(p_n-\frac12\right)=\frac12\left(p_{n-1}-\frac12\right)\ .$$ Iterating, $$p_n-\frac12=\Bigl(\frac12\Bigr)^{n+1}$$ so $$p_n=\frac12+\Bigl(\frac12\Bigr)^{n+1}\ .$$

• This no longer fails for $p_1 = \frac 3 4$. – Axoren May 24 '16 at 3:36

Another way of looking at it is to imagine that you toss two fair coins each time, using the second coin to choose between the first coin and the previous (originally heads). If the second coin always chooses the previous result then you end up with heads, while if at any point the second coin chooses the first coin then as this is fair the end result will have equal probability of being heads or tails. The chances of the latter being $1-\frac1{2^n}$, the chance of the final result being tails is therefore half of that.

• This is the best possible solution for p=1/4 and I think it generalizes to all other values of p. – zyx May 24 '16 at 17:32
• At least for p<1/2, where coin 2 has probability (1-2p) of choosing the previous result and coin 1 is fair. One gets half of $(1 - (1-2p)^n)$ which is correct. Other than changing the probability for coin 2, every word of the answer stays the same and the argument works. This answer is just brilliant. Well done. – zyx May 24 '16 at 17:49

$p_n(\text{heads}) = \frac 3 4p_{n-1}(\text{heads}) + \frac 1 4 (1 - p_{n-1}(\text{heads}))$

$p_n(\text{heads}) = \frac 1 4 + \frac 1 2p_{n-1}(\text{heads})$

$p_1(\text{heads}) = \frac 3 4$

Everyone else beat me too it. Was still writing the recurrence relation. :\

Any solution with the words "heads" and "tails" is doing extra work.

We want the chance of an odd number of reversals, each with probability $p=1/4$, to happen in $n$ independent trials. The coin briefly remembers its current state but not whether that state was reached by reversing on the previous trial. This makes the reversals independent of each other.

From the binomial theorem that probability is $$\frac{((1-p)+p)^n - ((1-p) - p)^n)}{2} = \frac{1}{2} - \frac{(1 - 2p)^n}{2}$$ which is consistent with the other solutions and shows that the $(1/2)^{n}$ exponential decay of the "memory" is really a power of $(1-2p)$.


# If $15$ distinct integers are chosen from the set $\{1, 2, \dots, 45 \}$, some two of them differ by $1, 3$ or $4$.

$$\blacksquare~$$ Problem: If $$15$$ distinct integers are chosen from the set $$\{1, 2, \dots, 45 \}$$, some two of them differ by $$1, 3$$ or $$4$$.

$$\blacksquare~$$ My Approach:

Let the minimum element chosen be $$n$$. Then $$n + 1 , n + 3 , n + 4$$ can't be taken.

We make a small claim.

$$\bullet~$$ Claim: In a set of $$~7$$ consecutive numbers at most $$2$$ numbers can be chosen.

$$\bullet~$$ $$\textbf{Proof:}$$ Let us name the elements of the set as $$\{ 1,2,3,\dots,7 \}$$.

Now let's consider the least element is chosen. If the least element is $$1$$, then $$2,4,5$$ can't be chosen.

So we are left with $$3, 6, 7$$.

$$\circ~$$ If $$~3~$$ is chosen, then $$6, 7$$ can't be in the set. And if $$~3~$$ is not chosen, then only any one of the 2 elements $$\{ 6, 7 \}$$ be chosen. So, a maximum of $$2$$ elements can be chosen in this case.

$$\circ \circ~$$ If the least element is $$2,$$ then $$3, 5, 6$$ can't be there in the set. So, possible elements are 4, 7. So, one of these two can be chosen. Then, a maximum of 2 elements can be chosen in this case.

$$\circ \circ~$$ If the least element is $$3$$, then $$4,6,7$$ gets cancelled. so only $$5$$ is left in the set i.e., $$2$$ elements at most.

$$\circ \circ~$$ If the least element is $$4,$$ then $$5,7$$ gets cancelled. So the only element left is $$6$$.

Similarly,

$$\circ \circ~$$ If $$5$$ is the least element then $$6$$ gets cancelled and only $$7$$ is left. i.e., two elements. If the least element is either $$6$$ or $$7$$, then there is only one element.

So a maximum of two elements in a set of $$7$$ consecutive elements can be chosen.

Hence, the proof of the claim is done!

So, for $$42$$ elements, a maximum of $$2 \times 6 = 12$$ can be taken. However, $$3$$ more elements are required from $$3$$ more consecutive elements, which is not possible since only 2 elements at most can be chosen from a set of 3 consecutive elements.

So, a $$14$$ element subset can be formed such that, no two of them differ by $$1, 3, 4$$. Hence the $$15$$th element is one of the cancelled elements, that is, there exists a pair with their difference being $$1, 3$$ or $$4.$$

Hence, done!

Please check the solution for glitches and give new ideas too :).

• What is the question? Well done. – Ross Millikan Aug 1 at 15:04
• @RossMillikan I don't understand what you mean. – Ralph Clausen Aug 1 at 15:07
• I missed the last line. I think it is a fine proof. – Ross Millikan Aug 1 at 15:07
• Oh! okay @RossMillikan – Ralph Clausen Aug 1 at 15:10
• @RossMillikan The OP added the last line after your comment – user1001001 Aug 1 at 15:17

It is a nice argument, and you have explained it very clearly, so well done.

If you are looking for improvements, and you want it to be a bit more formal, I would make two suggestions:

1. You are very thorough proving the claim, going through all the cases, which is great. However you could shorten the proof of the claim by saying:

"If the least element is $$x$$, then we may subtract $$x-1$$ from all the numbers without changing their differences or the number of integers. Thus without loss of generality we may assume the least element is $$1$$."

Then you do not need to consider the other cases.

1. The last part of the proof (after the claim is proved) is not as thorough as the proof of the claim. You assume that for $$k=0,\cdots,5$$ the numbers $$7k+1,7k+3$$ are selected, without justifying that this is optimal. It is obvious in a way, but for a formal proof you should justify this by saying something like:

"Pick the smallest $$k$$ where $$7k+1, 7k+3$$ are not picked. Then replace the numbers in $$\{7k+1,\cdots 7k+7\}$$ that are picked with $$7k+1, 7k+3$$. From the claim we know that we have not reduced the number of integers. Also, we have not created any new differences of $$1,3,4$$."

Then finish the argument with your second to last paragraph. I would reword the first sentence slightly: "So of the first $$42$$ elements, we may assume these $$12$$ are picked."

I would lose the last paragraph as it is not needed.

Nice proof!

In the optimal case, go up in $$2$$s wherever possible. You would start with $$1$$ and pick the smallest possible number, that is, $$3$$. We can't add $$2$$ again as that would be $$1+4$$, therefore we add the next smallest possible, $$5$$ to get our next number $$8$$. We can then add $$2$$ again, and the pattern continues:

$$1,3,8,10,15,17,22,24,29,31,36,38,43,45$$

Via this strategy we only pick $$14$$ numbers, so $$15$$ is impossible without violating the $$1,3,4$$ difference.

• While this strategy is good in some cases, I think it's a bad general approach to proofs. I call it the "what's the worst that could happen?" model --- you work that out, show it's impossible, and say you're done. That relies on two things: (1) that the second worst doesn't turn out to be viable even though the worst is not, and (2) that you've correctly identified the worst case. My experience is that students (and even professionals) often manage to mess up with both failure modes. – John Hughes Aug 1 at 15:48
• You claim that you would pick the smallest possible number in order to generate an optimal sequence. But this is something that needs to be proven. – TonyK Aug 1 at 16:32

Here's a shorter version which however relies on the same ideas as your and Rhys Hughes' approach.

Let's assume we can choose $$15$$ integers whose mutual differences are never $$0,1,3$$ or $$4$$, and call them $$x_1 in ascending order.

Claim: For all $$1 \le i \le 13$$, we have $$x_i +7 \le x_{i+2}$$.

Proof of claim: Let's make a case distinction about what $$x_{i+1}-x_i$$ is. Since it cannot be $$0,1,3$$ or $$4$$, the only cases are:

• First case, $$x_{i+1} - x_{i} =2$$. Then if we also had $$x_{i+2} - x_{i+1} = 2$$ we would have $$x_{i+2}-x_i =4$$ which was excluded. So $$x_{i+2}-x_{i+1}$$, since it cannot be $$0,1,2,3,4$$ must be $$\ge 5$$ which implies the claim.
• Second case, $$x_{i+1}-x_i \ge 5$$. Then since $$x_{i+2}-x_{i+1} \neq 0,1$$ it must be $$\ge 2$$ and the claim follows.

The claim is proven.

Now it follows iteratively that $$x_3 \ge x_1 +7$$, $$x_5 \ge x_3+7 \ge x_1+14$$, ..., $$x_{15} \ge x_1+49$$ which of course contradicts $$1 \le x_1 \le x_{15} \le 45$$. Actually this shows that you cannot even select $$15$$ such integers from the set $$\{1, ..., 49\}$$.


Numerical Approximation of the Continuous Fourier Transform

Given a function $F(k)$ in frequency space (sufficiently nice enough, eg. a Gaussian), I would like to compute its Fourier inverse $$f(x) = \frac{1}{2\pi}\int_{-\infty}^{\infty}e^{ikx}F(k)dk$$ numerically (there is no explicit analytical formula), at some specified evenly distributed points $x_n$.

Assume $F(k)$ is symmetric about $k=0$ and "essentially zero" outside the interval $-a/2\leq k \leq a/2$.

Naively, one way I would proceed is by dividing the interval $(-a/2,a/2)$ into $N$ subintervals (choose $N$ to be a power of two) and then piecewise approximate the integral: $$f(x_n) \approx \frac{1}{2\pi}\frac{a}{N}\sum_{m=0}^{N-1} e^{ik_mx_n}F(k_m)$$ where, for example, we might take $k_m = (m-N/2)\frac{a}{N}$for $0\leq m\leq N-1$.

For efficiency I would like to use the Fast Fourier Transform (FFT) to approximate $f(x_n)$. So I need to put $f(x)$ into the correct format for the Discrete Fourier Transform (DFT) $$L_k = \frac{1}{N}\sum_{m=0}^{N-1}G_me^{(2\pi i) km/N},\,\,\,\,k = 0,\ldots,N-1$$ where $G_m$ is the $m$th sampling of some given function $G$.

To proceed, we divide the interval $(-a/2,a/2)$ into $N$ pieces ($N$ a power of two) and let $k_m = (m-N/2)\frac{a}{N}$for $0\leq m\leq N-1$, as before. Then $$f(x) \approx \frac{1}{2\pi}\frac{a}{N}\sum_{m=0}^{N-1} e^{ik_mx}F(k_m)$$ However, in order for this formula to be in the correct format to use the DFT, we cannot evaluate f at any $x$: I believe they must be of the form $x_k = \frac{2\pi}{a}(k-N/2), 0\leq k \leq N-1$.

So in order to use the FFT, the points at which I can "evaluate" the function $f$ is determined by how I sample my function $F(k)$ and the number of sample points.

But in the naive method, I can, in principle, find $f(x)$ for any given x, regardless of how many sample points I take of the function $F(k)$.

My questions are:

1. Is it even possible to use the FFT, if I need to compute f at specified points $x_n$?

2. If not, are there other numerical methods that would be more suitable?

• I came across your very same problem a week ago and I was quite astonished in realizing that there are no routines to do the job in known (at least those that I know) computer algebra programs (e.g. Mathematica/Matlab). The best thing I found is numerical recipes. There is a whole section on Fourier integration. Basically I just copied the routines suggested there and now I'm an happy person. I think that's the best what the market offers at least according to my experience. – lcv May 11 '13 at 0:48
• Bythe way, the routine in numerical recipes implements fgp's trick and more. – lcv May 11 '13 at 22:27
• @lcv: can you share the link to the routine you found? I also came across this problem and I'm still shocked that this isn't some standard Matlab routine. It took some time to realize that the maximum range of the x_k numbers is increasing with larger N. Increasing N will therefore make sure that the x_k's cover the entire x-region of interest but will not increase the density inside the x-region. – Frank Meulenaar Dec 5 '13 at 8:02
• Of course, one can increase the densitiy of the x_k's is by increasing a. – Frank Meulenaar Dec 5 '13 at 8:29
• @FrankMeulenaar It's numerical recipes chapter 13.9 "Computing Fourier integrals using FFT" . In the 'C' edition is on page 584. You can find online and downloadable versions of NR. The routine you can pretty much copy-paste it from the pdf. You'll have to work a bit to remove the comments. Otherwise the routines are available online for purchase on the NR site. Good luck! – lcv Dec 6 '13 at 20:30

The following two articles may be of use. They don't let you do the transform at any old x values. But it does allow transformation from m equally spaced points in the w domain to m equally spaced points in the x domain. The Bailey and Swarztrauber article also uses a gaussian function like yours as an example. Sorry I can't be more specific but I'm learning all this stuff myself.

Bailey, D., and P. Swarztrauber. 1994. ‘A Fast Method for the Numerical Evaluation of Continuous Fourier and Laplace Transforms’. SIAM Journal on Scientific Computing 15 (5): 1105–10. doi:10.1137/0915067.

Inverarity, G. 2002. ‘Fast Computation of Multidimensional Fourier Integrals’. SIAM Journal on Scientific Computing 24 (2): 645–51. doi:10.1137/S106482750138647X.

$$\def \o {\omega}$$ (Here I use $$t$$ and $$\o$$ instead $$x$$ and $$k$$, but is equivalent) We want to calculate numerically the inverse Fourier transform of a given function $$F(\o)$$ . By definition

$$f(t)=\frac{1}{2\pi} \int_{-\infty}^{\infty} F(\o) e^{-i\o t} d\o$$

We can split it into two integrals

$$f(t)=\frac{1}{2\pi} \left( \int_{0}^{\infty} F(\o) e^{-i\o t} d\o + \int_{0}^{\infty} F(-\o) e^{i\o t} d\o \right)$$

If the original function was real then $$F(-\o)=F(\o)^{*}$$, and therefore

$$f(t)=\frac{1}{\pi} \textbf{real} \left( \int_{0}^{\infty} F(\o) e^{-i\o t} d\o \right)$$

Then we use the Riemann integral definition for $$0$$ to a very great frequency $$W$$. $$I=\int_{0}^{W} F(\o) e^{-i\o t} d\o\approx \sum_{k=0}^{N-1} F(w_k) e^{-i \Delta \o k \Delta t n} \Delta\o$$

where $$\Delta w =W/N$$ so that $$w_k= \Delta w \ \ k$$ with $$k=0,1,2,..., N-1$$ . We discretized the time by $$t_n= \Delta t \ \ n$$ with $$n=0,1,2,...,N-1$$. Next we make the basic assumption that
$$W \Delta t = 2 \pi$$ so we end up with
$$I = \Delta\o \sum_{k=0}^{N-1} F(w_k) e^{- 2 \pi i \frac{n k}{N} }$$
which is the basic definition of the Fast Fourier Transform. The problem was when I used it for a square function $$F(\o)=\frac{1}{i\o}\left( e^{i\o T_0} -1 \right)$$ This method gives an offset value. Then I modified the integral as

$$I= \Delta\o \left( \sum_{k=1}^{N-1} F(w_k) e^{- 2 \pi i \frac{n k}{N} } + \frac{1}{2}(F(w_0)+F(w_N)) \right)$$

Which is the trapezoidal rule instead of the Riemman integral, and gave a better result.

Best regards.

E. Gutierrez-Reyes

• It should say -infinity to infinity, it was a mistake. – Edahi Aug 26 '19 at 19:24

One way that comes to mind would be to compute both approximations for $f(x_n)$ and for $f'(x_n)$ one some grid $x_n$ that allows you to use FFT. To compute the approximations for $f'(x_n)$, you can use the identity $\mathcal{F}(f')(k) = ik\mathcal{F}(f)(k)$ (i.e., you get the fourier transform of the derivative by multiplying with $ik$).

To evaluate $f(x)$ at $y$, you'd then find the closest $x_n,x_{n+1}$ with $x_n \leq y < x_{n+1}$ and use polynomial interpolation (with polynomials of degree 3) to find $f(y)$ from $f(x_n)$, $f(x_{n+1})$, $f'(x_n)$, $f'(x_{n+1})$.

As long as F(k) is limited and zero outside of $-2\pi A$ to $2\pi A$ the Shannon interpolation can be used $$f(x)=\sum_{n=-\infty}^{n=\infty} f(x_n) sinc\left(\frac{\pi}{T}(x-nT)\right)$$ where $T$ is the sampling period used to determine $x_n$ and $sinc(t)=sin(t)/t$

This formula is exact as long as function spectrum ($F(k)$) is limited. Implementation of fast sinc interpolation exist


# Construct a continuous real valued function which takes zero on integers and such that image of function is not closed.

I am trying to construct a continuous real valued function $$f:\mathbb{R}\to \mathbb{R}$$ which takes zero on all integer points(that is $$f(k)=0$$ for all $$k\in \mathbb{Z}$$) and Image(f) is not closed in $$\mathbb{R}$$

I had $$f(x)=\sin(\pi x)$$ in mind. But image of $$f(x)$$ is closed.

I have a feeling that we can use some clever idea to modify this function such that it satisfy our given condition.

The image of $$\sin(\pi x)$$ is closed because the peaks all reach 1 and -1. To make it open, we need the peaks to get arbitrarily close to some value, but never reach them. The easiest way is to use an amplitude modifier that asymptotes to a constant nonzero value at infinity, such as $$\tanh(x)$$. Thus, we can use the function $$f(x) = \sin(\pi x)\tanh(x),$$ which is obviously continuous, zero at each integer, and can be easily shown to have image $$(-1,1)$$

• And if you are not familiar with $\tanh$, you can write a similar function explicitly, for example: $$f(x)=\sin(\pi x)\frac{1}{1+e^x}$$ A rational function (as the modifier factor) may also work, like: $$f(x)=\sin(\pi x)\frac{x^2+1}{x^2+2}$$ Oct 18, 2018 at 9:15
• "To make it open, we need the peaks to get arbitrarily close to some value, but never reach them" You seem to be confusing the notion of not-closed and open Oct 18, 2018 at 12:11
• @AleksJ Except for $\emptyset$ and $\mathbb R$, every open set is not-closed. Oct 18, 2018 at 15:58
• @eyeballfrog but not vice versa Oct 18, 2018 at 17:03
• I believe that the point @JohnDvorak is making is that the peaks getting arbitrarily close to some value but not reaching it is necessary, but not sufficient, for the image to be open, and that trying to get an open set is not a necessary condition for it being non-closed (although it is sufficient). Oct 18, 2018 at 17:31

The simplest solution that would come to mind is to take that sine function and multiply it with an amplitude envolope that only approaches $$1$$ in the $$\pm$$infinite limit: $$f(x) = \frac{1+|x|}{2+|x|}\cdot\sin(\pi\cdot x)$$ Plotted together with the asymptotes:

Incidentally, since you just said “not closed” but not whether it should be bounded, we could also just choose

$$f\!\!\!\!/(\!\!\!\!/x\!\!\!\!/)\!\!\!\!/ =\!\!\!\!/ x\!\!\!\!/\cdot\!\!\!\!/\sin\!\!\!\!/\!\!\!\!\!\!\!\!/(\pi\!\!\!\!/\cdot\!\!\!\!/ x\!\!\!\!/)$$

(The image of this is all of $$\mathbb{R}$$ which is actually closed, as the commenters remarked.)

A more interesting example that just occured to me:

$$f(x) = \sin x \cdot\sin(\pi\cdot x)$$ Why does this work? Well, this function never reaches $$1$$ or $$-1$$, because for that to happen you would simultaneously need $$x$$ and $$\pi\cdot x$$ to be an odd-integer multiple of $$\tfrac\pi2$$. But that can never coincide because $$\pi$$ is irrational! It does however get arbitrarily close to $$\pm1$$, in fact it gets close to $$-1$$ quite quickly due to $$\tfrac\pi2 \approx 1.5 = \tfrac32$$. But it never actually reaches either boundary.

• Can you please tell me how make these graphs? Oct 18, 2018 at 8:59
• @StammeringMathematician plotWindow [fnPlot $\x -> (1+abs x)/(2+abs x)*sin(pi*x)] with dynamic-plot (a Haskell library). Oct 18, 2018 at 9:04 • @leftaroundabout Thanks. These graphs are beautiful. Oct 18, 2018 at 9:07 • The proof that the image of$\sin(x)\sin(\pi x)$is$(-1,1)\$ seems nontrivial. I have no doubt it's true, but it's not clear to me how to prove it. Oct 18, 2018 at 16:55
• +1 for not deleting the wrong answer and preventing me to make the same mistake! Also, amazing visual explanation Oct 19, 2018 at 9:50

Using piecewise linear functions (instead of $$\sin (\pi x)$$) makes this simpler. For each $$n \neq 0$$ draw the triangle with vertices $$(n,0),(n+1,0)$$ and $$(n+\frac 1 2, 1-\frac 1 {|n|})$$. You will immediately see how to construct an example. [You will get a function (piecewise linear function) whose range contains $$1-\frac 1 {|n|}$$ for each $$n$$ but does not contain $$1$$].

If $$f$$ verifies the desired propery, its restriction $$f|_{[n,n+1]}$$ gives a continuous function on $$[n,n+1]$$ that is zero on the edges of the interval, for any $$n \in \mathbb{Z}$$. Reciprocally, if we have $$f_n : [n,n+1] \to \mathbb{R}$$ continuous with $$f_n(n) = f_n(n+1) = 0$$ for each integer $$n$$, by the gluing lemma this gives a continuous function $$f: \mathbb{R} \to \mathbb{R}$$ with $$f(n) = f_n(n) = 0$$. This means that we can approach the problem somewhat 'locally', i.e. we can fix an interval $$[n,n+1]$$. Now, the function

$$f_n (t) = \mu_n\sin(\pi(t-n))$$

takes values on $$\mu_n[-1,1] = [-\mu_n,\mu_n]$$ and $$f_n(n) = f_n(n+1) = 0$$. Thus, the family $$(f_n)_n$$ induces a continuous function $$f$$ that vanishes at $$\mathbb{Z}$$ and

$$f(\mathbb{R}) = \bigcup_{n \in \mathbb{Z}} f_n([n,n+1]) = \bigcup_{n \in \mathbb{Z}}[-\mu_n,\mu_n]$$

so the problem reduces to choosing a sequence $$(\mu_n)_n$$ so that the former union is open. One possible choice is $$\mu_n = 1-\frac{1}{|n|}$$ so that

$$f(\mathbb{R}) = \bigcup_{n\in \mathbb{Z}}[-\mu_n,\mu_n] = \bigcup_{n\in \mathbb{N}}[-1+\frac{1}{n},1-\frac{1}{n}] = (-1,1).$$

Consider

$$f(x) = \sin^2 (\pi x)\frac{x^2}{1+x^2}.$$

Then $$f$$ is continuous, $$f=0$$ on the integers, but $$f(\mathbb R) = [0,1).$$


# Thread: Need help w/ pre-calculus summer packet.

1. ## Need help w/ pre-calculus summer packet.

I know my title isn't very descriptive, but there are 3 types of questions i'm in the need of help for. I am very appreciative for any help!

Write the following absolute value expressions as piecewise expressions.
1. |x^2 + x - 12|
I know that it's possible to graph it using my calculator, but is there a way not to use my calculator? Half of calculus is without calculator.

Solve the following by factoring and making the appropriate sign charts. Write your solutions in interval notation.
2. x^2 - 16 > 0
I got (4, ∞) but I don't know what a sign chart is.

Factor completely.
3. x^2 + 12x + 36 - 9y^2
Stumped. I know I can factor out an x but not sure how that would help.

I appreciate any help. Look forward to hearing from people!

2. Originally Posted by amy1613
I know my title isn't very descriptive, but there are 3 types of questions i'm in the need of help for. I am very appreciative for any help!

Write the following absolute value expressions as piecewise expressions.
1. |x^2 + x - 12|
I know that it's possible to graph it using my calculator, but is there a way not to use my calculator? Half of calculus is without calculator.

you should already know what y = x^2 + x - 12 looks like ... well, y = |x^2 + x - 12| is the same graph except that the part that is below the x-axis (negative) is reflected to the positive side.

y = x^2 + x - 12 , x < -4 or x > 3

y = -(x^2 + x - 12) , -4 < x < 3

Solve the following by factoring and making the appropriate sign charts. Write your solutions in interval notation.
2. x^2 - 16 > 0
I got (4, ∞) but I don't know what a sign chart is.

x^2 - 16 > 0 ... note that x^2 - 16 = 0 at x = + 4 and x = -4

plot these two numbers on a number line ... it breaks the number line into three sections ...
x < -4 , -4 < x < 4 , and x > 4

take any number in each interval, and "test" it in the original inequality ... if it makes the inequality true, then all values of x in that interval make the inequality true.

you'll see that you forgot the interval (-∞ , -4)

Factor completely.
3. x^2 + 12x + 36 - 9y^2

help any?
...

3. yeah this helped a lot! thanks! so...a sign chart is just a number line graph?

4. Hello, amy1613!

Write the following absolute value expression as a piecewise expression:
. . $1)\;\;f(x) \;=\;|x^2 + x - 12|$
There are two cases to consider: . $\begin{array}{cccc}(1) & x^2 + x - 12 \:\geq \;0 \\ (2) & x^2 + x - 12 \:<\:0 \end{array}$

$\text{Case }(1)\;\;x^2 + x - 12 \:\geq\:0\quad\Rightarrow\quad (x-3)(x+4) \:\geq \:0$

. . There are two ways:

. . . . $(a)\;\;\begin{Bmatrix}x-3 \:\geq\:0 & \Rightarrow & x \:\geq \:3 \\ x+4 \:\geq \:0 & \Rightarrow & x \:\geq\:\text{-}4\end{Bmatrix}\quad\Rightarrow\quad x \:\geq\:3$

. . . . $(b)\;\;\begin{Bmatrix}x-3 \:<\: 0 & \Rightarrow & x \:<\:3 \\ x+4 \:<\:0 & \Rightarrow & x \:<\:\text{-}4 \end{Bmatrix} \quad\Rightarrow\quad x \:<\:\text{-}4$

. . Hence, if $x \geq 3\text{ or }x < -4$, then: . $f(x) \:=\:x^2+x-12$

$\text{Case }(2)\;\; x^2 + x - 12 \:<\: 0 \quad\Rightarrow\quad (x-3)(x+4) \:<\:0$

. . There are two ways:

. . . . $(a)\;\;\begin{Bmatrix}x-3 \:>\:0 & \Rightarrow & x \:>\:3 \\ x+4 \:< \:0 & \Rightarrow & x \:<\:\text{-}4 \end{Bmatrix} \quad\Rightarrow\quad x > 3 \text{ and }x < \text{-}4$ . . . impossible

. . . . $(b)\;\;\begin{Bmatrix}x-3 \:<\:0 & \Rightarrow & x \:<\:3 \\ x+4 \:> \:0 & \Rightarrow & x \:>\:\text{-}4 \end{Bmatrix} \quad\Rightarrow\quad \text{-}4 \:<\:x \:<\: 3$

. . Hence, if $\text{-}4 < x < 3$, then: . $f(x) \:=\:-(x^2+x-12) \:=\:12 - x - x^2$

Therefore: . $f(x) \;=\;\begin{Bmatrix}x^2+x-12 && \text{if }x\leq \text{-}4 \text{ or }x \geq 3 \\ \\[-4mm] 12 -x-x^2 && \text{if }\text{-}4 < x < 3 \end{Bmatrix}$

5. Originally Posted by Soroban
. . There are two ways:

. . . . $(a)\;\;\begin{Bmatrix}x-3 \:\geq\:0 & \Rightarrow & x \:\geq \:3 \\ x+4 \:\geq \:0 & \Rightarrow & x \:\geq\:\text{-}4\end{Bmatrix}\quad\Rightarrow\quad x \:\geq\:3$

. . . . $(b)\;\;\begin{Bmatrix}x-3 \:<\: 0 & \Rightarrow & x \:<\:3 \\ x+4 \:<\:0 & \Rightarrow & x \:<\:\text{-}4 \end{Bmatrix} \quad\Rightarrow\quad x \:<\:\text{-}4$

. . Hence, if $x \geq 3\text{ or }x < -4$, then: . $f(x) \:=\:x^2+x-12$

[/size]
Thanks for your response & explaination. I still can't quite understand why you picked x>-3 and not x>4. Could you go through that for me?


# Number of solutions to $a + 10b + 20c = 100$ with $a,b,c$ non-negative integers

How many solutions are there to the equation $$a + 10b + 20c = 100$$ where $a,b,c$ are non-negative integers

The problem I'm asking is another way of phrasing "How many ways can you break $100$ dollars into $1$, $10$, and $20$ dollar bills", or any multitude of variants.

Solutions can, for example, be $(a,b,c) = (100, 0, 0)$, $(10, 7, 1)$, $(0, 6, 2)$, etc.

I wrote a quick program which gave me a total of $36$ solutions, but I'd like to have a better understanding as to where this answer comes from without something resembling brute-force. Preferably, I'd like to see how to use generating functions to solve this, as that was the method I first tried (and failed) with.

The solution should be the coefficient of the 100th-power term in the product:

$$(1 + x + x^2 + x^3 + ...)(1 + x^{10} + x^{20} + ...)(1 + x^{20} + x^{40} + ...)$$ I can get this coefficient from the following: $$\lim_{x \to 0} \frac{1}{100!} \frac{d^{100}}{dx^{100}}(1 + x + x^2 + x^3 + ...)(1 + x^{10} + x^{20} + ...)(1 + x^{20} + x^{40} + ...)$$ For whatever reason, applying product rule fails (or I fail to use it correctly), as I get $3$. So, assuming $|x| < 1$, this equals: $$\lim_{x \to 0} \frac{1}{100!} \frac{d^{100}}{dx^{100}} \frac{1}{(1-x)(1-x^{10})(1-x^{20})}$$ However, to much dismay, this is not such a simple thing to find derivatives of. Any advice?

• I got $36$ as coefficient of $x^{100}$ so you were right... $$\ldots + 30 x^{98}+30 x^{99}+36 x^{100}+35 x^{101}+35 x^{102}+35 x^{103}+\ldots$$ – Raffaele Oct 20 '17 at 21:10
• @Raffaele : You should get $36$ for every coefficient from $x^{100}$ to $x^{109}$. – Eric Towers Oct 20 '17 at 21:18
• Calculating the 100th derivative is definitely harder than writing the solutions one by one. An idea is to use partial fraction decomposition on $\frac{1}{(1-x)(1-x^{10})(1-x^{20})}$ and then sum the coefficients in front of $x^{100}$. But this can be rather tedious and hard to do too. – Stefan4024 Oct 20 '17 at 21:20
• The first time I used polynomial with a degree too low. I remade my calculations with higher degree polynomials (using Mathematica) and finally got $$\ldots+42 x^{111}+42 x^{110}+36 x^{109}+36 x^{108}+36 x^{107}+36 x^{106}+36 x^{105}+36 x^{104}+36 x^{103}+36 x^{102}+36 x^{101}+36 x^{100}+30 x^{99}+\ldots$$ BTW, I did not know this combinatorial trick :) – Raffaele Oct 20 '17 at 21:31

You can simplify fairly drastically, since $a = 100-10b-20c$ means $a$ must be a multiple of $10$. So setting $a' := a/10$, we have $a' + b + 2c = 10$.

Again $a'$ is determined by $b$ and $c$, so we just need $b+2c\le 10$. For $c=\{0,1,2,3,4,5\}$ we have $\{11,9,7,5,3,1\}$ options for $b$, for a total of $36$ possible combinations.

• Nifty! Thanks for that argument. I was able to reduce it as well after reading up on the subject, but I quite like your closing argument to take $b + 2c \le 10$ and check the number of options for each $b$ at fixed $c$ – infinitylord Oct 20 '17 at 22:32
• Thanks. Although sadly(?) not using generating functions. With a little extension you can see that the same answer also applies to target values from $101$ to $109$ (using $a' = (a-r)/10$). – Joffan Oct 20 '17 at 22:39
• Slight generalization: For $x,y,z$ non-negative integers, the number of solutions to $x + by + cz = d$ where $b|c$, and $c|d$ is $(\frac{d}{2b} + 1)^2$ – infinitylord Oct 21 '17 at 2:08

Er, ..., calculate carefully?

$$(1 + x + x^2 + x^3 + ...)(1 + x^{10} + x^{20} + ...)(1 + x^{20} + x^{40} + ...) \\ = \dots +30 x^{98} + 30 x^{99} + 36 x^{100} + 36 x^{101} + ...$$

Another way: Suppose there are $n_k$ ways to write $k$ as a non-negative integer weighted sum of $\{1,10\}$. Then the total number of ways to write $k$ as a non-negative integer weighted sum of $\{1,10,20\}$ is $N = n_0 + n_{20} + n_{40} + n_{60} + n_{80} + n_{100}$, where $n_0$ counts the number of ways we finish by adding five $20$s, $n_{20}$ the number of ways we finish by adding four $20$s, ..., and $n_{100}$ the number of ways we finish by adding no $20$s.

• Now $n_0 = 1$ because $0 \cdot 1 + 0 \cdot 10$ is the only way to write $0$ as a non-negative integer weighted sum of $\{1,10\}$.
• And $n_{20} = 3$, depending on whether there are zero, one, or two $10$s in the sum, the rest being made up with $1$s.
• And $n_{40} = 5$, for the same reason : zero to four $10$s and the remainder made of $1$s.
• Finishing, $n_{60} = 7$, $n_{80} = 9$, and $n_{100} = 11$.

Finally, $N = 1 + 3 + 5 + 7 + 9 + 11 = 36$. That the number of ways is controlled by the $10$s and $20$s, with the $1$ making up the rest, is hinted in the snippet of the series in $x$, above. There is only one way to make totals up to $9$ from $\{1,10,20\}$. There are two ways for totals in $[10,19]$, four ways in $[20,29]$, six ways in $[30,31]$, nine ways in $[40,41]$, where the increment in the number of ways in each range of ten totals increases by $1$ each time we pass a multiple of $20$ (counting that we could either include or exclude one more $20$ in our sums).

Another way: You don't have to multiply out the full power series. You can calculate with $$( 1 + x+ x^2 + \cdots + x^{99} + x^{100})(1 + x^{10} + \cdots + x^{100})(1+x^{20}+\cdots+x^{100})$$ always discarding any term with power greater than $100$. If you do this from right to left, you essentially perform the calculation described above.


# Proof Verification: Implication from Field Axioms

Prove that if $a \neq 0$ then $b/(b/a) = a$

Proof:

$b/(b/a) = b. 1/(b/a)$ (by Multiplication Axiom 4 (M4))

$\implies b/(b/a)$ = $b.(b/a)^{-1}$ (by M5)

$\implies$ $b/(b/a)$ = $b.(b.(1/a))^{-1}$

$\implies$ $b/(b/a)$ = $b.(b.(a)^{-1})^{-1}$

$\implies$ $b/(b/a)$ = $b.[1/(b.(a)^{-1})]$

$\implies$ $b/(b/a)$ = $b . (1/b) . (1/a^{-1})$

$\implies$ $b/(b/a)$ = $1 .(1/a^{-1})$

$\implies$ $b/(b/a)$ = $(a^{-1})^{-1}$

$\implies$ $b/(b/a)$ = a

Is this correct? Can anyone please verify?

• I'm just curious: where do you find the axioms? – GNUSupporter 8964民主女神 地下教會 Feb 11 '18 at 13:08
• Do you mean derivation through axioms? – A.Asad Feb 11 '18 at 13:10
• Though Rudia never used the notation $(\cdot)^{-1}$ is that section, but IMHO, I think it's fine if you write it as long as it means the inverse. In the second arrow, you used a property $(xy)^{-1} = x^{-1} y^{-1}$. This can be easily proven, by as a "proof" from the axioms (or the propositions from the book), I think it's better to mark every step, like this answer in set theory. – GNUSupporter 8964民主女神 地下教會 Feb 11 '18 at 13:18
• Thank you, I'll do that (i.e. prove that $(xy)^{-1} = x^{-1} y^{-1}$ and mark my steps) . Is the proof fine otherwise? – A.Asad Feb 11 '18 at 13:25
• Yes, I think so. – GNUSupporter 8964民主女神 地下教會 Feb 11 '18 at 13:27

As OP's comments suggest, to derive the proof from the five multiplication axioms in Baby Rudin, break $1$ into the product of $a$ and $1/a$ in the second step. $\require{action}$ \begin{aligned} b / (b/a) &= \texttip{b \cdot 1 \cdot \left( \frac{1}{b/a} \right)} {(M4): multiplication by identity} \\ &= \texttip{b \cdot \left( \frac{1}{a} \right) \cdot a \cdot \left( \frac{1}{b/a} \right)} {(M5): existence of inverse} \\ &= \texttip{(b/a) \cdot a \cdot \left( \frac{1}{b/a} \right)} {(M3): regroup the leftmost two factors} \\ &= \texttip{a \cdot (b/a) \cdot \left( \frac{1}{b/a} \right)} {(M2): multiplication is commutative} \\ &= \texttip{a \cdot \left( (b/a) \cdot \left( \frac{1}{b/a} \right) \right)} {(M3): multiplication is associative} \\ &= \texttip{a \cdot 1}{(M5): multiplication by inverse} \\ &= \texttip{a}{(M4): multiplication by identity} \end{aligned} \bbox[4pt,border: 1px solid red]{ \begin{array}{l} \text{If you cannot figure out why a line}\\ \text{is true, move your mouse over}\\ \text{RHS of that line for hint.} \end{array}} Remarks: The above proof is one line shorter than OP's one.


# Knowing the existence of max/min values of function in interval without taking derivative?

I'm given the following question.

"How do we know that the following function has a maximum value and a minimum value in the interval $$[0,3]$$"

$$f(x)=\frac{x}{x^2+1}$$

Is it possible to understand that there is a maximum and minimum value in the interval without taking the derivative of the function?

Is the solution to take the derivative of $$f(x)$$ and equate the resulting function to zero and solve?

• Have you heard of the extreme value theorem? – Theo Diamantakis Aug 20 '19 at 14:26
• indeed I have but have no experience applying it which is probably the reason for the question :) I will review the theorem and see how it can be applied. – esc1234 Aug 20 '19 at 14:29
• of course. Upon reviewing the theorem it clearly states that a continuous function on a closed interval will have a minimum and maximum value. Thanks very much! – esc1234 Aug 20 '19 at 14:36
• Do you have an intuitive idea why that must be so, though? ANd why you might not be able to state the same thing for $x \in (0,3)$? – fleablood Aug 20 '19 at 15:38
• I believe so. Open interval of the problem of always being able to get closer and closer to the endpoint therefore it's technically impossible to get a max or min at an endpoint. Hence the closed interval stipulation. I get it now but I'm just used to applying these theorems. Thanks though – esc1234 Aug 20 '19 at 15:39

"The extreme value theorem applies as $$\frac {x}{x^2 +1}$$ is continuous on the closed interval $$[0,3]$$"

The question asks you to show it has a max and min on that interval; not to find them. ANd the question doesn't ask about local maxima/minima but global extrema of all values on the interval.

The extreme value theorem says, and I quote: if a real-valued function $$f$$ is continuous on the closed interval $$[a,b]$$, then f must attain a maximum and a minimum, each at least once.

And $$\frac {x}{x^2+1}$$ is continuous on $$[0,3]$$. So the extreme value theorem says it attains a max and minimum at least once on the interval.

so that's it. Done.

====

The intuitive idea for me is that the graph of a continuous function has a distinct starting point at $$[a,f(a)]$$ and a distinct ending point at $$[b,f(b)]$$ and for every point in between will have some actual real value. It's continuous so it can't "stretch" in any unbounded infinite value. So somewhere in there, either at one of the endpoints or somewhere between, it will get as big as it gets (within that interval, it can get bigger in other places outside the interval) and somewhere it will get as small as it gets.

That argument is naive and applies to ill-defined ideas (the most abusive is the it can't "stretch" to infinity) and needs to be formally defined and proven. And that is exactly what the Extreme Value theorem states.

In this case we have a path that starts at the point $$(0,f(0) = 0)$$ and ends at the point $$(3, f(3) = \frac 3{10})$$. In between in follows some curvy path between those two points. Somewhere there must be some point that was the biggest $$f(x)$$ value, and some that must be the least $$f(x)$$ value.

===

We can get more specific. $$x \ge 0$$ and $$x^2 + 1 \ge 1$$ so $$f(x) \ge \frac x{x^2 + 1} \ge 0$$ so $$f(0) = 0$$ is a minimum. $$x \le 3$$ and $$x^2 + 1 \ge 1$$ so $$f(x)\le \frac 31$$ and so all the possible $$f(x)$$ are bounded above by $$3$$.

It is the definition of real numbers that if a set is bounded above that a least upper bound exist and a consequence of $$f$$ being continuous means that there is an $$x=c$$ where $$f(c) = \sup \{f(x)|x \in [a,b]\}$$.

We can go further an not $$f(1) = \frac 12 > \frac 3{10} =f(3)$$ so the max is not $$x=3$$ but some $$x: 0< x < 3$$ and so the maximum will be a local max and we COULD find it by taking the derivative.

But the question isn't ASKING us to. The question is only asking us to argue that there is a max. An the only thing we have to say for that is:

"The extreme value theorem applies as $$\frac {x}{x^2 +1}$$ is continuous on the closed interval $$[0,3]$$"

• Exactly. This is the correct answer. Thank you – esc1234 Aug 20 '19 at 15:45

Use that $$\frac{1}{2}\times\frac{2x}{x^2+1}\le \frac{1}{2}$$ and $$\frac{-1}{2}\le \frac{2x}{x^2+1}\times \frac{1}{2}$$

• Thanks. Has this idea come from the extreme value theorem which was suggested in the comment above? – esc1234 Aug 20 '19 at 14:30
• No, it comes from the AM-GM inequality. – Dr. Sonnhard Graubner Aug 20 '19 at 14:31
• Okay, the AM-GM inequality is something I haven't come across in my coursework yet. I will study it but because it hasn't come up in my coursework yet I'm thinking there must be another method. – esc1234 Aug 20 '19 at 14:34
• It is $$\frac{a^2+b^2}{2}\geq ab$$ for $$a,b\geq 0$$ – Dr. Sonnhard Graubner Aug 20 '19 at 14:36
• This shows that all values of $f(x): 0 \le x \le 3$ are so that $-\frac 12 \le f(x) \le \frac 12$ but not that there is a specific $c,d$ so that $-\frac 12 \le f(c) \le f(x) \le f(d) \le \frac 12$. – fleablood Aug 20 '19 at 15:34

The question gives a function that is continuous over a closed interval. The extreme value theorem states that a function that is continuous on a closed interval will have both a minimum and maximum value on that interval. The question requires that the student knows and understands the extreme value theorem.

We show that your function has a turning point in $$[0,3]$$ which is a maximum.

Note that $$\frac {x_1}{x_1^2+1}=\frac {x_2}{x_2^2+1}$$ for values where $$x_1\ne x_2$$ and $$x_1x_2=1$$

For example $$\frac {2}{2^2+1}=\frac{1/2}{(1/2)^2 +1}$$

Thus you have a turning point between $$1/2$$ and $$2$$.

Thus the turning point happens at $$x=1$$ and it is a maximum because for example $$f(1)=1/2 > f(2)=2/5$$


Taylor series for cosx at 0

However, when the interval of convergence for a taylor. The calculator will find the taylor or power series expansion of the given function around the given point, with steps shown. Sine function using taylor expansion c programming. In essence, the taylor series provides a means to predict a function value at one point in terms of the function value and its derivatives at another point. Part b asked for the first four nonzero terms of the taylor series for cos x about x 0 and also for the first four nonzero terms of the taylor series for fx about x 0. Evaluating limits using taylor expansions taylor polynomials provide a good way to understand the behaviour of a function near a speci. A particle moves along the xaxis wacceleration given by atcost ftsec2 for t 0. You can find the range of values of x for which maclaurins series of sinx is valid by using the ratio test for convergence. Lets look closely at the taylor series for sinxand cosx. How to extract derivative values from taylor series.

X1 k 0 21kx k 2k bfind the interval of convergence for this maclaurin series. In the case of a maclaurin series, were approximating this function around x is equal to 0, and a taylor series, and well talk about that in a future video, you can pick an arbitrary x value or fx value, we should say, around which to approximate the function. Because the taylor series is a form of power series, every taylor series also has an interval of convergence. What is the taylor series at x 0 for cos xtype an exact answer. How to prove that the taylor series of sinx is true for. As you work through the problems listed below, you should reference your lecture notes and. This is part of series of videos developed by mathematics faculty at the north carolina school of science and mathematics. Ap calculus bc 2011 scoring guidelines college board. Taylors series of sin x in order to use taylors formula to. When this interval is the entire set of real numbers, you can use the series to find the value of fx for every real value of x. If i wanted to approximate e to the x using a maclaurin series so e to the x and ill put a little approximately over here. Depending on the questions intention we want to find out something about the curve of math\frac\sin xxmath by means of its taylor series 1.

Given n and b, where n is the number of terms in the series and b is the value of the angle in degree. Taylor series cosx function matlab answers matlab central. Program to calculate the sum of cosine series of x and compare the value with the library functions output. To find the maclaurin series simply set your point to zero 0. For taylors series to be true at a point xb where b is any real number, the series must be convergent at that point. The power series in summation notation would bring you to my answer. Approximating cosx with a maclaurin series which is like a taylor polynomial centered at x0 with infinitely many terms. Use power series operations to find the taylor series at x 0 for the following function.

To get the maclaurin series for xsin x, all you have to do is to multiply the series with x throughout, as indicated by the formula above. By using this website, you agree to our cookie policy. The taylor series for the exponential function ex at a 0 is. Derivatives derivative applications limits integrals integral applications series ode laplace transform taylormaclaurin series fourier series. Determining whether a taylor series is convergent or. This will work for a much wider variety of function than the method discussed in the previous section at the expense of some often unpleasant work. We also derive some well known formulas for taylor series of ex, cosx and sinx around x 0. Find the taylor series for expcosx about the point x 0 up to x4 really no clue where to even begin. Whats wrong with just bruteforce calculation of the first six derivatives of that function at zero, then form the taylor series at zero. Commonly used taylor series university of south carolina. A maclaurin series can be used to approximate a function, find the antiderivative of a complicated function, or compute an otherwise uncomputable sum. How to extract derivative values from taylor series since the taylor series of f based at x b is x. Taylor series integration of cosx 1 x physics forums. We focus on taylor series about the point x 0, the socalled maclaurin series.

Its going to be equal to any of the derivatives evaluated at 0. Free trigonometric equation calculator solve trigonometric equations stepbystep. You can specify the order of the taylor polynomial. This could be its value at mathx 0 math as is considered a popular interview questions, i. A value is returned for all nonnegative integer values of n, but no matter how many terms i have the program provide the sum always approaches ans1, reaching it by around n5. Follow 59 views last 30 days nikke queen on 3 apr 2015. Math 142 taylormaclaurin polynomials and series prof. A maclaurin series is a taylor series where a 0, so all the examples we have been using so far can also be called maclaurin series. Im working on a taylor series expansion for the coxx function. Thus, we get the series we call the maclaurin series. Because this limit is zero for all real values of x, the radius of convergence of the. Recall that the taylor series of fx is simply x1 k 0 fk 0 k. Because this limit is zero for all real values of x, the radius of convergence of the expansion is the set of all real numbers.

Matlab cosx taylor series matlab answers matlab central. Write a matlab program that determines cos x using the. Finding the maclaurin series for cosx chapter 30 lesson 3 transcript video. Find the taylor series expansion of the following functions around 0.

Taylor series and maclaurin series calculus 2 duration. How to evaluate sinxx using a taylor series expansion quora. Taylor and maclaurin power series calculator emathhelp. Sign up to read all wikis and quizzes in math, science, and engineering topics. The maclaurin expansion of cosx the infinite series module. Convergence of taylor series suggested reference material. Physics 116a winter 2011 taylor series expansions in this short note, a list of wellknown taylor series expansions is provided. Taylor series a taylor series is an expansion of some function into an infinite sum of terms, where each term has a larger exponent like x, x 2, x 3, etc. Calculus power series constructing a taylor series. To find the series expansion, we could use the same process here that we used for sin x. Find the maclaurin series expansion for cosx at x 0, and determine its.

The taylor series for sinx converges more slowly for. The taylor series for fxcosx at a pi2 is summation from zero to infinity cnxpi2n find the first few coefficients c0 c1 c2 c3 c4 get more help from chegg get 1. And thats why it makes applying the maclaurin series formula fairly straightforward. In mathematics, a taylor series is an expression of a function as an infinite series whose terms. We can use the first few terms of a taylor series to get an approximate value for a function. Write a matlab program that determines cos x using. As a result, if we know the taylor series for a function, we can extract from it any derivative of the.

Math 142 taylor maclaurin polynomials and series prof. Find the maclaurin series expansion for cos x at x 0, and determine its radius of convergence. Free taylor series calculator find the taylor series representation of functions stepbystep this website uses cookies to ensure you get the best experience. Here we show better and better approximations for cosx. A calculator for finding the expansion and form of the taylor series of a given function. I assume you mean from 0 to pi rather than from 0 to 180 degrees because the taylor expansion works in radians, not degrees. In this section we will discuss how to find the taylormaclaurin series for a function. Sine function using taylor expansion c programming ask question asked 8 years, 4 months ago.


# [ASK] Equation of a Circle in the First Quadrant

#### Monoxdifly

##### Well-known member
The center of circle L is located in the first quadrant and lays on the line y = 2x. If the circle L touches the Y-axis at (0,6), the equation of circle L is ....
a. $$\displaystyle x^2+y^2-3x-6y=0$$
b. $$\displaystyle x^2+y^2-12x-6y=0$$
c. $$\displaystyle x^2+y^2+6x+12y-108=0$$
d. $$\displaystyle x^2+y^2+12x+6y-72=0$$
e. $$\displaystyle x^2+y^2-6x-12y+36=0$$

Since the center (a, b) lays in the line y = 2x then b = 2a.
$$\displaystyle (x-a)^2+(y-b)^2=r^2$$
$$\displaystyle (0-a)^2+(6-b)^2=r^2$$
$$\displaystyle (-a)^2+(6-2a)^2=r^2$$
$$\displaystyle a^2+36-24a+4a^2=r^2$$
$$\displaystyle 5a^2-24a+36=r^2$$
What should I do after this?

#### skeeter

##### Well-known member
MHB Math Helper
circle center at $(x,2x)$

circle tangent to the y-axis at $(0,6) \implies x=3$

$(x-3)^2+(y-6)^2 = 3^2$

$x^2-6x+9+y^2-12y+36 =9$

$x^2+y^2-6x-12y+36=0$

#### Monoxdifly

##### Well-known member
circle center at $(x,2x)$

circle tangent to the y-axis at $(0,6) \implies x=3$
How did you get x = 3 from (0, 6)?

#### HallsofIvy

##### Well-known member
MHB Math Helper
How did you get x = 3 from (0, 6)?
The fact that the y-axis is tangent to the circle at (0, 6) means that the line y= 6 is a radius so the y coordinate of the center of the circle is 6. And since the center is at (x, 2x), y= 2x= 6 so x= 3.

(And the center of the circle "lies on the line y= 2x", not "lays".)

#### Monoxdifly

##### Well-known member
The fact that the y-axis is tangent to the circle at (0, 6) means that the line y= 6 is a radius so the y coordinate of the center of the circle is 6. And since the center is at (x, 2x), y= 2x= 6 so x= 3.

(And the center of the circle "lies on the line y= 2x", not "lays".)
Well, I admit I kinda suck at English. I usually use "lies" as "deceives" and "lays" as "is located". Thanks for the help, anyway. Your explanation is easy to understand.


Recently, I needed to solve an optimization problem in which the objective function included a term that involved the quantile function (inverse CDF) of the t distribution, which is shown to the right for DF=5 degrees of freedom. I casually remarked to my colleague that the optimizer would have to use finite-difference derivatives because "this objective function does not have an analytical derivative." But even as I said it, I had a nagging thought in my mind. Is that statement true?

I quickly realized that I was wrong. The quantile function of ANY continuous probability distribution has an analytical derivative as long as the density function (PDF) is nonzero at the point of evaluation. Furthermore, the quantile function has an analytical expression for the second derivative if the density function is differential.

This article derives an exact analytical expression for the first and second derivatives of the quantile function of any probability distribution that has a smooth density function. The article demonstrates how to apply the formula to the t distribution and to the standard normal distribution. For the remainder of this article, we assume that the density function is differentiable.

### The derivative of a quantile function

It turns out that I had already solved this problem in a previous article in which I looked at a differential equation that all quantile functions satisfy. In the appendix of that article, I derived a relationship between the first derivative of the quantile function and the PDF function for the same distribution. I also showed that the second derivative of the quantile function can be expressed in terms of the PDF and the derivative of the PDF.

Here are the results from the previous article. Let X be a random variable that has a smooth density function, f. Let w = w(p) be the p_th quantile. Then the first derivative of the quantile function is
$\frac{dw}{dp} = \frac{1}{f(w(p))}$
provided that the denominator is not zero. The second derivative is
$\frac{d^2w}{dp^2} = \frac{-f^\prime(w)}{f(w)} \left( \frac{dw}{dp} \right)^2 = \frac{-f^\prime(w)}{f(w)^3}$.

### Derivatives of the quantile function for the t distribution

Let's confirm the formulas for the quantile function of the t distribution with five degrees of freedom. You can use the PDF function in SAS to evaluate the density function for many common probability distributions, so it is easy to get the first derivative of the quantile function in either the DATA step or in the IML procedure, as follows:

proc iml; reset fuzz=1e-8; DF = 5; /* first derivative of the quantile function w = F^{-1}(p) for p \in (0,1) */ start DTQntl(p) global(DF); w = quantile("t", p, DF); /* w = quantile for p */ fw = pdf("t", w, DF); /* density at w */ return( 1/fw ); finish;   /* print the quantile and derivative at several points */ p = {0.1, 0.5, 0.75}; Quantile = quantile("t", p, DF); /* w = quantile for p */ DQuantile= DTQntl(p); print p Quantile[F=Best6.] DQuantile[F=Best6.];

This table shows the derivative (third column) for the quantiles of the t distribution. If you look at the graph of the quantile function, these values are the slope of the tangent lines to the curve at the given values of the p variable.

### Second derivatives of the quantile function for the t distribution

With a little more work, you can obtain an analytical expression for the second derivative. It is "more work" because you must use the derivative of the PDF, and that formula is not built-in to most statistical software. However, derivatives are easy (if unwieldy) to compute, so if you can write down the analytical expression for the PDF, you can write down the expression for the derivative.

For example, the following expression is the formula for the PDF of the t distribution with ν degrees of freedom:

$f(x)={\frac {\Gamma ({\frac {\nu +1}{2}})} {{\sqrt {\nu \pi }}\,\Gamma ({\frac {\nu }{2}})}} \left(1+{\frac {x^{2}}{\nu }}\right)^{-(\nu +1)/2}$
Here, $\Gamma$ is the gamma function, which is available in SAS by using the GAMMA function. If you take the derivative of the PDF with respect to x, you obtain the following analytical expression, which you can use to compute the second derivative of the quantile function, as follows:
/* derivative of the PDF for the t distribution */ start Dtpdf(x) global(DF); nu = DF; pi = constant('pi'); A = Gamma( (nu +1)/2 ) / (sqrt(nu*pi) * Gamma(nu/2)); dfdx = A * (-1-nu)/nu # x # (1 + x##2/nu)##(-(nu +1)/2 - 1); return dfdx; finish;   /* second derivativbe of the quantile function for the t distribution */ start D2TQntl(p) global(df); w = quantile("t", p, df); fw = pdf("t", w, df); dfdx = Dtpdf(w); return( -dfdx / fw##3 ); finish;   D2Quantile = D2TQntl(p); print p Quantile[F=Best6.] DQuantile[F=Best6.] D2Quantile[F=Best6.];

### Summary

In summary, this article shows how to compute the first and second derivatives of the quantile function for any probability distribution (with mild assumptions for the density function). The first derivative of the quantile function can be defined in terms of the quantile function and the density function. For the second derivative, you usually need to compute the derivative of the density function. The process is demonstrated by using the t distribution. For the standard normal distribution, you do not need to compute the derivative of the density function; the derivatives depend only on the quantile function and the density function.

Share