MathGroup Archive 2002

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

Search the Archive

Re: L2 inner product. Integrate and Conjugate?


Andreas Dietrich schrieb:
> Hello.
> 
> I am trying to implement the inner product in the space of
> complex-valued, square integrable functions over [-1/2,1/2], which can
> be expressed in Mathematica code as
> 
> inner[f_Function,g_function]:=Integrate[Conjugate[f[x]]*g[x],{x,-1/2,1/2}]
> 
> This is simple enough. Problem is, Mathematica seamingly cannot
> evaluate the Integral for even the simplest of functions:
> In[10]:=inner[#&,#&]
> 
> Out[10]:=\!\(\[Integral]\_\(-\(1\/2\)\)\%\(1\/2\)\(x\ Conjugate[
>           x]\) \[DifferentialD]x\)
> 
Andreas,
Conjugate does not evaluate the expression, if the variables aren't
known to be real. Your example (inner[#&,#&]) works if you define your
function using ComplexExpand:

inner[f_,g_]:=Integrate[ComplexExpand[Conjugate[f[x]]]g[x], ...]

You may also use a home-made Conjugate, I'll call it "Konjugiert", eg:

ruKonjugiert={Complex[re_,im_]:>Complex[re,-im]};
Konjugiert[ausdr__]:=ausdr /. ruKonjugiert;

Replacing Conjugate with Konjugiert in your Definition works for your
simple Example, but more komplex functions will need a ComplexExpand to
get the wanted real result.

Gruß Peter
-- 
=--=--=--=--=--=--=--=--=--=--=--=--=--= http://home.t-online.de/home/phbrf
 Peter Breitfeld, Bad Saulgau, Germany   Meinen GnuPG/PGP-5x Key gibts dort



  • Prev by Date: Re: Mathematica 4.2 & Strange Plot results
  • Next by Date: RE: L2 inner product. Integrate and Conjugate?
  • Previous by thread: Re: L2 inner product. Integrate and Conjugate?
  • Next by thread: RE: L2 inner product. Integrate and Conjugate?