Message Boards Message Boards

Solve integrals with assumptions?

GROUPS:

Hello! I am a newbie in the Forums... I have read the Guidelines and used the Search and haven't found the answer to this, but just excuse me if this is too easy or explained elsewhere. If you can give me a pointer I will read it from there.

I am trying to do an integral in Mathematica. The integral is

Integrate[E^(I a x + I b Cos[x] ),{x,0,2 Pi}]

Mathematica can't solve this integral and leaves it as an expression. However, this integral has a known solution in terms of Bessel functions, if b is real and a is an integer. For example, if we do

 Integrate[E^(I a x + I b Cos[x] )/.a->1,{x,0,2 Pi}]

The solution is

ConditionalExpression[ 2 I Pi BesselJ[1,b], Element[b,Reals]]

Unfortunately, if I use the Assumption that a is an Integer, Mathematica still can't solve the integral. Even more surprising was when I changed the value of a to 3/2 to find out that Mathematica gave me a (complicated) analytical expression. So, it appears that Mathematica knows more about the Integral than it distills from the outcome of the Integrate, but it is only apparent when you force it to calculate given numbers.

Now the questions are: How does the Assumptions work internally? Does Mathematica first look for a complete solution of the Integral and then try to match it with the Assumptions? What is the difference when I do the /. command? I guess that it first assigns the value to the variable and then executes the function.

Overall: Is there a way of extracting all the information from the integral othere than trying different values?

Thanks a lot for your help!

Answer
5 months ago

Group Abstract Group Abstract