3.352 \(\int \frac {A+B \cos (x)}{b \cos (x)+c \sin (x)} \, dx\)

Optimal. Leaf size=73 \[ -\frac {A \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}+\frac {b B x}{b^2+c^2}+\frac {B c \log (b \cos (x)+c \sin (x))}{b^2+c^2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3138, 3074, 206} \[ -\frac {A \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}+\frac {b B x}{b^2+c^2}+\frac {B c \log (b \cos (x)+c \sin (x))}{b^2+c^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 3074

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> -Dist[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 3138

Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.))/((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(
x_)]), x_Symbol] :> Simp[(b*B*(d + e*x))/(e*(b^2 + c^2)), x] + (Dist[(A*(b^2 + c^2) - a*b*B)/(b^2 + c^2), Int[
1/(a + b*Cos[d + e*x] + c*Sin[d + e*x]), x], x] + Simp[(c*B*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}, x] && NeQ[b^2 + c^2, 0] && NeQ[A*(b^2 + c^2) - a*b*B, 0]

Rubi steps

\begin {align*} \int \frac {A+B \cos (x)}{b \cos (x)+c \sin (x)} \, dx &=\frac {b B x}{b^2+c^2}+\frac {B c \log (b \cos (x)+c \sin (x))}{b^2+c^2}+A \int \frac {1}{b \cos (x)+c \sin (x)} \, dx\\ &=\frac {b B x}{b^2+c^2}+\frac {B c \log (b \cos (x)+c \sin (x))}{b^2+c^2}-A \operatorname {Subst}\left (\int \frac {1}{b^2+c^2-x^2} \, dx,x,c \cos (x)-b \sin (x)\right )\\ &=\frac {b B x}{b^2+c^2}-\frac {A \tanh ^{-1}\left (\frac {c \cos (x)-b \sin (x)}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}+\frac {B c \log (b \cos (x)+c \sin (x))}{b^2+c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.14, size = 67, normalized size = 0.92 \[ \frac {2 A \tanh ^{-1}\left (\frac {b \tan \left (\frac {x}{2}\right )-c}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}+\frac {B (c \log (b \cos (x)+c \sin (x))+b x)}{b^2+c^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [B]  time = 1.66, size = 143, normalized size = 1.96 \[ \frac {2 \, B b x + B c \log \left (2 \, b c \cos \relax (x) \sin \relax (x) + {\left (b^{2} - c^{2}\right )} \cos \relax (x)^{2} + c^{2}\right ) + \sqrt {b^{2} + c^{2}} A \log \left (-\frac {2 \, b c \cos \relax (x) \sin \relax (x) + {\left (b^{2} - c^{2}\right )} \cos \relax (x)^{2} - 2 \, b^{2} - c^{2} + 2 \, \sqrt {b^{2} + c^{2}} {\left (c \cos \relax (x) - b \sin \relax (x)\right )}}{2 \, b c \cos \relax (x) \sin \relax (x) + {\left (b^{2} - c^{2}\right )} \cos \relax (x)^{2} + c^{2}}\right )}{2 \, {\left (b^{2} + c^{2}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(2*B*b*x + B*c*log(2*b*c*cos(x)*sin(x) + (b^2 - c^2)*cos(x)^2 + c^2) + sqrt(b^2 + c^2)*A*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*sin(x)))/(2*b*c*cos(x)*sin(x)
+ (b^2 - c^2)*cos(x)^2 + c^2)))/(b^2 + c^2)

________________________________________________________________________________________

giac [A]  time = 0.23, size = 131, normalized size = 1.79 \[ \frac {B b x}{b^{2} + c^{2}} - \frac {B c \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} + \frac {B c \log \left ({\left | b \tan \left (\frac {1}{2} \, x\right )^{2} - 2 \, c \tan \left (\frac {1}{2} \, x\right ) - b \right |}\right )}{b^{2} + c^{2}} - \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 )}{\sqrt {b^{2} + c^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

B*b*x/(b^2 + c^2) - B*c*log(tan(1/2*x)^2 + 1)/(b^2 + c^2) + B*c*log(abs(b*tan(1/2*x)^2 - 2*c*tan(1/2*x) - b))/
(b^2 + c^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)
))/sqrt(b^2 + c^2)

________________________________________________________________________________________

maple [B]  time = 0.13, size = 150, normalized size = 2.05 \[ \frac {B c \ln \left (b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-2 c \tan \left (\frac {x}{2}\right )-b \right )}{b^{2}+c^{2}}+\frac {2 \arctanh \left (\frac {2 b \tan \left (\frac {x}{2}\right )-2 c}{2 \sqrt {b^{2}+c^{2}}}\right ) A \,b^{2}}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}}+\frac {2 \arctanh \left (\frac {2 b \tan \left (\frac {x}{2}\right )-2 c}{2 \sqrt {b^{2}+c^{2}}}\right ) A \,c^{2}}{\left (b^{2}+c^{2}\right )^{\frac {3}{2}}}-\frac {B c \ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{b^{2}+c^{2}}+\frac {2 B b \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{b^{2}+c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.42, size = 153, normalized size = 2.10 \[ B {\left (\frac {2 \, b \arctan \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right )}{b^{2} + c^{2}} + \frac {c \log \left (-b - \frac {2 \, c \sin \relax (x)}{\cos \relax (x) + 1} + \frac {b \sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}}\right )}{b^{2} + c^{2}} - \frac {c \log \left (\frac {\sin \relax (x)^{2}}{{\left (\cos \relax (x) + 1\right )}^{2}} + 1\right )}{b^{2} + c^{2}}\right )} - \frac {A \log \left (\frac {c - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} + \sqrt {b^{2} + c^{2}}}{c - \frac {b \sin \relax (x)}{\cos \relax (x) + 1} - \sqrt {b^{2} + c^{2}}}\right )}{\sqrt {b^{2} + c^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

B*(2*b*arctan(sin(x)/(cos(x) + 1))/(b^2 + c^2) + c*log(-b - 2*c*sin(x)/(cos(x) + 1) + b*sin(x)^2/(cos(x) + 1)^
2)/(b^2 + c^2) - c*log(sin(x)^2/(cos(x) + 1)^2 + 1)/(b^2 + c^2)) - A*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)))/sqrt(b^2 + c^2)

________________________________________________________________________________________

mupad [B]  time = 6.53, size = 692, normalized size = 9.48 \[ \ln \left (32\,A^2\,B\,b^2-32\,A\,B^2\,b^2-\frac {\left (A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,c^3+B\,b^2\,c\right )\,\left (32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A^2\,b^2-A^2\,c^2+4\,A\,B\,c^2+B^2\,b^2-3\,B^2\,c^2\right )-64\,A^2\,b^2\,c-32\,B^2\,b^2\,c+\frac {\left (A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,c^3+B\,b^2\,c\right )\,\left (32\,A\,b^4+32\,B\,b^4+32\,A\,b^2\,c^2-64\,B\,b^2\,c^2+32\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,A\,b^2+2\,A\,c^2+4\,B\,b^2+B\,c^2\right )+\frac {96\,b\,c\,\left (b+c\,\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,c^3+B\,b^2\,c\right )}{b^2+c^2}\right )}{{\left (b^2+c^2\right )}^2}+64\,A\,B\,b^2\,c\right )}{{\left (b^2+c^2\right )}^2}+32\,B\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )\,{\left (A-B\right )}^2\right )\,\left (\frac {B\,c}{b^2+c^2}+\frac {A\,\sqrt {{\left (b^2+c^2\right )}^3}}{{\left (b^2+c^2\right )}^2}\right )+\ln \left (32\,A^2\,B\,b^2-32\,A\,B^2\,b^2-\frac {\left (B\,c^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,b^2\,c\right )\,\left (32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A^2\,b^2-A^2\,c^2+4\,A\,B\,c^2+B^2\,b^2-3\,B^2\,c^2\right )-64\,A^2\,b^2\,c-32\,B^2\,b^2\,c+\frac {\left (B\,c^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,b^2\,c\right )\,\left (32\,A\,b^4+32\,B\,b^4+32\,A\,b^2\,c^2-64\,B\,b^2\,c^2+32\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (2\,A\,b^2+2\,A\,c^2+4\,B\,b^2+B\,c^2\right )+\frac {96\,b\,c\,\left (b+c\,\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (B\,c^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+B\,b^2\,c\right )}{b^2+c^2}\right )}{{\left (b^2+c^2\right )}^2}+64\,A\,B\,b^2\,c\right )}{{\left (b^2+c^2\right )}^2}+32\,B\,b\,c\,\mathrm {tan}\left (\frac {x}{2}\right )\,{\left (A-B\right )}^2\right )\,\left (\frac {B\,c}{b^2+c^2}-\frac {A\,\sqrt {{\left (b^2+c^2\right )}^3}}{{\left (b^2+c^2\right )}^2}\right )-\frac {B\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{b+c\,1{}\mathrm {i}}-\frac {B\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}{c+b\,1{}\mathrm {i}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(32*A^2*B*b^2 - 32*A*B^2*b^2 - ((A*((b^2 + c^2)^3)^(1/2) + B*c^3 + B*b^2*c)*(32*b*tan(x/2)*(A^2*b^2 - A^2*c
^2 + B^2*b^2 - 3*B^2*c^2 + 4*A*B*c^2) - 64*A^2*b^2*c - 32*B^2*b^2*c + ((A*((b^2 + c^2)^3)^(1/2) + B*c^3 + B*b^
2*c)*(32*A*b^4 + 32*B*b^4 + 32*A*b^2*c^2 - 64*B*b^2*c^2 + 32*b*c*tan(x/2)*(2*A*b^2 + 2*A*c^2 + 4*B*b^2 + B*c^2
) + (96*b*c*(b + c*tan(x/2))*(A*((b^2 + c^2)^3)^(1/2) + B*c^3 + B*b^2*c))/(b^2 + c^2)))/(b^2 + c^2)^2 + 64*A*B
*b^2*c))/(b^2 + c^2)^2 + 32*B*b*c*tan(x/2)*(A - B)^2)*((B*c)/(b^2 + c^2) + (A*((b^2 + c^2)^3)^(1/2))/(b^2 + c^
2)^2) + log(32*A^2*B*b^2 - 32*A*B^2*b^2 - ((B*c^3 - A*((b^2 + c^2)^3)^(1/2) + B*b^2*c)*(32*b*tan(x/2)*(A^2*b^2
 - A^2*c^2 + B^2*b^2 - 3*B^2*c^2 + 4*A*B*c^2) - 64*A^2*b^2*c - 32*B^2*b^2*c + ((B*c^3 - A*((b^2 + c^2)^3)^(1/2
) + B*b^2*c)*(32*A*b^4 + 32*B*b^4 + 32*A*b^2*c^2 - 64*B*b^2*c^2 + 32*b*c*tan(x/2)*(2*A*b^2 + 2*A*c^2 + 4*B*b^2
 + B*c^2) + (96*b*c*(b + c*tan(x/2))*(B*c^3 - A*((b^2 + c^2)^3)^(1/2) + B*b^2*c))/(b^2 + c^2)))/(b^2 + c^2)^2
+ 64*A*B*b^2*c))/(b^2 + c^2)^2 + 32*B*b*c*tan(x/2)*(A - B)^2)*((B*c)/(b^2 + c^2) - (A*((b^2 + c^2)^3)^(1/2))/(
b^2 + c^2)^2) - (B*log(tan(x/2) - 1i)*1i)/(b + c*1i) - (B*log(tan(x/2) + 1i))/(b*1i + c)

________________________________________________________________________________________

sympy [A]  time = 37.03, size = 678, normalized size = 9.29 \[ \begin {cases} \tilde {\infty } \left (A \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} - B \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} + B \log {\left (\tan {\left (\frac {x}{2} \right )} \right )}\right ) & \text {for}\: b = 0 \wedge c = 0 \\\frac {A \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} - B \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )} + B \log {\left (\tan {\left (\frac {x}{2} \right )} \right )}}{c} & \text {for}\: b = 0 \\\frac {2 A}{- 2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} + \frac {B x \sin {\relax (x )}}{- 2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} - \frac {i B x \cos {\relax (x )}}{- 2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} - \frac {i B \sin {\relax (x )}}{- 2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} & \text {for}\: b = - i c \\\frac {2 A}{2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} + \frac {B x \sin {\relax (x )}}{2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} + \frac {i B x \cos {\relax (x )}}{2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} + \frac {i B \sin {\relax (x )}}{2 i c \sin {\relax (x )} - 2 c \cos {\relax (x )}} & \text {for}\: b = i c \\- \frac {A b^{2} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} - \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} + \frac {A b^{2} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} + \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} - \frac {A c^{2} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} - \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} + \frac {A c^{2} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} + \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} + \frac {B b x \sqrt {b^{2} + c^{2}}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} - \frac {B c \sqrt {b^{2} + c^{2}} \log {\left (\tan ^{2}{\left (\frac {x}{2} \right )} + 1 \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} + \frac {B c \sqrt {b^{2} + c^{2}} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} - \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} + \frac {B c \sqrt {b^{2} + c^{2}} \log {\left (\tan {\left (\frac {x}{2} \right )} - \frac {c}{b} + \frac {\sqrt {b^{2} + c^{2}}}{b} \right )}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((zoo*(A*log(tan(x/2)) - B*log(tan(x/2)**2 + 1) + B*log(tan(x/2))), Eq(b, 0) & Eq(c, 0)), ((A*log(tan
(x/2)) - B*log(tan(x/2)**2 + 1) + B*log(tan(x/2)))/c, Eq(b, 0)), (2*A/(-2*I*c*sin(x) - 2*c*cos(x)) + B*x*sin(x
)/(-2*I*c*sin(x) - 2*c*cos(x)) - I*B*x*cos(x)/(-2*I*c*sin(x) - 2*c*cos(x)) - I*B*sin(x)/(-2*I*c*sin(x) - 2*c*c
os(x)), Eq(b, -I*c)), (2*A/(2*I*c*sin(x) - 2*c*cos(x)) + B*x*sin(x)/(2*I*c*sin(x) - 2*c*cos(x)) + I*B*x*cos(x)
/(2*I*c*sin(x) - 2*c*cos(x)) + I*B*sin(x)/(2*I*c*sin(x) - 2*c*cos(x)), Eq(b, I*c)), (-A*b**2*log(tan(x/2) - c/
b - sqrt(b**2 + c**2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) + A*b**2*log(tan(x/2) - c/b + sqrt(
b**2 + c**2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) - A*c**2*log(tan(x/2) - c/b - sqrt(b**2 + c*
*2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) + A*c**2*log(tan(x/2) - c/b + sqrt(b**2 + c**2)/b)/(b
**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) + B*b*x*sqrt(b**2 + c**2)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(
b**2 + c**2)) - B*c*sqrt(b**2 + c**2)*log(tan(x/2)**2 + 1)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) +
 B*c*sqrt(b**2 + c**2)*log(tan(x/2) - c/b - sqrt(b**2 + c**2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c*
*2)) + B*c*sqrt(b**2 + c**2)*log(tan(x/2) - c/b + sqrt(b**2 + c**2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**
2 + c**2)), True))

________________________________________________________________________________________