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: evaluate assuming odd integers?

  • To: mathgroup at
  • Subject: [mg58991] Re: [mg58961] evaluate assuming odd integers?
  • From: Pratik Desai <pdesai1 at>
  • Date: Tue, 26 Jul 2005 04:02:01 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

ab at wrote:

>Is there a way in Mathematica to evaluate an expression assuming some 
>varialbe is Odd integer, for example in below integral how can i tell it 
>that n is odd integer in the Assumptions section of FullSimplify command or 
>the integral itself??:
>Integrate[Sin[n*Pi*(z/L)], {z, 0, L}]
>FullSimplify[%, n \[Element] Integers && n >= 0 &&
>L \[Element] Reals && L > 0 && z \[Element] Reals]
I guess the two simplest approaches that come to mind are

int[n_?OddQ] = Integrate[Sin[n*Pi*(z/L)], {z, 0, L}]
int2 = Table[Integrate[Sin[(2*n - 1)*Pi*(z/L)], {z, 0, L}], {n, 1, 5}]

Best regards

Pratik Desai
Graduate Student
Department of Mechanical Engineering
Phone: 410 455 8134

  • Prev by Date: Re: Passing options through user-defined functions
  • Next by Date: Re: How to plot individual 2D data points, where each must have its own color.
  • Previous by thread: Re: evaluate assuming odd integers?
  • Next by thread: Re: evaluate assuming odd integers?