\(\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx\) [552]
Optimal result
Integrand size = 23, antiderivative size = 237 \[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=\frac {\left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{5/2}}+\frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}+\frac {a (B c-b C)+\left (3 a A c-a^2 C-2 c (b B+c C)\right ) \cos (x)-\left (3 a A b-a^2 B-2 b (b B+c C)\right ) \sin (x)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))}
\]
[Out]
(2*a^2*A+A*(b^2+c^2)-3*a*(B*b+C*c))*arctan((c+(a-b)*tan(1/2*x))/(a^2-b^2-c^2)^(1/2))/(a^2-b^2-c^2)^(5/2)+1/2*(
B*c-b*C+(A*c-C*a)*cos(x)-(A*b-B*a)*sin(x))/(a^2-b^2-c^2)/(a+b*cos(x)+c*sin(x))^2+1/2*(a*(B*c-C*b)+(3*A*a*c-C*a
^2-2*c*(B*b+C*c))*cos(x)-(3*A*a*b-B*a^2-2*b*(B*b+C*c))*sin(x))/(a^2-b^2-c^2)^2/(a+b*cos(x)+c*sin(x))
Rubi [A] (verified)
Time = 0.34 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.00, number of
steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3235, 3232, 3203, 632, 210}
\[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=\frac {\left (2 a^2 A-3 a (b B+c C)+A \left (b^2+c^2\right )\right ) \arctan \left (\frac {(a-b) \tan \left (\frac {x}{2}\right )+c}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{5/2}}+\frac {-\sin (x) \left (a^2 (-B)+3 a A b-2 b (b B+c C)\right )+\cos (x) \left (a^2 (-C)+3 a A c-2 c (b B+c C)\right )+a (B c-b C)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))}+\frac {-\sin (x) (A b-a B)+\cos (x) (A c-a C)-b C+B c}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}
\]
[In]
Int[(A + B*Cos[x] + C*Sin[x])/(a + b*Cos[x] + c*Sin[x])^3,x]
[Out]
((2*a^2*A + A*(b^2 + c^2) - 3*a*(b*B + c*C))*ArcTan[(c + (a - b)*Tan[x/2])/Sqrt[a^2 - b^2 - c^2]])/(a^2 - b^2
- c^2)^(5/2) + (B*c - b*C + (A*c - a*C)*Cos[x] - (A*b - a*B)*Sin[x])/(2*(a^2 - b^2 - c^2)*(a + b*Cos[x] + c*Si
n[x])^2) + (a*(B*c - b*C) + (3*a*A*c - a^2*C - 2*c*(b*B + c*C))*Cos[x] - (3*a*A*b - a^2*B - 2*b*(b*B + c*C))*S
in[x])/(2*(a^2 - b^2 - c^2)^2*(a + b*Cos[x] + c*Sin[x]))
Rule 210
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])
Rule 632
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 3203
Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> Module[{f = Free
Factors[Tan[(d + e*x)/2], x]}, Dist[2*(f/e), Subst[Int[1/(a + b + 2*c*f*x + (a - b)*f^2*x^2), x], x, Tan[(d +
e*x)/2]/f], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[a^2 - b^2 - c^2, 0]
Rule 3232
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] + Dist[(a*A - b*B - c*C)/(a^2 -
b^2 - c^2), Int[1/(a + b*Cos[d + e*x] + c*Sin[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 3235
Int[((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_)*((A_.) + cos[(d_.) + (e_.)*(x
_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[(-(c*B - b*C - (a*C - 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] + Dist[
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 - c*C
) + (n + 2)*(a*B - b*A)*Cos[d + e*x] + (n + 2)*(a*C - c*A)*Sin[d + e*x], x], x], x] /; FreeQ[{a, b, c, d, e, A
, B, C}, x] && LtQ[n, -1] && NeQ[a^2 - b^2 - c^2, 0] && NeQ[n, -2]
Rubi steps \begin{align*}
\text {integral}& = \frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}-\frac {\int \frac {-2 (a A-b B-c C)+(A b-a B) \cos (x)+(A c-a C) \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx}{2 \left (a^2-b^2-c^2\right )} \\ & = \frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}+\frac {a (B c-b C)+\left (3 a A c-a^2 C-2 c (b B+c C)\right ) \cos (x)-\left (3 a A b-a^2 B-2 b (b B+c C)\right ) \sin (x)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))}+\frac {\left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \int \frac {1}{a+b \cos (x)+c \sin (x)} \, dx}{2 \left (a^2-b^2-c^2\right )^2} \\ & = \frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}+\frac {a (B c-b C)+\left (3 a A c-a^2 C-2 c (b B+c C)\right ) \cos (x)-\left (3 a A b-a^2 B-2 b (b B+c C)\right ) \sin (x)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))}+\frac {\left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \text {Subst}\left (\int \frac {1}{a+b+2 c x+(a-b) x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{\left (a^2-b^2-c^2\right )^2} \\ & = \frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}+\frac {a (B c-b C)+\left (3 a A c-a^2 C-2 c (b B+c C)\right ) \cos (x)-\left (3 a A b-a^2 B-2 b (b B+c C)\right ) \sin (x)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))}-\frac {\left (2 \left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right )\right ) \text {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2-c^2\right )-x^2} \, dx,x,2 c+2 (a-b) \tan \left (\frac {x}{2}\right )\right )}{\left (a^2-b^2-c^2\right )^2} \\ & = \frac {\left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\left (a^2-b^2-c^2\right )^{5/2}}+\frac {B c-b C+(A c-a C) \cos (x)-(A b-a B) \sin (x)}{2 \left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))^2}+\frac {a (B c-b C)+\left (3 a A c-a^2 C-2 c (b B+c C)\right ) \cos (x)-\left (3 a A b-a^2 B-2 b (b B+c C)\right ) \sin (x)}{2 \left (a^2-b^2-c^2\right )^2 (a+b \cos (x)+c \sin (x))} \\
\end{align*}
Mathematica [A] (verified)
Time = 1.26 (sec) , antiderivative size = 452, normalized size of antiderivative = 1.91
\[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=-\frac {\left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \text {arctanh}\left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {-a^2+b^2+c^2}}\right )}{\left (-a^2+b^2+c^2\right )^{5/2}}+\frac {-6 a^3 A c-3 a A b^2 c+9 a^2 b B c-3 a A c^3+2 a^4 C-4 a^2 b^2 C+2 b^4 C+5 a^2 c^2 C+4 b^2 c^2 C+2 c^4 C-2 b c \left (2 a^2 A+A \left (b^2+c^2\right )-3 a (b B+c C)\right ) \cos (x)-c \left (-3 a A \left (b^2+c^2\right )+a^2 (b B+c C)+2 \left (b^2+c^2\right ) (b B+c C)\right ) \cos (2 x)-8 a^2 A b^2 \sin (x)+2 A b^4 \sin (x)+4 a^3 b B \sin (x)+2 a b^3 B \sin (x)-12 a^2 A c^2 \sin (x)+2 A b^2 c^2 \sin (x)+8 a b B c^2 \sin (x)+4 a^3 c C \sin (x)+2 a b^2 c C \sin (x)+8 a c^3 C \sin (x)-3 a A b^3 \sin (2 x)+a^2 b^2 B \sin (2 x)+2 b^4 B \sin (2 x)-3 a A b c^2 \sin (2 x)+2 b^2 B c^2 \sin (2 x)+a^2 b c C \sin (2 x)+2 b^3 c C \sin (2 x)+2 b c^3 C \sin (2 x)}{4 b \left (-a^2+b^2+c^2\right )^2 (a+b \cos (x)+c \sin (x))^2}
\]
[In]
Integrate[(A + B*Cos[x] + C*Sin[x])/(a + b*Cos[x] + c*Sin[x])^3,x]
[Out]
-(((2*a^2*A + A*(b^2 + c^2) - 3*a*(b*B + c*C))*ArcTanh[(c + (a - b)*Tan[x/2])/Sqrt[-a^2 + b^2 + c^2]])/(-a^2 +
b^2 + c^2)^(5/2)) + (-6*a^3*A*c - 3*a*A*b^2*c + 9*a^2*b*B*c - 3*a*A*c^3 + 2*a^4*C - 4*a^2*b^2*C + 2*b^4*C + 5
*a^2*c^2*C + 4*b^2*c^2*C + 2*c^4*C - 2*b*c*(2*a^2*A + A*(b^2 + c^2) - 3*a*(b*B + c*C))*Cos[x] - c*(-3*a*A*(b^2
+ c^2) + a^2*(b*B + c*C) + 2*(b^2 + c^2)*(b*B + c*C))*Cos[2*x] - 8*a^2*A*b^2*Sin[x] + 2*A*b^4*Sin[x] + 4*a^3*
b*B*Sin[x] + 2*a*b^3*B*Sin[x] - 12*a^2*A*c^2*Sin[x] + 2*A*b^2*c^2*Sin[x] + 8*a*b*B*c^2*Sin[x] + 4*a^3*c*C*Sin[
x] + 2*a*b^2*c*C*Sin[x] + 8*a*c^3*C*Sin[x] - 3*a*A*b^3*Sin[2*x] + a^2*b^2*B*Sin[2*x] + 2*b^4*B*Sin[2*x] - 3*a*
A*b*c^2*Sin[2*x] + 2*b^2*B*c^2*Sin[2*x] + a^2*b*c*C*Sin[2*x] + 2*b^3*c*C*Sin[2*x] + 2*b*c^3*C*Sin[2*x])/(4*b*(
-a^2 + b^2 + c^2)^2*(a + b*Cos[x] + c*Sin[x])^2)
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(1079\) vs. \(2(227)=454\).
Time = 1.87 (sec) , antiderivative size = 1080, normalized size of antiderivative =
4.56
| | |
method | result | size |
| | |
default |
\(\text {Expression too large to display}\) |
\(1080\) |
risch |
\(\text {Expression too large to display}\) |
\(2157\) |
| | |
|
|
|
[In]
int((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x))^3,x,method=_RETURNVERBOSE)
[Out]
2*(-1/2*(4*A*a^3*b-7*A*a^2*b^2-5*A*a^2*c^2+2*A*a*b^3+2*A*a*b*c^2+A*b^4+3*A*b^2*c^2+2*A*c^4-2*B*a^4+3*B*a^3*b-2
*B*a^2*b^2+4*B*a^2*c^2+3*B*a*b^3-2*B*b^4-4*B*b^2*c^2-2*B*c^4+3*C*a^3*c-6*C*a^2*b*c+3*C*a*b^2*c)/(a^4-2*a^2*b^2
-2*a^2*c^2+b^4+2*b^2*c^2+c^4)/(a-b)*tan(1/2*x)^3+1/2*(4*A*a^4*c-12*A*a^3*b*c+13*A*a^2*b^2*c+7*A*a^2*c^3-6*A*a*
b^3*c-6*A*a*b*c^3+A*b^4*c-A*b^2*c^3-2*A*c^5+2*B*a^4*c-9*B*a^3*b*c+14*B*a^2*b^2*c-4*B*a^2*c^3-9*B*a*b^3*c+2*B*b
^4*c+4*B*b^2*c^3+2*B*c^5-2*C*a^5+2*C*a^4*b+4*C*a^3*b^2-5*C*a^3*c^2-4*C*a^2*b^3+14*C*a^2*b*c^2-2*C*a*b^4-13*C*a
*b^2*c^2-2*C*a*c^4+2*C*b^5+4*C*b^3*c^2+2*C*b*c^4)/(a^4-2*a^2*b^2-2*a^2*c^2+b^4+2*b^2*c^2+c^4)/(a^2-2*a*b+b^2)*
tan(1/2*x)^2-1/2*(4*A*a^4*b-5*A*a^3*b^2-11*A*a^3*c^2-3*A*a^2*b^3+3*A*a^2*b*c^2+5*A*a*b^4+7*A*a*b^2*c^2+2*A*a*c
^4-A*b^5+A*b^3*c^2+2*A*b*c^4-2*B*a^5+3*B*a^4*b-B*a^3*b^2+4*B*a^3*c^2-B*a^2*b^3+8*B*a^2*b*c^2+3*B*a*b^4-8*B*a*b
^2*c^2-2*B*a*c^4-2*B*b^5-4*B*b^3*c^2-2*B*b*c^4+5*C*a^4*c-5*C*a^3*b*c-5*C*a^2*b^2*c+4*C*a^2*c^3+5*C*a*b^3*c-4*C
*a*b*c^3)/(a^4-2*a^2*b^2-2*a^2*c^2+b^4+2*b^2*c^2+c^4)/(a^2-2*a*b+b^2)*tan(1/2*x)+1/2*(4*A*a^4*c-3*A*a^2*b^2*c-
A*a^2*c^3-A*b^4*c-A*b^2*c^3-5*B*a^3*b*c+5*B*a*b^3*c+2*B*a*b*c^3-2*C*a^5+4*C*a^3*b^2-C*a^3*c^2-2*C*a*b^4+C*a*b^
2*c^2)/(a^4-2*a^2*b^2-2*a^2*c^2+b^4+2*b^2*c^2+c^4)/(a^2-2*a*b+b^2))/(tan(1/2*x)^2*a-tan(1/2*x)^2*b+2*c*tan(1/2
*x)+a+b)^2+(2*A*a^2+A*b^2+A*c^2-3*B*a*b-3*C*a*c)/(a^4-2*a^2*b^2-2*a^2*c^2+b^4+2*b^2*c^2+c^4)/(a^2-b^2-c^2)^(1/
2)*arctan(1/2*(2*(a-b)*tan(1/2*x)+2*c)/(a^2-b^2-c^2)^(1/2))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 2038 vs. \(2 (225) = 450\).
Time = 0.51 (sec) , antiderivative size = 4240, normalized size of antiderivative = 17.89
\[
\int \frac {A+B \cos (x)+C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(a^4*b - 3*a^2*b^3 + 2*b^5)*c^5 - (a^6*b - 6*a^4*b^3 + 9*a^2*b^5 - 4*b^7)*c^3 - (a^6*b^3 - 3*a^4*b^5
+ 3*a^2*b^7 - b^9)*c)*cos(x))*sin(x))]
Sympy [F(-1)]
Timed out. \[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=\text {Timed out}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x))**3,x)
[Out]
Timed out
Maxima [F(-2)]
Exception generated. \[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x))^3,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c^2+b^2-a^2>0)', see `assume?`
for more de
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1506 vs. \(2 (225) = 450\).
Time = 0.37 (sec) , antiderivative size = 1506, normalized size of antiderivative = 6.35
\[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=\text {Too large to display}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x))^3,x, algorithm="giac")
[Out]
-(2*A*a^2 - 3*B*a*b + A*b^2 - 3*C*a*c + A*c^2)*(pi*floor(1/2*x/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*
x) - b*tan(1/2*x) + c)/sqrt(a^2 - b^2 - c^2)))/((a^4 - 2*a^2*b^2 + b^4 - 2*a^2*c^2 + 2*b^2*c^2 + c^4)*sqrt(a^2
- b^2 - c^2)) + (2*B*a^5*tan(1/2*x)^3 - 4*A*a^4*b*tan(1/2*x)^3 - 5*B*a^4*b*tan(1/2*x)^3 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^2*b^2*c + 5*B*a*b^3*c - A*b^4*c - C*a^3*c^2 + C*a*b^2*c^2 - A*
a^2*c^3 + 2*B*a*b*c^3 - A*b^2*c^3)/((a^6 - 2*a^5*b - a^4*b^2 + 4*a^3*b^3 - a^2*b^4 - 2*a*b^5 + b^6 - 2*a^4*c^2
+ 4*a^3*b*c^2 - 4*a*b^3*c^2 + 2*b^4*c^2 + a^2*c^4 - 2*a*b*c^4 + b^2*c^4)*(a*tan(1/2*x)^2 - b*tan(1/2*x)^2 + 2
*c*tan(1/2*x) + a + b)^2)
Mupad [B] (verification not implemented)
Time = 33.52 (sec) , antiderivative size = 1160, normalized size of antiderivative = 4.89
\[
\int \frac {A+B \cos (x)+C \sin (x)}{(a+b \cos (x)+c \sin (x))^3} \, dx=-\frac {\frac {2\,C\,a^5-4\,A\,a^4\,c-4\,C\,a^3\,b^2+5\,B\,a^3\,b\,c+C\,a^3\,c^2+3\,A\,a^2\,b^2\,c+A\,a^2\,c^3+2\,C\,a\,b^4-5\,B\,a\,b^3\,c-C\,a\,b^2\,c^2-2\,B\,a\,b\,c^3+A\,b^4\,c+A\,b^2\,c^3}{{\left (a-b\right )}^2\,\left (a^4-2\,a^2\,b^2-2\,a^2\,c^2+b^4+2\,b^2\,c^2+c^4\right )}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (A\,b^4-2\,B\,a^4+2\,A\,c^4-2\,B\,b^4-2\,B\,c^4-7\,A\,a^2\,b^2-5\,A\,a^2\,c^2-2\,B\,a^2\,b^2+3\,A\,b^2\,c^2+4\,B\,a^2\,c^2-4\,B\,b^2\,c^2+2\,A\,a\,b^3+4\,A\,a^3\,b+3\,B\,a\,b^3+3\,B\,a^3\,b+3\,C\,a^3\,c+2\,A\,a\,b\,c^2+3\,C\,a\,b^2\,c-6\,C\,a^2\,b\,c\right )}{\left (a-b\right )\,\left (a^4-2\,a^2\,b^2-2\,a^2\,c^2+b^4+2\,b^2\,c^2+c^4\right )}-\frac {{\mathrm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}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^4\,\left (a^2-2\,a\,b+b^2\right )+2\,a\,b+\mathrm {tan}\left (\frac {x}{2}\right )\,\left (4\,a\,c+4\,b\,c\right )+{\mathrm {tan}\left (\frac {x}{2}\right )}^3\,\left (4\,a\,c-4\,b\,c\right )+a^2+b^2+{\mathrm {tan}\left (\frac {x}{2}\right )}^2\,\left (2\,a^2-2\,b^2+4\,c^2\right )}-\frac {\mathrm {atanh}\left (\frac {2\,a^4\,c-4\,a^2\,b^2\,c-4\,a^2\,c^3+2\,b^4\,c+4\,b^2\,c^3+2\,c^5}{2\,{\left (-a^2+b^2+c^2\right )}^{5/2}}+\frac {\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,a-2\,b\right )\,\left (a^4-2\,a^2\,b^2-2\,a^2\,c^2+b^4+2\,b^2\,c^2+c^4\right )}{2\,{\left (-a^2+b^2+c^2\right )}^{5/2}}\right )\,\left (2\,A\,a^2-3\,B\,a\,b-3\,C\,a\,c+A\,b^2+A\,c^2\right )}{{\left (-a^2+b^2+c^2\right )}^{5/2}}
\]
[In]
int((A + B*cos(x) + C*sin(x))/(a + b*cos(x) + c*sin(x))^3,x)
[Out]
- ((2*C*a^5 + A*a^2*c^3 + A*b^2*c^3 - 4*C*a^3*b^2 + C*a^3*c^2 - 4*A*a^4*c + A*b^4*c + 2*C*a*b^4 - 2*B*a*b*c^3
- 5*B*a*b^3*c + 5*B*a^3*b*c + 3*A*a^2*b^2*c - C*a*b^2*c^2)/((a - b)^2*(a^4 + b^4 + c^4 - 2*a^2*b^2 - 2*a^2*c^2
+ 2*b^2*c^2)) + (tan(x/2)^3*(A*b^4 - 2*B*a^4 + 2*A*c^4 - 2*B*b^4 - 2*B*c^4 - 7*A*a^2*b^2 - 5*A*a^2*c^2 - 2*B*
a^2*b^2 + 3*A*b^2*c^2 + 4*B*a^2*c^2 - 4*B*b^2*c^2 + 2*A*a*b^3 + 4*A*a^3*b + 3*B*a*b^3 + 3*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