Integrand size = 26, antiderivative size = 39 \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=-\frac {b \cos ^m(c+d x)}{d m}-\frac {a \cos ^{1+m}(c+d x)}{d (1+m)} \] Output:
-b*cos(d*x+c)^m/d/m-a*cos(d*x+c)^(1+m)/d/(1+m)
Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.90 \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=-\frac {\cos ^m(c+d x) (b+b m+a m \cos (c+d x))}{d m (1+m)} \] Input:
Integrate[Cos[c + d*x]^m*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]
Output:
-((Cos[c + d*x]^m*(b + b*m + a*m*Cos[c + d*x]))/(d*m*(1 + m)))
Time = 0.30 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {3042, 4877, 27, 3042, 3045, 15}
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 ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^m (a \sin (c+d x)+b \tan (c+d x))dx\) |
\(\Big \downarrow \) 4877 |
\(\displaystyle a \int \cos ^m(c+d x) \sin (c+d x)dx+\int b \cos ^{m-1}(c+d x) \sin (c+d x)dx\) |
\(\Big \downarrow \) 27 |
\(\displaystyle a \int \cos ^m(c+d x) \sin (c+d x)dx+b \int \cos ^{m-1}(c+d x) \sin (c+d x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \cos (c+d x)^m \sin (c+d x)dx+b \int \cos (c+d x)^{m-1} \sin (c+d x)dx\) |
\(\Big \downarrow \) 3045 |
\(\displaystyle -\frac {a \int \cos ^m(c+d x)d\cos (c+d x)}{d}-\frac {b \int \cos ^{m-1}(c+d x)d\cos (c+d x)}{d}\) |
\(\Big \downarrow \) 15 |
\(\displaystyle -\frac {a \cos ^{m+1}(c+d x)}{d (m+1)}-\frac {b \cos ^m(c+d x)}{d m}\) |
Input:
Int[Cos[c + d*x]^m*(a*Sin[c + d*x] + b*Tan[c + d*x]),x]
Output:
-((b*Cos[c + d*x]^m)/(d*m)) - (a*Cos[c + d*x]^(1 + m))/(d*(1 + m))
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ {a, m}, x] && NeQ[m, -1]
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_ Symbol] :> Simp[-(a*f)^(-1) Subst[Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] && !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])
Int[(u_)*((v_) + (d_.)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_.)), x_Symbol] : > With[{e = FreeFactors[Cos[c*(a + b*x)], x]}, Int[ActivateTrig[u*v], x] + Simp[d Int[ActivateTrig[u]*Sin[c*(a + b*x)]^n, x], x] /; FunctionOfQ[Cos[ c*(a + b*x)]/e, u, x]] /; FreeQ[{a, b, c, d}, x] && !FreeQ[v, x] && Intege rQ[(n - 1)/2] && NonsumQ[u] && (EqQ[F, Sin] || EqQ[F, sin])
Time = 6.81 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.03
method | result | size |
parts | \(-\frac {b \cos \left (d x +c \right )^{m}}{d m}-\frac {a \cos \left (d x +c \right )^{1+m}}{d \left (1+m \right )}\) | \(40\) |
default | \(-\frac {b \,{\mathrm e}^{m \ln \left (\cos \left (d x +c \right )\right )}}{d m}-\frac {a \cos \left (d x +c \right ) {\mathrm e}^{m \ln \left (\cos \left (d x +c \right )\right )}}{d \left (1+m \right )}\) | \(48\) |
risch | \(-\frac {a \left (\frac {1}{2}\right )^{m} \left ({\mathrm e}^{i \left (d x +c \right )}\right )^{-m} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{m} {\mathrm e}^{-\frac {i \left (m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{3} \pi -m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{-i \left (d x +c \right )}\right ) \pi -m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )\right ) \pi +m \,\operatorname {csgn}\left (i \cos \left (d x +c \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i \left (d x +c \right )}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )\right ) \pi +2 d x +2 c \right )}{2}}}{2 d \left (1+m \right )}-\frac {\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{m} \left ({\mathrm e}^{i \left (d x +c \right )}\right )^{-m} \left (\frac {1}{2}\right )^{m} a \,{\mathrm e}^{\frac {i \left (-m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{3} \pi +m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{2} \operatorname {csgn}\left (i {\mathrm e}^{-i \left (d x +c \right )}\right ) \pi +m \operatorname {csgn}\left (i \cos \left (d x +c \right )\right )^{2} \operatorname {csgn}\left (i \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )\right ) \pi -m \,\operatorname {csgn}\left (i \cos \left (d x +c \right )\right ) \operatorname {csgn}\left (i {\mathrm e}^{-i \left (d x +c \right )}\right ) \operatorname {csgn}\left (i \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )\right ) \pi +2 d x +2 c \right )}{2}}}{2 d \left (1+m \right )}-\frac {b \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{m} \left ({\mathrm e}^{i \left (d x +c \right )}\right )^{-m} \left (\frac {1}{2}\right )^{m} {\mathrm e}^{-\frac {i m \,\operatorname {csgn}\left (i \cos \left (d x +c \right )\right ) \pi \left (\operatorname {csgn}\left (i \cos \left (d x +c \right )\right )-\operatorname {csgn}\left (i \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )\right )\right ) \left (\operatorname {csgn}\left (i \cos \left (d x +c \right )\right )-\operatorname {csgn}\left (i {\mathrm e}^{-i \left (d x +c \right )}\right )\right )}{2}}}{m d}\) | \(446\) |
Input:
int(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
-b*cos(d*x+c)^m/d/m-a*cos(d*x+c)^(1+m)/d/(1+m)
Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.90 \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=-\frac {{\left (a m \cos \left (d x + c\right ) + b m + b\right )} \cos \left (d x + c\right )^{m}}{d m^{2} + d m} \] Input:
integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="fricas")
Output:
-(a*m*cos(d*x + c) + b*m + b)*cos(d*x + c)^m/(d*m^2 + d*m)
\[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=\int \left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right ) \cos ^{m}{\left (c + d x \right )}\, dx \] Input:
integrate(cos(d*x+c)**m*(a*sin(d*x+c)+b*tan(d*x+c)),x)
Output:
Integral((a*sin(c + d*x) + b*tan(c + d*x))*cos(c + d*x)**m, x)
Time = 0.03 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.92 \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=-\frac {\frac {a \cos \left (d x + c\right )^{m + 1}}{m + 1} + \frac {b \cos \left (d x + c\right )^{m}}{m}}{d} \] Input:
integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="maxima")
Output:
-(a*cos(d*x + c)^(m + 1)/(m + 1) + b*cos(d*x + c)^m/m)/d
Exception generated. \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x, algorithm="giac")
Output:
Exception raised: RuntimeError >> an error occurred running a Giac command :INPUT:sage2OUTPUT:Unable to divide, perhaps due to rounding error%%%{-1,[ 0,1,0]%%%} / %%%{1,[0,0,2]%%%}+%%%{-1,[0,0,0]%%%} Error: Bad Argument Valu e
Time = 16.21 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.90 \[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=-\frac {{\cos \left (c+d\,x\right )}^m\,\left (b+b\,m+a\,m\,\cos \left (c+d\,x\right )\right )}{d\,m\,\left (m+1\right )} \] Input:
int(cos(c + d*x)^m*(a*sin(c + d*x) + b*tan(c + d*x)),x)
Output:
-(cos(c + d*x)^m*(b + b*m + a*m*cos(c + d*x)))/(d*m*(m + 1))
\[ \int \cos ^m(c+d x) (a \sin (c+d x)+b \tan (c+d x)) \, dx=\frac {-\cos \left (d x +c \right )^{m} \cos \left (d x +c \right ) a +\left (\int \cos \left (d x +c \right )^{m} \tan \left (d x +c \right )d x \right ) b d m +\left (\int \cos \left (d x +c \right )^{m} \tan \left (d x +c \right )d x \right ) b d}{d \left (m +1\right )} \] Input:
int(cos(d*x+c)^m*(a*sin(d*x+c)+b*tan(d*x+c)),x)
Output:
( - cos(c + d*x)**m*cos(c + d*x)*a + int(cos(c + d*x)**m*tan(c + d*x),x)*b *d*m + int(cos(c + d*x)**m*tan(c + d*x),x)*b*d)/(d*(m + 1))