3.4.49 \(\int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx\) [349]

3.4.49.1 Optimal result
3.4.49.2 Mathematica [A] (verified)
3.4.49.3 Rubi [A] (verified)
3.4.49.4 Maple [A] (verified)
3.4.49.5 Fricas [B] (verification not implemented)
3.4.49.6 Sympy [C] (verification not implemented)
3.4.49.7 Maxima [B] (verification not implemented)
3.4.49.8 Giac [A] (verification not implemented)
3.4.49.9 Mupad [B] (verification not implemented)

3.4.49.1 Optimal result

Integrand size = 18, antiderivative size = 74 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=\frac {c C x}{b^2+c^2}-\frac {A \text {arctanh}\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} \]

output
c*C*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)
 
3.4.49.2 Mathematica [A] (verified)

Time = 0.24 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.92 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=\frac {2 A \text {arctanh}\left (\frac {-c+b \tan \left (\frac {x}{2}\right )}{\sqrt {b^2+c^2}}\right )}{\sqrt {b^2+c^2}}+\frac {C (c x-b \log (b \cos (x)+c \sin (x)))}{b^2+c^2} \]

input
Integrate[(A + C*Sin[x])/(b*Cos[x] + c*Sin[x]),x]
 
output
(2*A*ArcTanh[(-c + b*Tan[x/2])/Sqrt[b^2 + c^2]])/Sqrt[b^2 + c^2] + (C*(c*x 
 - b*Log[b*Cos[x] + c*Sin[x]]))/(b^2 + c^2)
 
3.4.49.3 Rubi [A] (verified)

Time = 0.30 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {3042, 3616, 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+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3616

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

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3553

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

\(\Big \downarrow \) 219

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

input
Int[(A + C*Sin[x])/(b*Cos[x] + c*Sin[x]),x]
 
output
(c*C*x)/(b^2 + c^2) - (A*ArcTanh[(c*Cos[x] - b*Sin[x])/Sqrt[b^2 + c^2]])/S 
qrt[b^2 + c^2] - (b*C*Log[b*Cos[x] + c*Sin[x]])/(b^2 + c^2)
 

3.4.49.3.1 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 3616
Int[((A_.) + (C_.)*sin[(d_.) + (e_.)*(x_)])/((a_.) + cos[(d_.) + (e_.)*(x_) 
]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[c*C*((d + e*x)/ 
(e*(b^2 + c^2))), x] + (-Simp[b*C*(Log[a + b*Cos[d + e*x] + c*Sin[d + e*x]] 
/(e*(b^2 + c^2))), x] + Simp[(A*(b^2 + c^2) - a*c*C)/(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, C} 
, x] && NeQ[b^2 + c^2, 0] && NeQ[A*(b^2 + c^2) - a*c*C, 0]
 
3.4.49.4 Maple [A] (verified)

Time = 0.80 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.58

method result size
default \(\frac {2 C \left (\frac {b \ln \left (1+\tan \left (\frac {x}{2}\right )^{2}\right )}{2}+c \arctan \left (\tan \left (\frac {x}{2}\right )\right )\right )}{b^{2}+c^{2}}+\frac {-b C \ln \left (\tan \left (\frac {x}{2}\right )^{2} b -2 c \tan \left (\frac {x}{2}\right )-b \right )-\frac {2 \left (-A \,b^{2}-A \,c^{2}\right ) \operatorname {arctanh}\left (\frac {2 b \tan \left (\frac {x}{2}\right )-2 c}{2 \sqrt {b^{2}+c^{2}}}\right )}{\sqrt {b^{2}+c^{2}}}}{b^{2}+c^{2}}\) \(117\)
risch \(\frac {i x C}{i c -b}+\frac {2 i C x \,b^{3}}{b^{4}+2 b^{2} c^{2}+c^{4}}+\frac {2 i C x \,c^{2} b}{b^{4}+2 b^{2} c^{2}+c^{4}}-\frac {\ln \left ({\mathrm e}^{i x}+\frac {\left (i b -c \right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{A \left (b^{2}+c^{2}\right )}\right ) b C}{b^{2}+c^{2}}+\frac {\ln \left ({\mathrm e}^{i x}+\frac {\left (i b -c \right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{A \left (b^{2}+c^{2}\right )}\right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{b^{2}+c^{2}}-\frac {\ln \left ({\mathrm e}^{i x}-\frac {\left (i b -c \right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{A \left (b^{2}+c^{2}\right )}\right ) b C}{b^{2}+c^{2}}-\frac {\ln \left ({\mathrm e}^{i x}-\frac {\left (i b -c \right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{A \left (b^{2}+c^{2}\right )}\right ) \sqrt {A^{2} b^{2}+A^{2} c^{2}}}{b^{2}+c^{2}}\) \(331\)

input
int((A+C*sin(x))/(b*cos(x)+c*sin(x)),x,method=_RETURNVERBOSE)
 
output
2*C/(b^2+c^2)*(1/2*b*ln(1+tan(1/2*x)^2)+c*arctan(tan(1/2*x)))+2/(b^2+c^2)* 
(-1/2*b*C*ln(tan(1/2*x)^2*b-2*c*tan(1/2*x)-b)-(-A*b^2-A*c^2)/(b^2+c^2)^(1/ 
2)*arctanh(1/2*(2*b*tan(1/2*x)-2*c)/(b^2+c^2)^(1/2)))
 
3.4.49.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 144 vs. \(2 (70) = 140\).

Time = 0.26 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.95 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=\frac {2 \, C c x - C b \log \left (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 ) + \sqrt {b^{2} + c^{2}} A \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 (b^{2} + c^{2}\right )}} \]

input
integrate((A+C*sin(x))/(b*cos(x)+c*sin(x)),x, algorithm="fricas")
 
output
1/2*(2*C*c*x - C*b*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)
 
3.4.49.6 Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 10.68 (sec) , antiderivative size = 634, normalized size of antiderivative = 8.57 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=\begin {cases} \tilde {\infty } \left (A \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} + C x\right ) & \text {for}\: b = 0 \wedge c = 0 \\\frac {A \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} + C x}{c} & \text {for}\: b = 0 \\- \frac {2 A}{2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} + \frac {i C x \sin {\left (x \right )}}{2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} + \frac {C x \cos {\left (x \right )}}{2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} - \frac {C \sin {\left (x \right )}}{2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} & \text {for}\: b = - i c \\- \frac {2 A}{- 2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} - \frac {i C x \sin {\left (x \right )}}{- 2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} + \frac {C x \cos {\left (x \right )}}{- 2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} - \frac {C \sin {\left (x \right )}}{- 2 i c \sin {\left (x \right )} + 2 c \cos {\left (x \right )}} & \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 {C b \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 {C b \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 {C b \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 {C c x \sqrt {b^{2} + c^{2}}}{b^{2} \sqrt {b^{2} + c^{2}} + c^{2} \sqrt {b^{2} + c^{2}}} & \text {otherwise} \end {cases} \]

input
integrate((A+C*sin(x))/(b*cos(x)+c*sin(x)),x)
 
output
Piecewise((zoo*(A*log(tan(x/2)) + C*x), Eq(b, 0) & Eq(c, 0)), ((A*log(tan( 
x/2)) + C*x)/c, Eq(b, 0)), (-2*A/(2*I*c*sin(x) + 2*c*cos(x)) + I*C*x*sin(x 
)/(2*I*c*sin(x) + 2*c*cos(x)) + C*x*cos(x)/(2*I*c*sin(x) + 2*c*cos(x)) - C 
*sin(x)/(2*I*c*sin(x) + 2*c*cos(x)), Eq(b, -I*c)), (-2*A/(-2*I*c*sin(x) + 
2*c*cos(x)) - I*C*x*sin(x)/(-2*I*c*sin(x) + 2*c*cos(x)) + C*x*cos(x)/(-2*I 
*c*sin(x) + 2*c*cos(x)) - C*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)) + C*b*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)) - C*b*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)) - C*b*sqrt(b**2 + c**2)*log(tan(x/2) - c/b + sq 
rt(b**2 + c**2)/b)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)) + C*c 
*x*sqrt(b**2 + c**2)/(b**2*sqrt(b**2 + c**2) + c**2*sqrt(b**2 + c**2)), Tr 
ue))
 
3.4.49.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (70) = 140\).

Time = 0.32 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.07 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=C {\left (\frac {2 \, c \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{b^{2} + c^{2}} - \frac {b \log \left (-b - \frac {2 \, c \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {b \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}}\right )}{b^{2} + c^{2}} + \frac {b \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right )}{b^{2} + c^{2}}\right )} - \frac {A \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 )}{\sqrt {b^{2} + c^{2}}} \]

input
integrate((A+C*sin(x))/(b*cos(x)+c*sin(x)),x, algorithm="maxima")
 
output
C*(2*c*arctan(sin(x)/(cos(x) + 1))/(b^2 + c^2) - b*log(-b - 2*c*sin(x)/(co 
s(x) + 1) + b*sin(x)^2/(cos(x) + 1)^2)/(b^2 + c^2) + b*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)
 
3.4.49.8 Giac [A] (verification not implemented)

Time = 0.32 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.77 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=\frac {C c x}{b^{2} + c^{2}} + \frac {C b \log \left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )}{b^{2} + c^{2}} - \frac {C b \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}}} \]

input
integrate((A+C*sin(x))/(b*cos(x)+c*sin(x)),x, algorithm="giac")
 
output
C*c*x/(b^2 + c^2) + C*b*log(tan(1/2*x)^2 + 1)/(b^2 + c^2) - C*b*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)
 
3.4.49.9 Mupad [B] (verification not implemented)

Time = 35.82 (sec) , antiderivative size = 695, normalized size of antiderivative = 9.39 \[ \int \frac {A+C \sin (x)}{b \cos (x)+c \sin (x)} \, dx=-\ln \left (-32\,A\,C^2\,b^2-\frac {\left (A\,\sqrt {{\left (b^2+c^2\right )}^3}+C\,b^3+C\,b\,c^2\right )\,\left (64\,A^2\,b^2\,c+32\,C^2\,b^2\,c-32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A^2\,b^2-A^2\,c^2-4\,A\,C\,b\,c+2\,C^2\,c^2\right )+64\,A\,C\,b^3+\frac {\left (A\,\sqrt {{\left (b^2+c^2\right )}^3}+C\,b^3+C\,b\,c^2\right )\,\left (32\,A\,b^4+32\,A\,b^2\,c^2+32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-2\,C\,b^3+2\,A\,b^2\,c+C\,b\,c^2+2\,A\,c^3\right )-32\,C\,b\,c^3+64\,C\,b^3\,c-\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}+C\,b^3+C\,b\,c^2\right )}{b^2+c^2}\right )}{{\left (b^2+c^2\right )}^2}\right )}{{\left (b^2+c^2\right )}^2}-32\,A^2\,C\,b\,c-32\,C\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-b\,A^2+2\,c\,A\,C+2\,b\,C^2\right )\right )\,\left (\frac {C\,b}{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\,C^2\,b^2-\frac {\left (C\,b^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+C\,b\,c^2\right )\,\left (64\,A^2\,b^2\,c+32\,C^2\,b^2\,c-32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (A^2\,b^2-A^2\,c^2-4\,A\,C\,b\,c+2\,C^2\,c^2\right )+64\,A\,C\,b^3+\frac {\left (C\,b^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+C\,b\,c^2\right )\,\left (32\,A\,b^4+32\,A\,b^2\,c^2+32\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-2\,C\,b^3+2\,A\,b^2\,c+C\,b\,c^2+2\,A\,c^3\right )-32\,C\,b\,c^3+64\,C\,b^3\,c-\frac {96\,b\,c\,\left (b+c\,\mathrm {tan}\left (\frac {x}{2}\right )\right )\,\left (C\,b^3-A\,\sqrt {{\left (b^2+c^2\right )}^3}+C\,b\,c^2\right )}{b^2+c^2}\right )}{{\left (b^2+c^2\right )}^2}\right )}{{\left (b^2+c^2\right )}^2}-32\,A^2\,C\,b\,c-32\,C\,b\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (-b\,A^2+2\,c\,A\,C+2\,b\,C^2\right )\right )\,\left (\frac {C\,b}{b^2+c^2}-\frac {A\,\sqrt {{\left (b^2+c^2\right )}^3}}{{\left (b^2+c^2\right )}^2}\right )+\frac {C\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}\right )}{b-c\,1{}\mathrm {i}}+\frac {C\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{-c+b\,1{}\mathrm {i}} \]

input
int((A + C*sin(x))/(b*cos(x) + c*sin(x)),x)
 
output
(C*log(tan(x/2) + 1i))/(b - c*1i) - log(- 32*A*C^2*b^2 - ((C*b^3 - A*((b^2 
 + c^2)^3)^(1/2) + C*b*c^2)*(64*A^2*b^2*c + 32*C^2*b^2*c - 32*b*tan(x/2)*( 
A^2*b^2 - A^2*c^2 + 2*C^2*c^2 - 4*A*C*b*c) + 64*A*C*b^3 + ((C*b^3 - A*((b^ 
2 + c^2)^3)^(1/2) + C*b*c^2)*(32*A*b^4 + 32*A*b^2*c^2 + 32*b*tan(x/2)*(2*A 
*c^3 - 2*C*b^3 + 2*A*b^2*c + C*b*c^2) - 32*C*b*c^3 + 64*C*b^3*c - (96*b*c* 
(b + c*tan(x/2))*(C*b^3 - A*((b^2 + c^2)^3)^(1/2) + C*b*c^2))/(b^2 + c^2)) 
)/(b^2 + c^2)^2))/(b^2 + c^2)^2 - 32*A^2*C*b*c - 32*C*b*tan(x/2)*(2*C^2*b 
- A^2*b + 2*A*C*c))*((C*b)/(b^2 + c^2) - (A*((b^2 + c^2)^3)^(1/2))/(b^2 + 
c^2)^2) - log(- 32*A*C^2*b^2 - ((A*((b^2 + c^2)^3)^(1/2) + C*b^3 + C*b*c^2 
)*(64*A^2*b^2*c + 32*C^2*b^2*c - 32*b*tan(x/2)*(A^2*b^2 - A^2*c^2 + 2*C^2* 
c^2 - 4*A*C*b*c) + 64*A*C*b^3 + ((A*((b^2 + c^2)^3)^(1/2) + C*b^3 + C*b*c^ 
2)*(32*A*b^4 + 32*A*b^2*c^2 + 32*b*tan(x/2)*(2*A*c^3 - 2*C*b^3 + 2*A*b^2*c 
 + C*b*c^2) - 32*C*b*c^3 + 64*C*b^3*c - (96*b*c*(b + c*tan(x/2))*(A*((b^2 
+ c^2)^3)^(1/2) + C*b^3 + C*b*c^2))/(b^2 + c^2)))/(b^2 + c^2)^2))/(b^2 + c 
^2)^2 - 32*A^2*C*b*c - 32*C*b*tan(x/2)*(2*C^2*b - A^2*b + 2*A*C*c))*((C*b) 
/(b^2 + c^2) + (A*((b^2 + c^2)^3)^(1/2))/(b^2 + c^2)^2) + (C*log(tan(x/2) 
- 1i)*1i)/(b*1i - c)