Optimal. Leaf size=11 \[ -\frac {2}{39} \log \left (\cos \left (\frac {39 x}{2}\right )\right ) \]
[Out]
________________________________________________________________________________________
Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(264\) vs. \(2(11)=22\).
time = 2.75, antiderivative size = 264, normalized size of antiderivative = 24.00, number of steps
used = 14, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {4486, 2099,
1601, 12, 2125} \begin {gather*} -\frac {1}{780} \log \left (-64 \cos ^6(x)+32 \cos ^5(x)+80 \cos ^4(x)-32 \cos ^3(x)-24 \cos ^2(x)+6 \cos (x)+1\right )-\frac {1}{780} \log (1-2 \cos (x))+\frac {19}{780} \log (\cos (x)+1)-\frac {1}{780} \log \left (4096 \cos ^{12}(x)+2048 \cos ^{11}(x)-12288 \cos ^{10}(x)-6144 \cos ^9(x)+13568 \cos ^8(x)+6784 \cos ^7(x)-6592 \cos ^6(x)-3296 \cos ^5(x)+1264 \cos ^4(x)+632 \cos ^3(x)-48 \cos ^2(x)-24 \cos (x)+1\right )-\frac {1}{20} \log \left (524288 \cos ^{20}(x)+262144 \cos ^{19}(x)-2621440 \cos ^{18}(x)-1245184 \cos ^{17}(x)+5570560 \cos ^{16}(x)+2490368 \cos ^{15}(x)-6553600 \cos ^{14}(x)-2723840 \cos ^{13}(x)+4659200 \cos ^{12}(x)+1770496 \cos ^{11}(x)-2050048 \cos ^{10}(x)-695552 \cos ^9(x)+549120 \cos ^8(x)+160512 \cos ^7(x)-84480 \cos ^6(x)-20064 \cos ^5(x)+6600 \cos ^4(x)+1140 \cos ^3(x)-200 \cos ^2(x)-19 \cos (x)+1\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1601
Rule 2099
Rule 2125
Rule 4486
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=\int \left (\frac {\sin (19 x)}{\cos (19 x)+\cos (20 x)}+\frac {\sin (20 x)}{\cos (19 x)+\cos (20 x)}\right ) \, dx\\ &=\int \frac {\sin (19 x)}{\cos (19 x)+\cos (20 x)} \, dx+\int \frac {\sin (20 x)}{\cos (19 x)+\cos (20 x)} \, dx\\ &=-\text {Subst}\left (\int \frac {4 x \left (-5+330 x^2-6336 x^4+54912 x^6-256256 x^8+698880 x^{10}-1146880 x^{12}+1114112 x^{14}-589824 x^{16}+131072 x^{18}\right )}{1-19 x-200 x^2+1140 x^3+6600 x^4-20064 x^5-84480 x^6+160512 x^7+549120 x^8-695552 x^9-2050048 x^{10}+1770496 x^{11}+4659200 x^{12}-2723840 x^{13}-6553600 x^{14}+2490368 x^{15}+5570560 x^{16}-1245184 x^{17}-2621440 x^{18}+262144 x^{19}+524288 x^{20}} \, dx,x,\cos (x)\right )-\text {Subst}\left (\int \frac {-1+180 x^2-5280 x^4+59136 x^6-329472 x^8+1025024 x^{10}-1863680 x^{12}+1966080 x^{14}-1114112 x^{16}+262144 x^{18}}{1-19 x-200 x^2+1140 x^3+6600 x^4-20064 x^5-84480 x^6+160512 x^7+549120 x^8-695552 x^9-2050048 x^{10}+1770496 x^{11}+4659200 x^{12}-2723840 x^{13}-6553600 x^{14}+2490368 x^{15}+5570560 x^{16}-1245184 x^{17}-2621440 x^{18}+262144 x^{19}+524288 x^{20}} \, dx,x,\cos (x)\right )\\ &=-\left (4 \text {Subst}\left (\int \frac {x \left (-5+330 x^2-6336 x^4+54912 x^6-256256 x^8+698880 x^{10}-1146880 x^{12}+1114112 x^{14}-589824 x^{16}+131072 x^{18}\right )}{1-19 x-200 x^2+1140 x^3+6600 x^4-20064 x^5-84480 x^6+160512 x^7+549120 x^8-695552 x^9-2050048 x^{10}+1770496 x^{11}+4659200 x^{12}-2723840 x^{13}-6553600 x^{14}+2490368 x^{15}+5570560 x^{16}-1245184 x^{17}-2621440 x^{18}+262144 x^{19}+524288 x^{20}} \, dx,x,\cos (x)\right )\right )-\text {Subst}\left (\int \left (-\frac {19}{39 (1+x)}+\frac {2}{39 (-1+2 x)}+\frac {2 \left (-3+24 x+48 x^2-160 x^3-80 x^4+192 x^5\right )}{39 \left (-1-6 x+24 x^2+32 x^3-80 x^4-32 x^5+64 x^6\right )}+\frac {8 \left (-3-12 x+237 x^2+632 x^3-2060 x^4-4944 x^5+5936 x^6+13568 x^7-6912 x^8-15360 x^9+2816 x^{10}+6144 x^{11}\right )}{39 \left (1-24 x-48 x^2+632 x^3+1264 x^4-3296 x^5-6592 x^6+6784 x^7+13568 x^8-6144 x^9-12288 x^{10}+2048 x^{11}+4096 x^{12}\right )}\right ) \, dx,x,\cos (x)\right )\\ &=\text {Rest of rules removed due to large latex content} \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(131\) vs. \(2(11)=22\).
time = 0.14, size = 131, normalized size = 11.91 \begin {gather*} -\frac {2}{39} \log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {2}{39} \log (1-2 \cos (x)+2 \cos (2 x)-2 \cos (3 x)+2 \cos (4 x)-2 \cos (5 x)+2 \cos (6 x)-2 \cos (7 x)+2 \cos (8 x)-2 \cos (9 x)+2 \cos (10 x)-2 \cos (11 x)+2 \cos (12 x)-2 \cos (13 x)+2 \cos (14 x)-2 \cos (15 x)+2 \cos (16 x)-2 \cos (17 x)+2 \cos (18 x)-2 \cos (19 x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.43, size = 16, normalized size = 1.45
method | result | size |
risch | \(i x -\frac {2 \ln \left ({\mathrm e}^{39 i x}+1\right )}{39}\) | \(16\) |
parallelrisch | \(\ln \left (\left (\sec ^{2}\left (10 x \right )\right )^{\frac {1}{39}}\right )+\ln \left (\left (\sec ^{2}\left (\frac {19 x}{2}\right )\right )^{\frac {1}{39}}\right )+\ln \left (\frac {1}{\left (\tan \left (\frac {19 x}{2}\right ) \tan \left (10 x \right )-1\right )^{\frac {2}{39}}}\right )\) | \(34\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 2527 vs.
\(2 (7) = 14\).
time = 0.52, size = 2527, normalized size = 229.73 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs.
\(2 (7) = 14\).
time = 0.87, size = 123, normalized size = 11.18 \begin {gather*} -\frac {1}{39} \, \log \left (137438953472 \, \cos \left (x\right )^{39} - 1340029796352 \, \cos \left (x\right )^{37} + 6030134083584 \, \cos \left (x\right )^{35} - 16610786017280 \, \cos \left (x\right )^{33} + 31323196489728 \, \cos \left (x\right )^{31} - 42839077552128 \, \cos \left (x\right )^{29} + 43920872439808 \, \cos \left (x\right )^{27} - 34411219255296 \, \cos \left (x\right )^{25} + 20813237452800 \, \cos \left (x\right )^{23} - 9751387176960 \, \cos \left (x\right )^{21} + 3530674667520 \, \cos \left (x\right )^{19} - 980106117120 \, \cos \left (x\right )^{17} + 205701283840 \, \cos \left (x\right )^{15} - 31950643200 \, \cos \left (x\right )^{13} + 3560214528 \, \cos \left (x\right )^{11} - 271960832 \, \cos \left (x\right )^{9} + 13302432 \, \cos \left (x\right )^{7} - 373464 \, \cos \left (x\right )^{5} + 4940 \, \cos \left (x\right )^{3} - \frac {39}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 134 vs.
\(2 (7) = 14\).
time = 0.46, size = 134, normalized size = 12.18 \begin {gather*} -\frac {1}{39} \, \log \left (\cos \left (x\right ) + 1\right ) - \frac {2}{39} \, \log \left ({\left | 4096 \, \cos \left (x\right )^{12} + 2048 \, \cos \left (x\right )^{11} - 12288 \, \cos \left (x\right )^{10} - 6144 \, \cos \left (x\right )^{9} + 13568 \, \cos \left (x\right )^{8} + 6784 \, \cos \left (x\right )^{7} - 6592 \, \cos \left (x\right )^{6} - 3296 \, \cos \left (x\right )^{5} + 1264 \, \cos \left (x\right )^{4} + 632 \, \cos \left (x\right )^{3} - 48 \, \cos \left (x\right )^{2} - 24 \, \cos \left (x\right ) + 1 \right |}\right ) - \frac {2}{39} \, \log \left ({\left | 64 \, \cos \left (x\right )^{6} - 32 \, \cos \left (x\right )^{5} - 80 \, \cos \left (x\right )^{4} + 32 \, \cos \left (x\right )^{3} + 24 \, \cos \left (x\right )^{2} - 6 \, \cos \left (x\right ) - 1 \right |}\right ) - \frac {2}{39} \, \log \left ({\left | 2 \, \cos \left (x\right ) - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.43, size = 15, normalized size = 1.36 \begin {gather*} x\,1{}\mathrm {i}-\frac {2\,\ln \left ({\mathrm {e}}^{x\,39{}\mathrm {i}}+1\right )}{39} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 7, normalized size = 0.64 \begin {gather*} -\frac {39 \ln \left (\cos \left (\frac {39 x}{2}\right )\right )}{2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________