Integrand size = 25, antiderivative size = 79 \[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\frac {E\left (e+f x+\tan ^{-1}(b,c)|-\frac {b^2+c^2}{a}\right ) \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2}}{f \sqrt {1+\frac {(c \cos (e+f x)+b \sin (e+f x))^2}{a}}} \] Output:
EllipticE(sin(e+f*x+arctan(c,b)),(-(b^2+c^2)/a)^(1/2))*(a+(c*cos(f*x+e)+b* sin(f*x+e))^2)^(1/2)/f/(1+(c*cos(f*x+e)+b*sin(f*x+e))^2/a)^(1/2)
Leaf count is larger than twice the leaf count of optimal. \(325\) vs. \(2(79)=158\).
Time = 2.29 (sec) , antiderivative size = 325, normalized size of antiderivative = 4.11 \[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=-\frac {E\left (\arcsin \left (\frac {\sqrt {\frac {\sqrt {\left (b^2+c^2\right )^2}+\left (b^2-c^2\right ) \cos (2 (e+f x))-2 b c \sin (2 (e+f x))}{\sqrt {\left (b^2+c^2\right )^2}}}}{\sqrt {2}}\right )|\frac {2 \sqrt {\left (b^2+c^2\right )^2}}{2 a+b^2+c^2+\sqrt {\left (b^2+c^2\right )^2}}\right ) \sqrt {2 a+b^2+c^2+\left (-b^2+c^2\right ) \cos (2 (e+f x))+2 b c \sin (2 (e+f x))} \left (2 b c \cos (2 (e+f x))+\left (b^2-c^2\right ) \sin (2 (e+f x))\right )}{\sqrt {2} \sqrt {\left (b^2+c^2\right )^2} f \sqrt {\frac {2 a+b^2+c^2+\left (-b^2+c^2\right ) \cos (2 (e+f x))+2 b c \sin (2 (e+f x))}{2 a+b^2+c^2+\sqrt {\left (b^2+c^2\right )^2}}} \sqrt {\frac {\left (2 b c \cos (2 (e+f x))+\left (b^2-c^2\right ) \sin (2 (e+f x))\right )^2}{\left (b^2+c^2\right )^2}}} \] Input:
Integrate[Sqrt[a + (c*Cos[e + f*x] + b*Sin[e + f*x])^2],x]
Output:
-((EllipticE[ArcSin[Sqrt[(Sqrt[(b^2 + c^2)^2] + (b^2 - c^2)*Cos[2*(e + f*x )] - 2*b*c*Sin[2*(e + f*x)])/Sqrt[(b^2 + c^2)^2]]/Sqrt[2]], (2*Sqrt[(b^2 + c^2)^2])/(2*a + b^2 + c^2 + Sqrt[(b^2 + c^2)^2])]*Sqrt[2*a + b^2 + c^2 + (-b^2 + c^2)*Cos[2*(e + f*x)] + 2*b*c*Sin[2*(e + f*x)]]*(2*b*c*Cos[2*(e + f*x)] + (b^2 - c^2)*Sin[2*(e + f*x)]))/(Sqrt[2]*Sqrt[(b^2 + c^2)^2]*f*Sqrt [(2*a + b^2 + c^2 + (-b^2 + c^2)*Cos[2*(e + f*x)] + 2*b*c*Sin[2*(e + f*x)] )/(2*a + b^2 + c^2 + Sqrt[(b^2 + c^2)^2])]*Sqrt[(2*b*c*Cos[2*(e + f*x)] + (b^2 - c^2)*Sin[2*(e + f*x)])^2/(b^2 + c^2)^2]))
Time = 0.46 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3042, 3720, 3042, 3719, 3042, 3656}
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 {a+(b \sin (e+f x)+c \cos (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2}dx\) |
\(\Big \downarrow \) 3720 |
\(\displaystyle \frac {\sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2} \int \sqrt {\frac {(c \cos (e+f x)+b \sin (e+f x))^2}{a}+1}dx}{\sqrt {\frac {(b \sin (e+f x)+c \cos (e+f x))^2}{a}+1}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2} \int \sqrt {\frac {(c \cos (e+f x)+b \sin (e+f x))^2}{a}+1}dx}{\sqrt {\frac {(b \sin (e+f x)+c \cos (e+f x))^2}{a}+1}}\) |
\(\Big \downarrow \) 3719 |
\(\displaystyle \frac {\sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2} \int \sqrt {\frac {\left (b^2+c^2\right ) \sin ^2\left (e+f x+\tan ^{-1}(b,c)\right )}{a}+1}dx}{\sqrt {\frac {(b \sin (e+f x)+c \cos (e+f x))^2}{a}+1}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2} \int \sqrt {\frac {\left (b^2+c^2\right ) \sin \left (e+f x+\tan ^{-1}(b,c)\right )^2}{a}+1}dx}{\sqrt {\frac {(b \sin (e+f x)+c \cos (e+f x))^2}{a}+1}}\) |
\(\Big \downarrow \) 3656 |
\(\displaystyle \frac {\sqrt {a+(b \sin (e+f x)+c \cos (e+f x))^2} E\left (e+f x+\tan ^{-1}(b,c)|-\frac {b^2+c^2}{a}\right )}{f \sqrt {\frac {(b \sin (e+f x)+c \cos (e+f x))^2}{a}+1}}\) |
Input:
Int[Sqrt[a + (c*Cos[e + f*x] + b*Sin[e + f*x])^2],x]
Output:
(EllipticE[e + f*x + ArcTan[b, c], -((b^2 + c^2)/a)]*Sqrt[a + (c*Cos[e + f *x] + b*Sin[e + f*x])^2])/(f*Sqrt[1 + (c*Cos[e + f*x] + b*Sin[e + f*x])^2/ a])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2], x_Symbol] :> Simp[(Sqrt[a ]/f)*EllipticE[e + f*x, -b/a], x] /; FreeQ[{a, b, e, f}, x] && GtQ[a, 0]
Int[((a_) + (b_.)*(cos[(e_.) + (f_.)*(x_)]*(d_.) + (c_.)*sin[(e_.) + (f_.)* (x_)])^2)^(p_), x_Symbol] :> Int[(a + b*(Sqrt[c^2 + d^2]*Sin[ArcTan[c, d] + e + f*x])^2)^p, x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[p^2, 1/4] && GtQ [a, 0]
Int[((a_) + (b_.)*(cos[(e_.) + (f_.)*(x_)]*(d_.) + (c_.)*sin[(e_.) + (f_.)* (x_)])^2)^(p_), x_Symbol] :> Simp[(a + b*(c*Sin[e + f*x] + d*Cos[e + f*x])^ 2)^p/(1 + (b*(c*Sin[e + f*x] + d*Cos[e + f*x])^2)/a)^p Int[(1 + (b*(c*Sin [e + f*x] + d*Cos[e + f*x])^2)/a)^p, x], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[p^2, 1/4] && !GtQ[a, 0]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 5.74 (sec) , antiderivative size = 192065, normalized size of antiderivative = 2431.20
Input:
int((a+(c*cos(f*x+e)+b*sin(f*x+e))^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
result too large to display
\[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int { \sqrt {{\left (c \cos \left (f x + e\right ) + b \sin \left (f x + e\right )\right )}^{2} + a} \,d x } \] Input:
integrate((a+(c*cos(f*x+e)+b*sin(f*x+e))^2)^(1/2),x, algorithm="fricas")
Output:
integral(sqrt(2*b*c*cos(f*x + e)*sin(f*x + e) - (b^2 - c^2)*cos(f*x + e)^2 + b^2 + a), x)
\[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int \sqrt {a + \left (b \sin {\left (e + f x \right )} + c \cos {\left (e + f x \right )}\right )^{2}}\, dx \] Input:
integrate((a+(c*cos(f*x+e)+b*sin(f*x+e))**2)**(1/2),x)
Output:
Integral(sqrt(a + (b*sin(e + f*x) + c*cos(e + f*x))**2), x)
\[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int { \sqrt {{\left (c \cos \left (f x + e\right ) + b \sin \left (f x + e\right )\right )}^{2} + a} \,d x } \] Input:
integrate((a+(c*cos(f*x+e)+b*sin(f*x+e))^2)^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt((c*cos(f*x + e) + b*sin(f*x + e))^2 + a), x)
\[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int { \sqrt {{\left (c \cos \left (f x + e\right ) + b \sin \left (f x + e\right )\right )}^{2} + a} \,d x } \] Input:
integrate((a+(c*cos(f*x+e)+b*sin(f*x+e))^2)^(1/2),x, algorithm="giac")
Output:
integrate(sqrt((c*cos(f*x + e) + b*sin(f*x + e))^2 + a), x)
Timed out. \[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int \sqrt {a+{\left (c\,\cos \left (e+f\,x\right )+b\,\sin \left (e+f\,x\right )\right )}^2} \,d x \] Input:
int((a + (c*cos(e + f*x) + b*sin(e + f*x))^2)^(1/2),x)
Output:
int((a + (c*cos(e + f*x) + b*sin(e + f*x))^2)^(1/2), x)
\[ \int \sqrt {a+(c \cos (e+f x)+b \sin (e+f x))^2} \, dx=\int \sqrt {\cos \left (f x +e \right )^{2} c^{2}+2 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b c +\sin \left (f x +e \right )^{2} b^{2}+a}d x \] Input:
int((a+(c*cos(f*x+e)+b*sin(f*x+e))^2)^(1/2),x)
Output:
int(sqrt(cos(e + f*x)**2*c**2 + 2*cos(e + f*x)*sin(e + f*x)*b*c + sin(e + f*x)**2*b**2 + a),x)