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

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

[Out]

1/2*x-2/9*arctan(1/3*(1-2*tanh(x))*3^(1/2))*3^(1/2)-1/6/(1+tanh(x))

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2058, 207, 618, 204} \[ \frac {x}{2}-\frac {1}{6 (\tanh (x)+1)}-\frac {2 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{3 \sqrt {3}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

x/2 - (2*ArcTan[(1 - 2*Tanh[x])/Sqrt[3]])/(3*Sqrt[3]) - 1/(6*(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 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[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 2058

Int[(P_)^(p_), x_Symbol] :> With[{u = Factor[P]}, Int[ExpandIntegrand[u^p, x], x] /;  !SumQ[NonfreeFactors[u,
x]]] /; PolyQ[P, x] && ILtQ[p, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 40, normalized size = 1.05 \[ \frac {1}{36} \left (18 x+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/(Cosh[x]^3 + Sinh[x]^3),x]

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 0.42, size = 95, normalized size = 2.50 \[ \frac {18 \, x \cosh \relax (x)^{2} + 36 \, x \cosh \relax (x) \sinh \relax (x) + 18 \, x \sinh \relax (x)^{2} - 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}{36 \, {\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/(cosh(x)^3+sinh(x)^3),x, algorithm="fricas")

[Out]

1/36*(18*x*cosh(x)^2 + 36*x*cosh(x)*sinh(x) + 18*x*sinh(x)^2 - 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) + sqrt(3)*sinh(x))/(cosh(x) - sinh(x))) - 3)/(cosh(x)^2 +
2*cosh(x)*sinh(x) + sinh(x)^2)

________________________________________________________________________________________

giac [A]  time = 0.11, size = 33, normalized size = 0.87 \[ -\frac {1}{12} \, {\left (3 \, e^{\left (2 \, x\right )} + 1\right )} e^{\left (-2 \, x\right )} + \frac {2}{9} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} e^{\left (2 \, x\right )}\right ) + \frac {1}{2} \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [C]  time = 0.24, size = 96, normalized size = 2.53 \[ -\frac {\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}+\frac {i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-i \sqrt {3}-1\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (i \sqrt {3}-1\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{9}-\frac {1}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {1}{3 \tanh \left (\frac {x}{2}\right )+3}+\frac {\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 73, normalized size = 1.92 \[ \frac {2}{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 {2}{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}{2} \, x - \frac {1}{12} \, e^{\left (-2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.69, size = 25, normalized size = 0.66 \[ \frac {x}{2}-\frac {{\mathrm {e}}^{-2\,x}}{12}+\frac {2\,\sqrt {3}\,\mathrm {atan}\left (\frac {\sqrt {3}\,{\mathrm {e}}^{2\,x}}{3}\right )}{9} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x/2 - exp(-2*x)/12 + (2*3^(1/2)*atan((3^(1/2)*exp(2*x))/3))/9

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________