3

We know that the sine function is periodic by its geometric definition. The Taylor/MacLaurin series expansion about 0 which is the basis of actual mechanisms for computing it is: $$\sin(x) = \sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}x^{2n+1}$$

This series manages to be periodic with period $2\pi$ because it has an alternating sign.

Is there a way to tell if an arbitrary power series is periodic? More informally, if someone gave us the above summation for $\sin$ without telling us it was a trigonometric function, is there a procedure for discovering that it is periodic and finding the period?

Amendment: As pointed out in the answers, there is clearly no algorithm if the coefficients are allowed to be arbitrary, thus containing an unbounded amount of information. I should have asked "Under what limitations to a function defining the coefficients of a power series does there an exist algorithm for determining if the power series is periodic?"

In particular, if $f(n)$ is limited to a rational expression that would be accepted as a "closed-form" expression, as it is in the case of $\sin(x)$, does such an algorithm exist? If $f(n)$ is limited to being a simple arithmetic computation from $n$, can we determine if the function is periodic?

  • I don't think use of the power series alone would make for a very elegant proof of periodicity. But adding in some known trigonometric facts would help e.g. see https://math.stackexchange.com/questions/63102/how-to-prove-periodicity-of-sinx-or-cosx-starting-from-the-taylor-seri. There are a few good answers in there. – Colm Bhandal Jan 05 '18 at 15:00
  • 1
    No doubt, but the goal is not to prove the periodicity of $\sin$, but to be able to determine from an arbitrary, unstudied power series if it is periodic. – Robert L. Read Jan 05 '18 at 15:08
  • @DavidC.Ullrich you're right- comment deleted - I mixed up $n$ with $x$! Anyway, the point I was making was that since $f(n)$ can be any function whatsoever, I really doubt there's a general algorithm that spits you back "yes" or "no" given $f(n)$. For certain restrictions on $f(n)$, maybe we can do something e.g. $f(n) = n$, or $f(n) = c$ for some constant, but this isn't what the OP asks. This is more of a theoretical computer science problem I think - can a Turing machine spit you back a "yes" or "no" given $f(n)$. I have a gut feeling this is undecidable, like the halting problem. – Colm Bhandal Jan 05 '18 at 15:30
  • It seems very unlikely. – David C. Ullrich Jan 05 '18 at 15:53
  • 3
    Just a small word of protest: we don't need to have a separate "geometric" definition of sine to prove periodicity. We can define cosine and sine properly by power series, prove via IVT that cosine has a least positive zero which we call $\pi/2$ (defining $\pi$ here), prove via MVT the Pythagoras relation and so get that $\sin\pi/2=1$ , prove via MVT the usual addition formulas for cosine and sine, and then at last get $\sin (x+2\pi)=\sin x$. – ancient mathematician Jan 05 '18 at 16:02
  • @ancientmathematician my statement earlier was a misstep. You are right! – Colm Bhandal Jan 05 '18 at 16:03
  • My comment is aimed at the first line of the Question as set. – ancient mathematician Jan 05 '18 at 16:04
  • @ancientmathematician Thank you. But I wonder if knowing of the existence of $\cos(x)$ and its relation to $\sin(x)$ would be considered knowledge of geometry? – Robert L. Read Jan 05 '18 at 17:02
  • @RobertLRead, it is how we can construct (a certain) geometry! – ancient mathematician Jan 06 '18 at 07:25

4 Answers4

2

Not really an answer so much as a comment on the other answers. Of course it's clear that there is no Turing machine that does this, since the answer is not determined by finitely many coefficients.

But asking for a Turing machine is surely not what the question means! For example, there is a "test" to determine whether the radius of convergence is infinite; check whether $\limsup|a_n|^{1/n}=0$. That can't be done by a Turing machine but it seems clear to me that it does count as a "test" in the sense in which the OP meant the question.

About the question:

It seems very unlikely that there does exist a test for periodicity in terms of the coefficients. Of course one cannot say for sure without a suitable definition of what sort of "test" one wants...

  • The title of the question does use the word "algorithm", which basically means "Turing machine"! Convergence tests. etc. are no doubt fascinating mathematical objects, but they answer a different, albeit related, question. – Colm Bhandal Jan 05 '18 at 16:56
  • Yes, the title does use that word. If we take that to mean a request for a Turing machine the question is just silly. – David C. Ullrich Jan 05 '18 at 16:59
  • To call the question silly is not in the spirit of MSE! We should encourage curiosity and learn together. – Colm Bhandal Jan 05 '18 at 17:02
  • I didn't call the question silly. If we take it to mean what it seems to me it means then it's not silly at all. If it really is asking about a Turing machine then it is silly, regardless of your opinion regarding the spirit of MSE. – David C. Ullrich Jan 05 '18 at 17:08
  • Labelling things as "silly" or "not silly" is not mathematics, it's your opinion, David. As for your interpretation, I have to point out that this site is dedicated to mathematics, the most precise subject in the world. As such, we should take things at face value and leave our subjective interpretations aside. And "algorithm", in all the mathematical literature, means "Turing machine". – Colm Bhandal Jan 05 '18 at 17:13
  • Furthermore, to bring things back to the question at hand, asking the question "Is there a Turing machine to decide if a given power series, represented by a finite number of bits, encodes a periodic function?" is in no way trivial. Of course, it would require a rigorous definition of what is meant by "specifying a function in a finite number of bits". – Colm Bhandal Jan 05 '18 at 17:20
  • Thanks, all. It seems to me that if the coefficients are generated by a simple expression, those expressions must have very special properties for the series to be periodic. It is possible that there is an algorithm of the form "Do the coefficients have these specific properties?" For example, we know we can do a Fourier transform of a periodic function, to produce a superposition of sine/cosine waves. Are there ANY other periodic power series that cannot be placed in that form? – Robert L. Read Jan 05 '18 at 18:36
1

Edit: This Answer Applied to the Original Question, which talked about power series in general. When restricting to power series that can be expressed in a finite amount of information, this argument no longer holds.


No. There is no way to tell if an arbitrary power series is periodic or not. We can only do this consistently for a subset of power series. Every power series is written as:

$$\sum_{n=0}^\infty f(n)\cdot x^n$$

The information about the power series is completely contained within the function $f(n)$. Now, since we're talking about arbitrary power series, $f$ can be any function from the function space:

$$ \mathbb{N} \mapsto \mathbb{R} $$

OK, so let's say there was a consistent and complete method we could use to tell, given this $f$ whether or not the associated power series was periodic. Then we'd be able to encode a Turing machine which, given any sequence $f(n)$ would return a "yes" or "no" answer saying if the function was periodic or not.

Now, this machine would have to terminate in a finite number of steps. This in turn means it could only read a finite sample of values from our $f(n)$ e.g. it might just read three values $\{f(1), f(2778), f(99)\}$. Now, of course, the number of values could depend on $f$, but this won't matter- we'll still get our contradiction, just wait.

So, suppose we pass to our machine the periodic function $f$. Naturally, it will return "yes", telling us that we have a periodic function. But as argued above, it will only have read a finite amount of values for $f(n)$. Then let $i$ be one of the infinite natural numbers for which $f(i)$ was not read by our algorithm. And here's the killer stroke. Define:

$$g(n)=\left\{\begin{array}{cc} f(n) & n \neq i \\ f(n) + 1 & n=i \end{array}\right.$$

Clearly, our machine, being deterministic, will give us the same result- because it will never read $g(i)$, so it's result will be the exact same as $f(i)$. But it's also clear that $g$ is not periodic. So our machine will return "yes" for a non-periodic function, meaning it's inconsistent, contrary to our assumption that it was consistent and complete.

In fact: This proof works even though we're giving the Turing machines the unreasonable power of being able to completely read a real number to infinite precision.

Aside: I'd say that probably what you're looking for is some subset of functions $f(n)$ that can be specified with a finite amount of information. But that hypothesis would need to be made rigorous.

Colm Bhandal
  • 4,649
  • As an aside, I'd say that probably what you're looking for is some subset of functions $f(n)$ that can be specified with a finite amount of information. But that hypothesis would need to be made rigorous. – Colm Bhandal Jan 05 '18 at 16:06
  • Yes, I should have clarified that $f(n)$ should contain a finite amount of information. For example, in the case of $\sin$ is a simple closed-form expression. – Robert L. Read Jan 05 '18 at 16:51
  • Haha that would have saved me an infinite amount of typing!! JK, I'll leave my answer here anyway and edit it. Sometimes asking the question itself is harder than finding the answer! – Colm Bhandal Jan 05 '18 at 16:58
0

As it turns out, this is an undecidable problem. Here is the argument:

First, let's start with the fact that it is impossible to know whether or not an arbitrary series converges or diverges in general. Recall that by definition of a periodic function $f(x+T)=f(x)$ where $T$ is the period.

Let's take an arbitrary function $f\in C^{\omega}$. The Taylor series converges $\forall x\in \mathbb{R}$. Let $S(T)$ denote the Taylor series for $f(x+T)$ and $S$ denote the Taylor series for $f(x)$. Let $\tilde S=S(T)-S$. We need to show the series $\tilde S$ converges to $0$. This is a necessary requirement for periodicity of $f$.

However, since we do not know a priori where the function $f$ is periodic, we can "test" it by the above argument. A priori, we do not know if the above series $\tilde S$ converges, so there is no way to tell in general.

0

Consider the following absolutely convergent series $$ f(x)=\sum\limits_{k=0}{a[k]{{x}^{k}}} $$ Assume that the period, $\Lambda =1$ (this can be relaxed to an arbitrary real number later). The restriction $$ f(x)-f(x+1)=0 $$ generates the follow set of conditions on the coefficients a[k] $$ (U(\infty )-I)\left[ a(k) \right]=[0] $$ Where U is the (infinite dimensional) upper triangular Pascal Matrix, and I is the identity matrix, and a[k] is a column vector formed from the coefficient list. This matrix equation is just another way to express the periodicity constraint (with period = 1). Note that the matrix is singular so there are an infinite set of coefficient lists that satisfy this equation.

Each row*a[k] gives a constraint that the a[k]'s must satisfy if the related series is periodic. The general constraint is $$ \sum\limits_{k=j}{\left( \begin{matrix} k, j-1\end{matrix} \right)a[k]=0} $$ where the term in parenthesis is the Binomial Coefficient. For example, the first two constraint equations are $$ \begin{matrix} \sum\limits_{k=1}{a[k]=0} \\ \sum\limits_{k=2}{k_{{}}^{{}}a[k]=0} \\ \end{matrix} $$ In the case where the period is not equal to 1, a simple rescaling of x is implied, which can be made explicit by appropriately inserting an additional scaling matrix (diagonal in powers of $\Lambda$) into the above matrix equation.

Hence the suggested procedure (algorithm) would be to apply each constraint equation in turn until failure, or if the a[k] are sufficiently well behaved the general case (for arbitrary j) would need to be proved.

David
  • 1