# Pi

**URL:** <https://boards.straightdope.com/t/pi/791924>\
**Category:** Factual Questions\
**Created:** [July 23, 2017, 8:47am UTC](https://boards.straightdope.com/t/pi/791924 "2017-07-23T08:47:09Z")\
**Posts on this page:** 20\
**Page:** 10

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 27, 2017, 2:12am UTC](https://boards.straightdope.com/t/pi/791924/181 "2017-07-27T02:12:27Z")

</div>

What do you mean, “is there a reason for that”? Do you mean why is there a best approximation possible with small numbers, or why it’s that particular approximation, or why does pi have a continued fraction form, or why it’s that particular continued fraction, or why continued fractions produce good approximations to irrationals?

> [@](#):
>
> P ≠ NP (though this is Gödel-undecidable).

Bold statements, both of them. Probably too bold, in fact: I suspect that one can prove that the P-NP question is not Gödel-undecidable.

---

<div class="post-metadata">

**Author:** ![rat\_avatar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rat_avatar/32/255_2.png) [@rat\_avatar](https://boards.straightdope.com/u/rat_avatar)\
**Post date:** [July 27, 2017, 2:19am UTC](https://boards.straightdope.com/t/pi/791924/182 "2017-07-27T02:19:21Z")

</div>

> [@Francis\_Vaughan](#):
>
> You can also have complex analysis. Which involves complex numbers. As opposed to real analysis - real numbers. The properties of real numbers versus complex numbers are remarkably different, so much so that each has a separate category for itself. Complex analysis has some quite astounding results. Very useful ones it might be said.
> 
> Number theory is a fun area. Even such simple things as the properties of prime numbers are mostly number theory. Hence Goldbach’s conjecture, unique prime factorisation theorem and so on.

Funny enough, if you let go of the artificial difference between the horribly named _real_ and _complex_ they aren’t hard to deal with. You just have to quit using shortcuts that are only valid in a much simpler human construct.

sqrt(-1) or x^=-9 are just as valid as any other number. They are way more than a useful fiction.

i (or -i) are just what numbers “become” when rotated, it is the a human conventions that make them hard to deal with.

Complex numbers just require the work of Pythagoras, arithmetic, and a bit of algebra.

It does help to realize that all real numbers complex numbers, just the i is 0.

So the _real_ 5 is just the _complex_ 5 where i = 0

Electronic devices do reduce the burden of resorting to “FOIL” etc…

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [July 27, 2017, 2:31am UTC](https://boards.straightdope.com/t/pi/791924/183 "2017-07-27T02:31:30Z")

</div>

> [@Chronos](#):
>
> I don’t think that I’d call the Riemann Hypothesis the most famous or most important unsolved problem, though. The most famous is probably the Goldbach conjecture, followed by the twin prime conjecture. And the most important is probably whether P = NP.

I did say “arguably” :). And calling it “the most famous and important unsolved problem” is ambiguous: was I making one claim, or two? It’s more defensible if you interpret it as a single claim.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 27, 2017, 2:34am UTC](https://boards.straightdope.com/t/pi/791924/184 "2017-07-27T02:34:56Z")

</div>

> [@Chronos](#):
>
> What do you mean, “is there a reason for that”? Do you mean why is there a best approximation possible with small numbers, or why it’s that particular approximation, or why does pi have a continued fraction form, or why it’s that particular continued fraction, or why continued fractions produce good approximations to irrationals?

My question may have been quite silly, but it wasn’t nearly as silly as any of the questions you’re trying to put into my mouth. 😛

_pi_, for example, enters into some remarkable approximations related to Heegner numbers. I wonder, for example, if those might be related to _pi_’s excellent rational approximation.

> [@](#):
>
> Bold statements, both of them. Probably too bold, in fact: I suspect that one can prove that the P-NP question is not Gödel-undecidable.

My statements may have been bold, but if “very bold” is a synonym of “probably wrong,” I think your “suspicion” is definitely the very boldest of all!

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 27, 2017, 2:43am UTC](https://boards.straightdope.com/t/pi/791924/185 "2017-07-27T02:43:49Z")

</div>

> [@Chronos](#):
>
> Bold statements, both of them. Probably too bold, in fact: I suspect that one can prove that the P-NP question is not Gödel-undecidable.

I consider both the original statements bold, as you do, but also consider your statement bold too! No one has yet proven the P-NP question is decidable in any particular standard formal system, nor proven it undecidable, nor proven it true, nor proven it false, nor proven it “provable if true”, nor proven it “disprovable if false”, nor any such thing. It’s all open.

(If we wish to distinguish between “Gödel-undecidable” and “undecidable” simpliciter, I’m not sure exactly how to formalize it, but no one’s made such a formal distinction and furthermore proven P vs. NP non-“Gödel-undecidable” either…)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [July 27, 2017, 2:55am UTC](https://boards.straightdope.com/t/pi/791924/186 "2017-07-27T02:55:34Z")

</div>

I said that because the question is of such a form that, if P = NP, there must exist a proof of that fact. Though that doesn’t rule out the possibility that (as **septimus** asserts) P≠NP but that’s unprovable, it at least puts the question in a different category from the most-undecideable questions.

**septimus** , I didn’t mean to place silly questions into your mouth. I thought that I was simply exhaustively listing the things you could have meant by your question. But I guess I must have missed (at least) one, since you seem to be saying you weren’t asking any of those.

**Thudlow Boink** , do you mean that you were considering one single figure of merit, which combines importance and fame in some way, and then saying that the Riemann hypothesis scores highest on that hybrid figure of merit? That’s more defensible, though I suspect that the P-NP question might still be more famous, as well.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 27, 2017, 3:00am UTC](https://boards.straightdope.com/t/pi/791924/187 "2017-07-27T03:00:40Z")

</div>

It’s not true that if P = NP, there must exist a proof of that fact. (As I said, P = NP has never been proven to be “provable if true”). It could be that there exists a program which does indeed solve NP-complete problems in polynomial time, but that there is no proof that this particular program always produces a correct answer in polynomial time.

Propositions with the “provable if true” property are what’s called Sigma\_1. They look like “There exists a [finite object] such that it satisfies [some decidable property]”. For example, “The Goldbach conjecture” is false would be a Sigma\_1 proposition: “There exists an even integer \> 2 such that it is not a sum of two primes”. But P = NP is not of this form. It’s of the form Sigma\_2: “There exists a [finite object] such that for all [some other finite object]s, they satisfy [some decidable relation]”. P = NP is the claim “There exists a computer program and polynomial such that for all instances of your favorite NP-complete problem, the program correctly solves the problem within the time prescribed by the polynomial”.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [July 27, 2017, 3:10am UTC](https://boards.straightdope.com/t/pi/791924/188 "2017-07-27T03:10:04Z")

</div>

> [@septimus](#):
>
> Not only is 355/113 an excellent approximation to _pi_, it _cannot be improved_ with small numbers. To find a better fractional approximation you must go all the way to 52163 / 16604, and it is only very slightly better. (I know this is related to _pi_’s continued fraction form, but is there a _reason_ for _that_?)  
> …

I haven’t read much about fractional approximations to pi. Not doubting you, but do you have any recommended reading?

ISTM the interesting point is not that 52163/16604 is better, but rather that 355/113 is so anomalously good. IOW in a measure of epsilon/digit count it’s a home run whereas its nearest neighbors are mediocre. Why? Are there other local spikes in epsilon efficiency farther out? Is there anything deeper than dumb luck at work here?

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 27, 2017, 3:16am UTC](https://boards.straightdope.com/t/pi/791924/189 "2017-07-27T03:16:56Z")

</div>

[Here is a pdf article discussing the difficulty of proving P ≠ NP](http://www.ams.org/notices/201111/rtx111101586p.pdf), though it hints that proofs might exist if one “thinks outside the box.”

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [July 27, 2017, 3:22am UTC](https://boards.straightdope.com/t/pi/791924/190 "2017-07-27T03:22:01Z")

</div>

> [@LSLGuy](#):
>
> I haven’t read much about fractional approximations to pi. Not doubting you, but do you have any recommended reading?
> 
> ISTM the interesting point is not that 52163/16604 is better, but rather that 355/113 is so anomalously good. IOW in a measure of epsilon/digit count it’s a home run whereas its nearest neighbors are mediocre. Why? Are there other local spikes in epsilon efficiency farther out? Is there anything deeper than dumb luck at work here?

Of course 52163/16604 is uninteresting — it was just a way to demonstrate the goodness of 355/113. Good approximations fall out of continued fractions (Google for details).

The continued fraction representation of _pi_ is [3;7,15,1,292,1,1,1,2,1,3,1,14,2,1,1,2,2,2,2,…] It is the early “292” that means there is an excellent early approximant.

ETA: Contrast this with the continued fraction representation of the Golden Ratio: [1;1,1,1,1,1,1,1,1,1,1,1,1…]. The Golden Ratio has no good small approximant.

---

<div class="post-metadata">

**Author:** ![abashed](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@abashed](https://boards.straightdope.com/u/abashed)\
**Post date:** [July 27, 2017, 7:57am UTC](https://boards.straightdope.com/t/pi/791924/191 "2017-07-27T07:57:35Z")

</div>

> [@Lemur866](#):
>
> OK, I’m going to take another stab at this. The square root of 2 has an exact value, and that value is the square root of two. Same with pi. Pi has an exact value, and that value is pi. Yes, these values are not integers. That doesn’t mean they’re not exact. If you multiply the square root of two by the square root of two, you get exactly 2. If you have a square with sides of exactly 1 unit, what is the length of the diagonal? Does it have an exact value? Does the value of the diagonal vary depending on how closely you look at it? Does it get bigger then smaller then bigger than smaller then bigger then smaller? Or is it always the same?
> 
> The answer is that it is always the same. Now, it might be fair to say that the value of that diagonal is not a number, but an idea. Lots of ancient mathematicians agreed with that statement. Numbers are for counting things, like one thing and two things. If you can’t express it in terms of counting numbers, then it’s not a number. Like zero is not a number, or negative numbers are not numbers, they’re ideas, but not numbers. Fractions are numbers, and ratios of numbers are numbers, but anything else is right out.
> 
> And if you complain that you can’t write the value of the square root of two without being imprecise, that’s not true. You can write it precisely: the square root of two. You can’t write a decimal representation of that number precisely, but so what? Did we make a rule that if you can’t write a precise decimal representation of a number then it isn’t’ a number? Where in the rulebook does it say that?

Okay, point taken, and thank you. 🙂

BTW, why do we need to know the sqrt of -1?

---

<div class="post-metadata">

**Author:** ![abashed](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@abashed](https://boards.straightdope.com/u/abashed)\
**Post date:** [July 27, 2017, 8:05am UTC](https://boards.straightdope.com/t/pi/791924/192 "2017-07-27T08:05:07Z")

</div>

> [@Lemur866](#):
>
> OK, but let’s ask what you’re trying to do here.
> 
> Are you a carpenter trying to figure out how much wood you’ll need to face the side of a 2 foot diameter wooden cylinder?
> 
> Then you’re not making measurements to the millionth decimal place. In this case any approximation of pi that is more accurate than your most inaccurate measurement will be fine. You’ve got a 2 foot cylinder, not a 2.000000000000000000000000 foot wooden cylinder. In this case using 3.14 as your value for pi is fine, because you don’t have measurements more precise than 1 part in a thousand.
> 
> But if you’re doing trigonometry you don’t ever want to calculate using the decimal expression of pi. If your answer is precisely 4π/3, that’s the answer you should give. If you’re doing some complex equation, leave pi in there as an exact value instead of approximating it. And if you need a real world carpenter answer at the very end, only do the calculation using an approximate value of pi at the very end, when you know your significant figures and therefore know how precise a value for pi would be useful.

Yes, the beauty of mathematics is not only the way it serves us in the practical world but also as a source of continual analysis and philosophical discourse. What more can you ask? No wonder it has been described as beautiful. 🙂

---

<div class="post-metadata">

**Author:** ![abashed](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@abashed](https://boards.straightdope.com/u/abashed)\
**Post date:** [July 27, 2017, 8:09am UTC](https://boards.straightdope.com/t/pi/791924/193 "2017-07-27T08:09:28Z")

</div>

> [@Lemur866](#):
>
> Of course they’re not the same as integers. Neither are rational numbers, right?
> 
> And if 0.99999… is not equal to 1, what’s the difference? I mean that literally.
> 
> 1 - 0.999999… = what?
> 
> It equals zero. If there is zero difference between two numbers they are the same number. Therefore, 0.99999… = 1.
> 
> If you want to argue that way out there at the infinity-th decimal point there’s a little 0.000…001 left over, why isn’t it a 0.000…0001 left over? And of course, there is no infinity-th decimal point, because infinity doesn’t work that way.
> 
> And sure, lots of people have tried to work out theories of infinitesimals, but to include them as regular numbers that you can do arithmetic with either leads to all sorts of contradictions or requires you to give up on common sense arithmetic.
> 
> Like, is there a difference between 2 and 2 + an infinitesimal? How about 2 + 2 infinitesimals?
> 
> Anyway, tangent. You don’t want to go there.

I see your point.

---

<div class="post-metadata">

**Author:** ![rat\_avatar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rat_avatar/32/255_2.png) [@rat\_avatar](https://boards.straightdope.com/u/rat_avatar)\
**Post date:** [July 27, 2017, 8:09am UTC](https://boards.straightdope.com/t/pi/791924/194 "2017-07-27T08:09:36Z")

</div>

> [@abashed](#):
>
> Okay, point taken, and thank you. 🙂
> 
> BTW, why do we need to know the sqrt of -1?

Basically anytime a problem involves a sine wave, the imaginary number is used.

You wouldn’t have cell phones, reliable power in your home, or the internet without that sqrt of -1

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 27, 2017, 8:31am UTC](https://boards.straightdope.com/t/pi/791924/195 "2017-07-27T08:31:34Z")

</div>

Or rotation, the ability to turn 90 degrees and such…

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 27, 2017, 9:03am UTC](https://boards.straightdope.com/t/pi/791924/196 "2017-07-27T09:03:21Z")

</div>

> [@Indistinguishable](#):
>
> It’s actually not that complicated (though a bit moreso than for sqrt(2)). Here you go:

I read your proof, and I don’t quite get it. Or rather, I get most of the steps in a hand-waving manner, but some are fairly obscure and the others I can’t quite fully justify to myself. This is just a reflection of my own limits and not your description, of course.

That said, Niven’s proof on the [Wikipedia page](https://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrational) was understandable to the point that I can describe it from memory. I’ll repeat it in my own words since I did have to think through a few things that confused me a bit initially.

This is a proof by contradiction, where we start by assuming pi=a/b (a and b being positive integers). We examine this function:

f(x) = x[sup]n[/sup](a - bx)[sup]n[/sup] / n!

Technically this should be f[sub]n/sub, since n is a parameter, but I’ll leave it off and we’ll just keep in mind that we can change n to whatever we want.

First, note that f(0) = f(pi). If you substitute x =\> (a/b - x) and do a little algebra, you get the same equation (i.e., f(x) = f(pi - x)). So whatever we conclude about f(0) will apply to f(pi) later.

Let’s examine the derivatives: we can see that the lowest order term (of x) is x[sup]n[/sup], which means that f(0) is equal to 0 for the first n-1 derivatives. Note that as we’re doing this, we’re progressively canceling out the n! term at the bottom. At the nth derivative, there’s finally a constant term (not multiplied by a power of x), but nothing left in the denominator. After that, no fractions are introduced in further derivatives. At the (2n)th derivative, there’s only a constant term, and after that nothing.

The big implication here is that f(0), f’(0), etc. are all integers. We don’t know (or care) what their values are, just that there are no fractions in there. Furthermore, f(pi) (and its derivatives) is an integer since it’s equal to f(0).

The next step involves this formula:  
F(x) = f(x) - f’'(x) + f[sup]4/sup - … -1[sup]n[/sup]f[sup]2n/sup

It’s pretty straightforward to see that this holds:  
F’’ + F = f

Since the terms alternate in sign, F’’ mostly cancels the terms in F, with the exception of f(x) and the final term. But that final term is the 2n+2 derivative, which we know to be 0. So it’s really just f.

The next step is to show this is true:  
(F’sin - Fcos)’ = f\*sin

A little application of the product rule (and linearity of derivatives) get you this:  
F’'sin + Fsin = f\*sin

And then:  
(F’’ + F)sin = f\*sin

So we see that the formula works. Going back, we can also turn this (va fundamental theorem of calculus):  
(F’sin - Fcos)’ = f\*sin

Into this:  
Int[0…pi] f\*sin = [0…pi] (F’sin - Fcos)

Looking at the right hand side, we see that we can ignore the F’sin term because sin is 0 at 0 and pi. From before, F(0) and F(pi) are integers, and cos(0)=1 and cos(pi)=-1. From all of this, we can conclude that:  
Int[0…pi] f\*sin = [0…pi] (F’sin - Fcos) = an integer

But let’s try to compute an upper bound for:  
Int[0…pi] f\*sin

We’ll so this by looking at the upper bounds of the different components. sin(x) of course has a maximum of 1.0 in that range. f is a little trickier, but let’s do a little transformation:  
x[sup]n[/sup](a - bx)[sup]n[/sup] / n! = (ax - bx[sup]2[/sup])[sup]n[/sup] / n!

That bx[sup]2[/sup] term is negative… so it can only make the value smaller. We’ll ignore it. Therefore, one upper bound is:  
(ax)[sup]n[/sup] / n!

Put together, this is an upper bound for the integral:  
pi \* (ax)[sup]n[/sup] / n!

But look: that n! grows much faster than (ax)[sup]n[/sup]. No matter what a is, and even with the maximum value of pi for x, n! can be bigger yet. So we can always choose an n where our integral is less than 1.

However, we already decided that the integral must evaluate to an integer. If it can’t even be as large as 1, it must be zero.

Well, it can’t be that either: f(x) and sin(x) are all positive for 0\<x\<pi. Therefore the integral is positive. Small, maybe, but not zero.

There’s no integer between 0 and 1, so we have our contradiction. Pi can’t be expressed as a/b and is irrational.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 27, 2017, 9:14am UTC](https://boards.straightdope.com/t/pi/791924/197 "2017-07-27T09:14:13Z")

</div>

> [@Dr.Strangelove](#):
>
> I read your proof, and I don’t quite get it. Or rather, I get most of the steps in a hand-waving manner, but some are fairly obscure and the others I can’t quite fully justify to myself. This is just a reflection of my own limits and not your description, of course.

Well, if you like, I’d be happy to clarify the details you found obscure or were unable to justify. I’d be curious to hear what they were, at any rate.

For what it’s worth, the proof I gave actually has the same fundamental idea as the Niven proof (or as all the other proofs given on that Wikipedia page; perhaps even as all known proofs of this irrationality), but is framed in the way which made things clearest and most generalizable to me in understanding the underlying phenomenon. [Of course, different people have different preferences for how to understand things]

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [July 27, 2017, 9:34am UTC](https://boards.straightdope.com/t/pi/791924/198 "2017-07-27T09:34:31Z")

</div>

> [@Indistinguishable](#):
>
> Well, if you like, I’d be happy to clarify the details you found obscure or were unable to justify. I’d be curious to hear what they were, at any rate.

There’s a good chance that simply formulating the questions clearly will enable me to not need them :).

The inductive step I’m sure I can figure out if I sit down with some paper, but so far I just did a few derivatives by hand; enough to make the argument plausible.

I’m pretty fuzzy on this part “If y were rational with lowest-terms denominator d, then the smallest nonzero value integer polynomials of degree O(N) in y could produce is 1/dO(N)”. I get the overall idea (since as you said it’s the same basic idea as the Niven proof) but somehow it’s not quite gelling. Though as I said, even formulating the question right will probably lead me to the answer.

I’m actually a little surprised there isn’t a more trivial proof, at close to the level of the sqrt(2) one. It seems like the trig functions, with their endless zeroes at multiples of pi, could more directly show that pi can’t be a ratio. Something along the lines of showing that a periodic function with rational zeroes can’t have the properties of sin/cos. I dunno.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [July 27, 2017, 10:03am UTC](https://boards.straightdope.com/t/pi/791924/199 "2017-07-27T10:03:26Z")

</div>

I’ll try pre-emptively adding some more details for everyone which may not be obvious:

**The first third of the proof:**

**The gist:**

Let f(x) = cos(sqrt(x)), and, as is conventional, let f’ be its derivative, f’’ its second derivative, etc., using fsup[/sup] to indicate its N-th derivative.

Note that fsup[/sup] = P(y)f + Q(y)f’, where y = 1/(4x) and P and Q are integer coefficient polynomials of degree growing at rate O(N).

**Short further explanation:**

This follows inductively from f’’ having this form, which is just the fact that cos’’ = -cos, translated to this reparametrization.

**Longer further explanation:**

Specifically, just applying mechanical differentiation, we find that f’ = -1/2 \* sinc(sqrt(x)). And then, re-differentiating, we find that f’’ = (sinc(sqrt(x)) -cos(sqrt(x)))/(4x) = (-2f’ - f)/(4x).

If we give 1/(4x) the name y(x), then we have the convenient relationship f’’ = (-2f’ - f) \* y, and also conveniently that y’ = -1/(4x[sup]2[/sup]) = -4y[sup]2[/sup].

What’s so convenient about this? Well, the specific details don’t matter very much, but the fact that f’’ = A(y) \* f + B(y) \* f’ while y’ = C(y), where A, B, and C are all integer coefficient polynomials… That is very convenient.

Why is that?

Well, suppose you knew that fsup[/sup] = P(y)f + Q(y)f’, and now you wanted to calculate f[sup](N + 1)[/sup] by differentiating yet again. Mechanically working it out using the standard differentiation rules and the above forms for f’’ and y’, you get P’(y)C(y)f + P(y)f’ + Q’(y)C(y)f’ + Q(y)[A(y)f + B(y)f’]. Collecting the terms on f and on f’, you get [P’(y)C(y) + Q(y)A(y)]f + [P(y) + Q’(y)C(y) + Q(y)B(y)]f’.

So each of f and f’ is again multiplied by a polynomial of y, and… here’s the kicker… the degrees on the polynomials involved can only have risen by so much. Whatever the degree of the polynomials involved before (P and Q), the degrees of the polynomials involved now has risen by at most max(deg© - 1, deg(A), deg(B)). This is some fixed finite quantity.

So we’ve established that fsup[/sup] is some polynomial of y times f + some polynomial of y times f’, for all N, and, furthermore… since each differentiation causes the degrees to only rise by at most the same amount, we have that the degree of the polynomials involved in fsup[/sup] grows at rate at most O(N) as N keeps going up.

[In our particular case, tracing the particulars of the above reasoning, we find that the polynomials involved in fsup[/sup] specifically have degree at most N - 1 for N ≥ 2. But the specific constants of the O(N) aren’t actually important for us. Indeed, what I’ve written out above still contains more gory details worked out than is actually necessary. You don’t have to actually calculate the derivative of P(y)f + Q(y)f’ in any detail. You can tell ahead of time that it’s going to work out with the properties we want, just by considering that derivatives of polynomials are polynomials, etc.]

---

<div class="post-metadata">

**Author:** ![abashed](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@abashed](https://boards.straightdope.com/u/abashed)\
**Post date:** [July 27, 2017, 10:20am UTC](https://boards.straightdope.com/t/pi/791924/200 "2017-07-27T10:20:15Z")

</div>

> [@rat\_avatar](#):
>
> Basically anytime a problem involves a sine wave, the imaginary number is used.
> 
> You wouldn’t have cell phones, reliable power in your home, or the internet without that sqrt of -1

Oh, right. Sounds deep.

[Previous page](https://boards.straightdope.com/t/pi/791924.md?page=9)

[Next page](https://boards.straightdope.com/t/pi/791924.md?page=11)
