Integrand size = 20, antiderivative size = 229 \[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\frac {5 i (c+d x)^2}{3 a^2 f}+\frac {(c+d x)^3}{3 a^2 d}-\frac {20 d (c+d x) \log \left (1+e^{i (e+f x)}\right )}{3 a^2 f^2}+\frac {20 i d^2 \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{3 a^2 f^3}-\frac {d (c+d x) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f^2}+\frac {2 d^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f^3}-\frac {5 (c+d x)^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^2 \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f} \] Output:
5/3*I*(d*x+c)^2/a^2/f+1/3*(d*x+c)^3/a^2/d-20/3*d*(d*x+c)*ln(1+exp(I*(f*x+e )))/a^2/f^2+20/3*I*d^2*polylog(2,-exp(I*(f*x+e)))/a^2/f^3-1/3*d*(d*x+c)*se c(1/2*f*x+1/2*e)^2/a^2/f^2+2/3*d^2*tan(1/2*f*x+1/2*e)/a^2/f^3-5/3*(d*x+c)^ 2*tan(1/2*f*x+1/2*e)/a^2/f+1/6*(d*x+c)^2*sec(1/2*f*x+1/2*e)^2*tan(1/2*f*x+ 1/2*e)/a^2/f
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(925\) vs. \(2(229)=458\).
Time = 6.76 (sec) , antiderivative size = 925, normalized size of antiderivative = 4.04 \[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx =\text {Too large to display} \] Input:
Integrate[(c + d*x)^2/(a + a*Sec[e + f*x])^2,x]
Output:
(-80*c*d*Cos[e/2 + (f*x)/2]^4*Sec[e/2]*Sec[e + f*x]^2*(Cos[e/2]*Log[Cos[e/ 2]*Cos[(f*x)/2] - Sin[e/2]*Sin[(f*x)/2]] + (f*x*Sin[e/2])/2))/(3*f^2*(a + a*Sec[e + f*x])^2*(Cos[e/2]^2 + Sin[e/2]^2)) - (80*d^2*Cos[e/2 + (f*x)/2]^ 4*Csc[e/2]*((f^2*x^2)/(4*E^(I*ArcTan[Cot[e/2]])) - (Cot[e/2]*((I/2)*f*x*(- Pi - 2*ArcTan[Cot[e/2]]) - Pi*Log[1 + E^((-I)*f*x)] - 2*((f*x)/2 - ArcTan[ Cot[e/2]])*Log[1 - E^((2*I)*((f*x)/2 - ArcTan[Cot[e/2]]))] + Pi*Log[Cos[(f *x)/2]] - 2*ArcTan[Cot[e/2]]*Log[Sin[(f*x)/2 - ArcTan[Cot[e/2]]]] + I*Poly Log[2, E^((2*I)*((f*x)/2 - ArcTan[Cot[e/2]]))]))/Sqrt[1 + Cot[e/2]^2])*Sec [e/2]*Sec[e + f*x]^2)/(3*f^3*(a + a*Sec[e + f*x])^2*Sqrt[Csc[e/2]^2*(Cos[e /2]^2 + Sin[e/2]^2)]) + (Cos[e/2 + (f*x)/2]*Sec[e/2]*Sec[e + f*x]^2*(-4*c* d*f*Cos[(f*x)/2] - 4*d^2*f*x*Cos[(f*x)/2] + 9*c^2*f^3*x*Cos[(f*x)/2] + 9*c *d*f^3*x^2*Cos[(f*x)/2] + 3*d^2*f^3*x^3*Cos[(f*x)/2] - 4*c*d*f*Cos[e + (f* x)/2] - 4*d^2*f*x*Cos[e + (f*x)/2] + 9*c^2*f^3*x*Cos[e + (f*x)/2] + 9*c*d* f^3*x^2*Cos[e + (f*x)/2] + 3*d^2*f^3*x^3*Cos[e + (f*x)/2] + 3*c^2*f^3*x*Co s[e + (3*f*x)/2] + 3*c*d*f^3*x^2*Cos[e + (3*f*x)/2] + d^2*f^3*x^3*Cos[e + (3*f*x)/2] + 3*c^2*f^3*x*Cos[2*e + (3*f*x)/2] + 3*c*d*f^3*x^2*Cos[2*e + (3 *f*x)/2] + d^2*f^3*x^3*Cos[2*e + (3*f*x)/2] + 8*d^2*Sin[(f*x)/2] - 18*c^2* f^2*Sin[(f*x)/2] - 36*c*d*f^2*x*Sin[(f*x)/2] - 18*d^2*f^2*x^2*Sin[(f*x)/2] - 4*d^2*Sin[e + (f*x)/2] + 12*c^2*f^2*Sin[e + (f*x)/2] + 24*c*d*f^2*x*Sin [e + (f*x)/2] + 12*d^2*f^2*x^2*Sin[e + (f*x)/2] + 4*d^2*Sin[e + (3*f*x)...
Time = 0.73 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3042, 4679, 2009}
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 {(c+d x)^2}{(a \sec (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d x)^2}{\left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4679 |
\(\displaystyle \int \left (-\frac {2 (c+d x)^2}{a^2 (\cos (e+f x)+1)}+\frac {(c+d x)^2}{a^2 (\cos (e+f x)+1)^2}+\frac {(c+d x)^2}{a^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {20 d (c+d x) \log \left (1+e^{i (e+f x)}\right )}{3 a^2 f^2}-\frac {d (c+d x) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f^2}-\frac {5 (c+d x)^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f}+\frac {(c+d x)^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) \sec ^2\left (\frac {e}{2}+\frac {f x}{2}\right )}{6 a^2 f}+\frac {5 i (c+d x)^2}{3 a^2 f}+\frac {(c+d x)^3}{3 a^2 d}+\frac {20 i d^2 \operatorname {PolyLog}\left (2,-e^{i (e+f x)}\right )}{3 a^2 f^3}+\frac {2 d^2 \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{3 a^2 f^3}\) |
Input:
Int[(c + d*x)^2/(a + a*Sec[e + f*x])^2,x]
Output:
(((5*I)/3)*(c + d*x)^2)/(a^2*f) + (c + d*x)^3/(3*a^2*d) - (20*d*(c + d*x)* Log[1 + E^(I*(e + f*x))])/(3*a^2*f^2) + (((20*I)/3)*d^2*PolyLog[2, -E^(I*( e + f*x))])/(a^2*f^3) - (d*(c + d*x)*Sec[e/2 + (f*x)/2]^2)/(3*a^2*f^2) + ( 2*d^2*Tan[e/2 + (f*x)/2])/(3*a^2*f^3) - (5*(c + d*x)^2*Tan[e/2 + (f*x)/2]) /(3*a^2*f) + ((c + d*x)^2*Sec[e/2 + (f*x)/2]^2*Tan[e/2 + (f*x)/2])/(6*a^2* f)
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt Q[m, 0]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 452 vs. \(2 (187 ) = 374\).
Time = 0.19 (sec) , antiderivative size = 453, normalized size of antiderivative = 1.98
method | result | size |
risch | \(\frac {d^{2} x^{3}}{3 a^{2}}+\frac {d c \,x^{2}}{a^{2}}+\frac {c^{2} x}{a^{2}}+\frac {c^{3}}{3 a^{2} d}-\frac {2 i \left (6 d^{2} f^{2} x^{2} {\mathrm e}^{2 i \left (f x +e \right )}-2 i c d f \,{\mathrm e}^{i \left (f x +e \right )}+12 c d \,f^{2} x \,{\mathrm e}^{2 i \left (f x +e \right )}+9 d^{2} {\mathrm e}^{i \left (f x +e \right )} x^{2} f^{2}-2 i d^{2} f x \,{\mathrm e}^{i \left (f x +e \right )}-2 i d^{2} f x \,{\mathrm e}^{2 i \left (f x +e \right )}+6 c^{2} f^{2} {\mathrm e}^{2 i \left (f x +e \right )}+18 c d \,{\mathrm e}^{i \left (f x +e \right )} x \,f^{2}+5 d^{2} f^{2} x^{2}-2 i c d f \,{\mathrm e}^{2 i \left (f x +e \right )}+9 c^{2} {\mathrm e}^{i \left (f x +e \right )} f^{2}+10 c d \,f^{2} x +5 c^{2} f^{2}-2 d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-4 d^{2} {\mathrm e}^{i \left (f x +e \right )}-2 d^{2}\right )}{3 f^{3} a^{2} \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )^{3}}-\frac {20 d c \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )}{3 a^{2} f^{2}}+\frac {20 d c \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{3 a^{2} f^{2}}+\frac {10 i d^{2} x^{2}}{3 a^{2} f}+\frac {20 i d^{2} e x}{3 a^{2} f^{2}}+\frac {10 i d^{2} e^{2}}{3 a^{2} f^{3}}-\frac {20 d^{2} \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right ) x}{3 a^{2} f^{2}}+\frac {20 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (f x +e \right )}\right )}{3 a^{2} f^{3}}-\frac {20 d^{2} e \ln \left ({\mathrm e}^{i \left (f x +e \right )}\right )}{3 a^{2} f^{3}}\) | \(453\) |
Input:
int((d*x+c)^2/(a+a*sec(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/3/a^2*d^2*x^3+1/a^2*d*c*x^2+1/a^2*c^2*x+1/3/a^2/d*c^3-2/3*I*(6*d^2*f^2*x ^2*exp(2*I*(f*x+e))-2*I*c*d*f*exp(I*(f*x+e))+12*c*d*f^2*x*exp(2*I*(f*x+e)) +9*d^2*exp(I*(f*x+e))*x^2*f^2-2*I*d^2*f*x*exp(I*(f*x+e))-2*I*d^2*f*x*exp(2 *I*(f*x+e))+6*c^2*f^2*exp(2*I*(f*x+e))+18*c*d*exp(I*(f*x+e))*x*f^2+5*d^2*f ^2*x^2-2*I*c*d*f*exp(2*I*(f*x+e))+9*c^2*exp(I*(f*x+e))*f^2+10*c*d*f^2*x+5* c^2*f^2-2*d^2*exp(2*I*(f*x+e))-4*d^2*exp(I*(f*x+e))-2*d^2)/f^3/a^2/(1+exp( I*(f*x+e)))^3-20/3/a^2*d/f^2*c*ln(1+exp(I*(f*x+e)))+20/3/a^2*d/f^2*c*ln(ex p(I*(f*x+e)))+10/3*I/a^2*d^2/f*x^2+20/3*I/a^2*d^2/f^2*e*x+10/3*I/a^2*d^2/f ^3*e^2-20/3/a^2*d^2/f^2*ln(1+exp(I*(f*x+e)))*x+20/3*I*d^2*polylog(2,-exp(I *(f*x+e)))/a^2/f^3-20/3/a^2*d^2/f^3*e*ln(exp(I*(f*x+e)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 493 vs. \(2 (184) = 368\).
Time = 0.09 (sec) , antiderivative size = 493, normalized size of antiderivative = 2.15 \[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\frac {d^{2} f^{3} x^{3} + 3 \, c d f^{3} x^{2} - 2 \, c d f + {\left (d^{2} f^{3} x^{3} + 3 \, c d f^{3} x^{2} + 3 \, c^{2} f^{3} x\right )} \cos \left (f x + e\right )^{2} + {\left (3 \, c^{2} f^{3} - 2 \, d^{2} f\right )} x + 2 \, {\left (d^{2} f^{3} x^{3} + 3 \, c d f^{3} x^{2} - c d f + {\left (3 \, c^{2} f^{3} - d^{2} f\right )} x\right )} \cos \left (f x + e\right ) - 10 \, {\left (i \, d^{2} \cos \left (f x + e\right )^{2} + 2 i \, d^{2} \cos \left (f x + e\right ) + i \, d^{2}\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right )\right ) - 10 \, {\left (-i \, d^{2} \cos \left (f x + e\right )^{2} - 2 i \, d^{2} \cos \left (f x + e\right ) - i \, d^{2}\right )} {\rm Li}_2\left (-\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right )\right ) - 10 \, {\left (d^{2} f x + c d f + {\left (d^{2} f x + c d f\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (d^{2} f x + c d f\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) + i \, \sin \left (f x + e\right ) + 1\right ) - 10 \, {\left (d^{2} f x + c d f + {\left (d^{2} f x + c d f\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (d^{2} f x + c d f\right )} \cos \left (f x + e\right )\right )} \log \left (\cos \left (f x + e\right ) - i \, \sin \left (f x + e\right ) + 1\right ) - {\left (4 \, d^{2} f^{2} x^{2} + 8 \, c d f^{2} x + 4 \, c^{2} f^{2} - 2 \, d^{2} + {\left (5 \, d^{2} f^{2} x^{2} + 10 \, c d f^{2} x + 5 \, c^{2} f^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{3 \, {\left (a^{2} f^{3} \cos \left (f x + e\right )^{2} + 2 \, a^{2} f^{3} \cos \left (f x + e\right ) + a^{2} f^{3}\right )}} \] Input:
integrate((d*x+c)^2/(a+a*sec(f*x+e))^2,x, algorithm="fricas")
Output:
1/3*(d^2*f^3*x^3 + 3*c*d*f^3*x^2 - 2*c*d*f + (d^2*f^3*x^3 + 3*c*d*f^3*x^2 + 3*c^2*f^3*x)*cos(f*x + e)^2 + (3*c^2*f^3 - 2*d^2*f)*x + 2*(d^2*f^3*x^3 + 3*c*d*f^3*x^2 - c*d*f + (3*c^2*f^3 - d^2*f)*x)*cos(f*x + e) - 10*(I*d^2*c os(f*x + e)^2 + 2*I*d^2*cos(f*x + e) + I*d^2)*dilog(-cos(f*x + e) + I*sin( f*x + e)) - 10*(-I*d^2*cos(f*x + e)^2 - 2*I*d^2*cos(f*x + e) - I*d^2)*dilo g(-cos(f*x + e) - I*sin(f*x + e)) - 10*(d^2*f*x + c*d*f + (d^2*f*x + c*d*f )*cos(f*x + e)^2 + 2*(d^2*f*x + c*d*f)*cos(f*x + e))*log(cos(f*x + e) + I* sin(f*x + e) + 1) - 10*(d^2*f*x + c*d*f + (d^2*f*x + c*d*f)*cos(f*x + e)^2 + 2*(d^2*f*x + c*d*f)*cos(f*x + e))*log(cos(f*x + e) - I*sin(f*x + e) + 1 ) - (4*d^2*f^2*x^2 + 8*c*d*f^2*x + 4*c^2*f^2 - 2*d^2 + (5*d^2*f^2*x^2 + 10 *c*d*f^2*x + 5*c^2*f^2 - 2*d^2)*cos(f*x + e))*sin(f*x + e))/(a^2*f^3*cos(f *x + e)^2 + 2*a^2*f^3*cos(f*x + e) + a^2*f^3)
\[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\frac {\int \frac {c^{2}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{2} x^{2}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx + \int \frac {2 c d x}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx}{a^{2}} \] Input:
integrate((d*x+c)**2/(a+a*sec(f*x+e))**2,x)
Output:
(Integral(c**2/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + Integral(d**2* x**2/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x) + Integral(2*c*d*x/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x))/a**2
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1035 vs. \(2 (184) = 368\).
Time = 0.54 (sec) , antiderivative size = 1035, normalized size of antiderivative = 4.52 \[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^2/(a+a*sec(f*x+e))^2,x, algorithm="maxima")
Output:
-(I*d^2*f^3*x^3 + 3*I*c*d*f^3*x^2 + 3*I*c^2*f^3*x + 10*c^2*f^2 - 4*d^2 + 2 0*(d^2*f*x + c*d*f + (d^2*f*x + c*d*f)*cos(3*f*x + 3*e) + 3*(d^2*f*x + c*d *f)*cos(2*f*x + 2*e) + 3*(d^2*f*x + c*d*f)*cos(f*x + e) - (-I*d^2*f*x - I* c*d*f)*sin(3*f*x + 3*e) - 3*(-I*d^2*f*x - I*c*d*f)*sin(2*f*x + 2*e) - 3*(- I*d^2*f*x - I*c*d*f)*sin(f*x + e))*arctan2(sin(f*x + e), cos(f*x + e) + 1) + (I*d^2*f^3*x^3 + (3*I*c*d*f^3 - 10*d^2*f^2)*x^2 + (3*I*c^2*f^3 - 20*c*d *f^2)*x)*cos(3*f*x + 3*e) + (3*I*d^2*f^3*x^3 + 12*c^2*f^2 - 4*I*c*d*f - 9* (-I*c*d*f^3 + 2*d^2*f^2)*x^2 - 4*d^2 + (9*I*c^2*f^3 - 36*c*d*f^2 - 4*I*d^2 *f)*x)*cos(2*f*x + 2*e) + (3*I*d^2*f^3*x^3 + 18*c^2*f^2 - 4*I*c*d*f - 3*(- 3*I*c*d*f^3 + 4*d^2*f^2)*x^2 - 8*d^2 + (9*I*c^2*f^3 - 24*c*d*f^2 - 4*I*d^2 *f)*x)*cos(f*x + e) - 20*(d^2*cos(3*f*x + 3*e) + 3*d^2*cos(2*f*x + 2*e) + 3*d^2*cos(f*x + e) + I*d^2*sin(3*f*x + 3*e) + 3*I*d^2*sin(2*f*x + 2*e) + 3 *I*d^2*sin(f*x + e) + d^2)*dilog(-e^(I*f*x + I*e)) - 10*(I*d^2*f*x + I*c*d *f + (I*d^2*f*x + I*c*d*f)*cos(3*f*x + 3*e) + 3*(I*d^2*f*x + I*c*d*f)*cos( 2*f*x + 2*e) + 3*(I*d^2*f*x + I*c*d*f)*cos(f*x + e) - (d^2*f*x + c*d*f)*si n(3*f*x + 3*e) - 3*(d^2*f*x + c*d*f)*sin(2*f*x + 2*e) - 3*(d^2*f*x + c*d*f )*sin(f*x + e))*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1) - (d^2*f^3*x^3 + (3*c*d*f^3 + 10*I*d^2*f^2)*x^2 + (3*c^2*f^3 + 20*I*c*d*f^ 2)*x)*sin(3*f*x + 3*e) - (3*d^2*f^3*x^3 - 12*I*c^2*f^2 - 4*c*d*f + 9*(c*d* f^3 + 2*I*d^2*f^2)*x^2 + 4*I*d^2 + (9*c^2*f^3 + 36*I*c*d*f^2 - 4*d^2*f)...
\[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\int { \frac {{\left (d x + c\right )}^{2}}{{\left (a \sec \left (f x + e\right ) + a\right )}^{2}} \,d x } \] Input:
integrate((d*x+c)^2/(a+a*sec(f*x+e))^2,x, algorithm="giac")
Output:
integrate((d*x + c)^2/(a*sec(f*x + e) + a)^2, x)
Timed out. \[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\text {Hanged} \] Input:
int((c + d*x)^2/(a + a/cos(e + f*x))^2,x)
Output:
\text{Hanged}
\[ \int \frac {(c+d x)^2}{(a+a \sec (e+f x))^2} \, dx=\frac {20 \left (\int \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) x d x \right ) d^{2} f^{2}+20 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) c d f +\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{2} f^{2}+2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c d \,f^{2} x +\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{2} f^{2} x^{2}-2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c d f -2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d^{2} f x -9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c^{2} f^{2}-18 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c d \,f^{2} x -9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2} f^{2} x^{2}+4 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}+6 c^{2} f^{3} x +6 c d \,f^{3} x^{2}+2 d^{2} f^{3} x^{3}-2 d^{2} f x}{6 a^{2} f^{3}} \] Input:
int((d*x+c)^2/(a+a*sec(f*x+e))^2,x)
Output:
(20*int(tan((e + f*x)/2)*x,x)*d**2*f**2 + 20*log(tan((e + f*x)/2)**2 + 1)* c*d*f + tan((e + f*x)/2)**3*c**2*f**2 + 2*tan((e + f*x)/2)**3*c*d*f**2*x + tan((e + f*x)/2)**3*d**2*f**2*x**2 - 2*tan((e + f*x)/2)**2*c*d*f - 2*tan( (e + f*x)/2)**2*d**2*f*x - 9*tan((e + f*x)/2)*c**2*f**2 - 18*tan((e + f*x) /2)*c*d*f**2*x - 9*tan((e + f*x)/2)*d**2*f**2*x**2 + 4*tan((e + f*x)/2)*d* *2 + 6*c**2*f**3*x + 6*c*d*f**3*x**2 + 2*d**2*f**3*x**3 - 2*d**2*f*x)/(6*a **2*f**3)