Integrand size = 19, antiderivative size = 98 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {b \cos (c+d x)-a \sin (c+d x)}{3 \left (a^2+b^2\right ) d (a \cos (c+d x)+b \sin (c+d x))^3}+\frac {2 \sin (c+d x)}{3 a \left (a^2+b^2\right ) d (a \cos (c+d x)+b \sin (c+d x))} \] Output:
-1/3*(b*cos(d*x+c)-a*sin(d*x+c))/(a^2+b^2)/d/(a*cos(d*x+c)+b*sin(d*x+c))^3 +2/3*sin(d*x+c)/a/(a^2+b^2)/d/(a*cos(d*x+c)+b*sin(d*x+c))
Time = 0.26 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.87 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {-a b \cos (3 (c+d x))+\left (2 a^2+b^2+\left (a^2-b^2\right ) \cos (2 (c+d x))\right ) \sin (c+d x)}{3 a \left (a^2+b^2\right ) d (a \cos (c+d x)+b \sin (c+d x))^3} \] Input:
Integrate[(a*Cos[c + d*x] + b*Sin[c + d*x])^(-4),x]
Output:
(-(a*b*Cos[3*(c + d*x)]) + (2*a^2 + b^2 + (a^2 - b^2)*Cos[2*(c + d*x)])*Si n[c + d*x])/(3*a*(a^2 + b^2)*d*(a*Cos[c + d*x] + b*Sin[c + d*x])^3)
Time = 0.32 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3042, 3555, 3042, 3554}
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 {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4}dx\) |
\(\Big \downarrow \) 3555 |
\(\displaystyle \frac {2 \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^2}dx}{3 \left (a^2+b^2\right )}-\frac {b \cos (c+d x)-a \sin (c+d x)}{3 d \left (a^2+b^2\right ) (a \cos (c+d x)+b \sin (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^2}dx}{3 \left (a^2+b^2\right )}-\frac {b \cos (c+d x)-a \sin (c+d x)}{3 d \left (a^2+b^2\right ) (a \cos (c+d x)+b \sin (c+d x))^3}\) |
\(\Big \downarrow \) 3554 |
\(\displaystyle \frac {2 \sin (c+d x)}{3 a d \left (a^2+b^2\right ) (a \cos (c+d x)+b \sin (c+d x))}-\frac {b \cos (c+d x)-a \sin (c+d x)}{3 d \left (a^2+b^2\right ) (a \cos (c+d x)+b \sin (c+d x))^3}\) |
Input:
Int[(a*Cos[c + d*x] + b*Sin[c + d*x])^(-4),x]
Output:
-1/3*(b*Cos[c + d*x] - a*Sin[c + d*x])/((a^2 + b^2)*d*(a*Cos[c + d*x] + b* Sin[c + d*x])^3) + (2*Sin[c + d*x])/(3*a*(a^2 + b^2)*d*(a*Cos[c + d*x] + b *Sin[c + d*x]))
Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-2), x _Symbol] :> Simp[Sin[c + d*x]/(a*d*(a*Cos[c + d*x] + b*Sin[c + d*x])), x] / ; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x _Symbol] :> Simp[(b*Cos[c + d*x] - a*Sin[c + d*x])*((a*Cos[c + d*x] + b*Sin [c + d*x])^(n + 1)/(d*(n + 1)*(a^2 + b^2))), x] + Simp[(n + 2)/((n + 1)*(a^ 2 + b^2)) Int[(a*Cos[c + d*x] + b*Sin[c + d*x])^(n + 2), x], x] /; FreeQ[ {a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && LtQ[n, -1] && NeQ[n, -2]
Time = 0.70 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.65
method | result | size |
derivativedivides | \(\frac {-\frac {a^{2}+b^{2}}{3 b^{3} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {a}{b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {1}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}}{d}\) | \(64\) |
default | \(\frac {-\frac {a^{2}+b^{2}}{3 b^{3} \left (a +b \tan \left (d x +c \right )\right )^{3}}+\frac {a}{b^{3} \left (a +b \tan \left (d x +c \right )\right )^{2}}-\frac {1}{b^{3} \left (a +b \tan \left (d x +c \right )\right )}}{d}\) | \(64\) |
risch | \(\frac {4 i \left (3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+3 b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a -b \right )}{3 \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+i a \,{\mathrm e}^{2 i \left (d x +c \right )}-b +i a \right )^{3} d \left (i a +b \right )^{2}}\) | \(82\) |
norman | \(\frac {\frac {1}{3 b d}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{3 b d}-\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d a}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d b}}{\left (a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )^{3}}\) | \(117\) |
parallelrisch | \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a b +\frac {2 \left (-a^{2}+2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{3}+2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a b +a^{2}\right )}{a^{3} d \left (a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )^{3}}\) | \(120\) |
Input:
int(1/(cos(d*x+c)*a+b*sin(d*x+c))^4,x,method=_RETURNVERBOSE)
Output:
1/d*(-1/3*(a^2+b^2)/b^3/(a+b*tan(d*x+c))^3+a/b^3/(a+b*tan(d*x+c))^2-1/b^3/ (a+b*tan(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 217 vs. \(2 (94) = 188\).
Time = 0.10 (sec) , antiderivative size = 217, normalized size of antiderivative = 2.21 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (a^{2} b - b^{3}\right )} \cos \left (d x + c\right ) - {\left (a^{3} + 3 \, a b^{2} + 2 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, {\left ({\left (a^{7} - a^{5} b^{2} - 5 \, a^{3} b^{4} - 3 \, a b^{6}\right )} d \cos \left (d x + c\right )^{3} + 3 \, {\left (a^{5} b^{2} + 2 \, a^{3} b^{4} + a b^{6}\right )} d \cos \left (d x + c\right ) + {\left ({\left (3 \, a^{6} b + 5 \, a^{4} b^{3} + a^{2} b^{5} - b^{7}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{4} b^{3} + 2 \, a^{2} b^{5} + b^{7}\right )} d\right )} \sin \left (d x + c\right )\right )}} \] Input:
integrate(1/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="fricas")
Output:
-1/3*(2*(3*a^2*b - b^3)*cos(d*x + c)^3 - 3*(a^2*b - b^3)*cos(d*x + c) - (a ^3 + 3*a*b^2 + 2*(a^3 - 3*a*b^2)*cos(d*x + c)^2)*sin(d*x + c))/((a^7 - a^5 *b^2 - 5*a^3*b^4 - 3*a*b^6)*d*cos(d*x + c)^3 + 3*(a^5*b^2 + 2*a^3*b^4 + a* b^6)*d*cos(d*x + c) + ((3*a^6*b + 5*a^4*b^3 + a^2*b^5 - b^7)*d*cos(d*x + c )^2 + (a^4*b^3 + 2*a^2*b^5 + b^7)*d)*sin(d*x + c))
Timed out. \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\text {Timed out} \] Input:
integrate(1/(a*cos(d*x+c)+b*sin(d*x+c))**4,x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.87 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {3 \, b^{2} \tan \left (d x + c\right )^{2} + 3 \, a b \tan \left (d x + c\right ) + a^{2} + b^{2}}{3 \, {\left (b^{6} \tan \left (d x + c\right )^{3} + 3 \, a b^{5} \tan \left (d x + c\right )^{2} + 3 \, a^{2} b^{4} \tan \left (d x + c\right ) + a^{3} b^{3}\right )} d} \] Input:
integrate(1/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="maxima")
Output:
-1/3*(3*b^2*tan(d*x + c)^2 + 3*a*b*tan(d*x + c) + a^2 + b^2)/((b^6*tan(d*x + c)^3 + 3*a*b^5*tan(d*x + c)^2 + 3*a^2*b^4*tan(d*x + c) + a^3*b^3)*d)
Time = 0.12 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.51 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=-\frac {3 \, b^{2} \tan \left (d x + c\right )^{2} + 3 \, a b \tan \left (d x + c\right ) + a^{2} + b^{2}}{3 \, {\left (b \tan \left (d x + c\right ) + a\right )}^{3} b^{3} d} \] Input:
integrate(1/(a*cos(d*x+c)+b*sin(d*x+c))^4,x, algorithm="giac")
Output:
-1/3*(3*b^2*tan(d*x + c)^2 + 3*a*b*tan(d*x + c) + a^2 + b^2)/((b*tan(d*x + c) + a)^3*b^3*d)
Time = 16.60 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.27 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {\frac {2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{a}+\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (a^2-2\,b^2\right )}{3\,a^3}+\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{a^2}-\frac {4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{a^2}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (12\,a\,b^2-3\,a^3\right )-a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (12\,a\,b^2-3\,a^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (12\,a^2\,b-8\,b^3\right )+a^3+6\,a^2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6\,a^2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\right )} \] Input:
int(1/(a*cos(c + d*x) + b*sin(c + d*x))^4,x)
Output:
((2*tan(c/2 + (d*x)/2)^5)/a + (2*tan(c/2 + (d*x)/2))/a - (4*tan(c/2 + (d*x )/2)^3*(a^2 - 2*b^2))/(3*a^3) + (4*b*tan(c/2 + (d*x)/2)^2)/a^2 - (4*b*tan( c/2 + (d*x)/2)^4)/a^2)/(d*(tan(c/2 + (d*x)/2)^2*(12*a*b^2 - 3*a^3) - a^3*t an(c/2 + (d*x)/2)^6 - tan(c/2 + (d*x)/2)^4*(12*a*b^2 - 3*a^3) - tan(c/2 + (d*x)/2)^3*(12*a^2*b - 8*b^3) + a^3 + 6*a^2*b*tan(c/2 + (d*x)/2) + 6*a^2*b *tan(c/2 + (d*x)/2)^5))
Time = 0.18 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.42 \[ \int \frac {1}{(a \cos (c+d x)+b \sin (c+d x))^4} \, dx=\frac {-\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a +\cos \left (d x +c \right ) a -\sin \left (d x +c \right )^{3} b}{3 a b d \left (\cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a^{3}-3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a \,b^{2}-\cos \left (d x +c \right ) a^{3}+3 \sin \left (d x +c \right )^{3} a^{2} b -\sin \left (d x +c \right )^{3} b^{3}-3 \sin \left (d x +c \right ) a^{2} b \right )} \] Input:
int(1/(a*cos(d*x+c)+b*sin(d*x+c))^4,x)
Output:
( - cos(c + d*x)*sin(c + d*x)**2*a + cos(c + d*x)*a - sin(c + d*x)**3*b)/( 3*a*b*d*(cos(c + d*x)*sin(c + d*x)**2*a**3 - 3*cos(c + d*x)*sin(c + d*x)** 2*a*b**2 - cos(c + d*x)*a**3 + 3*sin(c + d*x)**3*a**2*b - sin(c + d*x)**3* b**3 - 3*sin(c + d*x)*a**2*b))