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.07, 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.09, 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]))

________________________________________________________________________________________

fricas [A]  time = 0.89, size = 24, normalized size = 1.00 \[ -\frac {c \cos \relax (x) - b \sin \relax (x)}{b \cos \relax (x) + c \sin \relax (x) + a} \]

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)

________________________________________________________________________________________

giac [B]  time = 0.18, size = 68, normalized size = 2.83 \[ \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 )}} \]

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))

________________________________________________________________________________________

maple [B]  time = 0.19, size = 70, normalized size = 2.92 \[ -\frac {2 \left (-\frac {\left (a b -b^{2}-c^{2}\right ) \tan \left (\frac {x}{2}\right )}{a -b}+\frac {a c}{a -b}\right )}{a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+2 c \tan \left (\frac {x}{2}\right )+a +b} \]

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.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

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 >> 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 details)Is c^2+b^2-a^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 3.03, size = 62, normalized size = 2.58 \[ -\frac {\frac {2\,a\,c}{a-b}+\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )\,\left (b^2-a\,b+c^2\right )}{a-b}}{\left (a-b\right )\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,c\,\mathrm {tan}\left (\frac {x}{2}\right )+a+b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

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

________________________________________________________________________________________