\(\int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx\) [439]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (warning: unable to verify)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 34, antiderivative size = 57 \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=-\frac {2 (c \cos (d+e x)-b \sin (d+e x))}{e \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.029, Rules used = {3191} \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=-\frac {2 (c \cos (d+e x)-b \sin (d+e x))}{e \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)}} \]

[In]

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

[Out]

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

Rule 3191

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

Rubi steps \begin{align*} \text {integral}& = -\frac {2 (c \cos (d+e x)-b \sin (d+e x))}{e \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)}} \\ \end{align*}

Mathematica [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.

Time = 18.30 (sec) , antiderivative size = 5053, normalized size of antiderivative = 88.65 \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\text {Result too large to show} \]

[In]

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

[Out]

Result too large to show

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(116\) vs. \(2(53)=106\).

Time = 1.34 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.05

method result size
default \(\frac {2 \left (\sin \left (e x +d -\arctan \left (-b , c\right )\right )-1\right ) \sqrt {b^{2}+c^{2}}\, \left (\sin \left (e x +d -\arctan \left (-b , c\right )\right )+1\right )}{\cos \left (e x +d -\arctan \left (-b , c\right )\right ) \sqrt {\frac {b^{2} \sin \left (e x +d -\arctan \left (-b , c\right )\right )+c^{2} \sin \left (e x +d -\arctan \left (-b , c\right )\right )-b^{2}-c^{2}}{\sqrt {b^{2}+c^{2}}}}\, e}\) \(117\)
risch \(\frac {\sqrt {2}\, \sqrt {-2 \sqrt {b^{2}+c^{2}}+2 b \cos \left (e x +d \right )+2 c \sin \left (e x +d \right )}\, \left (i b +c \right ) \left (i \sqrt {b^{2}+c^{2}}\, c +b^{2} {\mathrm e}^{i \left (e x +d \right )}+c^{2} {\mathrm e}^{i \left (e x +d \right )}+\sqrt {b^{2}+c^{2}}\, b \right ) \left (-i \sqrt {b^{2}+c^{2}}\, c +b^{2} {\mathrm e}^{i \left (e x +d \right )}+c^{2} {\mathrm e}^{i \left (e x +d \right )}-\sqrt {b^{2}+c^{2}}\, b \right )}{\left (i c \,{\mathrm e}^{2 i \left (e x +d \right )}-b \,{\mathrm e}^{2 i \left (e x +d \right )}+2 \sqrt {b^{2}+c^{2}}\, {\mathrm e}^{i \left (e x +d \right )}-i c -b \right ) \left (b^{2}+c^{2}\right )^{2} e}\) \(213\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.40 \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {2 \, {\left (b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) + \sqrt {b^{2} + c^{2}}\right )} \sqrt {b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) - \sqrt {b^{2} + c^{2}}}}{c e \cos \left (e x + d\right ) - b e \sin \left (e x + d\right )} \]

[In]

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

[Out]

2*(b*cos(e*x + d) + c*sin(e*x + d) + sqrt(b^2 + c^2))*sqrt(b*cos(e*x + d) + c*sin(e*x + d) - sqrt(b^2 + c^2))/
(c*e*cos(e*x + d) - b*e*sin(e*x + d))

Sympy [F]

\[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int \sqrt {b \cos {\left (d + e x \right )} + c \sin {\left (d + e x \right )} - \sqrt {b^{2} + c^{2}}}\, dx \]

[In]

integrate((b*cos(e*x+d)+c*sin(e*x+d)-(b**2+c**2)**(1/2))**(1/2),x)

[Out]

Integral(sqrt(b*cos(d + e*x) + c*sin(d + e*x) - sqrt(b**2 + c**2)), x)

Maxima [F(-2)]

Exception generated. \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\text {Exception raised: RuntimeError} \]

[In]

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

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [F(-2)]

Exception generated. \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\text {Exception raised: TypeError} \]

[In]

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

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

Mupad [F(-1)]

Timed out. \[ \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\int \sqrt {b\,\cos \left (d+e\,x\right )+c\,\sin \left (d+e\,x\right )-\sqrt {b^2+c^2}} \,d x \]

[In]

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

[Out]

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