Integrand size = 24, antiderivative size = 231 \[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^2}-\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^2} \]
[Out]
Time = 0.39 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {5751, 3401, 2296, 2221, 2317, 2438} \[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-b-2 \sqrt {-a} \sqrt {b}}\right )}{4 \sqrt {-a} \sqrt {b} d^2}-\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-b+2 \sqrt {-a} \sqrt {b}}\right )}{4 \sqrt {-a} \sqrt {b} d^2}+\frac {x \log \left (\frac {(a+b) e^{2 c+2 d x}}{-2 \sqrt {-a} \sqrt {b}+a-b}+1\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x \log \left (\frac {(a+b) e^{2 c+2 d x}}{2 \sqrt {-a} \sqrt {b}+a-b}+1\right )}{2 \sqrt {-a} \sqrt {b} d} \]
[In]
[Out]
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 3401
Rule 5751
Rubi steps \begin{align*} \text {integral}& = 2 \int \frac {x}{a-b+(a+b) \cosh (2 c+2 d x)} \, dx \\ & = 4 \int \frac {e^{2 c+2 d x} x}{a+b+2 (a-b) e^{2 c+2 d x}+(a+b) e^{2 (2 c+2 d x)}} \, dx \\ & = \frac {(2 (a+b)) \int \frac {e^{2 c+2 d x} x}{2 (a-b)-4 \sqrt {-a} \sqrt {b}+2 (a+b) e^{2 c+2 d x}} \, dx}{\sqrt {-a} \sqrt {b}}-\frac {(2 (a+b)) \int \frac {e^{2 c+2 d x} x}{2 (a-b)+4 \sqrt {-a} \sqrt {b}+2 (a+b) e^{2 c+2 d x}} \, dx}{\sqrt {-a} \sqrt {b}} \\ & = \frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {\int \log \left (1+\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)-4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{2 \sqrt {-a} \sqrt {b} d}+\frac {\int \log \left (1+\frac {2 (a+b) e^{2 c+2 d x}}{2 (a-b)+4 \sqrt {-a} \sqrt {b}}\right ) \, dx}{2 \sqrt {-a} \sqrt {b} d} \\ & = \frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {2 (a+b) x}{2 (a-b)-4 \sqrt {-a} \sqrt {b}}\right )}{x} \, dx,x,e^{2 c+2 d x}\right )}{4 \sqrt {-a} \sqrt {b} d^2}+\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {2 (a+b) x}{2 (a-b)+4 \sqrt {-a} \sqrt {b}}\right )}{x} \, dx,x,e^{2 c+2 d x}\right )}{4 \sqrt {-a} \sqrt {b} d^2} \\ & = \frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}-\frac {x \log \left (1+\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{2 \sqrt {-a} \sqrt {b} d}+\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^2}-\frac {\operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 c+2 d x}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a} \sqrt {b} d^2} \\ \end{align*}
Time = 1.43 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.08 \[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\frac {-4 \sqrt {-a} c \arctan \left (\frac {a-b+(a+b) e^{2 (c+d x)}}{2 \sqrt {a} \sqrt {b}}\right )+2 \sqrt {a} (c+d x) \log \left (1+\frac {(a+b) e^{2 (c+d x)}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )-2 \sqrt {a} (c+d x) \log \left (1+\frac {(a+b) e^{2 (c+d x)}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )+\sqrt {a} \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 (c+d x)}}{a-2 \sqrt {-a} \sqrt {b}-b}\right )-\sqrt {a} \operatorname {PolyLog}\left (2,-\frac {(a+b) e^{2 (c+d x)}}{a+2 \sqrt {-a} \sqrt {b}-b}\right )}{4 \sqrt {-a^2} \sqrt {b} d^2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(952\) vs. \(2(187)=374\).
Time = 3.20 (sec) , antiderivative size = 953, normalized size of antiderivative = 4.13
method | result | size |
risch | \(-\frac {c^{2}}{d^{2} \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\operatorname {polylog}\left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right )}{2 d^{2} \left (-2 \sqrt {-a b}-a +b \right )}-\frac {c^{2}}{2 d^{2} \sqrt {-a b}}+\frac {\operatorname {polylog}\left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{2 \sqrt {-a b}-a +b}\right )}{4 d^{2} \sqrt {-a b}}-\frac {a \,x^{2}}{2 \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {b \,x^{2}}{2 \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) c}{d^{2} \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{2 \sqrt {-a b}-a +b}\right ) x}{2 d \sqrt {-a b}}-\frac {c x}{d \sqrt {-a b}}-\frac {c \arctan \left (\frac {2 \left (a +b \right ) {\mathrm e}^{2 d x +2 c}+2 a -2 b}{4 \sqrt {a b}}\right )}{d^{2} \sqrt {a b}}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) x}{d \left (-2 \sqrt {-a b}-a +b \right )}-\frac {2 c x}{d \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{2 \sqrt {-a b}-a +b}\right ) c}{2 d^{2} \sqrt {-a b}}-\frac {x^{2}}{-2 \sqrt {-a b}-a +b}-\frac {x^{2}}{2 \sqrt {-a b}}-\frac {a \,c^{2}}{2 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {c^{2} b}{2 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\operatorname {polylog}\left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) a}{4 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}-\frac {\operatorname {polylog}\left (2, \frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) b}{4 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) a c}{2 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}-\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) b c}{2 d^{2} \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) a x}{2 d \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}-\frac {\ln \left (1-\frac {\left (a +b \right ) {\mathrm e}^{2 d x +2 c}}{-2 \sqrt {-a b}-a +b}\right ) b x}{2 d \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}-\frac {a c x}{d \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}+\frac {b c x}{d \sqrt {-a b}\, \left (-2 \sqrt {-a b}-a +b \right )}\) | \(953\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 1516 vs. \(2 (185) = 370\).
Time = 0.35 (sec) , antiderivative size = 1516, normalized size of antiderivative = 6.56 \[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {x \operatorname {sech}^{2}{\left (c + d x \right )}}{a + b \tanh ^{2}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
\[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {x \operatorname {sech}\left (d x + c\right )^{2}}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int { \frac {x \operatorname {sech}\left (d x + c\right )^{2}}{b \tanh \left (d x + c\right )^{2} + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {x \text {sech}^2(c+d x)}{a+b \tanh ^2(c+d x)} \, dx=\int \frac {x}{{\mathrm {cosh}\left (c+d\,x\right )}^2\,\left (b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+a\right )} \,d x \]
[In]
[Out]