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 2007

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

Search the Archive

Reply about Piecewise and Integral

  • To: mathgroup at
  • Subject: [mg75378] Reply about Piecewise and Integral
  • From: zosi <zosi at>
  • Date: Fri, 27 Apr 2007 05:25:32 -0400 (EDT)


Many thanks to Bhuvanesh, dh at, Jean-Marc Gulliet, Daniel 
for their reply to my [mg75189, 20 April 07]   Piecewise and Integral.

In particular, the hint by Bhuvanesh to use

f[x_] = 10*UnitStep[Sin[Pi*x + 3/2]]

and the equivalent hint by Lichtblau to use

f[x_] := Piecewise[{{10,Abs[FractionalPart[x/t]]<=tau ||
when t=2 and tau=t/8                        
gave the correct answer (a0 = 10).

Conclusion: their method is more elegant (I am not surprised) AND it works.

However, let me say that I am feeling a bit "deceived" by  Piecewise.

Thanks again

Gianfranco Zosi
Dip Fisica Generale "A.Avogadro"
Universita di Torino

  • Prev by Date: Re: minmum of a function
  • Next by Date: Re: weird bugs in Integrate
  • Previous by thread: Re: Map vs. Table
  • Next by thread: Solving a differential equation numerically in Mathematica