Integrand size = 39, antiderivative size = 51 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^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.03 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.49 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^4(a+b x)} \, dx=\frac {\arctan \left (\frac {\sinh (2 a+2 b x)}{\sqrt {2}}\right )}{\sqrt {2} b} \]
Time = 0.36 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.96, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {3042, 4889, 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 {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\sinh ^4(a+b x)+\cosh ^4(a+b x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (i a+i b x)^4-\sin (i a+i b x)^4}{\sin (i a+i b x)^4+\cos (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 \) 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 (1-\sqrt {2} \tanh (a+b x)\right )^2-1}d\left (1-\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2}}-\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}}}{b}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {\arctan \left (\sqrt {2} \tanh (a+b x)+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \tanh (a+b x)\right )}{\sqrt {2}}}{b}\) |
3.11.52.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.28 (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.28 (sec) , antiderivative size = 192, normalized size of antiderivative = 3.76 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^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
Result contains complex when optimal does not.
Time = 2.22 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.90 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^4(a+b x)} \, dx=\begin {cases} - x & \text {for}\: a = \frac {i \pi }{2} \wedge b = 0 \\\frac {x \left (- \sinh ^{4}{\left (a \right )} + \cosh ^{4}{\left (a \right )}\right )}{\sinh ^{4}{\left (a \right )} + \cosh ^{4}{\left (a \right )}} & \text {for}\: b = 0 \\- x & \text {for}\: a = - b x + \frac {i \pi }{2} \\\frac {\sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} \sinh {\left (a + b x \right )}}{\cosh {\left (a + b x \right )}} - 1 \right )}}{2 b} + \frac {\sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} \sinh {\left (a + b x \right )}}{\cosh {\left (a + b x \right )}} + 1 \right )}}{2 b} & \text {otherwise} \end {cases} \]
Piecewise((-x, Eq(b, 0) & Eq(a, I*pi/2)), (x*(-sinh(a)**4 + cosh(a)**4)/(s inh(a)**4 + cosh(a)**4), Eq(b, 0)), (-x, Eq(a, -b*x + I*pi/2)), (sqrt(2)*a tan(sqrt(2)*sinh(a + b*x)/cosh(a + b*x) - 1)/(2*b) + sqrt(2)*atan(sqrt(2)* sinh(a + b*x)/cosh(a + b*x) + 1)/(2*b), True))
\[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^4(a+b x)} \, dx=\int { \frac {\cosh \left (b x + a\right )^{4} - \sinh \left (b x + a\right )^{4}}{\cosh \left (b x + a\right )^{4} + \sinh \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^(6*b*x + 6*a)/(e^(8*b*x + 8*a) + 6*e^(4*b*x + 4*a) + 1), x) + 2*integrate(e^(-6*b*x - 6*a)/(6*e^(-4 *b*x - 4*a) + e^(-8*b*x - 8*a) + 1), x)
Time = 0.73 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.67 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^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 = 0.22 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.51 \[ \int \frac {\cosh ^4(a+b x)-\sinh ^4(a+b x)}{\cosh ^4(a+b x)+\sinh ^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}} \]