3.360 \(\int \frac{1}{(\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x))^2} \, dx\)

Optimal. Leaf size=129 \[ -\frac{c \cos (d+e x)-b \sin (d+e x)}{3 e \sqrt{b^2+c^2} \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )^2}-\frac{c-\sqrt{b^2+c^2} \sin (d+e x)}{3 c e \sqrt{b^2+c^2} (c \cos (d+e x)-b \sin (d+e x))} \]

[Out]

-(c*Cos[d + e*x] - b*Sin[d + e*x])/(3*Sqrt[b^2 + c^2]*e*(Sqrt[b^2 + c^2] + b*Cos[d + e*x] + c*Sin[d + e*x])^2)
 - (c - Sqrt[b^2 + c^2]*Sin[d + e*x])/(3*c*Sqrt[b^2 + c^2]*e*(c*Cos[d + e*x] - b*Sin[d + e*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0852958, antiderivative size = 129, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {3116, 3114} \[ -\frac{c \cos (d+e x)-b \sin (d+e x)}{3 e \sqrt{b^2+c^2} \left (\sqrt{b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)\right )^2}-\frac{c-\sqrt{b^2+c^2} \sin (d+e x)}{3 c e \sqrt{b^2+c^2} (c \cos (d+e x)-b \sin (d+e x))} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[b^2 + c^2] + b*Cos[d + e*x] + c*Sin[d + e*x])^(-2),x]

[Out]

-(c*Cos[d + e*x] - b*Sin[d + e*x])/(3*Sqrt[b^2 + c^2]*e*(Sqrt[b^2 + c^2] + b*Cos[d + e*x] + c*Sin[d + e*x])^2)
 - (c - Sqrt[b^2 + c^2]*Sin[d + e*x])/(3*c*Sqrt[b^2 + c^2]*e*(c*Cos[d + e*x] - b*Sin[d + e*x]))

Rule 3116

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_), x_Symbol] :> Simp[((c*Cos[d +
 e*x] - b*Sin[d + e*x])*(a + b*Cos[d + e*x] + c*Sin[d + e*x])^n)/(a*e*(2*n + 1)), x] + Dist[(n + 1)/(a*(2*n +
1)), Int[(a + b*Cos[d + e*x] + c*Sin[d + e*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[a^2 - b^2 -
 c^2, 0] && LtQ[n, -1]

Rule 3114

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(-1), x_Symbol] :> -Simp[(c - a*Sin
[d + e*x])/(c*e*(c*Cos[d + e*x] - b*Sin[d + e*x])), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[a^2 - b^2 - c^2, 0]

Rubi steps

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

Mathematica [A]  time = 0.248005, size = 98, normalized size = 0.76 \[ \frac{-2 c \sqrt{b^2+c^2}+b^2 \sin ^3(d+e x)+2 b c \cos ^3(d+e x)+2 c^2 \sin (d+e x)+c^2 \sin (d+e x) \cos ^2(d+e x)}{3 c e (c \cos (d+e x)-b \sin (d+e x))^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[b^2 + c^2] + b*Cos[d + e*x] + c*Sin[d + e*x])^(-2),x]

[Out]

(-2*c*Sqrt[b^2 + c^2] + 2*b*c*Cos[d + e*x]^3 + 2*c^2*Sin[d + e*x] + c^2*Cos[d + e*x]^2*Sin[d + e*x] + b^2*Sin[
d + e*x]^3)/(3*c*e*(c*Cos[d + e*x] - b*Sin[d + e*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.13, size = 233, normalized size = 1.8 \begin{align*} 2\,{\frac{\sqrt{{b}^{2}+{c}^{2}}+b}{e{c}^{2}} \left ( -{\frac{ \left ( \sqrt{{b}^{2}+{c}^{2}}+b \right ) \left ( \tan \left ( d/2+1/2\,ex \right ) \right ) ^{2}}{{c}^{2}}}-{\frac{ \left ( 2\,{b}^{2}+{c}^{2}+2\,\sqrt{{b}^{2}+{c}^{2}}b \right ) \tan \left ( d/2+1/2\,ex \right ) }{{c}^{3}}}-2/3\,{\frac{2\,\sqrt{{b}^{2}+{c}^{2}}{b}^{2}+\sqrt{{b}^{2}+{c}^{2}}{c}^{2}+2\,{b}^{3}+2\,b{c}^{2}}{{c}^{4}}} \right ) \left ( \left ( \tan \left ( d/2+1/2\,ex \right ) \right ) ^{2}+2\,{\frac{\sqrt{{b}^{2}+{c}^{2}}\tan \left ( d/2+1/2\,ex \right ) }{c}}+2\,{\frac{b\tan \left ( d/2+1/2\,ex \right ) }{c}}+2\,{\frac{\sqrt{{b}^{2}+{c}^{2}}b}{{c}^{2}}}+2\,{\frac{{b}^{2}}{{c}^{2}}}+1 \right ) ^{-1} \left ( \tan \left ( d/2+1/2\,ex \right ) +{\frac{\sqrt{{b}^{2}+{c}^{2}}}{c}}+{\frac{b}{c}} \right ) ^{-1}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(b*cos(e*x+d)+c*sin(e*x+d)+(b^2+c^2)^(1/2))^2,x)

[Out]

2/e*((b^2+c^2)^(1/2)+b)/c^2*(-((b^2+c^2)^(1/2)+b)/c^2*tan(1/2*d+1/2*e*x)^2-1/c^3*(2*b^2+c^2+2*(b^2+c^2)^(1/2)*
b)*tan(1/2*d+1/2*e*x)-2/3*(2*(b^2+c^2)^(1/2)*b^2+(b^2+c^2)^(1/2)*c^2+2*b^3+2*b*c^2)/c^4)/(tan(1/2*d+1/2*e*x)^2
+2/c*(b^2+c^2)^(1/2)*tan(1/2*d+1/2*e*x)+2*b/c*tan(1/2*d+1/2*e*x)+2/c^2*(b^2+c^2)^(1/2)*b+2/c^2*b^2+1)/(tan(1/2
*d+1/2*e*x)+1/c*(b^2+c^2)^(1/2)+b/c)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 2.30345, size = 424, normalized size = 3.29 \begin{align*} -\frac{3 \, b^{3} \cos \left (e x + d\right ) -{\left (b^{3} - 3 \, b c^{2}\right )} \cos \left (e x + d\right )^{3} +{\left (3 \, b^{2} c + 2 \, c^{3} -{\left (3 \, b^{2} c - c^{3}\right )} \cos \left (e x + d\right )^{2}\right )} \sin \left (e x + d\right ) - 2 \,{\left (b^{2} + c^{2}\right )}^{\frac{3}{2}}}{3 \,{\left ({\left (3 \, b^{4} c + 2 \, b^{2} c^{3} - c^{5}\right )} e \cos \left (e x + d\right )^{3} - 3 \,{\left (b^{4} c + b^{2} c^{3}\right )} e \cos \left (e x + d\right ) -{\left ({\left (b^{5} - 2 \, b^{3} c^{2} - 3 \, b c^{4}\right )} e \cos \left (e x + d\right )^{2} -{\left (b^{5} + b^{3} c^{2}\right )} e\right )} \sin \left (e x + d\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(3*b^3*cos(e*x + d) - (b^3 - 3*b*c^2)*cos(e*x + d)^3 + (3*b^2*c + 2*c^3 - (3*b^2*c - c^3)*cos(e*x + d)^2)
*sin(e*x + d) - 2*(b^2 + c^2)^(3/2))/((3*b^4*c + 2*b^2*c^3 - c^5)*e*cos(e*x + d)^3 - 3*(b^4*c + b^2*c^3)*e*cos
(e*x + d) - ((b^5 - 2*b^3*c^2 - 3*b*c^4)*e*cos(e*x + d)^2 - (b^5 + b^3*c^2)*e)*sin(e*x + d))

________________________________________________________________________________________

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(1/(b*cos(e*x+d)+c*sin(e*x+d)+(b**2+c**2)**(1/2))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.15765, size = 216, normalized size = 1.67 \begin{align*} -\frac{2 \,{\left (8 \, b^{4} + 10 \, b^{2} c^{2} + 2 \, c^{4} + 3 \,{\left (2 \, b^{2} c^{2} + c^{4} + 2 \, \sqrt{b^{2} + c^{2}} b c^{2}\right )} \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right )^{2} + 3 \,{\left (4 \, b^{3} c + 3 \, b c^{3} +{\left (4 \, b^{2} c + c^{3}\right )} \sqrt{b^{2} + c^{2}}\right )} \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) + 2 \,{\left (4 \, b^{3} + 3 \, b c^{2}\right )} \sqrt{b^{2} + c^{2}}\right )} e^{\left (-1\right )}}{3 \,{\left (c \tan \left (\frac{1}{2} \, x e + \frac{1}{2} \, d\right ) + b + \sqrt{b^{2} + c^{2}}\right )}^{3} c^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/3*(8*b^4 + 10*b^2*c^2 + 2*c^4 + 3*(2*b^2*c^2 + c^4 + 2*sqrt(b^2 + c^2)*b*c^2)*tan(1/2*x*e + 1/2*d)^2 + 3*(4
*b^3*c + 3*b*c^3 + (4*b^2*c + c^3)*sqrt(b^2 + c^2))*tan(1/2*x*e + 1/2*d) + 2*(4*b^3 + 3*b*c^2)*sqrt(b^2 + c^2)
)*e^(-1)/((c*tan(1/2*x*e + 1/2*d) + b + sqrt(b^2 + c^2))^3*c^3)