%I #28 Jul 17 2021 23:40:42
%S -1,-8,1,-90,18,-2,-1344,336,-64,6,-25200,7200,-1800,300,-24,-570240,
%T 178200,-52800,11880,-1728,120,-15135120,5045040,-1681680,458640,
%U -91728,11760,-720,-461260800,161441280,-58705920,18345600,-4515840,806400,-92160,5040,-15878903040,5774146560,-2245501440,777288960,-222082560,49351680,-7931520,816480,-40320
%N Triangle used for the integral of even powers of the sine and cosine functions.
%C This entry originated from a proposal by _Ozgur Cem Birler_ for the integral of the fourth power of sin(x). _Peter Bala_ suggested the use of this triangle to cover all even powers.
%C The signed triangle T(n, k) appears in the formula
%C 2^(2*n)*n!*int(sin^{2*n}x dx) = (2*n)!/n!*x + Sum {k = 1..n} T(n, k)*sin(2*k*x), n >= 1.
%C See the Gradstein - Ryshik reference, 2.513 1., p. 168, (after changing the summation variable k -> n - k).
%C The unsigned triangle T(n, k) appears in the formula 2^(2*n)*n!*int(cos^{2*n}x dx) = (2*n)!/n!*x + Sum {k = 1..n} |T(n, k)|*sin(2*k*x), n >= 1.
%C See the Gradstein - Ryshik reference, 2.513 3., p. 168.
%C For the integral of odd powers of sine and cosine see A254932.
%C Let f_n(x) := Sum_{k=1..n} -T(n, k) * sin(k*x). Then f_n(x) = x + O(x^(2*n+1)). - _Michael Somos_, Jun 07 2019
%D I. S. Gradstein and I. M. Ryshik, Tables of series, products, and integrals, Volume 1, Verlag Harri Deutsch, 1981.
%H Wolfdieter Lang, <a href="/A254933/a254933.pdf">The first ten rows.</a>
%F T(n, k) = (-1)^k*n!/k*binomial(2*n,n - k), 1 <= k <= n.
%e The triangle T(n, k) begins:
%e n\k 1 2 3 4 5 6 ...
%e 1: -1
%e 2: -8 1
%e 3: -90 18 -2
%e 4: -1344 336 -64 6
%e 5: -25200 7200 -1800 300 -24
%e 6: -570240 178200 -52800 11880 -1728 120
%e ...
%e For more rows see the link.
%e n=3: 2^6*3!*int((sin x)^6 dx) = 120*x - 90*sin(2*x) + 18*sin(4*x) - 2*sin(*x),
%e that is: int((sin x)^6 dx) = (5/16)*x -(15/64)*sin(2*x) + (3/64)*sin(4*x) - (1/192)*sin(6*x).
%e 2^6*3!*int((cos x)^6 dx) = 120*x + 90*sin(2*x) + 18*sin(4*x) + 2*sin(6*x),
%e that is: int((cos x)^6 dx) = (5/16)*x + (15/64)*sin(2*x) + (3/64)*sin(4*x) + (1/192)*sin(6*x).
%e As defined in my comment: f_1(x) = sin(x) = x - x^3/6 + O(x^5), f_2(x) = (8*sin(x) - sin(2x)/6 = x - x^5/30 + O(x^7), f_3(x) = (90*sin(x) - 18*sin(2x) + 2*sin(3))/60 = x - x^7/140 + O(x^9). - _Michael Somos_, Jun 07 2019
%t T[n_, k_] := (-1)^k*n!/k*Binomial[2*n, n-k]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Feb 18 2015 *)
%o (PARI) {T(n, k) = if( n<1 || n>k, 0, (-1)^k*n!/k*binomial(2*n, n-k))}; /* _Michael Somos_, Jun 07 2019 */
%Y Cf. A254932 (odd powers).
%K sign,tabl,easy
%O 1,2
%A _Wolfdieter Lang_, Feb 16 2015