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

Optimal result
Mathematica [C] (verified)
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 = 32, antiderivative size = 55 \[ \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] (verified)

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

Time = 16.11 (sec) , antiderivative size = 565, normalized size of antiderivative = 10.27 \[ \int \sqrt {\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {4 i (b+i c) \left (2 b^4+3 b^2 c^2+c^4-2 b^3 \sqrt {b^2+c^2}-2 b c^2 \sqrt {b^2+c^2}+b \left (-2 b^3-2 b c^2+2 b^2 \sqrt {b^2+c^2}+c^2 \sqrt {b^2+c^2}\right ) \cos (d+e x)+(i b+c) E\left (\left .\arcsin \left (\sqrt {\frac {\left (-b-i c+\sqrt {b^2+c^2}\right ) (\cos (d+e x)-i \sin (d+e x))}{-b+i c+\sqrt {b^2+c^2}}}\right )\right |1\right ) \left (\cos \left (\frac {1}{2} (d+e x)\right )+i \sin \left (\frac {1}{2} (d+e x)\right )\right ) \left (c \left (2 b^2+i b c+c^2-2 b \sqrt {b^2+c^2}-i c \sqrt {b^2+c^2}\right ) \cos \left (\frac {1}{2} (d+e x)\right )+\left (-4 b^3+b c \left (-3 c+2 i \sqrt {b^2+c^2}\right )+c^2 \left (-i c+\sqrt {b^2+c^2}\right )+b^2 \left (-2 i c+4 \sqrt {b^2+c^2}\right )\right ) \sin \left (\frac {1}{2} (d+e x)\right )\right ) \sqrt {\frac {\left (-b-i c+\sqrt {b^2+c^2}\right ) (\cos (d+e x)-i \sin (d+e x))}{-b+i c+\sqrt {b^2+c^2}}}-2 b^3 c \sin (d+e x)-2 b c^3 \sin (d+e x)+2 b^2 c \sqrt {b^2+c^2} \sin (d+e x)+c^3 \sqrt {b^2+c^2} \sin (d+e x)\right )}{\left (b+i c-\sqrt {b^2+c^2}\right )^2 \left (b^2+c^2-b \sqrt {b^2+c^2}\right ) e \sqrt {\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)}} \] Input:

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

Output:

((4*I)*(b + I*c)*(2*b^4 + 3*b^2*c^2 + c^4 - 2*b^3*Sqrt[b^2 + c^2] - 2*b*c^ 
2*Sqrt[b^2 + c^2] + b*(-2*b^3 - 2*b*c^2 + 2*b^2*Sqrt[b^2 + c^2] + c^2*Sqrt 
[b^2 + c^2])*Cos[d + e*x] + (I*b + c)*EllipticE[ArcSin[Sqrt[((-b - I*c + S 
qrt[b^2 + c^2])*(Cos[d + e*x] - I*Sin[d + e*x]))/(-b + I*c + Sqrt[b^2 + c^ 
2])]], 1]*(Cos[(d + e*x)/2] + I*Sin[(d + e*x)/2])*(c*(2*b^2 + I*b*c + c^2 
- 2*b*Sqrt[b^2 + c^2] - I*c*Sqrt[b^2 + c^2])*Cos[(d + e*x)/2] + (-4*b^3 + 
b*c*(-3*c + (2*I)*Sqrt[b^2 + c^2]) + c^2*((-I)*c + Sqrt[b^2 + c^2]) + b^2* 
((-2*I)*c + 4*Sqrt[b^2 + c^2]))*Sin[(d + e*x)/2])*Sqrt[((-b - I*c + Sqrt[b 
^2 + c^2])*(Cos[d + e*x] - I*Sin[d + e*x]))/(-b + I*c + Sqrt[b^2 + c^2])] 
- 2*b^3*c*Sin[d + e*x] - 2*b*c^3*Sin[d + e*x] + 2*b^2*c*Sqrt[b^2 + c^2]*Si 
n[d + e*x] + c^3*Sqrt[b^2 + c^2]*Sin[d + e*x]))/((b + I*c - Sqrt[b^2 + c^2 
])^2*(b^2 + c^2 - b*Sqrt[b^2 + c^2])*e*Sqrt[Sqrt[b^2 + c^2] + b*Cos[d + e* 
x] + c*Sin[d + e*x]])
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 55, 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.062, 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. \(112\) vs. \(2(51)=102\).

Time = 0.68 (sec) , antiderivative size = 113, 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}\) \(113\)
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}\) \(211\)

Input:

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

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.07 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.45 \[ \int \sqrt {\sqrt {b^2+c^2}+b \cos (d+e x)+c \sin (d+e x)} \, dx=\frac {2 \, \sqrt {b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) + \sqrt {b^{2} + c^{2}}} {\left (b \cos \left (e x + d\right ) + c \sin \left (e x + d\right ) - \sqrt {b^{2} + c^{2}}\right )}}{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*sqrt(b*cos(e*x + d) + c*sin(e*x + d) + sqrt(b^2 + c^2))*(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)