Integrand size = 21, antiderivative size = 116 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {1}{16} \left (6 a^2+b^2\right ) x-\frac {7 a b \cos ^5(c+d x)}{30 d}+\frac {\left (6 a^2+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (6 a^2+b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d} \] Output:
1/16*(6*a^2+b^2)*x-7/30*a*b*cos(d*x+c)^5/d+1/16*(6*a^2+b^2)*cos(d*x+c)*sin (d*x+c)/d+1/24*(6*a^2+b^2)*cos(d*x+c)^3*sin(d*x+c)/d-1/6*b*cos(d*x+c)^5*(a +b*sin(d*x+c))/d
Time = 0.44 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.15 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {360 a^2 c+60 b^2 c+360 a^2 d x+60 b^2 d x-240 a b \cos (c+d x)-120 a b \cos (3 (c+d x))-24 a b \cos (5 (c+d x))+240 a^2 \sin (2 (c+d x))+15 b^2 \sin (2 (c+d x))+30 a^2 \sin (4 (c+d x))-15 b^2 \sin (4 (c+d x))-5 b^2 \sin (6 (c+d x))}{960 d} \] Input:
Integrate[Cos[c + d*x]^4*(a + b*Sin[c + d*x])^2,x]
Output:
(360*a^2*c + 60*b^2*c + 360*a^2*d*x + 60*b^2*d*x - 240*a*b*Cos[c + d*x] - 120*a*b*Cos[3*(c + d*x)] - 24*a*b*Cos[5*(c + d*x)] + 240*a^2*Sin[2*(c + d* x)] + 15*b^2*Sin[2*(c + d*x)] + 30*a^2*Sin[4*(c + d*x)] - 15*b^2*Sin[4*(c + d*x)] - 5*b^2*Sin[6*(c + d*x)])/(960*d)
Time = 0.49 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.95, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3042, 3171, 3042, 3148, 3042, 3115, 3042, 3115, 24}
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 \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^4 (a+b \sin (c+d x))^2dx\) |
\(\Big \downarrow \) 3171 |
\(\displaystyle \frac {1}{6} \int \cos ^4(c+d x) \left (6 a^2+7 b \sin (c+d x) a+b^2\right )dx-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \int \cos (c+d x)^4 \left (6 a^2+7 b \sin (c+d x) a+b^2\right )dx-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3148 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \int \cos ^4(c+d x)dx-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^4dx-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \left (\frac {3}{4} \int \cos ^2(c+d x)dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \left (\frac {3}{4} \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}\right )-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{6} \left (\left (6 a^2+b^2\right ) \left (\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )\right )-\frac {7 a b \cos ^5(c+d x)}{5 d}\right )-\frac {b \cos ^5(c+d x) (a+b \sin (c+d x))}{6 d}\) |
Input:
Int[Cos[c + d*x]^4*(a + b*Sin[c + d*x])^2,x]
Output:
-1/6*(b*Cos[c + d*x]^5*(a + b*Sin[c + d*x]))/d + ((-7*a*b*Cos[c + d*x]^5)/ (5*d) + (6*a^2 + b^2)*((Cos[c + d*x]^3*Sin[c + d*x])/(4*d) + (3*(x/2 + (Co s[c + d*x]*Sin[c + d*x])/(2*d)))/4))/6
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[(-b)*((g*Cos[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Simp[a Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[(-b)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(m + p))), x] + Simp[1/(m + p) Int[(g*Cos[e + f*x])^p* (a + b*Sin[e + f*x])^(m - 2)*(b^2*(m - 1) + a^2*(m + p) + a*b*(2*m + p - 1) *Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && GtQ[m, 1] && NeQ[m + p, 0] && (IntegersQ[2*m, 2*p] || IntegerQ[m])
Time = 14.99 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{5}}{6}+\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) | \(108\) |
default | \(\frac {a^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )-\frac {2 a b \cos \left (d x +c \right )^{5}}{5}+b^{2} \left (-\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )^{5}}{6}+\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )}{d}\) | \(108\) |
parallelrisch | \(\frac {\left (240 a^{2}+15 b^{2}\right ) \sin \left (2 d x +2 c \right )+\left (30 a^{2}-15 b^{2}\right ) \sin \left (4 d x +4 c \right )+360 a^{2} d x +60 b^{2} d x -240 \cos \left (d x +c \right ) a b -120 a b \cos \left (3 d x +3 c \right )-24 a b \cos \left (5 d x +5 c \right )-5 \sin \left (6 d x +6 c \right ) b^{2}-384 a b}{960 d}\) | \(117\) |
risch | \(\frac {3 a^{2} x}{8}+\frac {b^{2} x}{16}-\frac {a b \cos \left (d x +c \right )}{4 d}-\frac {\sin \left (6 d x +6 c \right ) b^{2}}{192 d}-\frac {a b \cos \left (5 d x +5 c \right )}{40 d}+\frac {a^{2} \sin \left (4 d x +4 c \right )}{32 d}-\frac {\sin \left (4 d x +4 c \right ) b^{2}}{64 d}-\frac {a b \cos \left (3 d x +3 c \right )}{8 d}+\frac {a^{2} \sin \left (2 d x +2 c \right )}{4 d}+\frac {\sin \left (2 d x +2 c \right ) b^{2}}{64 d}\) | \(144\) |
norman | \(\frac {\left (\frac {3 a^{2}}{8}+\frac {b^{2}}{16}\right ) x +\left (\frac {3 a^{2}}{8}+\frac {b^{2}}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {9 a^{2}}{4}+\frac {3 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {9 a^{2}}{4}+\frac {3 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (\frac {15 a^{2}}{2}+\frac {5 b^{2}}{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (\frac {45 a^{2}}{8}+\frac {15 b^{2}}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {45 a^{2}}{8}+\frac {15 b^{2}}{16}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-\frac {4 a b}{5 d}+\frac {\left (2 a^{2}-13 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{4 d}-\frac {\left (2 a^{2}-13 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {\left (10 a^{2}-b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}-\frac {\left (10 a^{2}-b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{8 d}+\frac {\left (42 a^{2}+47 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{24 d}-\frac {\left (42 a^{2}+47 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{24 d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{5 d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{d}-\frac {4 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{d}-\frac {8 a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{6}}\) | \(432\) |
orering | \(\text {Expression too large to display}\) | \(2404\) |
Input:
int(cos(d*x+c)^4*(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
1/d*(a^2*(1/4*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)-2/5* a*b*cos(d*x+c)^5+b^2*(-1/6*sin(d*x+c)*cos(d*x+c)^5+1/24*(cos(d*x+c)^3+3/2* cos(d*x+c))*sin(d*x+c)+1/16*d*x+1/16*c))
Time = 0.10 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.77 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {96 \, a b \cos \left (d x + c\right )^{5} - 15 \, {\left (6 \, a^{2} + b^{2}\right )} d x + 5 \, {\left (8 \, b^{2} \cos \left (d x + c\right )^{5} - 2 \, {\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (6 \, a^{2} + b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{240 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="fricas")
Output:
-1/240*(96*a*b*cos(d*x + c)^5 - 15*(6*a^2 + b^2)*d*x + 5*(8*b^2*cos(d*x + c)^5 - 2*(6*a^2 + b^2)*cos(d*x + c)^3 - 3*(6*a^2 + b^2)*cos(d*x + c))*sin( d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 287 vs. \(2 (107) = 214\).
Time = 0.40 (sec) , antiderivative size = 287, normalized size of antiderivative = 2.47 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\begin {cases} \frac {3 a^{2} x \sin ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{4} + \frac {3 a^{2} x \cos ^{4}{\left (c + d x \right )}}{8} + \frac {3 a^{2} \sin ^{3}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{8 d} + \frac {5 a^{2} \sin {\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{8 d} - \frac {2 a b \cos ^{5}{\left (c + d x \right )}}{5 d} + \frac {b^{2} x \sin ^{6}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sin ^{4}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{16} + \frac {3 b^{2} x \sin ^{2}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{16} + \frac {b^{2} x \cos ^{6}{\left (c + d x \right )}}{16} + \frac {b^{2} \sin ^{5}{\left (c + d x \right )} \cos {\left (c + d x \right )}}{16 d} + \frac {b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{3}{\left (c + d x \right )}}{6 d} - \frac {b^{2} \sin {\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{16 d} & \text {for}\: d \neq 0 \\x \left (a + b \sin {\left (c \right )}\right )^{2} \cos ^{4}{\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)**4*(a+b*sin(d*x+c))**2,x)
Output:
Piecewise((3*a**2*x*sin(c + d*x)**4/8 + 3*a**2*x*sin(c + d*x)**2*cos(c + d *x)**2/4 + 3*a**2*x*cos(c + d*x)**4/8 + 3*a**2*sin(c + d*x)**3*cos(c + d*x )/(8*d) + 5*a**2*sin(c + d*x)*cos(c + d*x)**3/(8*d) - 2*a*b*cos(c + d*x)** 5/(5*d) + b**2*x*sin(c + d*x)**6/16 + 3*b**2*x*sin(c + d*x)**4*cos(c + d*x )**2/16 + 3*b**2*x*sin(c + d*x)**2*cos(c + d*x)**4/16 + b**2*x*cos(c + d*x )**6/16 + b**2*sin(c + d*x)**5*cos(c + d*x)/(16*d) + b**2*sin(c + d*x)**3* cos(c + d*x)**3/(6*d) - b**2*sin(c + d*x)*cos(c + d*x)**5/(16*d), Ne(d, 0) ), (x*(a + b*sin(c))**2*cos(c)**4, True))
Time = 0.03 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.76 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=-\frac {384 \, a b \cos \left (d x + c\right )^{5} - 30 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 12 \, d x + 12 \, c - 3 \, \sin \left (4 \, d x + 4 \, c\right )\right )} b^{2}}{960 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="maxima")
Output:
-1/960*(384*a*b*cos(d*x + c)^5 - 30*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8* sin(2*d*x + 2*c))*a^2 - 5*(4*sin(2*d*x + 2*c)^3 + 12*d*x + 12*c - 3*sin(4* d*x + 4*c))*b^2)/d
Time = 0.16 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.06 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {1}{16} \, {\left (6 \, a^{2} + b^{2}\right )} x - \frac {a b \cos \left (5 \, d x + 5 \, c\right )}{40 \, d} - \frac {a b \cos \left (3 \, d x + 3 \, c\right )}{8 \, d} - \frac {a b \cos \left (d x + c\right )}{4 \, d} - \frac {b^{2} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {{\left (2 \, a^{2} - b^{2}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (16 \, a^{2} + b^{2}\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} \] Input:
integrate(cos(d*x+c)^4*(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
1/16*(6*a^2 + b^2)*x - 1/40*a*b*cos(5*d*x + 5*c)/d - 1/8*a*b*cos(3*d*x + 3 *c)/d - 1/4*a*b*cos(d*x + c)/d - 1/192*b^2*sin(6*d*x + 6*c)/d + 1/64*(2*a^ 2 - b^2)*sin(4*d*x + 4*c)/d + 1/64*(16*a^2 + b^2)*sin(2*d*x + 2*c)/d
Time = 15.42 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.16 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {3\,a^2\,x}{8}+\frac {b^2\,x}{16}+\frac {a^2\,{\cos \left (c+d\,x\right )}^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {b^2\,{\cos \left (c+d\,x\right )}^3\,\sin \left (c+d\,x\right )}{24\,d}-\frac {b^2\,{\cos \left (c+d\,x\right )}^5\,\sin \left (c+d\,x\right )}{6\,d}-\frac {2\,a\,b\,{\cos \left (c+d\,x\right )}^5}{5\,d}+\frac {3\,a^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{8\,d}+\frac {b^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{16\,d} \] Input:
int(cos(c + d*x)^4*(a + b*sin(c + d*x))^2,x)
Output:
(3*a^2*x)/8 + (b^2*x)/16 + (a^2*cos(c + d*x)^3*sin(c + d*x))/(4*d) + (b^2* cos(c + d*x)^3*sin(c + d*x))/(24*d) - (b^2*cos(c + d*x)^5*sin(c + d*x))/(6 *d) - (2*a*b*cos(c + d*x)^5)/(5*d) + (3*a^2*cos(c + d*x)*sin(c + d*x))/(8* d) + (b^2*cos(c + d*x)*sin(c + d*x))/(16*d)
Time = 0.16 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.39 \[ \int \cos ^4(c+d x) (a+b \sin (c+d x))^2 \, dx=\frac {-40 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} b^{2}-96 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{4} a b -60 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a^{2}+70 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} b^{2}+192 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{2} a b +150 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{2}-15 \cos \left (d x +c \right ) \sin \left (d x +c \right ) b^{2}-96 \cos \left (d x +c \right ) a b +90 a^{2} d x +96 a b +15 b^{2} d x}{240 d} \] Input:
int(cos(d*x+c)^4*(a+b*sin(d*x+c))^2,x)
Output:
( - 40*cos(c + d*x)*sin(c + d*x)**5*b**2 - 96*cos(c + d*x)*sin(c + d*x)**4 *a*b - 60*cos(c + d*x)*sin(c + d*x)**3*a**2 + 70*cos(c + d*x)*sin(c + d*x) **3*b**2 + 192*cos(c + d*x)*sin(c + d*x)**2*a*b + 150*cos(c + d*x)*sin(c + d*x)*a**2 - 15*cos(c + d*x)*sin(c + d*x)*b**2 - 96*cos(c + d*x)*a*b + 90* a**2*d*x + 96*a*b + 15*b**2*d*x)/(240*d)