Integrand size = 18, antiderivative size = 346 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {240 \cos \left (a+b \sqrt {c+d x}\right )}{b^6 d^3}+\frac {24 c \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^3}+\frac {2 c^2 \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^3}-\frac {120 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^3}-\frac {12 c (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^3}+\frac {10 (c+d x)^2 \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^3}+\frac {240 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^5 d^3}+\frac {24 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^3}+\frac {2 c^2 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^3}-\frac {40 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^3}-\frac {4 c (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^3}+\frac {2 (c+d x)^{5/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^3} \] Output:
240*cos(a+b*(d*x+c)^(1/2))/b^6/d^3+24*c*cos(a+b*(d*x+c)^(1/2))/b^4/d^3+2*c ^2*cos(a+b*(d*x+c)^(1/2))/b^2/d^3-120*(d*x+c)*cos(a+b*(d*x+c)^(1/2))/b^4/d ^3-12*c*(d*x+c)*cos(a+b*(d*x+c)^(1/2))/b^2/d^3+10*(d*x+c)^2*cos(a+b*(d*x+c )^(1/2))/b^2/d^3+240*(d*x+c)^(1/2)*sin(a+b*(d*x+c)^(1/2))/b^5/d^3+24*c*(d* x+c)^(1/2)*sin(a+b*(d*x+c)^(1/2))/b^3/d^3+2*c^2*(d*x+c)^(1/2)*sin(a+b*(d*x +c)^(1/2))/b/d^3-40*(d*x+c)^(3/2)*sin(a+b*(d*x+c)^(1/2))/b^3/d^3-4*c*(d*x+ c)^(3/2)*sin(a+b*(d*x+c)^(1/2))/b/d^3+2*(d*x+c)^(5/2)*sin(a+b*(d*x+c)^(1/2 ))/b/d^3
Result contains complex when optimal does not.
Time = 1.02 (sec) , antiderivative size = 224, normalized size of antiderivative = 0.65 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {e^{-i \left (a+b \sqrt {c+d x}\right )} \left (120+120 i b \sqrt {c+d x}+i b^5 d^2 x^2 \sqrt {c+d x}-4 i b^3 \sqrt {c+d x} (2 c+5 d x)-12 b^2 (4 c+5 d x)+b^4 d x (4 c+5 d x)+e^{2 i \left (a+b \sqrt {c+d x}\right )} \left (120-120 i b \sqrt {c+d x}-i b^5 d^2 x^2 \sqrt {c+d x}+4 i b^3 \sqrt {c+d x} (2 c+5 d x)-12 b^2 (4 c+5 d x)+b^4 d x (4 c+5 d x)\right )\right )}{b^6 d^3} \] Input:
Integrate[x^2*Cos[a + b*Sqrt[c + d*x]],x]
Output:
(120 + (120*I)*b*Sqrt[c + d*x] + I*b^5*d^2*x^2*Sqrt[c + d*x] - (4*I)*b^3*S qrt[c + d*x]*(2*c + 5*d*x) - 12*b^2*(4*c + 5*d*x) + b^4*d*x*(4*c + 5*d*x) + E^((2*I)*(a + b*Sqrt[c + d*x]))*(120 - (120*I)*b*Sqrt[c + d*x] - I*b^5*d ^2*x^2*Sqrt[c + d*x] + (4*I)*b^3*Sqrt[c + d*x]*(2*c + 5*d*x) - 12*b^2*(4*c + 5*d*x) + b^4*d*x*(4*c + 5*d*x)))/(b^6*d^3*E^(I*(a + b*Sqrt[c + d*x])))
Time = 0.50 (sec) , antiderivative size = 348, normalized size of antiderivative = 1.01, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3913, 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 x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx\) |
\(\Big \downarrow \) 3913 |
\(\displaystyle \frac {2 \int \left (\frac {\cos \left (a+b \sqrt {c+d x}\right ) (c+d x)^{5/2}}{d^2}-\frac {2 c \cos \left (a+b \sqrt {c+d x}\right ) (c+d x)^{3/2}}{d^2}+\frac {c^2 \cos \left (a+b \sqrt {c+d x}\right ) \sqrt {c+d x}}{d^2}\right )d\sqrt {c+d x}}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 \left (\frac {120 \cos \left (a+b \sqrt {c+d x}\right )}{b^6 d^2}+\frac {120 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^5 d^2}-\frac {60 (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^2}+\frac {12 c \cos \left (a+b \sqrt {c+d x}\right )}{b^4 d^2}-\frac {20 (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}+\frac {12 c \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b^3 d^2}+\frac {c^2 \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {5 (c+d x)^2 \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}-\frac {6 c (c+d x) \cos \left (a+b \sqrt {c+d x}\right )}{b^2 d^2}+\frac {c^2 \sqrt {c+d x} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}+\frac {(c+d x)^{5/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}-\frac {2 c (c+d x)^{3/2} \sin \left (a+b \sqrt {c+d x}\right )}{b d^2}\right )}{d}\) |
Input:
Int[x^2*Cos[a + b*Sqrt[c + d*x]],x]
Output:
(2*((120*Cos[a + b*Sqrt[c + d*x]])/(b^6*d^2) + (12*c*Cos[a + b*Sqrt[c + d* x]])/(b^4*d^2) + (c^2*Cos[a + b*Sqrt[c + d*x]])/(b^2*d^2) - (60*(c + d*x)* Cos[a + b*Sqrt[c + d*x]])/(b^4*d^2) - (6*c*(c + d*x)*Cos[a + b*Sqrt[c + d* x]])/(b^2*d^2) + (5*(c + d*x)^2*Cos[a + b*Sqrt[c + d*x]])/(b^2*d^2) + (120 *Sqrt[c + d*x]*Sin[a + b*Sqrt[c + d*x]])/(b^5*d^2) + (12*c*Sqrt[c + d*x]*S in[a + b*Sqrt[c + d*x]])/(b^3*d^2) + (c^2*Sqrt[c + d*x]*Sin[a + b*Sqrt[c + d*x]])/(b*d^2) - (20*(c + d*x)^(3/2)*Sin[a + b*Sqrt[c + d*x]])/(b^3*d^2) - (2*c*(c + d*x)^(3/2)*Sin[a + b*Sqrt[c + d*x]])/(b*d^2) + ((c + d*x)^(5/2 )*Sin[a + b*Sqrt[c + d*x]])/(b*d^2)))/d
Int[((a_.) + Cos[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)]*(b_.))^(p_.)*((g_ .) + (h_.)*(x_))^(m_.), x_Symbol] :> Simp[1/(n*f) Subst[Int[ExpandIntegra nd[(a + b*Cos[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m, x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p , 0] && IntegerQ[1/n]
Leaf count of result is larger than twice the leaf count of optimal. \(824\) vs. \(2(310)=620\).
Time = 1.44 (sec) , antiderivative size = 825, normalized size of antiderivative = 2.38
method | result | size |
derivativedivides | \(\frac {-2 a \,c^{2} \sin \left (a +\sqrt {d x +c}\, b \right )+2 c^{2} \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )+\frac {4 a^{3} c \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}-\frac {12 a^{2} c \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}+\frac {12 a c \left (\left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-2 \sin \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {4 c \left (\left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-6 \cos \left (a +\sqrt {d x +c}\, b \right )-6 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {2 a^{5} \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{4}}+\frac {10 a^{4} \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}-\frac {20 a^{3} \left (\left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-2 \sin \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}+\frac {20 a^{2} \left (\left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-6 \cos \left (a +\sqrt {d x +c}\, b \right )-6 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}-\frac {10 a \left (\left (a +\sqrt {d x +c}\, b \right )^{4} \sin \left (a +\sqrt {d x +c}\, b \right )+4 \left (a +\sqrt {d x +c}\, b \right )^{3} \cos \left (a +\sqrt {d x +c}\, b \right )-12 \left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )+24 \sin \left (a +\sqrt {d x +c}\, b \right )-24 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}+\frac {2 \left (\left (a +\sqrt {d x +c}\, b \right )^{5} \sin \left (a +\sqrt {d x +c}\, b \right )+5 \left (a +\sqrt {d x +c}\, b \right )^{4} \cos \left (a +\sqrt {d x +c}\, b \right )-20 \left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )-60 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )+120 \cos \left (a +\sqrt {d x +c}\, b \right )+120 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}}{d^{3} b^{2}}\) | \(825\) |
default | \(\frac {-2 a \,c^{2} \sin \left (a +\sqrt {d x +c}\, b \right )+2 c^{2} \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )+\frac {4 a^{3} c \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}-\frac {12 a^{2} c \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}+\frac {12 a c \left (\left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-2 \sin \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {4 c \left (\left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-6 \cos \left (a +\sqrt {d x +c}\, b \right )-6 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {2 a^{5} \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{4}}+\frac {10 a^{4} \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}-\frac {20 a^{3} \left (\left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-2 \sin \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}+\frac {20 a^{2} \left (\left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-6 \cos \left (a +\sqrt {d x +c}\, b \right )-6 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}-\frac {10 a \left (\left (a +\sqrt {d x +c}\, b \right )^{4} \sin \left (a +\sqrt {d x +c}\, b \right )+4 \left (a +\sqrt {d x +c}\, b \right )^{3} \cos \left (a +\sqrt {d x +c}\, b \right )-12 \left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )+24 \sin \left (a +\sqrt {d x +c}\, b \right )-24 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}+\frac {2 \left (\left (a +\sqrt {d x +c}\, b \right )^{5} \sin \left (a +\sqrt {d x +c}\, b \right )+5 \left (a +\sqrt {d x +c}\, b \right )^{4} \cos \left (a +\sqrt {d x +c}\, b \right )-20 \left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )-60 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )+120 \cos \left (a +\sqrt {d x +c}\, b \right )+120 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{4}}}{d^{3} b^{2}}\) | \(825\) |
parts | \(\frac {2 x^{2} \sqrt {d x +c}\, \sin \left (a +\sqrt {d x +c}\, b \right )}{d b}+\frac {2 x^{2} \cos \left (a +\sqrt {d x +c}\, b \right )}{d \,b^{2}}-\frac {8 \left (2 a c \left (\sin \left (a +\sqrt {d x +c}\, b \right )-\left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )+a^{2} c \cos \left (a +\sqrt {d x +c}\, b \right )-\frac {4 a^{3} \left (\sin \left (a +\sqrt {d x +c}\, b \right )-\left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {a^{4} \cos \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}+\frac {6 a^{2} \left (-\left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )+2 \cos \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {4 a \left (-\left (a +\sqrt {d x +c}\, b \right )^{3} \cos \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-6 \sin \left (a +\sqrt {d x +c}\, b \right )+6 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-c \left (-\left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )+2 \cos \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )+\frac {-\left (a +\sqrt {d x +c}\, b \right )^{4} \cos \left (a +\sqrt {d x +c}\, b \right )+4 \left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+12 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-24 \cos \left (a +\sqrt {d x +c}\, b \right )-24 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}-c \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )+a c \sin \left (a +\sqrt {d x +c}\, b \right )+\frac {3 a^{2} \left (\cos \left (a +\sqrt {d x +c}\, b \right )+\left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}-\frac {a^{3} \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}-\frac {3 a \left (\left (a +\sqrt {d x +c}\, b \right )^{2} \sin \left (a +\sqrt {d x +c}\, b \right )-2 \sin \left (a +\sqrt {d x +c}\, b \right )+2 \left (a +\sqrt {d x +c}\, b \right ) \cos \left (a +\sqrt {d x +c}\, b \right )\right )}{b^{2}}+\frac {\left (a +\sqrt {d x +c}\, b \right )^{3} \sin \left (a +\sqrt {d x +c}\, b \right )+3 \left (a +\sqrt {d x +c}\, b \right )^{2} \cos \left (a +\sqrt {d x +c}\, b \right )-6 \cos \left (a +\sqrt {d x +c}\, b \right )-6 \left (a +\sqrt {d x +c}\, b \right ) \sin \left (a +\sqrt {d x +c}\, b \right )}{b^{2}}\right )}{d^{3} b^{4}}\) | \(848\) |
Input:
int(x^2*cos(a+(d*x+c)^(1/2)*b),x,method=_RETURNVERBOSE)
Output:
2/d^3/b^2*(-a*c^2*sin(a+(d*x+c)^(1/2)*b)+c^2*(cos(a+(d*x+c)^(1/2)*b)+(a+(d *x+c)^(1/2)*b)*sin(a+(d*x+c)^(1/2)*b))+2/b^2*a^3*c*sin(a+(d*x+c)^(1/2)*b)- 6/b^2*a^2*c*(cos(a+(d*x+c)^(1/2)*b)+(a+(d*x+c)^(1/2)*b)*sin(a+(d*x+c)^(1/2 )*b))+6/b^2*a*c*((a+(d*x+c)^(1/2)*b)^2*sin(a+(d*x+c)^(1/2)*b)-2*sin(a+(d*x +c)^(1/2)*b)+2*(a+(d*x+c)^(1/2)*b)*cos(a+(d*x+c)^(1/2)*b))-2/b^2*c*((a+(d* x+c)^(1/2)*b)^3*sin(a+(d*x+c)^(1/2)*b)+3*(a+(d*x+c)^(1/2)*b)^2*cos(a+(d*x+ c)^(1/2)*b)-6*cos(a+(d*x+c)^(1/2)*b)-6*(a+(d*x+c)^(1/2)*b)*sin(a+(d*x+c)^( 1/2)*b))-1/b^4*a^5*sin(a+(d*x+c)^(1/2)*b)+5/b^4*a^4*(cos(a+(d*x+c)^(1/2)*b )+(a+(d*x+c)^(1/2)*b)*sin(a+(d*x+c)^(1/2)*b))-10/b^4*a^3*((a+(d*x+c)^(1/2) *b)^2*sin(a+(d*x+c)^(1/2)*b)-2*sin(a+(d*x+c)^(1/2)*b)+2*(a+(d*x+c)^(1/2)*b )*cos(a+(d*x+c)^(1/2)*b))+10/b^4*a^2*((a+(d*x+c)^(1/2)*b)^3*sin(a+(d*x+c)^ (1/2)*b)+3*(a+(d*x+c)^(1/2)*b)^2*cos(a+(d*x+c)^(1/2)*b)-6*cos(a+(d*x+c)^(1 /2)*b)-6*(a+(d*x+c)^(1/2)*b)*sin(a+(d*x+c)^(1/2)*b))-5/b^4*a*((a+(d*x+c)^( 1/2)*b)^4*sin(a+(d*x+c)^(1/2)*b)+4*(a+(d*x+c)^(1/2)*b)^3*cos(a+(d*x+c)^(1/ 2)*b)-12*(a+(d*x+c)^(1/2)*b)^2*sin(a+(d*x+c)^(1/2)*b)+24*sin(a+(d*x+c)^(1/ 2)*b)-24*(a+(d*x+c)^(1/2)*b)*cos(a+(d*x+c)^(1/2)*b))+1/b^4*((a+(d*x+c)^(1/ 2)*b)^5*sin(a+(d*x+c)^(1/2)*b)+5*(a+(d*x+c)^(1/2)*b)^4*cos(a+(d*x+c)^(1/2) *b)-20*(a+(d*x+c)^(1/2)*b)^3*sin(a+(d*x+c)^(1/2)*b)-60*(a+(d*x+c)^(1/2)*b) ^2*cos(a+(d*x+c)^(1/2)*b)+120*cos(a+(d*x+c)^(1/2)*b)+120*(a+(d*x+c)^(1/2)* b)*sin(a+(d*x+c)^(1/2)*b)))
Time = 0.08 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.30 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {2 \, {\left ({\left (b^{5} d^{2} x^{2} - 20 \, b^{3} d x - 8 \, b^{3} c + 120 \, b\right )} \sqrt {d x + c} \sin \left (\sqrt {d x + c} b + a\right ) + {\left (5 \, b^{4} d^{2} x^{2} - 48 \, b^{2} c + 4 \, {\left (b^{4} c - 15 \, b^{2}\right )} d x + 120\right )} \cos \left (\sqrt {d x + c} b + a\right )\right )}}{b^{6} d^{3}} \] Input:
integrate(x^2*cos(a+b*(d*x+c)^(1/2)),x, algorithm="fricas")
Output:
2*((b^5*d^2*x^2 - 20*b^3*d*x - 8*b^3*c + 120*b)*sqrt(d*x + c)*sin(sqrt(d*x + c)*b + a) + (5*b^4*d^2*x^2 - 48*b^2*c + 4*(b^4*c - 15*b^2)*d*x + 120)*c os(sqrt(d*x + c)*b + a))/(b^6*d^3)
Time = 0.34 (sec) , antiderivative size = 269, normalized size of antiderivative = 0.78 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\begin {cases} \frac {x^{3} \cos {\left (a \right )}}{3} & \text {for}\: b = 0 \wedge \left (b = 0 \vee d = 0\right ) \\\frac {x^{3} \cos {\left (a + b \sqrt {c} \right )}}{3} & \text {for}\: d = 0 \\\frac {2 x^{2} \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b d} + \frac {8 c x \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{2} d^{2}} + \frac {10 x^{2} \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{2} d} - \frac {16 c \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b^{3} d^{3}} - \frac {40 x \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b^{3} d^{2}} - \frac {96 c \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{4} d^{3}} - \frac {120 x \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{4} d^{2}} + \frac {240 \sqrt {c + d x} \sin {\left (a + b \sqrt {c + d x} \right )}}{b^{5} d^{3}} + \frac {240 \cos {\left (a + b \sqrt {c + d x} \right )}}{b^{6} d^{3}} & \text {otherwise} \end {cases} \] Input:
integrate(x**2*cos(a+b*(d*x+c)**(1/2)),x)
Output:
Piecewise((x**3*cos(a)/3, Eq(b, 0) & (Eq(b, 0) | Eq(d, 0))), (x**3*cos(a + b*sqrt(c))/3, Eq(d, 0)), (2*x**2*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/( b*d) + 8*c*x*cos(a + b*sqrt(c + d*x))/(b**2*d**2) + 10*x**2*cos(a + b*sqrt (c + d*x))/(b**2*d) - 16*c*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/(b**3*d* *3) - 40*x*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/(b**3*d**2) - 96*c*cos(a + b*sqrt(c + d*x))/(b**4*d**3) - 120*x*cos(a + b*sqrt(c + d*x))/(b**4*d** 2) + 240*sqrt(c + d*x)*sin(a + b*sqrt(c + d*x))/(b**5*d**3) + 240*cos(a + b*sqrt(c + d*x))/(b**6*d**3), True))
Leaf count of result is larger than twice the leaf count of optimal. 672 vs. \(2 (310) = 620\).
Time = 0.06 (sec) , antiderivative size = 672, normalized size of antiderivative = 1.94 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx =\text {Too large to display} \] Input:
integrate(x^2*cos(a+b*(d*x+c)^(1/2)),x, algorithm="maxima")
Output:
-2*(a*c^2*sin(sqrt(d*x + c)*b + a) - ((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b + a))*c^2 - 2*a^3*c*sin(sqrt(d*x + c)*b + a)/b^2 + 6*((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b + a))*a^2*c/b^2 + a^5*sin(sqrt(d*x + c)*b + a)/b^4 - 5*((sqrt(d*x + c)*b + a)*sin(sqrt(d*x + c)*b + a) + cos(sqrt(d*x + c)*b + a))*a^4/b^4 - 6*(2*(sqrt(d*x + c)*b + a)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^2 - 2)*sin(sqrt(d*x + c)*b + a))*a*c/b^2 + 10*(2*(sqrt(d*x + c)*b + a) *cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^2 - 2)*sin(sqrt(d*x + c )*b + a))*a^3/b^4 + 2*(3*((sqrt(d*x + c)*b + a)^2 - 2)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^3 - 6*sqrt(d*x + c)*b - 6*a)*sin(sqrt(d*x + c)*b + a))*c/b^2 - 10*(3*((sqrt(d*x + c)*b + a)^2 - 2)*cos(sqrt(d*x + c)* b + a) + ((sqrt(d*x + c)*b + a)^3 - 6*sqrt(d*x + c)*b - 6*a)*sin(sqrt(d*x + c)*b + a))*a^2/b^4 + 5*(4*((sqrt(d*x + c)*b + a)^3 - 6*sqrt(d*x + c)*b - 6*a)*cos(sqrt(d*x + c)*b + a) + ((sqrt(d*x + c)*b + a)^4 - 12*(sqrt(d*x + c)*b + a)^2 + 24)*sin(sqrt(d*x + c)*b + a))*a/b^4 - (5*((sqrt(d*x + c)*b + a)^4 - 12*(sqrt(d*x + c)*b + a)^2 + 24)*cos(sqrt(d*x + c)*b + a) + ((sqr t(d*x + c)*b + a)^5 - 20*(sqrt(d*x + c)*b + a)^3 + 120*sqrt(d*x + c)*b + 1 20*a)*sin(sqrt(d*x + c)*b + a))/b^4)/(b^2*d^3)
Time = 0.33 (sec) , antiderivative size = 474, normalized size of antiderivative = 1.37 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {2 \, {\left (\frac {{\left (b^{4} c^{2} - 6 \, {\left (\sqrt {d x + c} b + a\right )}^{2} b^{2} c + 12 \, {\left (\sqrt {d x + c} b + a\right )} a b^{2} c - 6 \, a^{2} b^{2} c + 5 \, {\left (\sqrt {d x + c} b + a\right )}^{4} - 20 \, {\left (\sqrt {d x + c} b + a\right )}^{3} a + 30 \, {\left (\sqrt {d x + c} b + a\right )}^{2} a^{2} - 20 \, {\left (\sqrt {d x + c} b + a\right )} a^{3} + 5 \, a^{4} + 12 \, b^{2} c - 60 \, {\left (\sqrt {d x + c} b + a\right )}^{2} + 120 \, {\left (\sqrt {d x + c} b + a\right )} a - 60 \, a^{2} + 120\right )} \cos \left (\sqrt {d x + c} b + a\right )}{b^{4}} + \frac {{\left ({\left (\sqrt {d x + c} b + a\right )} b^{4} c^{2} - a b^{4} c^{2} - 2 \, {\left (\sqrt {d x + c} b + a\right )}^{3} b^{2} c + 6 \, {\left (\sqrt {d x + c} b + a\right )}^{2} a b^{2} c - 6 \, {\left (\sqrt {d x + c} b + a\right )} a^{2} b^{2} c + 2 \, a^{3} b^{2} c + {\left (\sqrt {d x + c} b + a\right )}^{5} - 5 \, {\left (\sqrt {d x + c} b + a\right )}^{4} a + 10 \, {\left (\sqrt {d x + c} b + a\right )}^{3} a^{2} - 10 \, {\left (\sqrt {d x + c} b + a\right )}^{2} a^{3} + 5 \, {\left (\sqrt {d x + c} b + a\right )} a^{4} - a^{5} + 12 \, {\left (\sqrt {d x + c} b + a\right )} b^{2} c - 12 \, a b^{2} c - 20 \, {\left (\sqrt {d x + c} b + a\right )}^{3} + 60 \, {\left (\sqrt {d x + c} b + a\right )}^{2} a - 60 \, {\left (\sqrt {d x + c} b + a\right )} a^{2} + 20 \, a^{3} + 120 \, \sqrt {d x + c} b\right )} \sin \left (\sqrt {d x + c} b + a\right )}{b^{4}}\right )}}{b^{2} d^{3}} \] Input:
integrate(x^2*cos(a+b*(d*x+c)^(1/2)),x, algorithm="giac")
Output:
2*((b^4*c^2 - 6*(sqrt(d*x + c)*b + a)^2*b^2*c + 12*(sqrt(d*x + c)*b + a)*a *b^2*c - 6*a^2*b^2*c + 5*(sqrt(d*x + c)*b + a)^4 - 20*(sqrt(d*x + c)*b + a )^3*a + 30*(sqrt(d*x + c)*b + a)^2*a^2 - 20*(sqrt(d*x + c)*b + a)*a^3 + 5* a^4 + 12*b^2*c - 60*(sqrt(d*x + c)*b + a)^2 + 120*(sqrt(d*x + c)*b + a)*a - 60*a^2 + 120)*cos(sqrt(d*x + c)*b + a)/b^4 + ((sqrt(d*x + c)*b + a)*b^4* c^2 - a*b^4*c^2 - 2*(sqrt(d*x + c)*b + a)^3*b^2*c + 6*(sqrt(d*x + c)*b + a )^2*a*b^2*c - 6*(sqrt(d*x + c)*b + a)*a^2*b^2*c + 2*a^3*b^2*c + (sqrt(d*x + c)*b + a)^5 - 5*(sqrt(d*x + c)*b + a)^4*a + 10*(sqrt(d*x + c)*b + a)^3*a ^2 - 10*(sqrt(d*x + c)*b + a)^2*a^3 + 5*(sqrt(d*x + c)*b + a)*a^4 - a^5 + 12*(sqrt(d*x + c)*b + a)*b^2*c - 12*a*b^2*c - 20*(sqrt(d*x + c)*b + a)^3 + 60*(sqrt(d*x + c)*b + a)^2*a - 60*(sqrt(d*x + c)*b + a)*a^2 + 20*a^3 + 12 0*sqrt(d*x + c)*b)*sin(sqrt(d*x + c)*b + a)/b^4)/(b^2*d^3)
Timed out. \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\int x^2\,\cos \left (a+b\,\sqrt {c+d\,x}\right ) \,d x \] Input:
int(x^2*cos(a + b*(c + d*x)^(1/2)),x)
Output:
int(x^2*cos(a + b*(c + d*x)^(1/2)), x)
Time = 0.17 (sec) , antiderivative size = 192, normalized size of antiderivative = 0.55 \[ \int x^2 \cos \left (a+b \sqrt {c+d x}\right ) \, dx=\frac {8 \cos \left (\sqrt {d x +c}\, b +a \right ) b^{4} c d x +10 \cos \left (\sqrt {d x +c}\, b +a \right ) b^{4} d^{2} x^{2}-96 \cos \left (\sqrt {d x +c}\, b +a \right ) b^{2} c -120 \cos \left (\sqrt {d x +c}\, b +a \right ) b^{2} d x +240 \cos \left (\sqrt {d x +c}\, b +a \right )+2 \sqrt {d x +c}\, \sin \left (\sqrt {d x +c}\, b +a \right ) b^{5} d^{2} x^{2}-16 \sqrt {d x +c}\, \sin \left (\sqrt {d x +c}\, b +a \right ) b^{3} c -40 \sqrt {d x +c}\, \sin \left (\sqrt {d x +c}\, b +a \right ) b^{3} d x +240 \sqrt {d x +c}\, \sin \left (\sqrt {d x +c}\, b +a \right ) b}{b^{6} d^{3}} \] Input:
int(x^2*cos(a+b*(d*x+c)^(1/2)),x)
Output:
(2*(4*cos(sqrt(c + d*x)*b + a)*b**4*c*d*x + 5*cos(sqrt(c + d*x)*b + a)*b** 4*d**2*x**2 - 48*cos(sqrt(c + d*x)*b + a)*b**2*c - 60*cos(sqrt(c + d*x)*b + a)*b**2*d*x + 120*cos(sqrt(c + d*x)*b + a) + sqrt(c + d*x)*sin(sqrt(c + d*x)*b + a)*b**5*d**2*x**2 - 8*sqrt(c + d*x)*sin(sqrt(c + d*x)*b + a)*b**3 *c - 20*sqrt(c + d*x)*sin(sqrt(c + d*x)*b + a)*b**3*d*x + 120*sqrt(c + d*x )*sin(sqrt(c + d*x)*b + a)*b))/(b**6*d**3)