Re: Forcing a parameter to be integer when using 'Integrate'
- To: mathgroup at smc.vnet.net
- Subject: [mg67570] Re: Forcing a parameter to be integer when using 'Integrate'
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 1 Jul 2006 05:11:50 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <e82nvi$r49$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ian Linington wrote: > Hello, > > I am a mathematica novice, so please excuse me if this question is a > bit dumb... > > I would like to solve the integral: > >> Integrate[E^((n*I)*x)/Sqrt[1 + a^2*Sin[x]^2], {x,0,2*Pi}] > > with n integer and a real and positive. > The problem is that I don't know how to tell Mathematica about these > conditions on a and n. > > If I explicitly assign an integer value for n (i.e. 4 in this example), > Mathematica solves the integral: > >> Integrate[E^((4*I)*x)/Sqrt[1 + a^2*Sin[x]^2], {x,0,2*Pi}] > > (with a few conditions) and gives the output > >> If[(Re[a^(-1)] != 0 || -Im[a^(-1)] < 0) && > (Re[a^(-1)] != 0 || -Im[a^(-1)] >= 0) && ... > ... (lots more)..., > (4*(-8*(2 + a^2)*EllipticE[-a^2] + > (4 + a^2)*(4 + 3*a^2)*EllipticK[-a^2]))/(3*a^4), > Integrate[E^((4*I)*x)/Sqrt[1 + a^2*Sin[x]^2], > {x, 0, 2*Pi}, > Assumptions -> !((Re[a^(-1)] != 0 || -Im[a^(-1)] < 0) > && (Re[a^(-1)] != 0 || -Im[a^(-1)] >= 0) && ...) > ... (lots more) ...]] > > Simlilarly if we pick other integer values for n. > > The question is, how to get a generic formula in terms of a and n? > > Can anybody help please? > > Many thanks, > Ian > Use Assumptions. For instance Integrate[E^((n*I)*x)/Sqrt[1 + a^(2)*Sin[x]^(2)], {x, 0, 2*Pi}, Assumptions -> {Element[n, Integers], a > 0}] HTH, Jean-Marc