Integrand size = 21, antiderivative size = 165 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {b^4 \text {arctanh}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{\left (a^2+b^2\right )^{5/2} d}+\frac {b^3 \cos (c+d x)}{\left (a^2+b^2\right )^2 d}+\frac {b \cos ^3(c+d x)}{3 \left (a^2+b^2\right ) d}+\frac {a b^2 \sin (c+d x)}{\left (a^2+b^2\right )^2 d}+\frac {a \sin (c+d x)}{\left (a^2+b^2\right ) d}-\frac {a \sin ^3(c+d x)}{3 \left (a^2+b^2\right ) d} \] Output:
-b^4*arctanh(cos(d*x+c)*(b-a*tan(d*x+c))/(a^2+b^2)^(1/2))/(a^2+b^2)^(5/2)/ d+b^3*cos(d*x+c)/(a^2+b^2)^2/d+1/3*b*cos(d*x+c)^3/(a^2+b^2)/d+a*b^2*sin(d* x+c)/(a^2+b^2)^2/d+a*sin(d*x+c)/(a^2+b^2)/d-1/3*a*sin(d*x+c)^3/(a^2+b^2)/d
Time = 1.07 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.83 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {24 b^4 \text {arctanh}\left (\frac {-b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2+b^2}}\right )+\sqrt {a^2+b^2} \left (3 b \left (a^2+5 b^2\right ) \cos (c+d x)+b \left (a^2+b^2\right ) \cos (3 (c+d x))+2 a \left (5 a^2+11 b^2+\left (a^2+b^2\right ) \cos (2 (c+d x))\right ) \sin (c+d x)\right )}{12 \left (a^2+b^2\right )^{5/2} d} \] Input:
Integrate[Cos[c + d*x]^3/(a + b*Tan[c + d*x]),x]
Output:
(24*b^4*ArcTanh[(-b + a*Tan[(c + d*x)/2])/Sqrt[a^2 + b^2]] + Sqrt[a^2 + b^ 2]*(3*b*(a^2 + 5*b^2)*Cos[c + d*x] + b*(a^2 + b^2)*Cos[3*(c + d*x)] + 2*a* (5*a^2 + 11*b^2 + (a^2 + b^2)*Cos[2*(c + d*x)])*Sin[c + d*x]))/(12*(a^2 + b^2)^(5/2)*d)
Time = 0.95 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.92, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.667, Rules used = {3042, 3990, 3042, 3967, 3042, 3113, 2009, 3990, 3042, 3967, 3042, 3117, 3988, 219}
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 {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sec (c+d x)^3 (a+b \tan (c+d x))}dx\) |
\(\Big \downarrow \) 3990 |
\(\displaystyle \frac {\int \cos ^3(c+d x) (a-b \tan (c+d x))dx}{a^2+b^2}+\frac {b^2 \int \frac {\cos (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \int \frac {1}{\sec (c+d x) (a+b \tan (c+d x))}dx}{a^2+b^2}+\frac {\int \frac {a-b \tan (c+d x)}{\sec (c+d x)^3}dx}{a^2+b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {a \int \cos ^3(c+d x)dx+\frac {b \cos ^3(c+d x)}{3 d}}{a^2+b^2}+\frac {b^2 \int \frac {1}{\sec (c+d x) (a+b \tan (c+d x))}dx}{a^2+b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {b \cos ^3(c+d x)}{3 d}}{a^2+b^2}+\frac {b^2 \int \frac {1}{\sec (c+d x) (a+b \tan (c+d x))}dx}{a^2+b^2}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}}{a^2+b^2}+\frac {b^2 \int \frac {1}{\sec (c+d x) (a+b \tan (c+d x))}dx}{a^2+b^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b^2 \int \frac {1}{\sec (c+d x) (a+b \tan (c+d x))}dx}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3990 |
\(\displaystyle \frac {b^2 \left (\frac {\int \cos (c+d x) (a-b \tan (c+d x))dx}{a^2+b^2}+\frac {b^2 \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \left (\frac {b^2 \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}+\frac {\int \frac {a-b \tan (c+d x)}{\sec (c+d x)}dx}{a^2+b^2}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3967 |
\(\displaystyle \frac {b^2 \left (\frac {a \int \cos (c+d x)dx+\frac {b \cos (c+d x)}{d}}{a^2+b^2}+\frac {b^2 \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {b^2 \left (\frac {a \int \sin \left (c+d x+\frac {\pi }{2}\right )dx+\frac {b \cos (c+d x)}{d}}{a^2+b^2}+\frac {b^2 \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {b^2 \left (\frac {b^2 \int \frac {\sec (c+d x)}{a+b \tan (c+d x)}dx}{a^2+b^2}+\frac {\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x)}{d}}{a^2+b^2}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 3988 |
\(\displaystyle \frac {b^2 \left (\frac {\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x)}{d}}{a^2+b^2}-\frac {b^2 \int \frac {1}{a^2+b^2-\cos ^2(c+d x) (b-a \tan (c+d x))^2}d(\cos (c+d x) (b-a \tan (c+d x)))}{d \left (a^2+b^2\right )}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {b^2 \left (\frac {\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x)}{d}}{a^2+b^2}-\frac {b^2 \text {arctanh}\left (\frac {\cos (c+d x) (b-a \tan (c+d x))}{\sqrt {a^2+b^2}}\right )}{d \left (a^2+b^2\right )^{3/2}}\right )}{a^2+b^2}+\frac {\frac {b \cos ^3(c+d x)}{3 d}-\frac {a \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}}{a^2+b^2}\) |
Input:
Int[Cos[c + d*x]^3/(a + b*Tan[c + d*x]),x]
Output:
(b^2*(-((b^2*ArcTanh[(Cos[c + d*x]*(b - a*Tan[c + d*x]))/Sqrt[a^2 + b^2]]) /((a^2 + b^2)^(3/2)*d)) + ((b*Cos[c + d*x])/d + (a*Sin[c + d*x])/d)/(a^2 + b^2)))/(a^2 + b^2) + ((b*Cos[c + d*x]^3)/(3*d) - (a*(-Sin[c + d*x] + Sin[ c + d*x]^3/3))/d)/(a^2 + b^2)
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[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)]), x_Symbol] :> Simp[b*((d*Sec[e + f*x])^m/(f*m)), x] + Simp[a Int[(d *Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2*m] || NeQ[a^2 + b^2, 0])
Int[sec[(e_.) + (f_.)*(x_)]/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbo l] :> Simp[-f^(-1) Subst[Int[1/(a^2 + b^2 - x^2), x], x, (b - a*Tan[e + f *x])/Sec[e + f*x]], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0]
Int[sec[(e_.) + (f_.)*(x_)]^(m_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_ Symbol] :> Simp[1/(a^2 + b^2) Int[Sec[e + f*x]^m*(a - b*Tan[e + f*x]), x] , x] + Simp[b^2/(a^2 + b^2) Int[Sec[e + f*x]^(m + 2)/(a + b*Tan[e + f*x]) , x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 + b^2, 0] && ILtQ[(m - 1)/2, 0]
Time = 4.01 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.34
method | result | size |
derivativedivides | \(\frac {\frac {2 b^{4} \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (a^{4}+2 b^{2} a^{2}+b^{4}\right ) \sqrt {a^{2}+b^{2}}}-\frac {2 \left (\left (-a^{3}-2 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-a^{2} b -2 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {2}{3} a^{3}-\frac {8}{3} a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-2 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-a^{3}-2 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {a^{2} b}{3}-\frac {4 b^{3}}{3}\right )}{\left (a^{4}+2 b^{2} a^{2}+b^{4}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}}{d}\) | \(221\) |
default | \(\frac {\frac {2 b^{4} \operatorname {arctanh}\left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2 b}{2 \sqrt {a^{2}+b^{2}}}\right )}{\left (a^{4}+2 b^{2} a^{2}+b^{4}\right ) \sqrt {a^{2}+b^{2}}}-\frac {2 \left (\left (-a^{3}-2 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+\left (-a^{2} b -2 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {2}{3} a^{3}-\frac {8}{3} a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-2 b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-a^{3}-2 a \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {a^{2} b}{3}-\frac {4 b^{3}}{3}\right )}{\left (a^{4}+2 b^{2} a^{2}+b^{4}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}}{d}\) | \(221\) |
risch | \(-\frac {5 \,{\mathrm e}^{i \left (d x +c \right )} b}{8 \left (-2 i a b +a^{2}-b^{2}\right ) d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} a}{8 \left (-2 i a b +a^{2}-b^{2}\right ) d}-\frac {5 \,{\mathrm e}^{-i \left (d x +c \right )} b}{8 \left (i b +a \right )^{2} d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} a}{8 \left (i b +a \right )^{2} d}+\frac {b^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{5}+2 i a^{3} b^{2}+i a \,b^{4}-a^{4} b -2 a^{2} b^{3}-b^{5}}{\left (a^{2}+b^{2}\right )^{\frac {5}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {5}{2}} d}-\frac {b^{4} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i a^{5}+2 i a^{3} b^{2}+i a \,b^{4}-a^{4} b -2 a^{2} b^{3}-b^{5}}{\left (a^{2}+b^{2}\right )^{\frac {5}{2}}}\right )}{\left (a^{2}+b^{2}\right )^{\frac {5}{2}} d}-\frac {b \cos \left (3 d x +3 c \right )}{12 d \left (-a^{2}-b^{2}\right )}-\frac {a \sin \left (3 d x +3 c \right )}{12 d \left (-a^{2}-b^{2}\right )}\) | \(328\) |
Input:
int(cos(d*x+c)^3/(a+b*tan(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(2*b^4/(a^4+2*a^2*b^2+b^4)/(a^2+b^2)^(1/2)*arctanh(1/2*(2*a*tan(1/2*d* x+1/2*c)-2*b)/(a^2+b^2)^(1/2))-2/(a^4+2*a^2*b^2+b^4)*((-a^3-2*a*b^2)*tan(1 /2*d*x+1/2*c)^5+(-a^2*b-2*b^3)*tan(1/2*d*x+1/2*c)^4+(-2/3*a^3-8/3*a*b^2)*t an(1/2*d*x+1/2*c)^3-2*b^3*tan(1/2*d*x+1/2*c)^2+(-a^3-2*a*b^2)*tan(1/2*d*x+ 1/2*c)-1/3*a^2*b-4/3*b^3)/(1+tan(1/2*d*x+1/2*c)^2)^3)
Time = 0.10 (sec) , antiderivative size = 262, normalized size of antiderivative = 1.59 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {3 \, \sqrt {a^{2} + b^{2}} b^{4} \log \left (-\frac {2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - b^{2} + 2 \, \sqrt {a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) - a \sin \left (d x + c\right )\right )}}{2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) + 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right ) + 2 \, {\left (2 \, a^{5} + 7 \, a^{3} b^{2} + 5 \, a b^{4} + {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} d} \] Input:
integrate(cos(d*x+c)^3/(a+b*tan(d*x+c)),x, algorithm="fricas")
Output:
1/6*(3*sqrt(a^2 + b^2)*b^4*log(-(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^2 - 2*a^2 - b^2 + 2*sqrt(a^2 + b^2)*(b*cos(d*x + c) - a* sin(d*x + c)))/(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c) ^2 + b^2)) + 2*(a^4*b + 2*a^2*b^3 + b^5)*cos(d*x + c)^3 + 6*(a^2*b^3 + b^5 )*cos(d*x + c) + 2*(2*a^5 + 7*a^3*b^2 + 5*a*b^4 + (a^5 + 2*a^3*b^2 + a*b^4 )*cos(d*x + c)^2)*sin(d*x + c))/((a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)*d)
\[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\int \frac {\cos ^{3}{\left (c + d x \right )}}{a + b \tan {\left (c + d x \right )}}\, dx \] Input:
integrate(cos(d*x+c)**3/(a+b*tan(d*x+c)),x)
Output:
Integral(cos(c + d*x)**3/(a + b*tan(c + d*x)), x)
Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (159) = 318\).
Time = 0.14 (sec) , antiderivative size = 379, normalized size of antiderivative = 2.30 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {\frac {3 \, b^{4} \log \left (\frac {b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \sqrt {a^{2} + b^{2}}}{b - \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \sqrt {a^{2} + b^{2}}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} + b^{2}}} - \frac {2 \, {\left (a^{2} b + 4 \, b^{3} + \frac {6 \, b^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {2 \, {\left (a^{3} + 4 \, a b^{2}\right )} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, {\left (a^{2} b + 2 \, b^{3}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {3 \, {\left (a^{3} + 2 \, a b^{2}\right )} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a^{4} + 2 \, a^{2} b^{2} + b^{4} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}}}{3 \, d} \] Input:
integrate(cos(d*x+c)^3/(a+b*tan(d*x+c)),x, algorithm="maxima")
Output:
-1/3*(3*b^4*log((b - a*sin(d*x + c)/(cos(d*x + c) + 1) + sqrt(a^2 + b^2))/ (b - a*sin(d*x + c)/(cos(d*x + c) + 1) - sqrt(a^2 + b^2)))/((a^4 + 2*a^2*b ^2 + b^4)*sqrt(a^2 + b^2)) - 2*(a^2*b + 4*b^3 + 6*b^3*sin(d*x + c)^2/(cos( d*x + c) + 1)^2 + 3*(a^3 + 2*a*b^2)*sin(d*x + c)/(cos(d*x + c) + 1) + 2*(a ^3 + 4*a*b^2)*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 3*(a^2*b + 2*b^3)*sin( d*x + c)^4/(cos(d*x + c) + 1)^4 + 3*(a^3 + 2*a*b^2)*sin(d*x + c)^5/(cos(d* x + c) + 1)^5)/(a^4 + 2*a^2*b^2 + b^4 + 3*(a^4 + 2*a^2*b^2 + b^4)*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*(a^4 + 2*a^2*b^2 + b^4)*sin(d*x + c)^4/(co s(d*x + c) + 1)^4 + (a^4 + 2*a^2*b^2 + b^4)*sin(d*x + c)^6/(cos(d*x + c) + 1)^6))/d
Time = 0.23 (sec) , antiderivative size = 286, normalized size of antiderivative = 1.73 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {\frac {3 \, b^{4} \log \left (\frac {{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b - 2 \, \sqrt {a^{2} + b^{2}} \right |}}{{\left | 2 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, b + 2 \, \sqrt {a^{2} + b^{2}} \right |}}\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} + b^{2}}} - \frac {2 \, {\left (3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 3 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 2 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{2} b + 4 \, b^{3}\right )}}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \] Input:
integrate(cos(d*x+c)^3/(a+b*tan(d*x+c)),x, algorithm="giac")
Output:
-1/3*(3*b^4*log(abs(2*a*tan(1/2*d*x + 1/2*c) - 2*b - 2*sqrt(a^2 + b^2))/ab s(2*a*tan(1/2*d*x + 1/2*c) - 2*b + 2*sqrt(a^2 + b^2)))/((a^4 + 2*a^2*b^2 + b^4)*sqrt(a^2 + b^2)) - 2*(3*a^3*tan(1/2*d*x + 1/2*c)^5 + 6*a*b^2*tan(1/2 *d*x + 1/2*c)^5 + 3*a^2*b*tan(1/2*d*x + 1/2*c)^4 + 6*b^3*tan(1/2*d*x + 1/2 *c)^4 + 2*a^3*tan(1/2*d*x + 1/2*c)^3 + 8*a*b^2*tan(1/2*d*x + 1/2*c)^3 + 6* b^3*tan(1/2*d*x + 1/2*c)^2 + 3*a^3*tan(1/2*d*x + 1/2*c) + 6*a*b^2*tan(1/2* d*x + 1/2*c) + a^2*b + 4*b^3)/((a^4 + 2*a^2*b^2 + b^4)*(tan(1/2*d*x + 1/2* c)^2 + 1)^3))/d
Time = 3.70 (sec) , antiderivative size = 342, normalized size of antiderivative = 2.07 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {\frac {2\,a^2\,b}{3}+\frac {8\,b^3}{3}}{a^4+2\,a^2\,b^2+b^4}+\frac {4\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^4+2\,a^2\,b^2+b^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (2\,a^3+4\,a\,b^2\right )}{a^4+2\,a^2\,b^2+b^4}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {4\,a^3}{3}+\frac {16\,a\,b^2}{3}\right )}{a^4+2\,a^2\,b^2+b^4}+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^3+2\,a\,b^2\right )}{a^4+2\,a^2\,b^2+b^4}+\frac {2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a^2+2\,b^2\right )}{a^4+2\,a^2\,b^2+b^4}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}-\frac {2\,b^4\,\mathrm {atanh}\left (\frac {a^4\,b+b^5+2\,a^2\,b^3-a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (a^4+2\,a^2\,b^2+b^4\right )}{{\left (a^2+b^2\right )}^{5/2}}\right )}{d\,{\left (a^2+b^2\right )}^{5/2}} \] Input:
int(cos(c + d*x)^3/(a + b*tan(c + d*x)),x)
Output:
(((2*a^2*b)/3 + (8*b^3)/3)/(a^4 + b^4 + 2*a^2*b^2) + (4*b^3*tan(c/2 + (d*x )/2)^2)/(a^4 + b^4 + 2*a^2*b^2) + (tan(c/2 + (d*x)/2)^5*(4*a*b^2 + 2*a^3)) /(a^4 + b^4 + 2*a^2*b^2) + (tan(c/2 + (d*x)/2)^3*((16*a*b^2)/3 + (4*a^3)/3 ))/(a^4 + b^4 + 2*a^2*b^2) + (2*tan(c/2 + (d*x)/2)*(2*a*b^2 + a^3))/(a^4 + b^4 + 2*a^2*b^2) + (2*b*tan(c/2 + (d*x)/2)^4*(a^2 + 2*b^2))/(a^4 + b^4 + 2*a^2*b^2))/(d*(3*tan(c/2 + (d*x)/2)^2 + 3*tan(c/2 + (d*x)/2)^4 + tan(c/2 + (d*x)/2)^6 + 1)) - (2*b^4*atanh((a^4*b + b^5 + 2*a^2*b^3 - a*tan(c/2 + ( d*x)/2)*(a^4 + b^4 + 2*a^2*b^2))/(a^2 + b^2)^(5/2)))/(d*(a^2 + b^2)^(5/2))
Time = 0.16 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.61 \[ \int \frac {\cos ^3(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {-6 \sqrt {a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a i -b i}{\sqrt {a^{2}+b^{2}}}\right ) b^{4} i -\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{4} b -2 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{2} b^{3}-\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} b^{5}+\cos \left (d x +c \right ) a^{4} b +5 \cos \left (d x +c \right ) a^{2} b^{3}+4 \cos \left (d x +c \right ) b^{5}-\sin \left (d x +c \right )^{3} a^{5}-2 \sin \left (d x +c \right )^{3} a^{3} b^{2}-\sin \left (d x +c \right )^{3} a \,b^{4}+3 \sin \left (d x +c \right ) a^{5}+9 \sin \left (d x +c \right ) a^{3} b^{2}+6 \sin \left (d x +c \right ) a \,b^{4}-a^{4} b -a^{2} b^{3}}{3 d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )} \] Input:
int(cos(d*x+c)^3/(a+b*tan(d*x+c)),x)
Output:
( - 6*sqrt(a**2 + b**2)*atan((tan((c + d*x)/2)*a*i - b*i)/sqrt(a**2 + b**2 ))*b**4*i - cos(c + d*x)*sin(c + d*x)**2*a**4*b - 2*cos(c + d*x)*sin(c + d *x)**2*a**2*b**3 - cos(c + d*x)*sin(c + d*x)**2*b**5 + cos(c + d*x)*a**4*b + 5*cos(c + d*x)*a**2*b**3 + 4*cos(c + d*x)*b**5 - sin(c + d*x)**3*a**5 - 2*sin(c + d*x)**3*a**3*b**2 - sin(c + d*x)**3*a*b**4 + 3*sin(c + d*x)*a** 5 + 9*sin(c + d*x)*a**3*b**2 + 6*sin(c + d*x)*a*b**4 - a**4*b - a**2*b**3) /(3*d*(a**6 + 3*a**4*b**2 + 3*a**2*b**4 + b**6))