Errors in the Integral Tables of Gradshteyn and Ryzhik with Correct Results from Mathematica ----------- -------------------------------------------------------------------- The integrals in this list are shown in a form suitable for input to Mathematica. The results found in Gradshteyn and Ryzhik (I. S. Gradshteyn and I. M. Ryzhik, "Tables of Integrals, Series, and Products", Academic Press, revised fourth edition, 1980) and the results obtained in Mathematica are also shown in such a format for convenience. The Mathematica results were obtained using Version 2.2. Where noted, the results have been simplified using simplifying functions and transformations that are appropriate for the specified conditions on the parameters. All of the results have been tested by evaluating them for specific numerical values of the parameters and comparing with numerical results from NIntegrate and other numerical techniques. -------------------------------------------------------------------- Integrate[Sin[x]^m/(Cos[x]^(m - 3) (1 - k^2 Sin[x]^2)^(m/2 - 1)), {x, 0, Pi/2}] for -1 < Re[m] < 4 Gradshteyn/Ryzhik 3.681(3): Gamma[(m + 1)/2] Gamma[2 - m/2] * ((1 + (m - 3) k + k^2)/(1 + k)^(m - 3) - (1 - (m - 3) k + k^2)/(1 - k)^(m - 3)) / (k^3 Sqrt[Pi (m - 1) (m - 3) (m - 5)]) Mathematica: ((-1 + m) Gamma[2 - m/2] Gamma[(-1 + m)/2] * Hypergeometric2F1[-1 + m/2, (1 + m)/2, 5/2, k^2]) / (3 Pi^(1/2)) -------------------------------------------------------------------- Integrate[Sin[x]^(m + 1)/(Cos[x]^m (1 - k^2 Sin[x]^2)^((m + 1)/2)), {x, 0, Pi/2}] for -2 < Re[m] < 1 Gradshteyn/Ryzhik 3.681(4): ((1 - k)^-m - (1 + k)^-m)/(4 k m Sqrt[Pi]) * Gamma[1 + m/2] Gamma[(1 - m)/2] Mathematica: ((k^2)^(1/2) Gamma[1/2 - m/2] Gamma[1 + m/2] * Sinh[m ArcTanh[(k^2)^(1/2)]]) / (k^2 (1 - k^2)^(m/2) m Pi^(1/2)) The Gradshteyn/Ryzhik result is equivalent to the Mathematica result except that it is too small by a factor of 2. -------------------------------------------------------------------- Integrate[Sin[a^2/x^2] Cos[x^2 b^2], {x, 0, Infinity}] for a, b > 0 Gradshteyn/Ryzhik 3.698(2): 1/(4 b) Sqrt[Pi/2] (Sin[2 a b] + Cos[2 a b] + E^(-2 a b)) Mathematica, after applying PowerExpand and Together: ((Pi/2)^(1/2) * (Cos[2 a b] - Cosh[2 a b] + Sin[2 a b] + Sinh[2 a b])) / (4 b) The Gradshteyn/Ryzhik result errs in the sign of the E^(-2 a b) term. -------------------------------------------------------------------- Integrate[Cos[a x] x^(m - 1)/(1 + x^2), {x, 0, Infinity}] for a > 0, 0 < Re[m] < 3 Gradshteyn/Ryzhik 3.766(2): Pi Csc[Pi m/2] Cosh[a]/2 + Cos[Pi m/2] Gamma[m] * (Exp[-a + I Pi (1 - m)] Gamma[1 - m, 0, -a] - Exp[a] Gamma[1 - m, 0, a])/2 Mathematica, after applying PowerExpand: (Pi Cosh[a] Csc[(m Pi)/2])/2 + (a^(2 - m) Pi^(1/2) Gamma[-1 + m/2]* HypergeometricPFQ[{1}, {(3 - m)/2, 2 - m/2}, a^2/4])/ (8 (1/4)^(m/2) Gamma[(3 - m)/2])} -------------------------------------------------------------------- Integrate[Sin[a x] x^(2 m + 1)/(x^2 + b^2), {x, 0, Infinity}] for a > 0, and -3/2 < Re[m] < 1/2 Gradshteyn/Ryzhik 3.766(3): -Pi b^(2 m) Sec[Pi m] Sinh[a b]/2 - Sin[Pi m] Gamma[2 m] * (Hypergeometric1F1[1, 1 - 2 m, a b] + Hypergeometric1F1[1, 1 - 2 m, -a b]) / (a^(2 m)) Mathematica, after applying PowerExpand: (Pi^(1/2) Gamma[1/2 + m] * HypergeometricPFQ[{1}, {1/2 - m, 1 - m}, (a^2 b^2)/4]) / (2 (1/4)^m a^(2 m) Gamma[1 - m]) - (b^(2 m) Pi Sec[m Pi] Sinh[a b])/2 -------------------------------------------------------------------- Integrate[Cos[a x] x^(2 m + 1)/(x^2 + b^2), {x, 0, Infinity}] for a, b > 0 Gradshteyn/Ryzhik 3.766(4): -Pi b^(2 m) Csc[Pi m] Cosh[a b]/2 - Cos[Pi m] Gamma[2 m] * (Hypergeometric1F1[1, 1 - 2 m, a b] + Hypergeometric1F1[1, 1 - 2 m, -a b])/(2 a^(2 m)) Mathematica, after applying PowerExpand: -(b^(2 m) Pi Cosh[a b] Csc[m Pi])/2 + (Pi^(1/2) Gamma[m] * HypergeometricPFQ[{1}, {1/2 - m, 1 - m}, (a^2 b^2)/4]) / (2 (1/4)^m a^(2 m) Gamma[1/2 - m]) -------------------------------------------------------------------- Integrate[Exp[-Tan[x]^2 p] x (p - 2 Cos[x]^2)/(Cos[x]^6 Cot[x]), {x, 0, Pi/2}] for p > 0 Gradshteyn/Ryzhik 3.964(3): Sqrt[Pi/p] (1 + 2 p)/8 Mathematica result (evaluated after loading Calculus`Limit` and setting Sign[p] ^= 1): ((1 + 2 p) Pi^(1/2))/(8 p^(3/2)) -------------------------------------------------------------------- Integrate[Log[x]^4/((x - 1) (x + a)), {x, 0, Infinity}] for a > 0 Gradshteyn/Ryzhik 4.263(1): Log[a] (Pi^2 + Log[a]^2)^2 (7 Pi^2 + 3 Log[a]^2)/(15 (1 + a)) Mathematica: (Log[a] (7 Pi^4 + 10 Pi^2 Log[a]^2 + 3 Log[a]^4))/(15 (1 + a)) -------------------------------------------------------------------- Integrate[Log[1 - x^2] (p x^(p - 1) - q x^(q - 1)), {x, 0, 1}] for p > -2 and q > -2 Gradshteyn/Ryzhik 4.295(37): PolyGamma[p/2 + 1] - PolyGamma[q/2 + 1] Mathematica: -PolyGamma[0, 1 + p/2] + PolyGamma[0, 1 + q/2] The Gradshteyn/Ryzhik result is equivalent except for an error in sign. -------------------------------------------------------------------- Integrate[Log[1 + x^2] x^(m - 1)/(1 + x), {x, 0, Infinity}] for -2 < Re[m] < 1 Gradshteyn/Ryzhik 4.295(41): Pi (Log[2] - (1 - m) Sin[Pi m/2] beta[(1 - m)/2] - (2 - m) Cos[Pi m/2] beta[(2 - m)/2])/Sin[Pi m] where beta[a_] := (PolyGamma[(a + 1)/2] - PolyGamma[a/2])/2 Mathematica: (Pi Csc[(m Pi)/2] Sec[(m Pi)/2] * (Log[4] + Cos[(m Pi)/2] PolyGamma[0, (2 - m)/4] - Cos[(m Pi)/2] PolyGamma[0, 1 - m/4] - PolyGamma[0, (1 - m)/4] Sin[(m Pi)/2] + PolyGamma[0, (3 - m)/4] Sin[(m Pi)/2]))/4 -------------------------------------------------------------------- Integrate[Log[(1 + x^2)/x] x^(2 n - 1)/(1 + x), {x, 0, Infinity}] Gradshteyn/Ryzhik 4.298(1): Log[2]/(2 n) + 1/(4 n^2) - beta[2 n + 1]/(2 n) where beta[a_] := (PolyGamma[(a + 1)/2] - PolyGamma[a/2])/2 Mathematica, after using Simplify: Pi^2 Cot[2 n Pi] Csc[2 n Pi] + (Pi Csc[n Pi] PolyGamma[0, 1/2 - n/2])/4 - (Pi Csc[n Pi] PolyGamma[0, 1 - n/2])/4 + (Pi Csc[n Pi] Log[4] Sec[n Pi])/4 - (Pi PolyGamma[0, 1/4 - n/2] Sec[n Pi])/4 + (Pi PolyGamma[0, 3/4 - n/2] Sec[n Pi])/4 -------------------------------------------------------------------- Integrate[Log[(1 + x^2)/x] x^(2 n)/(1 + x), {x, 0, Infinity}] Gradshteyn/Ryzhik 4.298(2): Log[2]/(2 n) + 1/(4 n^2) - beta[2 n + 1]/(2 n) where beta[a_] := (PolyGamma[(a + 1)/2] - PolyGamma[a/2])/2 Mathematica: (Pi Csc[n Pi]^2 Sec[n Pi]^2 (-4 Pi Cos[2 n Pi] + Cos[n Pi] PolyGamma[0, 1/4 - n/2] - Cos[3 n Pi] PolyGamma[0, 1/4 - n/2] - Cos[n Pi] PolyGamma[0, 3/4 - n/2] + Cos[3 n Pi] PolyGamma[0, 3/4 - n/2] - PolyGamma[0, (1 - n)/2] Sin[n Pi] + PolyGamma[0, -n/2] Sin[n Pi] - 2 Log[4] Sin[2 n Pi] - PolyGamma[0, (1 - n)/2] Sin[3 n Pi] + PolyGamma[0, -n/2] Sin[3 n Pi]))/16 -------------------------------------------------------------------- Integrate[(SinIntegral[x] - Pi/2) Exp[-m x^2] x, {x, 0, Infinity}] Gradshteyn/Ryzhik 6.248(1): Pi (1 - Erf[1/(2 Sqrt[m])])/(4 m) Mathematica: Pi (-1 + Erf[1/(2 m^(1/2))])/(4 m) -------------------------------------------------------------------- Integrate[BesselY[2 v, a x^(1/2)] BesselJ[v, b x], {x, 0, Infinity}] for a > 0, b > 0, Re[v] > -1/2 Gradshteyn/Ryzhik 6.516(4): Sec[Pi v] (1/2 Cos[Pi v] BesselY[v, a^2/(4 b)] - BesselY[-v, a^2/(4 b)] + StruveH[-v, a^2/(4 b)])/(2 b). where StruveH[n_, z_] := Sum[(-1)^m (z/2)^(2 m + n + 1)/ (Gamma[m + 3/2] Gamma[n + m + 3/2]), {m, 0, Infinity}] Mathematica, after using PowerExpand: -(BesselJ[-v, a^2/(4 b)] Csc[Pi v])/(2 b) - (a^(2 - 2 v) b^(-2 + v) Gamma[-1/2 + v] * HypergeometricPFQ[{1}, {3/2, 3/2 - v}, -a^4/(64 b^2)])/ (8 (1/64)^(v/2) Pi^(3/2)) + (BesselJ[v, a^2/(4 b)] Cos[2 Pi v] Csc[Pi v] Sec[Pi v])/(2 b) -------------------------------------------------------------------- Integrate[BesselJ[v, x]/(x^2 + a^2), {x, 0, Infinity}] for Re[a] > 0, Re[v] > -1 Gradshteyn/Ryzhik 6.532(1): Pi (Anger[v, a] - BesselJ[v, a])/(a Sin[Pi v]) where Anger[v_, z_] := Sin[Pi v] * HypergeometricPFQ[{1}, {1 + v/2, 1 - v/2}, -z^2/4]/(Pi v) + z/(Pi (1 - v^2)) Sin[Pi v] * HypergeometricPFQ[{1}, {(3 + v)/2, (3 - v)/2}, -z^2/4] Mathematica: ((-(a Pi BesselI[v, a]) + a Pi v^2 BesselI[v, a] + 2 a^2 Cos[(Pi v)/2] * HypergeometricPFQ[{1}, {(3 - v)/2, (3 + v)/2}, a^2/4]) * Sec[(Pi v)/2])/(2 a^2 (-1 + v^2)) -------------------------------------------------------------------- Integrate[BesselJ[1, a x] BesselJ[1, b x]/x^2, {x, 0, Infinity}] for a > 0, b > 0 Gradshteyn/Ryzhik 6.538(1): (a + b) (EllipticE[(2 I Sqrt[a b]/Abs[b - a])^2] - EllipticK[(2 I Sqrt[a b]/Abs[b - a])^2])/Pi Mathematica, using PowerExpand and Simplify: If[Abs[b^2/a^2] >= 1, (a Hypergeometric2F1[-1/2, 1/2, 2, a^2/b^2])/2, (b Hypergeometric2F1[-1/2, 1/2, 2, b^2/a^2])/2] -------------------------------------------------------------------- Integrate[BesselJ[v + 2 n + 1, x] BesselJ[v + 2 m + 1, x]/x, {x, 0, Infinity}] for m != n, v > -1 Gradshteyn/Ryzhik 6.538(2): 0 Mathematica: Sin[(m - n) Pi]/(2 (m - n) Pi (1 + m + n + v)) The Gradshteyn/Ryzhik result is apparently based on an implicit assumption that m and n are integers. -------------------------------------------------------------------- Integrate[BesselJ[v, b x] x^(-v + 1) (x^2 - 1)^(v - 1/2), {x, 1, Infinity}] for b > 0, Abs[Re[v]] < 1/2 Gradshteyn/Ryzhik 6.567(17): 2^(-v) b^(-v - 1) Cos[b] Gamma[1/2 + v]/Sqrt[Pi] Mathematica, after applying PowerExpand and Simplify: (b^(-1 - v) Cos[b] Gamma[1/2 + v])/((1/4)^(v/2) Pi^(1/2)) Note that the factor of (1/4)^(v/2) in the denominator of Mathematica's result is equivalent to a factor of 2^v in the numerator, as opposed to the 2^(-v) that appears in Gradshteyn/Ryzhik. -------------------------------------------------------------------- Integrate[(BesselJ[1, a x]/x)^2 Sin[b x], {x, 0, Infinity}] for 0 < b < 2 a Gradshteyn/Ryzhik 6.694: b/2 - 4 a/(3 Pi) ((1 + b^2/(4 a^2)) EllipticE[(b/(2 a))^2] + (1 - b^2/(4 a^2)) EllipticK[(b/(2 a))^2]) Mathematica, after applying PowerExpand and Simplify: If[Abs[(4 a^2)/b^2] >= 1, (b (2 - (b Hypergeometric2F1[-1/2, 1/2, 2, b^2/(4 a^2)])/a))/4, (b (1 - Hypergeometric2F1[-1/2, 1/2, 2, (4 a^2)/b^2]))/2] -------------------------------------------------------------------- -------------------------------------------------------------------- For the following items, Mathematica's Integrate function produces complicated results that are not shown here. In such cases it is hard to make direct comparisons between Mathematica's symbolic result and the Gradshteyn/Ryzhik result. Nevertheless, it is easy to check that numerical calculations agree with the results from Integrate, not the Gradshteyn/Rhyzik results. -------------------------------------------------------------------- Integrate[Exp[-a Abs[x]]/(x-u),{x,-Infinity,Infinity}] Gradshteyn/Ryzhik 3.477(1): Sign[u]/Pi (Exp[a Abs[u]] ExpIntegralEi[-a Abs[u]] - Exp[-a Abs[u]] Conjugate[ExpIntegralEi[a Abs[u]]]) -------------------------------------------------------------------- Integrate[Sin[a x]/(x^v (x + b)), {x, 0, Infinity}] for a > 0, -1 < Re[v] < 2, Abs[Arg[b]] < Pi Gradshteyn/Ryzhik 3.765(1): 1/(2 b^v) Gamma[1 - v] * (E^(- I a b) Gamma[v, - I a b] - E^(I a b) Gamma[v, I a b]) -------------------------------------------------------------------- Integrate[Sin[a x] x^(m - 1)/(1 + x^2), {x, 0, Infinity}] for a > 0, -1 < Re[m] < 3 Gradshteyn/Ryzhik 3.766(1): Pi Sec[Pi m/2] Sinh[a]/2 + Sin[Pi m/2] Gamma[m] * (Exp[-a + I Pi (1 - m)] Gamma[1 - m, 0, -a] - Exp[a] Gamma[1 - m, 0, a])/2 -------------------------------------------------------------------- Integrate[Sin[a x]^3 Cos[3 b x]/x^2, {x, 0, Infinity}] for a, b > 0 Gradshteyn/Ryzhik 3.828(14): 3/8 ((a + b) Log[3 (a + b)] + (b - a) Log[3 (b - a)] - (a + 3 b) Log[a + 3 b]/3 - (3 b - a) Log[3 b - a]/3) -------------------------------------------------------------------- Integrate[Sin[a x]^2 Sin[b x]^2 Sin[2 x c]/x, {x, 0, Infinity}] for a, b, c > 0 Gradshteyn/Ryzhik 3.828(19): Pi (1 + Sign[c - a+b] + Sign[c + a-b] - 2 Sign[c - a]- 2 Sign[c - b])/16; -------------------------------------------------------------------- Integrate[Sin[a^2 x^2]^3/x^2, {x, 0, Infinity}] for a >= 0 Gradshteyn/Ryzhik 3.852(4): (3 - Sqrt[3])/8 Sqrt[Pi] a -------------------------------------------------------------------- Integrate[BesselY[v, b x]/(x + a), {x, 0, Infinity}] Gradshteyn/Ryzhik 6.531(1): Pi (Weber[v, a b] + BesselY[v, a b])/Sin[Pi v] + 2 Cot[Pi v] (Anger[v, a b] - BesselJ[v, a b]) where Weber[v_, z_] := (1 - Cos[Pi v]) * HypergeometricPFQ[{1}, {1 + v/2, 1 - v/2}, -z^2/4]/(Pi v) - z/(Pi (1 - v^2)) (1 + Cos[Pi v]) * HypergeometricPFQ[{1}, {(3 + v)/2, (3 - v)/2}, -z^2/4] and Anger[v_, z_] := Sin[Pi v] * HypergeometricPFQ[{1}, {1 + v/2, 1 - v/2}, -z^2/4]/(Pi v) + z/(Pi (1 - v^2)) Sin[Pi v] * HypergeometricPFQ[{1}, {(3 + v)/2, (3 - v)/2}, -z^2/4] -------------------------------------------------------------------- Integrate[BesselY[v, b x] x^(1 - v) (x^2 + a^2)^m, {x, 0, Infinity}] for b < 0, Re[a] > 0 Gradshteyn/Ryzhik 6.565(6): 2^m a^(m - v+1) b^(-1 - m) (Cos[Pi v] Gamma[m + 1] Gamma[v] * BesselI[v - m-1, a b]/Pi - 2 Csc[Pi v] Gamma[-m]^(-1) BesselK[v - m-1, a b]) - a^(2 m + 2) Cot[Pi v] b^v HypergeometricPFQ[{1}, {v + 1, m + 2}, a^2 b^2/4] / (2^(v + 1) (m + 1) Gamma[v + 1]) -------------------------------------------------------------------- Integrate[BesselY[v, 2/x] Exp[-a x] x^(-1), {x, 0, Infinity}] Gradshteyn/Ryzhik 6.642 (1): BesselY[v, Sqrt[a]] BesselK[v, Sqrt[a]] -------------------------------------------------------------------- Integrate[BesselJ[-1/8 - v, a^2 x^2] BesselJ[-1/8 + v, a^2 x^2] Cos[b x] x^(1/2), {x, 0, Infinity}] for a real, b > 0 Gradshteyn/Ryzhik 6.722(2): Sqrt[2/Pi] b^(-3/2) * (Exp[-Pi I /8] WhittakerW[v, -1/8, b^2 Exp[-Pi I/2]/(8 a^2)] * WhittakerW[-v, -1/8, b^2 Exp[-Pi I/2]/(8 a^2)] + Exp[Pi I/8] WhittakerW[v, -1/8, b^2 Exp[Pi I/2]/(8 a^2)] * WhittakerW[-v, -1/8, b^2 Exp[Pi I/2]/(8 a^2)]) -------------------------------------------------------------------- -------------------------------------------------------------------- Mathematica's Integrate does not succeed with the following integral as of Version 2.2, but NIntegrate can be used to verify that the Gradshteyn/Ryzhik result is incorrect. -------------------------------------------------------------------- Integrate[BesselY[2 v, a x^(1/2)] BesselJ[v, b x], {x, 0, Infinity}] Gradshteyn/Ryzhik 6.516(4): Sec[Pi v] (1/2 Cos[Pi v] BesselY[v, a^2/(4 b)] - BesselY[-v, a^2/(4 b)] + StruveH[-v, a^2/(4 b)])/(2 b) (The function StruveH is defined in the standard package ProgrammingExamples`Struve`.) Correct result: Sec[Pi v] (2 Cos[Pi v] BesselY[v, a^2/(4 b)] - BesselY[-v, a^2/(4 b)] + StruveH[-v, a^2/(4 b)])/(2 b) -------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------