Integrand size = 7, antiderivative size = 83 \[ \int d^x x \cos (x) \, dx=\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)} \] Output:
d^x*cos(x)/(1+ln(d)^2)^2-d^x*cos(x)*ln(d)^2/(1+ln(d)^2)^2+d^x*x*cos(x)*ln( d)/(1+ln(d)^2)-2*d^x*ln(d)*sin(x)/(1+ln(d)^2)^2+d^x*x*sin(x)/(1+ln(d)^2)
Time = 0.03 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.59 \[ \int d^x x \cos (x) \, dx=\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} \] Input:
Integrate[d^x*x*Cos[x],x]
Output:
(d^x*(Cos[x]*(1 + x*Log[d] - Log[d]^2 + x*Log[d]^3) + (x - 2*Log[d] + x*Lo g[d]^2)*Sin[x]))/(1 + Log[d]^2)^2
Time = 0.22 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4969, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int x d^x \cos (x) \, dx\) |
\(\Big \downarrow \) 4969 |
\(\displaystyle -\int \left (\frac {\sin (x) d^x}{\log ^2(d)+1}+\frac {\cos (x) \log (d) d^x}{\log ^2(d)+1}\right )dx+\frac {x d^x \sin (x)}{\log ^2(d)+1}+\frac {x d^x \log (d) \cos (x)}{\log ^2(d)+1}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \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}\) |
Input:
Int[d^x*x*Cos[x],x]
Output:
(d^x*Cos[x])/(1 + Log[d]^2)^2 - (d^x*Cos[x]*Log[d]^2)/(1 + Log[d]^2)^2 + ( d^x*x*Cos[x]*Log[d])/(1 + Log[d]^2) - (2*d^x*Log[d]*Sin[x])/(1 + Log[d]^2) ^2 + (d^x*x*Sin[x])/(1 + Log[d]^2)
Int[Cos[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_)))*((f_.)* (x_))^(m_.), x_Symbol] :> Module[{u = IntHide[F^(c*(a + b*x))*Cos[d + e*x]^ n, x]}, Simp[(f*x)^m u, x] - Simp[f*m Int[(f*x)^(m - 1)*u, x], x]] /; F reeQ[{F, a, b, c, d, e, f}, x] && IGtQ[n, 0] && GtQ[m, 0]
Time = 0.23 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.65
method | result | size |
parallelrisch | \(\frac {d^{x} \left (\ln \left (d \right )^{3} x \cos \left (x \right )+\left (x \sin \left (x \right )-\cos \left (x \right )\right ) \ln \left (d \right )^{2}+\left (x \cos \left (x \right )-2 \sin \left (x \right )\right ) \ln \left (d \right )+x \sin \left (x \right )+\cos \left (x \right )\right )}{\left (1+\ln \left (d \right )^{2}\right )^{2}}\) | \(54\) |
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\) |
orering | \(\frac {2 \left (\ln \left (d \right )^{3} x^{2}-\ln \left (d \right )^{2} x +\ln \left (d \right ) x^{2}-\ln \left (d \right )+x \right ) d^{x} \cos \left (x \right )}{\left (1+\ln \left (d \right )^{2}\right )^{2} x}-\frac {\left (\ln \left (d \right )^{2} x +x -2 \ln \left (d \right )\right ) \left (d^{x} \ln \left (d \right ) x \cos \left (x \right )+d^{x} \cos \left (x \right )-d^{x} x \sin \left (x \right )\right )}{\left (1+\ln \left (d \right )^{2}\right )^{2} x}\) | \(96\) |
norman | \(\frac {\frac {\left (\ln \left (d \right )^{2}-1\right ) {\mathrm e}^{x \ln \left (d \right )} \tan \left (\frac {x}{2}\right )^{2}}{\left (1+\ln \left (d \right )^{2}\right )^{2}}+\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 (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 )} \tan \left (\frac {x}{2}\right )^{2}}{1+\ln \left (d \right )^{2}}}{1+\tan \left (\frac {x}{2}\right )^{2}}\) | \(142\) |
Input:
int(d^x*x*cos(x),x,method=_RETURNVERBOSE)
Output:
d^x*(ln(d)^3*x*cos(x)+(x*sin(x)-cos(x))*ln(d)^2+(x*cos(x)-2*sin(x))*ln(d)+ x*sin(x)+cos(x))/(1+ln(d)^2)^2
Time = 0.08 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.70 \[ \int d^x x \cos (x) \, dx=\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} \] Input:
integrate(d^x*x*cos(x),x, algorithm="fricas")
Output:
(x*cos(x)*log(d)^3 + x*cos(x)*log(d) - cos(x)*log(d)^2 + (x*log(d)^2 + x - 2*log(d))*sin(x) + cos(x))*d^x/(log(d)^4 + 2*log(d)^2 + 1)
Result contains complex when optimal does not.
Time = 0.41 (sec) , antiderivative size = 304, normalized size of antiderivative = 3.66 \[ \int d^x x \cos (x) \, dx=\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 {e^{- i x} \cos {\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 {e^{i x} \cos {\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} \] Input:
integrate(d**x*x*cos(x),x)
Output:
Piecewise((I*x**2*exp(-I*x)*sin(x)/4 + x**2*exp(-I*x)*cos(x)/4 + x*exp(-I* x)*sin(x)/4 + I*x*exp(-I*x)*cos(x)/4 + exp(-I*x)*cos(x)/4, Eq(d, exp(-I))) , (-I*x**2*exp(I*x)*sin(x)/4 + x**2*exp(I*x)*cos(x)/4 + x*exp(I*x)*sin(x)/ 4 - I*x*exp(I*x)*cos(x)/4 + exp(I*x)*cos(x)/4, Eq(d, exp(I))), (d**x*x*log (d)**3*cos(x)/(log(d)**4 + 2*log(d)**2 + 1) + d**x*x*log(d)**2*sin(x)/(log (d)**4 + 2*log(d)**2 + 1) + d**x*x*log(d)*cos(x)/(log(d)**4 + 2*log(d)**2 + 1) + d**x*x*sin(x)/(log(d)**4 + 2*log(d)**2 + 1) - d**x*log(d)**2*cos(x) /(log(d)**4 + 2*log(d)**2 + 1) - 2*d**x*log(d)*sin(x)/(log(d)**4 + 2*log(d )**2 + 1) + d**x*cos(x)/(log(d)**4 + 2*log(d)**2 + 1), True))
Time = 0.04 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.70 \[ \int d^x x \cos (x) \, dx=\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} \] Input:
integrate(d^x*x*cos(x),x, algorithm="maxima")
Output:
(((log(d)^3 + log(d))*x - log(d)^2 + 1)*d^x*cos(x) + ((log(d)^2 + 1)*x - 2 *log(d))*d^x*sin(x))/(log(d)^4 + 2*log(d)^2 + 1)
Result contains complex when optimal does not.
Time = 0.14 (sec) , antiderivative size = 1155, normalized size of antiderivative = 13.92 \[ \int d^x x \cos (x) \, dx=\text {Too large to display} \] Input:
integrate(d^x*x*cos(x),x, algorithm="giac")
Output:
1/2*(2*((pi*x*sgn(d) - pi*x + 2*x)*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) + 2*log(abs(d)))/((2*pi + pi^2*sgn(d) - pi^2 + 2*log(abs(d))^2 - 2*pi*sgn (d) - 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) + 2*log(abs(d)))^2) + (2*pi + pi^2*sgn(d) - pi^2 + 2*log(abs(d))^2 - 2*pi*sgn(d) - 2)*(x*log( abs(d)) - 1)/((2*pi + pi^2*sgn(d) - pi^2 + 2*log(abs(d))^2 - 2*pi*sgn(d) - 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) + 2*log(abs(d)))^2))*cos (1/2*pi*x*sgn(d) - 1/2*pi*x + x) - ((2*pi + pi^2*sgn(d) - pi^2 + 2*log(abs (d))^2 - 2*pi*sgn(d) - 2)*(pi*x*sgn(d) - pi*x + 2*x)/((2*pi + pi^2*sgn(d) - pi^2 + 2*log(abs(d))^2 - 2*pi*sgn(d) - 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) + 2*log(abs(d)))^2) - 4*(pi*log(abs(d))*sgn(d) - pi*log(ab s(d)) + 2*log(abs(d)))*(x*log(abs(d)) - 1)/((2*pi + pi^2*sgn(d) - pi^2 + 2 *log(abs(d))^2 - 2*pi*sgn(d) - 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(ab s(d)) + 2*log(abs(d)))^2))*sin(1/2*pi*x*sgn(d) - 1/2*pi*x + x))*abs(d)^x + 1/2*(2*((pi*x*sgn(d) - pi*x - 2*x)*(pi*log(abs(d))*sgn(d) - pi*log(abs(d) ) - 2*log(abs(d)))/((2*pi - pi^2*sgn(d) + pi^2 - 2*log(abs(d))^2 - 2*pi*sg n(d) + 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) - 2*log(abs(d)))^2 ) - (2*pi - pi^2*sgn(d) + pi^2 - 2*log(abs(d))^2 - 2*pi*sgn(d) + 2)*(x*log (abs(d)) - 1)/((2*pi - pi^2*sgn(d) + pi^2 - 2*log(abs(d))^2 - 2*pi*sgn(d) + 2)^2 + 4*(pi*log(abs(d))*sgn(d) - pi*log(abs(d)) - 2*log(abs(d)))^2))*co s(1/2*pi*x*sgn(d) - 1/2*pi*x - x) + ((2*pi - pi^2*sgn(d) + pi^2 - 2*log...
Time = 0.13 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.66 \[ \int d^x x \cos (x) \, dx=\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} \] Input:
int(d^x*x*cos(x),x)
Output:
(d^x*(cos(x) - 2*log(d)*sin(x) - log(d)^2*cos(x) + x*sin(x) + x*log(d)*cos (x) + x*log(d)^3*cos(x) + x*log(d)^2*sin(x)))/(log(d)^2 + 1)^2
Time = 0.15 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.73 \[ \int d^x x \cos (x) \, dx=\frac {d^{x} \left (\cos \left (x \right ) \mathrm {log}\left (d \right )^{3} x -\cos \left (x \right ) \mathrm {log}\left (d \right )^{2}+\cos \left (x \right ) \mathrm {log}\left (d \right ) x +\cos \left (x \right )+\mathrm {log}\left (d \right )^{2} \sin \left (x \right ) x -2 \,\mathrm {log}\left (d \right ) \sin \left (x \right )+\sin \left (x \right ) x \right )}{\mathrm {log}\left (d \right )^{4}+2 \mathrm {log}\left (d \right )^{2}+1} \] Input:
int(d^x*x*cos(x),x)
Output:
(d**x*(cos(x)*log(d)**3*x - cos(x)*log(d)**2 + cos(x)*log(d)*x + cos(x) + log(d)**2*sin(x)*x - 2*log(d)*sin(x) + sin(x)*x))/(log(d)**4 + 2*log(d)**2 + 1)