\(\int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx\) [102]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (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 = 23, antiderivative size = 232 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {3 a^2 d (c+d x)^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}+\frac {12 i a^2 d^2 (c+d x) \cosh (e+f x)}{f^3}+\frac {2 i a^2 (c+d x)^3 \cosh (e+f x)}{f}-\frac {12 i a^2 d^3 \sinh (e+f x)}{f^4}-\frac {6 i a^2 d (c+d x)^2 \sinh (e+f x)}{f^2}-\frac {3 a^2 d^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{4 f^3}-\frac {a^2 (c+d x)^3 \cosh (e+f x) \sinh (e+f x)}{2 f}+\frac {3 a^2 d^3 \sinh ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \sinh ^2(e+f x)}{4 f^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.88 (sec) , antiderivative size = 220, normalized size of antiderivative = 0.95 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {a^2 \left (6 f^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )+32 i f (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (6+f^2 x^2\right )\right ) \cosh (e+f x)+3 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))-96 i d \left (c^2 f^2+2 c d f^2 x+d^2 \left (2+f^2 x^2\right )\right ) \sinh (e+f x)-2 f (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 + I*a*Sinh[e + f*x])^2,x]
 

Output:

(a^2*(6*f^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) + (32*I)*f*(c + 
d*x)*(c^2*f^2 + 2*c*d*f^2*x + d^2*(6 + f^2*x^2))*Cosh[e + f*x] + 3*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)] - (96*I)*d*(c 
^2*f^2 + 2*c*d*f^2*x + d^2*(2 + f^2*x^2))*Sinh[e + f*x] - 2*f*(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.58 (sec) , antiderivative size = 232, 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.130, 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+i a \sinh (e+f x))^2 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (c+d x)^3 (a+a \sin (i e+i f x))^2dx\)

\(\Big \downarrow \) 3798

\(\displaystyle \int \left (-a^2 (c+d x)^3 \sinh ^2(e+f x)+2 i a^2 (c+d x)^3 \sinh (e+f x)+a^2 (c+d x)^3\right )dx\)

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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.24 (sec) , antiderivative size = 191, normalized size of antiderivative = 0.82

method result size
parallelrisch \(\frac {2 a^{2} \left (-\frac {\left (\left (d x +c \right )^{2} f^{2}+\frac {3 d^{2}}{2}\right ) \left (d x +c \right ) f \sinh \left (2 f x +2 e \right )}{8}+\frac {3 d \left (\left (d x +c \right )^{2} f^{2}+\frac {d^{2}}{2}\right ) \cosh \left (2 f x +2 e \right )}{16}+i \left (d x +c \right ) \left (\left (d x +c \right )^{2} f^{2}+6 d^{2}\right ) f \cosh \left (f x +e \right )-3 i \left (\left (d x +c \right )^{2} f^{2}+2 d^{2}\right ) d \sinh \left (f x +e \right )+\frac {3 \left (\frac {d x}{2}+c \right ) x \left (\frac {1}{2} x^{2} d^{2}+c d x +c^{2}\right ) f^{4}}{4}+i c^{3} f^{3}-\frac {3 c^{2} d \,f^{2}}{16}+6 i c \,d^{2} f -\frac {3 d^{3}}{32}\right )}{f^{4}}\) \(191\)
risch \(\frac {3 a^{2} d^{3} x^{4}}{8}+\frac {3 a^{2} d^{2} c \,x^{3}}{2}+\frac {9 a^{2} d \,c^{2} x^{2}}{4}+\frac {3 a^{2} c^{3} x}{2}+\frac {3 a^{2} c^{4}}{8 d}-\frac {a^{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 {i a^{2} \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 {i a^{2} \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^{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}}\) \(484\)
parts \(\text {Expression too large to display}\) \(855\)
derivativedivides \(\text {Expression too large to display}\) \(1082\)
default \(\text {Expression too large to display}\) \(1082\)
orering \(\text {Expression too large to display}\) \(1355\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 596 vs. \(2 (212) = 424\).

Time = 0.10 (sec) , antiderivative size = 596, normalized size of antiderivative = 2.57 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {{\left (4 \, a^{2} d^{3} f^{3} x^{3} + 4 \, a^{2} c^{3} f^{3} + 6 \, a^{2} c^{2} d f^{2} + 6 \, a^{2} c d^{2} f + 3 \, a^{2} d^{3} + 6 \, {\left (2 \, a^{2} c d^{2} f^{3} + a^{2} d^{3} f^{2}\right )} x^{2} + 6 \, {\left (2 \, a^{2} c^{2} d f^{3} + 2 \, a^{2} c d^{2} f^{2} + a^{2} d^{3} f\right )} x - {\left (4 \, a^{2} d^{3} f^{3} x^{3} + 4 \, a^{2} c^{3} f^{3} - 6 \, a^{2} c^{2} d f^{2} + 6 \, a^{2} c d^{2} f - 3 \, a^{2} d^{3} + 6 \, {\left (2 \, a^{2} c d^{2} f^{3} - a^{2} d^{3} f^{2}\right )} x^{2} + 6 \, {\left (2 \, a^{2} c^{2} d f^{3} - 2 \, a^{2} c d^{2} f^{2} + a^{2} d^{3} f\right )} x\right )} e^{\left (4 \, f x + 4 \, e\right )} - 32 \, {\left (-i \, a^{2} d^{3} f^{3} x^{3} - i \, a^{2} c^{3} f^{3} + 3 i \, a^{2} c^{2} d f^{2} - 6 i \, a^{2} c d^{2} f + 6 i \, a^{2} d^{3} + 3 \, {\left (-i \, a^{2} c d^{2} f^{3} + i \, a^{2} d^{3} f^{2}\right )} x^{2} + 3 \, {\left (-i \, a^{2} c^{2} d f^{3} + 2 i \, a^{2} c d^{2} f^{2} - 2 i \, a^{2} d^{3} f\right )} x\right )} e^{\left (3 \, f x + 3 \, e\right )} + 12 \, {\left (a^{2} d^{3} f^{4} x^{4} + 4 \, a^{2} c d^{2} f^{4} x^{3} + 6 \, a^{2} c^{2} d f^{4} x^{2} + 4 \, a^{2} c^{3} f^{4} x\right )} e^{\left (2 \, f x + 2 \, e\right )} - 32 \, {\left (-i \, a^{2} d^{3} f^{3} x^{3} - i \, a^{2} c^{3} f^{3} - 3 i \, a^{2} c^{2} d f^{2} - 6 i \, a^{2} c d^{2} f - 6 i \, a^{2} d^{3} + 3 \, {\left (-i \, a^{2} c d^{2} f^{3} - i \, a^{2} d^{3} f^{2}\right )} x^{2} + 3 \, {\left (-i \, a^{2} c^{2} d f^{3} - 2 i \, a^{2} c d^{2} f^{2} - 2 i \, a^{2} d^{3} f\right )} x\right )} e^{\left (f x + e\right )}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{32 \, f^{4}} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.66 (sec) , antiderivative size = 1134, normalized size of antiderivative = 4.89 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx =\text {Too large to display} \] Input:

integrate((d*x+c)**3*(a+I*a*sinh(f*x+e))**2,x)
 

Output:

3*a**2*c**3*x/2 + 9*a**2*c**2*d*x**2/4 + 3*a**2*c*d**2*x**3/2 + 3*a**2*d** 
3*x**4/8 + Piecewise((((128*a**2*c**3*f**15*exp(e) + 384*a**2*c**2*d*f**15 
*x*exp(e) + 192*a**2*c**2*d*f**14*exp(e) + 384*a**2*c*d**2*f**15*x**2*exp( 
e) + 384*a**2*c*d**2*f**14*x*exp(e) + 192*a**2*c*d**2*f**13*exp(e) + 128*a 
**2*d**3*f**15*x**3*exp(e) + 192*a**2*d**3*f**14*x**2*exp(e) + 192*a**2*d* 
*3*f**13*x*exp(e) + 96*a**2*d**3*f**12*exp(e))*exp(-2*f*x) + (-128*a**2*c* 
*3*f**15*exp(5*e) - 384*a**2*c**2*d*f**15*x*exp(5*e) + 192*a**2*c**2*d*f** 
14*exp(5*e) - 384*a**2*c*d**2*f**15*x**2*exp(5*e) + 384*a**2*c*d**2*f**14* 
x*exp(5*e) - 192*a**2*c*d**2*f**13*exp(5*e) - 128*a**2*d**3*f**15*x**3*exp 
(5*e) + 192*a**2*d**3*f**14*x**2*exp(5*e) - 192*a**2*d**3*f**13*x*exp(5*e) 
 + 96*a**2*d**3*f**12*exp(5*e))*exp(2*f*x) + (1024*I*a**2*c**3*f**15*exp(2 
*e) + 3072*I*a**2*c**2*d*f**15*x*exp(2*e) + 3072*I*a**2*c**2*d*f**14*exp(2 
*e) + 3072*I*a**2*c*d**2*f**15*x**2*exp(2*e) + 6144*I*a**2*c*d**2*f**14*x* 
exp(2*e) + 6144*I*a**2*c*d**2*f**13*exp(2*e) + 1024*I*a**2*d**3*f**15*x**3 
*exp(2*e) + 3072*I*a**2*d**3*f**14*x**2*exp(2*e) + 6144*I*a**2*d**3*f**13* 
x*exp(2*e) + 6144*I*a**2*d**3*f**12*exp(2*e))*exp(-f*x) + (1024*I*a**2*c** 
3*f**15*exp(4*e) + 3072*I*a**2*c**2*d*f**15*x*exp(4*e) - 3072*I*a**2*c**2* 
d*f**14*exp(4*e) + 3072*I*a**2*c*d**2*f**15*x**2*exp(4*e) - 6144*I*a**2*c* 
d**2*f**14*x*exp(4*e) + 6144*I*a**2*c*d**2*f**13*exp(4*e) + 1024*I*a**2*d* 
*3*f**15*x**3*exp(4*e) - 3072*I*a**2*d**3*f**14*x**2*exp(4*e) + 6144*I*...
 

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 525 vs. \(2 (212) = 424\).

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

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

Giac [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 580 vs. \(2 (212) = 424\).

Time = 0.14 (sec) , antiderivative size = 580, normalized size of antiderivative = 2.50 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {3}{8} \, a^{2} d^{3} x^{4} + \frac {3}{2} \, a^{2} c d^{2} x^{3} + \frac {9}{4} \, a^{2} c^{2} d x^{2} + \frac {3}{2} \, a^{2} c^{3} x - \frac {{\left (4 \, a^{2} d^{3} f^{3} x^{3} + 12 \, a^{2} c d^{2} f^{3} x^{2} + 12 \, a^{2} c^{2} d f^{3} x - 6 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c^{3} f^{3} - 12 \, a^{2} c d^{2} f^{2} x - 6 \, a^{2} c^{2} d f^{2} + 6 \, a^{2} d^{3} f x + 6 \, a^{2} c d^{2} f - 3 \, a^{2} d^{3}\right )} e^{\left (2 \, f x + 2 \, e\right )}}{32 \, f^{4}} + \frac {{\left (i \, a^{2} d^{3} f^{3} x^{3} + 3 i \, a^{2} c d^{2} f^{3} x^{2} + 3 i \, a^{2} c^{2} d f^{3} x - 3 i \, a^{2} d^{3} f^{2} x^{2} + i \, a^{2} c^{3} f^{3} - 6 i \, a^{2} c d^{2} f^{2} x - 3 i \, a^{2} c^{2} d f^{2} + 6 i \, a^{2} d^{3} f x + 6 i \, a^{2} c d^{2} f - 6 i \, a^{2} d^{3}\right )} e^{\left (f x + e\right )}}{f^{4}} + \frac {{\left (i \, a^{2} d^{3} f^{3} x^{3} + 3 i \, a^{2} c d^{2} f^{3} x^{2} + 3 i \, a^{2} c^{2} d f^{3} x + 3 i \, a^{2} d^{3} f^{2} x^{2} + i \, a^{2} c^{3} f^{3} + 6 i \, a^{2} c d^{2} f^{2} x + 3 i \, a^{2} c^{2} d f^{2} + 6 i \, a^{2} d^{3} f x + 6 i \, a^{2} c d^{2} f + 6 i \, a^{2} d^{3}\right )} e^{\left (-f x - e\right )}}{f^{4}} + \frac {{\left (4 \, a^{2} d^{3} f^{3} x^{3} + 12 \, a^{2} c d^{2} f^{3} x^{2} + 12 \, a^{2} c^{2} d f^{3} x + 6 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c^{3} f^{3} + 12 \, a^{2} c d^{2} f^{2} x + 6 \, a^{2} c^{2} d f^{2} + 6 \, a^{2} d^{3} f x + 6 \, a^{2} c d^{2} f + 3 \, a^{2} d^{3}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{32 \, f^{4}} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 2.06 (sec) , antiderivative size = 393, normalized size of antiderivative = 1.69 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {a^2\,\left (3\,d^3\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )+24\,c^3\,f^4\,x-4\,c^3\,f^3\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )+6\,d^3\,f^4\,x^4+6\,c^2\,d\,f^2\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )+36\,c^2\,d\,f^4\,x^2+24\,c\,d^2\,f^4\,x^3+6\,d^3\,f^2\,x^2\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )-4\,d^3\,f^3\,x^3\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )-6\,c\,d^2\,f\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )-6\,d^3\,f\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )+12\,c\,d^2\,f^2\,x\,\mathrm {cosh}\left (2\,e+2\,f\,x\right )-12\,c^2\,d\,f^3\,x\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )-12\,c\,d^2\,f^3\,x^2\,\mathrm {sinh}\left (2\,e+2\,f\,x\right )-d^3\,\mathrm {sinh}\left (e+f\,x\right )\,192{}\mathrm {i}+c^3\,f^3\,\mathrm {cosh}\left (e+f\,x\right )\,32{}\mathrm {i}+d^3\,f^3\,x^3\,\mathrm {cosh}\left (e+f\,x\right )\,32{}\mathrm {i}-d^3\,f^2\,x^2\,\mathrm {sinh}\left (e+f\,x\right )\,96{}\mathrm {i}+c\,d^2\,f\,\mathrm {cosh}\left (e+f\,x\right )\,192{}\mathrm {i}+d^3\,f\,x\,\mathrm {cosh}\left (e+f\,x\right )\,192{}\mathrm {i}-c^2\,d\,f^2\,\mathrm {sinh}\left (e+f\,x\right )\,96{}\mathrm {i}+c^2\,d\,f^3\,x\,\mathrm {cosh}\left (e+f\,x\right )\,96{}\mathrm {i}-c\,d^2\,f^2\,x\,\mathrm {sinh}\left (e+f\,x\right )\,192{}\mathrm {i}+c\,d^2\,f^3\,x^2\,\mathrm {cosh}\left (e+f\,x\right )\,96{}\mathrm {i}\right )}{16\,f^4} \] Input:

int((a + a*sinh(e + f*x)*1i)^2*(c + d*x)^3,x)
 

Output:

(a^2*(3*d^3*cosh(2*e + 2*f*x) - d^3*sinh(e + f*x)*192i + c^3*f^3*cosh(e + 
f*x)*32i + 24*c^3*f^4*x - 4*c^3*f^3*sinh(2*e + 2*f*x) + 6*d^3*f^4*x^4 + 6* 
c^2*d*f^2*cosh(2*e + 2*f*x) + 36*c^2*d*f^4*x^2 + 24*c*d^2*f^4*x^3 + d^3*f^ 
3*x^3*cosh(e + f*x)*32i - d^3*f^2*x^2*sinh(e + f*x)*96i + c*d^2*f*cosh(e + 
 f*x)*192i + d^3*f*x*cosh(e + f*x)*192i + 6*d^3*f^2*x^2*cosh(2*e + 2*f*x) 
- 4*d^3*f^3*x^3*sinh(2*e + 2*f*x) - 6*c*d^2*f*sinh(2*e + 2*f*x) - c^2*d*f^ 
2*sinh(e + f*x)*96i - 6*d^3*f*x*sinh(2*e + 2*f*x) + c^2*d*f^3*x*cosh(e + f 
*x)*96i - c*d^2*f^2*x*sinh(e + f*x)*192i + 12*c*d^2*f^2*x*cosh(2*e + 2*f*x 
) + c*d^2*f^3*x^2*cosh(e + f*x)*96i - 12*c^2*d*f^3*x*sinh(2*e + 2*f*x) - 1 
2*c*d^2*f^3*x^2*sinh(2*e + 2*f*x)))/(16*f^4)
 

Reduce [B] (verification not implemented)

Time = 0.87 (sec) , antiderivative size = 755, normalized size of antiderivative = 3.25 \[ \int (c+d x)^3 (a+i a \sinh (e+f x))^2 \, dx=\frac {a^{2} \left (3 d^{3}+6 e^{4 f x +4 e} c^{2} d \,f^{2}-6 e^{4 f x +4 e} c \,d^{2} f -4 e^{4 f x +4 e} d^{3} f^{3} x^{3}+6 e^{4 f x +4 e} d^{3} f^{2} x^{2}-6 e^{4 f x +4 e} d^{3} f x +32 e^{3 f x +3 e} c^{3} f^{3} i +48 e^{2 f x +2 e} c^{3} f^{4} x +12 e^{2 f x +2 e} d^{3} f^{4} x^{4}+32 e^{f x +e} c^{3} f^{3} i +12 c^{2} d \,f^{3} x +12 c \,d^{2} f^{3} x^{2}+12 c \,d^{2} f^{2} x +96 e^{f x +e} d^{3} f^{2} i \,x^{2}+192 e^{f x +e} d^{3} f i x +96 e^{3 f x +3 e} c^{2} d \,f^{3} i x +96 e^{3 f x +3 e} c \,d^{2} f^{3} i \,x^{2}-192 e^{3 f x +3 e} c \,d^{2} f^{2} i x +96 e^{f x +e} c^{2} d \,f^{3} i x +96 e^{f x +e} c \,d^{2} f^{3} i \,x^{2}+192 e^{f x +e} c \,d^{2} f^{2} i x -4 e^{4 f x +4 e} c^{3} f^{3}-192 e^{3 f x +3 e} d^{3} i +192 e^{f x +e} d^{3} i +6 c^{2} d \,f^{2}+6 c \,d^{2} f +4 d^{3} f^{3} x^{3}+6 d^{3} f^{2} x^{2}+6 d^{3} f x -12 e^{4 f x +4 e} c^{2} d \,f^{3} x -12 e^{4 f x +4 e} c \,d^{2} f^{3} x^{2}+12 e^{4 f x +4 e} c \,d^{2} f^{2} x -96 e^{3 f x +3 e} c^{2} d \,f^{2} i +192 e^{3 f x +3 e} c \,d^{2} f i +32 e^{3 f x +3 e} d^{3} f^{3} i \,x^{3}-96 e^{3 f x +3 e} d^{3} f^{2} i \,x^{2}+192 e^{3 f x +3 e} d^{3} f i x +72 e^{2 f x +2 e} c^{2} d \,f^{4} x^{2}+48 e^{2 f x +2 e} c \,d^{2} f^{4} x^{3}+96 e^{f x +e} c^{2} d \,f^{2} i +192 e^{f x +e} c \,d^{2} f i +32 e^{f x +e} d^{3} f^{3} i \,x^{3}+3 e^{4 f x +4 e} d^{3}+4 c^{3} f^{3}\right )}{32 e^{2 f x +2 e} f^{4}} \] Input:

int((d*x+c)^3*(a+I*a*sinh(f*x+e))^2,x)
 

Output:

(a**2*( - 4*e**(4*e + 4*f*x)*c**3*f**3 - 12*e**(4*e + 4*f*x)*c**2*d*f**3*x 
 + 6*e**(4*e + 4*f*x)*c**2*d*f**2 - 12*e**(4*e + 4*f*x)*c*d**2*f**3*x**2 + 
 12*e**(4*e + 4*f*x)*c*d**2*f**2*x - 6*e**(4*e + 4*f*x)*c*d**2*f - 4*e**(4 
*e + 4*f*x)*d**3*f**3*x**3 + 6*e**(4*e + 4*f*x)*d**3*f**2*x**2 - 6*e**(4*e 
 + 4*f*x)*d**3*f*x + 3*e**(4*e + 4*f*x)*d**3 + 32*e**(3*e + 3*f*x)*c**3*f* 
*3*i + 96*e**(3*e + 3*f*x)*c**2*d*f**3*i*x - 96*e**(3*e + 3*f*x)*c**2*d*f* 
*2*i + 96*e**(3*e + 3*f*x)*c*d**2*f**3*i*x**2 - 192*e**(3*e + 3*f*x)*c*d** 
2*f**2*i*x + 192*e**(3*e + 3*f*x)*c*d**2*f*i + 32*e**(3*e + 3*f*x)*d**3*f* 
*3*i*x**3 - 96*e**(3*e + 3*f*x)*d**3*f**2*i*x**2 + 192*e**(3*e + 3*f*x)*d* 
*3*f*i*x - 192*e**(3*e + 3*f*x)*d**3*i + 48*e**(2*e + 2*f*x)*c**3*f**4*x + 
 72*e**(2*e + 2*f*x)*c**2*d*f**4*x**2 + 48*e**(2*e + 2*f*x)*c*d**2*f**4*x* 
*3 + 12*e**(2*e + 2*f*x)*d**3*f**4*x**4 + 32*e**(e + f*x)*c**3*f**3*i + 96 
*e**(e + f*x)*c**2*d*f**3*i*x + 96*e**(e + f*x)*c**2*d*f**2*i + 96*e**(e + 
 f*x)*c*d**2*f**3*i*x**2 + 192*e**(e + f*x)*c*d**2*f**2*i*x + 192*e**(e + 
f*x)*c*d**2*f*i + 32*e**(e + f*x)*d**3*f**3*i*x**3 + 96*e**(e + f*x)*d**3* 
f**2*i*x**2 + 192*e**(e + f*x)*d**3*f*i*x + 192*e**(e + f*x)*d**3*i + 4*c* 
*3*f**3 + 12*c**2*d*f**3*x + 6*c**2*d*f**2 + 12*c*d**2*f**3*x**2 + 12*c*d* 
*2*f**2*x + 6*c*d**2*f + 4*d**3*f**3*x**3 + 6*d**3*f**2*x**2 + 6*d**3*f*x 
+ 3*d**3))/(32*e**(2*e + 2*f*x)*f**4)