I'm a neophyte in Mathematica so this is a very basic question.
I'm having trouble with defining the following functions:
ClearAll[rtartaruga, f, g]
(* formula 2.22 *)
rtartaruga[r_, rp_, rm_, ν_] := (2 ν*rp -
Sqrt[rp* rm *(ν^2 + 3)])/((ν^2 + 3)*(rp - rm))*
Log[Abs[ r - rp]] - (2 ν*rm -
Sqrt[rp* rm *(ν^2 + 3)])/((ν^2 + 3)*(rp - rm))*Log[Abs[r - rm]]
?rtartaruga
(* formula 3.24 *)
f[rmin_, rmax_, rm_, rp_, ν_, Ε_] := Integrate[
1/((ν^2 + 3)*(r - rm)*(r -
rp))*[r (2 ν r - Sqrt[rp*rm*(ν^2 + 3)] ) - 2*Ε*
Sqrt[[(2 ν r - Sqrt[rp*rm*(ν^2 + 3)] )^2 - (ν^2 + 3)*
(r - rm)*(r - rp)]/(4*Ε^2 +
(ν^2 + 3)*(r - rm)*(r - rp))]], {r,rmin, rmax}]
?f
(*formula 3.25*)
g[τ_, rmin_, rmax_, rp_, rm_, ν_] := τ/(2*rAdS) +
rtartaruga[rmax, rp, rm, ν] - rtartaruga[rmin, rp, rm, ν]
?g
rtartaruga[r, rp, rm, ν]
f[rmin, rmax, rm, rp, ν, Ε]
g[τ, rmin, rmax, rp, rm, ν]
When I run the code it yields this output:
rtartaruga[r_,rp_,rm_,ν_]:=((2 ν rp-Sqrt[rp rm (ν^2+3)])
Log[Abs[r-rp]])/((ν^2+3) (rp-rm))-((2 ν rm-Sqrt[rp rm
(ν^2+3)]) Log[Abs[r-rm]])/((ν^2+3) (rp-rm))
And the name "rtartaruga" from blue becomes black, whereas those of the functions "f" and "g" remain blue.
I guess I'm missing the output for the commands "?f", "?g" and for those in the last three lines, but I'm not able to spot the problems in the code.
Thank's a lot for your help!
The Four Kinds of Bracketing in the Wolfram Language
$\endgroup$