3.589 \(\int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx\)

Optimal. Leaf size=33 \[ -\frac {1}{3 (\tanh (x)+1)}-\frac {4 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.14, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2074, 618, 204} \[ -\frac {1}{3 (\tanh (x)+1)}-\frac {4 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}} \]

Antiderivative was successfully verified.

[In]

Int[(Cosh[x]^3 - Sinh[x]^3)/(Cosh[x]^3 + Sinh[x]^3),x]

[Out]

(-4*ArcTan[(1 - 2*Tanh[x])/Sqrt[3]])/(3*Sqrt[3]) - 1/(3*(1 + Tanh[x]))

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 2074

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps

\begin {align*} \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx &=\operatorname {Subst}\left (\int \frac {1+x+x^2}{1+x+x^3+x^4} \, dx,x,\tanh (x)\right )\\ &=\operatorname {Subst}\left (\int \left (\frac {1}{3 (1+x)^2}+\frac {2}{3 \left (1-x+x^2\right )}\right ) \, dx,x,\tanh (x)\right )\\ &=-\frac {1}{3 (1+\tanh (x))}+\frac {2}{3} \operatorname {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\tanh (x)\right )\\ &=-\frac {1}{3 (1+\tanh (x))}-\frac {4}{3} \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \tanh (x)\right )\\ &=-\frac {4 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}}-\frac {1}{3 (1+\tanh (x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 37, normalized size = 1.12 \[ \frac {1}{18} \left (3 \sinh (2 x)-3 \cosh (2 x)+8 \sqrt {3} \tan ^{-1}\left (\frac {2 \tanh (x)-1}{\sqrt {3}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(Cosh[x]^3 - Sinh[x]^3)/(Cosh[x]^3 + Sinh[x]^3),x]

[Out]

(8*Sqrt[3]*ArcTan[(-1 + 2*Tanh[x])/Sqrt[3]] - 3*Cosh[2*x] + 3*Sinh[2*x])/18

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cosh ^3(x)-\sinh ^3(x)}{\cosh ^3(x)+\sinh ^3(x)} \, dx \]

Verification is Not applicable to the result.

[In]

IntegrateAlgebraic[(Cosh[x]^3 - Sinh[x]^3)/(Cosh[x]^3 + Sinh[x]^3),x]

[Out]

Could not integrate

________________________________________________________________________________________

fricas [B]  time = 1.30, size = 74, normalized size = 2.24 \[ -\frac {8 \, {\left (\sqrt {3} \cosh \relax (x)^{2} + 2 \, \sqrt {3} \cosh \relax (x) \sinh \relax (x) + \sqrt {3} \sinh \relax (x)^{2}\right )} \arctan \left (-\frac {\sqrt {3} \cosh \relax (x) + \sqrt {3} \sinh \relax (x)}{3 \, {\left (\cosh \relax (x) - \sinh \relax (x)\right )}}\right ) + 3}{18 \, {\left (\cosh \relax (x)^{2} + 2 \, \cosh \relax (x) \sinh \relax (x) + \sinh \relax (x)^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)^3-sinh(x)^3)/(cosh(x)^3+sinh(x)^3),x, algorithm="fricas")

[Out]

-1/18*(8*(sqrt(3)*cosh(x)^2 + 2*sqrt(3)*cosh(x)*sinh(x) + sqrt(3)*sinh(x)^2)*arctan(-1/3*(sqrt(3)*cosh(x) + sq
rt(3)*sinh(x))/(cosh(x) - sinh(x))) + 3)/(cosh(x)^2 + 2*cosh(x)*sinh(x) + sinh(x)^2)

________________________________________________________________________________________

giac [A]  time = 0.60, size = 22, normalized size = 0.67 \[ \frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} e^{\left (2 \, x\right )}\right ) - \frac {1}{6} \, e^{\left (-2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)^3-sinh(x)^3)/(cosh(x)^3+sinh(x)^3),x, algorithm="giac")

[Out]

4/9*sqrt(3)*arctan(1/3*sqrt(3)*e^(2*x)) - 1/6*e^(-2*x)

________________________________________________________________________________________

maple [C]  time = 0.21, size = 44, normalized size = 1.33




method result size



risch \(-\frac {{\mathrm e}^{-2 x}}{6}+\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}+i \sqrt {3}\right )}{9}-\frac {2 i \sqrt {3}\, \ln \left ({\mathrm e}^{2 x}-i \sqrt {3}\right )}{9}\) \(44\)
default \(\frac {2 i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-1-i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {2 i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-1+i \sqrt {3}\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {2}{3 \left (1+\tanh \left (\frac {x}{2}\right )\right )^{2}}+\frac {2}{3 \left (1+\tanh \left (\frac {x}{2}\right )\right )}\) \(78\)
meijerg error in int/gbinthm/express: improper op or subscript selector\ N/A



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(x)^3-sinh(x)^3)/(cosh(x)^3+sinh(x)^3),x,method=_RETURNVERBOSE)

[Out]

-1/6*exp(-2*x)+2/9*I*3^(1/2)*ln(exp(2*x)+I*3^(1/2))-2/9*I*3^(1/2)*ln(exp(2*x)-I*3^(1/2))

________________________________________________________________________________________

maxima [B]  time = 1.03, size = 70, normalized size = 2.12 \[ \frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} + 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {4}{9} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} - 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {1}{6} \, e^{\left (-2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)^3-sinh(x)^3)/(cosh(x)^3+sinh(x)^3),x, algorithm="maxima")

[Out]

4/9*sqrt(3)*arctan(1/6*3^(3/4)*sqrt(2)*(2*sqrt(3)*e^(-x) + 3^(1/4)*sqrt(2))) - 4/9*sqrt(3)*arctan(1/6*3^(3/4)*
sqrt(2)*(2*sqrt(3)*e^(-x) - 3^(1/4)*sqrt(2))) - 1/6*e^(-2*x)

________________________________________________________________________________________

mupad [B]  time = 0.37, size = 22, normalized size = 0.67 \[ \frac {4\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,{\mathrm {e}}^{2\,x}}{3}\right )}{9}-\frac {{\mathrm {e}}^{-2\,x}}{6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(x)^3 - sinh(x)^3)/(cosh(x)^3 + sinh(x)^3),x)

[Out]

(4*3^(1/2)*atan((3^(1/2)*exp(2*x))/3))/9 - exp(-2*x)/6

________________________________________________________________________________________

sympy [B]  time = 1.83, size = 102, normalized size = 3.09 \[ \frac {4 \sqrt {3} \sinh {\relax (x )} \operatorname {atan}{\left (\frac {2 \sqrt {3} \sinh {\relax (x )}}{3 \cosh {\relax (x )}} - \frac {\sqrt {3}}{3} \right )}}{9 \sinh {\relax (x )} + 9 \cosh {\relax (x )}} + \frac {3 \sinh {\relax (x )}}{9 \sinh {\relax (x )} + 9 \cosh {\relax (x )}} + \frac {4 \sqrt {3} \cosh {\relax (x )} \operatorname {atan}{\left (\frac {2 \sqrt {3} \sinh {\relax (x )}}{3 \cosh {\relax (x )}} - \frac {\sqrt {3}}{3} \right )}}{9 \sinh {\relax (x )} + 9 \cosh {\relax (x )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((cosh(x)**3-sinh(x)**3)/(cosh(x)**3+sinh(x)**3),x)

[Out]

4*sqrt(3)*sinh(x)*atan(2*sqrt(3)*sinh(x)/(3*cosh(x)) - sqrt(3)/3)/(9*sinh(x) + 9*cosh(x)) + 3*sinh(x)/(9*sinh(
x) + 9*cosh(x)) + 4*sqrt(3)*cosh(x)*atan(2*sqrt(3)*sinh(x)/(3*cosh(x)) - sqrt(3)/3)/(9*sinh(x) + 9*cosh(x))

________________________________________________________________________________________