3.555 \(\int \frac{b^2+c^2+a b \cos (x)+a c \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx\)

Optimal. Leaf size=24 \[ -\frac{c \cos (x)-b \sin (x)}{a+b \cos (x)+c \sin (x)} \]

[Out]

-((c*Cos[x] - b*Sin[x])/(a + b*Cos[x] + c*Sin[x]))

________________________________________________________________________________________

Rubi [B]  time = 0.0675144, antiderivative size = 68, normalized size of antiderivative = 2.83, number of steps used = 1, number of rules used = 1, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.033, Rules used = {3150} \[ -\frac{c \cos (x) \left (a^2-b^2-c^2\right )-b \sin (x) \left (a^2-b^2-c^2\right )}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))} \]

Antiderivative was successfully verified.

[In]

Int[(b^2 + c^2 + a*b*Cos[x] + a*c*Sin[x])/(a + b*Cos[x] + c*Sin[x])^2,x]

[Out]

-((c*(a^2 - b^2 - c^2)*Cos[x] - b*(a^2 - b^2 - c^2)*Sin[x])/((a^2 - b^2 - c^2)*(a + b*Cos[x] + c*Sin[x])))

Rule 3150

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] /; FreeQ[{a, b, c, d, e, A, B,
C}, x] && NeQ[a^2 - b^2 - c^2, 0] && EqQ[a*A - b*B - c*C, 0]

Rubi steps

\begin{align*} \int \frac{b^2+c^2+a b \cos (x)+a c \sin (x)}{(a+b \cos (x)+c \sin (x))^2} \, dx &=-\frac{c \left (a^2-b^2-c^2\right ) \cos (x)-b \left (a^2-b^2-c^2\right ) \sin (x)}{\left (a^2-b^2-c^2\right ) (a+b \cos (x)+c \sin (x))}\\ \end{align*}

Mathematica [A]  time = 0.0943512, size = 32, normalized size = 1.33 \[ \frac{a c+b^2 \sin (x)+c^2 \sin (x)}{b (a+b \cos (x)+c \sin (x))} \]

Antiderivative was successfully verified.

[In]

Integrate[(b^2 + c^2 + a*b*Cos[x] + a*c*Sin[x])/(a + b*Cos[x] + c*Sin[x])^2,x]

[Out]

(a*c + b^2*Sin[x] + c^2*Sin[x])/(b*(a + b*Cos[x] + c*Sin[x]))

________________________________________________________________________________________

Maple [B]  time = 0.102, size = 70, normalized size = 2.9 \begin{align*} -2\,{\frac{1}{a \left ( \tan \left ( x/2 \right ) \right ) ^{2}-b \left ( \tan \left ( x/2 \right ) \right ) ^{2}+2\,c\tan \left ( x/2 \right ) +a+b} \left ( -{\frac{ \left ( ab-{b}^{2}-{c}^{2} \right ) \tan \left ( x/2 \right ) }{a-b}}+{\frac{ac}{a-b}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b^2+c^2+a*b*cos(x)+a*c*sin(x))/(a+b*cos(x)+c*sin(x))^2,x)

[Out]

-2*(-(a*b-b^2-c^2)/(a-b)*tan(1/2*x)+a*c/(a-b))/(a*tan(1/2*x)^2-b*tan(1/2*x)^2+2*c*tan(1/2*x)+a+b)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2+c^2+a*b*cos(x)+a*c*sin(x))/(a+b*cos(x)+c*sin(x))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.94278, size = 68, normalized size = 2.83 \begin{align*} -\frac{c \cos \left (x\right ) - b \sin \left (x\right )}{b \cos \left (x\right ) + c \sin \left (x\right ) + a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2+c^2+a*b*cos(x)+a*c*sin(x))/(a+b*cos(x)+c*sin(x))^2,x, algorithm="fricas")

[Out]

-(c*cos(x) - b*sin(x))/(b*cos(x) + c*sin(x) + a)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b**2+c**2+a*b*cos(x)+a*c*sin(x))/(a+b*cos(x)+c*sin(x))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.18427, size = 92, normalized size = 3.83 \begin{align*} \frac{2 \,{\left (a b \tan \left (\frac{1}{2} \, x\right ) - b^{2} \tan \left (\frac{1}{2} \, x\right ) - c^{2} \tan \left (\frac{1}{2} \, x\right ) - a c\right )}}{{\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 )}{\left (a - b\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2+c^2+a*b*cos(x)+a*c*sin(x))/(a+b*cos(x)+c*sin(x))^2,x, algorithm="giac")

[Out]

2*(a*b*tan(1/2*x) - b^2*tan(1/2*x) - c^2*tan(1/2*x) - a*c)/((a*tan(1/2*x)^2 - b*tan(1/2*x)^2 + 2*c*tan(1/2*x)
+ a + b)*(a - b))