# Indefinite Integral does not compute, antiderivative however does [closed]

I have the function:

$t = t_0 - \frac{\sqrt{a-1}}{c} \int_s^r \frac{dr'}{(1-\frac{s}{r'})\sqrt{\frac{a s}{r'}-1}}$

I am currently using $c=1$, $s=1$, $t_0=0$ and $a=2$ as an example for plotting. Therefore I get: $t = -\int_2^r \frac{1}{(1-\frac{1}{r}) \sqrt{\frac{2}{r}-1}}$

Ultimately, I am planning to plot x against t.

Mathematica gives me a result for the antiderivative if I give the input:

t = Integrate[(-(Sqrt[a - 1]/c))*(1/((1 - s/r)*Sqrt[a*(s/r) - 1])), r]

However if I take the indefinite integral as input:

t= Integrate[-1/((1-1/r)*Sqrt[2/r-1]),{r,2,R}]

I get the input as the output.

Now as you can probably see from the equation, inserting the lower value won't really do the job.

This is how the plot of the antiderivative looks like:

It is supposed to be the same, but with an offset on the y axis.

Do you have any ideas how to get an expression for t? Thanks in advance.

## closed as off-topic by Daniel Lichtblau, gpap, Öskå, José Antonio Díaz Navas, MarcoBAug 25 '18 at 14:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, gpap, Öskå, José Antonio Díaz Navas
If this question can be reworded to fit the rules in the help center, please edit the question.

• Can you provide the code that you say is working and not working? Thanks – enano9314 Aug 17 '18 at 17:28
• This works: t = Integrate[(-(Sqrt[a - 1]/c))*(1/((1 - s/r)*Sqrt[a*(s/r) - 1])), r] However, if I try: t= Integrate[1/((1-1/r)*Sqrt[2/r-1]),{r,2,R}] I just get the input as output – Julia Brysch Aug 17 '18 at 17:40
• Apparently the indefinite integral can be computed but not the definite one. – Daniel Lichtblau Aug 17 '18 at 18:03

Some possibilities:

Integrate[1/((1 - 1/r)*Sqrt[2/r - 1]), {r, 2, R}, Assumptions -> R > 2]

(* -I (Sqrt[(-2 + R) R] + ArcTan[(-2 + Sqrt[R])/Sqrt[-2 + R]] +
ArcTan[(2 + Sqrt[R])/Sqrt[-2 + R]] - Log[4] +
4 Log[Sqrt[-2 + R] + Sqrt[R]]) *)

f[bigR_?NumericQ] :=
Integrate[1/((1 - 1/r)*Sqrt[2/r - 1]), {r, 2, bigR}]
f[3]

(* -I (Sqrt[3] + π/3 + Log[7 + 4 Sqrt[3]]) *)

f2[bigR_?NumericQ] :=
NIntegrate[1/((1 - 1/r)*Sqrt[2/r - 1]), {r, 2, bigR}]
f2[3]

(* 0. - 5.41316415262 I *)


All three agree when that upper bound is set to 3.

• I just tried your first method with Assumptions -> 1 < R < 2 and it works. Thank you! – Julia Brysch Aug 17 '18 at 18:28