Integrand size = 43, antiderivative size = 120 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=-\frac {(A-2 B) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}+\frac {\sqrt {2} (A-B+C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}+\frac {A \tan (c+d x)}{d \sqrt {a+a \cos (c+d x)}} \] Output:
-(A-2*B)*arctanh(a^(1/2)*sin(d*x+c)/(a+a*cos(d*x+c))^(1/2))/a^(1/2)/d+2^(1 /2)*(A-B+C)*arctanh(1/2*a^(1/2)*sin(d*x+c)*2^(1/2)/(a+a*cos(d*x+c))^(1/2)) /a^(1/2)/d+A*tan(d*x+c)/d/(a+a*cos(d*x+c))^(1/2)
Time = 0.58 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.80 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \left (2 (A-B+C) \text {arctanh}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\sqrt {2} (A-2 B) \text {arctanh}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )+2 A \sec (c+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{d \sqrt {a (1+\cos (c+d x))}} \] Input:
Integrate[((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^2)/Sqrt[a + a*Cos[c + d*x]],x]
Output:
(Cos[(c + d*x)/2]*(2*(A - B + C)*ArcTanh[Sin[(c + d*x)/2]] - Sqrt[2]*(A - 2*B)*ArcTanh[Sqrt[2]*Sin[(c + d*x)/2]] + 2*A*Sec[c + d*x]*Sin[(c + d*x)/2] ))/(d*Sqrt[a*(1 + Cos[c + d*x])])
Time = 0.81 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.08, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {3042, 3522, 27, 3042, 3464, 3042, 3128, 219, 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 \frac {\sec ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{\sqrt {a \cos (c+d x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \sqrt {a \sin \left (c+d x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 3522 |
\(\displaystyle \frac {\int -\frac {(a (A-2 B)-a (A+2 C) \cos (c+d x)) \sec (c+d x)}{2 \sqrt {\cos (c+d x) a+a}}dx}{a}+\frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\int \frac {(a (A-2 B)-a (A+2 C) \cos (c+d x)) \sec (c+d x)}{\sqrt {\cos (c+d x) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\int \frac {a (A-2 B)-a (A+2 C) \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) \sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 3464 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {(A-2 B) \int \sqrt {\cos (c+d x) a+a} \sec (c+d x)dx-2 a (A-B+C) \int \frac {1}{\sqrt {\cos (c+d x) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {(A-2 B) \int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx-2 a (A-B+C) \int \frac {1}{\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}dx}{2 a}\) |
\(\Big \downarrow \) 3128 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\frac {4 a (A-B+C) \int \frac {1}{2 a-\frac {a^2 \sin ^2(c+d x)}{\cos (c+d x) a+a}}d\left (-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x) a+a}}\right )}{d}+(A-2 B) \int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx}{2 a}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {(A-2 B) \int \frac {\sqrt {\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx-\frac {2 \sqrt {2} \sqrt {a} (A-B+C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 3252 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {-\frac {2 a (A-2 B) \int \frac {1}{a-\frac {a^2 \sin ^2(c+d x)}{\cos (c+d x) a+a}}d\left (-\frac {a \sin (c+d x)}{\sqrt {\cos (c+d x) a+a}}\right )}{d}-\frac {2 \sqrt {2} \sqrt {a} (A-B+C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {A \tan (c+d x)}{d \sqrt {a \cos (c+d x)+a}}-\frac {\frac {2 \sqrt {a} (A-2 B) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d}-\frac {2 \sqrt {2} \sqrt {a} (A-B+C) \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{d}}{2 a}\) |
Input:
Int[((A + B*Cos[c + d*x] + C*Cos[c + d*x]^2)*Sec[c + d*x]^2)/Sqrt[a + a*Co s[c + d*x]],x]
Output:
-1/2*((2*Sqrt[a]*(A - 2*B)*ArcTanh[(Sqrt[a]*Sin[c + d*x])/Sqrt[a + a*Cos[c + d*x]]])/d - (2*Sqrt[2]*Sqrt[a]*(A - B + C)*ArcTanh[(Sqrt[a]*Sin[c + d*x ])/(Sqrt[2]*Sqrt[a + a*Cos[c + d*x]])])/d)/a + (A*Tan[c + d*x])/(d*Sqrt[a + a*Cos[c + d*x]])
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[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2/d Subst[Int[1/(2*a - x^2), x], x, b*(Cos[c + d*x]/Sqrt[a + b*Sin[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 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[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(A *b - a*B)/(b*c - a*d) Int[1/Sqrt[a + b*Sin[e + f*x]], x], x] + Simp[(B*c - A*d)/(b*c - a*d) Int[Sqrt[a + b*Sin[e + f*x]]/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C - B*c*d + A*d^2))*Cos[e + f*x ]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Simp[1/(b*d*(n + 1)*(c^2 - d^2)) Int[(a + b*Sin[e + f*x])^m* (c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(a*d*m + b*c*(n + 1)) + (c*C - B*d)*( a*c*m + b*d*(n + 1)) + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2* (n + 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && !LtQ [m, -2^(-1)] && (LtQ[n, -1] || EqQ[m + n + 2, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(794\) vs. \(2(103)=206\).
Time = 0.74 (sec) , antiderivative size = 795, normalized size of antiderivative = 6.62
method | result | size |
parts | \(\text {Expression too large to display}\) | \(795\) |
default | \(\text {Expression too large to display}\) | \(908\) |
Input:
int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^2/(a+a*cos(d*x+c))^(1/2),x, method=_RETURNVERBOSE)
Output:
A*cos(1/2*d*x+1/2*c)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)*(2*a*(-2*2^(1/2)*ln(4/ cos(1/2*d*x+1/2*c)*(a^(1/2)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)+a))+ln(-4/(2*co s(1/2*d*x+1/2*c)-2^(1/2))*(a*2^(1/2)*cos(1/2*d*x+1/2*c)-a^(1/2)*2^(1/2)*(s in(1/2*d*x+1/2*c)^2*a)^(1/2)-2*a))+ln(4/(2*cos(1/2*d*x+1/2*c)+2^(1/2))*(a* 2^(1/2)*cos(1/2*d*x+1/2*c)+a^(1/2)*2^(1/2)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)+ 2*a)))*sin(1/2*d*x+1/2*c)^2+2*2^(1/2)*ln(4/cos(1/2*d*x+1/2*c)*(a^(1/2)*(si n(1/2*d*x+1/2*c)^2*a)^(1/2)+a))*a+2*a^(1/2)*2^(1/2)*(sin(1/2*d*x+1/2*c)^2* a)^(1/2)-ln(-4/(2*cos(1/2*d*x+1/2*c)-2^(1/2))*(a*2^(1/2)*cos(1/2*d*x+1/2*c )-a^(1/2)*2^(1/2)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)-2*a))*a-ln(4/(2*cos(1/2*d *x+1/2*c)+2^(1/2))*(a*2^(1/2)*cos(1/2*d*x+1/2*c)+a^(1/2)*2^(1/2)*(sin(1/2* d*x+1/2*c)^2*a)^(1/2)+2*a))*a)/a^(3/2)/(2*cos(1/2*d*x+1/2*c)-2^(1/2))/(2*c os(1/2*d*x+1/2*c)+2^(1/2))/sin(1/2*d*x+1/2*c)/(a*cos(1/2*d*x+1/2*c)^2)^(1/ 2)/d+1/2*B*cos(1/2*d*x+1/2*c)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)*(2^(1/2)*ln(- 2/(2*cos(1/2*d*x+1/2*c)-2^(1/2))*(a*2^(1/2)*cos(1/2*d*x+1/2*c)-a^(1/2)*2^( 1/2)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)-2*a))+2^(1/2)*ln(2/(2*cos(1/2*d*x+1/2* c)+2^(1/2))*(a*2^(1/2)*cos(1/2*d*x+1/2*c)+a^(1/2)*2^(1/2)*(sin(1/2*d*x+1/2 *c)^2*a)^(1/2)+2*a))-2*ln(2/cos(1/2*d*x+1/2*c)*(a^(1/2)*(sin(1/2*d*x+1/2*c )^2*a)^(1/2)+a)))/a^(1/2)/sin(1/2*d*x+1/2*c)*2^(1/2)/(a*cos(1/2*d*x+1/2*c) ^2)^(1/2)/d+C*cos(1/2*d*x+1/2*c)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)/a^(1/2)*ln (2/cos(1/2*d*x+1/2*c)*(a^(1/2)*(sin(1/2*d*x+1/2*c)^2*a)^(1/2)+a))/sin(1...
Leaf count of result is larger than twice the leaf count of optimal. 261 vs. \(2 (103) = 206\).
Time = 0.13 (sec) , antiderivative size = 261, normalized size of antiderivative = 2.18 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=-\frac {{\left ({\left (A - 2 \, B\right )} \cos \left (d x + c\right )^{2} + {\left (A - 2 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} A \sin \left (d x + c\right ) - \frac {2 \, \sqrt {2} {\left ({\left (A - B + C\right )} a \cos \left (d x + c\right )^{2} + {\left (A - B + C\right )} a \cos \left (d x + c\right )\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} - \frac {2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}}}{4 \, {\left (a d \cos \left (d x + c\right )^{2} + a d \cos \left (d x + c\right )\right )}} \] Input:
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^2/(a+a*cos(d*x+c))^(1 /2),x, algorithm="fricas")
Output:
-1/4*(((A - 2*B)*cos(d*x + c)^2 + (A - 2*B)*cos(d*x + c))*sqrt(a)*log((a*c os(d*x + c)^3 - 7*a*cos(d*x + c)^2 - 4*sqrt(a*cos(d*x + c) + a)*sqrt(a)*(c os(d*x + c) - 2)*sin(d*x + c) + 8*a)/(cos(d*x + c)^3 + cos(d*x + c)^2)) - 4*sqrt(a*cos(d*x + c) + a)*A*sin(d*x + c) - 2*sqrt(2)*((A - B + C)*a*cos(d *x + c)^2 + (A - B + C)*a*cos(d*x + c))*log(-(cos(d*x + c)^2 - 2*sqrt(2)*s qrt(a*cos(d*x + c) + a)*sin(d*x + c)/sqrt(a) - 2*cos(d*x + c) - 3)/(cos(d* x + c)^2 + 2*cos(d*x + c) + 1))/sqrt(a))/(a*d*cos(d*x + c)^2 + a*d*cos(d*x + c))
\[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\int \frac {\left (A + B \cos {\left (c + d x \right )} + C \cos ^{2}{\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}}\, dx \] Input:
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)**2)*sec(d*x+c)**2/(a+a*cos(d*x+c))* *(1/2),x)
Output:
Integral((A + B*cos(c + d*x) + C*cos(c + d*x)**2)*sec(c + d*x)**2/sqrt(a*( cos(c + d*x) + 1)), x)
Leaf count of result is larger than twice the leaf count of optimal. 18526 vs. \(2 (103) = 206\).
Time = 0.46 (sec) , antiderivative size = 18526, normalized size of antiderivative = 154.38 \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\text {Too large to display} \] Input:
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^2/(a+a*cos(d*x+c))^(1 /2),x, algorithm="maxima")
Output:
1/4*(2*(sqrt(2)*log(cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 + 2*si n(1/2*d*x + 1/2*c) + 1) - sqrt(2)*log(cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 - 2*sin(1/2*d*x + 1/2*c) + 1))*C/sqrt(a) + ((2*sqrt(2)*log(cos (1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c) + 1) - 2*sqrt(2)*log(cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 - 2*sin(1 /2*d*x + 1/2*c) + 1) - log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2* c)^2 + 2*sqrt(2)*cos(1/2*d*x + 1/2*c) + 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2 ) + log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 + 2*sqrt(2)*co s(1/2*d*x + 1/2*c) - 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) - log(2*cos(1/2*d *x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 - 2*sqrt(2)*cos(1/2*d*x + 1/2*c) + 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) + log(2*cos(1/2*d*x + 1/2*c)^2 + 2*s in(1/2*d*x + 1/2*c)^2 - 2*sqrt(2)*cos(1/2*d*x + 1/2*c) - 2*sqrt(2)*sin(1/2 *d*x + 1/2*c) + 2))*cos(d*x + c)^4 + (2*sqrt(2)*log(cos(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c) + 1) - 2*sqrt(2)*log(co s(1/2*d*x + 1/2*c)^2 + sin(1/2*d*x + 1/2*c)^2 - 2*sin(1/2*d*x + 1/2*c) + 1 ) - log(2*cos(1/2*d*x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 + 2*sqrt(2)*co s(1/2*d*x + 1/2*c) + 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) + log(2*cos(1/2*d *x + 1/2*c)^2 + 2*sin(1/2*d*x + 1/2*c)^2 + 2*sqrt(2)*cos(1/2*d*x + 1/2*c) - 2*sqrt(2)*sin(1/2*d*x + 1/2*c) + 2) - log(2*cos(1/2*d*x + 1/2*c)^2 + 2*s in(1/2*d*x + 1/2*c)^2 - 2*sqrt(2)*cos(1/2*d*x + 1/2*c) + 2*sqrt(2)*sin(...
Exception generated. \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^2/(a+a*cos(d*x+c))^(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
Timed out. \[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\int \frac {C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A}{{\cos \left (c+d\,x\right )}^2\,\sqrt {a+a\,\cos \left (c+d\,x\right )}} \,d x \] Input:
int((A + B*cos(c + d*x) + C*cos(c + d*x)^2)/(cos(c + d*x)^2*(a + a*cos(c + d*x))^(1/2)),x)
Output:
int((A + B*cos(c + d*x) + C*cos(c + d*x)^2)/(cos(c + d*x)^2*(a + a*cos(c + d*x))^(1/2)), x)
\[ \int \frac {\left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right ) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx=\frac {\sqrt {a}\, \left (\left (\int \frac {\sqrt {\cos \left (d x +c \right )+1}\, \cos \left (d x +c \right ) \sec \left (d x +c \right )^{2}}{\cos \left (d x +c \right )+1}d x \right ) b +\left (\int \frac {\sqrt {\cos \left (d x +c \right )+1}\, \cos \left (d x +c \right )^{2} \sec \left (d x +c \right )^{2}}{\cos \left (d x +c \right )+1}d x \right ) c +\left (\int \frac {\sqrt {\cos \left (d x +c \right )+1}\, \sec \left (d x +c \right )^{2}}{\cos \left (d x +c \right )+1}d x \right ) a \right )}{a} \] Input:
int((A+B*cos(d*x+c)+C*cos(d*x+c)^2)*sec(d*x+c)^2/(a+a*cos(d*x+c))^(1/2),x)
Output:
(sqrt(a)*(int((sqrt(cos(c + d*x) + 1)*cos(c + d*x)*sec(c + d*x)**2)/(cos(c + d*x) + 1),x)*b + int((sqrt(cos(c + d*x) + 1)*cos(c + d*x)**2*sec(c + d* x)**2)/(cos(c + d*x) + 1),x)*c + int((sqrt(cos(c + d*x) + 1)*sec(c + d*x)* *2)/(cos(c + d*x) + 1),x)*a))/a