Integrand size = 31, antiderivative size = 82 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {(e+f x)^3}{3 a f}-\frac {2 i f^2 \cosh (c+d x)}{a d^3}-\frac {i (e+f x)^2 \cosh (c+d x)}{a d}+\frac {2 i f (e+f x) \sinh (c+d x)}{a d^2} \] Output:
1/3*(f*x+e)^3/a/f-2*I*f^2*cosh(d*x+c)/a/d^3-I*(f*x+e)^2*cosh(d*x+c)/a/d+2* I*f*(f*x+e)*sinh(d*x+c)/a/d^2
Time = 0.83 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.95 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )-3 i \left (2 f^2+d^2 (e+f x)^2\right ) \cosh (c+d x)+6 i d f (e+f x) \sinh (c+d x)}{3 a d^3} \] Input:
Integrate[((e + f*x)^2*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
Output:
(d^3*x*(3*e^2 + 3*e*f*x + f^2*x^2) - (3*I)*(2*f^2 + d^2*(e + f*x)^2)*Cosh[ c + d*x] + (6*I)*d*f*(e + f*x)*Sinh[c + d*x])/(3*a*d^3)
Time = 0.52 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.98, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.355, Rules used = {6097, 17, 3042, 26, 3777, 3042, 3777, 26, 3042, 26, 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 \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\) |
\(\Big \downarrow \) 6097 |
\(\displaystyle \frac {\int (e+f x)^2dx}{a}-\frac {i \int (e+f x)^2 \sinh (c+d x)dx}{a}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {i \int (e+f x)^2 \sinh (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {i \int -i (e+f x)^2 \sin (i c+i d x)dx}{a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\int (e+f x)^2 \sin (i c+i d x)dx}{a}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \int (e+f x) \cosh (c+d x)dx}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \int (e+f x) \sin \left (i c+i d x+\frac {\pi }{2}\right )dx}{d}}{a}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \left (\frac {(e+f x) \sinh (c+d x)}{d}-\frac {i f \int -i \sinh (c+d x)dx}{d}\right )}{d}}{a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \left (\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \int \sinh (c+d x)dx}{d}\right )}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \left (\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \int -i \sin (i c+i d x)dx}{d}\right )}{d}}{a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \left (\frac {(e+f x) \sinh (c+d x)}{d}+\frac {i f \int \sin (i c+i d x)dx}{d}\right )}{d}}{a}\) |
\(\Big \downarrow \) 3118 |
\(\displaystyle \frac {(e+f x)^3}{3 a f}-\frac {\frac {i (e+f x)^2 \cosh (c+d x)}{d}-\frac {2 i f \left (\frac {(e+f x) \sinh (c+d x)}{d}-\frac {f \cosh (c+d x)}{d^2}\right )}{d}}{a}\) |
Input:
Int[((e + f*x)^2*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
Output:
(e + f*x)^3/(3*a*f) - ((I*(e + f*x)^2*Cosh[c + d*x])/d - ((2*I)*f*(-((f*Co sh[c + d*x])/d^2) + ((e + f*x)*Sinh[c + d*x])/d))/d)/a
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
Int[(Complex[0, a_])*(Fx_), x_Symbol] :> Simp[(Complex[Identity[0], a]) I nt[Fx, x], x] /; FreeQ[a, x] && EqQ[a^2, 1]
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]
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]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 159 vs. \(2 (77 ) = 154\).
Time = 5.50 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.95
method | result | size |
risch | \(\frac {f^{2} x^{3}}{3 a}+\frac {f e \,x^{2}}{a}+\frac {e^{2} x}{a}+\frac {e^{3}}{3 a f}-\frac {i \left (d^{2} x^{2} f^{2}+2 d^{2} e f x +d^{2} e^{2}-2 d \,f^{2} x -2 d e f +2 f^{2}\right ) {\mathrm e}^{d x +c}}{2 d^{3} a}-\frac {i \left (d^{2} x^{2} f^{2}+2 d^{2} e f x +d^{2} e^{2}+2 d \,f^{2} x +2 d e f +2 f^{2}\right ) {\mathrm e}^{-d x -c}}{2 d^{3} a}\) | \(160\) |
derivativedivides | \(-\frac {i c^{2} f^{2} \cosh \left (d x +c \right )-2 i c d e f \cosh \left (d x +c \right )-2 i c \,f^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i d^{2} e^{2} \cosh \left (d x +c \right )+2 i d e f \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{2} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 c d e f \left (d x +c \right )+c \,f^{2} \left (d x +c \right )^{2}-d^{2} e^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) | \(223\) |
default | \(-\frac {i c^{2} f^{2} \cosh \left (d x +c \right )-2 i c d e f \cosh \left (d x +c \right )-2 i c \,f^{2} \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i d^{2} e^{2} \cosh \left (d x +c \right )+2 i d e f \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+i f^{2} \left (\left (d x +c \right )^{2} \cosh \left (d x +c \right )-2 \left (d x +c \right ) \sinh \left (d x +c \right )+2 \cosh \left (d x +c \right )\right )-c^{2} f^{2} \left (d x +c \right )+2 c d e f \left (d x +c \right )+c \,f^{2} \left (d x +c \right )^{2}-d^{2} e^{2} \left (d x +c \right )-d e f \left (d x +c \right )^{2}-\frac {f^{2} \left (d x +c \right )^{3}}{3}}{d^{3} a}\) | \(223\) |
Input:
int((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/3/a*f^2*x^3+1/a*f*e*x^2+1/a*e^2*x+1/3/a/f*e^3-1/2*I*(d^2*f^2*x^2+2*d^2*e *f*x+d^2*e^2-2*d*f^2*x-2*d*e*f+2*f^2)/d^3/a*exp(d*x+c)-1/2*I*(d^2*f^2*x^2+ 2*d^2*e*f*x+d^2*e^2+2*d*f^2*x+2*d*e*f+2*f^2)/d^3/a*exp(-d*x-c)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 160 vs. \(2 (74) = 148\).
Time = 0.11 (sec) , antiderivative size = 160, normalized size of antiderivative = 1.95 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (-3 i \, d^{2} f^{2} x^{2} - 3 i \, d^{2} e^{2} - 6 i \, d e f - 6 i \, f^{2} - 6 \, {\left (i \, d^{2} e f + i \, d f^{2}\right )} x - 3 \, {\left (i \, d^{2} f^{2} x^{2} + i \, d^{2} e^{2} - 2 i \, d e f + 2 i \, f^{2} + 2 \, {\left (i \, d^{2} e f - i \, d f^{2}\right )} x\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \, {\left (d^{3} f^{2} x^{3} + 3 \, d^{3} e f x^{2} + 3 \, d^{3} e^{2} x\right )} e^{\left (d x + c\right )}\right )} e^{\left (-d x - c\right )}}{6 \, a d^{3}} \] Input:
integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas ")
Output:
1/6*(-3*I*d^2*f^2*x^2 - 3*I*d^2*e^2 - 6*I*d*e*f - 6*I*f^2 - 6*(I*d^2*e*f + I*d*f^2)*x - 3*(I*d^2*f^2*x^2 + I*d^2*e^2 - 2*I*d*e*f + 2*I*f^2 + 2*(I*d^ 2*e*f - I*d*f^2)*x)*e^(2*d*x + 2*c) + 2*(d^3*f^2*x^3 + 3*d^3*e*f*x^2 + 3*d ^3*e^2*x)*e^(d*x + c))*e^(-d*x - c)/(a*d^3)
Time = 0.29 (sec) , antiderivative size = 318, normalized size of antiderivative = 3.88 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\begin {cases} \frac {\left (\left (- 2 i a d^{5} e^{2} - 4 i a d^{5} e f x - 2 i a d^{5} f^{2} x^{2} - 4 i a d^{4} e f - 4 i a d^{4} f^{2} x - 4 i a d^{3} f^{2}\right ) e^{- d x} + \left (- 2 i a d^{5} e^{2} e^{2 c} - 4 i a d^{5} e f x e^{2 c} - 2 i a d^{5} f^{2} x^{2} e^{2 c} + 4 i a d^{4} e f e^{2 c} + 4 i a d^{4} f^{2} x e^{2 c} - 4 i a d^{3} f^{2} e^{2 c}\right ) e^{d x}\right ) e^{- c}}{4 a^{2} d^{6}} & \text {for}\: a^{2} d^{6} e^{c} \neq 0 \\\frac {x^{3} \left (- i f^{2} e^{2 c} + i f^{2}\right ) e^{- c}}{6 a} + \frac {x^{2} \left (- i e f e^{2 c} + i e f\right ) e^{- c}}{2 a} + \frac {x \left (- i e^{2} e^{2 c} + i e^{2}\right ) e^{- c}}{2 a} & \text {otherwise} \end {cases} + \frac {e^{2} x}{a} + \frac {e f x^{2}}{a} + \frac {f^{2} x^{3}}{3 a} \] Input:
integrate((f*x+e)**2*cosh(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)
Output:
Piecewise((((-2*I*a*d**5*e**2 - 4*I*a*d**5*e*f*x - 2*I*a*d**5*f**2*x**2 - 4*I*a*d**4*e*f - 4*I*a*d**4*f**2*x - 4*I*a*d**3*f**2)*exp(-d*x) + (-2*I*a* d**5*e**2*exp(2*c) - 4*I*a*d**5*e*f*x*exp(2*c) - 2*I*a*d**5*f**2*x**2*exp( 2*c) + 4*I*a*d**4*e*f*exp(2*c) + 4*I*a*d**4*f**2*x*exp(2*c) - 4*I*a*d**3*f **2*exp(2*c))*exp(d*x))*exp(-c)/(4*a**2*d**6), Ne(a**2*d**6*exp(c), 0)), ( x**3*(-I*f**2*exp(2*c) + I*f**2)*exp(-c)/(6*a) + x**2*(-I*e*f*exp(2*c) + I *e*f)*exp(-c)/(2*a) + x*(-I*e**2*exp(2*c) + I*e**2)*exp(-c)/(2*a), True)) + e**2*x/a + e*f*x**2/a + f**2*x**3/(3*a)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 270 vs. \(2 (74) = 148\).
Time = 0.16 (sec) , antiderivative size = 270, normalized size of antiderivative = 3.29 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=e f {\left (\frac {2 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} - \frac {i \, d^{2} x^{2} e^{c} + i \, d x e^{c} - {\left (-i \, d x e^{\left (3 \, c\right )} + i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} - {\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + {\left (d x + 1\right )} e^{\left (-d x\right )} + i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}}\right )} + \frac {1}{2} \, e^{2} {\left (\frac {2 \, {\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (d x + c\right )}}{a d} - \frac {i \, e^{\left (-d x - c\right )}}{a d}\right )} + \frac {{\left (2 \, d^{3} x^{3} e^{c} + 3 \, {\left (-i \, d^{2} x^{2} e^{\left (2 \, c\right )} + 2 i \, d x e^{\left (2 \, c\right )} - 2 i \, e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} + 3 \, {\left (-i \, d^{2} x^{2} - 2 i \, d x - 2 i\right )} e^{\left (-d x\right )}\right )} f^{2} e^{\left (-c\right )}}{6 \, a d^{3}} \] Input:
integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima ")
Output:
e*f*(2*x*e^(d*x + c)/(a*d*e^(d*x + c) - I*a*d) - (I*d^2*x^2*e^c + I*d*x*e^ c - (-I*d*x*e^(3*c) + I*e^(3*c))*e^(2*d*x) - (d^2*x^2*e^(2*c) - 3*d*x*e^(2 *c) + e^(2*c))*e^(d*x) + (d*x + 1)*e^(-d*x) + I*e^c)/(a*d^2*e^(d*x + 2*c) - I*a*d^2*e^c)) + 1/2*e^2*(2*(d*x + c)/(a*d) - I*e^(d*x + c)/(a*d) - I*e^( -d*x - c)/(a*d)) + 1/6*(2*d^3*x^3*e^c + 3*(-I*d^2*x^2*e^(2*c) + 2*I*d*x*e^ (2*c) - 2*I*e^(2*c))*e^(d*x) + 3*(-I*d^2*x^2 - 2*I*d*x - 2*I)*e^(-d*x))*f^ 2*e^(-c)/(a*d^3)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 208 vs. \(2 (74) = 148\).
Time = 0.12 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.54 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (2 \, d^{3} f^{2} x^{3} e^{\left (d x + c\right )} + 6 \, d^{3} e f x^{2} e^{\left (d x + c\right )} - 3 i \, d^{2} f^{2} x^{2} e^{\left (2 \, d x + 2 \, c\right )} + 6 \, d^{3} e^{2} x e^{\left (d x + c\right )} - 3 i \, d^{2} f^{2} x^{2} - 6 i \, d^{2} e f x e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d^{2} e f x - 3 i \, d^{2} e^{2} e^{\left (2 \, d x + 2 \, c\right )} + 6 i \, d f^{2} x e^{\left (2 \, d x + 2 \, c\right )} - 3 i \, d^{2} e^{2} - 6 i \, d f^{2} x + 6 i \, d e f e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, d e f - 6 i \, f^{2} e^{\left (2 \, d x + 2 \, c\right )} - 6 i \, f^{2}\right )} e^{\left (-d x - c\right )}}{6 \, a d^{3}} \] Input:
integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")
Output:
1/6*(2*d^3*f^2*x^3*e^(d*x + c) + 6*d^3*e*f*x^2*e^(d*x + c) - 3*I*d^2*f^2*x ^2*e^(2*d*x + 2*c) + 6*d^3*e^2*x*e^(d*x + c) - 3*I*d^2*f^2*x^2 - 6*I*d^2*e *f*x*e^(2*d*x + 2*c) - 6*I*d^2*e*f*x - 3*I*d^2*e^2*e^(2*d*x + 2*c) + 6*I*d *f^2*x*e^(2*d*x + 2*c) - 3*I*d^2*e^2 - 6*I*d*f^2*x + 6*I*d*e*f*e^(2*d*x + 2*c) - 6*I*d*e*f - 6*I*f^2*e^(2*d*x + 2*c) - 6*I*f^2)*e^(-d*x - c)/(a*d^3)
Time = 1.41 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.04 \[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {e^2\,x}{a}-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {\left (d^2\,e^2+2\,d\,e\,f+2\,f^2\right )\,1{}\mathrm {i}}{2\,a\,d^3}+\frac {f^2\,x^2\,1{}\mathrm {i}}{2\,a\,d}+\frac {f\,x\,\left (f+d\,e\right )\,1{}\mathrm {i}}{a\,d^2}\right )-{\mathrm {e}}^{c+d\,x}\,\left (\frac {\left (d^2\,e^2-2\,d\,e\,f+2\,f^2\right )\,1{}\mathrm {i}}{2\,a\,d^3}+\frac {f^2\,x^2\,1{}\mathrm {i}}{2\,a\,d}-\frac {f\,x\,\left (f-d\,e\right )\,1{}\mathrm {i}}{a\,d^2}\right )+\frac {f^2\,x^3}{3\,a}+\frac {e\,f\,x^2}{a} \] Input:
int((cosh(c + d*x)^2*(e + f*x)^2)/(a + a*sinh(c + d*x)*1i),x)
Output:
(e^2*x)/a - exp(- c - d*x)*(((2*f^2 + d^2*e^2 + 2*d*e*f)*1i)/(2*a*d^3) + ( f^2*x^2*1i)/(2*a*d) + (f*x*(f + d*e)*1i)/(a*d^2)) - exp(c + d*x)*(((2*f^2 + d^2*e^2 - 2*d*e*f)*1i)/(2*a*d^3) + (f^2*x^2*1i)/(2*a*d) - (f*x*(f - d*e) *1i)/(a*d^2)) + (f^2*x^3)/(3*a) + (e*f*x^2)/a
\[ \int \frac {(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {\left (\int \frac {\cosh \left (d x +c \right )^{2}}{\sinh \left (d x +c \right ) i +1}d x \right ) e^{2}+\left (\int \frac {\cosh \left (d x +c \right )^{2} x^{2}}{\sinh \left (d x +c \right ) i +1}d x \right ) f^{2}+2 \left (\int \frac {\cosh \left (d x +c \right )^{2} x}{\sinh \left (d x +c \right ) i +1}d x \right ) e f}{a} \] Input:
int((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x)
Output:
(int(cosh(c + d*x)**2/(sinh(c + d*x)*i + 1),x)*e**2 + int((cosh(c + d*x)** 2*x**2)/(sinh(c + d*x)*i + 1),x)*f**2 + 2*int((cosh(c + d*x)**2*x)/(sinh(c + d*x)*i + 1),x)*e*f)/a