MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bug in Series with NonCommutativeProduct?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122198] Re: Bug in Series with NonCommutativeProduct?
  • From: D J G C <dundjoh at googlemail.com>
  • Date: Thu, 20 Oct 2011 07:43:50 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110130748.DAA02390@smc.vnet.net> <j79160$i4b$1@smc.vnet.net>

On Oct 14, 11:59 am, Daniel Lichtblau <d... at wolfram.com> wrote:
> On 10/13/2011 02:48 AM, D J G C wrote:
>
> >>Series[(A h) ** (B h), {h, 0, 2}]
>
> > ... + A B  h^2+O[h]^3
>
> > The problem is the appearance of a commutative product A B. It should
> > instead be A ** B
>
> > However applying the D gives the correct answer:
>
> >> D[(A h ) ** (B h), {h, 2}]
>
> > 0**(B h)+2 A**B+(A h)**0
>
> It's just doing a "blind" Taylor expansion. One can see this by
> replacing NonCommutativeMultiply with some (undefined) function f:
>
> In[242]:=Series[f[(A h), (B h)], {h, 0, 2}]
>
> Out[242]= SeriesData[h, 0, {
> f[0, 0], B Derivative[0, 1][f][0, 0] + A Derivative[1, 0][f][0, 0],
>    Rational[1, 2] (
>     B^2 Derivative[0, 2][f][0, 0] + 2 A B Derivative[1, 1][f][
>       0, 0] + A^2 Derivative[2, 0][f][0, 0])}, 0, 3, 1]
>
> Daniel Lichtblau
> Wolfram Research

A series always is a "blind" Taylor expansion.

The bug is, that in this "blind" expansion it gets the second
derivative wrong, by ignoring the possibility for a non-commutative
product.

The D[] is aware of this. Why not use its result in the expansion
(which by the way is the definition of a series)?

This is a bug, as Mathematica is a mathematical software, offering the
(a) non-commutative product, which part of it does not handle. At
least the user has to be warned.



  • Prev by Date: Re: Low CPU usage
  • Next by Date: Re: Low CPU usage
  • Previous by thread: Re: Bug in Series with NonCommutativeProduct?
  • Next by thread: DiagonalizableQ