I am trying to solve an integral that gives a hypergeometric function + gamma function. The fact is that my values of `not`

(see the code below) are integers, so `n = 1,2,3,4 ...`

. But that gives a complex singularity when I want to introduce the value of `not`

in the expression once the integral has already been calculated.

```
F[r_, k_, kl_, n_] : = Sin[k*kl*r]/ (k ^ 2 * r) * k ^ -n
L & # 39; Integration[r_, kl_, n_, m_] : =
Supposing[{kl > 0, n > 0, r > 0, m > 0},
Integrate[f[r, k, kl, n], {k, 1, m}]]// FullSimplify
a function[r_] : = Integration[r, kl, n, Infinity] // FullSimplify
a function[r]
```

The result is:

```
-kl (kl r) ^ n Cos[(n [Pi]) / 2]Gamma[-1 - n] + (
kl HypergeometricPFQ[{-(n/2)}, {3/2, 1 - n/2}, -(1/4) kl^2 r^2]) / not
```

So *Mathematica* can solve the integral for any value of `not`

. But when I substitute in this expression the value of `not`

that I want then I get a singularity (of course, because of the gamma function and the hypergeometric function)

```
-kl (kl r) ^ n Cos[(n [Pi]) / 2]Gamma[-1 - n] + (
kl HypergeometricPFQ[{-(n/2)}, {3/2, 1 - n/2}, -(1/4) kl^2 r^2]) /
not /. n -> 2
```

I receive

`Infinity :: indet: Undetermined expression ComplexInfinity + ComplexInfinity encountered.`

But I do not underestimate because if I realize the integral given the value of `not`

already, so I get an analityical expression for that

```
F[r_, k_, kl_, n_] : = Sin[k*kl*r]/ (k ^ 2 * r) * k ^ -n
L & # 39; Integration[r_, kl_, n_, m_] : =
Supposing[{kl > 0, n > 0, r > 0, m > 0},
Integrate[f[r, k, kl, n], {k, 1, m}]]// FullSimplify
a function[r_] : = Integration[r, kl, 2, Infinity] // FullSimplify
a function[r]
```

I receive:

```
(kl r Cos[kl r] +
kl ^ 3 r ^ 3 CosIntegral[kl r] + (2 - kl ^ 2 r ^ 2) Sin[kl r]) / (6 r)
```

And there is no kind of singularity in this expression. My question is this: there is a way to get a general expression in terms of variable `not`

, without having a singular behavior as it is due to the gamma and the hypergeometric function? *Mathematica* can simplify this expression in order to cancel the divergences?