Integrand size = 39, antiderivative size = 51 \[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=\frac {\arctan \left (1-\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2} b}-\frac {\arctan \left (1+\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2} b} \]
Time = 0.02 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.51 \[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=-\frac {\arctan \left (\frac {\sinh (2 a+2 b x)}{\sqrt {2}}\right )}{\sqrt {2} b} \]
Time = 1.19 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.96, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3042, 4889, 25, 1476, 1082, 217}
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 {\text {sech}^4(a+b x)-\text {csch}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (i a+i b x)^4-\csc (i a+i b x)^4}{\csc (i a+i b x)^4+\sec (i a+i b x)^4}dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \frac {\int -\frac {\tanh ^2(a+b x)+1}{\tanh ^4(a+b x)+1}d\tanh (a+b x)}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {\tanh ^2(a+b x)+1}{\tanh ^4(a+b x)+1}d\tanh (a+b x)}{b}\) |
\(\Big \downarrow \) 1476 |
\(\displaystyle \frac {-\frac {1}{2} \int \frac {1}{\tanh ^2(a+b x)-\sqrt {2} \tanh (a+b x)+1}d\tanh (a+b x)-\frac {1}{2} \int \frac {1}{\tanh ^2(a+b x)+\sqrt {2} \tanh (a+b x)+1}d\tanh (a+b x)}{b}\) |
\(\Big \downarrow \) 1082 |
\(\displaystyle \frac {\frac {\int \frac {1}{-\left (\sqrt {2} \tanh (a+b x)+1\right )^2-1}d\left (\sqrt {2} \tanh (a+b x)+1\right )}{\sqrt {2}}-\frac {\int \frac {1}{-\left (1-\sqrt {2} \tanh (a+b x)\right )^2-1}d\left (1-\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2}}}{b}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {\arctan \left (1-\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2}}-\frac {\arctan \left (\sqrt {2} \tanh (a+b x)+1\right )}{\sqrt {2}}}{b}\) |
3.11.59.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*S implify[a*(c/b^2)]}, Simp[-2/b Subst[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b )], x] /; RationalQ[q] && (EqQ[q^2, 1] || !RationalQ[b^2 - 4*a*c])] /; Fre eQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 2*(d/e), 2]}, Simp[e/(2*c) Int[1/Simp[d/e + q*x + x^2, x], x], x] + Simp[ e/(2*c) Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Result contains complex when optimal does not.
Time = 0.30 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.45
method | result | size |
risch | \(\frac {i \sqrt {2}\, \ln \left ({\mathrm e}^{4 b x +4 a}-2 i \sqrt {2}\, {\mathrm e}^{2 b x +2 a}-1\right )}{4 b}-\frac {i \sqrt {2}\, \ln \left ({\mathrm e}^{4 b x +4 a}+2 i \sqrt {2}\, {\mathrm e}^{2 b x +2 a}-1\right )}{4 b}\) | \(74\) |
derivativedivides | \(\frac {\frac {i \sqrt {2}\, \ln \left (2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{3}+\tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}+2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )-2 \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}+1\right )}{4}-\frac {i \sqrt {2}\, \ln \left (-2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{3}+\tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}-2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )-2 \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}+1\right )}{4}}{b}\) | \(136\) |
default | \(\frac {\frac {i \sqrt {2}\, \ln \left (2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{3}+\tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}+2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )-2 \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}+1\right )}{4}-\frac {i \sqrt {2}\, \ln \left (-2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{3}+\tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{4}-2 i \sqrt {2}\, \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )-2 \tanh \left (\frac {a}{2}+\frac {b x}{2}\right )^{2}+1\right )}{4}}{b}\) | \(136\) |
1/4*I*2^(1/2)/b*ln(exp(4*b*x+4*a)-2*I*2^(1/2)*exp(2*b*x+2*a)-1)-1/4*I*2^(1 /2)/b*ln(exp(4*b*x+4*a)+2*I*2^(1/2)*exp(2*b*x+2*a)-1)
Leaf count of result is larger than twice the leaf count of optimal. 192 vs. \(2 (43) = 86\).
Time = 0.25 (sec) , antiderivative size = 192, normalized size of antiderivative = 3.76 \[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=\frac {\sqrt {2} \arctan \left (-\frac {\sqrt {2} \cosh \left (b x + a\right )^{3} + 3 \, \sqrt {2} \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} + \sqrt {2} \sinh \left (b x + a\right )^{3} + {\left (3 \, \sqrt {2} \cosh \left (b x + a\right )^{2} - 7 \, \sqrt {2}\right )} \sinh \left (b x + a\right ) + 7 \, \sqrt {2} \cosh \left (b x + a\right )}{4 \, {\left (\cosh \left (b x + a\right )^{3} - 3 \, \cosh \left (b x + a\right )^{2} \sinh \left (b x + a\right ) + 3 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{2} - \sinh \left (b x + a\right )^{3}\right )}}\right ) + \sqrt {2} \arctan \left (-\frac {\sqrt {2} \cosh \left (b x + a\right ) + \sqrt {2} \sinh \left (b x + a\right )}{4 \, {\left (\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )\right )}}\right )}{2 \, b} \]
1/2*(sqrt(2)*arctan(-1/4*(sqrt(2)*cosh(b*x + a)^3 + 3*sqrt(2)*cosh(b*x + a )*sinh(b*x + a)^2 + sqrt(2)*sinh(b*x + a)^3 + (3*sqrt(2)*cosh(b*x + a)^2 - 7*sqrt(2))*sinh(b*x + a) + 7*sqrt(2)*cosh(b*x + a))/(cosh(b*x + a)^3 - 3* cosh(b*x + a)^2*sinh(b*x + a) + 3*cosh(b*x + a)*sinh(b*x + a)^2 - sinh(b*x + a)^3)) + sqrt(2)*arctan(-1/4*(sqrt(2)*cosh(b*x + a) + sqrt(2)*sinh(b*x + a))/(cosh(b*x + a) - sinh(b*x + a))))/b
\[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=- \int \frac {\operatorname {csch}^{4}{\left (a + b x \right )}}{\operatorname {csch}^{4}{\left (a + b x \right )} + \operatorname {sech}^{4}{\left (a + b x \right )}}\, dx - \int \left (- \frac {\operatorname {sech}^{4}{\left (a + b x \right )}}{\operatorname {csch}^{4}{\left (a + b x \right )} + \operatorname {sech}^{4}{\left (a + b x \right )}}\right )\, dx \]
-Integral(csch(a + b*x)**4/(csch(a + b*x)**4 + sech(a + b*x)**4), x) - Int egral(-sech(a + b*x)**4/(csch(a + b*x)**4 + sech(a + b*x)**4), x)
\[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=\int { -\frac {\operatorname {csch}\left (b x + a\right )^{4} - \operatorname {sech}\left (b x + a\right )^{4}}{\operatorname {csch}\left (b x + a\right )^{4} + \operatorname {sech}\left (b x + a\right )^{4}} \,d x } \]
-2*integrate((e^(-b*x - a) + e^(-5*b*x - 5*a))*e^(-b*x - a)/(6*e^(-4*b*x - 4*a) + e^(-8*b*x - 8*a) + 1), x) - 2*integrate((e^(-4*b*x - 4*a) + 1)*e^( -2*b*x - 2*a)/(6*e^(-4*b*x - 4*a) + e^(-8*b*x - 8*a) + 1), x)
Time = 0.43 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.67 \[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=-\frac {\sqrt {2} \arctan \left (\frac {1}{4} \, \sqrt {2} {\left (e^{\left (4 \, b x + 4 \, a\right )} - 1\right )} e^{\left (-2 \, b x - 2 \, a\right )}\right )}{2 \, b} \]
Time = 2.38 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.51 \[ \int \frac {-\text {csch}^4(a+b x)+\text {sech}^4(a+b x)}{\text {csch}^4(a+b x)+\text {sech}^4(a+b x)} \, dx=-\frac {\sqrt {2}\,\left (\mathrm {atan}\left (\frac {\sqrt {2}\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}\,\sqrt {b^2}}{4\,b}\right )+\mathrm {atan}\left (\frac {\sqrt {b^2}\,\left (\frac {56\,\sqrt {2}\,{\mathrm {e}}^{2\,a}\,{\mathrm {e}}^{2\,b\,x}}{b}+\frac {8\,\sqrt {2}\,{\mathrm {e}}^{6\,a}\,{\mathrm {e}}^{6\,b\,x}}{b}\right )}{32}\right )\right )}{2\,\sqrt {b^2}} \]