Integrand size = 21, antiderivative size = 27 \[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\frac {2 \sqrt [4]{13} E\left (\left .\frac {1}{2} \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )\right |2\right )}{d} \] Output:
2*13^(1/4)*EllipticE(sin(1/2*c+1/2*d*x-1/2*arctan(3/2)),2^(1/2))/d
Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
Time = 0.74 (sec) , antiderivative size = 184, normalized size of antiderivative = 6.81 \[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\frac {-4 \sqrt [4]{13} \sqrt {\cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}+4 \sqrt {2 \cos (c+d x)+3 \sin (c+d x)}+\frac {3 \sqrt [4]{13} \sin \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}{\sqrt {\cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}}-\frac {3 \sqrt [4]{13} \, _2F_1\left (-\frac {1}{2},-\frac {1}{4};\frac {3}{4};\cos ^2\left (c+d x-\arctan \left (\frac {3}{2}\right )\right )\right ) \sin \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}{\sqrt {-\left (\left (-1+\cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )\right ) \cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )\right )} \sqrt {1+\cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}}}{3 d} \] Input:
Integrate[Sqrt[2*Cos[c + d*x] + 3*Sin[c + d*x]],x]
Output:
(-4*13^(1/4)*Sqrt[Cos[c + d*x - ArcTan[3/2]]] + 4*Sqrt[2*Cos[c + d*x] + 3* Sin[c + d*x]] + (3*13^(1/4)*Sin[c + d*x - ArcTan[3/2]])/Sqrt[Cos[c + d*x - ArcTan[3/2]]] - (3*13^(1/4)*HypergeometricPFQ[{-1/2, -1/4}, {3/4}, Cos[c + d*x - ArcTan[3/2]]^2]*Sin[c + d*x - ArcTan[3/2]])/(Sqrt[-((-1 + Cos[c + d*x - ArcTan[3/2]])*Cos[c + d*x - ArcTan[3/2]])]*Sqrt[1 + Cos[c + d*x - Ar cTan[3/2]]]))/(3*d)
Time = 0.22 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 3556, 3042, 3119}
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 {3 \sin (c+d x)+2 \cos (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {3 \sin (c+d x)+2 \cos (c+d x)}dx\) |
\(\Big \downarrow \) 3556 |
\(\displaystyle \sqrt [4]{13} \int \sqrt {\cos \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt [4]{13} \int \sqrt {\sin \left (c+d x-\arctan \left (\frac {3}{2}\right )+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {2 \sqrt [4]{13} E\left (\left .\frac {1}{2} \left (c+d x-\arctan \left (\frac {3}{2}\right )\right )\right |2\right )}{d}\) |
Input:
Int[Sqrt[2*Cos[c + d*x] + 3*Sin[c + d*x]],x]
Output:
(2*13^(1/4)*EllipticE[(c + d*x - ArcTan[3/2])/2, 2])/d
Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)* (c - Pi/2 + d*x), 2], x] /; FreeQ[{c, d}, x]
Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x _Symbol] :> Simp[(a^2 + b^2)^(n/2) Int[Cos[c + d*x - ArcTan[a, b]]^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && !(GeQ[n, 1] || LeQ[n, -1]) && GtQ[a^2 + b^2, 0]
Leaf count of result is larger than twice the leaf count of optimal. \(111\) vs. \(2(25)=50\).
Time = 0.45 (sec) , antiderivative size = 112, normalized size of antiderivative = 4.15
method | result | size |
default | \(-\frac {\sqrt {13}\, \sqrt {\sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )+1}\, \sqrt {-2 \sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )+2}\, \sqrt {-\sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )}\, \left (2 \operatorname {EllipticE}\left (\sqrt {\sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )+1}, \frac {\sqrt {2}}{2}\right )-\operatorname {EllipticF}\left (\sqrt {\sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )+1}, \frac {\sqrt {2}}{2}\right )\right )}{\cos \left (d x +c +\arctan \left (\frac {2}{3}\right )\right ) \sqrt {\sqrt {13}\, \sin \left (d x +c +\arctan \left (\frac {2}{3}\right )\right )}\, d}\) | \(112\) |
risch | \(-\frac {i \sqrt {2}\, \sqrt {-\left (3 i {\mathrm e}^{2 i \left (d x +c \right )}-2 \,{\mathrm e}^{2 i \left (d x +c \right )}-2-3 i\right ) {\mathrm e}^{-i \left (d x +c \right )}}}{d}+\frac {\left (12+5 i\right ) \left (\frac {\left (-\frac {4}{2197}+\frac {6 i}{2197}\right ) \left (-507 i {\mathrm e}^{2 i \left (d x +c \right )}+338 \,{\mathrm e}^{2 i \left (d x +c \right )}+338+507 i\right )}{\sqrt {{\mathrm e}^{i \left (d x +c \right )} \left (-507 i {\mathrm e}^{2 i \left (d x +c \right )}+338 \,{\mathrm e}^{2 i \left (d x +c \right )}+338+507 i\right )}}+\frac {\left (-\frac {6}{169}-\frac {4 i}{169}\right ) \sqrt {13}\, \sqrt {\left (\frac {3}{13}+\frac {2 i}{13}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+\left (\frac {3}{13}-\frac {2 i}{13}\right ) \sqrt {13}\right ) \sqrt {13}}\, \sqrt {\left (-\frac {3}{26}-\frac {i}{13}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+\left (-\frac {3}{13}+\frac {2 i}{13}\right ) \sqrt {13}\right ) \sqrt {13}}\, \sqrt {\left (-\frac {3}{13}-\frac {2 i}{13}\right ) {\mathrm e}^{i \left (d x +c \right )} \sqrt {13}}\, \left (\left (-\frac {6}{13}+\frac {4 i}{13}\right ) \sqrt {13}\, \operatorname {EllipticE}\left (\sqrt {\left (\frac {3}{13}+\frac {2 i}{13}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+\left (\frac {3}{13}-\frac {2 i}{13}\right ) \sqrt {13}\right ) \sqrt {13}}, \frac {\sqrt {2}}{2}\right )+\left (\frac {3}{13}-\frac {2 i}{13}\right ) \sqrt {13}\, \operatorname {EllipticF}\left (\sqrt {\left (\frac {3}{13}+\frac {2 i}{13}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+\left (\frac {3}{13}-\frac {2 i}{13}\right ) \sqrt {13}\right ) \sqrt {13}}, \frac {\sqrt {2}}{2}\right )\right )}{\sqrt {-3 i {\mathrm e}^{3 i \left (d x +c \right )}+2 \,{\mathrm e}^{3 i \left (d x +c \right )}+3 i {\mathrm e}^{i \left (d x +c \right )}+2 \,{\mathrm e}^{i \left (d x +c \right )}}}\right ) \sqrt {2}\, \sqrt {-\left (3 i {\mathrm e}^{2 i \left (d x +c \right )}-2 \,{\mathrm e}^{2 i \left (d x +c \right )}-2-3 i\right ) {\mathrm e}^{-i \left (d x +c \right )}}\, \sqrt {\left (26-39 i\right ) \left (13 \,{\mathrm e}^{2 i \left (d x +c \right )}-5+12 i\right ) {\mathrm e}^{i \left (d x +c \right )}}}{d \left (13 \,{\mathrm e}^{2 i \left (d x +c \right )}-5+12 i\right )}\) | \(452\) |
Input:
int((2*cos(d*x+c)+3*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
-13^(1/2)*(sin(d*x+c+arctan(2/3))+1)^(1/2)*(-2*sin(d*x+c+arctan(2/3))+2)^( 1/2)*(-sin(d*x+c+arctan(2/3)))^(1/2)*(2*EllipticE((sin(d*x+c+arctan(2/3))+ 1)^(1/2),1/2*2^(1/2))-EllipticF((sin(d*x+c+arctan(2/3))+1)^(1/2),1/2*2^(1/ 2)))/cos(d*x+c+arctan(2/3))/(13^(1/2)*sin(d*x+c+arctan(2/3)))^(1/2)/d
Result contains complex when optimal does not.
Time = 0.08 (sec) , antiderivative size = 58, normalized size of antiderivative = 2.15 \[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=-\frac {2 \, {\left (i \, \sqrt {\frac {3}{2} i + 1} {\rm weierstrassZeta}\left (\frac {48}{13} i + \frac {20}{13}, 0, {\rm weierstrassPInverse}\left (\frac {48}{13} i + \frac {20}{13}, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - i \, \sqrt {-\frac {3}{2} i + 1} {\rm weierstrassZeta}\left (-\frac {48}{13} i + \frac {20}{13}, 0, {\rm weierstrassPInverse}\left (-\frac {48}{13} i + \frac {20}{13}, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right )\right )}}{d} \] Input:
integrate((2*cos(d*x+c)+3*sin(d*x+c))^(1/2),x, algorithm="fricas")
Output:
-2*(I*sqrt(3/2*I + 1)*weierstrassZeta(48/13*I + 20/13, 0, weierstrassPInve rse(48/13*I + 20/13, 0, cos(d*x + c) - I*sin(d*x + c))) - I*sqrt(-3/2*I + 1)*weierstrassZeta(-48/13*I + 20/13, 0, weierstrassPInverse(-48/13*I + 20/ 13, 0, cos(d*x + c) + I*sin(d*x + c))))/d
\[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\int \sqrt {3 \sin {\left (c + d x \right )} + 2 \cos {\left (c + d x \right )}}\, dx \] Input:
integrate((2*cos(d*x+c)+3*sin(d*x+c))**(1/2),x)
Output:
Integral(sqrt(3*sin(c + d*x) + 2*cos(c + d*x)), x)
\[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\int { \sqrt {2 \, \cos \left (d x + c\right ) + 3 \, \sin \left (d x + c\right )} \,d x } \] Input:
integrate((2*cos(d*x+c)+3*sin(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt(2*cos(d*x + c) + 3*sin(d*x + c)), x)
\[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\int { \sqrt {2 \, \cos \left (d x + c\right ) + 3 \, \sin \left (d x + c\right )} \,d x } \] Input:
integrate((2*cos(d*x+c)+3*sin(d*x+c))^(1/2),x, algorithm="giac")
Output:
integrate(sqrt(2*cos(d*x + c) + 3*sin(d*x + c)), x)
Timed out. \[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\int \sqrt {2\,\cos \left (c+d\,x\right )+3\,\sin \left (c+d\,x\right )} \,d x \] Input:
int((2*cos(c + d*x) + 3*sin(c + d*x))^(1/2),x)
Output:
int((2*cos(c + d*x) + 3*sin(c + d*x))^(1/2), x)
\[ \int \sqrt {2 \cos (c+d x)+3 \sin (c+d x)} \, dx=\frac {-6 \sqrt {2 \cos \left (d x +c \right )+3 \sin \left (d x +c \right )}+13 \left (\int \frac {\sqrt {2 \cos \left (d x +c \right )+3 \sin \left (d x +c \right )}\, \cos \left (d x +c \right )}{2 \cos \left (d x +c \right )+3 \sin \left (d x +c \right )}d x \right ) d}{2 d} \] Input:
int((2*cos(d*x+c)+3*sin(d*x+c))^(1/2),x)
Output:
( - 6*sqrt(2*cos(c + d*x) + 3*sin(c + d*x)) + 13*int((sqrt(2*cos(c + d*x) + 3*sin(c + d*x))*cos(c + d*x))/(2*cos(c + d*x) + 3*sin(c + d*x)),x)*d)/(2 *d)