\(\int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx\) [267]

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

Optimal result

Integrand size = 29, antiderivative size = 98 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {i f x}{4 a d}-\frac {f \cosh (c+d x)}{a d^2}+\frac {(e+f x) \sinh (c+d x)}{a d}+\frac {i f \cosh (c+d x) \sinh (c+d x)}{4 a d^2}-\frac {i (e+f x) \sinh ^2(c+d x)}{2 a d} \] Output:

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

Mathematica [A] (verified)

Time = 2.95 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.61 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {i f \cosh (c+d x) (4 i+\sinh (c+d x))+d (e+f x) (-i \cosh (2 (c+d x))+4 \sinh (c+d x))}{4 a d^2} \] Input:

Integrate[((e + f*x)*Cosh[c + d*x]^3)/(a + I*a*Sinh[c + d*x]),x]
 

Output:

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

Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.96, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.414, Rules used = {6097, 3042, 3777, 26, 3042, 26, 3118, 5969, 3042, 25, 3115, 24}

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 \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

\(\Big \downarrow \) 6097

\(\displaystyle \frac {\int (e+f x) \cosh (c+d x)dx}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3777

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {i f \int -i \sinh (c+d x)dx}{d}}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \int \sinh (c+d x)dx}{d}}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \int -i \sin (i c+i d x)dx}{d}}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 26

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}+\frac {i f \int \sin (i c+i d x)dx}{d}}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 3118

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \cosh (c+d x)}{d^2}}{a}-\frac {i \int (e+f x) \cosh (c+d x) \sinh (c+d x)dx}{a}\)

\(\Big \downarrow \) 5969

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 3115

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \cosh (c+d x)}{d^2}}{a}-\frac {i \left (\frac {f \left (\frac {\int 1dx}{2}-\frac {\sinh (c+d x) \cosh (c+d x)}{2 d}\right )}{2 d}+\frac {(e+f x) \sinh ^2(c+d x)}{2 d}\right )}{a}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \cosh (c+d x)}{d^2}}{a}-\frac {i \left (\frac {(e+f x) \sinh ^2(c+d x)}{2 d}+\frac {f \left (\frac {x}{2}-\frac {\sinh (c+d x) \cosh (c+d x)}{2 d}\right )}{2 d}\right )}{a}\)

Input:

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

Output:

(-((f*Cosh[c + d*x])/d^2) + ((e + f*x)*Sinh[c + d*x])/d)/a - (I*(((e + f*x 
)*Sinh[c + d*x]^2)/(2*d) + (f*(x/2 - (Cosh[c + d*x]*Sinh[c + d*x])/(2*d))) 
/(2*d)))/a
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 26
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a])   I 
nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
 

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

rule 3115
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* 
x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n)   Int[(b*Sin 
[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 
2*n]
 

rule 3118
Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ 
[{c, d}, x]
 

rule 3777
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( 
-(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f)   Int[(c + d*x)^(m - 1)*C 
os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
 

rule 5969
Int[Cosh[(a_.) + (b_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.)*Sinh[(a_.) + (b_.)* 
(x_)]^(n_.), x_Symbol] :> Simp[(c + d*x)^m*(Sinh[a + b*x]^(n + 1)/(b*(n + 1 
))), x] - Simp[d*(m/(b*(n + 1)))   Int[(c + d*x)^(m - 1)*Sinh[a + b*x]^(n + 
 1), x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && NeQ[n, -1]
 

rule 6097
Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_. 
)*Sinh[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a   Int[(e + f*x)^m*Cosh[c 
 + d*x]^(n - 2), x], x] + Simp[1/b   Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2)* 
Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && E 
qQ[a^2 + b^2, 0]
 
Maple [A] (verified)

Time = 5.76 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.15

method result size
risch \(-\frac {i \left (2 d x f +2 d e -f \right ) {\mathrm e}^{2 d x +2 c}}{16 a \,d^{2}}+\frac {\left (d x f +d e -f \right ) {\mathrm e}^{d x +c}}{2 a \,d^{2}}-\frac {\left (d x f +d e +f \right ) {\mathrm e}^{-d x -c}}{2 a \,d^{2}}-\frac {i \left (2 d x f +2 d e +f \right ) {\mathrm e}^{-2 d x -2 c}}{16 a \,d^{2}}\) \(113\)
derivativedivides \(\frac {\frac {i c f \cosh \left (d x +c \right )^{2}}{2}-\frac {i d e \cosh \left (d x +c \right )^{2}}{2}-i f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )-\sinh \left (d x +c \right ) c f +\sinh \left (d x +c \right ) d e +f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) \(118\)
default \(\frac {\frac {i c f \cosh \left (d x +c \right )^{2}}{2}-\frac {i d e \cosh \left (d x +c \right )^{2}}{2}-i f \left (\frac {\left (d x +c \right ) \cosh \left (d x +c \right )^{2}}{2}-\frac {\sinh \left (d x +c \right ) \cosh \left (d x +c \right )}{4}-\frac {d x}{4}-\frac {c}{4}\right )-\sinh \left (d x +c \right ) c f +\sinh \left (d x +c \right ) d e +f \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d^{2} a}\) \(118\)

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 321 vs. \(2 (82) = 164\).

Time = 0.28 (sec) , antiderivative size = 321, normalized size of antiderivative = 3.28 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\begin {cases} \frac {\left (\left (- 512 a^{3} d^{7} e e^{2 c} - 512 a^{3} d^{7} f x e^{2 c} - 512 a^{3} d^{6} f e^{2 c}\right ) e^{- d x} + \left (512 a^{3} d^{7} e e^{4 c} + 512 a^{3} d^{7} f x e^{4 c} - 512 a^{3} d^{6} f e^{4 c}\right ) e^{d x} + \left (- 128 i a^{3} d^{7} e e^{c} - 128 i a^{3} d^{7} f x e^{c} - 64 i a^{3} d^{6} f e^{c}\right ) e^{- 2 d x} + \left (- 128 i a^{3} d^{7} e e^{5 c} - 128 i a^{3} d^{7} f x e^{5 c} + 64 i a^{3} d^{6} f e^{5 c}\right ) e^{2 d x}\right ) e^{- 3 c}}{1024 a^{4} d^{8}} & \text {for}\: a^{4} d^{8} e^{3 c} \neq 0 \\\frac {x^{2} \left (- i f e^{4 c} + 2 f e^{3 c} + 2 f e^{c} + i f\right ) e^{- 2 c}}{8 a} + \frac {x \left (- i e e^{4 c} + 2 e e^{3 c} + 2 e e^{c} + i e\right ) e^{- 2 c}}{4 a} & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((((-512*a**3*d**7*e*exp(2*c) - 512*a**3*d**7*f*x*exp(2*c) - 512* 
a**3*d**6*f*exp(2*c))*exp(-d*x) + (512*a**3*d**7*e*exp(4*c) + 512*a**3*d** 
7*f*x*exp(4*c) - 512*a**3*d**6*f*exp(4*c))*exp(d*x) + (-128*I*a**3*d**7*e* 
exp(c) - 128*I*a**3*d**7*f*x*exp(c) - 64*I*a**3*d**6*f*exp(c))*exp(-2*d*x) 
 + (-128*I*a**3*d**7*e*exp(5*c) - 128*I*a**3*d**7*f*x*exp(5*c) + 64*I*a**3 
*d**6*f*exp(5*c))*exp(2*d*x))*exp(-3*c)/(1024*a**4*d**8), Ne(a**4*d**8*exp 
(3*c), 0)), (x**2*(-I*f*exp(4*c) + 2*f*exp(3*c) + 2*f*exp(c) + I*f)*exp(-2 
*c)/(8*a) + x*(-I*e*exp(4*c) + 2*e*exp(3*c) + 2*e*exp(c) + I*e)*exp(-2*c)/ 
(4*a), True))
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\text {Exception raised: RuntimeError} \] Input:

integrate((f*x+e)*cosh(d*x+c)^3/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")
 

Output:

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un 
defined.
 

Giac [A] (verification not implemented)

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 1.38 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.47 \[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {f+d\,e}{2\,a\,d^2}+\frac {f\,x}{2\,a\,d}\right )-{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (\frac {\left (f+2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}+\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )+{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (\frac {\left (f-2\,d\,e\right )\,1{}\mathrm {i}}{16\,a\,d^2}-\frac {f\,x\,1{}\mathrm {i}}{8\,a\,d}\right )-{\mathrm {e}}^{c+d\,x}\,\left (\frac {f-d\,e}{2\,a\,d^2}-\frac {f\,x}{2\,a\,d}\right ) \] Input:

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

Output:

exp(2*c + 2*d*x)*(((f - 2*d*e)*1i)/(16*a*d^2) - (f*x*1i)/(8*a*d)) - exp(- 
2*c - 2*d*x)*(((f + 2*d*e)*1i)/(16*a*d^2) + (f*x*1i)/(8*a*d)) - exp(- c - 
d*x)*((f + d*e)/(2*a*d^2) + (f*x)/(2*a*d)) - exp(c + d*x)*((f - d*e)/(2*a* 
d^2) - (f*x)/(2*a*d))
 

Reduce [F]

\[ \int \frac {(e+f x) \cosh ^3(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\int \frac {\cosh \left (d x +c \right )^{3}}{\sinh \left (d x +c \right ) i +1}d x \right ) e +\left (\int \frac {\cosh \left (d x +c \right )^{3} x}{\sinh \left (d x +c \right ) i +1}d x \right ) f}{a} \] Input:

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

Output:

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