Integrand size = 21, antiderivative size = 63 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=-\frac {2 d \log \left (\cosh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )\right )}{a f^2}+\frac {(c+d x) \tanh \left (\frac {e}{2}+\frac {i \pi }{4}+\frac {f x}{2}\right )}{a f} \] Output:
-2*d*ln(cosh(1/2*e+1/4*I*Pi+1/2*f*x))/a/f^2+(d*x+c)*tanh(1/2*e+1/4*I*Pi+1/ 2*f*x)/a/f
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(185\) vs. \(2(63)=126\).
Time = 0.35 (sec) , antiderivative size = 185, normalized size of antiderivative = 2.94 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {i d f x \cosh \left (e+\frac {f x}{2}\right )+\cosh \left (\frac {f x}{2}\right ) \left (-2 i d \arctan \left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right )-d \log (\cosh (e+f x))\right )+2 c f \sinh \left (\frac {f x}{2}\right )+d f x \sinh \left (\frac {f x}{2}\right )+2 d \arctan \left (\text {sech}\left (e+\frac {f x}{2}\right ) \sinh \left (\frac {f x}{2}\right )\right ) \sinh \left (e+\frac {f x}{2}\right )-i d \log (\cosh (e+f x)) \sinh \left (e+\frac {f x}{2}\right )}{a f^2 \left (\cosh \left (\frac {e}{2}\right )+i \sinh \left (\frac {e}{2}\right )\right ) \left (\cosh \left (\frac {1}{2} (e+f x)\right )+i \sinh \left (\frac {1}{2} (e+f x)\right )\right )} \] Input:
Integrate[(c + d*x)/(a + I*a*Sinh[e + f*x]),x]
Output:
(I*d*f*x*Cosh[e + (f*x)/2] + Cosh[(f*x)/2]*((-2*I)*d*ArcTan[Sech[e + (f*x) /2]*Sinh[(f*x)/2]] - d*Log[Cosh[e + f*x]]) + 2*c*f*Sinh[(f*x)/2] + d*f*x*S inh[(f*x)/2] + 2*d*ArcTan[Sech[e + (f*x)/2]*Sinh[(f*x)/2]]*Sinh[e + (f*x)/ 2] - I*d*Log[Cosh[e + f*x]]*Sinh[e + (f*x)/2])/(a*f^2*(Cosh[e/2] + I*Sinh[ e/2])*(Cosh[(e + f*x)/2] + I*Sinh[(e + f*x)/2]))
Time = 0.37 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.03, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 3799, 25, 25, 3042, 4672, 26, 3042, 26, 3956}
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 {c+d x}{a+i a \sinh (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{a+a \sin (i e+i f x)}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int -\left ((c+d x) \text {csch}^2\left (\frac {e}{2}+\frac {f x}{2}-\frac {i \pi }{4}\right )\right )dx}{2 a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int -\left ((c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )\right )dx}{2 a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int (c+d x) \text {sech}^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (c+d x) \csc \left (\frac {i e}{2}+\frac {i f x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {2 i d \int -i \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{f}}{2 a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {2 d \int \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )dx}{f}}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {2 d \int -i \tan \left (\frac {i e}{2}+\frac {i f x}{2}-\frac {\pi }{4}\right )dx}{f}}{2 a}\) |
\(\Big \downarrow \) 26 |
\(\displaystyle \frac {\frac {2 i d \int \tan \left (\frac {i e}{2}+\frac {i f x}{2}-\frac {\pi }{4}\right )dx}{f}+\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {2 (c+d x) \tanh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )}{f}-\frac {4 d \log \left (\cosh \left (\frac {e}{2}+\frac {f x}{2}+\frac {i \pi }{4}\right )\right )}{f^2}}{2 a}\) |
Input:
Int[(c + d*x)/(a + I*a*Sinh[e + f*x]),x]
Output:
((-4*d*Log[Cosh[e/2 + (I/4)*Pi + (f*x)/2]])/f^2 + (2*(c + d*x)*Tanh[e/2 + (I/4)*Pi + (f*x)/2])/f)/(2*a)
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_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*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] && (GtQ[n, 0] || IGtQ[m, 0])
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Time = 0.38 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.05
method | result | size |
risch | \(\frac {2 d x}{a f}+\frac {2 d e}{a \,f^{2}}+\frac {2 i \left (d x +c \right )}{f a \left ({\mathrm e}^{f x +e}-i\right )}-\frac {2 d \ln \left ({\mathrm e}^{f x +e}-i\right )}{a \,f^{2}}\) | \(66\) |
parallelrisch | \(\frac {2 \left (-\tanh \left (\frac {f x}{2}+\frac {e}{2}\right )+i\right ) d \ln \left (1-\tanh \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-2 \left (-\tanh \left (\frac {f x}{2}+\frac {e}{2}\right )+i\right ) d \ln \left (-i+\tanh \left (\frac {f x}{2}+\frac {e}{2}\right )\right )+f \left (\left (-1+i\right ) x d \tanh \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (-1+i\right ) x d -2 c \right )}{f^{2} a \left (-\tanh \left (\frac {f x}{2}+\frac {e}{2}\right )+i\right )}\) | \(113\) |
Input:
int((d*x+c)/(a+I*a*sinh(f*x+e)),x,method=_RETURNVERBOSE)
Output:
2*d/a/f*x+2*d/a/f^2*e+2*I*(d*x+c)/f/a/(exp(f*x+e)-I)-2*d/a/f^2*ln(exp(f*x+ e)-I)
Time = 0.10 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.95 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {2 \, {\left (d f x e^{\left (f x + e\right )} + i \, c f - {\left (d e^{\left (f x + e\right )} - i \, d\right )} \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \] Input:
integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="fricas")
Output:
2*(d*f*x*e^(f*x + e) + I*c*f - (d*e^(f*x + e) - I*d)*log(e^(f*x + e) - I)) /(a*f^2*e^(f*x + e) - I*a*f^2)
Time = 0.11 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.89 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {2 i c + 2 i d x}{a f e^{e} e^{f x} - i a f} + \frac {2 d x}{a f} - \frac {2 d \log {\left (e^{f x} - i e^{- e} \right )}}{a f^{2}} \] Input:
integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x)
Output:
(2*I*c + 2*I*d*x)/(a*f*exp(e)*exp(f*x) - I*a*f) + 2*d*x/(a*f) - 2*d*log(ex p(f*x) - I*exp(-e))/(a*f**2)
Time = 0.04 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.19 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=2 \, d {\left (\frac {x e^{\left (f x + e\right )}}{a f e^{\left (f x + e\right )} - i \, a f} - \frac {\log \left ({\left (e^{\left (f x + e\right )} - i\right )} e^{\left (-e\right )}\right )}{a f^{2}}\right )} - \frac {2 \, c}{{\left (i \, a e^{\left (-f x - e\right )} - a\right )} f} \] Input:
integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="maxima")
Output:
2*d*(x*e^(f*x + e)/(a*f*e^(f*x + e) - I*a*f) - log((e^(f*x + e) - I)*e^(-e ))/(a*f^2)) - 2*c/((I*a*e^(-f*x - e) - a)*f)
Time = 0.11 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.06 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {2 \, {\left (d f x e^{\left (f x + e\right )} - d e^{\left (f x + e\right )} \log \left (e^{\left (f x + e\right )} - i\right ) + i \, c f + i \, d \log \left (e^{\left (f x + e\right )} - i\right )\right )}}{a f^{2} e^{\left (f x + e\right )} - i \, a f^{2}} \] Input:
integrate((d*x+c)/(a+I*a*sinh(f*x+e)),x, algorithm="giac")
Output:
2*(d*f*x*e^(f*x + e) - d*e^(f*x + e)*log(e^(f*x + e) - I) + I*c*f + I*d*lo g(e^(f*x + e) - I))/(a*f^2*e^(f*x + e) - I*a*f^2)
Time = 1.27 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.89 \[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e+f\,x}-\mathrm {i}\right )}+\frac {2\,d\,x}{a\,f}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{f\,x}\,{\mathrm {e}}^e-\mathrm {i}\right )}{a\,f^2} \] Input:
int((c + d*x)/(a + a*sinh(e + f*x)*1i),x)
Output:
((c + d*x)*2i)/(a*f*(exp(e + f*x) - 1i)) + (2*d*x)/(a*f) - (2*d*log(exp(f* x)*exp(e) - 1i))/(a*f^2)
\[ \int \frac {c+d x}{a+i a \sinh (e+f x)} \, dx=\frac {\left (\int \frac {x}{\sinh \left (f x +e \right ) i +1}d x \right ) d +\left (\int \frac {1}{\sinh \left (f x +e \right ) i +1}d x \right ) c}{a} \] Input:
int((d*x+c)/(a+I*a*sinh(f*x+e)),x)
Output:
(int(x/(sinh(e + f*x)*i + 1),x)*d + int(1/(sinh(e + f*x)*i + 1),x)*c)/a