Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5644 > unrolled thread
| Started by | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| First post | 2011-10-14 09:59 +0000 |
| Last post | 2011-10-20 11:46 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Bug in Series with NonCommutativeProduct? Daniel Lichtblau <danl@wolfram.com> - 2011-10-14 09:59 +0000
Re: Bug in Series with NonCommutativeProduct? D J G C <dundjoh@googlemail.com> - 2011-10-20 11:46 +0000
| From | Daniel Lichtblau <danl@wolfram.com> |
|---|---|
| Date | 2011-10-14 09:59 +0000 |
| Subject | Re: Bug in Series with NonCommutativeProduct? |
| Message-ID | <j79160$i4b$1@smc.vnet.net> |
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
[toc] | [next] | [standalone]
| From | D J G C <dundjoh@googlemail.com> |
|---|---|
| Date | 2011-10-20 11:46 +0000 |
| Message-ID | <j7p1nf$5ju$1@smc.vnet.net> |
| In reply to | #5644 |
On Oct 14, 11:59 am, Daniel Lichtblau <d...@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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web