MathGroup Archive 2011

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

Search the Archive

Re: Normalize[] gives incorrect answer for some norm functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118026] Re: Normalize[] gives incorrect answer for some norm functions
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 9 Apr 2011 07:12:10 -0400 (EDT)

Normalize is not defined the way that you think that it is. From the documentation:

Normalize[expr,f]is effectively expr/f[expr],except when there are zeros in f[expr].

expr = 1 + x + x^2;
f = Integrate[#^2, {x, -1, 1}] &;

Normalize[expr, f] == expr/f[expr]

True


Bob Hanlon

---- Stefan <wutchamacallit27 at gmail.com> wrote: 

=============
I believe I have found a fault in the Normalize function where the
returned expression is incorrectly normalized for certain norm functions.
Ironically enough, the best example seems to be one found in the
documentation page for Normalize, under the section Generalizations
and Extensions. The documentation is as follows:

Normalize a polynomial with respect to integration over the interval
-1 to 1:
In[1]:= Normalize[1+x+x^2,Integrate[#^2,{x,-1,1}]&]
Out[1]= 5/22 (1+x+x^2)

The function appears to have calculated Integrate[(1+x+x^2)^2,
{x,-1,1}], seen the result to be 22/5, and then simply divided the
function by this value. However, this is not the correct normalization
factor, since integrating the result under the same norm does not give
an answer of 1.

In[2]:= Integrate[%^2, {x, -1, 1}]
Out[2]= 5/22

It seems to me that the error is due to the simplicity with which the
function works, it does not take into account that the norm function
squares the parameter in the integral. The correct answer would be
Sqrt[5/22] (1+x+x^2) , so that its magnitude in the given norm is 1.
I am running 8.0.0 (havent downloaded the update yet, my apologies if
this is fixed already)
{8.0 for Microsoft Windows (64-bit) (November 7, 2010),8.0.0.0
(1803527, 1802949)}




  • Prev by Date: Wolfram Library Archive: resume-able downloading of files
  • Next by Date: Re: Coefficents of terms in an expression containing the matching string
  • Previous by thread: Re: Normalize[] gives incorrect answer for some norm functions
  • Next by thread: Re: why extending numbers by zeros instead of dropping precision