Integrand size = 21, antiderivative size = 103 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {1}{2} a \left (a^2-9 b^2\right ) x-\frac {b \left (3 a^2-2 b^2\right ) \log (\cos (c+d x))}{d}+\frac {9 a b^2 \tan (c+d x)}{2 d}+\frac {b^3 \tan ^2(c+d x)}{d}-\frac {\cos (c+d x) \sin (c+d x) (a+b \tan (c+d x))^3}{2 d} \] Output:
1/2*a*(a^2-9*b^2)*x-b*(3*a^2-2*b^2)*ln(cos(d*x+c))/d+9/2*a*b^2*tan(d*x+c)/ d+b^3*tan(d*x+c)^2/d-1/2*cos(d*x+c)*sin(d*x+c)*(a+b*tan(d*x+c))^3/d
Time = 2.98 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.97 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b \left (-\frac {a \left (a^2-3 b^2\right ) \arctan (\tan (c+d x))}{b}+\left (3 a^2-b^2\right ) \cos ^2(c+d x)+\left (3 a^2-2 b^2+\frac {a^3-6 a b^2}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )+\left (3 a^2-2 b^2+\frac {-a^3+6 a b^2}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )-\frac {a \left (a^2-3 b^2\right ) \sin (2 (c+d x))}{2 b}+6 a b \tan (c+d x)+b^2 \tan ^2(c+d x)\right )}{2 d} \] Input:
Integrate[Sin[c + d*x]^2*(a + b*Tan[c + d*x])^3,x]
Output:
(b*(-((a*(a^2 - 3*b^2)*ArcTan[Tan[c + d*x]])/b) + (3*a^2 - b^2)*Cos[c + d* x]^2 + (3*a^2 - 2*b^2 + (a^3 - 6*a*b^2)/Sqrt[-b^2])*Log[Sqrt[-b^2] - b*Tan [c + d*x]] + (3*a^2 - 2*b^2 + (-a^3 + 6*a*b^2)/Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[c + d*x]] - (a*(a^2 - 3*b^2)*Sin[2*(c + d*x)])/(2*b) + 6*a*b*Tan[c + d*x] + b^2*Tan[c + d*x]^2))/(2*d)
Time = 0.32 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.21, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3999, 531, 25, 27, 657, 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 \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x)^2 (a+b \tan (c+d x))^3dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {b^2 \tan ^2(c+d x) (a+b \tan (c+d x))^3}{\left (\tan ^2(c+d x) b^2+b^2\right )^2}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 531 |
\(\displaystyle \frac {b \left (-\frac {\int -\frac {b^2 (a+b \tan (c+d x))^2 (a+4 b \tan (c+d x))}{\tan ^2(c+d x) b^2+b^2}d(b \tan (c+d x))}{2 b^2}-\frac {b \tan (c+d x) (a+b \tan (c+d x))^3}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {b \left (\frac {\int \frac {b^2 (a+b \tan (c+d x))^2 (a+4 b \tan (c+d x))}{\tan ^2(c+d x) b^2+b^2}d(b \tan (c+d x))}{2 b^2}-\frac {b \tan (c+d x) (a+b \tan (c+d x))^3}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b \left (\frac {1}{2} \int \frac {(a+b \tan (c+d x))^2 (a+4 b \tan (c+d x))}{\tan ^2(c+d x) b^2+b^2}d(b \tan (c+d x))-\frac {b \tan (c+d x) (a+b \tan (c+d x))^3}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\) |
\(\Big \downarrow \) 657 |
\(\displaystyle \frac {b \left (\frac {1}{2} \int \left (9 a+4 b \tan (c+d x)+\frac {a^3-9 b^2 a+2 b \left (3 a^2-2 b^2\right ) \tan (c+d x)}{\tan ^2(c+d x) b^2+b^2}\right )d(b \tan (c+d x))-\frac {b \tan (c+d x) (a+b \tan (c+d x))^3}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (\frac {1}{2} \left (\frac {a \left (a^2-9 b^2\right ) \arctan (\tan (c+d x))}{b}+\left (3 a^2-2 b^2\right ) \log \left (b^2 \tan ^2(c+d x)+b^2\right )+9 a b \tan (c+d x)+2 b^2 \tan ^2(c+d x)\right )-\frac {b \tan (c+d x) (a+b \tan (c+d x))^3}{2 \left (b^2 \tan ^2(c+d x)+b^2\right )}\right )}{d}\) |
Input:
Int[Sin[c + d*x]^2*(a + b*Tan[c + d*x])^3,x]
Output:
(b*(-1/2*(b*Tan[c + d*x]*(a + b*Tan[c + d*x])^3)/(b^2 + b^2*Tan[c + d*x]^2 ) + ((a*(a^2 - 9*b^2)*ArcTan[Tan[c + d*x]])/b + (3*a^2 - 2*b^2)*Log[b^2 + b^2*Tan[c + d*x]^2] + 9*a*b*Tan[c + d*x] + 2*b^2*Tan[c + d*x]^2)/2))/d
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb ol] :> With[{Qx = PolynomialQuotient[x^m, a + b*x^2, x], e = Coeff[Polynomi alRemainder[x^m, a + b*x^2, x], x, 0], f = Coeff[PolynomialRemainder[x^m, a + b*x^2, x], x, 1]}, Simp[(c + d*x)^n*(a*f - b*e*x)*((a + b*x^2)^(p + 1)/( 2*a*b*(p + 1))), x] + Simp[1/(2*a*b*(p + 1)) Int[(c + d*x)^(n - 1)*(a + b *x^2)^(p + 1)*ExpandToSum[2*a*b*(p + 1)*(c + d*x)*Qx - a*d*f*n + b*c*e*(2*p + 3) + b*d*e*(n + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGt Q[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && GtQ[n, 1] && IntegerQ[2*p]
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[b/f Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
Time = 2.72 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.58
method | result | size |
derivativedivides | \(\frac {b^{3} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(163\) |
default | \(\frac {b^{3} \left (\frac {\sin \left (d x +c \right )^{6}}{2 \cos \left (d x +c \right )^{2}}+\frac {\sin \left (d x +c \right )^{4}}{2}+\sin \left (d x +c \right )^{2}+2 \ln \left (\cos \left (d x +c \right )\right )\right )+3 a \,b^{2} \left (\frac {\sin \left (d x +c \right )^{5}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{3}+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )-\frac {3 d x}{2}-\frac {3 c}{2}\right )+3 a^{2} b \left (-\frac {\sin \left (d x +c \right )^{2}}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+a^{3} \left (-\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(163\) |
risch | \(-\frac {4 i b^{3} c}{d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a^{3}}{8 d}+\frac {a^{3} x}{2}-\frac {9 a \,b^{2} x}{2}+\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )} a^{2} b}{8 d}-\frac {{\mathrm e}^{2 i \left (d x +c \right )} b^{3}}{8 d}-2 i x \,b^{3}-\frac {3 i {\mathrm e}^{2 i \left (d x +c \right )} a \,b^{2}}{8 d}+\frac {3 \,{\mathrm e}^{-2 i \left (d x +c \right )} a^{2} b}{8 d}-\frac {{\mathrm e}^{-2 i \left (d x +c \right )} b^{3}}{8 d}+\frac {6 i b \,a^{2} c}{d}+3 i x \,a^{2} b +\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )} a \,b^{2}}{8 d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a^{3}}{8 d}+\frac {2 b^{2} \left (3 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+3 i a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{d}+\frac {2 b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(286\) |
Input:
int(sin(d*x+c)^2*(a+b*tan(d*x+c))^3,x,method=_RETURNVERBOSE)
Output:
1/d*(b^3*(1/2*sin(d*x+c)^6/cos(d*x+c)^2+1/2*sin(d*x+c)^4+sin(d*x+c)^2+2*ln (cos(d*x+c)))+3*a*b^2*(sin(d*x+c)^5/cos(d*x+c)+(sin(d*x+c)^3+3/2*sin(d*x+c ))*cos(d*x+c)-3/2*d*x-3/2*c)+3*a^2*b*(-1/2*sin(d*x+c)^2-ln(cos(d*x+c)))+a^ 3*(-1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))
Time = 0.10 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.45 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {2 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{4} - 4 \, {\left (3 \, a^{2} b - 2 \, b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\cos \left (d x + c\right )\right ) + 2 \, b^{3} - {\left (3 \, a^{2} b - b^{3} - 2 \, {\left (a^{3} - 9 \, a b^{2}\right )} d x\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (6 \, a b^{2} \cos \left (d x + c\right ) - {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="fricas")
Output:
1/4*(2*(3*a^2*b - b^3)*cos(d*x + c)^4 - 4*(3*a^2*b - 2*b^3)*cos(d*x + c)^2 *log(-cos(d*x + c)) + 2*b^3 - (3*a^2*b - b^3 - 2*(a^3 - 9*a*b^2)*d*x)*cos( d*x + c)^2 + 2*(6*a*b^2*cos(d*x + c) - (a^3 - 3*a*b^2)*cos(d*x + c)^3)*sin (d*x + c))/(d*cos(d*x + c)^2)
\[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right )^{3} \sin ^{2}{\left (c + d x \right )}\, dx \] Input:
integrate(sin(d*x+c)**2*(a+b*tan(d*x+c))**3,x)
Output:
Integral((a + b*tan(c + d*x))**3*sin(c + d*x)**2, x)
Time = 0.13 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.10 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b^{3} \tan \left (d x + c\right )^{2} + 6 \, a b^{2} \tan \left (d x + c\right ) + {\left (a^{3} - 9 \, a b^{2}\right )} {\left (d x + c\right )} + {\left (3 \, a^{2} b - 2 \, b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + \frac {3 \, a^{2} b - b^{3} - {\left (a^{3} - 3 \, a b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{2} + 1}}{2 \, d} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="maxima")
Output:
1/2*(b^3*tan(d*x + c)^2 + 6*a*b^2*tan(d*x + c) + (a^3 - 9*a*b^2)*(d*x + c) + (3*a^2*b - 2*b^3)*log(tan(d*x + c)^2 + 1) + (3*a^2*b - b^3 - (a^3 - 3*a *b^2)*tan(d*x + c))/(tan(d*x + c)^2 + 1))/d
Time = 0.22 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.24 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {{\left (a^{3} - 9 \, a b^{2}\right )} {\left (d x + c\right )}}{2 \, d} + \frac {{\left (3 \, a^{2} b - 2 \, b^{3}\right )} \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{2 \, d} + \frac {b^{3} d \tan \left (d x + c\right )^{2} + 6 \, a b^{2} d \tan \left (d x + c\right )}{2 \, d^{2}} + \frac {3 \, a^{2} b - b^{3} - {\left (a^{3} - 3 \, a b^{2}\right )} \tan \left (d x + c\right )}{2 \, {\left (\tan \left (d x + c\right )^{2} + 1\right )} d} \] Input:
integrate(sin(d*x+c)^2*(a+b*tan(d*x+c))^3,x, algorithm="giac")
Output:
1/2*(a^3 - 9*a*b^2)*(d*x + c)/d + 1/2*(3*a^2*b - 2*b^3)*log(tan(d*x + c)^2 + 1)/d + 1/2*(b^3*d*tan(d*x + c)^2 + 6*a*b^2*d*tan(d*x + c))/d^2 + 1/2*(3 *a^2*b - b^3 - (a^3 - 3*a*b^2)*tan(d*x + c))/((tan(d*x + c)^2 + 1)*d)
Time = 0.84 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.47 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^2}{2\,d}+\frac {{\cos \left (c+d\,x\right )}^2\,\left (\frac {3\,a^2\,b}{2}-\frac {b^3}{2}+\mathrm {tan}\left (c+d\,x\right )\,\left (\frac {3\,a\,b^2}{2}-\frac {a^3}{2}\right )\right )}{d}+\frac {\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )\,\left (\frac {3\,a^2\,b}{2}-b^3\right )}{d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (c+d\,x\right )}{d}-\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (c+d\,x\right )\,\left (a-3\,b\right )\,\left (a+3\,b\right )}{2\,\left (\frac {9\,a\,b^2}{2}-\frac {a^3}{2}\right )}\right )\,\left (a-3\,b\right )\,\left (a+3\,b\right )}{2\,d} \] Input:
int(sin(c + d*x)^2*(a + b*tan(c + d*x))^3,x)
Output:
(b^3*tan(c + d*x)^2)/(2*d) + (cos(c + d*x)^2*((3*a^2*b)/2 - b^3/2 + tan(c + d*x)*((3*a*b^2)/2 - a^3/2)))/d + (log(tan(c + d*x)^2 + 1)*((3*a^2*b)/2 - b^3))/d + (3*a*b^2*tan(c + d*x))/d - (a*atan((a*tan(c + d*x)*(a - 3*b)*(a + 3*b))/(2*((9*a*b^2)/2 - a^3/2)))*(a - 3*b)*(a + 3*b))/(2*d)
Time = 0.17 (sec) , antiderivative size = 496, normalized size of antiderivative = 4.82 \[ \int \sin ^2(c+d x) (a+b \tan (c+d x))^3 \, dx=\frac {3 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a \,b^{2}+\cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{3}-9 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a \,b^{2}+9 a \,b^{2} d x +\sin \left (d x +c \right )^{4} b^{3}+\sin \left (d x +c \right )^{2} a^{3} c +\sin \left (d x +c \right )^{2} a^{3} d x +6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} a^{2} b -9 \sin \left (d x +c \right )^{2} a \,b^{2} c -2 \sin \left (d x +c \right )^{2} b^{3}-a^{3} c +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) b^{3}-\cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a^{3}-3 \sin \left (d x +c \right )^{4} a^{2} b +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b^{3}+6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2} b +4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b^{3}+6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2} b +3 \sin \left (d x +c \right )^{2} a^{2} b +9 a \,b^{2} c -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a^{2} b -6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a^{2} b -a^{3} d x -4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{3}-4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{3}-9 \sin \left (d x +c \right )^{2} a \,b^{2} d x -4 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) \sin \left (d x +c \right )^{2} b^{3}-6 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right ) a^{2} b}{2 d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:
int(sin(d*x+c)^2*(a+b*tan(d*x+c))^3,x)
Output:
( - cos(c + d*x)*sin(c + d*x)**3*a**3 + 3*cos(c + d*x)*sin(c + d*x)**3*a*b **2 + cos(c + d*x)*sin(c + d*x)*a**3 - 9*cos(c + d*x)*sin(c + d*x)*a*b**2 + 6*log(tan((c + d*x)/2)**2 + 1)*sin(c + d*x)**2*a**2*b - 4*log(tan((c + d *x)/2)**2 + 1)*sin(c + d*x)**2*b**3 - 6*log(tan((c + d*x)/2)**2 + 1)*a**2* b + 4*log(tan((c + d*x)/2)**2 + 1)*b**3 - 6*log(tan((c + d*x)/2) - 1)*sin( c + d*x)**2*a**2*b + 4*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b**3 + 6* log(tan((c + d*x)/2) - 1)*a**2*b - 4*log(tan((c + d*x)/2) - 1)*b**3 - 6*lo g(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*a**2*b + 4*log(tan((c + d*x)/2) + 1)*sin(c + d*x)**2*b**3 + 6*log(tan((c + d*x)/2) + 1)*a**2*b - 4*log(tan(( c + d*x)/2) + 1)*b**3 - 3*sin(c + d*x)**4*a**2*b + sin(c + d*x)**4*b**3 + sin(c + d*x)**2*a**3*c + sin(c + d*x)**2*a**3*d*x + 3*sin(c + d*x)**2*a**2 *b - 9*sin(c + d*x)**2*a*b**2*c - 9*sin(c + d*x)**2*a*b**2*d*x - 2*sin(c + d*x)**2*b**3 - a**3*c - a**3*d*x + 9*a*b**2*c + 9*a*b**2*d*x)/(2*d*(sin(c + d*x)**2 - 1))