Integrand size = 28, antiderivative size = 106 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {a b x}{4}-\frac {a b \cos (c+d x) \sin (c+d x)}{4 d}+\frac {\left (4 a^2+b^2\right ) \sin ^3(c+d x)}{30 d}+\frac {b (b+a \cos (c+d x)) \sin ^3(c+d x)}{10 d}+\frac {(b+a \cos (c+d x))^2 \sin ^3(c+d x)}{5 d} \] Output:
1/4*a*b*x-1/4*a*b*cos(d*x+c)*sin(d*x+c)/d+1/30*(4*a^2+b^2)*sin(d*x+c)^3/d+ 1/10*b*(b+a*cos(d*x+c))*sin(d*x+c)^3/d+1/5*(b+a*cos(d*x+c))^2*sin(d*x+c)^3 /d
Time = 0.24 (sec) , antiderivative size = 77, normalized size of antiderivative = 0.73 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {30 \left (a^2+2 b^2\right ) \sin (c+d x)-5 \left (a^2+4 b^2\right ) \sin (3 (c+d x))-3 a (-20 b (c+d x)+5 b \sin (4 (c+d x))+a \sin (5 (c+d x)))}{240 d} \] Input:
Integrate[Cos[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x])^2,x]
Output:
(30*(a^2 + 2*b^2)*Sin[c + d*x] - 5*(a^2 + 4*b^2)*Sin[3*(c + d*x)] - 3*a*(- 20*b*(c + d*x) + 5*b*Sin[4*(c + d*x)] + a*Sin[5*(c + d*x)]))/(240*d)
Time = 0.76 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.10, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 4897, 3042, 3341, 27, 3042, 3341, 3042, 3148, 3042, 3115, 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 \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^3 (a \sin (c+d x)+b \tan (c+d x))^2dx\) |
\(\Big \downarrow \) 4897 |
\(\displaystyle \int \sin ^2(c+d x) \cos (c+d x) (a \cos (c+d x)+b)^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right ) \cos \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+b\right )^2dx\) |
\(\Big \downarrow \) 3341 |
\(\displaystyle \frac {1}{5} \int 2 (b+a \cos (c+d x)) (a+b \cos (c+d x)) \sin ^2(c+d x)dx+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2}{5} \int (b+a \cos (c+d x)) (a+b \cos (c+d x)) \sin ^2(c+d x)dx+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \int \cos \left (c+d x+\frac {\pi }{2}\right )^2 \left (b+a \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3341 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \int \left (5 a b+\left (a^2+4 b^2\right ) \cos (c+d x)\right ) \sin ^2(c+d x)dx+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \int \cos \left (c+d x-\frac {\pi }{2}\right )^2 \left (5 a b-\left (a^2+4 b^2\right ) \sin \left (c+d x-\frac {\pi }{2}\right )\right )dx+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \left (5 a b \int \sin ^2(c+d x)dx+\frac {\left (a^2+4 b^2\right ) \sin ^3(c+d x)}{3 d}\right )+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \left (5 a b \int \sin (c+d x)^2dx+\frac {\left (a^2+4 b^2\right ) \sin ^3(c+d x)}{3 d}\right )+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \left (5 a b \left (\frac {\int 1dx}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\left (a^2+4 b^2\right ) \sin ^3(c+d x)}{3 d}\right )+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {2}{5} \left (\frac {1}{4} \left (\frac {\left (a^2+4 b^2\right ) \sin ^3(c+d x)}{3 d}+5 a b \left (\frac {x}{2}-\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )\right )+\frac {a \sin ^3(c+d x) (a+b \cos (c+d x))}{4 d}\right )+\frac {\sin ^3(c+d x) (a \cos (c+d x)+b)^2}{5 d}\) |
Input:
Int[Cos[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x])^2,x]
Output:
((b + a*Cos[c + d*x])^2*Sin[c + d*x]^3)/(5*d) + (2*((a*(a + b*Cos[c + d*x] )*Sin[c + d*x]^3)/(4*d) + (((a^2 + 4*b^2)*Sin[c + d*x]^3)/(3*d) + 5*a*b*(x /2 - (Cos[c + d*x]*Sin[c + d*x])/(2*d)))/4))/5
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)* (g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(f*g*(m + p + 1))), x] + S imp[1/(m + p + 1) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m - 1)*Sim p[a*c*(m + p + 1) + b*d*m + (a*d*m + b*c*(m + p + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && !LtQ[p, -1] && IntegerQ[2*m] && !(EqQ[m, 1] && NeQ[c^2 - d^2, 0] && S implerQ[c + d*x, a + b*x])
Time = 7.86 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{4}}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )+2 a b \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )+\frac {b^{2} \sin \left (d x +c \right )^{3}}{3}}{d}\) | \(100\) |
default | \(\frac {a^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{4}}{5}+\frac {\left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{15}\right )+2 a b \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{3}}{4}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{8}+\frac {d x}{8}+\frac {c}{8}\right )+\frac {b^{2} \sin \left (d x +c \right )^{3}}{3}}{d}\) | \(100\) |
risch | \(\frac {a b x}{4}+\frac {a^{2} \sin \left (d x +c \right )}{8 d}+\frac {b^{2} \sin \left (d x +c \right )}{4 d}-\frac {\sin \left (5 d x +5 c \right ) a^{2}}{80 d}-\frac {a b \sin \left (4 d x +4 c \right )}{16 d}-\frac {\sin \left (3 d x +3 c \right ) a^{2}}{48 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2}}{12 d}\) | \(102\) |
Input:
int(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(-1/5*sin(d*x+c)*cos(d*x+c)^4+1/15*(2+cos(d*x+c)^2)*sin(d*x+c))+2 *a*b*(-1/4*sin(d*x+c)*cos(d*x+c)^3+1/8*cos(d*x+c)*sin(d*x+c)+1/8*d*x+1/8*c )+1/3*b^2*sin(d*x+c)^3)
Time = 0.08 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.80 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {15 \, a b d x - {\left (12 \, a^{2} \cos \left (d x + c\right )^{4} + 30 \, a b \cos \left (d x + c\right )^{3} - 15 \, a b \cos \left (d x + c\right ) - 4 \, {\left (a^{2} - 5 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 8 \, a^{2} - 20 \, b^{2}\right )} \sin \left (d x + c\right )}{60 \, d} \] Input:
integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^2,x, algorithm="fricas" )
Output:
1/60*(15*a*b*d*x - (12*a^2*cos(d*x + c)^4 + 30*a*b*cos(d*x + c)^3 - 15*a*b *cos(d*x + c) - 4*(a^2 - 5*b^2)*cos(d*x + c)^2 - 8*a^2 - 20*b^2)*sin(d*x + c))/d
\[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right )^{2} \cos ^{3}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**3*(a*sin(d*x+c)+b*tan(d*x+c))**2,x)
Output:
Integral((a*sin(c + d*x) + b*tan(c + d*x))**2*cos(c + d*x)**3, x)
Time = 0.03 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.64 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {80 \, b^{2} \sin \left (d x + c\right )^{3} - 16 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 5 \, \sin \left (d x + c\right )^{3}\right )} a^{2} + 15 \, {\left (4 \, d x + 4 \, c - \sin \left (4 \, d x + 4 \, c\right )\right )} a b}{240 \, d} \] Input:
integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^2,x, algorithm="maxima" )
Output:
1/240*(80*b^2*sin(d*x + c)^3 - 16*(3*sin(d*x + c)^5 - 5*sin(d*x + c)^3)*a^ 2 + 15*(4*d*x + 4*c - sin(4*d*x + 4*c))*a*b)/d
Leaf count of result is larger than twice the leaf count of optimal. 43089 vs. \(2 (96) = 192\).
Time = 137.03 (sec) , antiderivative size = 43089, normalized size of antiderivative = 406.50 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^2,x, algorithm="giac")
Output:
-1/80*a^2*sin(5*d*x + 5*c)/d - 1/48*a^2*sin(3*d*x + 3*c)/d + 1/8*a^2*sin(d *x + c)/d + 1/96*(3*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^ 2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(1/2 *d*x)^6*tan(1/2*c)^6*tan(c)^4 + 24*a*b*d*x*tan(d*x)^4*tan(1/2*d*x)^6*tan(1 /2*c)^6*tan(c)^4 + 3*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^4 + 6*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan (d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(1/2*d*x)^6*tan(1/2* c)^6*tan(c)^2 + 9*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn(-2*tan(d*x)^2* tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(1/2*d *x)^6*tan(1/2*c)^4*tan(c)^4 + 9*pi*a*b*sgn(2*tan(d*x)^2*tan(c)^2 - 2)*sgn( -2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d* x)^4*tan(1/2*d*x)^4*tan(1/2*c)^6*tan(c)^4 + 6*pi*a*b*sgn(2*tan(d*x)^2*tan( c)^2 - 2)*sgn(-2*tan(d*x)^2*tan(c) + 2*tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2* tan(c))*tan(d*x)^2*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^4 + 6*a*b*arctan((ta n(d*x) + tan(c))/(tan(d*x)*tan(c) - 1))*tan(d*x)^4*tan(1/2*d*x)^6*tan(1/2* c)^6*tan(c)^4 - 6*a*b*arctan(-(tan(d*x) - tan(c))/(tan(d*x)*tan(c) + 1))*t an(d*x)^4*tan(1/2*d*x)^6*tan(1/2*c)^6*tan(c)^4 + 48*a*b*d*x*tan(d*x)^4*tan (1/2*d*x)^6*tan(1/2*c)^6*tan(c)^2 + 6*pi*a*b*sgn(-2*tan(d*x)^2*tan(c) + 2* tan(d*x)*tan(c)^2 + 2*tan(d*x) - 2*tan(c))*tan(d*x)^4*tan(1/2*d*x)^6*ta...
Time = 16.50 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.95 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {a^2\,\sin \left (c+d\,x\right )}{8\,d}+\frac {b^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {a\,b\,x}{4}-\frac {a^2\,\sin \left (3\,c+3\,d\,x\right )}{48\,d}-\frac {a^2\,\sin \left (5\,c+5\,d\,x\right )}{80\,d}-\frac {b^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}-\frac {a\,b\,\sin \left (4\,c+4\,d\,x\right )}{16\,d} \] Input:
int(cos(c + d*x)^3*(a*sin(c + d*x) + b*tan(c + d*x))^2,x)
Output:
(a^2*sin(c + d*x))/(8*d) + (b^2*sin(c + d*x))/(4*d) + (a*b*x)/4 - (a^2*sin (3*c + 3*d*x))/(48*d) - (a^2*sin(5*c + 5*d*x))/(80*d) - (b^2*sin(3*c + 3*d *x))/(12*d) - (a*b*sin(4*c + 4*d*x))/(16*d)
Time = 0.24 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.80 \[ \int \cos ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^2 \, dx=\frac {30 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a b -15 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -12 \sin \left (d x +c \right )^{5} a^{2}+20 \sin \left (d x +c \right )^{3} a^{2}+20 \sin \left (d x +c \right )^{3} b^{2}+15 a b d x}{60 d} \] Input:
int(cos(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^2,x)
Output:
(30*cos(c + d*x)*sin(c + d*x)**3*a*b - 15*cos(c + d*x)*sin(c + d*x)*a*b - 12*sin(c + d*x)**5*a**2 + 20*sin(c + d*x)**3*a**2 + 20*sin(c + d*x)**3*b** 2 + 15*a*b*d*x)/(60*d)