Integrand size = 29, antiderivative size = 56 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {(e+f x)^2}{2 a f}-\frac {i (e+f x) \cosh (c+d x)}{a d}+\frac {i f \sinh (c+d x)}{a d^2} \] Output:
1/2*(f*x+e)^2/a/f-I*(f*x+e)*cosh(d*x+c)/a/d+I*f*sinh(d*x+c)/a/d^2
Time = 2.56 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.02 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=-\frac {(c+d x) (-2 d e+c f-d f x)+2 i d (e+f x) \cosh (c+d x)-2 i f \sinh (c+d x)}{2 a d^2} \] Input:
Integrate[((e + f*x)*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
Output:
-1/2*((c + d*x)*(-2*d*e + c*f - d*f*x) + (2*I)*d*(e + f*x)*Cosh[c + d*x] - (2*I)*f*Sinh[c + d*x])/(a*d^2)
Time = 0.38 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {6097, 17, 3042, 26, 3777, 3042, 3117}
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 ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\) |
\(\Big \downarrow \) 6097 |
\(\displaystyle \frac {\int (e+f x)dx}{a}-\frac {i \int (e+f x) \sinh (c+d x)dx}{a}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {i \int (e+f x) \sinh (c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {i \int -i (e+f x) \sin (i c+i d x)dx}{a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {\int (e+f x) \sin (i c+i d x)dx}{a}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {\frac {i (e+f x) \cosh (c+d x)}{d}-\frac {i f \int \cosh (c+d x)dx}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {\frac {i (e+f x) \cosh (c+d x)}{d}-\frac {i f \int \sin \left (i c+i d x+\frac {\pi }{2}\right )dx}{d}}{a}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {(e+f x)^2}{2 a f}-\frac {\frac {i (e+f x) \cosh (c+d x)}{d}-\frac {i f \sinh (c+d x)}{d^2}}{a}\) |
Input:
Int[((e + f*x)*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]
Output:
(e + f*x)^2/(2*a*f) - ((I*(e + f*x)*Cosh[c + d*x])/d - (I*f*Sinh[c + d*x]) /d^2)/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[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
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]
Time = 2.15 (sec) , antiderivative size = 70, normalized size of antiderivative = 1.25
method | result | size |
risch | \(\frac {f \,x^{2}}{2 a}+\frac {e x}{a}-\frac {i \left (d x f +d e -f \right ) {\mathrm e}^{d x +c}}{2 a \,d^{2}}-\frac {i \left (d x f +d e +f \right ) {\mathrm e}^{-d x -c}}{2 a \,d^{2}}\) | \(70\) |
derivativedivides | \(-\frac {-i f c \cosh \left (d x +c \right )+i \cosh \left (d x +c \right ) d e +i f \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}}{d^{2} a}\) | \(84\) |
default | \(-\frac {-i f c \cosh \left (d x +c \right )+i \cosh \left (d x +c \right ) d e +i f \left (\left (d x +c \right ) \cosh \left (d x +c \right )-\sinh \left (d x +c \right )\right )+f c \left (d x +c \right )-e d \left (d x +c \right )-\frac {f \left (d x +c \right )^{2}}{2}}{d^{2} a}\) | \(84\) |
Input:
int((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/2/a*f*x^2+1/a*e*x-1/2*I*(d*f*x+d*e-f)/a/d^2*exp(d*x+c)-1/2*I*(d*f*x+d*e+ f)/a/d^2*exp(-d*x-c)
Time = 0.10 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.36 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (-i \, d f x - i \, d e + {\left (-i \, d f x - i \, d e + i \, f\right )} e^{\left (2 \, d x + 2 \, c\right )} + {\left (d^{2} f x^{2} + 2 \, d^{2} e x\right )} e^{\left (d x + c\right )} - i \, f\right )} e^{\left (-d x - c\right )}}{2 \, a d^{2}} \] Input:
integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")
Output:
1/2*(-I*d*f*x - I*d*e + (-I*d*f*x - I*d*e + I*f)*e^(2*d*x + 2*c) + (d^2*f* x^2 + 2*d^2*e*x)*e^(d*x + c) - I*f)*e^(-d*x - c)/(a*d^2)
Time = 0.18 (sec) , antiderivative size = 167, normalized size of antiderivative = 2.98 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\begin {cases} \frac {\left (\left (- 2 i a d^{3} e - 2 i a d^{3} f x - 2 i a d^{2} f\right ) e^{- d x} + \left (- 2 i a d^{3} e e^{2 c} - 2 i a d^{3} f x e^{2 c} + 2 i a d^{2} f e^{2 c}\right ) e^{d x}\right ) e^{- c}}{4 a^{2} d^{4}} & \text {for}\: a^{2} d^{4} e^{c} \neq 0 \\\frac {x^{2} \left (- i f e^{2 c} + i f\right ) e^{- c}}{4 a} + \frac {x \left (- i e e^{2 c} + i e\right ) e^{- c}}{2 a} & \text {otherwise} \end {cases} + \frac {e x}{a} + \frac {f x^{2}}{2 a} \] Input:
integrate((f*x+e)*cosh(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)
Output:
Piecewise((((-2*I*a*d**3*e - 2*I*a*d**3*f*x - 2*I*a*d**2*f)*exp(-d*x) + (- 2*I*a*d**3*e*exp(2*c) - 2*I*a*d**3*f*x*exp(2*c) + 2*I*a*d**2*f*exp(2*c))*e xp(d*x))*exp(-c)/(4*a**2*d**4), Ne(a**2*d**4*exp(c), 0)), (x**2*(-I*f*exp( 2*c) + I*f)*exp(-c)/(4*a) + x*(-I*e*exp(2*c) + I*e)*exp(-c)/(2*a), True)) + e*x/a + f*x**2/(2*a)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 188 vs. \(2 (53) = 106\).
Time = 0.12 (sec) , antiderivative size = 188, normalized size of antiderivative = 3.36 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {1}{2} \, 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 {\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 )} \] Input:
integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")
Output:
1/2*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*(d*x + c)/(a*d) - I*e^(d*x + c)/(a*d) - I*e^( -d*x - c)/(a*d))
Time = 0.12 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.71 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {{\left (d^{2} f x^{2} e^{\left (d x + c\right )} + 2 \, d^{2} e x e^{\left (d x + c\right )} - i \, d f x e^{\left (2 \, d x + 2 \, c\right )} - i \, d f x - i \, d e e^{\left (2 \, d x + 2 \, c\right )} - i \, d e + i \, f e^{\left (2 \, d x + 2 \, c\right )} - i \, f\right )} e^{\left (-d x - c\right )}}{2 \, a d^{2}} \] Input:
integrate((f*x+e)*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")
Output:
1/2*(d^2*f*x^2*e^(d*x + c) + 2*d^2*e*x*e^(d*x + c) - I*d*f*x*e^(2*d*x + 2* c) - I*d*f*x - I*d*e*e^(2*d*x + 2*c) - I*d*e + I*f*e^(2*d*x + 2*c) - I*f)* e^(-d*x - c)/(a*d^2)
Time = 1.27 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.55 \[ \int \frac {(e+f x) \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx=\frac {f\,x^2}{2\,a}+{\mathrm {e}}^{c+d\,x}\,\left (\frac {\left (f-d\,e\right )\,1{}\mathrm {i}}{2\,a\,d^2}-\frac {f\,x\,1{}\mathrm {i}}{2\,a\,d}\right )-{\mathrm {e}}^{-c-d\,x}\,\left (\frac {\left (f+d\,e\right )\,1{}\mathrm {i}}{2\,a\,d^2}+\frac {f\,x\,1{}\mathrm {i}}{2\,a\,d}\right )+\frac {e\,x}{a} \] Input:
int((cosh(c + d*x)^2*(e + f*x))/(a + a*sinh(c + d*x)*1i),x)
Output:
exp(c + d*x)*(((f - d*e)*1i)/(2*a*d^2) - (f*x*1i)/(2*a*d)) - exp(- c - d*x )*(((f + d*e)*1i)/(2*a*d^2) + (f*x*1i)/(2*a*d)) + (f*x^2)/(2*a) + (e*x)/a
\[ \int \frac {(e+f x) \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 +\left (\int \frac {\cosh \left (d x +c \right )^{2} x}{\sinh \left (d x +c \right ) i +1}d x \right ) f}{a} \] Input:
int((f*x+e)*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 + int((cosh(c + d*x)**2*x )/(sinh(c + d*x)*i + 1),x)*f)/a