# Integration with parameter

I want to integrate this integral $$\int_0^{\pi}d \theta\sin ^{d-2}(\theta ) \left(-1+e^{i k x \cos (\theta )}\right)$$ So first I tried

Integrate[(E^(I k2 x Cos[\[Theta]]) - 1) Sin[\[Theta]]^(  d - 2),
{\[Theta], 0, \[Pi]},  Assumptions -> x > 0 && k2 > 0 ]


which came back nothing. Then I tried

Integrate[(E^(I k2 x Cos[\[Theta]]) - 1) Sin[\[Theta]]^(  d),
{\[Theta], 0, \[Pi]},  Assumptions -> x > 0 && k2 > 0 ]


the result was

ConditionalExpression[(Sqrt[\[Pi]] Gamma[(1+d)/2] (-1
+Hypergeometric0F1[1+d/2,-(1/4) k2^2 x^2]))/Gamma[(2+d)/2],Re[d]>-1]


Why didn't the first one work?

Integrate[(E^(I k2 x Cos[\[Theta]]) - 1) Sin[\[Theta]]^(  d - 2),
{\[Theta], 0, \[Pi]},  Assumptions -> x > 0 && k2 > 0 && d>1]


the result looks normal but why can't mma guess the condition $d>1$ in the first integration?

• With Version 8.0 MMA does integrate your first integral and find the condition Re[d]>1. Integrate[(E^(I k2 x Cos[\[Theta]]) - 1) Sin[\[Theta]]^(d - 2), {\[Theta], 0, \[Pi]}, Assumptions -> x > 0 && k2 > 0]  Result: ConditionalExpression[(1/Gamma[d/2]) Sqrt[\[Pi]] Gamma[1/2 (-1 + d)] (-1 + Hypergeometric0F1[d/2, -(1/4) k2^2 x^2]), Re[d] > 1]  Jan 19, 2018 at 15:21
• @Akku14 That's weird. I'm using MMA 11.2 so maybe Wolfram decided to make it easier for competitors xd. Jan 21, 2018 at 17:27

With MMA ver 11.2, I have tried to simplify a bit the integral with a variable change and taking into account that $k2>0$ and $x>0$. Thus $t=\cos(x)$ and the integral now reads
Assuming[a > 0, Integrate[(E^(I a t) - 1) (1 - t^2)^((d - 3)/2), {t, -1, 1},

ConditionalExpression[(Sqrt[\[Pi]]