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

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

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)}} \] Output:

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

Mathematica [C] (warning: unable to verify)

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

Time = 17.60 (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} \] Input:

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

Output:

Result too large to show
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {3042, 3591}

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 \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \sqrt {-\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)}dx\)

\(\Big \downarrow \) 3591

\(\displaystyle -\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)}}\)

Input:

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

Output:

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

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3591
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] && EqQ[a^ 
2 - b^2 - c^2, 0]
 
Maple [B] (verified)

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

Time = 0.72 (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\)

Input:

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

Output:

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)

Time = 0.08 (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 )} \] Input:

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

Output:

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 \] Input:

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

Output:

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} \] Input:

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

Output:

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

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} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT: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 \] Input:

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

Output:

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

Reduce [F]

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

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

Output:

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