\(\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx\) [550]
Optimal result
Integrand size = 23, antiderivative size = 131 \[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {(b B+c C) x}{b^2+c^2}+\frac {2 \left (A \left (b^2+c^2\right )-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 )}{\sqrt {a^2-b^2-c^2} \left (b^2+c^2\right )}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}
\]
[Out]
(B*b+C*c)*x/(b^2+c^2)+(B*c-C*b)*ln(a+b*cos(x)+c*sin(x))/(b^2+c^2)+2*(A*(b^2+c^2)-a*(B*b+C*c))*arctan((c+(a-b)*
tan(1/2*x))/(a^2-b^2-c^2)^(1/2))/(b^2+c^2)/(a^2-b^2-c^2)^(1/2)
Rubi [A] (verified)
Time = 0.14 (sec) , antiderivative size = 131, 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.174, Rules used = {3215, 3203, 632, 210}
\[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {2 \left (A \left (b^2+c^2\right )-a (b B+c C)\right ) \arctan \left (\frac {(a-b) \tan \left (\frac {x}{2}\right )+c}{\sqrt {a^2-b^2-c^2}}\right )}{\left (b^2+c^2\right ) \sqrt {a^2-b^2-c^2}}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\frac {x (b B+c C)}{b^2+c^2}
\]
[In]
Int[(A + B*Cos[x] + C*Sin[x])/(a + b*Cos[x] + c*Sin[x]),x]
[Out]
((b*B + c*C)*x)/(b^2 + c^2) + (2*(A*(b^2 + c^2) - a*(b*B + c*C))*ArcTan[(c + (a - b)*Tan[x/2])/Sqrt[a^2 - b^2
- c^2]])/(Sqrt[a^2 - b^2 - c^2]*(b^2 + c^2)) + ((B*c - b*C)*Log[a + b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
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 3215
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_)]*(
b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[(b*B + c*C)*(x/(b^2 + c^2)), x] + (Dist[(A*(b^2 + c^2
) - a*(b*B + c*C))/(b^2 + c^2), Int[1/(a + b*Cos[d + e*x] + c*Sin[d + e*x]), x], x] + Simp[(c*B - b*C)*(Log[a
+ b*Cos[d + e*x] + c*Sin[d + e*x]]/(e*(b^2 + c^2))), x]) /; FreeQ[{a, b, c, d, e, A, B, C}, x] && NeQ[b^2 + c^
2, 0] && NeQ[A*(b^2 + c^2) - a*(b*B + c*C), 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {(b B+c C) x}{b^2+c^2}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\left (A-\frac {a (b B+c C)}{b^2+c^2}\right ) \int \frac {1}{a+b \cos (x)+c \sin (x)} \, dx \\ & = \frac {(b B+c C) x}{b^2+c^2}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}+\left (2 \left (A-\frac {a (b B+c C)}{b^2+c^2}\right )\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 ) \\ & = \frac {(b B+c C) x}{b^2+c^2}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}-\left (4 \left (A-\frac {a (b B+c C)}{b^2+c^2}\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 ) \\ & = \frac {(b B+c C) x}{b^2+c^2}+\frac {2 \left (A-\frac {a (b B+c C)}{b^2+c^2}\right ) \arctan \left (\frac {c+(a-b) \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2-c^2}}\right )}{\sqrt {a^2-b^2-c^2}}+\frac {(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.52 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.84
\[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {(b B+c C) x+\frac {2 \left (-A \left (b^2+c^2\right )+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 )}{\sqrt {-a^2+b^2+c^2}}+(B c-b C) \log (a+b \cos (x)+c \sin (x))}{b^2+c^2}
\]
[In]
Integrate[(A + B*Cos[x] + C*Sin[x])/(a + b*Cos[x] + c*Sin[x]),x]
[Out]
((b*B + c*C)*x + (2*(-(A*(b^2 + c^2)) + a*(b*B + c*C))*ArcTanh[(c + (a - b)*Tan[x/2])/Sqrt[-a^2 + b^2 + c^2]])
/Sqrt[-a^2 + b^2 + c^2] + (B*c - b*C)*Log[a + b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
Maple [A] (verified)
Time = 1.42 (sec) , antiderivative size = 227, normalized size of antiderivative = 1.73
| | |
method | result | size |
| | |
default |
\(\frac {\frac {2 \left (a B c -b B c -a b C +b^{2} C \right ) \ln \left (\tan \left (\frac {x}{2}\right )^{2} a -\tan \left (\frac {x}{2}\right )^{2} b +2 c \tan \left (\frac {x}{2}\right )+a +b \right )}{2 a -2 b}+\frac {2 \left (A \,b^{2}+A \,c^{2}-a b B +B \,c^{2}-a c C -C b c -\frac {\left (a B c -b B c -a b C +b^{2} C \right ) c}{a -b}\right ) \arctan \left (\frac {2 \left (a -b \right ) \tan \left (\frac {x}{2}\right )+2 c}{2 \sqrt {a^{2}-b^{2}-c^{2}}}\right )}{\sqrt {a^{2}-b^{2}-c^{2}}}}{b^{2}+c^{2}}+\frac {\left (-B c +b C \right ) \ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )+2 \left (B b +C c \right ) \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{b^{2}+c^{2}}\) |
\(227\) |
risch |
\(\text {Expression too large to display}\) |
\(10609\) |
| | |
|
|
|
[In]
int((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x)),x,method=_RETURNVERBOSE)
[Out]
2/(b^2+c^2)*(1/2*(B*a*c-B*b*c-C*a*b+C*b^2)/(a-b)*ln(tan(1/2*x)^2*a-tan(1/2*x)^2*b+2*c*tan(1/2*x)+a+b)+(A*b^2+A
*c^2-a*b*B+B*c^2-a*c*C-C*b*c-(B*a*c-B*b*c-C*a*b+C*b^2)*c/(a-b))/(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)))+2/(b^2+c^2)*(1/2*(-B*c+C*b)*ln(1+tan(1/2*x)^2)+(B*b+C*c)*arctan(tan(1/2*x)))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 278 vs. \(2 (126) = 252\).
Time = 0.32 (sec) , antiderivative size = 711, normalized size of antiderivative = 5.43
\[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\left [-\frac {{\left (B a b - A b^{2} + C a c - A c^{2}\right )} \sqrt {-a^{2} + b^{2} + c^{2}} \log \left (\frac {a^{2} b^{2} - 2 \, b^{4} - c^{4} - {\left (a^{2} + 3 \, b^{2}\right )} c^{2} - {\left (2 \, a^{2} b^{2} - b^{4} - 2 \, a^{2} c^{2} + c^{4}\right )} \cos \left (x\right )^{2} - 2 \, {\left (a b^{3} + a b c^{2}\right )} \cos \left (x\right ) - 2 \, {\left (a b^{2} c + a c^{3} - {\left (b c^{3} - {\left (2 \, a^{2} b - b^{3}\right )} c\right )} \cos \left (x\right )\right )} \sin \left (x\right ) - 2 \, {\left (2 \, a b c \cos \left (x\right )^{2} - a b c + {\left (b^{2} c + c^{3}\right )} \cos \left (x\right ) - {\left (b^{3} + b c^{2} + {\left (a b^{2} - a c^{2}\right )} \cos \left (x\right )\right )} \sin \left (x\right )\right )} \sqrt {-a^{2} + b^{2} + c^{2}}}{2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )}\right ) - 2 \, {\left (B a^{2} b - B b^{3} - B b c^{2} - C c^{3} + {\left (C a^{2} - C b^{2}\right )} c\right )} x + {\left (C a^{2} b - C b^{3} - C b c^{2} + B c^{3} - {\left (B a^{2} - B b^{2}\right )} c\right )} \log \left (2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}\right )}}, -\frac {2 \, {\left (B a b - A b^{2} + C a c - A c^{2}\right )} \sqrt {a^{2} - b^{2} - c^{2}} \arctan \left (-\frac {{\left (a b \cos \left (x\right ) + a c \sin \left (x\right ) + b^{2} + c^{2}\right )} \sqrt {a^{2} - b^{2} - c^{2}}}{{\left (c^{3} - {\left (a^{2} - b^{2}\right )} c\right )} \cos \left (x\right ) + {\left (a^{2} b - b^{3} - b c^{2}\right )} \sin \left (x\right )}\right ) - 2 \, {\left (B a^{2} b - B b^{3} - B b c^{2} - C c^{3} + {\left (C a^{2} - C b^{2}\right )} c\right )} x + {\left (C a^{2} b - C b^{3} - C b c^{2} + B c^{3} - {\left (B a^{2} - B b^{2}\right )} c\right )} \log \left (2 \, a b \cos \left (x\right ) + {\left (b^{2} - c^{2}\right )} \cos \left (x\right )^{2} + a^{2} + c^{2} + 2 \, {\left (b c \cos \left (x\right ) + a c\right )} \sin \left (x\right )\right )}{2 \, {\left (a^{2} b^{2} - b^{4} - c^{4} + {\left (a^{2} - 2 \, b^{2}\right )} c^{2}\right )}}\right ]
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x)),x, algorithm="fricas")
[Out]
[-1/2*((B*a*b - A*b^2 + C*a*c - A*c^2)*sqrt(-a^2 + b^2 + c^2)*log((a^2*b^2 - 2*b^4 - c^4 - (a^2 + 3*b^2)*c^2 -
(2*a^2*b^2 - b^4 - 2*a^2*c^2 + c^4)*cos(x)^2 - 2*(a*b^3 + a*b*c^2)*cos(x) - 2*(a*b^2*c + a*c^3 - (b*c^3 - (2*
a^2*b - b^3)*c)*cos(x))*sin(x) - 2*(2*a*b*c*cos(x)^2 - a*b*c + (b^2*c + c^3)*cos(x) - (b^3 + b*c^2 + (a*b^2 -
a*c^2)*cos(x))*sin(x))*sqrt(-a^2 + b^2 + c^2))/(2*a*b*cos(x) + (b^2 - c^2)*cos(x)^2 + a^2 + c^2 + 2*(b*c*cos(x
) + a*c)*sin(x))) - 2*(B*a^2*b - B*b^3 - B*b*c^2 - C*c^3 + (C*a^2 - C*b^2)*c)*x + (C*a^2*b - C*b^3 - C*b*c^2 +
B*c^3 - (B*a^2 - B*b^2)*c)*log(2*a*b*cos(x) + (b^2 - c^2)*cos(x)^2 + a^2 + c^2 + 2*(b*c*cos(x) + a*c)*sin(x))
)/(a^2*b^2 - b^4 - c^4 + (a^2 - 2*b^2)*c^2), -1/2*(2*(B*a*b - A*b^2 + C*a*c - A*c^2)*sqrt(a^2 - b^2 - c^2)*arc
tan(-(a*b*cos(x) + a*c*sin(x) + b^2 + c^2)*sqrt(a^2 - b^2 - c^2)/((c^3 - (a^2 - b^2)*c)*cos(x) + (a^2*b - b^3
- b*c^2)*sin(x))) - 2*(B*a^2*b - B*b^3 - B*b*c^2 - C*c^3 + (C*a^2 - C*b^2)*c)*x + (C*a^2*b - C*b^3 - C*b*c^2 +
B*c^3 - (B*a^2 - B*b^2)*c)*log(2*a*b*cos(x) + (b^2 - c^2)*cos(x)^2 + a^2 + c^2 + 2*(b*c*cos(x) + a*c)*sin(x))
)/(a^2*b^2 - b^4 - c^4 + (a^2 - 2*b^2)*c^2)]
Sympy [F(-1)]
Timed out. \[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Timed out}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x)),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)} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x)),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 [A] (verification not implemented)
none
Time = 0.28 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.52
\[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\frac {{\left (B b + C c\right )} x}{b^{2} + c^{2}} - \frac {{\left (C b - B c\right )} \log \left (-a \tan \left (\frac {1}{2} \, x\right )^{2} + b \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac {1}{2} \, x\right ) - a - b\right )}{b^{2} + c^{2}} + \frac {{\left (C b - B c\right )} \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} + \frac {2 \, {\left (B a b - A b^{2} + C a c - A c^{2}\right )} {\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, x\right ) - b \tan \left (\frac {1}{2} \, x\right ) + c}{\sqrt {a^{2} - b^{2} - c^{2}}}\right )\right )}}{\sqrt {a^{2} - b^{2} - c^{2}} {\left (b^{2} + c^{2}\right )}}
\]
[In]
integrate((A+B*cos(x)+C*sin(x))/(a+b*cos(x)+c*sin(x)),x, algorithm="giac")
[Out]
(B*b + C*c)*x/(b^2 + c^2) - (C*b - B*c)*log(-a*tan(1/2*x)^2 + b*tan(1/2*x)^2 - 2*c*tan(1/2*x) - a - b)/(b^2 +
c^2) + (C*b - B*c)*log(tan(1/2*x)^2 + 1)/(b^2 + c^2) + 2*(B*a*b - A*b^2 + 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)))/(sqrt(a^2 - b^2 - c^2
)*(b^2 + c^2))
Mupad [B] (verification not implemented)
Time = 119.49 (sec) , antiderivative size = 2711, normalized size of antiderivative = 20.69
\[
\int \frac {A+B \cos (x)+C \sin (x)}{a+b \cos (x)+c \sin (x)} \, dx=\text {Too large to display}
\]
[In]
int((A + B*cos(x) + C*sin(x))/(a + b*cos(x) + c*sin(x)),x)
[Out]
(log(tan(x/2) - 1i)*(B + C*1i))/(b*1i - c) - (log(tan(x/2) + 1i)*(B - C*1i))/(b*1i + c) + (log(32*B^3*a^2 - 32
*A*B^2*a^2 + 32*A*B^2*b^2 + 32*A*C^2*a^2 - 32*A^2*B*b^2 + 32*A*C^2*b^2 + 32*B*C^2*a^2 + 32*B*C^2*b^2 + 32*tan(
x/2)*(a - b)*(2*C^3*a + B^3*c - 2*C^3*b - 2*A*B^2*c + A^2*B*c + A^2*C*b + 2*B^2*C*a - 2*A*C^2*c - B^2*C*b + 2*
B*C^2*c - 2*A*B*C*a) - 32*B^3*a*b + 32*A^2*B*a*b - 64*A*C^2*a*b - 64*B*C^2*a*b - 32*A^2*C*a*c + 32*A^2*C*b*c +
32*B^2*C*a*c - 32*B^2*C*b*c - ((B*c^3 - C*b^3 - A*b^2*(b^2 - a^2 + c^2)^(1/2) - B*a^2*c + C*a^2*b - A*c^2*(b^
2 - a^2 + c^2)^(1/2) + B*b^2*c - C*b*c^2 + B*a*b*(b^2 - a^2 + c^2)^(1/2) + C*a*c*(b^2 - a^2 + c^2)^(1/2))*(64*
A^2*b^2*c - 32*B^2*a^2*c + 32*B^2*b^2*c + 32*C^2*a^2*c + 32*C^2*b^2*c + 32*tan(x/2)*(a - b)*(A^2*b^2 + 2*B^2*a
^2 - A^2*c^2 + B^2*b^2 - 2*C^2*a^2 - 3*B^2*c^2 + 2*C^2*c^2 + 4*A*B*c^2 - 2*B^2*a*b + 2*C^2*a*b - 2*A*B*a*b + 2
*A*C*a*c - 4*A*C*b*c - 4*B*C*a*c + 6*B*C*b*c) + 64*A*C*b^3 - 128*B*C*a^3 - 64*B*C*b^3 + 64*A*B*a^2*c - 128*A*C
*a*b^2 + 64*A*C*a^2*b - 64*A*B*b^2*c + 192*B*C*a^2*b + 64*B*C*a*c^2 - 64*B*C*b*c^2 - 64*A^2*a*b*c - 64*C^2*a*b
*c - ((B*c^3 - C*b^3 - A*b^2*(b^2 - a^2 + c^2)^(1/2) - B*a^2*c + C*a^2*b - A*c^2*(b^2 - a^2 + c^2)^(1/2) + B*b
^2*c - C*b*c^2 + B*a*b*(b^2 - a^2 + c^2)^(1/2) + C*a*c*(b^2 - a^2 + c^2)^(1/2))*(32*A*b^4 + 32*B*b^4 - 32*tan(
x/2)*(a - b)*(2*A*c^3 + B*c^3 - 2*C*b^3 + 2*A*b^2*c + 2*C*a*b^2 + 4*B*b^2*c - 2*C*a*c^2 + C*b*c^2 - 2*A*a*b*c
- 4*B*a*b*c) + 32*A*a^2*b^2 - 32*A*a^2*c^2 + 32*B*a^2*b^2 + 32*A*b^2*c^2 - 32*B*a^2*c^2 - 64*B*b^2*c^2 - 64*A*
a*b^3 - 64*B*a*b^3 + 32*C*a*c^3 - 32*C*b*c^3 + 64*C*b^3*c + 96*B*a*b*c^2 - 128*C*a*b^2*c + 64*C*a^2*b*c - (32*
(a - b)*(B*c^3 - C*b^3 - A*b^2*(b^2 - a^2 + c^2)^(1/2) - B*a^2*c + C*a^2*b - A*c^2*(b^2 - a^2 + c^2)^(1/2) + B
*b^2*c - C*b*c^2 + B*a*b*(b^2 - a^2 + c^2)^(1/2) + C*a*c*(b^2 - a^2 + c^2)^(1/2))*(3*c^4*tan(x/2) + a*c^3 + 3*
b*c^3 + 3*b^3*c + 2*a^2*b^2*tan(x/2) - 2*a^2*c^2*tan(x/2) + 3*b^2*c^2*tan(x/2) - 2*a*b^3*tan(x/2) + a*b^2*c -
4*a^2*b*c - 2*a*b*c^2*tan(x/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c
^2)*(b^2 - a^2 + c^2)))*(c*(B*b^2 - B*a^2 + C*a*(b^2 - a^2 + c^2)^(1/2)) + B*c^3 - C*b^3 - c^2*(A*(b^2 - a^2 +
c^2)^(1/2) + C*b) - A*b^2*(b^2 - a^2 + c^2)^(1/2) + C*a^2*b + B*a*b*(b^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b
^2 - a^2 + c^2)) + (log(32*B^3*a^2 - 32*A*B^2*a^2 + 32*A*B^2*b^2 + 32*A*C^2*a^2 - 32*A^2*B*b^2 + 32*A*C^2*b^2
+ 32*B*C^2*a^2 + 32*B*C^2*b^2 + 32*tan(x/2)*(a - b)*(2*C^3*a + B^3*c - 2*C^3*b - 2*A*B^2*c + A^2*B*c + A^2*C*b
+ 2*B^2*C*a - 2*A*C^2*c - B^2*C*b + 2*B*C^2*c - 2*A*B*C*a) - 32*B^3*a*b + 32*A^2*B*a*b - 64*A*C^2*a*b - 64*B*
C^2*a*b - 32*A^2*C*a*c + 32*A^2*C*b*c + 32*B^2*C*a*c - 32*B^2*C*b*c - ((B*c^3 - C*b^3 + A*b^2*(b^2 - a^2 + c^2
)^(1/2) - B*a^2*c + C*a^2*b + A*c^2*(b^2 - a^2 + c^2)^(1/2) + B*b^2*c - C*b*c^2 - B*a*b*(b^2 - a^2 + c^2)^(1/2
) - C*a*c*(b^2 - a^2 + c^2)^(1/2))*(64*A^2*b^2*c - 32*B^2*a^2*c + 32*B^2*b^2*c + 32*C^2*a^2*c + 32*C^2*b^2*c +
32*tan(x/2)*(a - b)*(A^2*b^2 + 2*B^2*a^2 - A^2*c^2 + B^2*b^2 - 2*C^2*a^2 - 3*B^2*c^2 + 2*C^2*c^2 + 4*A*B*c^2
- 2*B^2*a*b + 2*C^2*a*b - 2*A*B*a*b + 2*A*C*a*c - 4*A*C*b*c - 4*B*C*a*c + 6*B*C*b*c) + 64*A*C*b^3 - 128*B*C*a^
3 - 64*B*C*b^3 + 64*A*B*a^2*c - 128*A*C*a*b^2 + 64*A*C*a^2*b - 64*A*B*b^2*c + 192*B*C*a^2*b + 64*B*C*a*c^2 - 6
4*B*C*b*c^2 - 64*A^2*a*b*c - 64*C^2*a*b*c - ((B*c^3 - C*b^3 + A*b^2*(b^2 - a^2 + c^2)^(1/2) - B*a^2*c + C*a^2*
b + A*c^2*(b^2 - a^2 + c^2)^(1/2) + B*b^2*c - C*b*c^2 - B*a*b*(b^2 - a^2 + c^2)^(1/2) - C*a*c*(b^2 - a^2 + c^2
)^(1/2))*(32*A*b^4 + 32*B*b^4 - 32*tan(x/2)*(a - b)*(2*A*c^3 + B*c^3 - 2*C*b^3 + 2*A*b^2*c + 2*C*a*b^2 + 4*B*b
^2*c - 2*C*a*c^2 + C*b*c^2 - 2*A*a*b*c - 4*B*a*b*c) + 32*A*a^2*b^2 - 32*A*a^2*c^2 + 32*B*a^2*b^2 + 32*A*b^2*c^
2 - 32*B*a^2*c^2 - 64*B*b^2*c^2 - 64*A*a*b^3 - 64*B*a*b^3 + 32*C*a*c^3 - 32*C*b*c^3 + 64*C*b^3*c + 96*B*a*b*c^
2 - 128*C*a*b^2*c + 64*C*a^2*b*c - (32*(a - b)*(B*c^3 - C*b^3 + A*b^2*(b^2 - a^2 + c^2)^(1/2) - B*a^2*c + C*a^
2*b + A*c^2*(b^2 - a^2 + c^2)^(1/2) + B*b^2*c - C*b*c^2 - B*a*b*(b^2 - a^2 + c^2)^(1/2) - C*a*c*(b^2 - a^2 + c
^2)^(1/2))*(3*c^4*tan(x/2) + a*c^3 + 3*b*c^3 + 3*b^3*c + 2*a^2*b^2*tan(x/2) - 2*a^2*c^2*tan(x/2) + 3*b^2*c^2*t
an(x/2) - 2*a*b^3*tan(x/2) + a*b^2*c - 4*a^2*b*c - 2*a*b*c^2*tan(x/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2))))/((b^
2 + c^2)*(b^2 - a^2 + c^2))))/((b^2 + c^2)*(b^2 - a^2 + c^2)))*(B*c^3 - c*(B*a^2 - B*b^2 + C*a*(b^2 - a^2 + c^
2)^(1/2)) - C*b^3 + c^2*(A*(b^2 - a^2 + c^2)^(1/2) - C*b) + A*b^2*(b^2 - a^2 + c^2)^(1/2) + C*a^2*b - B*a*b*(b
^2 - a^2 + c^2)^(1/2)))/((b^2 + c^2)*(b^2 - a^2 + c^2))