20
$\begingroup$

What is the indefinite sum of the tangent function, that is, the function $T$ for which

$\Delta_x T = T(x + 1) - T(x) = \tan(x)$

Of course, there are infinitely many answers, who all differ by a function of period 1. Ideally, I would like the solution to be of the form

$T(x) = $ nice_function$(x)$ + possibly_ugly_periodic_function$(x)$, where nice is at least piece-wise continuous.

If any of the following sums can be found, the sum of tan can also be found:

  • $\sum \sec x$

  • $\sum \csc x$

  • $\sum \cot x$

  • $\sum \frac{1}{e^{ix} + 1}$

I have tried several methods without success, including using a newton series (which does not converge for non-integer $x$), and trying to guess possible functions.

I would also appreciate lines of attack if a solution is not known.

$\endgroup$

9 Answers 9

33
$\begingroup$

I add more details for the solution in the distinguished answer due to Anixx. First, we need the digamma function
http://en.wikipedia.org/wiki/Digamma_function
which we will call $\Psi(x)$. Important properties (from that web page) are: $\Psi(x)$ is analytic in the complex plane except at the nonpositive integers where it has simple poles. $\Psi(x+1)-\Psi(x) = 1/x$. $\Psi(x) > 0$ for $x>2$. Asymptotics: $$ \Psi(x) = \log x - \frac{1}{2x} - \frac{1}{12x^2} + \frac{1}{120x^4} + O(x^{-6}) \qquad\text{as } x \to \infty . $$ So, define $T(z) ={}$ $$ -\sum_{k = 1}^{\infty} \Biggl[\Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) - z + 1\Biggr) + \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + z\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + 1\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr)\Biggr)\Biggr] $$ For any fixed $z$, only finitely many preliminary terms involve $\Psi$ evaluated at a nonpositive argument, and the asymptotics of the remaining terms are computed (from the asymptotics given above) as $$ \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) - z + 1\Biggr) + \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + z\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + 1\Biggr) - \Psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr)\Biggr) $$

$=z(1-z)/(k^2\pi^2) + o(k^{-2})$ as $k \to \infty$. So the series converges absolutely except when we are at a pole of one of the preliminary terms. Now, because of absolute convergence, we may subtract term-by-term and simplify to get

$$ T(z+1)-T(z) = \sum_{k=1}^\infty\Biggl[\frac{8z}{(-\pi+2\pi k-2z)(-\pi+2\pi k+2z)}\Biggr] = \tan z . $$

$\endgroup$
5
  • 6
    $\begingroup$ NICE! I have to confess it only became obvious to me only after you wrote the thing out in full. Thanks a lot! $\endgroup$ Commented Oct 21, 2010 at 0:47
  • $\begingroup$ Yes, thanks for the additional information. Interestingly, it looks like $T(x + \pi) - T(x)$ is also periodic, with period 1. $\endgroup$ Commented Oct 21, 2010 at 13:08
  • $\begingroup$ Indeed, it is easy to prove that $T(z + \pi) - T(z) = -[\Psi(1 - (\pi/2 + z)) -\Psi(\pi/2 + z)] = -\pi \cot \pi(\pi/2 + z)$. $\endgroup$ Commented Oct 21, 2010 at 14:28
  • 1
    $\begingroup$ Alternatively: note that if you translate by any integer multiple of $\pi$ then you get another solution $T(z+m\pi)$ of the original problem. So the difference between $T(z)$ and this other solution is periodic with period 1. $\endgroup$ Commented Oct 21, 2010 at 18:49
  • $\begingroup$ The book of N. E. Nörlund: Vorlesungen über Differenzenrechnung, 1923, reprinted by Chelsea, 1954 credites A. Hurwitz with showing, that a meromorphic sum can be found for any meromorphic right hand side in chapter 3, §1 historical remarks, 18. The work of Hurwitz is cited as "Sur l'integrale finie d'une fonction entiere", Acta math. 20 (1897), p. 285 - 312 and Acta math. 22 (1899), p. 197 - 180. $\endgroup$ Commented May 27, 2014 at 20:26
16
$\begingroup$

And here is the plot of indefinite sum of tan(x):

alt text

Here you can see tan(x) in red and its indefinite sum is in blue.

As you can see, the indefinite sum is fairly continuous. Oleg Eroshkin's conclusion that this function should be discontinuous everywhere apparently came from a false assumption that indefinite sum of a periodic function should also be periodic.

Though it is true that as $|x|$ grows the density of the poles grows, showing the same behavior as in function $f(x)=\tan(x^2)$

The function shown on this plot is

$$T(z)=-\sum _{k=1}^{\infty } \left(\psi \left(k \pi -\frac{\pi }{2}+1-z\right)+\psi \left(k \pi -\frac{\pi }{2}+z\right)-\psi \left(k \pi -\frac{\pi }{2}+1\right)-\psi \left(k \pi -\frac{\pi }{2}\right)\right)+C$$

It can be derived from the first formula on this page:

$$\tan(x)=8x \sum_{k=1}^{\infty} \frac1{(2k-1)^2\pi^2-4x^2}$$

We notice that there is a difference of squares in the denominator and separate the terms so to obtain

$$\tan(x)=-\sum_{k=1}^{\infty}\left(\frac1{x-\pi k+\frac{\pi}2}+\frac1{x+\pi k-\frac{\pi}2}\right)$$

Now we take indefinite sum by each term to obtain the expression for T(x). All simple.

$\endgroup$
21
  • 4
    $\begingroup$ But the plot was made from a partial sum of the series, I guess? Does the series converge somewhere? $\endgroup$ Commented Oct 20, 2010 at 17:51
  • 5
    $\begingroup$ @Anixx, could you provide the details of the proof of convergence? What is the $\psi$ function? $\endgroup$ Commented Oct 20, 2010 at 18:07
  • 4
    $\begingroup$ Anixx, you might as well put a third answer with full details on exactly what series you are summing, where it converges and why. Meanwhile you might email Herman, using your pseudonym and a separate pseudonymous email account if you like, he is pretty happy and you have much in common. For Mariano, Gerald, Oleg and "J.M." the discussion of convergence of the series is far more interesting, most especially (as you have edited at least once) precisely what the series might be. Meanwhile, as long as Herman accepts one of your answers the relationship between you two is good. $\endgroup$
    – Will Jagy
    Commented Oct 20, 2010 at 19:16
  • 5
    $\begingroup$ @Anixx, how can we tell if this is correct or not if we don't even know if the formula you wrote defines a function? Writing down a series does not automatically define a function... $\endgroup$ Commented Oct 20, 2010 at 19:53
  • 8
    $\begingroup$ Close! I get instead by this method $$ T(z) := -\sum_{k = 1}^{\infty} \psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) - z + 1\Biggr) + \psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + z\Biggr) - \psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr) + 1\Biggr) -\psi \Biggl(\pi \biggl(k - \frac{1}{2}\biggr)\Biggr) $$ The term is asymptotic to $z(1-z)/(k^2\pi^2)$ so we have absolute convergence, and the difference is as claimed. Now, I suppose, the only quibble left is whether to consider this "closed form" or not. $\endgroup$ Commented Oct 20, 2010 at 21:19
6
$\begingroup$

There is no reason to think there is any simple expression for solution $T$ of $$T(x + 1) - T(x) = \tan(x)$$

What we CAN find a simple solution to is this: $$T(x + \pi) - T(x) = \tan(x)$$

$\endgroup$
2
  • $\begingroup$ Thank you. I know the solution to $T(x + \pi) - T(x)$, but I am hoping for a solution to the $T(x+1) - T(x)$ case. But if there is no "simple" solution, what avenues can I explore to get some sort of solution? $\endgroup$ Commented Oct 4, 2010 at 14:53
  • $\begingroup$ It depends what you mean by a solution - do you want asymptotics, for instance? Fast numerical algorithms? $\endgroup$
    – j.c.
    Commented Oct 4, 2010 at 23:34
6
$\begingroup$

There are no "nice" functions with such properties. Every solution is discontinuous at a dense subset of $\mathbb{R}$. Just look on poles of $\tan x$. Let $x=\pi/2+\pi m$, $m\in\mathbb{Z}$. Clearly either $T$ is discontinuous at $x$ or at $x+1$. In the latter case it is also discontinuous at $x+k$ for every positive integer $k$. In the former case, $T$ is discontinuous at $x+k$ for every non-positive integer $k$.

$\endgroup$
7
  • $\begingroup$ It's interesting that a simple setup can lead to a complicated function like this. Thanks for your answer. (I am still interested if this is somehow a studied function). $\endgroup$ Commented Oct 8, 2010 at 8:53
  • 2
    $\begingroup$ For all those who voted for this answer, please notice that there is a counter-example to Eroshkin's claims. Such functions exists, mostly continuous and its plot is shown. See the currently selected answer. $\endgroup$
    – Anixx
    Commented Oct 21, 2010 at 15:38
  • 1
    $\begingroup$ Oleg's argument would only work if there were more "mixing" of the two cases. For example, if the former case happened for infinitely many negative numbers then the argument would go through. But as long as all sufficiently negative numbers are in the latter case and all sufficiently positive ones are in the former case, then there's a hole in the argument. $\endgroup$ Commented Oct 21, 2010 at 16:06
  • 3
    $\begingroup$ Oleg's argument's claims are fairly correct until the final conclusion. He correctly noted that the function should have poles at x+1+k or x-k for any natural k. The key word here is "either". The continuous sum function can be arranged so that for any pole right of zero all consecutive poles would be in x+1+k points, so to the right of the first one and for each pole in the left of zero all poles would be in the points x-k, so to the left of it. Thus in the neighbourhood of zero itself the number of poles is limited. $\endgroup$
    – Anixx
    Commented Oct 21, 2010 at 17:30
  • 2
    $\begingroup$ Besides this is is from general considerations evident that for any continuous analytic function on the interval from $(-\pi/2, \pi/2)$ can be constructed an indefinite sum function, continuous and analytic on the same interval plus a unit range. $\endgroup$
    – Anixx
    Commented Oct 21, 2010 at 17:43
6
$\begingroup$

Well I found the answer to your question, it is

$$\sum_x \tan(x)=ix-\psi _{e^{2 i}}^{(0)}\left(x+\frac{\pi }{2}\right)+C$$

I have verified it with difference operator and it gives tan(x). The function involved is the q-digamma function http://mathworld.wolfram.com/q-PolygammaFunction.html .

You can verify the result yourself.

$\endgroup$
24
  • 3
    $\begingroup$ Is the q-polygamma well-defined at $q=e^{2i}$? $\endgroup$ Commented Oct 17, 2010 at 15:34
  • 4
    $\begingroup$ @Mariano: of course not. The series (2) that "defines" it diverges for almost all real $x$ $\endgroup$ Commented Oct 17, 2010 at 21:11
  • 7
    $\begingroup$ I have always confused an infinite sum with a sum over an infinite range. How may I deconfuse the two? $\endgroup$ Commented Oct 17, 2010 at 22:40
  • 5
    $\begingroup$ By the way: ask Wolfram Alpha to plot the function $ix-\psi _{e^{2 i}}^{(0)}\left(x+\frac{\pi }{2}\right)$ or to numerically evaluate it for some real number $x$. $\endgroup$ Commented Oct 17, 2010 at 23:17
  • 4
    $\begingroup$ @Anixx: See (1) and (2) in the Mathworld page mathworld.wolfram.com/q-PolygammaFunction.html Note that (2) involves an INFINITE series, and (1) -- if you follow the link involved -- involves an INFINITE product. Both of these are DIVERGENT for almost all real x in the case of $e^{2i}$. $\endgroup$ Commented Oct 17, 2010 at 23:18
2
$\begingroup$

The indefinite integral of tan(x) is -ln |cos(x)|, so find out how that expression was arrived at and see if this can be adpated to the discrete case.

http://en.wikipedia.org/wiki/Indefinite_sum

http://en.wikipedia.org/wiki/Table_of_integrals#Trigonometric_functions

Or go for an approximate answer: truncate the taylor series and find the indefinite sum of that polynomial. From http://en.wikipedia.org/wiki/Taylor_series tan(x) = x+x^3/3+... and sum(x+x^3/3,x) = (7/12)x^2-(1/2)x+(1/12)x^4-(1/6)x^3

The problem with this is tan(x) is periodically discontinuous and the taylor series is only valid for one period.

$\endgroup$
2
  • 1
    $\begingroup$ The indefinite integral (typically) requires the use of substitution, which exists because of the "nice" chain rule for differentiation. Differencing does not have a nice chain rule (there are some variants, but they do not help in this case). I'll play with truncated Taylor series and see where it gets me (I guess I should have tried that already). $\endgroup$ Commented Oct 4, 2010 at 16:05
  • $\begingroup$ Ok, a few quick tests in Matlab shows that even in the range $[0 \pi/2]$ that the indefinite sum of Taylor series does not converge. In light of what Oleg Eroshkin said below, this makes sense, so this method cannot be used for finding an approximation. $\endgroup$ Commented Oct 5, 2010 at 7:49
2
$\begingroup$

It's not in Jolley's Summation Of Series, which is pretty close to saying it doesn't exist. Have you tried Euler-Maclaurin summation to get an asymptotic series?

$\endgroup$
2
$\begingroup$

Consider T(x) in T(x+1)-T(x)=tan(x) to be defined only on the integers>=0 and write it as the recurrence relation :

T(n+1)-T(n)=tan(n) and set the initial value at T(0)=0,

and then without needing a closed form expression for T(n) in terms of n,

but just plotting the values of T(n+1)=T(n)+tan(n)

we can see what the function looks like when restricted to the integers:

Image of plot of T(n+1)=T(n)+tan(n), T(0)=0

The top-left image shows the function plotted from n=..750

The left column of images is the plot, the middle images join the dots to get a look at the shape, and the right column shows were the image is zoomed to get the images on the next row.

The function T(n) appears to be almost periodic with period about 355.5

T(n) maximum is about 3.5, T min is about -425.

$\endgroup$
2
  • 5
    $\begingroup$ The observed almost periodicity with period about 355 should relate to the fact that pi = 355/113, so that tan(x + 355) ~= tan(x + 113pi) = tan x. Note, though, that this the approximation above is only good when x + 355 and x + 113pi are not close to multiples of pi. If you were to look at this function on a larger scale you'd probably also see something like almost periodicity with longer periods corresponding to better rational approximations of pi (although 355/113 is exceptionally close to pi, so you'dhave to zoom out a lot to get a better one, and it might be less impressive.) $\endgroup$ Commented Oct 20, 2010 at 22:01
  • $\begingroup$ (er, make that "when x + 355 and x + 113 pi are not close to odd multiples of pi/2, that is, the points of discontinuity of tan x"). $\endgroup$ Commented Oct 21, 2010 at 4:13
1
$\begingroup$

The Maple command for indefinite sums (as described on the page http://www.maplesoft.com/support/help/Maple/view.aspx?path=sum/details, found via Google by typing "indefinite sum" maple) is given by

sum(f,x);

I tried this, but my version of Maple doesn't know the answer when f=tan(x).

For sin(x) it gives sum(sin(x),x);= -(1/2)sin(x)+(1/2)*sin(1)cos(x)/(cos(1)-1)

$\endgroup$
1
  • $\begingroup$ Yes, I am pretty sure if there is a simple expression, it is not an elementary function, which is why these symbolic programs don't know it. But it might still be a studied special function... $\endgroup$ Commented Oct 4, 2010 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .