\(\int \sin (\tanh (a+b x)) \, dx\) [242]

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

Optimal result

Integrand size = 7, antiderivative size = 77 \[ \int \sin (\tanh (a+b x)) \, dx=-\frac {\operatorname {CosIntegral}(1-\tanh (a+b x)) \sin (1)}{2 b}-\frac {\operatorname {CosIntegral}(1+\tanh (a+b x)) \sin (1)}{2 b}+\frac {\cos (1) \text {Si}(1-\tanh (a+b x))}{2 b}+\frac {\cos (1) \text {Si}(1+\tanh (a+b x))}{2 b} \]

[Out]

-1/2*cos(1)*Si(-1+tanh(b*x+a))/b+1/2*cos(1)*Si(1+tanh(b*x+a))/b-1/2*Ci(1-tanh(b*x+a))*sin(1)/b-1/2*Ci(1+tanh(b
*x+a))*sin(1)/b

Rubi [A] (verified)

Time = 0.11 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3414, 3384, 3380, 3383} \[ \int \sin (\tanh (a+b x)) \, dx=-\frac {\sin (1) \operatorname {CosIntegral}(1-\tanh (a+b x))}{2 b}-\frac {\sin (1) \operatorname {CosIntegral}(\tanh (a+b x)+1)}{2 b}+\frac {\cos (1) \text {Si}(1-\tanh (a+b x))}{2 b}+\frac {\cos (1) \text {Si}(\tanh (a+b x)+1)}{2 b} \]

[In]

Int[Sin[Tanh[a + b*x]],x]

[Out]

-1/2*(CosIntegral[1 - Tanh[a + b*x]]*Sin[1])/b - (CosIntegral[1 + Tanh[a + b*x]]*Sin[1])/(2*b) + (Cos[1]*SinIn
tegral[1 - Tanh[a + b*x]])/(2*b) + (Cos[1]*SinIntegral[1 + Tanh[a + b*x]])/(2*b)

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*Sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Int[ExpandIntegrand[Sin[c + d*x], (a +
 b*x^n)^p, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[p, 0] && IGtQ[n, 0] && (EqQ[n, 2] || EqQ[p, -1])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\sin (x)}{1-x^2} \, dx,x,\tanh (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \left (\frac {\sin (x)}{2 (1-x)}+\frac {\sin (x)}{2 (1+x)}\right ) \, dx,x,\tanh (a+b x)\right )}{b} \\ & = \frac {\text {Subst}\left (\int \frac {\sin (x)}{1-x} \, dx,x,\tanh (a+b x)\right )}{2 b}+\frac {\text {Subst}\left (\int \frac {\sin (x)}{1+x} \, dx,x,\tanh (a+b x)\right )}{2 b} \\ & = -\frac {\cos (1) \text {Subst}\left (\int \frac {\sin (1-x)}{1-x} \, dx,x,\tanh (a+b x)\right )}{2 b}+\frac {\cos (1) \text {Subst}\left (\int \frac {\sin (1+x)}{1+x} \, dx,x,\tanh (a+b x)\right )}{2 b}+\frac {\sin (1) \text {Subst}\left (\int \frac {\cos (1-x)}{1-x} \, dx,x,\tanh (a+b x)\right )}{2 b}-\frac {\sin (1) \text {Subst}\left (\int \frac {\cos (1+x)}{1+x} \, dx,x,\tanh (a+b x)\right )}{2 b} \\ & = -\frac {\operatorname {CosIntegral}(1-\tanh (a+b x)) \sin (1)}{2 b}-\frac {\operatorname {CosIntegral}(1+\tanh (a+b x)) \sin (1)}{2 b}+\frac {\cos (1) \text {Si}(1-\tanh (a+b x))}{2 b}+\frac {\cos (1) \text {Si}(1+\tanh (a+b x))}{2 b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.77 \[ \int \sin (\tanh (a+b x)) \, dx=-\frac {\operatorname {CosIntegral}(1-\tanh (a+b x)) \sin (1)+\operatorname {CosIntegral}(1+\tanh (a+b x)) \sin (1)-\cos (1) (\text {Si}(1-\tanh (a+b x))+\text {Si}(1+\tanh (a+b x)))}{2 b} \]

[In]

Integrate[Sin[Tanh[a + b*x]],x]

[Out]

-1/2*(CosIntegral[1 - Tanh[a + b*x]]*Sin[1] + CosIntegral[1 + Tanh[a + b*x]]*Sin[1] - Cos[1]*(SinIntegral[1 -
Tanh[a + b*x]] + SinIntegral[1 + Tanh[a + b*x]]))/b

Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.75

method result size
derivativedivides \(\frac {\frac {\operatorname {Si}\left (1+\tanh \left (b x +a \right )\right ) \cos \left (1\right )}{2}-\frac {\operatorname {Ci}\left (1+\tanh \left (b x +a \right )\right ) \sin \left (1\right )}{2}-\frac {\operatorname {Si}\left (-1+\tanh \left (b x +a \right )\right ) \cos \left (1\right )}{2}-\frac {\operatorname {Ci}\left (-1+\tanh \left (b x +a \right )\right ) \sin \left (1\right )}{2}}{b}\) \(58\)
default \(\frac {\frac {\operatorname {Si}\left (1+\tanh \left (b x +a \right )\right ) \cos \left (1\right )}{2}-\frac {\operatorname {Ci}\left (1+\tanh \left (b x +a \right )\right ) \sin \left (1\right )}{2}-\frac {\operatorname {Si}\left (-1+\tanh \left (b x +a \right )\right ) \cos \left (1\right )}{2}-\frac {\operatorname {Ci}\left (-1+\tanh \left (b x +a \right )\right ) \sin \left (1\right )}{2}}{b}\) \(58\)
risch \(-\frac {i {\mathrm e}^{i} \operatorname {Ei}_{1}\left (-\frac {2 i}{1+{\mathrm e}^{2 b x +2 a}}+2 i\right )}{4 b}-\frac {i {\mathrm e}^{i} \operatorname {Ei}_{1}\left (\frac {2 i}{1+{\mathrm e}^{2 b x +2 a}}\right )}{4 b}+\frac {i {\mathrm e}^{-i} \operatorname {Ei}_{1}\left (-\frac {2 i}{1+{\mathrm e}^{2 b x +2 a}}\right )}{4 b}+\frac {i {\mathrm e}^{-i} \operatorname {Ei}_{1}\left (\frac {2 i}{1+{\mathrm e}^{2 b x +2 a}}-2 i\right )}{4 b}\) \(116\)

[In]

int(sin(tanh(b*x+a)),x,method=_RETURNVERBOSE)

[Out]

1/b*(1/2*Si(1+tanh(b*x+a))*cos(1)-1/2*Ci(1+tanh(b*x+a))*sin(1)-1/2*Si(-1+tanh(b*x+a))*cos(1)-1/2*Ci(-1+tanh(b*
x+a))*sin(1))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.79 \[ \int \sin (\tanh (a+b x)) \, dx=\frac {{\left (i \, \cos \left (1\right )^{2} - 2 \, \cos \left (1\right ) \sin \left (1\right ) - i \, \sin \left (1\right )^{2} - i\right )} \operatorname {Ci}\left (\frac {\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right ) + {\left (i \, \cos \left (1\right )^{2} - 2 \, \cos \left (1\right ) \sin \left (1\right ) - i \, \sin \left (1\right )^{2} - i\right )} \operatorname {Ci}\left (\frac {2}{\cosh \left (b x + a\right )^{2} + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1}\right ) + {\left (\cos \left (1\right )^{2} + 2 i \, \cos \left (1\right ) \sin \left (1\right ) - \sin \left (1\right )^{2} + 1\right )} \operatorname {Si}\left (\frac {\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )}{\cosh \left (b x + a\right )}\right ) + {\left (\cos \left (1\right )^{2} + 2 i \, \cos \left (1\right ) \sin \left (1\right ) - \sin \left (1\right )^{2} + 1\right )} \operatorname {Si}\left (\frac {2}{\cosh \left (b x + a\right )^{2} + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1}\right )}{4 \, {\left (b \cos \left (1\right ) + i \, b \sin \left (1\right )\right )}} \]

[In]

integrate(sin(tanh(b*x+a)),x, algorithm="fricas")

[Out]

1/4*((I*cos(1)^2 - 2*cos(1)*sin(1) - I*sin(1)^2 - I)*cos_integral((cosh(b*x + a) + sinh(b*x + a))/cosh(b*x + a
)) + (I*cos(1)^2 - 2*cos(1)*sin(1) - I*sin(1)^2 - I)*cos_integral(2/(cosh(b*x + a)^2 + 2*cosh(b*x + a)*sinh(b*
x + a) + sinh(b*x + a)^2 + 1)) + (cos(1)^2 + 2*I*cos(1)*sin(1) - sin(1)^2 + 1)*sin_integral((cosh(b*x + a) + s
inh(b*x + a))/cosh(b*x + a)) + (cos(1)^2 + 2*I*cos(1)*sin(1) - sin(1)^2 + 1)*sin_integral(2/(cosh(b*x + a)^2 +
 2*cosh(b*x + a)*sinh(b*x + a) + sinh(b*x + a)^2 + 1)))/(b*cos(1) + I*b*sin(1))

Sympy [F]

\[ \int \sin (\tanh (a+b x)) \, dx=\int \sin {\left (\tanh {\left (a + b x \right )} \right )}\, dx \]

[In]

integrate(sin(tanh(b*x+a)),x)

[Out]

Integral(sin(tanh(a + b*x)), x)

Maxima [F]

\[ \int \sin (\tanh (a+b x)) \, dx=\int { \sin \left (\tanh \left (b x + a\right )\right ) \,d x } \]

[In]

integrate(sin(tanh(b*x+a)),x, algorithm="maxima")

[Out]

integrate(sin(tanh(b*x + a)), x)

Giac [F]

\[ \int \sin (\tanh (a+b x)) \, dx=\int { \sin \left (\tanh \left (b x + a\right )\right ) \,d x } \]

[In]

integrate(sin(tanh(b*x+a)),x, algorithm="giac")

[Out]

integrate(sin(tanh(b*x + a)), x)

Mupad [F(-1)]

Timed out. \[ \int \sin (\tanh (a+b x)) \, dx=\int \sin \left (\mathrm {tanh}\left (a+b\,x\right )\right ) \,d x \]

[In]

int(sin(tanh(a + b*x)),x)

[Out]

int(sin(tanh(a + b*x)), x)