Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Radius of convergence?

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 9 Feb, 2009 12:54:01

Message: 1 of 9

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?

Subject: Radius of convergence?

From: Alan Weiss

Date: 9 Feb, 2009 14:54:23

Message: 2 of 9

Joerg Buchholz wrote:
> 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

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 9 Feb, 2009 16:43:02

Message: 3 of 9

Alan Weiss <aweiss@mathworks.com> wrote in message <gmpg2v$ba9$1@fred.mathworks.com>...
> Joerg Buchholz wrote:
> > 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

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 9 Feb, 2009 16:48:02

Message: 4 of 9

Alan Weiss <aweiss@mathworks.com> wrote in message <gmpg2v$ba9$1@fred.mathworks.com>...
> Joerg Buchholz wrote:
> > 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

Subject: Radius of convergence?

From: Roger Stafford

Date: 9 Feb, 2009 19:17:02

Message: 5 of 9

"Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <gmpmo1$71h$1@fred.mathworks.com>...
> ......
> ... 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

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 9 Feb, 2009 21:10:17

Message: 6 of 9

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gmpvfe$jr3$1@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

Subject: Radius of convergence?

From: Roger Stafford

Date: 10 Feb, 2009 02:24:01

Message: 7 of 9

"Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message <gmq63p$ik3$1@fred.mathworks.com>...
> ......
> 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

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 10 Feb, 2009 09:17:01

Message: 8 of 9

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message
:
> 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

Subject: Radius of convergence?

From: Joerg Buchholz

Date: 10 Feb, 2009 19:18:03

Message: 9 of 9

"Joerg Buchholz" <buchholz@hs-bremen.de> wrote in message
:
> MuPAD has a similar function; it returns a symbolic sum for the nth coefficient:
:

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.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us