Integrand size = 26, antiderivative size = 337 \[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 \sqrt {a} \sqrt {b} d}+\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 \sqrt {a} \sqrt {b} d}-\frac {x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 \sqrt {a} \sqrt {b} d^2}+\frac {x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 \sqrt {a} \sqrt {b} d^2}+\frac {i \operatorname {PolyLog}\left (3,-\frac {\left (\sqrt {a}-\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}+\sqrt {b}}\right )}{4 \sqrt {a} \sqrt {b} d^3}-\frac {i \operatorname {PolyLog}\left (3,-\frac {\left (\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}-\sqrt {b}}\right )}{4 \sqrt {a} \sqrt {b} d^3} \] Output:
-1/2*I*x^2*ln(1+(a-b)*exp(2*I*(d*x+c))/(a^(1/2)-b^(1/2))^2)/a^(1/2)/b^(1/2 )/d+1/2*I*x^2*ln(1+(a-b)*exp(2*I*(d*x+c))/(a^(1/2)+b^(1/2))^2)/a^(1/2)/b^( 1/2)/d-1/2*x*polylog(2,-(a-b)*exp(2*I*(d*x+c))/(a^(1/2)-b^(1/2))^2)/a^(1/2 )/b^(1/2)/d^2+1/2*x*polylog(2,-(a-b)*exp(2*I*(d*x+c))/(a^(1/2)+b^(1/2))^2) /a^(1/2)/b^(1/2)/d^2+1/4*I*polylog(3,-(a^(1/2)-b^(1/2))*exp(2*I*(d*x+c))/( a^(1/2)+b^(1/2)))/a^(1/2)/b^(1/2)/d^3-1/4*I*polylog(3,-(a^(1/2)+b^(1/2))*e xp(2*I*(d*x+c))/(a^(1/2)-b^(1/2)))/a^(1/2)/b^(1/2)/d^3
Time = 0.90 (sec) , antiderivative size = 294, normalized size of antiderivative = 0.87 \[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {i \left (2 d^2 x^2 \log \left (1+\frac {\left (\sqrt {a}-\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}+\sqrt {b}}\right )-2 d^2 x^2 \log \left (1+\frac {\left (\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}-\sqrt {b}}\right )-2 i d x \operatorname {PolyLog}\left (2,\frac {\left (-\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}+\sqrt {b}}\right )+2 i d x \operatorname {PolyLog}\left (2,-\frac {\left (\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}-\sqrt {b}}\right )+\operatorname {PolyLog}\left (3,\frac {\left (-\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}+\sqrt {b}}\right )-\operatorname {PolyLog}\left (3,-\frac {\left (\sqrt {a}+\sqrt {b}\right ) e^{2 i (c+d x)}}{\sqrt {a}-\sqrt {b}}\right )\right )}{4 \sqrt {a} \sqrt {b} d^3} \] Input:
Integrate[(x^2*Sec[c + d*x]^2)/(a + b*Tan[c + d*x]^2),x]
Output:
((I/4)*(2*d^2*x^2*Log[1 + ((Sqrt[a] - Sqrt[b])*E^((2*I)*(c + d*x)))/(Sqrt[ a] + Sqrt[b])] - 2*d^2*x^2*Log[1 + ((Sqrt[a] + Sqrt[b])*E^((2*I)*(c + d*x) ))/(Sqrt[a] - Sqrt[b])] - (2*I)*d*x*PolyLog[2, ((-Sqrt[a] + Sqrt[b])*E^((2 *I)*(c + d*x)))/(Sqrt[a] + Sqrt[b])] + (2*I)*d*x*PolyLog[2, -(((Sqrt[a] + Sqrt[b])*E^((2*I)*(c + d*x)))/(Sqrt[a] - Sqrt[b]))] + PolyLog[3, ((-Sqrt[a ] + Sqrt[b])*E^((2*I)*(c + d*x)))/(Sqrt[a] + Sqrt[b])] - PolyLog[3, -(((Sq rt[a] + Sqrt[b])*E^((2*I)*(c + d*x)))/(Sqrt[a] - Sqrt[b]))]))/(Sqrt[a]*Sqr t[b]*d^3)
Time = 1.41 (sec) , antiderivative size = 349, normalized size of antiderivative = 1.04, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.346, Rules used = {5099, 3042, 3802, 2694, 27, 2620, 3011, 2720, 7143}
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 {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx\) |
\(\Big \downarrow \) 5099 |
\(\displaystyle 2 \int \frac {x^2}{a+b+(a-b) \cos (2 c+2 d x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 2 \int \frac {x^2}{a+b+(a-b) \sin \left (2 c+2 d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 3802 |
\(\displaystyle 4 \int \frac {e^{2 i (c+d x)} x^2}{a+2 (a+b) e^{2 i (c+d x)}+(a-b) e^{4 i (c+d x)}-b}dx\) |
\(\Big \downarrow \) 2694 |
\(\displaystyle 4 \left (\frac {(a-b) \int \frac {e^{2 i (c+d x)} x^2}{2 \left (a-2 \sqrt {b} \sqrt {a}+(a-b) e^{2 i (c+d x)}+b\right )}dx}{2 \sqrt {a} \sqrt {b}}-\frac {(a-b) \int \frac {e^{2 i (c+d x)} x^2}{2 \left (\left (\sqrt {a}+\sqrt {b}\right )^2+(a-b) e^{2 i (c+d x)}\right )}dx}{2 \sqrt {a} \sqrt {b}}\right )\) |
\(\Big \downarrow \) 27 |
\(\displaystyle 4 \left (\frac {(a-b) \int \frac {e^{2 i (c+d x)} x^2}{a-2 \sqrt {b} \sqrt {a}+(a-b) e^{2 i (c+d x)}+b}dx}{4 \sqrt {a} \sqrt {b}}-\frac {(a-b) \int \frac {e^{2 i (c+d x)} x^2}{\left (\sqrt {a}+\sqrt {b}\right )^2+(a-b) e^{2 i (c+d x)}}dx}{4 \sqrt {a} \sqrt {b}}\right )\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle 4 \left (\frac {(a-b) \left (\frac {i \int x \log \left (\frac {e^{2 i (c+d x)} (a-b)}{\left (\sqrt {a}-\sqrt {b}\right )^2}+1\right )dx}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}-\frac {(a-b) \left (\frac {i \int x \log \left (\frac {e^{2 i (c+d x)} (a-b)}{\left (\sqrt {a}+\sqrt {b}\right )^2}+1\right )dx}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}\right )\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle 4 \left (\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d}-\frac {i \int \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )dx}{2 d}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}-\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d}-\frac {i \int \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )dx}{2 d}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}\right )\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle 4 \left (\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d}-\frac {\int e^{-2 i (c+d x)} \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )de^{2 i (c+d x)}}{4 d^2}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}-\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d}-\frac {\int e^{-2 i (c+d x)} \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )de^{2 i (c+d x)}}{4 d^2}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}\right )\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle 4 \left (\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d}-\frac {\operatorname {PolyLog}\left (3,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{4 d^2}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}-\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}-\frac {(a-b) \left (\frac {i \left (\frac {i x \operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d}-\frac {\operatorname {PolyLog}\left (3,-\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{4 d^2}\right )}{d (a-b)}-\frac {i x^2 \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{\left (\sqrt {a}+\sqrt {b}\right )^2}\right )}{2 d (a-b)}\right )}{4 \sqrt {a} \sqrt {b}}\right )\) |
Input:
Int[(x^2*Sec[c + d*x]^2)/(a + b*Tan[c + d*x]^2),x]
Output:
4*(((a - b)*(((-1/2*I)*x^2*Log[1 + ((a - b)*E^((2*I)*(c + d*x)))/(Sqrt[a] - Sqrt[b])^2])/((a - b)*d) + (I*(((I/2)*x*PolyLog[2, -(((a - b)*E^((2*I)*( c + d*x)))/(Sqrt[a] - Sqrt[b])^2)])/d - PolyLog[3, -(((a - b)*E^((2*I)*(c + d*x)))/(Sqrt[a] - Sqrt[b])^2)]/(4*d^2)))/((a - b)*d)))/(4*Sqrt[a]*Sqrt[b ]) - ((a - b)*(((-1/2*I)*x^2*Log[1 + ((a - b)*E^((2*I)*(c + d*x)))/(Sqrt[a ] + Sqrt[b])^2])/((a - b)*d) + (I*(((I/2)*x*PolyLog[2, -(((a - b)*E^((2*I) *(c + d*x)))/(Sqrt[a] + Sqrt[b])^2)])/d - PolyLog[3, -(((a - b)*E^((2*I)*( c + d*x)))/(Sqrt[a] + Sqrt[b])^2)]/(4*d^2)))/((a - b)*d)))/(4*Sqrt[a]*Sqrt [b]))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.) *(F_)^(v_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[2*(c/q) Int [(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Simp[2*(c/q) Int[(f + g*x) ^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[ v, 2*u] && LinearQ[u, x] && NeQ[b^2 - 4*a*c, 0] && IGtQ[m, 0]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (f_.)*( x_)]), x_Symbol] :> Simp[2 Int[(c + d*x)^m*E^(I*Pi*(k - 1/2))*(E^(I*(e + f*x))/(b + 2*a*E^(I*Pi*(k - 1/2))*E^(I*(e + f*x)) - b*E^(2*I*k*Pi)*E^(2*I*( e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[2*k] && NeQ [a^2 - b^2, 0] && IGtQ[m, 0]
Int[(((f_.) + (g_.)*(x_))^(m_.)*Sec[(d_.) + (e_.)*(x_)]^2)/((b_) + (c_.)*Ta n[(d_.) + (e_.)*(x_)]^2), x_Symbol] :> Simp[2 Int[(f + g*x)^m/(b + c + (b - c)*Cos[2*d + 2*e*x]), x], x] /; FreeQ[{b, c, d, e, f, g}, x] && IGtQ[m, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1250 vs. \(2 (253 ) = 506\).
Time = 0.84 (sec) , antiderivative size = 1251, normalized size of antiderivative = 3.71
Input:
int(x^2*sec(d*x+c)^2/(a+tan(d*x+c)^2*b),x,method=_RETURNVERBOSE)
Output:
I/d^3/(-2*(b*a)^(1/2)-a-b)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*(b*a)^(1/2)-a-b ))*c^2+I/d^3*c^2/(b*a)^(1/2)*arctanh(1/4*(2*(a-b)*exp(2*I*(d*x+c))+2*a+2*b )/(b*a)^(1/2))+2/3/d^3/(b*a)^(1/2)/(-2*(b*a)^(1/2)-a-b)*a*c^3+2/3/d^3/(b*a )^(1/2)/(-2*(b*a)^(1/2)-a-b)*b*c^3+1/2*I/d^3/(b*a)^(1/2)*ln(1-(a-b)*exp(2* I*(d*x+c))/(2*(b*a)^(1/2)-a-b))*c^2-1/2*I/d/(b*a)^(1/2)*ln(1-(a-b)*exp(2*I *(d*x+c))/(2*(b*a)^(1/2)-a-b))*x^2-I/d/(-2*(b*a)^(1/2)-a-b)*ln(1-(a-b)*exp (2*I*(d*x+c))/(-2*(b*a)^(1/2)-a-b))*x^2+1/2*I/d^3/(b*a)^(1/2)/(-2*(b*a)^(1 /2)-a-b)*a*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*(b*a)^(1/2)-a-b))*c^2+1/2*I/d^3 /(b*a)^(1/2)/(-2*(b*a)^(1/2)-a-b)*b*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*(b*a)^ (1/2)-a-b))*c^2-1/2*I/d/(b*a)^(1/2)/(-2*(b*a)^(1/2)-a-b)*a*ln(1-(a-b)*exp( 2*I*(d*x+c))/(-2*(b*a)^(1/2)-a-b))*x^2-1/2*I/d/(b*a)^(1/2)/(-2*(b*a)^(1/2) -a-b)*b*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*(b*a)^(1/2)-a-b))*x^2+2/d^2/(-2*(b *a)^(1/2)-a-b)*c^2*x-1/d^2/(-2*(b*a)^(1/2)-a-b)*polylog(2,(a-b)*exp(2*I*(d *x+c))/(-2*(b*a)^(1/2)-a-b))*x+1/d^2/(b*a)^(1/2)*c^2*x-1/2/d^2/(b*a)^(1/2) *polylog(2,(a-b)*exp(2*I*(d*x+c))/(2*(b*a)^(1/2)-a-b))*x-1/3/(b*a)^(1/2)/( -2*(b*a)^(1/2)-a-b)*a*x^3-1/3/(b*a)^(1/2)/(-2*(b*a)^(1/2)-a-b)*b*x^3-1/4*I /d^3/(b*a)^(1/2)*polylog(3,(a-b)*exp(2*I*(d*x+c))/(2*(b*a)^(1/2)-a-b))-1/2 *I/d^3/(-2*(b*a)^(1/2)-a-b)*polylog(3,(a-b)*exp(2*I*(d*x+c))/(-2*(b*a)^(1/ 2)-a-b))-1/2/d^2/(b*a)^(1/2)/(-2*(b*a)^(1/2)-a-b)*b*polylog(2,(a-b)*exp(2* I*(d*x+c))/(-2*(b*a)^(1/2)-a-b))*x-1/4*I/d^3/(b*a)^(1/2)/(-2*(b*a)^(1/2...
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 4568 vs. \(2 (247) = 494\).
Time = 1.99 (sec) , antiderivative size = 4568, normalized size of antiderivative = 13.55 \[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\text {Too large to display} \] Input:
integrate(x^2*sec(d*x+c)^2/(a+b*tan(d*x+c)^2),x, algorithm="fricas")
Output:
Too large to include
\[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\int \frac {x^{2} \sec ^{2}{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )}}\, dx \] Input:
integrate(x**2*sec(d*x+c)**2/(a+b*tan(d*x+c)**2),x)
Output:
Integral(x**2*sec(c + d*x)**2/(a + b*tan(c + d*x)**2), x)
\[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\int { \frac {x^{2} \sec \left (d x + c\right )^{2}}{b \tan \left (d x + c\right )^{2} + a} \,d x } \] Input:
integrate(x^2*sec(d*x+c)^2/(a+b*tan(d*x+c)^2),x, algorithm="maxima")
Output:
integrate(x^2*sec(d*x + c)^2/(b*tan(d*x + c)^2 + a), x)
\[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\int { \frac {x^{2} \sec \left (d x + c\right )^{2}}{b \tan \left (d x + c\right )^{2} + a} \,d x } \] Input:
integrate(x^2*sec(d*x+c)^2/(a+b*tan(d*x+c)^2),x, algorithm="giac")
Output:
integrate(x^2*sec(d*x + c)^2/(b*tan(d*x + c)^2 + a), x)
Timed out. \[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\int \frac {x^2}{{\cos \left (c+d\,x\right )}^2\,\left (b\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )} \,d x \] Input:
int(x^2/(cos(c + d*x)^2*(a + b*tan(c + d*x)^2)),x)
Output:
int(x^2/(cos(c + d*x)^2*(a + b*tan(c + d*x)^2)), x)
\[ \int \frac {x^2 \sec ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {-3 \left (\int \frac {\sin \left (d x +c \right )^{2} x^{2}}{\sin \left (d x +c \right )^{2} a -\sin \left (d x +c \right )^{2} b -a}d x \right ) a +3 \left (\int \frac {\sin \left (d x +c \right )^{2} x^{2}}{\sin \left (d x +c \right )^{2} a -\sin \left (d x +c \right )^{2} b -a}d x \right ) b +x^{3}}{3 a} \] Input:
int(x^2*sec(d*x+c)^2/(a+b*tan(d*x+c)^2),x)
Output:
( - 3*int((sin(c + d*x)**2*x**2)/(sin(c + d*x)**2*a - sin(c + d*x)**2*b - a),x)*a + 3*int((sin(c + d*x)**2*x**2)/(sin(c + d*x)**2*a - sin(c + d*x)** 2*b - a),x)*b + x**3)/(3*a)