Discussion:
Radius of convergence?
(too old to reply)
Joerg Buchholz
2009-02-09 12:54:01 UTC
Permalink
syms x
f = sin (x)
t = taylor (f)

returns the Maclaurin approximation of the sine function. Is there a way to compute the radius of convergence of the approximation analytically?
Alan Weiss
2009-02-09 14:54:23 UTC
Permalink
Post by Joerg Buchholz
syms x
f = sin (x)
t = taylor (f)
returns the Maclaurin approximation of the sine function. Is there a way to compute the radius of convergence of the approximation analytically?
Hi, I am not sure I understand your question. Radius of convergence
usually applies to functions whose Taylor series can diverge if more
terms are taken. It is well known that the radius of convergence of a
Taylor series for the sine function is infinity.

However, perhaps you are asking if there is a way for the Symbolic Math
Toolbox to analytically demonstrate that the radius is infinity. Is that
your question?

Alan Weiss
MATLAB mathematical toolbox documentation
Joerg Buchholz
2009-02-09 16:43:02 UTC
Permalink
Post by Alan Weiss
Post by Joerg Buchholz
syms x
f = sin (x)
t = taylor (f)
returns the Maclaurin approximation of the sine function. Is there a way to compute the radius of convergence of the approximation analytically?
Hi, I am not sure I understand your question. Radius of convergence
usually applies to functions whose Taylor series can diverge if more
terms are taken. It is well known that the radius of convergence of a
Taylor series for the sine function is infinity.
However, perhaps you are asking if there is a way for the Symbolic Math
Toolbox to analytically demonstrate that the radius is infinity. Is that
your question?
Alan Weiss
MATLAB mathematical toolbox documentation
Alan,
in undergraduate mathematics we teach our students how to find the radius of convergence of a power series e.g. with the help of the ratio test

http://en.wikipedia.org/wiki/Radius_of_convergence
(section: Finding the radius of convergence)

I am asking if there is a way for the Symbolic Math Toolbox to find that radius of convergence of the power series approximation of any given analytical function (sin(x), exp(x), 1/(1-x) ...) e.g. with the help of the ratio test.

I see the problem that the taylor command returns numerical coefficients; whereas the ratio test uses the nth coefficient c_n in general, analytical form. Therefore, I could also ask if there is a way for the Symbolic Math Toolbox to find the nth coefficient c_n of the power series approximation of any given analytical function.

Joerg
Joerg Buchholz
2009-02-09 16:48:02 UTC
Permalink
Post by Alan Weiss
Post by Joerg Buchholz
syms x
f = sin (x)
t = taylor (f)
returns the Maclaurin approximation of the sine function. Is there a way to compute the radius of convergence of the approximation analytically?
Hi, I am not sure I understand your question. Radius of convergence
usually applies to functions whose Taylor series can diverge if more
terms are taken. It is well known that the radius of convergence of a
Taylor series for the sine function is infinity.
However, perhaps you are asking if there is a way for the Symbolic Math
Toolbox to analytically demonstrate that the radius is infinity. Is that
your question?
Alan Weiss
MATLAB mathematical toolbox documentation
Alan,
in undergraduate mathematics we teach our students how to find the radius of convergence of a power series e.g. with the help of the ratio test

http://en.wikipedia.org/wiki/Radius_of_convergence
(section: Finding the radius of convergence)

I am asking if there is a way for the Symbolic Math Toolbox to find that radius of convergence of the power series approximation of any given analytical function (sin(x), exp(x), 1/(1-x) ...) e.g. with the help of the ratio test.

I see the problem that the taylor command returns numerical coefficients; whereas the ratio test uses the nth coefficient c_n in general, analytical form. Therefore, I could also ask if there is a way for the Symbolic Math Toolbox to find the nth coefficient c_n of the power series approximation of any given analytical function.

Joerg
Roger Stafford
2009-02-09 19:17:02 UTC
Permalink
......
... I could also ask if there is a way for the Symbolic Math Toolbox to find the nth coefficient c_n of the power series approximation of any given analytical function.
......
When you ask "[Is] there is a way for the Symbolic Math Toolbox to find the nth coefficient c_n of the power series approximation of any given analytical function", strictly speaking the answer is yes, namely using the 'taylor' function. However, I think that isn't what you meant to ask. You undoubtedly intended to ask if that coefficient can be expressed as a symbolic function of n so that it could be used in a symbolic expression in the 'limit' function. I strongly suspect the answer to that question is no. Finding such a symbolic expression is equivalent to finding a symbolic expression in terms of n for the n-th derivative of a given symbolic expression which I think is beyond the powers of matlab's Symbolic Toolbox. The function 'diff' (differentiation) accepts only specific values of n and does not generate a symbolic expression involving n.

Roger Stafford
Joerg Buchholz
2009-02-09 21:10:17 UTC
Permalink
"Roger Stafford" <***@mindspring.com.invalid> wrote in message <gmpvfe$jr3$***@fred.mathworks.com>...
:
However, I think that isn't what you meant to ask. You undoubtedly intended to ask if that coefficient can be expressed as a symbolic function of n so that it could be used in a symbolic expression in the 'limit' function. I strongly suspect the answer to that
:

Roger,
thank you very much for the precise redefinition of my question. Seems like we agree that Matlab cannot 'express that coefficient as a symbolic function of n' with on-board means. Do you think that there is a chance to write an m-file that could do that; or do you believe one could mathematically prove that this is not possible at all?
Joerg
Roger Stafford
2009-02-10 02:24:01 UTC
Permalink
......
Roger,
thank you very much for the precise redefinition of my question. Seems like we agree that Matlab cannot 'express that coefficient as a symbolic function of n' with on-board means. Do you think that there is a chance to write an m-file that could do that; or do you believe one could mathematically prove that this is not possible at all?
Joerg
Writing such a clever m-file would be a profoundly difficult thing to do, Joerg. To take a comparatively elementary example, consider the expansion of tan(x) about x = 0. According to one of my texts, the x^(2*n-1) term has a coefficient of

2^(2*n)*(2^(2*n)-1)/(2*n)!*Bn

where Bn is the n-th Bernoulli number. Unfortunately there is no known single expression for Bn in terms of n as far as I know. It apparently has to be generated using an iterative procedure involving Eulerian numbers starting with n = 1. Taking limits would appear to require information about Bn that would be difficult to put in a form that a general 'limit' function would know how to handle. If one can't hand 'limit' a specific symbolic expression in n, what kind of input, encompassing the properties of Bn as n approaches infinity, could one provide? As is known, the "radius" of convergence here is abs(x) < pi/2, but how would one deduce this from the behavior of Bn?

Roger Stafford
Joerg Buchholz
2009-02-10 09:17:01 UTC
Permalink
Post by Roger Stafford
Writing such a clever m-file would be a profoundly difficult thing to do, Joerg. To take a comparatively elementary example, consider the expansion of tan(x) about x = 0. According to one of my texts, the x^(2*n-1) term has a coefficient of
2^(2*n)*(2^(2*n)-1)/(2*n)!*Bn
where Bn is the n-th Bernoulli number. Unfortunately there is no known single expression for Bn in terms of n as far as I know. It apparently has to be generated using an iterative procedure involving Eulerian numbers starting with n = 1. Taking limits would appear to require information about Bn that would be difficult to put in a form that a general 'limit' function would know how to handle. If one can't hand 'limit' a specific symbolic expression in n, what kind of input, encompassing the properties of Bn as n approaches infinity, could one provide? As is known, the "radius" of convergence here is abs(x) < pi/2, but how would one deduce this from the behavior of Bn?
Roger Stafford
I just love this news group! You post a question, go to bed, have desperate dreams about limits and radii of convergence, wake up the next morning, and read such a highly sophisticated answer! Thank you Roger!

Some of my findings:

Seems like Mathematica has a function called 'SeriesCoefficient' that can return the nth coefficient as a symbolic function of n:

http://reference.wolfram.com/mathematica/ref/SeriesCoefficient.html

MuPAD has a similar function; it returns a symbolic sum for the nth coefficient:

series(exp(-x), x, infinity)

returns

sum(((-1)^k*x^k)/(k*gamma(k)), k = 0..infinity)

This seems to be a good starting point for the ratio test, because gamma(k)/gamma(k+1) = 1/k.
I am still learning how to use MuPAD syntax ...

MuPAD fails to find a symbolic sum for the expansion of tan(x); I cannot try that in Mathematica.

Wikipedia gives an example on how to find the radius of convergence if Bernoulli numbers are involved:

http://en.wikipedia.org/wiki/Radius_of_convergence#A_more_complicated_example
Joerg Buchholz
2009-02-10 19:18:03 UTC
Permalink
:

This is just a quick-and-dirty hack to show that Matlab/MuPAD could compute the radius of convergence of the MacLaurin series of the exponential function:

syms x k

func = exp(x)

func =

exp(x)

infsum = feval (symengine, 'series', func, 'x, infinity')

infsum =

sum(x^k/(k*gamma(k)), k = 0..Inf)

operand = feval (symengine, 'op', infsum, '1')

operand =

x^k/(k*gamma(k))

coefficient = operand/x^k

coefficient =

1/(k*gamma(k))

next_coefficient = subs (coefficient, k, k + 1)

next_coefficient =

1/(gamma(k + 1)*(k + 1))

ratio = simple (coefficient/next_coefficient)

ratio =

k + 1

radius_of_convergence = limit (abs (ratio), k, inf)

radius_of_convergence =

Inf

Unfortunately, today's MuPAD can only compute the symbolic sum for exp, sin, and cos.
Continue reading on narkive:
Loading...