Integrand size = 21, antiderivative size = 44 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {x}{2 a}+\frac {\sin (c+d x)}{a d}-\frac {\cos (c+d x) \sin (c+d x)}{2 a d} \] Output:
-1/2*x/a+sin(d*x+c)/a/d-1/2*cos(d*x+c)*sin(d*x+c)/a/d
Time = 0.18 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.55 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (-c+2 d x-4 \sin (c+d x)+\sin (2 (c+d x))+\tan \left (\frac {c}{2}\right )\right )}{2 a d (1+\sec (c+d x))} \] Input:
Integrate[Sin[c + d*x]^2/(a + a*Sec[c + d*x]),x]
Output:
-1/2*(Cos[(c + d*x)/2]^2*Sec[c + d*x]*(-c + 2*d*x - 4*Sin[c + d*x] + Sin[2 *(c + d*x)] + Tan[c/2]))/(a*d*(1 + Sec[c + d*x]))
Time = 0.41 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3042, 4360, 25, 25, 3042, 3318, 3042, 3115, 24, 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 {\sin ^2(c+d x)}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (c+d x-\frac {\pi }{2}\right )^2}{a-a \csc \left (c+d x-\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4360 |
\(\displaystyle \int -\frac {\sin ^2(c+d x) \cos (c+d x)}{a (-\cos (c+d x))-a}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int -\frac {\cos (c+d x) \sin ^2(c+d x)}{\cos (c+d x) a+a}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {\sin ^2(c+d x) \cos (c+d x)}{a \cos (c+d x)+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \cos \left (c+d x+\frac {\pi }{2}\right )^2}{a \sin \left (c+d x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 3318 |
\(\displaystyle \frac {\int \cos (c+d x)dx}{a}-\frac {\int \cos ^2(c+d x)dx}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx}{a}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}}{a}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{a}-\frac {\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}}{a}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\sin (c+d x)}{a d}-\frac {\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}}{a}\) |
Input:
Int[Sin[c + d*x]^2/(a + a*Sec[c + d*x]),x]
Output:
Sin[c + d*x]/(a*d) - (x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d))/a
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^( n_.))/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g^2/a Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Simp[g^2/(b*d) Int [(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Cos[e + f*x])^p*((b + a*Sin[e + f*x])^m/Si n[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]
Time = 0.13 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.75
method | result | size |
parallelrisch | \(\frac {-2 d x +4 \sin \left (d x +c \right )-\sin \left (2 d x +2 c \right )}{4 d a}\) | \(33\) |
risch | \(-\frac {x}{2 a}+\frac {\sin \left (d x +c \right )}{a d}-\frac {\sin \left (2 d x +2 c \right )}{4 d a}\) | \(38\) |
derivativedivides | \(\frac {-\frac {4 \left (-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{4}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(64\) |
default | \(\frac {-\frac {4 \left (-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{4}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4}\right )}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}-\arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) | \(64\) |
norman | \(\frac {\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {x}{2 a}+\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{a d}-\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{a}-\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{2 a}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{2}}\) | \(93\) |
Input:
int(sin(d*x+c)^2/(a+a*sec(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/4*(-2*d*x+4*sin(d*x+c)-sin(2*d*x+2*c))/d/a
Time = 0.07 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.61 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {d x + {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right )}{2 \, a d} \] Input:
integrate(sin(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="fricas")
Output:
-1/2*(d*x + (cos(d*x + c) - 2)*sin(d*x + c))/(a*d)
\[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {\sin ^{2}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate(sin(d*x+c)**2/(a+a*sec(d*x+c)),x)
Output:
Integral(sin(c + d*x)**2/(sec(c + d*x) + 1), x)/a
Leaf count of result is larger than twice the leaf count of optimal. 112 vs. \(2 (40) = 80\).
Time = 0.11 (sec) , antiderivative size = 112, normalized size of antiderivative = 2.55 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {\frac {\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a + \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{d} \] Input:
integrate(sin(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="maxima")
Output:
((sin(d*x + c)/(cos(d*x + c) + 1) + 3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3) /(a + 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) - arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a)/d
Time = 0.14 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.32 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\frac {d x + c}{a} - \frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2} a}}{2 \, d} \] Input:
integrate(sin(d*x+c)^2/(a+a*sec(d*x+c)),x, algorithm="giac")
Output:
-1/2*((d*x + c)/a - 2*(3*tan(1/2*d*x + 1/2*c)^3 + tan(1/2*d*x + 1/2*c))/(( tan(1/2*d*x + 1/2*c)^2 + 1)^2*a))/d
Time = 10.86 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.68 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=-\frac {\sin \left (2\,c+2\,d\,x\right )-4\,\sin \left (c+d\,x\right )+2\,d\,x}{4\,a\,d} \] Input:
int(sin(c + d*x)^2/(a + a/cos(c + d*x)),x)
Output:
-(sin(2*c + 2*d*x) - 4*sin(c + d*x) + 2*d*x)/(4*a*d)
Time = 0.18 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.80 \[ \int \frac {\sin ^2(c+d x)}{a+a \sec (c+d x)} \, dx=\frac {-\cos \left (d x +c \right ) \sin \left (d x +c \right )+2 \sin \left (d x +c \right )-d x}{2 a d} \] Input:
int(sin(d*x+c)^2/(a+a*sec(d*x+c)),x)
Output:
( - cos(c + d*x)*sin(c + d*x) + 2*sin(c + d*x) - d*x)/(2*a*d)