Integrand size = 21, antiderivative size = 132 \[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=-\frac {(b+2 c) \text {arctanh}\left (\frac {b+2 c \tanh ^2(x)}{2 \sqrt {c} \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)}}\right )}{4 \sqrt {c}}+\frac {1}{2} \sqrt {a+b+c} \text {arctanh}\left (\frac {2 a+b+(b+2 c) \tanh ^2(x)}{2 \sqrt {a+b+c} \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)}}\right )-\frac {1}{2} \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \]
-1/4*(b+2*c)*arctanh(1/2*(b+2*c*tanh(x)^2)/c^(1/2)/(a+b*tanh(x)^2+c*tanh(x )^4)^(1/2))/c^(1/2)+1/2*arctanh(1/2*(2*a+b+(b+2*c)*tanh(x)^2)/(a+b+c)^(1/2 )/(a+b*tanh(x)^2+c*tanh(x)^4)^(1/2))*(a+b+c)^(1/2)-1/2*(a+b*tanh(x)^2+c*ta nh(x)^4)^(1/2)
Time = 0.34 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.99 \[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\frac {1}{4} \left (\frac {(b+2 c) \text {arctanh}\left (\frac {-b-2 c \tanh ^2(x)}{2 \sqrt {c} \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)}}\right )}{\sqrt {c}}+2 \sqrt {a+b+c} \text {arctanh}\left (\frac {2 a+b+(b+2 c) \tanh ^2(x)}{2 \sqrt {a+b+c} \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)}}\right )-2 \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)}\right ) \]
(((b + 2*c)*ArcTanh[(-b - 2*c*Tanh[x]^2)/(2*Sqrt[c]*Sqrt[a + b*Tanh[x]^2 + c*Tanh[x]^4])])/Sqrt[c] + 2*Sqrt[a + b + c]*ArcTanh[(2*a + b + (b + 2*c)* Tanh[x]^2)/(2*Sqrt[a + b + c]*Sqrt[a + b*Tanh[x]^2 + c*Tanh[x]^4])] - 2*Sq rt[a + b*Tanh[x]^2 + c*Tanh[x]^4])/4
Result contains complex when optimal does not.
Time = 0.44 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.64, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 26, 4183, 1576, 1162, 25, 1269, 1092, 219, 1154, 219}
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 \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -i \tan (i x) \sqrt {a-b \tan (i x)^2+c \tan (i x)^4}dx\) |
\(\Big \downarrow \) 26 |
\(\displaystyle -i \int \tan (i x) \sqrt {c \tan (i x)^4-b \tan (i x)^2+a}dx\) |
\(\Big \downarrow \) 4183 |
\(\displaystyle -\int \frac {i \tanh (x) \sqrt {c \tanh ^4(x)+b \tanh ^2(x)+a}}{1-\tanh ^2(x)}d(i \tanh (x))\) |
\(\Big \downarrow \) 1576 |
\(\displaystyle -\frac {1}{2} \int \frac {\sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}{1-\tanh ^2(x)}d\left (-\tanh ^2(x)\right )\) |
\(\Big \downarrow \) 1162 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int -\frac {2 a+b-i (b+2 c) \tanh (x)}{\left (1-\tanh ^2(x)\right ) \sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {1}{2} \left (-\frac {1}{2} \int \frac {2 a+b-i (b+2 c) \tanh (x)}{\left (1-\tanh ^2(x)\right ) \sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 1269 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left ((b+2 c) \int \frac {1}{\sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )-2 (a+b+c) \int \frac {1}{\left (1-\tanh ^2(x)\right ) \sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 1092 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (2 (b+2 c) \int \frac {1}{\tanh ^2(x)+4 c}d\left (-\frac {b-2 i c \tanh (x)}{\sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}\right )-2 (a+b+c) \int \frac {1}{\left (1-\tanh ^2(x)\right ) \sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (\frac {i (b+2 c) \arctan \left (\frac {\tanh (x)}{2 \sqrt {c}}\right )}{\sqrt {c}}-2 (a+b+c) \int \frac {1}{\left (1-\tanh ^2(x)\right ) \sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}d\left (-\tanh ^2(x)\right )\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 1154 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (4 (a+b+c) \int \frac {1}{\tanh ^2(x)+4 (a+b+c)}d\frac {2 a+b-i (b+2 c) \tanh (x)}{\sqrt {-c \tanh ^2(x)-i b \tanh (x)+a}}+\frac {i (b+2 c) \arctan \left (\frac {\tanh (x)}{2 \sqrt {c}}\right )}{\sqrt {c}}\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \left (2 i \sqrt {a+b+c} \arctan \left (\frac {\tanh (x)}{2 \sqrt {a+b+c}}\right )+\frac {i (b+2 c) \arctan \left (\frac {\tanh (x)}{2 \sqrt {c}}\right )}{\sqrt {c}}\right )-\sqrt {a-i b \tanh (x)-c \tanh ^2(x)}\right )\) |
(((I*(b + 2*c)*ArcTan[Tanh[x]/(2*Sqrt[c])])/Sqrt[c] + (2*I)*Sqrt[a + b + c ]*ArcTan[Tanh[x]/(2*Sqrt[a + b + c])])/2 - Sqrt[a - I*b*Tanh[x] - c*Tanh[x ]^2])/2
3.3.5.3.1 Defintions of rubi rules used
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2 Subst[I nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a , b, c}, x]
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym bol] :> Simp[-2 Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c , d, e}, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> Simp[(d + e*x)^(m + 1)*((a + b*x + c*x^2)^p/(e*(m + 2*p + 1))), x ] - Simp[p/(e*(m + 2*p + 1)) Int[(d + e*x)^m*Simp[b*d - 2*a*e + (2*c*d - b*e)*x, x]*(a + b*x + c*x^2)^(p - 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x ] && GtQ[p, 0] && NeQ[m + 2*p + 1, 0] && ( !RationalQ[m] || LtQ[m, 1]) && !ILtQ[m + 2*p, 0] && IntQuadraticQ[a, b, c, d, e, m, p, x]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Simp[(e*f - d*g)/e Int[(d + e*x)^m*(a + b*x + c*x^2)^ p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && !IGtQ[m, 0]
Int[(x_)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^( p_.), x_Symbol] :> Simp[1/2 Subst[Int[(d + e*x)^q*(a + b*x + c*x^2)^p, x] , x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x]
Int[tan[(d_.) + (e_.)*(x_)]^(m_.)*((a_.) + (b_.)*((f_.)*tan[(d_.) + (e_.)*( x_)])^(n_.) + (c_.)*((f_.)*tan[(d_.) + (e_.)*(x_)])^(n2_.))^(p_), x_Symbol] :> Simp[f/e Subst[Int[(x/f)^m*((a + b*x^n + c*x^(2*n))^p/(f^2 + x^2)), x ], x, f*Tan[d + e*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[n 2, 2*n] && NeQ[b^2 - 4*a*c, 0]
Time = 0.75 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.25
method | result | size |
derivativedivides | \(-\frac {\sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}}{2}-\frac {\left (b +2 c \right ) \ln \left (\frac {\frac {b}{2}+c +c \left (\tanh \left (x \right )^{2}-1\right )}{\sqrt {c}}+\sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}\right )}{4 \sqrt {c}}+\frac {\sqrt {a +b +c}\, \ln \left (\frac {2 a +2 b +2 c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+2 \sqrt {a +b +c}\, \sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}}{\tanh \left (x \right )^{2}-1}\right )}{2}\) | \(165\) |
default | \(-\frac {\sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}}{2}-\frac {\left (b +2 c \right ) \ln \left (\frac {\frac {b}{2}+c +c \left (\tanh \left (x \right )^{2}-1\right )}{\sqrt {c}}+\sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}\right )}{4 \sqrt {c}}+\frac {\sqrt {a +b +c}\, \ln \left (\frac {2 a +2 b +2 c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+2 \sqrt {a +b +c}\, \sqrt {\left (\tanh \left (x \right )^{2}-1\right )^{2} c +\left (b +2 c \right ) \left (\tanh \left (x \right )^{2}-1\right )+a +b +c}}{\tanh \left (x \right )^{2}-1}\right )}{2}\) | \(165\) |
-1/2*((tanh(x)^2-1)^2*c+(b+2*c)*(tanh(x)^2-1)+a+b+c)^(1/2)-1/4*(b+2*c)*ln( (1/2*b+c+c*(tanh(x)^2-1))/c^(1/2)+((tanh(x)^2-1)^2*c+(b+2*c)*(tanh(x)^2-1) +a+b+c)^(1/2))/c^(1/2)+1/2*(a+b+c)^(1/2)*ln((2*a+2*b+2*c+(b+2*c)*(tanh(x)^ 2-1)+2*(a+b+c)^(1/2)*((tanh(x)^2-1)^2*c+(b+2*c)*(tanh(x)^2-1)+a+b+c)^(1/2) )/(tanh(x)^2-1))
Leaf count of result is larger than twice the leaf count of optimal. 1827 vs. \(2 (108) = 216\).
Time = 1.42 (sec) , antiderivative size = 7896, normalized size of antiderivative = 59.82 \[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\text {Too large to display} \]
\[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\int \sqrt {a + b \tanh ^{2}{\left (x \right )} + c \tanh ^{4}{\left (x \right )}} \tanh {\left (x \right )}\, dx \]
\[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\int { \sqrt {c \tanh \left (x\right )^{4} + b \tanh \left (x\right )^{2} + a} \tanh \left (x\right ) \,d x } \]
\[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\int { \sqrt {c \tanh \left (x\right )^{4} + b \tanh \left (x\right )^{2} + a} \tanh \left (x\right ) \,d x } \]
Timed out. \[ \int \tanh (x) \sqrt {a+b \tanh ^2(x)+c \tanh ^4(x)} \, dx=\int \mathrm {tanh}\left (x\right )\,\sqrt {c\,{\mathrm {tanh}\left (x\right )}^4+b\,{\mathrm {tanh}\left (x\right )}^2+a} \,d x \]