Integrand size = 25, antiderivative size = 36 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \text {arctanh}(\cos (c+d x))}{d}+\frac {a \sec (c+d x)}{d}+\frac {a \tan (c+d x)}{d} \] Output:
-a*arctanh(cos(d*x+c))/d+a*sec(d*x+c)/d+a*tan(d*x+c)/d
Time = 0.22 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.56 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {a \sec (c+d x)}{d}+\frac {a \tan (c+d x)}{d} \] Input:
Integrate[Csc[c + d*x]*Sec[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
-((a*Log[Cos[(c + d*x)/2]])/d) + (a*Log[Sin[(c + d*x)/2]])/d + (a*Sec[c + d*x])/d + (a*Tan[c + d*x])/d
Time = 0.36 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 3317, 3042, 3102, 25, 262, 219, 4254, 24}
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 \csc (c+d x) \sec ^2(c+d x) (a \sin (c+d x)+a) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a \sin (c+d x)+a}{\sin (c+d x) \cos (c+d x)^2}dx\) |
\(\Big \downarrow \) 3317 |
\(\displaystyle a \int \sec ^2(c+d x)dx+a \int \csc (c+d x) \sec ^2(c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+a \int \csc (c+d x) \sec (c+d x)^2dx\) |
\(\Big \downarrow \) 3102 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {a \int -\frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {a \int \frac {\sec ^2(c+d x)}{1-\sec ^2(c+d x)}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {a \left (\sec (c+d x)-\int \frac {1}{1-\sec ^2(c+d x)}d\sec (c+d x)\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}-\frac {a \int 1d(-\tan (c+d x))}{d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {a (\sec (c+d x)-\text {arctanh}(\sec (c+d x)))}{d}+\frac {a \tan (c+d x)}{d}\) |
Input:
Int[Csc[c + d*x]*Sec[c + d*x]^2*(a + a*Sin[c + d*x]),x]
Output:
(a*(-ArcTanh[Sec[c + d*x]] + Sec[c + d*x]))/d + (a*Tan[c + d*x])/d
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_S ymbol] :> Simp[1/(f*a^n) Subst[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/ 2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1 )/2] && !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n _.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[a Int[(g*Co s[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Simp[b/d Int[(g*Cos[e + f*x])^ p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Time = 0.53 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.14
method | result | size |
derivativedivides | \(\frac {a \tan \left (d x +c \right )+a \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(41\) |
default | \(\frac {a \tan \left (d x +c \right )+a \left (\frac {1}{\cos \left (d x +c \right )}+\ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )\right )}{d}\) | \(41\) |
parallelrisch | \(\frac {a \left (-2+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )\right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) | \(43\) |
risch | \(\frac {2 a}{d \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d}\) | \(57\) |
norman | \(\frac {-\frac {2 a}{d}-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}+\frac {a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(104\) |
Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(a*tan(d*x+c)+a*(1/cos(d*x+c)+ln(csc(d*x+c)-cot(d*x+c))))
Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (36) = 72\).
Time = 0.09 (sec) , antiderivative size = 108, normalized size of antiderivative = 3.00 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {2 \, a \cos \left (d x + c\right ) - {\left (a \cos \left (d x + c\right ) - a \sin \left (d x + c\right ) + a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a \cos \left (d x + c\right ) - a \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, a \sin \left (d x + c\right ) + 2 \, a}{2 \, {\left (d \cos \left (d x + c\right ) - d \sin \left (d x + c\right ) + d\right )}} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
1/2*(2*a*cos(d*x + c) - (a*cos(d*x + c) - a*sin(d*x + c) + a)*log(1/2*cos( d*x + c) + 1/2) + (a*cos(d*x + c) - a*sin(d*x + c) + a)*log(-1/2*cos(d*x + c) + 1/2) + 2*a*sin(d*x + c) + 2*a)/(d*cos(d*x + c) - d*sin(d*x + c) + d)
\[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=a \left (\int \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \sin {\left (c + d x \right )} \csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx\right ) \] Input:
integrate(csc(d*x+c)*sec(d*x+c)**2*(a+a*sin(d*x+c)),x)
Output:
a*(Integral(csc(c + d*x)*sec(c + d*x)**2, x) + Integral(sin(c + d*x)*csc(c + d*x)*sec(c + d*x)**2, x))
Time = 0.03 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.33 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + 2 \, a \tan \left (d x + c\right )}{2 \, d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
1/2*(a*(2/cos(d*x + c) - log(cos(d*x + c) + 1) + log(cos(d*x + c) - 1)) + 2*a*tan(d*x + c))/d
Time = 0.14 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.94 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {2 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}}{d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
(a*log(abs(tan(1/2*d*x + 1/2*c))) - 2*a/(tan(1/2*d*x + 1/2*c) - 1))/d
Time = 31.44 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.97 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {2\,a}{d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-1\right )} \] Input:
int((a + a*sin(c + d*x))/(cos(c + d*x)^2*sin(c + d*x)),x)
Output:
(a*log(tan(c/2 + (d*x)/2)))/d - (2*a)/(d*(tan(c/2 + (d*x)/2) - 1))
Time = 0.17 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.72 \[ \int \csc (c+d x) \sec ^2(c+d x) (a+a \sin (c+d x)) \, dx=\frac {a \left (\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )} \] Input:
int(csc(d*x+c)*sec(d*x+c)^2*(a+a*sin(d*x+c)),x)
Output:
(a*(log(tan((c + d*x)/2))*tan((c + d*x)/2) - log(tan((c + d*x)/2)) - 2*tan ((c + d*x)/2)))/(d*(tan((c + d*x)/2) - 1))