Integrand size = 31, antiderivative size = 42 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=a C x+\frac {A b \text {arctanh}(\sin (c+d x))}{d}+\frac {b C \sin (c+d x)}{d}+\frac {a A \tan (c+d x)}{d} \] Output:
a*C*x+A*b*arctanh(sin(d*x+c))/d+b*C*sin(d*x+c)/d+a*A*tan(d*x+c)/d
Time = 0.04 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.29 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=a C x+\frac {A b \coth ^{-1}(\sin (c+d x))}{d}+\frac {b C \cos (d x) \sin (c)}{d}+\frac {b C \cos (c) \sin (d x)}{d}+\frac {a A \tan (c+d x)}{d} \] Input:
Integrate[(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^2,x]
Output:
a*C*x + (A*b*ArcCoth[Sin[c + d*x]])/d + (b*C*Cos[d*x]*Sin[c])/d + (b*C*Cos [c]*Sin[d*x])/d + (a*A*Tan[c + d*x])/d
Time = 0.47 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.258, Rules used = {3042, 3511, 3042, 3502, 3042, 3214, 3042, 4257}
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 \sec ^2(c+d x) (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 3511 |
\(\displaystyle \int \left (b C \cos ^2(c+d x)+a C \cos (c+d x)+A b\right ) \sec (c+d x)dx+\frac {a A \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {b C \sin \left (c+d x+\frac {\pi }{2}\right )^2+a C \sin \left (c+d x+\frac {\pi }{2}\right )+A b}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a A \tan (c+d x)}{d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \int (A b+a C \cos (c+d x)) \sec (c+d x)dx+\frac {a A \tan (c+d x)}{d}+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A b+a C \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )}dx+\frac {a A \tan (c+d x)}{d}+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle A b \int \sec (c+d x)dx+\frac {a A \tan (c+d x)}{d}+a C x+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle A b \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {a A \tan (c+d x)}{d}+a C x+\frac {b C \sin (c+d x)}{d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {a A \tan (c+d x)}{d}+a C x+\frac {A b \text {arctanh}(\sin (c+d x))}{d}+\frac {b C \sin (c+d x)}{d}\) |
Input:
Int[(a + b*Cos[c + d*x])*(A + C*Cos[c + d*x]^2)*Sec[c + d*x]^2,x]
Output:
a*C*x + (A*b*ArcTanh[Sin[c + d*x]])/d + (b*C*Sin[c + d*x])/d + (a*A*Tan[c + d*x])/d
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[ (-(b*c - a*d))*(A*b^2 + a^2*C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/( b^2*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(b^2*(m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*(a*C*(b*c - a*d) + A*b*(a*c - b*d )) - ((b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] + b *C*d*(m + 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e , f, A, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.67 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.17
method | result | size |
derivativedivides | \(\frac {a A \tan \left (d x +c \right )+C a \left (d x +c \right )+A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b \sin \left (d x +c \right ) C}{d}\) | \(49\) |
default | \(\frac {a A \tan \left (d x +c \right )+C a \left (d x +c \right )+A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+b \sin \left (d x +c \right ) C}{d}\) | \(49\) |
parts | \(\frac {a A \tan \left (d x +c \right )}{d}+\frac {A b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {C a \left (d x +c \right )}{d}+\frac {b C \sin \left (d x +c \right )}{d}\) | \(57\) |
parallelrisch | \(\frac {2 a x d C \cos \left (d x +c \right )-2 \cos \left (d x +c \right ) A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+2 \cos \left (d x +c \right ) A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+2 a A \sin \left (d x +c \right )+C b \sin \left (2 d x +2 c \right )}{2 \cos \left (d x +c \right ) d}\) | \(93\) |
risch | \(a C x -\frac {i C b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}+\frac {i C b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a A}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {A b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {A b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}\) | \(100\) |
norman | \(\frac {a C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-a C x -\frac {2 \left (a A -C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {2 \left (a A +C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 \left (3 a A -C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{d}-\frac {2 \left (3 a A +C b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-2 a C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+2 a C x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}+\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {A b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(217\) |
Input:
int((a+b*cos(d*x+c))*(A+C*cos(d*x+c)^2)*sec(d*x+c)^2,x,method=_RETURNVERBO SE)
Output:
1/d*(a*A*tan(d*x+c)+C*a*(d*x+c)+A*b*ln(sec(d*x+c)+tan(d*x+c))+b*sin(d*x+c) *C)
Leaf count of result is larger than twice the leaf count of optimal. 86 vs. \(2 (42) = 84\).
Time = 0.09 (sec) , antiderivative size = 86, normalized size of antiderivative = 2.05 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 \, C a d x \cos \left (d x + c\right ) + A b \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - A b \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (C b \cos \left (d x + c\right ) + A a\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right )} \] Input:
integrate((a+b*cos(d*x+c))*(A+C*cos(d*x+c)^2)*sec(d*x+c)^2,x, algorithm="f ricas")
Output:
1/2*(2*C*a*d*x*cos(d*x + c) + A*b*cos(d*x + c)*log(sin(d*x + c) + 1) - A*b *cos(d*x + c)*log(-sin(d*x + c) + 1) + 2*(C*b*cos(d*x + c) + A*a)*sin(d*x + c))/(d*cos(d*x + c))
\[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\int \left (A + C \cos ^{2}{\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate((a+b*cos(d*x+c))*(A+C*cos(d*x+c)**2)*sec(d*x+c)**2,x)
Output:
Integral((A + C*cos(c + d*x)**2)*(a + b*cos(c + d*x))*sec(c + d*x)**2, x)
Time = 0.04 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.40 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {2 \, {\left (d x + c\right )} C a + A b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 2 \, C b \sin \left (d x + c\right ) + 2 \, A a \tan \left (d x + c\right )}{2 \, d} \] Input:
integrate((a+b*cos(d*x+c))*(A+C*cos(d*x+c)^2)*sec(d*x+c)^2,x, algorithm="m axima")
Output:
1/2*(2*(d*x + c)*C*a + A*b*(log(sin(d*x + c) + 1) - log(sin(d*x + c) - 1)) + 2*C*b*sin(d*x + c) + 2*A*a*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (42) = 84\).
Time = 0.14 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.79 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {{\left (d x + c\right )} C a + A b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - A b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 1}}{d} \] Input:
integrate((a+b*cos(d*x+c))*(A+C*cos(d*x+c)^2)*sec(d*x+c)^2,x, algorithm="g iac")
Output:
((d*x + c)*C*a + A*b*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - A*b*log(abs(tan( 1/2*d*x + 1/2*c) - 1)) - 2*(A*a*tan(1/2*d*x + 1/2*c)^3 - C*b*tan(1/2*d*x + 1/2*c)^3 + A*a*tan(1/2*d*x + 1/2*c) + C*b*tan(1/2*d*x + 1/2*c))/(tan(1/2* d*x + 1/2*c)^4 - 1))/d
Time = 0.39 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.17 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {C\,b\,\sin \left (c+d\,x\right )}{d}+\frac {2\,A\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )} \] Input:
int(((A + C*cos(c + d*x)^2)*(a + b*cos(c + d*x)))/cos(c + d*x)^2,x)
Output:
(C*b*sin(c + d*x))/d + (2*A*b*atanh(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) )/d + (2*C*a*atan(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/d + (A*a*sin(c + d*x))/(d*cos(c + d*x))
Time = 0.17 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.19 \[ \int (a+b \cos (c+d x)) \left (A+C \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx=\frac {-\cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a b +\cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a b +\cos \left (d x +c \right ) \sin \left (d x +c \right ) b c +\cos \left (d x +c \right ) a c d x +\sin \left (d x +c \right ) a^{2}}{\cos \left (d x +c \right ) d} \] Input:
int((a+b*cos(d*x+c))*(A+C*cos(d*x+c)^2)*sec(d*x+c)^2,x)
Output:
( - cos(c + d*x)*log(tan((c + d*x)/2) - 1)*a*b + cos(c + d*x)*log(tan((c + d*x)/2) + 1)*a*b + cos(c + d*x)*sin(c + d*x)*b*c + cos(c + d*x)*a*c*d*x + sin(c + d*x)*a**2)/(cos(c + d*x)*d)