Integrand size = 20, antiderivative size = 132 \[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\frac {e^{a+b x}}{b d}+\frac {\sqrt {-c} e^{a+\frac {b \sqrt {-c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (-\frac {b \left (\sqrt {-c}-\sqrt {d} x\right )}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {\sqrt {-c} e^{a-\frac {b \sqrt {-c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (\frac {b \left (\sqrt {-c}+\sqrt {d} x\right )}{\sqrt {d}}\right )}{2 d^{3/2}} \]
exp(b*x+a)/b/d+1/2*exp(a+b*(-c)^(1/2)/d^(1/2))*Ei(-b*((-c)^(1/2)-x*d^(1/2) )/d^(1/2))*(-c)^(1/2)/d^(3/2)-1/2*exp(a-b*(-c)^(1/2)/d^(1/2))*Ei(b*((-c)^( 1/2)+x*d^(1/2))/d^(1/2))*(-c)^(1/2)/d^(3/2)
Result contains complex when optimal does not.
Time = 0.14 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.91 \[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\frac {e^a \left (2 \sqrt {d} e^{b x}+i b \sqrt {c} e^{\frac {i b \sqrt {c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (b \left (-\frac {i \sqrt {c}}{\sqrt {d}}+x\right )\right )-i b \sqrt {c} e^{-\frac {i b \sqrt {c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (b \left (\frac {i \sqrt {c}}{\sqrt {d}}+x\right )\right )\right )}{2 b d^{3/2}} \]
(E^a*(2*Sqrt[d]*E^(b*x) + I*b*Sqrt[c]*E^((I*b*Sqrt[c])/Sqrt[d])*ExpIntegra lEi[b*(((-I)*Sqrt[c])/Sqrt[d] + x)] - (I*b*Sqrt[c]*ExpIntegralEi[b*((I*Sqr t[c])/Sqrt[d] + x)])/E^((I*b*Sqrt[c])/Sqrt[d])))/(2*b*d^(3/2))
Time = 0.41 (sec) , antiderivative size = 132, 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.100, Rules used = {2701, 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 \frac {x^2 e^{a+b x}}{c+d x^2} \, dx\) |
\(\Big \downarrow \) 2701 |
\(\displaystyle \int \left (\frac {e^{a+b x}}{d}-\frac {c e^{a+b x}}{d \left (c+d x^2\right )}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sqrt {-c} e^{a+\frac {b \sqrt {-c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (-\frac {b \left (\sqrt {-c}-\sqrt {d} x\right )}{\sqrt {d}}\right )}{2 d^{3/2}}-\frac {\sqrt {-c} e^{a-\frac {b \sqrt {-c}}{\sqrt {d}}} \operatorname {ExpIntegralEi}\left (\frac {b \left (\sqrt {d} x+\sqrt {-c}\right )}{\sqrt {d}}\right )}{2 d^{3/2}}+\frac {e^{a+b x}}{b d}\) |
E^(a + b*x)/(b*d) + (Sqrt[-c]*E^(a + (b*Sqrt[-c])/Sqrt[d])*ExpIntegralEi[- ((b*(Sqrt[-c] - Sqrt[d]*x))/Sqrt[d])])/(2*d^(3/2)) - (Sqrt[-c]*E^(a - (b*S qrt[-c])/Sqrt[d])*ExpIntegralEi[(b*(Sqrt[-c] + Sqrt[d]*x))/Sqrt[d]])/(2*d^ (3/2))
3.5.66.3.1 Defintions of rubi rules used
Int[((F_)^((g_.)*((d_.) + (e_.)*(x_))^(n_.))*(u_)^(m_.))/((a_) + (c_)*(x_)^ 2), x_Symbol] :> Int[ExpandIntegrand[F^(g*(d + e*x)^n), u^m/(a + c*x^2), x] , x] /; FreeQ[{F, a, c, d, e, g, n}, x] && PolynomialQ[u, x] && IntegerQ[m]
Time = 0.44 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.96
method | result | size |
risch | \(\frac {{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) c}{2 d \sqrt {-c d}}-\frac {{\mathrm e}^{\frac {-b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) c}{2 d \sqrt {-c d}}+\frac {{\mathrm e}^{b x +a}}{b d}\) | \(127\) |
derivativedivides | \(\frac {-\frac {a^{2} b \left ({\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right )-{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right )\right )}{2 \sqrt {-c d}}+\frac {b^{2} {\mathrm e}^{b x +a}}{d}-\frac {b \left (2 \,{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) \sqrt {-c d}\, a b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) a^{2} d -{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) b^{2} c +2 \,{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) \sqrt {-c d}\, a b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) a^{2} d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) b^{2} c \right )}{2 d \sqrt {-c d}}+\frac {a b \left (\sqrt {-c d}\, {\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) b +\sqrt {-c d}\, {\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) a d -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) a d \right )}{d \sqrt {-c d}}}{b^{3}}\) | \(660\) |
default | \(\frac {-\frac {a^{2} b \left ({\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right )-{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right )\right )}{2 \sqrt {-c d}}+\frac {b^{2} {\mathrm e}^{b x +a}}{d}-\frac {b \left (2 \,{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) \sqrt {-c d}\, a b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) a^{2} d -{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) b^{2} c +2 \,{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) \sqrt {-c d}\, a b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) a^{2} d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) b^{2} c \right )}{2 d \sqrt {-c d}}+\frac {a b \left (\sqrt {-c d}\, {\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) b +\sqrt {-c d}\, {\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \operatorname {Ei}_{1}\left (\frac {b \sqrt {-c d}+a d -d \left (b x +a \right )}{d}\right ) a d -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \operatorname {Ei}_{1}\left (-\frac {b \sqrt {-c d}-a d +d \left (b x +a \right )}{d}\right ) a d \right )}{d \sqrt {-c d}}}{b^{3}}\) | \(660\) |
1/2/d/(-c*d)^(1/2)*exp((b*(-c*d)^(1/2)+a*d)/d)*Ei(1,(b*(-c*d)^(1/2)+a*d-d* (b*x+a))/d)*c-1/2/d/(-c*d)^(1/2)*exp((-b*(-c*d)^(1/2)+a*d)/d)*Ei(1,-(b*(-c *d)^(1/2)-a*d+d*(b*x+a))/d)*c+exp(b*x+a)/b/d
Time = 0.34 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.80 \[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\frac {\sqrt {-\frac {b^{2} c}{d}} {\rm Ei}\left (b x - \sqrt {-\frac {b^{2} c}{d}}\right ) e^{\left (a + \sqrt {-\frac {b^{2} c}{d}}\right )} - \sqrt {-\frac {b^{2} c}{d}} {\rm Ei}\left (b x + \sqrt {-\frac {b^{2} c}{d}}\right ) e^{\left (a - \sqrt {-\frac {b^{2} c}{d}}\right )} + 2 \, e^{\left (b x + a\right )}}{2 \, b d} \]
1/2*(sqrt(-b^2*c/d)*Ei(b*x - sqrt(-b^2*c/d))*e^(a + sqrt(-b^2*c/d)) - sqrt (-b^2*c/d)*Ei(b*x + sqrt(-b^2*c/d))*e^(a - sqrt(-b^2*c/d)) + 2*e^(b*x + a) )/(b*d)
\[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=e^{a} \int \frac {x^{2} e^{b x}}{c + d x^{2}}\, dx \]
\[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\int { \frac {x^{2} e^{\left (b x + a\right )}}{d x^{2} + c} \,d x } \]
x^2*e^(b*x + a)/(b*d*x^2 + b*c) - 2*c*integrate(x*e^(b*x + a)/(b*d^2*x^4 + 2*b*c*d*x^2 + b*c^2), x)
\[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\int { \frac {x^{2} e^{\left (b x + a\right )}}{d x^{2} + c} \,d x } \]
Timed out. \[ \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx=\int \frac {x^2\,{\mathrm {e}}^{a+b\,x}}{d\,x^2+c} \,d x \]