Integrand size = 23, antiderivative size = 291 \[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}{a+\sqrt {a^2+b^2}+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d} \] Output:
1/2*b*arctanh(2^(1/2)*(a+(a^2+b^2)^(1/2))^(1/2)*(a+b*tan(d*x+c))^(1/2)/(a+ (a^2+b^2)^(1/2)+b*tan(d*x+c)))*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)/d-1/2*b*a rctanh(((a+(a^2+b^2)^(1/2))^(1/2)-2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+ b^2)^(1/2))^(1/2))*2^(1/2)/(a-(a^2+b^2)^(1/2))^(1/2)/d+1/2*b*arctanh(((a+( a^2+b^2)^(1/2))^(1/2)+2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2)^(1/2))^ (1/2))*2^(1/2)/(a-(a^2+b^2)^(1/2))^(1/2)/d+2/3*(a+b*tan(d*x+c))^(3/2)/b/d
Result contains complex when optimal does not.
Time = 0.16 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.40 \[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {i \sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}-\frac {i \sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d} \] Input:
Integrate[Tan[c + d*x]^2*Sqrt[a + b*Tan[c + d*x]],x]
Output:
(I*Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]])/d - (I*S qrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a + I*b]])/d + (2*(a + b*Tan[c + d*x])^(3/2))/(3*b*d)
Time = 0.76 (sec) , antiderivative size = 427, normalized size of antiderivative = 1.47, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.565, Rules used = {3042, 4026, 25, 3042, 3966, 483, 1449, 1142, 25, 27, 1083, 219, 1103}
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 \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (c+d x)^2 \sqrt {a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 4026 |
\(\displaystyle \int -\sqrt {a+b \tan (c+d x)}dx+\frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\int \sqrt {a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\int \sqrt {a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 3966 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {b \int \frac {\sqrt {a+b \tan (c+d x)}}{\tan ^2(c+d x) b^2+b^2}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 483 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \int \frac {b^2 \tan ^2(c+d x)}{b^4 \tan ^4(c+d x)-2 a b^2 \tan ^2(c+d x)+a^2+b^2}d\sqrt {a+b \tan (c+d x)}}{d}\) |
\(\Big \downarrow \) 1449 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {\int \frac {\sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)-\sqrt {2} b \sqrt {a+\sqrt {a^2+b^2}} \tan (c+d x)+\sqrt {a^2+b^2}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\int \frac {\sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {2} b \sqrt {a+\sqrt {a^2+b^2}} \tan (c+d x)+\sqrt {a^2+b^2}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 1142 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {1}{2} \int -\frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\frac {1}{2} \int \frac {\sqrt {2} \left (\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}\right )}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-b^2 \tan ^2(c+d x)}d\left (2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}\right )-\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-b^2 \tan ^2(c+d x)}d\left (\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )+\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {-\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\frac {\int \frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{b^2 \tan ^2(c+d x)+\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}}d\sqrt {a+b \tan (c+d x)}}{\sqrt {2}}+\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}+2 \sqrt {a+b \tan (c+d x)}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {2 (a+b \tan (c+d x))^{3/2}}{3 b d}-\frac {2 b \left (\frac {\frac {1}{2} \log \left (-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+b^2 \tan ^2(c+d x)\right )-\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {2 \sqrt {a+b \tan (c+d x)}-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}-\frac {\frac {\sqrt {\sqrt {a^2+b^2}+a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}+2 \sqrt {a+b \tan (c+d x)}}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {a-\sqrt {a^2+b^2}}}+\frac {1}{2} \log \left (\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+b^2 \tan ^2(c+d x)\right )}{2 \sqrt {2} \sqrt {\sqrt {a^2+b^2}+a}}\right )}{d}\) |
Input:
Int[Tan[c + d*x]^2*Sqrt[a + b*Tan[c + d*x]],x]
Output:
(-2*b*((-((Sqrt[a + Sqrt[a^2 + b^2]]*ArcTanh[(-(Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]) + 2*Sqrt[a + b*Tan[c + d*x]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]]) ])/Sqrt[a - Sqrt[a^2 + b^2]]) + Log[Sqrt[a^2 + b^2] + b^2*Tan[c + d*x]^2 - Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]]/2)/(2*Sqrt[2] *Sqrt[a + Sqrt[a^2 + b^2]]) - ((Sqrt[a + Sqrt[a^2 + b^2]]*ArcTanh[(Sqrt[2] *Sqrt[a + Sqrt[a^2 + b^2]] + 2*Sqrt[a + b*Tan[c + d*x]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]])])/Sqrt[a - Sqrt[a^2 + b^2]] + Log[Sqrt[a^2 + b^2] + b^2 *Tan[c + d*x]^2 + Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x ]]]/2)/(2*Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]])))/d + (2*(a + b*Tan[c + d*x]) ^(3/2))/(3*b*d)
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[(c_) + (d_.)*(x_)]/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[2*d Subst[Int[x^2/(b*c^2 + a*d^2 - 2*b*c*x^2 + b*x^4), x], x, Sqrt[c + d*x]], x ] /; FreeQ[{a, b, c, d}, x]
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[(2*c*d - b*e)/(2*c) Int[1/(a + b*x + c*x^2), x], x] + Simp[e/(2*c) Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x]
Int[(x_)^(m_)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}, Simp[1/(2*c*r) Int[x^(m - 1)/(q - r*x + x^2), x], x] - Simp[1/(2*c*r) Int[x^(m - 1)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 1] && LtQ[m, 3] && NegQ[b^2 - 4*a*c]
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d Su bst[Int[(a + x)^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c , d, n}, x] && NeQ[a^2 + b^2, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[d^2*((a + b*Tan[e + f*x])^(m + 1)/(b*f*( m + 1))), x] + Int[(a + b*Tan[e + f*x])^m*Simp[c^2 - d^2 + 2*c*d*Tan[e + f* x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && !LeQ [m, -1] && !(EqQ[m, 2] && EqQ[a, 0])
Leaf count of result is larger than twice the leaf count of optimal. \(493\) vs. \(2(237)=474\).
Time = 1.66 (sec) , antiderivative size = 494, normalized size of antiderivative = 1.70
method | result | size |
derivativedivides | \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 b d}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}\) | \(494\) |
default | \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 b d}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}\) | \(494\) |
Input:
int(tan(d*x+c)^2*(a+b*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)
Output:
2/3*(a+b*tan(d*x+c))^(3/2)/b/d-1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+ b^2)^(1/2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a )^(1/2)+(a^2+b^2)^(1/2))-1/d*b/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+ b*tan(d*x+c))^(1/2)-(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a) ^(1/2))+1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a*ln(b*tan(d*x+c)+a-(a+b*tan (d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+1/4/d/b*(2*( a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c ))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))-1/d*b/(2*(a^2+b^2) ^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a) ^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/ 2)*a*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2 )+(a^2+b^2)^(1/2))
Time = 0.09 (sec) , antiderivative size = 349, normalized size of antiderivative = 1.20 \[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {3 \, b d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - 3 \, b d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - 3 \, b d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) + 3 \, b d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) + 4 \, {\left (b \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}{6 \, b d} \] Input:
integrate(tan(d*x+c)^2*(a+b*tan(d*x+c))^(1/2),x, algorithm="fricas")
Output:
1/6*(3*b*d*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(d^3*sqrt(-(d^2*sqrt(-b^ 2/d^4) + a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) - 3*b*d*sqrt (-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(-d^3*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^ 2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) - 3*b*d*sqrt((d^2*sqrt(-b^ 2/d^4) - a)/d^2)*log(d^3*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) + 3*b*d*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)* log(-d^3*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d* x + c) + a)*b) + 4*(b*tan(d*x + c) + a)^(3/2))/(b*d)
\[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a + b \tan {\left (c + d x \right )}} \tan ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(tan(d*x+c)**2*(a+b*tan(d*x+c))**(1/2),x)
Output:
Integral(sqrt(a + b*tan(c + d*x))*tan(c + d*x)**2, x)
\[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int { \sqrt {b \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{2} \,d x } \] Input:
integrate(tan(d*x+c)^2*(a+b*tan(d*x+c))^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt(b*tan(d*x + c) + a)*tan(d*x + c)^2, x)
Exception generated. \[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\text {Exception raised: TypeError} \] Input:
integrate(tan(d*x+c)^2*(a+b*tan(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:Unable to divide, perhaps due to ro unding error%%%{%%%{1,[0,14,5]%%%}+%%%{6,[0,12,5]%%%}+%%%{15,[0,10,5]%%%}+ %%%{20,[0
Time = 2.84 (sec) , antiderivative size = 231, normalized size of antiderivative = 0.79 \[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\mathrm {atanh}\left (\frac {d^3\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{d^2}}\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a-b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )}{16\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{d^2}}+\mathrm {atanh}\left (\frac {d^3\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{d^2}}\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a+b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )}{16\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{d^2}}+\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}}{3\,b\,d} \] Input:
int(tan(c + d*x)^2*(a + b*tan(c + d*x))^(1/2),x)
Output:
atanh((d^3*(-(a - b*1i)/d^2)^(1/2)*((16*(b^4 - a^2*b^2)*(a + b*tan(c + d*x ))^(1/2))/d^2 + (16*a*b^2*(a - b*1i)*(a + b*tan(c + d*x))^(1/2))/d^2))/(16 *(b^5 + a^2*b^3)))*(-(a - b*1i)/d^2)^(1/2) + atanh((d^3*(-(a + b*1i)/d^2)^ (1/2)*((16*(b^4 - a^2*b^2)*(a + b*tan(c + d*x))^(1/2))/d^2 + (16*a*b^2*(a + b*1i)*(a + b*tan(c + d*x))^(1/2))/d^2))/(16*(b^5 + a^2*b^3)))*(-(a + b*1 i)/d^2)^(1/2) + (2*(a + b*tan(c + d*x))^(3/2))/(3*b*d)
\[ \int \tan ^2(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a +\tan \left (d x +c \right ) b}\, \tan \left (d x +c \right )^{2}d x \] Input:
int(tan(d*x+c)^2*(a+b*tan(d*x+c))^(1/2),x)
Output:
int(sqrt(tan(c + d*x)*b + a)*tan(c + d*x)**2,x)