\(\int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx\) [120]

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

Optimal result

Integrand size = 21, antiderivative size = 111 \[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=-\frac {8 x \sqrt {a+i a \sinh (e+f x)}}{f^2}+\frac {16 \sqrt {a+i a \sinh (e+f x)} \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{f^3}+\frac {2 x^2 \sqrt {a+i a \sinh (e+f x)} \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{f} \] Output:

-8*x*(a+I*a*sinh(f*x+e))^(1/2)/f^2+16*(a+I*a*sinh(f*x+e))^(1/2)*tanh(1/2*e 
+1/4*I*Pi+1/2*f*x)/f^3+2*x^2*(a+I*a*sinh(f*x+e))^(1/2)*tanh(1/2*e+1/4*I*Pi 
+1/2*f*x)/f
 

Mathematica [A] (verified)

Time = 0.71 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.95 \[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\frac {2 \left (i \left (8+4 i f x+f^2 x^2\right ) \cosh \left (\frac {1}{2} (e+f x)\right )+\left (8-4 i f x+f^2 x^2\right ) \sinh \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {a+i a \sinh (e+f x)}}{f^3 \left (\cosh \left (\frac {1}{2} (e+f x)\right )+i \sinh \left (\frac {1}{2} (e+f x)\right )\right )} \] Input:

Integrate[x^2*Sqrt[a + I*a*Sinh[e + f*x]],x]
 

Output:

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

Rubi [A] (verified)

Time = 0.54 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.17, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 3800, 3042, 3777, 26, 3042, 26, 3777, 3042, 3118}

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 x^2 \sqrt {a+i a \sinh (e+f x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int x^2 \sqrt {a+a \sin (i e+i f x)}dx\)

\(\Big \downarrow \) 3800

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \int x^2 \cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \int x^2 \sin \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{4}\right )dx\)

\(\Big \downarrow \) 3777

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {4 i \int -i x \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{f}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {4 \int x \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {4 \int -i x \sin \left (\frac {i e}{2}+\frac {i f x}{2}-\frac {\pi }{4}\right )dx}{f}\right )\)

\(\Big \downarrow \) 26

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {4 i \int x \sin \left (\frac {i e}{2}+\frac {i f x}{2}-\frac {\pi }{4}\right )dx}{f}+\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}\right )\)

\(\Big \downarrow \) 3777

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {4 i \left (\frac {2 i x \cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {2 i \int \cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{f}\right )}{f}+\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {4 i \left (\frac {2 i x \cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {2 i \int \sin \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{4}\right )dx}{f}\right )}{f}+\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}\right )\)

\(\Big \downarrow \) 3118

\(\displaystyle \text {sech}\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right ) \sqrt {a+i a \sinh (e+f x)} \left (\frac {4 i \left (\frac {2 i x \cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {4 i \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f^2}\right )}{f}+\frac {2 x^2 \sinh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}\right )\)

Input:

Int[x^2*Sqrt[a + I*a*Sinh[e + f*x]],x]
 

Output:

Sech[e/2 + (I/4)*Pi + (f*x)/2]*((2*x^2*Sinh[e/2 + (I/4)*Pi + (f*x)/2])/f + 
 ((4*I)*(((2*I)*x*Cosh[e/2 + (I/4)*Pi + (f*x)/2])/f - ((4*I)*Sinh[e/2 + (I 
/4)*Pi + (f*x)/2])/f^2))/f)*Sqrt[a + I*a*Sinh[e + f*x]]
 

Defintions of rubi rules used

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 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 3800
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), 
 x_Symbol] :> Simp[(2*a)^IntPart[n]*((a + b*Sin[e + f*x])^FracPart[n]/Sin[e 
/2 + a*(Pi/(4*b)) + f*(x/2)]^(2*FracPart[n]))   Int[(c + d*x)^m*Sin[e/2 + a 
*(Pi/(4*b)) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && 
EqQ[a^2 - b^2, 0] && IntegerQ[n + 1/2] && (GtQ[n, 0] || IGtQ[m, 0])
 
Maple [A] (verified)

Time = 0.19 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.15

method result size
risch \(\frac {i \sqrt {2}\, \sqrt {a \left (i {\mathrm e}^{2 f x +2 e}-i+2 \,{\mathrm e}^{f x +e}\right ) {\mathrm e}^{-f x -e}}\, \left (i x^{2} f^{2}+f^{2} x^{2} {\mathrm e}^{f x +e}+4 i x f -4 f x \,{\mathrm e}^{f x +e}+8 i+8 \,{\mathrm e}^{f x +e}\right ) \left ({\mathrm e}^{f x +e}-i\right )}{\left (i {\mathrm e}^{2 f x +2 e}-i+2 \,{\mathrm e}^{f x +e}\right ) f^{3}}\) \(128\)

Input:

int(x^2*(a+I*a*sinh(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [F(-2)]

Exception generated. \[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\text {Exception raised: TypeError} \] Input:

integrate(x^2*(a+I*a*sinh(f*x+e))^(1/2),x, algorithm="fricas")
 

Output:

Exception raised: TypeError >>  Error detected within library code:   inte 
grate: implementation incomplete (has polynomial part)
 

Sympy [F]

\[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\int x^{2} \sqrt {i a \left (\sinh {\left (e + f x \right )} - i\right )}\, dx \] Input:

integrate(x**2*(a+I*a*sinh(f*x+e))**(1/2),x)
 

Output:

Integral(x**2*sqrt(I*a*(sinh(e + f*x) - I)), x)
 

Maxima [F]

\[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\int { \sqrt {i \, a \sinh \left (f x + e\right ) + a} x^{2} \,d x } \] Input:

integrate(x^2*(a+I*a*sinh(f*x+e))^(1/2),x, algorithm="maxima")
 

Output:

integrate(sqrt(I*a*sinh(f*x + e) + a)*x^2, x)
 

Giac [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.70 \[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\frac {{\left (\left (i + 1\right ) \, \sqrt {a} f^{2} x^{2} e^{\left (f x + e\right )} + \left (i - 1\right ) \, \sqrt {a} f^{2} x^{2} - \left (4 i + 4\right ) \, \sqrt {a} f x e^{\left (f x + e\right )} + \left (4 i - 4\right ) \, \sqrt {a} f x + \left (8 i + 8\right ) \, \sqrt {a} e^{\left (f x + e\right )} + \left (8 i - 8\right ) \, \sqrt {a}\right )} e^{\left (-\frac {1}{2} \, f x - \frac {1}{2} \, e\right )}}{f^{3}} \] Input:

integrate(x^2*(a+I*a*sinh(f*x+e))^(1/2),x, algorithm="giac")
 

Output:

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

Mupad [B] (verification not implemented)

Time = 1.21 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.83 \[ \int x^2 \sqrt {a+i a \sinh (e+f x)} \, dx=\frac {\sqrt {2}\,\sqrt {a\,{\mathrm {e}}^{-e-f\,x}\,{\left ({\mathrm {e}}^{e+f\,x}-\mathrm {i}\right )}^2\,1{}\mathrm {i}}\,\left (8\,{\mathrm {e}}^{e+f\,x}+f\,x\,4{}\mathrm {i}+f^2\,x^2\,1{}\mathrm {i}+f^2\,x^2\,{\mathrm {e}}^{e+f\,x}-4\,f\,x\,{\mathrm {e}}^{e+f\,x}+8{}\mathrm {i}\right )}{f^3\,\left ({\mathrm {e}}^{e+f\,x}-\mathrm {i}\right )} \] Input:

int(x^2*(a + a*sinh(e + f*x)*1i)^(1/2),x)
 

Output:

(2^(1/2)*(a*exp(- e - f*x)*(exp(e + f*x) - 1i)^2*1i)^(1/2)*(8*exp(e + f*x) 
 + f*x*4i + f^2*x^2*1i + f^2*x^2*exp(e + f*x) - 4*f*x*exp(e + f*x) + 8i))/ 
(f^3*(exp(e + f*x) - 1i))
 

Reduce [F]

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

int(x^2*(a+I*a*sinh(f*x+e))^(1/2),x)
 

Output:

sqrt(a)*int(sqrt(sinh(e + f*x)*i + 1)*x**2,x)