Integrand size = 20, antiderivative size = 225 \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=\frac {a^2 f^2 \cos \left (2 e-\frac {2 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 c f}{d}+2 f x\right )}{d^3}-\frac {a^2 f^2 \operatorname {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d^3}-\frac {4 a^2 f \cos \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right ) \sin ^3\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d^2 (c+d x)}-\frac {2 a^2 \sin ^4\left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{d (c+d x)^2}-\frac {a^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^3}-\frac {a^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 c f}{d}+2 f x\right )}{d^3} \] Output:
a^2*f^2*cos(-2*e+2*c*f/d)*Ci(2*c*f/d+2*f*x)/d^3+a^2*f^2*Ci(c*f/d+f*x)*sin( -e+c*f/d)/d^3-4*a^2*f*cos(1/2*e+1/4*Pi+1/2*f*x)*sin(1/2*e+1/4*Pi+1/2*f*x)^ 3/d^2/(d*x+c)-2*a^2*sin(1/2*e+1/4*Pi+1/2*f*x)^4/d/(d*x+c)^2-a^2*f^2*cos(-e +c*f/d)*Si(c*f/d+f*x)/d^3+a^2*f^2*sin(-2*e+2*c*f/d)*Si(2*c*f/d+2*f*x)/d^3
Time = 1.28 (sec) , antiderivative size = 353, normalized size of antiderivative = 1.57 \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=-\frac {a^2 \left (3 d^2+4 c d f \cos (e+f x)+4 d^2 f x \cos (e+f x)-d^2 \cos (2 (e+f x))-4 f^2 (c+d x)^2 \cos \left (2 e-\frac {2 c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {2 f (c+d x)}{d}\right )+4 f^2 (c+d x)^2 \operatorname {CosIntegral}\left (f \left (\frac {c}{d}+x\right )\right ) \sin \left (e-\frac {c f}{d}\right )+4 d^2 \sin (e+f x)+2 c d f \sin (2 (e+f x))+2 d^2 f x \sin (2 (e+f x))+4 c^2 f^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+8 c d f^2 x \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+4 d^2 f^2 x^2 \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )+4 c^2 f^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )+8 c d f^2 x \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )+4 d^2 f^2 x^2 \sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (\frac {2 f (c+d x)}{d}\right )\right )}{4 d^3 (c+d x)^2} \] Input:
Integrate[(a + a*Sin[e + f*x])^2/(c + d*x)^3,x]
Output:
-1/4*(a^2*(3*d^2 + 4*c*d*f*Cos[e + f*x] + 4*d^2*f*x*Cos[e + f*x] - d^2*Cos [2*(e + f*x)] - 4*f^2*(c + d*x)^2*Cos[2*e - (2*c*f)/d]*CosIntegral[(2*f*(c + d*x))/d] + 4*f^2*(c + d*x)^2*CosIntegral[f*(c/d + x)]*Sin[e - (c*f)/d] + 4*d^2*Sin[e + f*x] + 2*c*d*f*Sin[2*(e + f*x)] + 2*d^2*f*x*Sin[2*(e + f*x )] + 4*c^2*f^2*Cos[e - (c*f)/d]*SinIntegral[f*(c/d + x)] + 8*c*d*f^2*x*Cos [e - (c*f)/d]*SinIntegral[f*(c/d + x)] + 4*d^2*f^2*x^2*Cos[e - (c*f)/d]*Si nIntegral[f*(c/d + x)] + 4*c^2*f^2*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*f*( c + d*x))/d] + 8*c*d*f^2*x*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*f*(c + d*x) )/d] + 4*d^2*f^2*x^2*Sin[2*e - (2*c*f)/d]*SinIntegral[(2*f*(c + d*x))/d])) /(d^3*(c + d*x)^2)
Time = 1.40 (sec) , antiderivative size = 312, normalized size of antiderivative = 1.39, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {3042, 3799, 3042, 3795, 3042, 3790, 16, 25, 3042, 3784, 3042, 3780, 3783, 3793, 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 {(a \sin (e+f x)+a)^2}{(c+d x)^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (e+f x)+a)^2}{(c+d x)^3}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle 4 a^2 \int \frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{(c+d x)^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{(c+d x)^3}dx\) |
\(\Big \downarrow \) 3795 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{c+d x}dx}{d^2}+\frac {3 f^2 \int \frac {\sin ^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{c+d x}dx}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a^2 \left (\frac {3 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^2}{c+d x}dx}{2 d^2}-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3790 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \int \frac {1}{c+d x}dx-\frac {1}{2} \int -\frac {\sin (e+f x)}{c+d x}dx\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 16 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {\log (c+d x)}{2 d}-\frac {1}{2} \int -\frac {\sin (e+f x)}{c+d x}dx\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \int \frac {\sin (e+f x)}{c+d x}dx+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \int \frac {\sin (e+f x)}{c+d x}dx+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3784 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \left (\sin \left (e-\frac {c f}{d}\right ) \int \frac {\cos \left (x f+\frac {c f}{d}\right )}{c+d x}dx+\cos \left (e-\frac {c f}{d}\right ) \int \frac {\sin \left (x f+\frac {c f}{d}\right )}{c+d x}dx\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \left (\sin \left (e-\frac {c f}{d}\right ) \int \frac {\sin \left (x f+\frac {c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\cos \left (e-\frac {c f}{d}\right ) \int \frac {\sin \left (x f+\frac {c f}{d}\right )}{c+d x}dx\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3780 |
\(\displaystyle 4 a^2 \left (\frac {3 f^2 \left (\frac {1}{2} \left (\sin \left (e-\frac {c f}{d}\right ) \int \frac {\sin \left (x f+\frac {c f}{d}+\frac {\pi }{2}\right )}{c+d x}dx+\frac {\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3783 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \frac {\sin \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^4}{c+d x}dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \left (\frac {\operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 3793 |
\(\displaystyle 4 a^2 \left (-\frac {2 f^2 \int \left (-\frac {\cos (2 e+2 f x)}{8 (c+d x)}+\frac {\sin (e+f x)}{2 (c+d x)}+\frac {3}{8 (c+d x)}\right )dx}{d^2}+\frac {3 f^2 \left (\frac {1}{2} \left (\frac {\operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle 4 a^2 \left (\frac {3 f^2 \left (\frac {1}{2} \left (\frac {\operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}\right )+\frac {\log (c+d x)}{2 d}\right )}{2 d^2}-\frac {2 f^2 \left (\frac {\operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{2 d}-\frac {\operatorname {CosIntegral}\left (2 x f+\frac {2 c f}{d}\right ) \cos \left (2 e-\frac {2 c f}{d}\right )}{8 d}+\frac {\sin \left (2 e-\frac {2 c f}{d}\right ) \text {Si}\left (2 x f+\frac {2 c f}{d}\right )}{8 d}+\frac {\cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{2 d}+\frac {3 \log (c+d x)}{8 d}\right )}{d^2}-\frac {f \sin ^3\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right ) \cos \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{d^2 (c+d x)}-\frac {\sin ^4\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{2 d (c+d x)^2}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^2/(c + d*x)^3,x]
Output:
4*a^2*(-((f*Cos[e/2 + Pi/4 + (f*x)/2]*Sin[e/2 + Pi/4 + (f*x)/2]^3)/(d^2*(c + d*x))) - Sin[e/2 + Pi/4 + (f*x)/2]^4/(2*d*(c + d*x)^2) + (3*f^2*(Log[c + d*x]/(2*d) + ((CosIntegral[(c*f)/d + f*x]*Sin[e - (c*f)/d])/d + (Cos[e - (c*f)/d]*SinIntegral[(c*f)/d + f*x])/d)/2))/(2*d^2) - (2*f^2*(-1/8*(Cos[2 *e - (2*c*f)/d]*CosIntegral[(2*c*f)/d + 2*f*x])/d + (3*Log[c + d*x])/(8*d) + (CosIntegral[(c*f)/d + f*x]*Sin[e - (c*f)/d])/(2*d) + (Cos[e - (c*f)/d] *SinIntegral[(c*f)/d + f*x])/(2*d) + (Sin[2*e - (2*c*f)/d]*SinIntegral[(2* c*f)/d + 2*f*x])/(8*d)))/d^2)
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinInte gral[e + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*e - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosInte gral[e - Pi/2 + f*x]/d, x] /; FreeQ[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]
Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[Cos[(d* e - c*f)/d] Int[Sin[c*(f/d) + f*x]/(c + d*x), x], x] + Simp[Sin[(d*e - c* f)/d] Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f}, x] && NeQ[d*e - c*f, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + ((f_.)*(x_))/2]^2, x_Symbol] :> Simp[1/2 Int[(c + d*x)^m, x], x] - Simp[1/2 Int[(c + d*x)^m*Cos[2*e + f *x], x], x] /; FreeQ[{c, d, e, f, m}, x]
Int[((c_.) + (d_.)*(x_))^(m_)*sin[(e_.) + (f_.)*(x_)]^(n_), x_Symbol] :> In t[ExpandTrigReduce[(c + d*x)^m, Sin[e + f*x]^n, x], x] /; FreeQ[{c, d, e, f , m}, x] && IGtQ[n, 1] && ( !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 1]))
Int[((c_.) + (d_.)*(x_))^(m_)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbo l] :> Simp[(c + d*x)^(m + 1)*((b*Sin[e + f*x])^n/(d*(m + 1))), x] + (-Simp[ b*f*n*(c + d*x)^(m + 2)*Cos[e + f*x]*((b*Sin[e + f*x])^(n - 1)/(d^2*(m + 1) *(m + 2))), x] + Simp[b^2*f^2*n*((n - 1)/(d^2*(m + 1)*(m + 2))) Int[(c + d*x)^(m + 2)*(b*Sin[e + f*x])^(n - 2), x], x] - Simp[f^2*(n^2/(d^2*(m + 1)* (m + 2))) Int[(c + d*x)^(m + 2)*(b*Sin[e + f*x])^n, x], x]) /; FreeQ[{b, c, d, e, f}, x] && GtQ[n, 1] && LtQ[m, -2]
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
Time = 2.07 (sec) , antiderivative size = 347, normalized size of antiderivative = 1.54
method | result | size |
derivativedivides | \(\frac {-\frac {3 a^{2} f^{3}}{4 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {a^{2} f^{3} \left (-\frac {\cos \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {-\frac {2 \sin \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {4 \,\operatorname {Si}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \sin \left (\frac {2 c f -2 d e}{d}\right )}{d}+\frac {4 \,\operatorname {Ci}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \cos \left (\frac {2 c f -2 d e}{d}\right )}{d}}{d}}{d}\right )}{4}+2 a^{2} f^{3} \left (-\frac {\sin \left (f x +e \right )}{2 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}+\frac {-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}}{2 d}\right )}{f}\) | \(347\) |
default | \(\frac {-\frac {3 a^{2} f^{3}}{4 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {a^{2} f^{3} \left (-\frac {\cos \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {-\frac {2 \sin \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {4 \,\operatorname {Si}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \sin \left (\frac {2 c f -2 d e}{d}\right )}{d}+\frac {4 \,\operatorname {Ci}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \cos \left (\frac {2 c f -2 d e}{d}\right )}{d}}{d}}{d}\right )}{4}+2 a^{2} f^{3} \left (-\frac {\sin \left (f x +e \right )}{2 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}+\frac {-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}}{2 d}\right )}{f}\) | \(347\) |
parts | \(-\frac {a^{2}}{2 d \left (d x +c \right )^{2}}+\frac {a^{2} \left (-\frac {f^{3}}{4 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {f^{3} \left (-\frac {\cos \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right )^{2} d}-\frac {-\frac {2 \sin \left (2 f x +2 e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {4 \,\operatorname {Si}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \sin \left (\frac {2 c f -2 d e}{d}\right )}{d}+\frac {4 \,\operatorname {Ci}\left (2 f x +2 e +\frac {2 c f -2 d e}{d}\right ) \cos \left (\frac {2 c f -2 d e}{d}\right )}{d}}{d}}{d}\right )}{4}\right )}{f}+2 a^{2} f^{2} \left (-\frac {\sin \left (f x +e \right )}{2 \left (c f -d e +d \left (f x +e \right )\right )^{2} d}+\frac {-\frac {\cos \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}-\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}}{d}}{2 d}\right )\) | \(360\) |
risch | \(\frac {i f^{2} a^{2} {\mathrm e}^{\frac {i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (i f x +i e +\frac {i \left (c f -d e \right )}{d}\right )}{2 d^{3}}-\frac {3 a^{2}}{4 d \left (d x +c \right )^{2}}-\frac {a^{2} f^{2} {\mathrm e}^{\frac {2 i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (2 i f x +2 i e +\frac {2 i \left (c f -d e \right )}{d}\right )}{2 d^{3}}-\frac {a^{2} f^{2} {\mathrm e}^{-\frac {2 i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (-2 i f x -2 i e -\frac {2 \left (i c f -i d e \right )}{d}\right )}{2 d^{3}}-\frac {i a^{2} f^{2} {\mathrm e}^{-\frac {i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (-i f x -i e -\frac {i c f -i d e}{d}\right )}{2 d^{3}}+\frac {i a^{2} \left (-2 i d^{3} f^{3} x^{3}-6 i c \,d^{2} f^{3} x^{2}-6 i c^{2} d \,f^{3} x -2 i c^{3} f^{3}\right ) \cos \left (f x +e \right )}{2 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}-\frac {a^{2} \left (-2 d^{2} x^{2} f^{2}-4 c d \,f^{2} x -2 c^{2} f^{2}\right ) \sin \left (f x +e \right )}{2 d \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}+\frac {a^{2} \left (-2 d^{3} f^{2} x^{2}-4 c \,d^{2} f^{2} x -2 c^{2} d \,f^{2}\right ) \cos \left (2 f x +2 e \right )}{8 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}-\frac {i a^{2} \left (4 i d^{3} f^{3} x^{3}+12 i c \,d^{2} f^{3} x^{2}+12 i c^{2} d \,f^{3} x +4 i c^{3} f^{3}\right ) \sin \left (2 f x +2 e \right )}{8 d^{2} \left (d x +c \right )^{2} \left (-d^{2} x^{2} f^{2}-2 c d \,f^{2} x -c^{2} f^{2}\right )}\) | \(594\) |
Input:
int((a+a*sin(f*x+e))^2/(d*x+c)^3,x,method=_RETURNVERBOSE)
Output:
1/f*(-3/4*a^2*f^3/(c*f-d*e+d*(f*x+e))^2/d-1/4*a^2*f^3*(-cos(2*f*x+2*e)/(c* f-d*e+d*(f*x+e))^2/d-(-2*sin(2*f*x+2*e)/(c*f-d*e+d*(f*x+e))/d+2*(2*Si(2*f* x+2*e+2*(c*f-d*e)/d)*sin(2*(c*f-d*e)/d)/d+2*Ci(2*f*x+2*e+2*(c*f-d*e)/d)*co s(2*(c*f-d*e)/d)/d)/d)/d)+2*a^2*f^3*(-1/2*sin(f*x+e)/(c*f-d*e+d*(f*x+e))^2 /d+1/2*(-cos(f*x+e)/(c*f-d*e+d*(f*x+e))/d-(Si(f*x+e+(c*f-d*e)/d)*cos((c*f- d*e)/d)/d-Ci(f*x+e+(c*f-d*e)/d)*sin((c*f-d*e)/d)/d)/d)/d))
Time = 0.10 (sec) , antiderivative size = 373, normalized size of antiderivative = 1.66 \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=\frac {a^{2} d^{2} \cos \left (f x + e\right )^{2} - 2 \, a^{2} d^{2} + 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \cos \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) \operatorname {Ci}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) + 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) + 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \sin \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) \operatorname {Si}\left (\frac {2 \, {\left (d f x + c f\right )}}{d}\right ) - 2 \, {\left (a^{2} d^{2} f^{2} x^{2} + 2 \, a^{2} c d f^{2} x + a^{2} c^{2} f^{2}\right )} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) - 2 \, {\left (a^{2} d^{2} f x + a^{2} c d f\right )} \cos \left (f x + e\right ) - 2 \, {\left (a^{2} d^{2} + {\left (a^{2} d^{2} f x + a^{2} c d f\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{2 \, {\left (d^{5} x^{2} + 2 \, c d^{4} x + c^{2} d^{3}\right )}} \] Input:
integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="fricas")
Output:
1/2*(a^2*d^2*cos(f*x + e)^2 - 2*a^2*d^2 + 2*(a^2*d^2*f^2*x^2 + 2*a^2*c*d*f ^2*x + a^2*c^2*f^2)*cos(-2*(d*e - c*f)/d)*cos_integral(2*(d*f*x + c*f)/d) + 2*(a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos_integral((d*f*x + c*f)/d)*sin(-(d*e - c*f)/d) + 2*(a^2*d^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2 *c^2*f^2)*sin(-2*(d*e - c*f)/d)*sin_integral(2*(d*f*x + c*f)/d) - 2*(a^2*d ^2*f^2*x^2 + 2*a^2*c*d*f^2*x + a^2*c^2*f^2)*cos(-(d*e - c*f)/d)*sin_integr al((d*f*x + c*f)/d) - 2*(a^2*d^2*f*x + a^2*c*d*f)*cos(f*x + e) - 2*(a^2*d^ 2 + (a^2*d^2*f*x + a^2*c*d*f)*cos(f*x + e))*sin(f*x + e))/(d^5*x^2 + 2*c*d ^4*x + c^2*d^3)
\[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=a^{2} \left (\int \frac {2 \sin {\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {\sin ^{2}{\left (e + f x \right )}}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx + \int \frac {1}{c^{3} + 3 c^{2} d x + 3 c d^{2} x^{2} + d^{3} x^{3}}\, dx\right ) \] Input:
integrate((a+a*sin(f*x+e))**2/(d*x+c)**3,x)
Output:
a**2*(Integral(2*sin(e + f*x)/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x* *3), x) + Integral(sin(e + f*x)**2/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d* *3*x**3), x) + Integral(1/(c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3), x))
Result contains complex when optimal does not.
Time = 0.26 (sec) , antiderivative size = 477, normalized size of antiderivative = 2.12 \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=-\frac {\frac {2 \, a^{2} f^{3}}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \, {\left (d^{3} e - c d^{2} f\right )} {\left (f x + e\right )}} - \frac {4 \, {\left (f^{3} {\left (-i \, E_{3}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{3}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right ) + f^{3} {\left (E_{3}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{3}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )\right )} a^{2}}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \, {\left (d^{3} e - c d^{2} f\right )} {\left (f x + e\right )}} - \frac {{\left (f^{3} {\left (E_{3}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) + E_{3}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right )\right )} \cos \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) - f^{3} {\left (i \, E_{3}\left (\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right ) - i \, E_{3}\left (-\frac {2 \, {\left (-i \, {\left (f x + e\right )} d + i \, d e - i \, c f\right )}}{d}\right )\right )} \sin \left (-\frac {2 \, {\left (d e - c f\right )}}{d}\right ) - f^{3}\right )} a^{2}}{{\left (f x + e\right )}^{2} d^{3} + d^{3} e^{2} - 2 \, c d^{2} e f + c^{2} d f^{2} - 2 \, {\left (d^{3} e - c d^{2} f\right )} {\left (f x + e\right )}}}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="maxima")
Output:
-1/4*(2*a^2*f^3/((f*x + e)^2*d^3 + d^3*e^2 - 2*c*d^2*e*f + c^2*d*f^2 - 2*( d^3*e - c*d^2*f)*(f*x + e)) - 4*(f^3*(-I*exp_integral_e(3, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + I*exp_integral_e(3, -(I*(f*x + e)*d - I*d*e + I*c*f) /d))*cos(-(d*e - c*f)/d) + f^3*(exp_integral_e(3, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + exp_integral_e(3, -(I*(f*x + e)*d - I*d*e + I*c*f)/d))*sin(-( d*e - c*f)/d))*a^2/((f*x + e)^2*d^3 + d^3*e^2 - 2*c*d^2*e*f + c^2*d*f^2 - 2*(d^3*e - c*d^2*f)*(f*x + e)) - (f^3*(exp_integral_e(3, 2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d) + exp_integral_e(3, -2*(-I*(f*x + e)*d + I*d*e - I*c* f)/d))*cos(-2*(d*e - c*f)/d) - f^3*(I*exp_integral_e(3, 2*(-I*(f*x + e)*d + I*d*e - I*c*f)/d) - I*exp_integral_e(3, -2*(-I*(f*x + e)*d + I*d*e - I*c *f)/d))*sin(-2*(d*e - c*f)/d) - f^3)*a^2/((f*x + e)^2*d^3 + d^3*e^2 - 2*c* d^2*e*f + c^2*d*f^2 - 2*(d^3*e - c*d^2*f)*(f*x + e)))/f
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 2.39 (sec) , antiderivative size = 120870, normalized size of antiderivative = 537.20 \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=\text {Too large to display} \] Input:
integrate((a+a*sin(f*x+e))^2/(d*x+c)^3,x, algorithm="giac")
Output:
-1/2*(a^2*d^2*f^2*x^2*imag_part(cos_integral(f*x + c*f/d))*tan(f*x)^2*tan( 1/2*f*x)^2*tan(1/2*e)^2*tan(e)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2 - a^2*d^2*f ^2*x^2*imag_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan (1/2*e)^2*tan(e)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2 - a^2*d^2*f^2*x^2*real_pa rt(cos_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*t an(e)^2*tan(c*f/d)^2*tan(1/2*c*f/d)^2 - a^2*d^2*f^2*x^2*real_part(cos_inte gral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e)^2*ta n(c*f/d)^2*tan(1/2*c*f/d)^2 + 2*a^2*d^2*f^2*x^2*sin_integral((d*f*x + c*f) /d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e)^2*tan(c*f/d)^2*tan(1/2*c *f/d)^2 + 2*a^2*d^2*f^2*x^2*real_part(cos_integral(f*x + c*f/d))*tan(f*x)^ 2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e)^2*tan(c*f/d)^2*tan(1/2*c*f/d) + 2*a^2 *d^2*f^2*x^2*real_part(cos_integral(-f*x - c*f/d))*tan(f*x)^2*tan(1/2*f*x) ^2*tan(1/2*e)^2*tan(e)^2*tan(c*f/d)^2*tan(1/2*c*f/d) + 2*a^2*d^2*f^2*x^2*i mag_part(cos_integral(2*f*x + 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2* e)^2*tan(e)^2*tan(c*f/d)*tan(1/2*c*f/d)^2 - 2*a^2*d^2*f^2*x^2*imag_part(co s_integral(-2*f*x - 2*c*f/d))*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e )^2*tan(c*f/d)*tan(1/2*c*f/d)^2 + 4*a^2*d^2*f^2*x^2*sin_integral(2*(d*f*x + c*f)/d)*tan(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e)^2*tan(c*f/d)*tan(1 /2*c*f/d)^2 - 2*a^2*d^2*f^2*x^2*imag_part(cos_integral(2*f*x + 2*c*f/d))*t an(f*x)^2*tan(1/2*f*x)^2*tan(1/2*e)^2*tan(e)*tan(c*f/d)^2*tan(1/2*c*f/d...
Timed out. \[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=\int \frac {{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2}{{\left (c+d\,x\right )}^3} \,d x \] Input:
int((a + a*sin(e + f*x))^2/(c + d*x)^3,x)
Output:
int((a + a*sin(e + f*x))^2/(c + d*x)^3, x)
\[ \int \frac {(a+a \sin (e+f x))^2}{(c+d x)^3} \, dx=\text {too large to display} \] Input:
int((a+a*sin(f*x+e))^2/(d*x+c)^3,x)
Output:
(a**2*(2*cos(e + f*x)*sin(e + f*x)*c**2*d*f + 2*cos(e + f*x)*sin(e + f*x)* c*d**2*f*x - 2*cos(e + f*x)*sin(e + f*x)*c*d**2 - 8*cos(e + f*x)*c*d**2 - 16*int(x**2/(tan((e + f*x)/2)**4*c**3 + 3*tan((e + f*x)/2)**4*c**2*d*x + 3 *tan((e + f*x)/2)**4*c*d**2*x**2 + tan((e + f*x)/2)**4*d**3*x**3 + 2*tan(( e + f*x)/2)**2*c**3 + 6*tan((e + f*x)/2)**2*c**2*d*x + 6*tan((e + f*x)/2)* *2*c*d**2*x**2 + 2*tan((e + f*x)/2)**2*d**3*x**3 + c**3 + 3*c**2*d*x + 3*c *d**2*x**2 + d**3*x**3),x)*c**3*d**3*f**2 - 32*int(x**2/(tan((e + f*x)/2)* *4*c**3 + 3*tan((e + f*x)/2)**4*c**2*d*x + 3*tan((e + f*x)/2)**4*c*d**2*x* *2 + tan((e + f*x)/2)**4*d**3*x**3 + 2*tan((e + f*x)/2)**2*c**3 + 6*tan((e + f*x)/2)**2*c**2*d*x + 6*tan((e + f*x)/2)**2*c*d**2*x**2 + 2*tan((e + f* x)/2)**2*d**3*x**3 + c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3),x)*c** 2*d**4*f**2*x - 16*int(x**2/(tan((e + f*x)/2)**4*c**3 + 3*tan((e + f*x)/2) **4*c**2*d*x + 3*tan((e + f*x)/2)**4*c*d**2*x**2 + tan((e + f*x)/2)**4*d** 3*x**3 + 2*tan((e + f*x)/2)**2*c**3 + 6*tan((e + f*x)/2)**2*c**2*d*x + 6*t an((e + f*x)/2)**2*c*d**2*x**2 + 2*tan((e + f*x)/2)**2*d**3*x**3 + c**3 + 3*c**2*d*x + 3*c*d**2*x**2 + d**3*x**3),x)*c*d**5*f**2*x**2 - 16*int(tan(( e + f*x)/2)/(tan((e + f*x)/2)**4*c**3 + 3*tan((e + f*x)/2)**4*c**2*d*x + 3 *tan((e + f*x)/2)**4*c*d**2*x**2 + tan((e + f*x)/2)**4*d**3*x**3 + 2*tan(( e + f*x)/2)**2*c**3 + 6*tan((e + f*x)/2)**2*c**2*d*x + 6*tan((e + f*x)/2)* *2*c*d**2*x**2 + 2*tan((e + f*x)/2)**2*d**3*x**3 + c**3 + 3*c**2*d*x + ...