\(\int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx\) [162]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 237 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {3 b^2 d (c+d x)^2}{8 f^2}+\frac {a^2 (c+d x)^4}{4 d}+\frac {b^2 (c+d x)^4}{8 d}-\frac {12 a b d^3 \cosh (e+f x)}{f^4}-\frac {6 a b d (c+d x)^2 \cosh (e+f x)}{f^2}-\frac {3 b^2 d^3 \cosh ^2(e+f x)}{8 f^4}-\frac {3 b^2 d (c+d x)^2 \cosh ^2(e+f x)}{4 f^2}+\frac {12 a b d^2 (c+d x) \sinh (e+f x)}{f^3}+\frac {2 a b (c+d x)^3 \sinh (e+f x)}{f}+\frac {3 b^2 d^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{4 f^3}+\frac {b^2 (c+d x)^3 \cosh (e+f x) \sinh (e+f x)}{2 f} \] Output:

3/8*b^2*d*(d*x+c)^2/f^2+1/4*a^2*(d*x+c)^4/d+1/8*b^2*(d*x+c)^4/d-12*a*b*d^3 
*cosh(f*x+e)/f^4-6*a*b*d*(d*x+c)^2*cosh(f*x+e)/f^2-3/8*b^2*d^3*cosh(f*x+e) 
^2/f^4-3/4*b^2*d*(d*x+c)^2*cosh(f*x+e)^2/f^2+12*a*b*d^2*(d*x+c)*sinh(f*x+e 
)/f^3+2*a*b*(d*x+c)^3*sinh(f*x+e)/f+3/4*b^2*d^2*(d*x+c)*cosh(f*x+e)*sinh(f 
*x+e)/f^3+1/2*b^2*(d*x+c)^3*cosh(f*x+e)*sinh(f*x+e)/f
 

Mathematica [A] (verified)

Time = 0.75 (sec) , antiderivative size = 232, normalized size of antiderivative = 0.98 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {-96 a b d \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \cosh (e+f x)-3 b^2 d \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (1+2 f^2 x^2\right )\right ) \cosh (2 (e+f x))+2 f \left (\left (2 a^2+b^2\right ) f^3 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )+16 a b (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (6+f^2 x^2\right )\right ) \sinh (e+f x)+b^2 (c+d x) \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (3+2 f^2 x^2\right )\right ) \sinh (2 (e+f x))\right )}{16 f^4} \] Input:

Integrate[(c + d*x)^3*(a + b*Cosh[e + f*x])^2,x]
 

Output:

(-96*a*b*d*(c^2*f^2 + 2*c*d*f^2*x + d^2*(2 + f^2*x^2))*Cosh[e + f*x] - 3*b 
^2*d*(2*c^2*f^2 + 4*c*d*f^2*x + d^2*(1 + 2*f^2*x^2))*Cosh[2*(e + f*x)] + 2 
*f*((2*a^2 + b^2)*f^3*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) + 16*a 
*b*(c + d*x)*(c^2*f^2 + 2*c*d*f^2*x + d^2*(6 + f^2*x^2))*Sinh[e + f*x] + b 
^2*(c + d*x)*(2*c^2*f^2 + 4*c*d*f^2*x + d^2*(3 + 2*f^2*x^2))*Sinh[2*(e + f 
*x)]))/(16*f^4)
 

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 3798, 2009}

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 (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^3 \left (a+b \sin \left (i e+i f x+\frac {\pi }{2}\right )\right )^2dx\)

\(\Big \downarrow \) 3798

\(\displaystyle \int \left (a^2 (c+d x)^3+2 a b (c+d x)^3 \cosh (e+f x)+b^2 (c+d x)^3 \cosh ^2(e+f x)\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {a^2 (c+d x)^4}{4 d}+\frac {12 a b d^2 (c+d x) \sinh (e+f x)}{f^3}-\frac {6 a b d (c+d x)^2 \cosh (e+f x)}{f^2}+\frac {2 a b (c+d x)^3 \sinh (e+f x)}{f}-\frac {12 a b d^3 \cosh (e+f x)}{f^4}+\frac {3 b^2 d^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{4 f^3}-\frac {3 b^2 d (c+d x)^2 \cosh ^2(e+f x)}{4 f^2}+\frac {b^2 (c+d x)^3 \sinh (e+f x) \cosh (e+f x)}{2 f}+\frac {3 b^2 d (c+d x)^2}{8 f^2}+\frac {b^2 (c+d x)^4}{8 d}-\frac {3 b^2 d^3 \cosh ^2(e+f x)}{8 f^4}\)

Input:

Int[(c + d*x)^3*(a + b*Cosh[e + f*x])^2,x]
 

Output:

(3*b^2*d*(c + d*x)^2)/(8*f^2) + (a^2*(c + d*x)^4)/(4*d) + (b^2*(c + d*x)^4 
)/(8*d) - (12*a*b*d^3*Cosh[e + f*x])/f^4 - (6*a*b*d*(c + d*x)^2*Cosh[e + f 
*x])/f^2 - (3*b^2*d^3*Cosh[e + f*x]^2)/(8*f^4) - (3*b^2*d*(c + d*x)^2*Cosh 
[e + f*x]^2)/(4*f^2) + (12*a*b*d^2*(c + d*x)*Sinh[e + f*x])/f^3 + (2*a*b*( 
c + d*x)^3*Sinh[e + f*x])/f + (3*b^2*d^2*(c + d*x)*Cosh[e + f*x]*Sinh[e + 
f*x])/(4*f^3) + (b^2*(c + d*x)^3*Cosh[e + f*x]*Sinh[e + f*x])/(2*f)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3798
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) 
, x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], 
 x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ 
m, 0] || NeQ[a^2 - b^2, 0])
 
Maple [A] (verified)

Time = 1.83 (sec) , antiderivative size = 194, normalized size of antiderivative = 0.82

method result size
parallelrisch \(\frac {4 \left (d x +c \right ) \left (\left (d x +c \right )^{2} f^{2}+\frac {3 d^{2}}{2}\right ) b^{2} f \sinh \left (2 f x +2 e \right )-6 \left (\left (d x +c \right )^{2} f^{2}+\frac {d^{2}}{2}\right ) b^{2} d \cosh \left (2 f x +2 e \right )+32 \left (d x +c \right ) b a \left (\left (d x +c \right )^{2} f^{2}+6 d^{2}\right ) f \sinh \left (f x +e \right )-96 b a d \left (\left (d x +c \right )^{2} f^{2}+2 d^{2}\right ) \cosh \left (f x +e \right )+16 \left (a^{2}+\frac {b^{2}}{2}\right ) \left (\frac {d x}{2}+c \right ) \left (\frac {1}{2} x^{2} d^{2}+c d x +c^{2}\right ) x \,f^{4}-18 b^{2} c^{2} d \,f^{2}-9 d^{3} b^{2}}{16 f^{4}}\) \(194\)
risch \(\frac {d^{3} a^{2} x^{4}}{4}+\frac {d^{3} b^{2} x^{4}}{8}+d^{2} a^{2} c \,x^{3}+\frac {d^{2} b^{2} c \,x^{3}}{2}+\frac {3 a^{2} d \,c^{2} x^{2}}{2}+\frac {3 d \,b^{2} c^{2} x^{2}}{4}+a^{2} c^{3} x +\frac {b^{2} c^{3} x}{2}+\frac {a^{2} c^{4}}{4 d}+\frac {b^{2} c^{4}}{8 d}+\frac {b^{2} \left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}+12 c^{2} d \,f^{3} x -6 d^{3} f^{2} x^{2}+4 c^{3} f^{3}-12 c \,d^{2} f^{2} x -6 c^{2} d \,f^{2}+6 d^{3} f x +6 c \,d^{2} f -3 d^{3}\right ) {\mathrm e}^{2 f x +2 e}}{32 f^{4}}+\frac {a b \left (d^{3} x^{3} f^{3}+3 c \,d^{2} f^{3} x^{2}+3 c^{2} d \,f^{3} x -3 d^{3} f^{2} x^{2}+c^{3} f^{3}-6 c \,d^{2} f^{2} x -3 c^{2} d \,f^{2}+6 d^{3} f x +6 c \,d^{2} f -6 d^{3}\right ) {\mathrm e}^{f x +e}}{f^{4}}-\frac {a b \left (d^{3} x^{3} f^{3}+3 c \,d^{2} f^{3} x^{2}+3 c^{2} d \,f^{3} x +3 d^{3} f^{2} x^{2}+c^{3} f^{3}+6 c \,d^{2} f^{2} x +3 c^{2} d \,f^{2}+6 d^{3} f x +6 c \,d^{2} f +6 d^{3}\right ) {\mathrm e}^{-f x -e}}{f^{4}}-\frac {b^{2} \left (4 d^{3} x^{3} f^{3}+12 c \,d^{2} f^{3} x^{2}+12 c^{2} d \,f^{3} x +6 d^{3} f^{2} x^{2}+4 c^{3} f^{3}+12 c \,d^{2} f^{2} x +6 c^{2} d \,f^{2}+6 d^{3} f x +6 c \,d^{2} f +3 d^{3}\right ) {\mathrm e}^{-2 f x -2 e}}{32 f^{4}}\) \(532\)
parts \(\text {Expression too large to display}\) \(852\)
derivativedivides \(\text {Expression too large to display}\) \(1061\)
default \(\text {Expression too large to display}\) \(1061\)
orering \(\text {Expression too large to display}\) \(1317\)

Input:

int((d*x+c)^3*(a+b*cosh(f*x+e))^2,x,method=_RETURNVERBOSE)
 

Output:

1/16*(4*(d*x+c)*((d*x+c)^2*f^2+3/2*d^2)*b^2*f*sinh(2*f*x+2*e)-6*((d*x+c)^2 
*f^2+1/2*d^2)*b^2*d*cosh(2*f*x+2*e)+32*(d*x+c)*b*a*((d*x+c)^2*f^2+6*d^2)*f 
*sinh(f*x+e)-96*b*a*d*((d*x+c)^2*f^2+2*d^2)*cosh(f*x+e)+16*(a^2+1/2*b^2)*( 
1/2*d*x+c)*(1/2*x^2*d^2+c*d*x+c^2)*x*f^4-18*b^2*c^2*d*f^2-9*d^3*b^2)/f^4
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 409, normalized size of antiderivative = 1.73 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {2 \, {\left (2 \, a^{2} + b^{2}\right )} d^{3} f^{4} x^{4} + 8 \, {\left (2 \, a^{2} + b^{2}\right )} c d^{2} f^{4} x^{3} + 12 \, {\left (2 \, a^{2} + b^{2}\right )} c^{2} d f^{4} x^{2} + 8 \, {\left (2 \, a^{2} + b^{2}\right )} c^{3} f^{4} x - 3 \, {\left (2 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c d^{2} f^{2} x + 2 \, b^{2} c^{2} d f^{2} + b^{2} d^{3}\right )} \cosh \left (f x + e\right )^{2} - 3 \, {\left (2 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c d^{2} f^{2} x + 2 \, b^{2} c^{2} d f^{2} + b^{2} d^{3}\right )} \sinh \left (f x + e\right )^{2} - 96 \, {\left (a b d^{3} f^{2} x^{2} + 2 \, a b c d^{2} f^{2} x + a b c^{2} d f^{2} + 2 \, a b d^{3}\right )} \cosh \left (f x + e\right ) + 4 \, {\left (8 \, a b d^{3} f^{3} x^{3} + 24 \, a b c d^{2} f^{3} x^{2} + 8 \, a b c^{3} f^{3} + 48 \, a b c d^{2} f + 24 \, {\left (a b c^{2} d f^{3} + 2 \, a b d^{3} f\right )} x + {\left (2 \, b^{2} d^{3} f^{3} x^{3} + 6 \, b^{2} c d^{2} f^{3} x^{2} + 2 \, b^{2} c^{3} f^{3} + 3 \, b^{2} c d^{2} f + 3 \, {\left (2 \, b^{2} c^{2} d f^{3} + b^{2} d^{3} f\right )} x\right )} \cosh \left (f x + e\right )\right )} \sinh \left (f x + e\right )}{16 \, f^{4}} \] Input:

integrate((d*x+c)^3*(a+b*cosh(f*x+e))^2,x, algorithm="fricas")
 

Output:

1/16*(2*(2*a^2 + b^2)*d^3*f^4*x^4 + 8*(2*a^2 + b^2)*c*d^2*f^4*x^3 + 12*(2* 
a^2 + b^2)*c^2*d*f^4*x^2 + 8*(2*a^2 + b^2)*c^3*f^4*x - 3*(2*b^2*d^3*f^2*x^ 
2 + 4*b^2*c*d^2*f^2*x + 2*b^2*c^2*d*f^2 + b^2*d^3)*cosh(f*x + e)^2 - 3*(2* 
b^2*d^3*f^2*x^2 + 4*b^2*c*d^2*f^2*x + 2*b^2*c^2*d*f^2 + b^2*d^3)*sinh(f*x 
+ e)^2 - 96*(a*b*d^3*f^2*x^2 + 2*a*b*c*d^2*f^2*x + a*b*c^2*d*f^2 + 2*a*b*d 
^3)*cosh(f*x + e) + 4*(8*a*b*d^3*f^3*x^3 + 24*a*b*c*d^2*f^3*x^2 + 8*a*b*c^ 
3*f^3 + 48*a*b*c*d^2*f + 24*(a*b*c^2*d*f^3 + 2*a*b*d^3*f)*x + (2*b^2*d^3*f 
^3*x^3 + 6*b^2*c*d^2*f^3*x^2 + 2*b^2*c^3*f^3 + 3*b^2*c*d^2*f + 3*(2*b^2*c^ 
2*d*f^3 + b^2*d^3*f)*x)*cosh(f*x + e))*sinh(f*x + e))/f^4
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 779 vs. \(2 (240) = 480\).

Time = 0.43 (sec) , antiderivative size = 779, normalized size of antiderivative = 3.29 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx =\text {Too large to display} \] Input:

integrate((d*x+c)**3*(a+b*cosh(f*x+e))**2,x)
 

Output:

Piecewise((a**2*c**3*x + 3*a**2*c**2*d*x**2/2 + a**2*c*d**2*x**3 + a**2*d* 
*3*x**4/4 + 2*a*b*c**3*sinh(e + f*x)/f + 6*a*b*c**2*d*x*sinh(e + f*x)/f - 
6*a*b*c**2*d*cosh(e + f*x)/f**2 + 6*a*b*c*d**2*x**2*sinh(e + f*x)/f - 12*a 
*b*c*d**2*x*cosh(e + f*x)/f**2 + 12*a*b*c*d**2*sinh(e + f*x)/f**3 + 2*a*b* 
d**3*x**3*sinh(e + f*x)/f - 6*a*b*d**3*x**2*cosh(e + f*x)/f**2 + 12*a*b*d* 
*3*x*sinh(e + f*x)/f**3 - 12*a*b*d**3*cosh(e + f*x)/f**4 - b**2*c**3*x*sin 
h(e + f*x)**2/2 + b**2*c**3*x*cosh(e + f*x)**2/2 + b**2*c**3*sinh(e + f*x) 
*cosh(e + f*x)/(2*f) - 3*b**2*c**2*d*x**2*sinh(e + f*x)**2/4 + 3*b**2*c**2 
*d*x**2*cosh(e + f*x)**2/4 + 3*b**2*c**2*d*x*sinh(e + f*x)*cosh(e + f*x)/( 
2*f) - 3*b**2*c**2*d*sinh(e + f*x)**2/(4*f**2) - b**2*c*d**2*x**3*sinh(e + 
 f*x)**2/2 + b**2*c*d**2*x**3*cosh(e + f*x)**2/2 + 3*b**2*c*d**2*x**2*sinh 
(e + f*x)*cosh(e + f*x)/(2*f) - 3*b**2*c*d**2*x*sinh(e + f*x)**2/(4*f**2) 
- 3*b**2*c*d**2*x*cosh(e + f*x)**2/(4*f**2) + 3*b**2*c*d**2*sinh(e + f*x)* 
cosh(e + f*x)/(4*f**3) - b**2*d**3*x**4*sinh(e + f*x)**2/8 + b**2*d**3*x** 
4*cosh(e + f*x)**2/8 + b**2*d**3*x**3*sinh(e + f*x)*cosh(e + f*x)/(2*f) - 
3*b**2*d**3*x**2*sinh(e + f*x)**2/(8*f**2) - 3*b**2*d**3*x**2*cosh(e + f*x 
)**2/(8*f**2) + 3*b**2*d**3*x*sinh(e + f*x)*cosh(e + f*x)/(4*f**3) - 3*b** 
2*d**3*sinh(e + f*x)**2/(8*f**4), Ne(f, 0)), ((a + b*cosh(e))**2*(c**3*x + 
 3*c**2*d*x**2/2 + c*d**2*x**3 + d**3*x**4/4), True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 523 vs. \(2 (223) = 446\).

Time = 0.07 (sec) , antiderivative size = 523, normalized size of antiderivative = 2.21 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {1}{4} \, a^{2} d^{3} x^{4} + a^{2} c d^{2} x^{3} + \frac {3}{2} \, a^{2} c^{2} d x^{2} + \frac {3}{16} \, {\left (4 \, x^{2} + \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} - \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} b^{2} c^{2} d + \frac {1}{16} \, {\left (8 \, x^{3} + \frac {3 \, {\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} - 2 \, f x e^{\left (2 \, e\right )} + e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{3}} - \frac {3 \, {\left (2 \, f^{2} x^{2} + 2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{3}}\right )} b^{2} c d^{2} + \frac {1}{32} \, {\left (4 \, x^{4} + \frac {{\left (4 \, f^{3} x^{3} e^{\left (2 \, e\right )} - 6 \, f^{2} x^{2} e^{\left (2 \, e\right )} + 6 \, f x e^{\left (2 \, e\right )} - 3 \, e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{4}} - \frac {{\left (4 \, f^{3} x^{3} + 6 \, f^{2} x^{2} + 6 \, f x + 3\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{4}}\right )} b^{2} d^{3} + \frac {1}{8} \, b^{2} c^{3} {\left (4 \, x + \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} - \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c^{3} x + 3 \, a b c^{2} d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} - \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + 3 \, a b c d^{2} {\left (\frac {{\left (f^{2} x^{2} e^{e} - 2 \, f x e^{e} + 2 \, e^{e}\right )} e^{\left (f x\right )}}{f^{3}} - \frac {{\left (f^{2} x^{2} + 2 \, f x + 2\right )} e^{\left (-f x - e\right )}}{f^{3}}\right )} + a b d^{3} {\left (\frac {{\left (f^{3} x^{3} e^{e} - 3 \, f^{2} x^{2} e^{e} + 6 \, f x e^{e} - 6 \, e^{e}\right )} e^{\left (f x\right )}}{f^{4}} - \frac {{\left (f^{3} x^{3} + 3 \, f^{2} x^{2} + 6 \, f x + 6\right )} e^{\left (-f x - e\right )}}{f^{4}}\right )} + \frac {2 \, a b c^{3} \sinh \left (f x + e\right )}{f} \] Input:

integrate((d*x+c)^3*(a+b*cosh(f*x+e))^2,x, algorithm="maxima")
 

Output:

1/4*a^2*d^3*x^4 + a^2*c*d^2*x^3 + 3/2*a^2*c^2*d*x^2 + 3/16*(4*x^2 + (2*f*x 
*e^(2*e) - e^(2*e))*e^(2*f*x)/f^2 - (2*f*x + 1)*e^(-2*f*x - 2*e)/f^2)*b^2* 
c^2*d + 1/16*(8*x^3 + 3*(2*f^2*x^2*e^(2*e) - 2*f*x*e^(2*e) + e^(2*e))*e^(2 
*f*x)/f^3 - 3*(2*f^2*x^2 + 2*f*x + 1)*e^(-2*f*x - 2*e)/f^3)*b^2*c*d^2 + 1/ 
32*(4*x^4 + (4*f^3*x^3*e^(2*e) - 6*f^2*x^2*e^(2*e) + 6*f*x*e^(2*e) - 3*e^( 
2*e))*e^(2*f*x)/f^4 - (4*f^3*x^3 + 6*f^2*x^2 + 6*f*x + 3)*e^(-2*f*x - 2*e) 
/f^4)*b^2*d^3 + 1/8*b^2*c^3*(4*x + e^(2*f*x + 2*e)/f - e^(-2*f*x - 2*e)/f) 
 + a^2*c^3*x + 3*a*b*c^2*d*((f*x*e^e - e^e)*e^(f*x)/f^2 - (f*x + 1)*e^(-f* 
x - e)/f^2) + 3*a*b*c*d^2*((f^2*x^2*e^e - 2*f*x*e^e + 2*e^e)*e^(f*x)/f^3 - 
 (f^2*x^2 + 2*f*x + 2)*e^(-f*x - e)/f^3) + a*b*d^3*((f^3*x^3*e^e - 3*f^2*x 
^2*e^e + 6*f*x*e^e - 6*e^e)*e^(f*x)/f^4 - (f^3*x^3 + 3*f^2*x^2 + 6*f*x + 6 
)*e^(-f*x - e)/f^4) + 2*a*b*c^3*sinh(f*x + e)/f
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 599 vs. \(2 (223) = 446\).

Time = 0.12 (sec) , antiderivative size = 599, normalized size of antiderivative = 2.53 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {1}{4} \, a^{2} d^{3} x^{4} + \frac {1}{8} \, b^{2} d^{3} x^{4} + a^{2} c d^{2} x^{3} + \frac {1}{2} \, b^{2} c d^{2} x^{3} + \frac {3}{2} \, a^{2} c^{2} d x^{2} + \frac {3}{4} \, b^{2} c^{2} d x^{2} + a^{2} c^{3} x + \frac {1}{2} \, b^{2} c^{3} x + \frac {{\left (4 \, b^{2} d^{3} f^{3} x^{3} + 12 \, b^{2} c d^{2} f^{3} x^{2} + 12 \, b^{2} c^{2} d f^{3} x - 6 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c^{3} f^{3} - 12 \, b^{2} c d^{2} f^{2} x - 6 \, b^{2} c^{2} d f^{2} + 6 \, b^{2} d^{3} f x + 6 \, b^{2} c d^{2} f - 3 \, b^{2} d^{3}\right )} e^{\left (2 \, f x + 2 \, e\right )}}{32 \, f^{4}} + \frac {{\left (a b d^{3} f^{3} x^{3} + 3 \, a b c d^{2} f^{3} x^{2} + 3 \, a b c^{2} d f^{3} x - 3 \, a b d^{3} f^{2} x^{2} + a b c^{3} f^{3} - 6 \, a b c d^{2} f^{2} x - 3 \, a b c^{2} d f^{2} + 6 \, a b d^{3} f x + 6 \, a b c d^{2} f - 6 \, a b d^{3}\right )} e^{\left (f x + e\right )}}{f^{4}} - \frac {{\left (a b d^{3} f^{3} x^{3} + 3 \, a b c d^{2} f^{3} x^{2} + 3 \, a b c^{2} d f^{3} x + 3 \, a b d^{3} f^{2} x^{2} + a b c^{3} f^{3} + 6 \, a b c d^{2} f^{2} x + 3 \, a b c^{2} d f^{2} + 6 \, a b d^{3} f x + 6 \, a b c d^{2} f + 6 \, a b d^{3}\right )} e^{\left (-f x - e\right )}}{f^{4}} - \frac {{\left (4 \, b^{2} d^{3} f^{3} x^{3} + 12 \, b^{2} c d^{2} f^{3} x^{2} + 12 \, b^{2} c^{2} d f^{3} x + 6 \, b^{2} d^{3} f^{2} x^{2} + 4 \, b^{2} c^{3} f^{3} + 12 \, b^{2} c d^{2} f^{2} x + 6 \, b^{2} c^{2} d f^{2} + 6 \, b^{2} d^{3} f x + 6 \, b^{2} c d^{2} f + 3 \, b^{2} d^{3}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{32 \, f^{4}} \] Input:

integrate((d*x+c)^3*(a+b*cosh(f*x+e))^2,x, algorithm="giac")
 

Output:

1/4*a^2*d^3*x^4 + 1/8*b^2*d^3*x^4 + a^2*c*d^2*x^3 + 1/2*b^2*c*d^2*x^3 + 3/ 
2*a^2*c^2*d*x^2 + 3/4*b^2*c^2*d*x^2 + a^2*c^3*x + 1/2*b^2*c^3*x + 1/32*(4* 
b^2*d^3*f^3*x^3 + 12*b^2*c*d^2*f^3*x^2 + 12*b^2*c^2*d*f^3*x - 6*b^2*d^3*f^ 
2*x^2 + 4*b^2*c^3*f^3 - 12*b^2*c*d^2*f^2*x - 6*b^2*c^2*d*f^2 + 6*b^2*d^3*f 
*x + 6*b^2*c*d^2*f - 3*b^2*d^3)*e^(2*f*x + 2*e)/f^4 + (a*b*d^3*f^3*x^3 + 3 
*a*b*c*d^2*f^3*x^2 + 3*a*b*c^2*d*f^3*x - 3*a*b*d^3*f^2*x^2 + a*b*c^3*f^3 - 
 6*a*b*c*d^2*f^2*x - 3*a*b*c^2*d*f^2 + 6*a*b*d^3*f*x + 6*a*b*c*d^2*f - 6*a 
*b*d^3)*e^(f*x + e)/f^4 - (a*b*d^3*f^3*x^3 + 3*a*b*c*d^2*f^3*x^2 + 3*a*b*c 
^2*d*f^3*x + 3*a*b*d^3*f^2*x^2 + a*b*c^3*f^3 + 6*a*b*c*d^2*f^2*x + 3*a*b*c 
^2*d*f^2 + 6*a*b*d^3*f*x + 6*a*b*c*d^2*f + 6*a*b*d^3)*e^(-f*x - e)/f^4 - 1 
/32*(4*b^2*d^3*f^3*x^3 + 12*b^2*c*d^2*f^3*x^2 + 12*b^2*c^2*d*f^3*x + 6*b^2 
*d^3*f^2*x^2 + 4*b^2*c^3*f^3 + 12*b^2*c*d^2*f^2*x + 6*b^2*c^2*d*f^2 + 6*b^ 
2*d^3*f*x + 6*b^2*c*d^2*f + 3*b^2*d^3)*e^(-2*f*x - 2*e)/f^4
 

Mupad [B] (verification not implemented)

Time = 3.69 (sec) , antiderivative size = 481, normalized size of antiderivative = 2.03 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=a^2\,c^3\,x+\frac {b^2\,c^3\,x}{2}+\frac {a^2\,d^3\,x^4}{4}+\frac {b^2\,d^3\,x^4}{8}+\frac {3\,a^2\,c^2\,d\,x^2}{2}+a^2\,c\,d^2\,x^3+\frac {3\,b^2\,c^2\,d\,x^2}{4}+\frac {b^2\,c\,d^2\,x^3}{2}-\frac {3\,b^2\,d^3\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{16\,f^4}+\frac {b^2\,c^3\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}-\frac {12\,a\,b\,d^3\,\mathrm {cosh}\left (e+f\,x\right )}{f^4}+\frac {2\,a\,b\,c^3\,\mathrm {sinh}\left (e+f\,x\right )}{f}-\frac {3\,b^2\,d^3\,x^2\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{8\,f^2}+\frac {b^2\,d^3\,x^3\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}-\frac {3\,b^2\,c^2\,d\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{8\,f^2}+\frac {3\,b^2\,c\,d^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{8\,f^3}+\frac {3\,b^2\,d^3\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{8\,f^3}-\frac {3\,b^2\,c\,d^2\,x\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )}{4\,f^2}+\frac {3\,b^2\,c^2\,d\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}-\frac {6\,a\,b\,c^2\,d\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {12\,a\,b\,c\,d^2\,\mathrm {sinh}\left (e+f\,x\right )}{f^3}+\frac {12\,a\,b\,d^3\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f^3}+\frac {3\,b^2\,c\,d^2\,x^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )}{4\,f}-\frac {6\,a\,b\,d^3\,x^2\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {2\,a\,b\,d^3\,x^3\,\mathrm {sinh}\left (e+f\,x\right )}{f}+\frac {6\,a\,b\,c\,d^2\,x^2\,\mathrm {sinh}\left (e+f\,x\right )}{f}-\frac {12\,a\,b\,c\,d^2\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f^2}+\frac {6\,a\,b\,c^2\,d\,x\,\mathrm {sinh}\left (e+f\,x\right )}{f} \] Input:

int((a + b*cosh(e + f*x))^2*(c + d*x)^3,x)
 

Output:

a^2*c^3*x + (b^2*c^3*x)/2 + (a^2*d^3*x^4)/4 + (b^2*d^3*x^4)/8 + (3*a^2*c^2 
*d*x^2)/2 + a^2*c*d^2*x^3 + (3*b^2*c^2*d*x^2)/4 + (b^2*c*d^2*x^3)/2 - (3*b 
^2*d^3*cosh(2*e + 2*f*x))/(16*f^4) + (b^2*c^3*sinh(2*e + 2*f*x))/(4*f) - ( 
12*a*b*d^3*cosh(e + f*x))/f^4 + (2*a*b*c^3*sinh(e + f*x))/f - (3*b^2*d^3*x 
^2*cosh(2*e + 2*f*x))/(8*f^2) + (b^2*d^3*x^3*sinh(2*e + 2*f*x))/(4*f) - (3 
*b^2*c^2*d*cosh(2*e + 2*f*x))/(8*f^2) + (3*b^2*c*d^2*sinh(2*e + 2*f*x))/(8 
*f^3) + (3*b^2*d^3*x*sinh(2*e + 2*f*x))/(8*f^3) - (3*b^2*c*d^2*x*cosh(2*e 
+ 2*f*x))/(4*f^2) + (3*b^2*c^2*d*x*sinh(2*e + 2*f*x))/(4*f) - (6*a*b*c^2*d 
*cosh(e + f*x))/f^2 + (12*a*b*c*d^2*sinh(e + f*x))/f^3 + (12*a*b*d^3*x*sin 
h(e + f*x))/f^3 + (3*b^2*c*d^2*x^2*sinh(2*e + 2*f*x))/(4*f) - (6*a*b*d^3*x 
^2*cosh(e + f*x))/f^2 + (2*a*b*d^3*x^3*sinh(e + f*x))/f + (6*a*b*c*d^2*x^2 
*sinh(e + f*x))/f - (12*a*b*c*d^2*x*cosh(e + f*x))/f^2 + (6*a*b*c^2*d*x*si 
nh(e + f*x))/f
 

Reduce [B] (verification not implemented)

Time = 0.75 (sec) , antiderivative size = 940, normalized size of antiderivative = 3.97 \[ \int (c+d x)^3 (a+b \cosh (e+f x))^2 \, dx=\frac {4 e^{4 f x +4 e} b^{2} c^{3} f^{3}-192 e^{3 f x +3 e} a b \,d^{3}-192 e^{f x +e} a b \,d^{3}-6 b^{2} c^{2} d \,f^{2}-6 b^{2} c \,d^{2} f -4 b^{2} d^{3} f^{3} x^{3}-6 b^{2} d^{3} f^{2} x^{2}-6 b^{2} d^{3} f x +96 e^{3 f x +3 e} a b \,c^{2} d \,f^{3} x +96 e^{3 f x +3 e} a b c \,d^{2} f^{3} x^{2}+12 e^{4 f x +4 e} b^{2} c^{2} d \,f^{3} x +12 e^{4 f x +4 e} b^{2} c \,d^{2} f^{3} x^{2}-12 e^{4 f x +4 e} b^{2} c \,d^{2} f^{2} x -96 e^{3 f x +3 e} a b \,c^{2} d \,f^{2}+192 e^{3 f x +3 e} a b c \,d^{2} f +32 e^{3 f x +3 e} a b \,d^{3} f^{3} x^{3}-96 e^{3 f x +3 e} a b \,d^{3} f^{2} x^{2}+192 e^{3 f x +3 e} a b \,d^{3} f x +48 e^{2 f x +2 e} a^{2} c^{2} d \,f^{4} x^{2}+32 e^{2 f x +2 e} a^{2} c \,d^{2} f^{4} x^{3}+24 e^{2 f x +2 e} b^{2} c^{2} d \,f^{4} x^{2}+16 e^{2 f x +2 e} b^{2} c \,d^{2} f^{4} x^{3}-96 e^{f x +e} a b \,c^{2} d \,f^{2}-192 e^{f x +e} a b c \,d^{2} f -32 e^{f x +e} a b \,d^{3} f^{3} x^{3}-3 e^{4 f x +4 e} b^{2} d^{3}-4 b^{2} c^{3} f^{3}-96 e^{f x +e} a b \,d^{3} f^{2} x^{2}-192 e^{f x +e} a b \,d^{3} f x -6 e^{4 f x +4 e} b^{2} c^{2} d \,f^{2}+6 e^{4 f x +4 e} b^{2} c \,d^{2} f +4 e^{4 f x +4 e} b^{2} d^{3} f^{3} x^{3}-6 e^{4 f x +4 e} b^{2} d^{3} f^{2} x^{2}+6 e^{4 f x +4 e} b^{2} d^{3} f x +32 e^{3 f x +3 e} a b \,c^{3} f^{3}+32 e^{2 f x +2 e} a^{2} c^{3} f^{4} x +8 e^{2 f x +2 e} a^{2} d^{3} f^{4} x^{4}+16 e^{2 f x +2 e} b^{2} c^{3} f^{4} x +4 e^{2 f x +2 e} b^{2} d^{3} f^{4} x^{4}-32 e^{f x +e} a b \,c^{3} f^{3}-12 b^{2} c^{2} d \,f^{3} x -12 b^{2} c \,d^{2} f^{3} x^{2}-12 b^{2} c \,d^{2} f^{2} x -3 b^{2} d^{3}-192 e^{3 f x +3 e} a b c \,d^{2} f^{2} x -96 e^{f x +e} a b \,c^{2} d \,f^{3} x -96 e^{f x +e} a b c \,d^{2} f^{3} x^{2}-192 e^{f x +e} a b c \,d^{2} f^{2} x}{32 e^{2 f x +2 e} f^{4}} \] Input:

int((d*x+c)^3*(a+b*cosh(f*x+e))^2,x)
 

Output:

(4*e**(4*e + 4*f*x)*b**2*c**3*f**3 + 12*e**(4*e + 4*f*x)*b**2*c**2*d*f**3* 
x - 6*e**(4*e + 4*f*x)*b**2*c**2*d*f**2 + 12*e**(4*e + 4*f*x)*b**2*c*d**2* 
f**3*x**2 - 12*e**(4*e + 4*f*x)*b**2*c*d**2*f**2*x + 6*e**(4*e + 4*f*x)*b* 
*2*c*d**2*f + 4*e**(4*e + 4*f*x)*b**2*d**3*f**3*x**3 - 6*e**(4*e + 4*f*x)* 
b**2*d**3*f**2*x**2 + 6*e**(4*e + 4*f*x)*b**2*d**3*f*x - 3*e**(4*e + 4*f*x 
)*b**2*d**3 + 32*e**(3*e + 3*f*x)*a*b*c**3*f**3 + 96*e**(3*e + 3*f*x)*a*b* 
c**2*d*f**3*x - 96*e**(3*e + 3*f*x)*a*b*c**2*d*f**2 + 96*e**(3*e + 3*f*x)* 
a*b*c*d**2*f**3*x**2 - 192*e**(3*e + 3*f*x)*a*b*c*d**2*f**2*x + 192*e**(3* 
e + 3*f*x)*a*b*c*d**2*f + 32*e**(3*e + 3*f*x)*a*b*d**3*f**3*x**3 - 96*e**( 
3*e + 3*f*x)*a*b*d**3*f**2*x**2 + 192*e**(3*e + 3*f*x)*a*b*d**3*f*x - 192* 
e**(3*e + 3*f*x)*a*b*d**3 + 32*e**(2*e + 2*f*x)*a**2*c**3*f**4*x + 48*e**( 
2*e + 2*f*x)*a**2*c**2*d*f**4*x**2 + 32*e**(2*e + 2*f*x)*a**2*c*d**2*f**4* 
x**3 + 8*e**(2*e + 2*f*x)*a**2*d**3*f**4*x**4 + 16*e**(2*e + 2*f*x)*b**2*c 
**3*f**4*x + 24*e**(2*e + 2*f*x)*b**2*c**2*d*f**4*x**2 + 16*e**(2*e + 2*f* 
x)*b**2*c*d**2*f**4*x**3 + 4*e**(2*e + 2*f*x)*b**2*d**3*f**4*x**4 - 32*e** 
(e + f*x)*a*b*c**3*f**3 - 96*e**(e + f*x)*a*b*c**2*d*f**3*x - 96*e**(e + f 
*x)*a*b*c**2*d*f**2 - 96*e**(e + f*x)*a*b*c*d**2*f**3*x**2 - 192*e**(e + f 
*x)*a*b*c*d**2*f**2*x - 192*e**(e + f*x)*a*b*c*d**2*f - 32*e**(e + f*x)*a* 
b*d**3*f**3*x**3 - 96*e**(e + f*x)*a*b*d**3*f**2*x**2 - 192*e**(e + f*x)*a 
*b*d**3*f*x - 192*e**(e + f*x)*a*b*d**3 - 4*b**2*c**3*f**3 - 12*b**2*c*...