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

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 = 168 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\frac {a^2 d^2 x}{4 f^2}+\frac {a^2 (c+d x)^3}{2 d}-\frac {4 a^2 d (c+d x) \cosh (e+f x)}{f^2}-\frac {a^2 d (c+d x) \cosh ^2(e+f x)}{2 f^2}+\frac {4 a^2 d^2 \sinh (e+f x)}{f^3}+\frac {2 a^2 (c+d x)^2 \sinh (e+f x)}{f}+\frac {a^2 d^2 \cosh (e+f x) \sinh (e+f x)}{4 f^3}+\frac {a^2 (c+d x)^2 \cosh (e+f x) \sinh (e+f x)}{2 f} \] Output:

1/4*a^2*d^2*x/f^2+1/2*a^2*(d*x+c)^3/d-4*a^2*d*(d*x+c)*cosh(f*x+e)/f^2-1/2* 
a^2*d*(d*x+c)*cosh(f*x+e)^2/f^2+4*a^2*d^2*sinh(f*x+e)/f^3+2*a^2*(d*x+c)^2* 
sinh(f*x+e)/f+1/4*a^2*d^2*cosh(f*x+e)*sinh(f*x+e)/f^3+1/2*a^2*(d*x+c)^2*co 
sh(f*x+e)*sinh(f*x+e)/f
 

Mathematica [A] (verified)

Time = 0.41 (sec) , antiderivative size = 192, normalized size of antiderivative = 1.14 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\frac {a^2 \left (12 c^2 f^3 x+12 c d f^3 x^2+4 d^2 f^3 x^3-32 d f (c+d x) \cosh (e+f x)-2 d f (c+d x) \cosh (2 (e+f x))+32 d^2 \sinh (e+f x)+16 c^2 f^2 \sinh (e+f x)+32 c d f^2 x \sinh (e+f x)+16 d^2 f^2 x^2 \sinh (e+f x)+d^2 \sinh (2 (e+f x))+2 c^2 f^2 \sinh (2 (e+f x))+4 c d f^2 x \sinh (2 (e+f x))+2 d^2 f^2 x^2 \sinh (2 (e+f x))\right )}{8 f^3} \] Input:

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

Output:

(a^2*(12*c^2*f^3*x + 12*c*d*f^3*x^2 + 4*d^2*f^3*x^3 - 32*d*f*(c + d*x)*Cos 
h[e + f*x] - 2*d*f*(c + d*x)*Cosh[2*(e + f*x)] + 32*d^2*Sinh[e + f*x] + 16 
*c^2*f^2*Sinh[e + f*x] + 32*c*d*f^2*x*Sinh[e + f*x] + 16*d^2*f^2*x^2*Sinh[ 
e + f*x] + d^2*Sinh[2*(e + f*x)] + 2*c^2*f^2*Sinh[2*(e + f*x)] + 4*c*d*f^2 
*x*Sinh[2*(e + f*x)] + 2*d^2*f^2*x^2*Sinh[2*(e + f*x)]))/(8*f^3)
 

Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 168, 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)^2 (a \cosh (e+f x)+a)^2 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3798

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

(a^2*d^2*x)/(4*f^2) + (a^2*(c + d*x)^3)/(2*d) - (4*a^2*d*(c + d*x)*Cosh[e 
+ f*x])/f^2 - (a^2*d*(c + d*x)*Cosh[e + f*x]^2)/(2*f^2) + (4*a^2*d^2*Sinh[ 
e + f*x])/f^3 + (2*a^2*(c + d*x)^2*Sinh[e + f*x])/f + (a^2*d^2*Cosh[e + f* 
x]*Sinh[e + f*x])/(4*f^3) + (a^2*(c + d*x)^2*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.34 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.73

method result size
parallelrisch \(\frac {\left (\left (\left (d x +c \right )^{2} f^{2}+\frac {d^{2}}{2}\right ) \sinh \left (2 f x +2 e \right )-d f \left (d x +c \right ) \cosh \left (2 f x +2 e \right )+8 \left (\left (d x +c \right )^{2} f^{2}+2 d^{2}\right ) \sinh \left (f x +e \right )+6 \left (-\frac {8 d \left (d x +c \right ) \cosh \left (f x +e \right )}{3}+x \left (\frac {1}{3} x^{2} d^{2}+c d x +c^{2}\right ) f^{2}+\frac {17 c d}{6}\right ) f \right ) a^{2}}{4 f^{3}}\) \(123\)
risch \(\frac {a^{2} d^{2} x^{3}}{2}+\frac {3 a^{2} d c \,x^{2}}{2}+\frac {3 a^{2} c^{2} x}{2}+\frac {a^{2} c^{3}}{2 d}+\frac {a^{2} \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}-2 d^{2} f x -2 c d f +d^{2}\right ) {\mathrm e}^{2 f x +2 e}}{16 f^{3}}+\frac {a^{2} \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2} f x -2 c d f +2 d^{2}\right ) {\mathrm e}^{f x +e}}{f^{3}}-\frac {a^{2} \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}+2 d^{2} f x +2 c d f +2 d^{2}\right ) {\mathrm e}^{-f x -e}}{f^{3}}-\frac {a^{2} \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}+2 d^{2} f x +2 c d f +d^{2}\right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{3}}\) \(279\)
parts \(\frac {a^{2} \left (d x +c \right )^{3}}{3 d}+\frac {a^{2} \left (\frac {d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d^{2} e^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {2 c d \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}-\frac {2 c d e \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {2 a^{2} \left (\frac {d^{2} \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}+\frac {2 d c \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {d^{2} e^{2} \sinh \left (f x +e \right )}{f^{2}}-\frac {2 d e c \sinh \left (f x +e \right )}{f}+c^{2} \sinh \left (f x +e \right )\right )}{f}\) \(431\)
derivativedivides \(\frac {\frac {d^{2} a^{2} \left (f x +e \right )^{3}}{3 f^{2}}+\frac {2 d^{2} a^{2} \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d^{2} a^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {d^{2} e \,a^{2} \left (f x +e \right )^{2}}{f^{2}}-\frac {4 d^{2} e \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d c \,a^{2} \left (f x +e \right )^{2}}{f}+\frac {4 d c \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {2 d c \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}+\frac {d^{2} e^{2} a^{2} \left (f x +e \right )}{f^{2}}+\frac {2 d^{2} e^{2} a^{2} \sinh \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}-\frac {2 d e c \,a^{2} \left (f x +e \right )}{f}-\frac {4 d e c \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {2 d e c \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c^{2} a^{2} \left (f x +e \right )+2 c^{2} a^{2} \sinh \left (f x +e \right )+c^{2} a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(541\)
default \(\frac {\frac {d^{2} a^{2} \left (f x +e \right )^{3}}{3 f^{2}}+\frac {2 d^{2} a^{2} \left (\left (f x +e \right )^{2} \sinh \left (f x +e \right )-2 \left (f x +e \right ) \cosh \left (f x +e \right )+2 \sinh \left (f x +e \right )\right )}{f^{2}}+\frac {d^{2} a^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right )^{2}}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}-\frac {d^{2} e \,a^{2} \left (f x +e \right )^{2}}{f^{2}}-\frac {4 d^{2} e \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f^{2}}-\frac {2 d^{2} e \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f^{2}}+\frac {d c \,a^{2} \left (f x +e \right )^{2}}{f}+\frac {4 d c \,a^{2} \left (\left (f x +e \right ) \sinh \left (f x +e \right )-\cosh \left (f x +e \right )\right )}{f}+\frac {2 d c \,a^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {\left (f x +e \right )^{2}}{4}-\frac {\cosh \left (f x +e \right )^{2}}{4}\right )}{f}+\frac {d^{2} e^{2} a^{2} \left (f x +e \right )}{f^{2}}+\frac {2 d^{2} e^{2} a^{2} \sinh \left (f x +e \right )}{f^{2}}+\frac {d^{2} e^{2} a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}-\frac {2 d e c \,a^{2} \left (f x +e \right )}{f}-\frac {4 d e c \,a^{2} \sinh \left (f x +e \right )}{f}-\frac {2 d e c \,a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+c^{2} a^{2} \left (f x +e \right )+2 c^{2} a^{2} \sinh \left (f x +e \right )+c^{2} a^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) \(541\)
orering \(\text {Expression too large to display}\) \(1070\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 456 vs. \(2 (163) = 326\).

Time = 0.36 (sec) , antiderivative size = 456, normalized size of antiderivative = 2.71 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\begin {cases} - \frac {a^{2} c^{2} x \sinh ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c^{2} x \cosh ^{2}{\left (e + f x \right )}}{2} + a^{2} c^{2} x + \frac {a^{2} c^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} c^{2} \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} c d x^{2} \sinh ^{2}{\left (e + f x \right )}}{2} + \frac {a^{2} c d x^{2} \cosh ^{2}{\left (e + f x \right )}}{2} + a^{2} c d x^{2} + \frac {a^{2} c d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{f} + \frac {4 a^{2} c d x \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} c d \sinh ^{2}{\left (e + f x \right )}}{2 f^{2}} - \frac {4 a^{2} c d \cosh {\left (e + f x \right )}}{f^{2}} - \frac {a^{2} d^{2} x^{3} \sinh ^{2}{\left (e + f x \right )}}{6} + \frac {a^{2} d^{2} x^{3} \cosh ^{2}{\left (e + f x \right )}}{6} + \frac {a^{2} d^{2} x^{3}}{3} + \frac {a^{2} d^{2} x^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {2 a^{2} d^{2} x^{2} \sinh {\left (e + f x \right )}}{f} - \frac {a^{2} d^{2} x \sinh ^{2}{\left (e + f x \right )}}{4 f^{2}} - \frac {a^{2} d^{2} x \cosh ^{2}{\left (e + f x \right )}}{4 f^{2}} - \frac {4 a^{2} d^{2} x \cosh {\left (e + f x \right )}}{f^{2}} + \frac {a^{2} d^{2} \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{4 f^{3}} + \frac {4 a^{2} d^{2} \sinh {\left (e + f x \right )}}{f^{3}} & \text {for}\: f \neq 0 \\\left (a \cosh {\left (e \right )} + a\right )^{2} \left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((-a**2*c**2*x*sinh(e + f*x)**2/2 + a**2*c**2*x*cosh(e + f*x)**2/ 
2 + a**2*c**2*x + a**2*c**2*sinh(e + f*x)*cosh(e + f*x)/(2*f) + 2*a**2*c** 
2*sinh(e + f*x)/f - a**2*c*d*x**2*sinh(e + f*x)**2/2 + a**2*c*d*x**2*cosh( 
e + f*x)**2/2 + a**2*c*d*x**2 + a**2*c*d*x*sinh(e + f*x)*cosh(e + f*x)/f + 
 4*a**2*c*d*x*sinh(e + f*x)/f - a**2*c*d*sinh(e + f*x)**2/(2*f**2) - 4*a** 
2*c*d*cosh(e + f*x)/f**2 - a**2*d**2*x**3*sinh(e + f*x)**2/6 + a**2*d**2*x 
**3*cosh(e + f*x)**2/6 + a**2*d**2*x**3/3 + a**2*d**2*x**2*sinh(e + f*x)*c 
osh(e + f*x)/(2*f) + 2*a**2*d**2*x**2*sinh(e + f*x)/f - a**2*d**2*x*sinh(e 
 + f*x)**2/(4*f**2) - a**2*d**2*x*cosh(e + f*x)**2/(4*f**2) - 4*a**2*d**2* 
x*cosh(e + f*x)/f**2 + a**2*d**2*sinh(e + f*x)*cosh(e + f*x)/(4*f**3) + 4* 
a**2*d**2*sinh(e + f*x)/f**3, Ne(f, 0)), ((a*cosh(e) + a)**2*(c**2*x + c*d 
*x**2 + d**2*x**3/3), True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 327 vs. \(2 (158) = 316\).

Time = 0.05 (sec) , antiderivative size = 327, normalized size of antiderivative = 1.95 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\frac {1}{3} \, a^{2} d^{2} x^{3} + a^{2} c d x^{2} + \frac {1}{8} \, {\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 )} a^{2} c d + \frac {1}{48} \, {\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 )} a^{2} d^{2} + \frac {1}{8} \, a^{2} c^{2} {\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^{2} x + 2 \, a^{2} c 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 )} + a^{2} 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 )} + \frac {2 \, a^{2} c^{2} \sinh \left (f x + e\right )}{f} \] Input:

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

Output:

1/3*a^2*d^2*x^3 + a^2*c*d*x^2 + 1/8*(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)*a^2*c*d + 1/48*(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)*a^2*d^2 + 1/8*a^2*c^2*(4*x + e^(2*f*x + 
 2*e)/f - e^(-2*f*x - 2*e)/f) + a^2*c^2*x + 2*a^2*c*d*((f*x*e^e - e^e)*e^( 
f*x)/f^2 - (f*x + 1)*e^(-f*x - e)/f^2) + a^2*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) + 2*a^2*c^ 
2*sinh(f*x + e)/f
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 329 vs. \(2 (158) = 316\).

Time = 0.12 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.96 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\frac {1}{2} \, a^{2} d^{2} x^{3} + \frac {3}{2} \, a^{2} c d x^{2} + \frac {3}{2} \, a^{2} c^{2} x + \frac {{\left (2 \, a^{2} d^{2} f^{2} x^{2} + 4 \, a^{2} c d f^{2} x + 2 \, a^{2} c^{2} f^{2} - 2 \, a^{2} d^{2} f x - 2 \, a^{2} c d f + a^{2} d^{2}\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{3}} + \frac {{\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2} - 2 \, a^{2} d^{2} f x - 2 \, a^{2} c d f + 2 \, a^{2} d^{2}\right )} e^{\left (f x + e\right )}}{f^{3}} - \frac {{\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2} + 2 \, a^{2} d^{2} f x + 2 \, a^{2} c d f + 2 \, a^{2} d^{2}\right )} e^{\left (-f x - e\right )}}{f^{3}} - \frac {{\left (2 \, a^{2} d^{2} f^{2} x^{2} + 4 \, a^{2} c d f^{2} x + 2 \, a^{2} c^{2} f^{2} + 2 \, a^{2} d^{2} f x + 2 \, a^{2} c d f + a^{2} d^{2}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{3}} \] Input:

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

Output:

1/2*a^2*d^2*x^3 + 3/2*a^2*c*d*x^2 + 3/2*a^2*c^2*x + 1/16*(2*a^2*d^2*f^2*x^ 
2 + 4*a^2*c*d*f^2*x + 2*a^2*c^2*f^2 - 2*a^2*d^2*f*x - 2*a^2*c*d*f + a^2*d^ 
2)*e^(2*f*x + 2*e)/f^3 + (a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2 
- 2*a^2*d^2*f*x - 2*a^2*c*d*f + 2*a^2*d^2)*e^(f*x + e)/f^3 - (a^2*d^2*f^2* 
x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2 + 2*a^2*d^2*f*x + 2*a^2*c*d*f + 2*a^2* 
d^2)*e^(-f*x - e)/f^3 - 1/16*(2*a^2*d^2*f^2*x^2 + 4*a^2*c*d*f^2*x + 2*a^2* 
c^2*f^2 + 2*a^2*d^2*f*x + 2*a^2*c*d*f + a^2*d^2)*e^(-2*f*x - 2*e)/f^3
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 418, normalized size of antiderivative = 2.49 \[ \int (c+d x)^2 (a+a \cosh (e+f x))^2 \, dx=\frac {a^{2} \left (e^{4 f x +4 e} d^{2}+32 e^{3 f x +3 e} d^{2}-32 e^{f x +e} d^{2}-2 c^{2} f^{2}-d^{2}+4 e^{4 f x +4 e} c d \,f^{2} x +32 e^{3 f x +3 e} c d \,f^{2} x +24 e^{2 f x +2 e} c d \,f^{3} x^{2}-32 e^{f x +e} c d \,f^{2} x -2 e^{4 f x +4 e} c d f +2 e^{4 f x +4 e} d^{2} f^{2} x^{2}-2 e^{4 f x +4 e} d^{2} f x -32 e^{3 f x +3 e} c d f +16 e^{3 f x +3 e} d^{2} f^{2} x^{2}-32 e^{3 f x +3 e} d^{2} f x +24 e^{2 f x +2 e} c^{2} f^{3} x +8 e^{2 f x +2 e} d^{2} f^{3} x^{3}-32 e^{f x +e} c d f -16 e^{f x +e} d^{2} f^{2} x^{2}-32 e^{f x +e} d^{2} f x -4 c d \,f^{2} x +2 e^{4 f x +4 e} c^{2} f^{2}+16 e^{3 f x +3 e} c^{2} f^{2}-16 e^{f x +e} c^{2} f^{2}-2 c d f -2 d^{2} f^{2} x^{2}-2 d^{2} f x \right )}{16 e^{2 f x +2 e} f^{3}} \] Input:

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

Output:

(a**2*(2*e**(4*e + 4*f*x)*c**2*f**2 + 4*e**(4*e + 4*f*x)*c*d*f**2*x - 2*e* 
*(4*e + 4*f*x)*c*d*f + 2*e**(4*e + 4*f*x)*d**2*f**2*x**2 - 2*e**(4*e + 4*f 
*x)*d**2*f*x + e**(4*e + 4*f*x)*d**2 + 16*e**(3*e + 3*f*x)*c**2*f**2 + 32* 
e**(3*e + 3*f*x)*c*d*f**2*x - 32*e**(3*e + 3*f*x)*c*d*f + 16*e**(3*e + 3*f 
*x)*d**2*f**2*x**2 - 32*e**(3*e + 3*f*x)*d**2*f*x + 32*e**(3*e + 3*f*x)*d* 
*2 + 24*e**(2*e + 2*f*x)*c**2*f**3*x + 24*e**(2*e + 2*f*x)*c*d*f**3*x**2 + 
 8*e**(2*e + 2*f*x)*d**2*f**3*x**3 - 16*e**(e + f*x)*c**2*f**2 - 32*e**(e 
+ f*x)*c*d*f**2*x - 32*e**(e + f*x)*c*d*f - 16*e**(e + f*x)*d**2*f**2*x**2 
 - 32*e**(e + f*x)*d**2*f*x - 32*e**(e + f*x)*d**2 - 2*c**2*f**2 - 4*c*d*f 
**2*x - 2*c*d*f - 2*d**2*f**2*x**2 - 2*d**2*f*x - d**2))/(16*e**(2*e + 2*f 
*x)*f**3)