Integrand size = 21, antiderivative size = 44 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=-\frac {1}{2} (a+3 b) x+\frac {(a+b) \cosh (c+d x) \sinh (c+d x)}{2 d}+\frac {b \tanh (c+d x)}{d} \] Output:
-1/2*(a+3*b)*x+1/2*(a+b)*cosh(d*x+c)*sinh(d*x+c)/d+b*tanh(d*x+c)/d
Time = 0.28 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.93 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=\frac {-2 (a+3 b) (c+d x)+(a+b) \sinh (2 (c+d x))+4 b \tanh (c+d x)}{4 d} \] Input:
Integrate[Sinh[c + d*x]^2*(a + b*Tanh[c + d*x]^2),x]
Output:
(-2*(a + 3*b)*(c + d*x) + (a + b)*Sinh[2*(c + d*x)] + 4*b*Tanh[c + d*x])/( 4*d)
Time = 0.27 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.36, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 25, 4146, 360, 299, 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 \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\sin (i c+i d x)^2 \left (a-b \tan (i c+i d x)^2\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \sin (i c+i d x)^2 \left (a-b \tan (i c+i d x)^2\right )dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\tanh ^2(c+d x) \left (b \tanh ^2(c+d x)+a\right )}{\left (1-\tanh ^2(c+d x)\right )^2}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 360 |
\(\displaystyle \frac {\frac {(a+b) \tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}-\frac {1}{2} \int \frac {2 b \tanh ^2(c+d x)+a+b}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 299 |
\(\displaystyle \frac {\frac {1}{2} \left (2 b \tanh (c+d x)-(a+3 b) \int \frac {1}{1-\tanh ^2(c+d x)}d\tanh (c+d x)\right )+\frac {(a+b) \tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\frac {1}{2} (2 b \tanh (c+d x)-(a+3 b) \text {arctanh}(\tanh (c+d x)))+\frac {(a+b) \tanh (c+d x)}{2 \left (1-\tanh ^2(c+d x)\right )}}{d}\) |
Input:
Int[Sinh[c + d*x]^2*(a + b*Tanh[c + d*x]^2),x]
Output:
((-((a + 3*b)*ArcTanh[Tanh[c + d*x]]) + 2*b*Tanh[c + d*x])/2 + ((a + b)*Ta nh[c + d*x])/(2*(1 - Tanh[c + d*x]^2)))/d
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[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x *((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 *p + 3)) Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && NeQ[2*p + 3, 0]
Int[(x_)^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] : > Simp[(-a)^(m/2 - 1)*(b*c - a*d)*x*((a + b*x^2)^(p + 1)/(2*b^(m/2 + 1)*(p + 1))), x] + Simp[1/(2*b^(m/2 + 1)*(p + 1)) Int[(a + b*x^2)^(p + 1)*Expan dToSum[2*b*(p + 1)*x^2*Together[(b^(m/2)*x^(m - 2)*(c + d*x^2) - (-a)^(m/2 - 1)*(b*c - a*d))/(a + b*x^2)] - (-a)^(m/2 - 1)*(b*c - a*d), x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IGtQ[m/2, 0] & & (IntegerQ[p] || EqQ[m + 2*p + 1, 0])
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Time = 0.97 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.50
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )+b \left (\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )}-\frac {3 d x}{2}-\frac {3 c}{2}+\frac {3 \tanh \left (d x +c \right )}{2}\right )}{d}\) | \(66\) |
default | \(\frac {a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )+b \left (\frac {\sinh \left (d x +c \right )^{3}}{2 \cosh \left (d x +c \right )}-\frac {3 d x}{2}-\frac {3 c}{2}+\frac {3 \tanh \left (d x +c \right )}{2}\right )}{d}\) | \(66\) |
risch | \(-\frac {a x}{2}-\frac {3 b x}{2}+\frac {{\mathrm e}^{2 d x +2 c} a}{8 d}+\frac {{\mathrm e}^{2 d x +2 c} b}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} a}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} b}{8 d}-\frac {2 b}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )}\) | \(89\) |
Input:
int(sinh(d*x+c)^2*(a+tanh(d*x+c)^2*b),x,method=_RETURNVERBOSE)
Output:
1/d*(a*(1/2*cosh(d*x+c)*sinh(d*x+c)-1/2*d*x-1/2*c)+b*(1/2*sinh(d*x+c)^3/co sh(d*x+c)-3/2*d*x-3/2*c+3/2*tanh(d*x+c)))
Time = 0.10 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.61 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=\frac {{\left (a + b\right )} \sinh \left (d x + c\right )^{3} - 4 \, {\left ({\left (a + 3 \, b\right )} d x + 2 \, b\right )} \cosh \left (d x + c\right ) + {\left (3 \, {\left (a + b\right )} \cosh \left (d x + c\right )^{2} + a + 9 \, b\right )} \sinh \left (d x + c\right )}{8 \, d \cosh \left (d x + c\right )} \] Input:
integrate(sinh(d*x+c)^2*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")
Output:
1/8*((a + b)*sinh(d*x + c)^3 - 4*((a + 3*b)*d*x + 2*b)*cosh(d*x + c) + (3* (a + b)*cosh(d*x + c)^2 + a + 9*b)*sinh(d*x + c))/(d*cosh(d*x + c))
\[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=\int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \sinh ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(sinh(d*x+c)**2*(a+b*tanh(d*x+c)**2),x)
Output:
Integral((a + b*tanh(c + d*x)**2)*sinh(c + d*x)**2, x)
Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (40) = 80\).
Time = 0.04 (sec) , antiderivative size = 101, normalized size of antiderivative = 2.30 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=-\frac {1}{8} \, a {\left (4 \, x - \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{8} \, b {\left (\frac {12 \, {\left (d x + c\right )}}{d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d} - \frac {17 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )}\right )}}\right )} \] Input:
integrate(sinh(d*x+c)^2*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")
Output:
-1/8*a*(4*x - e^(2*d*x + 2*c)/d + e^(-2*d*x - 2*c)/d) - 1/8*b*(12*(d*x + c )/d + e^(-2*d*x - 2*c)/d - (17*e^(-2*d*x - 2*c) + 1)/(d*(e^(-2*d*x - 2*c) + e^(-4*d*x - 4*c))))
Leaf count of result is larger than twice the leaf count of optimal. 107 vs. \(2 (40) = 80\).
Time = 0.12 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.43 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (d x + c\right )} {\left (a + 3 \, b\right )} - a e^{\left (2 \, d x + 2 \, c\right )} - b e^{\left (2 \, d x + 2 \, c\right )} - \frac {a e^{\left (4 \, d x + 4 \, c\right )} + 3 \, b e^{\left (4 \, d x + 4 \, c\right )} - 14 \, b e^{\left (2 \, d x + 2 \, c\right )} - a - b}{e^{\left (4 \, d x + 4 \, c\right )} + e^{\left (2 \, d x + 2 \, c\right )}}}{8 \, d} \] Input:
integrate(sinh(d*x+c)^2*(a+b*tanh(d*x+c)^2),x, algorithm="giac")
Output:
-1/8*(4*(d*x + c)*(a + 3*b) - a*e^(2*d*x + 2*c) - b*e^(2*d*x + 2*c) - (a*e ^(4*d*x + 4*c) + 3*b*e^(4*d*x + 4*c) - 14*b*e^(2*d*x + 2*c) - a - b)/(e^(4 *d*x + 4*c) + e^(2*d*x + 2*c)))/d
Time = 2.30 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.45 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=\frac {{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )}{8\,d}-\frac {2\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (a+b\right )}{8\,d}-x\,\left (\frac {a}{2}+\frac {3\,b}{2}\right ) \] Input:
int(sinh(c + d*x)^2*(a + b*tanh(c + d*x)^2),x)
Output:
(exp(2*c + 2*d*x)*(a + b))/(8*d) - (2*b)/(d*(exp(2*c + 2*d*x) + 1)) - (exp (- 2*c - 2*d*x)*(a + b))/(8*d) - x*(a/2 + (3*b)/2)
Time = 0.29 (sec) , antiderivative size = 148, normalized size of antiderivative = 3.36 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx=\frac {e^{6 d x +6 c} a +e^{6 d x +6 c} b -4 e^{4 d x +4 c} a d x +2 e^{4 d x +4 c} a -12 e^{4 d x +4 c} b d x +18 e^{4 d x +4 c} b -4 e^{2 d x +2 c} a d x -12 e^{2 d x +2 c} b d x -a -b}{8 e^{2 d x +2 c} d \left (e^{2 d x +2 c}+1\right )} \] Input:
int(sinh(d*x+c)^2*(a+b*tanh(d*x+c)^2),x)
Output:
(e**(6*c + 6*d*x)*a + e**(6*c + 6*d*x)*b - 4*e**(4*c + 4*d*x)*a*d*x + 2*e* *(4*c + 4*d*x)*a - 12*e**(4*c + 4*d*x)*b*d*x + 18*e**(4*c + 4*d*x)*b - 4*e **(2*c + 2*d*x)*a*d*x - 12*e**(2*c + 2*d*x)*b*d*x - a - b)/(8*e**(2*c + 2* d*x)*d*(e**(2*c + 2*d*x) + 1))