Optimal. Leaf size=83 \[ \frac {d^x \cos (x)}{\left (1+\log ^2(d)\right )^2}-\frac {d^x \cos (x) \log ^2(d)}{\left (1+\log ^2(d)\right )^2}+\frac {d^x x \cos (x) \log (d)}{1+\log ^2(d)}-\frac {2 d^x \log (d) \sin (x)}{\left (1+\log ^2(d)\right )^2}+\frac {d^x x \sin (x)}{1+\log ^2(d)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {4518, 4554,
4517} \begin {gather*} \frac {x d^x \sin (x)}{\log ^2(d)+1}-\frac {2 d^x \log (d) \sin (x)}{\left (\log ^2(d)+1\right )^2}+\frac {x d^x \log (d) \cos (x)}{\log ^2(d)+1}-\frac {d^x \log ^2(d) \cos (x)}{\left (\log ^2(d)+1\right )^2}+\frac {d^x \cos (x)}{\left (\log ^2(d)+1\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 4517
Rule 4518
Rule 4554
Rubi steps
\begin {align*} \int d^x x \cos (x) \, dx &=\frac {d^x x \cos (x) \log (d)}{1+\log ^2(d)}+\frac {d^x x \sin (x)}{1+\log ^2(d)}-\int \left (\frac {d^x \cos (x) \log (d)}{1+\log ^2(d)}+\frac {d^x \sin (x)}{1+\log ^2(d)}\right ) \, dx\\ &=\frac {d^x x \cos (x) \log (d)}{1+\log ^2(d)}+\frac {d^x x \sin (x)}{1+\log ^2(d)}-\frac {\int d^x \sin (x) \, dx}{1+\log ^2(d)}-\frac {\log (d) \int d^x \cos (x) \, dx}{1+\log ^2(d)}\\ &=\frac {d^x \cos (x)}{\left (1+\log ^2(d)\right )^2}-\frac {d^x \cos (x) \log ^2(d)}{\left (1+\log ^2(d)\right )^2}+\frac {d^x x \cos (x) \log (d)}{1+\log ^2(d)}-\frac {2 d^x \log (d) \sin (x)}{\left (1+\log ^2(d)\right )^2}+\frac {d^x x \sin (x)}{1+\log ^2(d)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 49, normalized size = 0.59 \begin {gather*} \frac {d^x \left (\cos (x) \left (1+x \log (d)-\log ^2(d)+x \log ^3(d)\right )+\left (x-2 \log (d)+x \log ^2(d)\right ) \sin (x)\right )}{\left (1+\log ^2(d)\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains complex when optimal does not.
time = 0.04, size = 56, normalized size = 0.67
method | result | size |
risch | \(\frac {\left (-1+x \ln \left (d \right )+i x \right ) d^{x} {\mathrm e}^{i x}}{2 \left (\ln \left (d \right )+i\right )^{2}}+\frac {\left (-1+x \ln \left (d \right )-i x \right ) d^{x} {\mathrm e}^{-i x}}{2 \left (\ln \left (d \right )-i\right )^{2}}\) | \(56\) |
norman | \(\frac {\frac {\ln \left (d \right ) x \,{\mathrm e}^{x \ln \left (d \right )}}{1+\ln \left (d \right )^{2}}+\frac {\left (\ln \left (d \right )^{2}-1\right ) {\mathrm e}^{x \ln \left (d \right )} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{\left (1+\ln \left (d \right )^{2}\right )^{2}}-\frac {\left (\ln \left (d \right )^{2}-1\right ) {\mathrm e}^{x \ln \left (d \right )}}{\left (1+\ln \left (d \right )^{2}\right )^{2}}-\frac {4 \ln \left (d \right ) {\mathrm e}^{x \ln \left (d \right )} \tan \left (\frac {x}{2}\right )}{\left (1+\ln \left (d \right )^{2}\right )^{2}}+\frac {2 x \,{\mathrm e}^{x \ln \left (d \right )} \tan \left (\frac {x}{2}\right )}{1+\ln \left (d \right )^{2}}-\frac {\ln \left (d \right ) x \,{\mathrm e}^{x \ln \left (d \right )} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{1+\ln \left (d \right )^{2}}}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) | \(142\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.47, size = 58, normalized size = 0.70 \begin {gather*} \frac {{\left ({\left (\log \left (d\right )^{3} + \log \left (d\right )\right )} x - \log \left (d\right )^{2} + 1\right )} d^{x} \cos \left (x\right ) + {\left ({\left (\log \left (d\right )^{2} + 1\right )} x - 2 \, \log \left (d\right )\right )} d^{x} \sin \left (x\right )}{\log \left (d\right )^{4} + 2 \, \log \left (d\right )^{2} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.59, size = 58, normalized size = 0.70 \begin {gather*} \frac {{\left (x \cos \left (x\right ) \log \left (d\right )^{3} + x \cos \left (x\right ) \log \left (d\right ) - \cos \left (x\right ) \log \left (d\right )^{2} + {\left (x \log \left (d\right )^{2} + x - 2 \, \log \left (d\right )\right )} \sin \left (x\right ) + \cos \left (x\right )\right )} d^{x}}{\log \left (d\right )^{4} + 2 \, \log \left (d\right )^{2} + 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 0.48, size = 308, normalized size = 3.71 \begin {gather*} \begin {cases} \frac {i x^{2} e^{- i x} \sin {\left (x \right )}}{4} + \frac {x^{2} e^{- i x} \cos {\left (x \right )}}{4} + \frac {x e^{- i x} \sin {\left (x \right )}}{4} + \frac {i x e^{- i x} \cos {\left (x \right )}}{4} - \frac {i e^{- i x} \sin {\left (x \right )}}{4} & \text {for}\: d = e^{- i} \\- \frac {i x^{2} e^{i x} \sin {\left (x \right )}}{4} + \frac {x^{2} e^{i x} \cos {\left (x \right )}}{4} + \frac {x e^{i x} \sin {\left (x \right )}}{4} - \frac {i x e^{i x} \cos {\left (x \right )}}{4} + \frac {i e^{i x} \sin {\left (x \right )}}{4} & \text {for}\: d = e^{i} \\\frac {d^{x} x \log {\left (d \right )}^{3} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} x \log {\left (d \right )}^{2} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} x \log {\left (d \right )} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} x \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} - \frac {d^{x} \log {\left (d \right )}^{2} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} - \frac {2 d^{x} \log {\left (d \right )} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] Result contains complex when optimal does not.
time = 1.39, size = 1155, normalized size = 13.92 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.21, size = 55, normalized size = 0.66 \begin {gather*} \frac {d^x\,\left (\cos \left (x\right )-2\,\ln \left (d\right )\,\sin \left (x\right )-{\ln \left (d\right )}^2\,\cos \left (x\right )+x\,\sin \left (x\right )+x\,\ln \left (d\right )\,\cos \left (x\right )+x\,{\ln \left (d\right )}^3\,\cos \left (x\right )+x\,{\ln \left (d\right )}^2\,\sin \left (x\right )\right )}{{\left ({\ln \left (d\right )}^2+1\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________