Optimal. Leaf size=132 \[ \frac {e^{a+b x}}{b d}+\frac {\sqrt {-c} e^{a+\frac {b \sqrt {-c}}{\sqrt {d}}} \text {Ei}\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}}} \text {Ei}\left (\frac {b \left (\sqrt {-c}+\sqrt {d} x\right )}{\sqrt {d}}\right )}{2 d^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.17, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2303, 2225,
2301, 2209} \begin {gather*} \frac {\sqrt {-c} e^{a+\frac {b \sqrt {-c}}{\sqrt {d}}} \text {Ei}\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}}} \text {Ei}\left (\frac {b \left (\sqrt {d} x+\sqrt {-c}\right )}{\sqrt {d}}\right )}{2 d^{3/2}}+\frac {e^{a+b x}}{b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2209
Rule 2225
Rule 2301
Rule 2303
Rubi steps
\begin {align*} \int \frac {e^{a+b x} x^2}{c+d x^2} \, dx &=\int \left (\frac {e^{a+b x}}{d}-\frac {c e^{a+b x}}{d \left (c+d x^2\right )}\right ) \, dx\\ &=\frac {\int e^{a+b x} \, dx}{d}-\frac {c \int \frac {e^{a+b x}}{c+d x^2} \, dx}{d}\\ &=\frac {e^{a+b x}}{b d}-\frac {c \int \left (\frac {\sqrt {-c} e^{a+b x}}{2 c \left (\sqrt {-c}-\sqrt {d} x\right )}+\frac {\sqrt {-c} e^{a+b x}}{2 c \left (\sqrt {-c}+\sqrt {d} x\right )}\right ) \, dx}{d}\\ &=\frac {e^{a+b x}}{b d}-\frac {\sqrt {-c} \int \frac {e^{a+b x}}{\sqrt {-c}-\sqrt {d} x} \, dx}{2 d}-\frac {\sqrt {-c} \int \frac {e^{a+b x}}{\sqrt {-c}+\sqrt {d} x} \, dx}{2 d}\\ &=\frac {e^{a+b x}}{b d}+\frac {\sqrt {-c} e^{a+\frac {b \sqrt {-c}}{\sqrt {d}}} \text {Ei}\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}}} \text {Ei}\left (\frac {b \left (\sqrt {-c}+\sqrt {d} x\right )}{\sqrt {d}}\right )}{2 d^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.12, size = 120, normalized size = 0.91 \begin {gather*} \frac {e^a \left (2 \sqrt {d} e^{b x}+i b \sqrt {c} e^{\frac {i b \sqrt {c}}{\sqrt {d}}} \text {Ei}\left (b \left (-\frac {i \sqrt {c}}{\sqrt {d}}+x\right )\right )-i b \sqrt {c} e^{-\frac {i b \sqrt {c}}{\sqrt {d}}} \text {Ei}\left (b \left (\frac {i \sqrt {c}}{\sqrt {d}}+x\right )\right )\right )}{2 b d^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(659\) vs.
\(2(97)=194\).
time = 0.07, size = 660, normalized size = 5.00
method | result | size |
risch | \(\frac {{\mathrm e}^{b x +a}}{b d}-\frac {{\mathrm e}^{\frac {-b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) c}{2 d \sqrt {-c d}}+\frac {{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) c}{2 d \sqrt {-c d}}\) | \(127\) |
derivativedivides | \(\frac {-\frac {a^{2} b \left ({\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right )-{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{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}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, a b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) a^{2} d -{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) b^{2} c +2 \,{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, a b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) a^{2} d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) b^{2} c \right )}{2 d \sqrt {-c d}}+\frac {a b \left ({\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) a d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{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}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right )-{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{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}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, a b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) a^{2} d -{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) b^{2} c +2 \,{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, a b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) a^{2} d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) b^{2} c \right )}{2 d \sqrt {-c d}}+\frac {a b \left ({\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, b +{\mathrm e}^{\frac {b \sqrt {-c d}+a d}{d}} \expIntegral \left (1, \frac {b \sqrt {-c d}+a d -\left (b x +a \right ) d}{d}\right ) a d +{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) \sqrt {-c d}\, b -{\mathrm e}^{-\frac {b \sqrt {-c d}-a d}{d}} \expIntegral \left (1, -\frac {b \sqrt {-c d}-a d +\left (b x +a \right ) d}{d}\right ) a d \right )}{d \sqrt {-c d}}}{b^{3}}\) | \(660\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 106, normalized size = 0.80 \begin {gather*} \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} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} e^{a} \int \frac {x^{2} e^{b x}}{c + d x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2\,{\mathrm {e}}^{a+b\,x}}{d\,x^2+c} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________