Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Integration problem

  • To: mathgroup at
  • Subject: [mg60495] Re: Integration problem
  • From: Peter Pein <petsie at>
  • Date: Sun, 18 Sep 2005 01:15:50 -0400 (EDT)
  • References: <> <dggdma$gea$>
  • Sender: owner-wri-mathgroup at

Heidi.Foerster at schrieb:
> Hi,
> I have a periodic function
> f=1\(2pi) (1-e^{-2a})/(1-2e^{-a}cos(x-x0)+e^{-2a}), and I want to
> calculate the first Fourier coefficient, which corresponds to
> Integrate[f cos(x),{x,0,2pi}].
> The result mathematica tells me is -Cos[x0] Sinh[a].
> (The correct result would be Cos[x0] e^{-a}.)
> If I set x0 to zero, I get the correct result e^{-a}:
> Simplify[Integrate[(f /. x0 -> 0) Cos[x], {x, 0, 2 \[Pi]}], a > 0]
> e^{-a}
> The problem is, that for x0=0 both outputs don't match.
> Can anyone tell me what's wrong?
> Heidi
Hello Heidi,

 it seems, Mathematica has difficulties to select the correct branch(es)
 while integrating. With a little luck, one succeeds with:

  TransformationFunctions -> {PowerExpand, Automatic}];
a0 = Integrate[f*Cos[x], {x, 0, 2*Pi},
  Assumptions -> a>0 && Element[x0,Reals]]



Peter Pein, Berlin
GnuPG Key ID: 0xA34C5A82

  • Prev by Date: Re: NonlinearFit - Logistic Function-CalcCenter3
  • Next by Date: probability with simulation
  • Previous by thread: Integration problem
  • Next by thread: Re: solve for a squared variable