Integrand size = 17, antiderivative size = 72 \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=2 a^{3/2} B \text {arctanh}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a+a \cos (x)}}\right )+\frac {2 a^2 (4 A+3 B) \sin (x)}{3 \sqrt {a+a \cos (x)}}+\frac {2}{3} a A \sqrt {a+a \cos (x)} \sin (x) \]
2*a^(3/2)*B*arctanh(sin(x)*a^(1/2)/(a+a*cos(x))^(1/2))+2/3*a^2*(4*A+3*B)*s in(x)/(a+a*cos(x))^(1/2)+2/3*a*A*sin(x)*(a+a*cos(x))^(1/2)
Time = 0.08 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.86 \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=\frac {1}{3} a \sqrt {a (1+\cos (x))} \sec \left (\frac {x}{2}\right ) \left (3 \sqrt {2} B \text {arctanh}\left (\sqrt {2} \sin \left (\frac {x}{2}\right )\right )+2 (5 A+3 B+A \cos (x)) \sin \left (\frac {x}{2}\right )\right ) \]
(a*Sqrt[a*(1 + Cos[x])]*Sec[x/2]*(3*Sqrt[2]*B*ArcTanh[Sqrt[2]*Sin[x/2]] + 2*(5*A + 3*B + A*Cos[x])*Sin[x/2]))/3
Time = 0.59 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.04, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.588, Rules used = {3042, 3307, 3042, 3455, 27, 3042, 3460, 3042, 3252, 219}
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 (a \cos (x)+a)^{3/2} (A+B \sec (x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a \sin \left (x+\frac {\pi }{2}\right )+a\right )^{3/2} \left (A+B \csc \left (x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3307 |
\(\displaystyle \int \sec (x) (a \cos (x)+a)^{3/2} (A \cos (x)+B)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a \sin \left (x+\frac {\pi }{2}\right )+a\right )^{3/2} \left (A \sin \left (x+\frac {\pi }{2}\right )+B\right )}{\sin \left (x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3455 |
\(\displaystyle \frac {2}{3} \int \frac {1}{2} \sqrt {\cos (x) a+a} (3 a B+a (4 A+3 B) \cos (x)) \sec (x)dx+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{3} \int \sqrt {\cos (x) a+a} (3 a B+a (4 A+3 B) \cos (x)) \sec (x)dx+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \frac {\sqrt {\sin \left (x+\frac {\pi }{2}\right ) a+a} \left (3 a B+a (4 A+3 B) \sin \left (x+\frac {\pi }{2}\right )\right )}{\sin \left (x+\frac {\pi }{2}\right )}dx+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 3460 |
\(\displaystyle \frac {1}{3} \left (3 a B \int \sqrt {\cos (x) a+a} \sec (x)dx+\frac {2 a^2 (4 A+3 B) \sin (x)}{\sqrt {a \cos (x)+a}}\right )+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \left (3 a B \int \frac {\sqrt {\sin \left (x+\frac {\pi }{2}\right ) a+a}}{\sin \left (x+\frac {\pi }{2}\right )}dx+\frac {2 a^2 (4 A+3 B) \sin (x)}{\sqrt {a \cos (x)+a}}\right )+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 3252 |
\(\displaystyle \frac {1}{3} \left (\frac {2 a^2 (4 A+3 B) \sin (x)}{\sqrt {a \cos (x)+a}}-6 a^2 B \int \frac {1}{a-\frac {a^2 \sin ^2(x)}{\cos (x) a+a}}d\left (-\frac {a \sin (x)}{\sqrt {\cos (x) a+a}}\right )\right )+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {1}{3} \left (6 a^{3/2} B \text {arctanh}\left (\frac {\sqrt {a} \sin (x)}{\sqrt {a \cos (x)+a}}\right )+\frac {2 a^2 (4 A+3 B) \sin (x)}{\sqrt {a \cos (x)+a}}\right )+\frac {2}{3} a A \sin (x) \sqrt {a \cos (x)+a}\) |
(2*a*A*Sqrt[a + a*Cos[x]]*Sin[x])/3 + (6*a^(3/2)*B*ArcTanh[(Sqrt[a]*Sin[x] )/Sqrt[a + a*Cos[x]]] + (2*a^2*(4*A + 3*B)*Sin[x])/Sqrt[a + a*Cos[x]])/3
3.2.94.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/((c_.) + (d_.)*sin[(e_.) + ( f_.)*(x_)]), x_Symbol] :> Simp[-2*(b/f) Subst[Int[1/(b*c + a*d - d*x^2), x], x, b*(Cos[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*((d + c*Sin[e + f*x])^n/Sin[e + f*x]^n), x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IntegerQ [n]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-b)*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1 ) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] && !LtQ[n, -1 ] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + ( f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp [-2*b*B*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(2*n + 3)*Sqrt[a + b*Sin[e + f*x]])), x] + Simp[(A*b*d*(2*n + 3) - B*(b*c - 2*a*d*(n + 1)))/(b *d*(2*n + 3)) Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && !LtQ[n, -1]
Leaf count of result is larger than twice the leaf count of optimal. \(187\) vs. \(2(58)=116\).
Time = 2.11 (sec) , antiderivative size = 188, normalized size of antiderivative = 2.61
method | result | size |
parts | \(\frac {4 A \,a^{2} \cos \left (\frac {x}{2}\right ) \sin \left (\frac {x}{2}\right ) \left (2+\cos \left (\frac {x}{2}\right )^{2}\right ) \sqrt {2}}{3 \sqrt {a \cos \left (\frac {x}{2}\right )^{2}}}+\frac {B \sqrt {a}\, \cos \left (\frac {x}{2}\right ) \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}\, \left (2 \sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}+\ln \left (\frac {4 a \sqrt {2}\, \cos \left (\frac {x}{2}\right )+4 \sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}+8 a}{2 \cos \left (\frac {x}{2}\right )+\sqrt {2}}\right ) a +\ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {x}{2}\right )-\sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}-2 a \right )}{2 \cos \left (\frac {x}{2}\right )-\sqrt {2}}\right ) a \right )}{\sin \left (\frac {x}{2}\right ) \sqrt {a \cos \left (\frac {x}{2}\right )^{2}}}\) | \(188\) |
default | \(\frac {\sqrt {a}\, \cos \left (\frac {x}{2}\right ) \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}\, \left (-4 A \sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}\, \sin \left (\frac {x}{2}\right )^{2}+12 A \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}\, \sqrt {a}+6 B \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}\, \sqrt {a}+3 B \ln \left (\frac {4 a \sqrt {2}\, \cos \left (\frac {x}{2}\right )+4 \sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}+8 a}{2 \cos \left (\frac {x}{2}\right )+\sqrt {2}}\right ) a +3 B \ln \left (-\frac {4 \left (a \sqrt {2}\, \cos \left (\frac {x}{2}\right )-\sqrt {a}\, \sqrt {2}\, \sqrt {\sin \left (\frac {x}{2}\right )^{2} a}-2 a \right )}{2 \cos \left (\frac {x}{2}\right )-\sqrt {2}}\right ) a \right )}{3 \sin \left (\frac {x}{2}\right ) \sqrt {a \cos \left (\frac {x}{2}\right )^{2}}}\) | \(201\) |
4/3*A*a^2*cos(1/2*x)*sin(1/2*x)*(2+cos(1/2*x)^2)*2^(1/2)/(a*cos(1/2*x)^2)^ (1/2)+B*a^(1/2)*cos(1/2*x)*(sin(1/2*x)^2*a)^(1/2)*(2*a^(1/2)*2^(1/2)*(sin( 1/2*x)^2*a)^(1/2)+ln(4/(2*cos(1/2*x)+2^(1/2))*(a*2^(1/2)*cos(1/2*x)+a^(1/2 )*2^(1/2)*(sin(1/2*x)^2*a)^(1/2)+2*a))*a+ln(-4/(2*cos(1/2*x)-2^(1/2))*(a*2 ^(1/2)*cos(1/2*x)-a^(1/2)*2^(1/2)*(sin(1/2*x)^2*a)^(1/2)-2*a))*a)/sin(1/2* x)/(a*cos(1/2*x)^2)^(1/2)
Time = 0.26 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.38 \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=\frac {3 \, {\left (B a \cos \left (x\right ) + B a\right )} \sqrt {a} \log \left (\frac {a \cos \left (x\right )^{3} - 7 \, a \cos \left (x\right )^{2} - 4 \, \sqrt {a \cos \left (x\right ) + a} \sqrt {a} {\left (\cos \left (x\right ) - 2\right )} \sin \left (x\right ) + 8 \, a}{\cos \left (x\right )^{3} + \cos \left (x\right )^{2}}\right ) + 4 \, {\left (A a \cos \left (x\right ) + {\left (5 \, A + 3 \, B\right )} a\right )} \sqrt {a \cos \left (x\right ) + a} \sin \left (x\right )}{6 \, {\left (\cos \left (x\right ) + 1\right )}} \]
1/6*(3*(B*a*cos(x) + B*a)*sqrt(a)*log((a*cos(x)^3 - 7*a*cos(x)^2 - 4*sqrt( a*cos(x) + a)*sqrt(a)*(cos(x) - 2)*sin(x) + 8*a)/(cos(x)^3 + cos(x)^2)) + 4*(A*a*cos(x) + (5*A + 3*B)*a)*sqrt(a*cos(x) + a)*sin(x))/(cos(x) + 1)
\[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=\int \left (a \left (\cos {\left (x \right )} + 1\right )\right )^{\frac {3}{2}} \left (A + B \sec {\left (x \right )}\right )\, dx \]
Time = 0.32 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.36 \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=\frac {1}{3} \, {\left (\sqrt {2} a \sin \left (\frac {3}{2} \, x\right ) + 9 \, \sqrt {2} a \sin \left (\frac {1}{2} \, x\right )\right )} A \sqrt {a} \]
Time = 0.28 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.28 \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=-\frac {1}{6} \, \sqrt {2} {\left (8 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \sin \left (\frac {1}{2} \, x\right )^{3} + 3 \, \sqrt {2} B a \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, x\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (\frac {1}{2} \, x\right ) \right |}}\right ) \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) - 24 \, A a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \sin \left (\frac {1}{2} \, x\right ) - 12 \, B a \mathrm {sgn}\left (\cos \left (\frac {1}{2} \, x\right )\right ) \sin \left (\frac {1}{2} \, x\right )\right )} \sqrt {a} \]
-1/6*sqrt(2)*(8*A*a*sgn(cos(1/2*x))*sin(1/2*x)^3 + 3*sqrt(2)*B*a*log(abs(- 2*sqrt(2) + 4*sin(1/2*x))/abs(2*sqrt(2) + 4*sin(1/2*x)))*sgn(cos(1/2*x)) - 24*A*a*sgn(cos(1/2*x))*sin(1/2*x) - 12*B*a*sgn(cos(1/2*x))*sin(1/2*x))*sq rt(a)
Timed out. \[ \int (a+a \cos (x))^{3/2} (A+B \sec (x)) \, dx=\int {\left (a+a\,\cos \left (x\right )\right )}^{3/2}\,\left (A+\frac {B}{\cos \left (x\right )}\right ) \,d x \]