\(\int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx\) [281]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [B] (verification not implemented)
Sympy [F(-1)]
Maxima [B] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 116 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=-\frac {A \text {arctanh}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{2 \left (b^2+c^2\right )^{3/2}}-\frac {B c+A c \cos (x)-A b \sin (x)}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}-\frac {b B c \cos (x)-b^2 B \sin (x)}{\left (b^2+c^2\right )^2 (b \cos (x)+c \sin (x))} \] Output:

-1/2*A*arctanh((c*cos(x)-b*sin(x))/(b^2+c^2)^(1/2))/(b^2+c^2)^(3/2)-1/2*(B 
*c+A*c*cos(x)-A*b*sin(x))/(b^2+c^2)/(b*cos(x)+c*sin(x))^2-(b*B*c*cos(x)-b^ 
2*B*sin(x))/(b^2+c^2)^2/(b*cos(x)+c*sin(x))
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.02 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=\frac {2 A \sqrt {b^2+c^2} \text {arctanh}\left (\frac {-c+b \tan \left (\frac {x}{2}\right )}{\sqrt {b^2+c^2}}\right ) (b \cos (x)+c \sin (x))^2+\left (b^2+c^2\right ) (-A c \cos (x)-B c \cos (2 x)+b (A+2 B \cos (x)) \sin (x))}{2 (b-i c)^2 (b+i c)^2 (b \cos (x)+c \sin (x))^2} \] Input:

Integrate[(A + B*Cos[x])/(b*Cos[x] + c*Sin[x])^3,x]
 

Output:

(2*A*Sqrt[b^2 + c^2]*ArcTanh[(-c + b*Tan[x/2])/Sqrt[b^2 + c^2]]*(b*Cos[x] 
+ c*Sin[x])^2 + (b^2 + c^2)*(-(A*c*Cos[x]) - B*c*Cos[2*x] + b*(A + 2*B*Cos 
[x])*Sin[x]))/(2*(b - I*c)^2*(b + I*c)^2*(b*Cos[x] + c*Sin[x])^2)
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.10, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {3042, 3637, 3042, 3632, 3042, 3553, 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 {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3}dx\)

\(\Big \downarrow \) 3637

\(\displaystyle \frac {\int \frac {2 b B+A b \cos (x)+A c \sin (x)}{(b \cos (x)+c \sin (x))^2}dx}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {2 b B+A b \cos (x)+A c \sin (x)}{(b \cos (x)+c \sin (x))^2}dx}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

\(\Big \downarrow \) 3632

\(\displaystyle \frac {A \int \frac {1}{b \cos (x)+c \sin (x)}dx-\frac {2 \left (b B c \cos (x)-b^2 B \sin (x)\right )}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {A \int \frac {1}{b \cos (x)+c \sin (x)}dx-\frac {2 \left (b B c \cos (x)-b^2 B \sin (x)\right )}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

\(\Big \downarrow \) 3553

\(\displaystyle \frac {-A \int \frac {1}{b^2+c^2-(c \cos (x)-b \sin (x))^2}d(c \cos (x)-b \sin (x))-\frac {2 \left (b B c \cos (x)-b^2 B \sin (x)\right )}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

\(\Big \downarrow \) 219

\(\displaystyle \frac {-\frac {A \text {arctanh}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}-\frac {2 \left (b B c \cos (x)-b^2 B \sin (x)\right )}{\left (b^2+c^2\right ) (b \cos (x)+c \sin (x))}}{2 \left (b^2+c^2\right )}-\frac {-A b \sin (x)+A c \cos (x)+B c}{2 \left (b^2+c^2\right ) (b \cos (x)+c \sin (x))^2}\)

Input:

Int[(A + B*Cos[x])/(b*Cos[x] + c*Sin[x])^3,x]
 

Output:

-1/2*(B*c + A*c*Cos[x] - A*b*Sin[x])/((b^2 + c^2)*(b*Cos[x] + c*Sin[x])^2) 
 + (-((A*ArcTanh[(c*Cos[x] - b*Sin[x])/Sqrt[b^2 + c^2]])/Sqrt[b^2 + c^2]) 
- (2*(b*B*c*Cos[x] - b^2*B*Sin[x]))/((b^2 + c^2)*(b*Cos[x] + c*Sin[x])))/( 
2*(b^2 + c^2))
 

Defintions of rubi rules used

rule 219
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])
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3553
Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x 
_Symbol] :> Simp[-d^(-1)   Subst[Int[1/(a^2 + b^2 - x^2), x], x, b*Cos[c + 
d*x] - a*Sin[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
 

rule 3632
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]) 
/((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^2, 
 x_Symbol] :> Simp[(c*B - b*C - (a*C - c*A)*Cos[d + e*x] + (a*B - b*A)*Sin[ 
d + e*x])/(e*(a^2 - b^2 - c^2)*(a + b*Cos[d + e*x] + c*Sin[d + e*x])), x] + 
 Simp[(a*A - b*B - c*C)/(a^2 - b^2 - c^2)   Int[1/(a + b*Cos[d + e*x] + c*S 
in[d + e*x]), x], x] /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[a^2 - b^2 
 - c^2, 0] && NeQ[a*A - b*B - c*C, 0]
 

rule 3637
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.))*((a_.) + cos[(d_.) + (e_.)*(x_) 
]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_), x_Symbol] :> Simp[(-(c*B + c 
*A*Cos[d + e*x] + (a*B - b*A)*Sin[d + e*x]))*((a + b*Cos[d + e*x] + c*Sin[d 
 + e*x])^(n + 1)/(e*(n + 1)*(a^2 - b^2 - c^2))), x] + Simp[1/((n + 1)*(a^2 
- b^2 - c^2))   Int[(a + b*Cos[d + e*x] + c*Sin[d + e*x])^(n + 1)*Simp[(n + 
 1)*(a*A - b*B) + (n + 2)*(a*B - b*A)*Cos[d + e*x] - (n + 2)*c*A*Sin[d + e* 
x], x], x], x] /; FreeQ[{a, b, c, d, e, A, B}, x] && LtQ[n, -1] && NeQ[a^2 
- b^2 - c^2, 0] && NeQ[n, -2]
 
Maple [A] (verified)

Time = 0.53 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.76

method result size
default \(-\frac {2 \left (-\frac {\left (A \,b^{2}+2 A \,c^{2}-2 B \,b^{2}-2 B \,c^{2}\right ) \tan \left (\frac {x}{2}\right )^{3}}{2 b \left (b^{2}+c^{2}\right )}-\frac {c \left (A \,b^{2}-2 A \,c^{2}+2 B \,b^{2}+2 B \,c^{2}\right ) \tan \left (\frac {x}{2}\right )^{2}}{2 \left (b^{2}+c^{2}\right ) b^{2}}-\frac {\left (A \,b^{2}-2 A \,c^{2}+2 B \,b^{2}+2 B \,c^{2}\right ) \tan \left (\frac {x}{2}\right )}{2 \left (b^{2}+c^{2}\right ) b}+\frac {c A}{2 b^{2}+2 c^{2}}\right )}{\left (b \tan \left (\frac {x}{2}\right )^{2}-2 c \tan \left (\frac {x}{2}\right )-b \right )^{2}}+\frac {A \,\operatorname {arctanh}\left (\frac {2 b \tan \left (\frac {x}{2}\right )-2 c}{2 \sqrt {b^{2}+c^{2}}}\right )}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}}\) \(204\)
risch \(\frac {-A \,b^{2} {\mathrm e}^{3 i x}+A \,c^{2} {\mathrm e}^{3 i x}+2 i A b c \,{\mathrm e}^{3 i x}+2 B \,b^{2} {\mathrm e}^{2 i x}+2 B \,c^{2} {\mathrm e}^{2 i x}+A \,b^{2} {\mathrm e}^{i x}+A \,c^{2} {\mathrm e}^{i x}+2 B \,b^{2}+2 i b B c}{\left (-i b +c \right ) \left (c \,{\mathrm e}^{2 i x}+i b \,{\mathrm e}^{2 i x}-c +i b \right )^{2} \left (i b +c \right )^{2}}+\frac {A \ln \left ({\mathrm e}^{i x}+\frac {i b^{3}+i b \,c^{2}-b^{2} c -c^{3}}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}}\right )}{2 \left (b^{2}+c^{2}\right )^{\frac {3}{2}}}-\frac {A \ln \left ({\mathrm e}^{i x}-\frac {i b^{3}+i b \,c^{2}-b^{2} c -c^{3}}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}}\right )}{2 \left (b^{2}+c^{2}\right )^{\frac {3}{2}}}\) \(241\)

Input:

int((A+B*cos(x))/(b*cos(x)+c*sin(x))^3,x,method=_RETURNVERBOSE)
 

Output:

-2*(-1/2*(A*b^2+2*A*c^2-2*B*b^2-2*B*c^2)/b/(b^2+c^2)*tan(1/2*x)^3-1/2*c*(A 
*b^2-2*A*c^2+2*B*b^2+2*B*c^2)/(b^2+c^2)/b^2*tan(1/2*x)^2-1/2*(A*b^2-2*A*c^ 
2+2*B*b^2+2*B*c^2)/(b^2+c^2)/b*tan(1/2*x)+1/2*c*A/(b^2+c^2))/(b*tan(1/2*x) 
^2-2*c*tan(1/2*x)-b)^2+A/(b^2+c^2)^(3/2)*arctanh(1/2*(2*b*tan(1/2*x)-2*c)/ 
(b^2+c^2)^(1/2))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 279 vs. \(2 (108) = 216\).

Time = 0.09 (sec) , antiderivative size = 279, normalized size of antiderivative = 2.41 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=-\frac {8 \, B b^{2} c \cos \left (x\right )^{2} - 2 \, B b^{2} c + 2 \, B c^{3} - {\left (2 \, A b c \cos \left (x\right ) \sin \left (x\right ) + A c^{2} + {\left (A b^{2} - A c^{2}\right )} \cos \left (x\right )^{2}\right )} \sqrt {b^{2} + c^{2}} \log \left (-\frac {2 \, b c \cos \left (x\right ) \sin \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} - 2 \, b^{2} - c^{2} + 2 \, \sqrt {b^{2} + c^{2}} {\left (c \cos \left (x\right ) - b \sin \left (x\right )\right )}}{2 \, b c \cos \left (x\right ) \sin \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + c^{2}}\right ) + 2 \, {\left (A b^{2} c + A c^{3}\right )} \cos \left (x\right ) - 2 \, {\left (A b^{3} + A b c^{2} + 2 \, {\left (B b^{3} - B b c^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{4 \, {\left (b^{4} c^{2} + 2 \, b^{2} c^{4} + c^{6} + {\left (b^{6} + b^{4} c^{2} - b^{2} c^{4} - c^{6}\right )} \cos \left (x\right )^{2} + 2 \, {\left (b^{5} c + 2 \, b^{3} c^{3} + b c^{5}\right )} \cos \left (x\right ) \sin \left (x\right )\right )}} \] Input:

integrate((A+B*cos(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="fricas")
 

Output:

-1/4*(8*B*b^2*c*cos(x)^2 - 2*B*b^2*c + 2*B*c^3 - (2*A*b*c*cos(x)*sin(x) + 
A*c^2 + (A*b^2 - A*c^2)*cos(x)^2)*sqrt(b^2 + c^2)*log(-(2*b*c*cos(x)*sin(x 
) + (b^2 - c^2)*cos(x)^2 - 2*b^2 - c^2 + 2*sqrt(b^2 + c^2)*(c*cos(x) - b*s 
in(x)))/(2*b*c*cos(x)*sin(x) + (b^2 - c^2)*cos(x)^2 + c^2)) + 2*(A*b^2*c + 
 A*c^3)*cos(x) - 2*(A*b^3 + A*b*c^2 + 2*(B*b^3 - B*b*c^2)*cos(x))*sin(x))/ 
(b^4*c^2 + 2*b^2*c^4 + c^6 + (b^6 + b^4*c^2 - b^2*c^4 - c^6)*cos(x)^2 + 2* 
(b^5*c + 2*b^3*c^3 + b*c^5)*cos(x)*sin(x))
 

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=\text {Timed out} \] Input:

integrate((A+B*cos(x))/(b*cos(x)+c*sin(x))**3,x)
 

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 366 vs. \(2 (108) = 216\).

Time = 0.14 (sec) , antiderivative size = 366, normalized size of antiderivative = 3.16 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=-\frac {1}{2} \, A {\left (\frac {2 \, {\left (b^{2} c - \frac {{\left (b^{3} - 2 \, b c^{2}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {{\left (b^{2} c - 2 \, c^{3}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {{\left (b^{3} + 2 \, b c^{2}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}}{b^{6} + b^{4} c^{2} + \frac {4 \, {\left (b^{5} c + b^{3} c^{3}\right )} \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {2 \, {\left (b^{6} - b^{4} c^{2} - 2 \, b^{2} c^{4}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {4 \, {\left (b^{5} c + b^{3} c^{3}\right )} \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {{\left (b^{6} + b^{4} c^{2}\right )} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}} + \frac {\log \left (\frac {c - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \sqrt {b^{2} + c^{2}}}{c - \frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} - \sqrt {b^{2} + c^{2}}}\right )}{{\left (b^{2} + c^{2}\right )}^{\frac {3}{2}}}\right )} + \frac {2 \, B {\left (\frac {b \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {c \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {b \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}\right )}}{b^{4} + \frac {4 \, b^{3} c \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {4 \, b^{3} c \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {b^{4} \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} - \frac {2 \, {\left (b^{4} - 2 \, b^{2} c^{2}\right )} \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}} \] Input:

integrate((A+B*cos(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="maxima")
 

Output:

-1/2*A*(2*(b^2*c - (b^3 - 2*b*c^2)*sin(x)/(cos(x) + 1) - (b^2*c - 2*c^3)*s 
in(x)^2/(cos(x) + 1)^2 - (b^3 + 2*b*c^2)*sin(x)^3/(cos(x) + 1)^3)/(b^6 + b 
^4*c^2 + 4*(b^5*c + b^3*c^3)*sin(x)/(cos(x) + 1) - 2*(b^6 - b^4*c^2 - 2*b^ 
2*c^4)*sin(x)^2/(cos(x) + 1)^2 - 4*(b^5*c + b^3*c^3)*sin(x)^3/(cos(x) + 1) 
^3 + (b^6 + b^4*c^2)*sin(x)^4/(cos(x) + 1)^4) + log((c - b*sin(x)/(cos(x) 
+ 1) + sqrt(b^2 + c^2))/(c - b*sin(x)/(cos(x) + 1) - sqrt(b^2 + c^2)))/(b^ 
2 + c^2)^(3/2)) + 2*B*(b*sin(x)/(cos(x) + 1) + c*sin(x)^2/(cos(x) + 1)^2 - 
 b*sin(x)^3/(cos(x) + 1)^3)/(b^4 + 4*b^3*c*sin(x)/(cos(x) + 1) - 4*b^3*c*s 
in(x)^3/(cos(x) + 1)^3 + b^4*sin(x)^4/(cos(x) + 1)^4 - 2*(b^4 - 2*b^2*c^2) 
*sin(x)^2/(cos(x) + 1)^2)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 245 vs. \(2 (108) = 216\).

Time = 0.17 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.11 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=\frac {A \log \left (\frac {{\left | -2 \, b \tan \left (\frac {1}{2} \, x\right ) + 2 \, c - 2 \, \sqrt {b^{2} + c^{2}} \right |}}{{\left | -2 \, b \tan \left (\frac {1}{2} \, x\right ) + 2 \, c + 2 \, \sqrt {b^{2} + c^{2}} \right |}}\right )}{2 \, {\left (b^{2} + c^{2}\right )}^{\frac {3}{2}}} + \frac {A b^{3} \tan \left (\frac {1}{2} \, x\right )^{3} - 2 \, B b^{3} \tan \left (\frac {1}{2} \, x\right )^{3} + 2 \, A b c^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 2 \, B b c^{2} \tan \left (\frac {1}{2} \, x\right )^{3} + A b^{2} c \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, B b^{2} c \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, A c^{3} \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, B c^{3} \tan \left (\frac {1}{2} \, x\right )^{2} + A b^{3} \tan \left (\frac {1}{2} \, x\right ) + 2 \, B b^{3} \tan \left (\frac {1}{2} \, x\right ) - 2 \, A b c^{2} \tan \left (\frac {1}{2} \, x\right ) + 2 \, B b c^{2} \tan \left (\frac {1}{2} \, x\right ) - A b^{2} c}{{\left (b^{4} + b^{2} c^{2}\right )} {\left (b \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac {1}{2} \, x\right ) - b\right )}^{2}} \] Input:

integrate((A+B*cos(x))/(b*cos(x)+c*sin(x))^3,x, algorithm="giac")
 

Output:

1/2*A*log(abs(-2*b*tan(1/2*x) + 2*c - 2*sqrt(b^2 + c^2))/abs(-2*b*tan(1/2* 
x) + 2*c + 2*sqrt(b^2 + c^2)))/(b^2 + c^2)^(3/2) + (A*b^3*tan(1/2*x)^3 - 2 
*B*b^3*tan(1/2*x)^3 + 2*A*b*c^2*tan(1/2*x)^3 - 2*B*b*c^2*tan(1/2*x)^3 + A* 
b^2*c*tan(1/2*x)^2 + 2*B*b^2*c*tan(1/2*x)^2 - 2*A*c^3*tan(1/2*x)^2 + 2*B*c 
^3*tan(1/2*x)^2 + A*b^3*tan(1/2*x) + 2*B*b^3*tan(1/2*x) - 2*A*b*c^2*tan(1/ 
2*x) + 2*B*b*c^2*tan(1/2*x) - A*b^2*c)/((b^4 + b^2*c^2)*(b*tan(1/2*x)^2 - 
2*c*tan(1/2*x) - b)^2)
 

Mupad [B] (verification not implemented)

Time = 15.55 (sec) , antiderivative size = 251, normalized size of antiderivative = 2.16 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx=\frac {\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A\,b^2-2\,A\,c^2+2\,B\,b^2+2\,B\,c^2\right )}{b\,\left (b^2+c^2\right )}-\frac {A\,c}{b^2+c^2}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,B\,c^3-2\,A\,c^3+A\,b^2\,c+2\,B\,b^2\,c\right )}{b^2\,\left (b^2+c^2\right )}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (A\,b^2+2\,A\,c^2-2\,B\,b^2-2\,B\,c^2\right )}{b\,\left (b^2+c^2\right )}}{b^2-{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,b^2-4\,c^2\right )+b^2\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+4\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )-4\,b\,c\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}+\frac {A\,\mathrm {atan}\left (\frac {b^2\,c\,1{}\mathrm {i}+c^3\,1{}\mathrm {i}-b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (b^2+c^2\right )\,1{}\mathrm {i}}{{\left (b^2+c^2\right )}^{3/2}}\right )\,1{}\mathrm {i}}{{\left (b^2+c^2\right )}^{3/2}} \] Input:

int((A + B*cos(x))/(b*cos(x) + c*sin(x))^3,x)
 

Output:

((tan(x/2)*(A*b^2 - 2*A*c^2 + 2*B*b^2 + 2*B*c^2))/(b*(b^2 + c^2)) - (A*c)/ 
(b^2 + c^2) + (tan(x/2)^2*(2*B*c^3 - 2*A*c^3 + A*b^2*c + 2*B*b^2*c))/(b^2* 
(b^2 + c^2)) + (tan(x/2)^3*(A*b^2 + 2*A*c^2 - 2*B*b^2 - 2*B*c^2))/(b*(b^2 
+ c^2)))/(b^2 - tan(x/2)^2*(2*b^2 - 4*c^2) + b^2*tan(x/2)^4 + 4*b*c*tan(x/ 
2) - 4*b*c*tan(x/2)^3) + (A*atan((b^2*c*1i + c^3*1i - b*tan(x/2)*(b^2 + c^ 
2)*1i)/(b^2 + c^2)^(3/2))*1i)/(b^2 + c^2)^(3/2)
 

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 1313, normalized size of antiderivative = 11.32 \[ \int \frac {A+B \cos (x)}{(b \cos (x)+c \sin (x))^3} \, dx =\text {Too large to display} \] Input:

int((A+B*cos(x))/(b*cos(x)+c*sin(x))^3,x)
 

Output:

( - 8*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i)/sqrt(b**2 + c**2))*cos(x 
)**3*sin(x)*a*b**3*c**2*i + 4*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i)/ 
sqrt(b**2 + c**2))*cos(x)**2*sin(x)**2*a*b**4*c*i - 20*sqrt(b**2 + c**2)*a 
tan((tan(x/2)*b*i - c*i)/sqrt(b**2 + c**2))*cos(x)**2*sin(x)**2*a*b**2*c** 
3*i - 4*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i)/sqrt(b**2 + c**2))*cos 
(x)**2*a*b**4*c*i + 8*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i)/sqrt(b** 
2 + c**2))*cos(x)*sin(x)**3*a*b**3*c**2*i - 16*sqrt(b**2 + c**2)*atan((tan 
(x/2)*b*i - c*i)/sqrt(b**2 + c**2))*cos(x)*sin(x)**3*a*b*c**4*i - 8*sqrt(b 
**2 + c**2)*atan((tan(x/2)*b*i - c*i)/sqrt(b**2 + c**2))*cos(x)*sin(x)*a*b 
**3*c**2*i + 4*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i)/sqrt(b**2 + c** 
2))*sin(x)**4*a*b**2*c**3*i - 4*sqrt(b**2 + c**2)*atan((tan(x/2)*b*i - c*i 
)/sqrt(b**2 + c**2))*sin(x)**4*a*c**5*i - 4*sqrt(b**2 + c**2)*atan((tan(x/ 
2)*b*i - c*i)/sqrt(b**2 + c**2))*sin(x)**2*a*b**2*c**3*i + 2*cos(x)**3*sin 
(x)*a*b**5*c + 2*cos(x)**3*sin(x)*a*b**3*c**3 - 2*cos(x)**3*a*b**4*c**2 - 
2*cos(x)**3*a*b**2*c**4 - cos(x)**2*sin(x)**2*a*b**6 + 4*cos(x)**2*sin(x)* 
*2*a*b**4*c**2 + 5*cos(x)**2*sin(x)**2*a*b**2*c**4 + 2*cos(x)**2*sin(x)**2 
*b**7 + 4*cos(x)**2*sin(x)**2*b**5*c**2 + 2*cos(x)**2*sin(x)**2*b**3*c**4 
+ 2*cos(x)**2*sin(x)*a*b**5*c - 2*cos(x)**2*sin(x)*a*b**3*c**3 - 4*cos(x)* 
*2*sin(x)*a*b*c**5 + cos(x)**2*a*b**6 + cos(x)**2*a*b**4*c**2 - 2*cos(x)*s 
in(x)**3*a*b**5*c + 2*cos(x)*sin(x)**3*a*b**3*c**3 + 4*cos(x)*sin(x)**3...