Integrand size = 17, antiderivative size = 85 \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=-\frac {x}{2}-x \cos (2 (a-c))-\frac {\log (\cos (c+b x)) \sin (2 (a-c))}{b}+\frac {\sec (c+b x) \sin (2 a+c+3 b x)}{8 b}+\frac {(4+5 \cos (2 (a-c))) \tan (c+b x)}{8 b} \] Output:
-1/2*x-x*cos(2*a-2*c)-ln(cos(b*x+c))*sin(2*a-2*c)/b+1/8*sec(b*x+c)*sin(3*b *x+2*a+c)/b+1/8*(4+5*cos(2*a-2*c))*tan(b*x+c)/b
Leaf count is larger than twice the leaf count of optimal. \(189\) vs. \(2(85)=170\).
Time = 1.43 (sec) , antiderivative size = 189, normalized size of antiderivative = 2.22 \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=-x \cos (2 (a-c))+\frac {\sec (c) \sec (c+b x) (-4 b x \cos (b x)-4 b x \cos (2 c+b x)+8 \sin (b x)-4 \log (\cos (c+b x)) \sin (2 a-4 c-b x)-4 \sin (2 a-2 c-b x)-4 \log (\cos (c+b x)) \sin (2 a-2 c-b x)+\sin (2 a+b x)-4 \log (\cos (c+b x)) \sin (2 a+b x)+5 \sin (2 a-2 c+b x)-4 \log (\cos (c+b x)) \sin (2 a-2 c+b x)+\sin (2 a+3 b x)+\sin (2 a+2 c+3 b x))}{16 b} \] Input:
Integrate[Sin[a + b*x]^2*Tan[c + b*x]^2,x]
Output:
-(x*Cos[2*(a - c)]) + (Sec[c]*Sec[c + b*x]*(-4*b*x*Cos[b*x] - 4*b*x*Cos[2* c + b*x] + 8*Sin[b*x] - 4*Log[Cos[c + b*x]]*Sin[2*a - 4*c - b*x] - 4*Sin[2 *a - 2*c - b*x] - 4*Log[Cos[c + b*x]]*Sin[2*a - 2*c - b*x] + Sin[2*a + b*x ] - 4*Log[Cos[c + b*x]]*Sin[2*a + b*x] + 5*Sin[2*a - 2*c + b*x] - 4*Log[Co s[c + b*x]]*Sin[2*a - 2*c + b*x] + Sin[2*a + 3*b*x] + Sin[2*a + 2*c + 3*b* x]))/(16*b)
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 \sin ^2(a+b x) \tan ^2(b x+c) \, dx\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \int \sin ^2(a+b x) \tan ^2(b x+c)dx\) |
Input:
Int[Sin[a + b*x]^2*Tan[c + b*x]^2,x]
Output:
$Aborted
Result contains complex when optimal does not.
Time = 0.30 (sec) , antiderivative size = 200, normalized size of antiderivative = 2.35
method | result | size |
risch | \(-x \,{\mathrm e}^{2 i \left (a -c \right )}-\frac {x}{2}-\frac {i {\mathrm e}^{2 i \left (b x +a \right )}}{8 b}+\frac {i {\mathrm e}^{-2 i \left (b x +a \right )}}{8 b}+2 i \sin \left (2 a -2 c \right ) x +\frac {2 i \sin \left (2 a -2 c \right ) a}{b}+\frac {i {\mathrm e}^{2 i \left (2 a -c \right )}}{2 b \left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}+\frac {i {\mathrm e}^{2 i a}}{b \left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}+\frac {i {\mathrm e}^{2 i c}}{2 b \left ({\mathrm e}^{2 i \left (b x +a +c \right )}+{\mathrm e}^{2 i a}\right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (b x +a \right )}+{\mathrm e}^{2 i \left (a -c \right )}\right ) \sin \left (2 a -2 c \right )}{b}\) | \(200\) |
Input:
int(sin(b*x+a)^2*tan(b*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-x*exp(2*I*(a-c))-1/2*x-1/8*I/b*exp(2*I*(b*x+a))+1/8*I/b*exp(-2*I*(b*x+a)) +2*I*sin(2*a-2*c)*x+2*I/b*sin(2*a-2*c)*a+1/2*I/b/(exp(2*I*(b*x+a+c))+exp(2 *I*a))*exp(2*I*(2*a-c))+I/b/(exp(2*I*(b*x+a+c))+exp(2*I*a))*exp(2*I*a)+1/2 *I/b/(exp(2*I*(b*x+a+c))+exp(2*I*a))*exp(2*I*c)-ln(exp(2*I*(b*x+a))+exp(2* I*(a-c)))/b*sin(2*a-2*c)
Leaf count of result is larger than twice the leaf count of optimal. 300 vs. \(2 (79) = 158\).
Time = 0.09 (sec) , antiderivative size = 300, normalized size of antiderivative = 3.53 \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=\frac {{\left (2 \, b x \cos \left (-2 \, a + 2 \, c\right )^{2} + 3 \, b x \cos \left (-2 \, a + 2 \, c\right ) + b x\right )} \cos \left (b x + a\right ) - {\left ({\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \cos \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) + {\left (\cos \left (-2 \, a + 2 \, c\right )^{2} - 1\right )} \sin \left (b x + a\right )\right )} \log \left (\frac {2 \, \cos \left (b x + a\right )^{2} \cos \left (-2 \, a + 2 \, c\right ) - 2 \, \cos \left (b x + a\right ) \sin \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) - \cos \left (-2 \, a + 2 \, c\right ) + 1}{\cos \left (-2 \, a + 2 \, c\right ) + 1}\right ) - {\left ({\left (\cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \cos \left (b x + a\right )^{2} + \cos \left (-2 \, a + 2 \, c\right )^{2} + {\left (2 \, b x \cos \left (-2 \, a + 2 \, c\right ) + b x\right )} \sin \left (-2 \, a + 2 \, c\right ) + 2 \, \cos \left (-2 \, a + 2 \, c\right ) + 1\right )} \sin \left (b x + a\right ) - {\left (\cos \left (b x + a\right )^{3} + \cos \left (b x + a\right ) \cos \left (-2 \, a + 2 \, c\right )\right )} \sin \left (-2 \, a + 2 \, c\right )}{2 \, {\left (b \sin \left (b x + a\right ) \sin \left (-2 \, a + 2 \, c\right ) - {\left (b \cos \left (-2 \, a + 2 \, c\right ) + b\right )} \cos \left (b x + a\right )\right )}} \] Input:
integrate(sin(b*x+a)^2*tan(b*x+c)^2,x, algorithm="fricas")
Output:
1/2*((2*b*x*cos(-2*a + 2*c)^2 + 3*b*x*cos(-2*a + 2*c) + b*x)*cos(b*x + a) - ((cos(-2*a + 2*c) + 1)*cos(b*x + a)*sin(-2*a + 2*c) + (cos(-2*a + 2*c)^2 - 1)*sin(b*x + a))*log((2*cos(b*x + a)^2*cos(-2*a + 2*c) - 2*cos(b*x + a) *sin(b*x + a)*sin(-2*a + 2*c) - cos(-2*a + 2*c) + 1)/(cos(-2*a + 2*c) + 1) ) - ((cos(-2*a + 2*c) + 1)*cos(b*x + a)^2 + cos(-2*a + 2*c)^2 + (2*b*x*cos (-2*a + 2*c) + b*x)*sin(-2*a + 2*c) + 2*cos(-2*a + 2*c) + 1)*sin(b*x + a) - (cos(b*x + a)^3 + cos(b*x + a)*cos(-2*a + 2*c))*sin(-2*a + 2*c))/(b*sin( b*x + a)*sin(-2*a + 2*c) - (b*cos(-2*a + 2*c) + b)*cos(b*x + a))
\[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=\int \sin ^{2}{\left (a + b x \right )} \tan ^{2}{\left (b x + c \right )}\, dx \] Input:
integrate(sin(b*x+a)**2*tan(b*x+c)**2,x)
Output:
Integral(sin(a + b*x)**2*tan(b*x + c)**2, x)
Exception generated. \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=\text {Exception raised: RuntimeError} \] Input:
integrate(sin(b*x+a)^2*tan(b*x+c)^2,x, algorithm="maxima")
Output:
Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is un defined.
Leaf count of result is larger than twice the leaf count of optimal. 300537 vs. \(2 (79) = 158\).
Time = 12.19 (sec) , antiderivative size = 300537, normalized size of antiderivative = 3535.73 \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=\text {Too large to display} \] Input:
integrate(sin(b*x+a)^2*tan(b*x+c)^2,x, algorithm="giac")
Output:
1/8*(pi - 4*b*x*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^7 - 3*pi*sgn(2*tan(b*x)^2*tan(c) + 2*tan(b*x)*tan (c)^2 - 2*tan(b*x) - 2*tan(c))*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*tan( a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^7 - pi*tan(b*x)^3*tan(a + 2*c)^2*t an(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^7 + 2*arctan((tan( b*x)*tan(c) - 1)/(tan(b*x) + tan(c)))*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c) ^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^7 + 2*arctan((tan(b*x) + ta n(c))/(tan(b*x)*tan(c) - 1))*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^7 - 4*b*x*tan(b*x)^3*tan(a + 2*c)^2* tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^5 - 9*pi*sgn(2*ta n(b*x)^2*tan(c) + 2*tan(b*x)*tan(c)^2 - 2*tan(b*x) - 2*tan(c))*tan(b*x)^3* tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^5 - 16*b*x*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^ 2*tan(a)*tan(c)^6 + 4*b*x*tan(b*x)^2*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c )^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^6 + 3*pi*sgn(2*tan(b*x)^2*tan(c) + 2*ta n(b*x)*tan(c)^2 - 2*tan(b*x) - 2*tan(c))*tan(b*x)^2*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c)^2*tan(a)^2*tan(c)^6 - 4*log(4*(tan(b*x)^2* tan(c)^2 - 2*tan(b*x)*tan(c) + 1)/(tan(b*x)^2*tan(c)^2 + tan(b*x)^2 + tan( c)^2 + 1))*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*tan(a - c)^2*tan(a - 2*c )^2*tan(a)^2*tan(c)^6 + 4*b*x*tan(b*x)^3*tan(a + 2*c)^2*tan(a + c)^2*ta...
Time = 1.69 (sec) , antiderivative size = 205, normalized size of antiderivative = 2.41 \[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx=-x\,\left (\cos \left (2\,a-2\,c\right )+\frac {1}{2}-\sin \left (2\,a-2\,c\right )\,1{}\mathrm {i}\right )+\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}-b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}}{8\,b}-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}}{8\,b}-\frac {{\mathrm {e}}^{-a\,4{}\mathrm {i}+c\,4{}\mathrm {i}}\,\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{b\,x\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\mathrm {e}}^{-c\,2{}\mathrm {i}}\right )\,\left (2\,b\,{\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}-2\,b\,{\mathrm {e}}^{a\,6{}\mathrm {i}-c\,6{}\mathrm {i}}\right )\,1{}\mathrm {i}}{4\,b^2}-\frac {{\mathrm {e}}^{-a\,2{}\mathrm {i}+c\,2{}\mathrm {i}}\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}+2\,{\mathrm {e}}^{a\,4{}\mathrm {i}-c\,4{}\mathrm {i}}+{\mathrm {e}}^{a\,6{}\mathrm {i}-c\,6{}\mathrm {i}}\right )}{2\,b\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}-c\,2{}\mathrm {i}}\,1{}\mathrm {i}+{\mathrm {e}}^{a\,2{}\mathrm {i}+b\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}\right )} \] Input:
int(sin(a + b*x)^2*tan(c + b*x)^2,x)
Output:
(exp(- a*2i - b*x*2i)*1i)/(8*b) - x*(cos(2*a - 2*c) - sin(2*a - 2*c)*1i + 1/2) - (exp(a*2i + b*x*2i)*1i)/(8*b) - (exp(c*4i - a*4i)*log(exp(a*2i)*exp (b*x*2i) + exp(a*2i)*exp(-c*2i))*(2*b*exp(a*2i - c*2i) - 2*b*exp(a*6i - c* 6i))*1i)/(4*b^2) - (exp(c*2i - a*2i)*(exp(a*2i - c*2i) + 2*exp(a*4i - c*4i ) + exp(a*6i - c*6i)))/(2*b*(exp(a*2i - c*2i)*1i + exp(a*2i + b*x*2i)*1i))
\[ \int \sin ^2(a+b x) \tan ^2(c+b x) \, dx =\text {Too large to display} \] Input:
int(sin(b*x+a)^2*tan(b*x+c)^2,x)
Output:
(5*cos(b*x + c)*cos(a + b*x)*sin(a + b*x) + 48*cos(b*x + c)*int(tan((b*x + c)/2)**2/(tan((b*x + c)/2)**4*tan((a + b*x)/2)**4 + 2*tan((b*x + c)/2)**4 *tan((a + b*x)/2)**2 + tan((b*x + c)/2)**4 - 2*tan((b*x + c)/2)**2*tan((a + b*x)/2)**4 - 4*tan((b*x + c)/2)**2*tan((a + b*x)/2)**2 - 2*tan((b*x + c) /2)**2 + tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b + 48*cos(b* x + c)*int(tan((a + b*x)/2)**2/(tan((b*x + c)/2)**4*tan((a + b*x)/2)**4 + 2*tan((b*x + c)/2)**4*tan((a + b*x)/2)**2 + tan((b*x + c)/2)**4 - 2*tan((b *x + c)/2)**2*tan((a + b*x)/2)**4 - 4*tan((b*x + c)/2)**2*tan((a + b*x)/2) **2 - 2*tan((b*x + c)/2)**2 + tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b - 64*cos(b*x + c)*int((tan((b*x + c)/2)*tan((a + b*x)/2))/(tan(( b*x + c)/2)**4*tan((a + b*x)/2)**4 + 2*tan((b*x + c)/2)**4*tan((a + b*x)/2 )**2 + tan((b*x + c)/2)**4 - 2*tan((b*x + c)/2)**2*tan((a + b*x)/2)**4 - 4 *tan((b*x + c)/2)**2*tan((a + b*x)/2)**2 - 2*tan((b*x + c)/2)**2 + tan((a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b - 16*cos(b*x + c)*int(1/(ta n((b*x + c)/2)**4*tan((a + b*x)/2)**4 + 2*tan((b*x + c)/2)**4*tan((a + b*x )/2)**2 + tan((b*x + c)/2)**4 - 2*tan((b*x + c)/2)**2*tan((a + b*x)/2)**4 - 4*tan((b*x + c)/2)**2*tan((a + b*x)/2)**2 - 2*tan((b*x + c)/2)**2 + tan( (a + b*x)/2)**4 + 2*tan((a + b*x)/2)**2 + 1),x)*b + 8*cos(b*x + c)*sin(a + b*x) + 3*cos(b*x + c)*a + 3*cos(b*x + c)*b*x - 4*cos(a + b*x)*sin(b*x + c ) + 4*cos(a + b*x)*sin(a + b*x) + 2*sin(b*x + c)*sin(a + b*x)**2 - 4*si...