Integrand size = 7, antiderivative size = 84 \[ \int d^x x \sin (x) \, dx=\frac {2 d^x \cos (x) \log (d)}{\left (1+\log ^2(d)\right )^2}-\frac {d^x x \cos (x)}{1+\log ^2(d)}+\frac {d^x \sin (x)}{\left (1+\log ^2(d)\right )^2}-\frac {d^x \log ^2(d) \sin (x)}{\left (1+\log ^2(d)\right )^2}+\frac {d^x x \log (d) \sin (x)}{1+\log ^2(d)} \]
2*d^x*cos(x)*ln(d)/(1+ln(d)^2)^2-d^x*x*cos(x)/(1+ln(d)^2)+d^x*sin(x)/(1+ln (d)^2)^2-d^x*ln(d)^2*sin(x)/(1+ln(d)^2)^2+d^x*x*ln(d)*sin(x)/(1+ln(d)^2)
Time = 0.04 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.60 \[ \int d^x x \sin (x) \, dx=\frac {d^x \left (-\cos (x) \left (x-2 \log (d)+x \log ^2(d)\right )+\left (1+x \log (d)-\log ^2(d)+x \log ^3(d)\right ) \sin (x)\right )}{\left (1+\log ^2(d)\right )^2} \]
(d^x*(-(Cos[x]*(x - 2*Log[d] + x*Log[d]^2)) + (1 + x*Log[d] - Log[d]^2 + x *Log[d]^3)*Sin[x]))/(1 + Log[d]^2)^2
Time = 0.23 (sec) , antiderivative size = 84, 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 = {4968, 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 \sin (x) \, dx\) |
\(\Big \downarrow \) 4968 |
\(\displaystyle -\int \left (\frac {d^x \log (d) \sin (x)}{\log ^2(d)+1}-\frac {d^x \cos (x)}{\log ^2(d)+1}\right )dx+\frac {x d^x \log (d) \sin (x)}{\log ^2(d)+1}-\frac {x d^x \cos (x)}{\log ^2(d)+1}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x d^x \log (d) \sin (x)}{\log ^2(d)+1}-\frac {d^x \log ^2(d) \sin (x)}{\left (\log ^2(d)+1\right )^2}+\frac {d^x \sin (x)}{\left (\log ^2(d)+1\right )^2}-\frac {x d^x \cos (x)}{\log ^2(d)+1}+\frac {2 d^x \log (d) \cos (x)}{\left (\log ^2(d)+1\right )^2}\) |
(2*d^x*Cos[x]*Log[d])/(1 + Log[d]^2)^2 - (d^x*x*Cos[x])/(1 + Log[d]^2) + ( d^x*Sin[x])/(1 + Log[d]^2)^2 - (d^x*Log[d]^2*Sin[x])/(1 + Log[d]^2)^2 + (d ^x*x*Log[d]*Sin[x])/(1 + Log[d]^2)
3.2.36.3.1 Defintions of rubi rules used
Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*((f_.)*(x_))^(m_.)*Sin[(d_.) + (e_.)* (x_)]^(n_.), x_Symbol] :> Module[{u = IntHide[F^(c*(a + b*x))*Sin[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.19 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.67
method | result | size |
parallelrisch | \(\frac {d^{x} \left (\ln \left (d \right )^{3} x \sin \left (x \right )+\left (-x \cos \left (x \right )-\sin \left (x \right )\right ) \ln \left (d \right )^{2}+\left (x \sin \left (x \right )+2 \cos \left (x \right )\right ) \ln \left (d \right )-x \cos \left (x \right )+\sin \left (x \right )\right )}{\left (1+\ln \left (d \right )^{2}\right )^{2}}\) | \(56\) |
risch | \(-\frac {i \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 {i \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}}\) | \(58\) |
norman | \(\frac {\frac {x \,{\mathrm e}^{x \ln \left (d \right )} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{1+\ln \left (d \right )^{2}}+\frac {2 \ln \left (d \right ) {\mathrm e}^{x \ln \left (d \right )}}{\left (1+\ln \left (d \right )^{2}\right )^{2}}-\frac {x \,{\mathrm e}^{x \ln \left (d \right )}}{1+\ln \left (d \right )^{2}}-\frac {2 \ln \left (d \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 {2 \left (\ln \left (d \right )^{2}-1\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 \ln \left (d \right ) x \,{\mathrm e}^{x \ln \left (d \right )} \tan \left (\frac {x}{2}\right )}{1+\ln \left (d \right )^{2}}}{1+\tan ^{2}\left (\frac {x}{2}\right )}\) | \(137\) |
d^x*(ln(d)^3*x*sin(x)+(-x*cos(x)-sin(x))*ln(d)^2+(x*sin(x)+2*cos(x))*ln(d) -x*cos(x)+sin(x))/(1+ln(d)^2)^2
Time = 0.25 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.71 \[ \int d^x x \sin (x) \, dx=-\frac {{\left (x \cos \left (x\right ) \log \left (d\right )^{2} + x \cos \left (x\right ) - 2 \, \cos \left (x\right ) \log \left (d\right ) - {\left (x \log \left (d\right )^{3} + x \log \left (d\right ) - \log \left (d\right )^{2} + 1\right )} \sin \left (x\right )\right )} d^{x}}{\log \left (d\right )^{4} + 2 \, \log \left (d\right )^{2} + 1} \]
-(x*cos(x)*log(d)^2 + x*cos(x) - 2*cos(x)*log(d) - (x*log(d)^3 + x*log(d) - log(d)^2 + 1)*sin(x))*d^x/(log(d)^4 + 2*log(d)^2 + 1)
Result contains complex when optimal does not.
Time = 0.56 (sec) , antiderivative size = 308, normalized size of antiderivative = 3.67 \[ \int d^x x \sin (x) \, dx=\begin {cases} \frac {x^{2} e^{- i x} \sin {\left (x \right )}}{4} - \frac {i x^{2} e^{- i x} \cos {\left (x \right )}}{4} + \frac {i x e^{- i x} \sin {\left (x \right )}}{4} - \frac {x e^{- i x} \cos {\left (x \right )}}{4} + \frac {i e^{- i x} \cos {\left (x \right )}}{4} & \text {for}\: d = e^{- i} \\\frac {x^{2} e^{i x} \sin {\left (x \right )}}{4} + \frac {i x^{2} e^{i x} \cos {\left (x \right )}}{4} - \frac {i x e^{i x} \sin {\left (x \right )}}{4} - \frac {x e^{i x} \cos {\left (x \right )}}{4} - \frac {i e^{i x} \cos {\left (x \right )}}{4} & \text {for}\: d = e^{i} \\\frac {d^{x} x \log {\left (d \right )}^{3} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} - \frac {d^{x} x \log {\left (d \right )}^{2} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} x \log {\left (d \right )} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} - \frac {d^{x} x \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} - \frac {d^{x} \log {\left (d \right )}^{2} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {2 d^{x} \log {\left (d \right )} \cos {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} + \frac {d^{x} \sin {\left (x \right )}}{\log {\left (d \right )}^{4} + 2 \log {\left (d \right )}^{2} + 1} & \text {otherwise} \end {cases} \]
Piecewise((x**2*exp(-I*x)*sin(x)/4 - I*x**2*exp(-I*x)*cos(x)/4 + I*x*exp(- I*x)*sin(x)/4 - x*exp(-I*x)*cos(x)/4 + I*exp(-I*x)*cos(x)/4, Eq(d, exp(-I) )), (x**2*exp(I*x)*sin(x)/4 + I*x**2*exp(I*x)*cos(x)/4 - I*x*exp(I*x)*sin( x)/4 - x*exp(I*x)*cos(x)/4 - I*exp(I*x)*cos(x)/4, Eq(d, exp(I))), (d**x*x* log(d)**3*sin(x)/(log(d)**4 + 2*log(d)**2 + 1) - d**x*x*log(d)**2*cos(x)/( log(d)**4 + 2*log(d)**2 + 1) + d**x*x*log(d)*sin(x)/(log(d)**4 + 2*log(d)* *2 + 1) - d**x*x*cos(x)/(log(d)**4 + 2*log(d)**2 + 1) - d**x*log(d)**2*sin (x)/(log(d)**4 + 2*log(d)**2 + 1) + 2*d**x*log(d)*cos(x)/(log(d)**4 + 2*lo g(d)**2 + 1) + d**x*sin(x)/(log(d)**4 + 2*log(d)**2 + 1), True))
Time = 0.20 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.71 \[ \int d^x x \sin (x) \, dx=-\frac {{\left ({\left (\log \left (d\right )^{2} + 1\right )} x - 2 \, \log \left (d\right )\right )} d^{x} \cos \left (x\right ) - {\left ({\left (\log \left (d\right )^{3} + \log \left (d\right )\right )} x - \log \left (d\right )^{2} + 1\right )} d^{x} \sin \left (x\right )}{\log \left (d\right )^{4} + 2 \, \log \left (d\right )^{2} + 1} \]
-(((log(d)^2 + 1)*x - 2*log(d))*d^x*cos(x) - ((log(d)^3 + log(d))*x - log( d)^2 + 1)*d^x*sin(x))/(log(d)^4 + 2*log(d)^2 + 1)
Result contains complex when optimal does not.
Time = 0.32 (sec) , antiderivative size = 1156, normalized size of antiderivative = 13.76 \[ \int d^x x \sin (x) \, dx=\text {Too large to display} \]
1/2*(((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*p i*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(abs(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(abs(d)) + 2*log(abs(d)))^2))*cos (1/2*pi*x*sgn(d) - 1/2*pi*x + x) + 2*((pi*x*sgn(d) - pi*x + 2*x)*(pi*log(a bs(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*l og(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(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 - 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(abs(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(abs(d)) - 2*log(abs(d)))^2))*co s(1/2*pi*x*sgn(d) - 1/2*pi*x - x) - 2*((pi*x*sgn(d) - pi*x - 2*x)*(pi*l...
Time = 0.28 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.68 \[ \int d^x x \sin (x) \, dx=\frac {d^x\,\left (\sin \left (x\right )+2\,\ln \left (d\right )\,\cos \left (x\right )-{\ln \left (d\right )}^2\,\sin \left (x\right )-x\,\cos \left (x\right )+x\,\ln \left (d\right )\,\sin \left (x\right )-x\,{\ln \left (d\right )}^2\,\cos \left (x\right )+x\,{\ln \left (d\right )}^3\,\sin \left (x\right )\right )}{{\left ({\ln \left (d\right )}^2+1\right )}^2} \]
(d^x*(sin(x) + 2*log(d)*cos(x) - log(d)^2*sin(x) - x*cos(x) + x*log(d)*sin (x) - x*log(d)^2*cos(x) + x*log(d)^3*sin(x)))/(log(d)^2 + 1)^2
Time = 0.00 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.75 \[ \int d^x x \sin (x) \, dx=\frac {d^{x} \left (-\cos \left (x \right ) \mathrm {log}\left (d \right )^{2} x +2 \cos \left (x \right ) \mathrm {log}\left (d \right )-\cos \left (x \right ) x +\mathrm {log}\left (d \right )^{3} \sin \left (x \right ) x -\mathrm {log}\left (d \right )^{2} \sin \left (x \right )+\mathrm {log}\left (d \right ) \sin \left (x \right ) x +\sin \left (x \right )\right )}{\mathrm {log}\left (d \right )^{4}+2 \mathrm {log}\left (d \right )^{2}+1} \]