Integrand size = 23, antiderivative size = 63 \[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}+\frac {2 a \sqrt {e \cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d \sqrt {\cos (c+d x)}} \] Output:
-2/3*b*(e*cos(d*x+c))^(3/2)/d/e+2*a*(e*cos(d*x+c))^(1/2)*EllipticE(sin(1/2 *d*x+1/2*c),2^(1/2))/d/cos(d*x+c)^(1/2)
Time = 0.31 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.89 \[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=-\frac {2 \sqrt {e \cos (c+d x)} \left (b \cos ^{\frac {3}{2}}(c+d x)-3 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{3 d \sqrt {\cos (c+d x)}} \] Input:
Integrate[Sqrt[e*Cos[c + d*x]]*(a + b*Sin[c + d*x]),x]
Output:
(-2*Sqrt[e*Cos[c + d*x]]*(b*Cos[c + d*x]^(3/2) - 3*a*EllipticE[(c + d*x)/2 , 2]))/(3*d*Sqrt[Cos[c + d*x]])
Time = 0.34 (sec) , antiderivative size = 63, 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.261, Rules used = {3042, 3148, 3042, 3121, 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 {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x))dx\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle a \int \sqrt {e \cos (c+d x)}dx-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a \int \sqrt {e \sin \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}\) |
\(\Big \downarrow \) 3121 |
\(\displaystyle \frac {a \sqrt {e \cos (c+d x)} \int \sqrt {\cos (c+d x)}dx}{\sqrt {\cos (c+d x)}}-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a \sqrt {e \cos (c+d x)} \int \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{\sqrt {\cos (c+d x)}}-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}\) |
\(\Big \downarrow \) 3119 |
\(\displaystyle \frac {2 a E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {e \cos (c+d x)}}{d \sqrt {\cos (c+d x)}}-\frac {2 b (e \cos (c+d x))^{3/2}}{3 d e}\) |
Input:
Int[Sqrt[e*Cos[c + d*x]]*(a + b*Sin[c + d*x]),x]
Output:
(-2*b*(e*Cos[c + d*x])^(3/2))/(3*d*e) + (2*a*Sqrt[e*Cos[c + d*x]]*Elliptic E[(c + d*x)/2, 2])/(d*Sqrt[Cos[c + d*x]])
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[((b_)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*Sin[c + d*x]) ^n/Sin[c + d*x]^n Int[Sin[c + d*x]^n, x], x] /; FreeQ[{b, c, d}, x] && Lt Q[-1, n, 1] && IntegerQ[2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(122\) vs. \(2(57)=114\).
Time = 0.91 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.95
method | result | size |
default | \(\frac {2 e \left (-4 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+3 \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) a +4 b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-b \sin \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} e +e}\, d}\) | \(123\) |
parts | \(\frac {2 a \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, e \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )}{\sqrt {-e \left (2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}-\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {e \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\, d}-\frac {2 b \left (e \cos \left (d x +c \right )\right )^{\frac {3}{2}}}{3 d e}\) | \(163\) |
Input:
int((e*cos(d*x+c))^(1/2)*(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
2/3/sin(1/2*d*x+1/2*c)/(-2*sin(1/2*d*x+1/2*c)^2*e+e)^(1/2)*e*(-4*b*sin(1/2 *d*x+1/2*c)^5+3*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1 /2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))*a+4*b*sin(1/2*d*x+1/2*c)^3-b*sin (1/2*d*x+1/2*c))/d
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.33 \[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=-\frac {2 \, {\left (-3 i \, \sqrt {\frac {1}{2}} a \sqrt {e} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {\frac {1}{2}} a \sqrt {e} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \sqrt {e \cos \left (d x + c\right )} b \cos \left (d x + c\right )\right )}}{3 \, d} \] Input:
integrate((e*cos(d*x+c))^(1/2)*(a+b*sin(d*x+c)),x, algorithm="fricas")
Output:
-2/3*(-3*I*sqrt(1/2)*a*sqrt(e)*weierstrassZeta(-4, 0, weierstrassPInverse( -4, 0, cos(d*x + c) + I*sin(d*x + c))) + 3*I*sqrt(1/2)*a*sqrt(e)*weierstra ssZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) + sqrt(e*cos(d*x + c))*b*cos(d*x + c))/d
\[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=\int \sqrt {e \cos {\left (c + d x \right )}} \left (a + b \sin {\left (c + d x \right )}\right )\, dx \] Input:
integrate((e*cos(d*x+c))**(1/2)*(a+b*sin(d*x+c)),x)
Output:
Integral(sqrt(e*cos(c + d*x))*(a + b*sin(c + d*x)), x)
\[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=\int { \sqrt {e \cos \left (d x + c\right )} {\left (b \sin \left (d x + c\right ) + a\right )} \,d x } \] Input:
integrate((e*cos(d*x+c))^(1/2)*(a+b*sin(d*x+c)),x, algorithm="maxima")
Output:
integrate(sqrt(e*cos(d*x + c))*(b*sin(d*x + c) + a), x)
\[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=\int { \sqrt {e \cos \left (d x + c\right )} {\left (b \sin \left (d x + c\right ) + a\right )} \,d x } \] Input:
integrate((e*cos(d*x+c))^(1/2)*(a+b*sin(d*x+c)),x, algorithm="giac")
Output:
integrate(sqrt(e*cos(d*x + c))*(b*sin(d*x + c) + a), x)
Timed out. \[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=\int \sqrt {e\,\cos \left (c+d\,x\right )}\,\left (a+b\,\sin \left (c+d\,x\right )\right ) \,d x \] Input:
int((e*cos(c + d*x))^(1/2)*(a + b*sin(c + d*x)),x)
Output:
int((e*cos(c + d*x))^(1/2)*(a + b*sin(c + d*x)), x)
\[ \int \sqrt {e \cos (c+d x)} (a+b \sin (c+d x)) \, dx=\frac {\sqrt {e}\, \left (-2 \sqrt {\cos \left (d x +c \right )}\, \cos \left (d x +c \right ) b +3 \left (\int \sqrt {\cos \left (d x +c \right )}d x \right ) a d \right )}{3 d} \] Input:
int((e*cos(d*x+c))^(1/2)*(a+b*sin(d*x+c)),x)
Output:
(sqrt(e)*( - 2*sqrt(cos(c + d*x))*cos(c + d*x)*b + 3*int(sqrt(cos(c + d*x) ),x)*a*d))/(3*d)