3.115 \(\int \cos ^2(a+b x) \, dx\)

Optimal. Leaf size=25 \[ \frac{\sin (a+b x) \cos (a+b x)}{2 b}+\frac{x}{2} \]

[Out]

x/2 + (Cos[a + b*x]*Sin[a + b*x])/(2*b)

_______________________________________________________________________________________

Rubi [A]  time = 0.0182586, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25 \[ \frac{\sin (a+b x) \cos (a+b x)}{2 b}+\frac{x}{2} \]

Antiderivative was successfully verified.

[In]  Int[Cos[a + b*x]^2,x]

[Out]

x/2 + (Cos[a + b*x]*Sin[a + b*x])/(2*b)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 0.712147, size = 19, normalized size = 0.76 \[ \frac{x}{2} + \frac{\sin{\left (a + b x \right )} \cos{\left (a + b x \right )}}{2 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(cos(b*x+a)**2,x)

[Out]

x/2 + sin(a + b*x)*cos(a + b*x)/(2*b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0222123, size = 23, normalized size = 0.92 \[ \frac{2 (a+b x)+\sin (2 (a+b x))}{4 b} \]

Antiderivative was successfully verified.

[In]  Integrate[Cos[a + b*x]^2,x]

[Out]

(2*(a + b*x) + Sin[2*(a + b*x)])/(4*b)

_______________________________________________________________________________________

Maple [A]  time = 0.004, size = 27, normalized size = 1.1 \[{\frac{1}{b} \left ({\frac{\cos \left ( bx+a \right ) \sin \left ( bx+a \right ) }{2}}+{\frac{bx}{2}}+{\frac{a}{2}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(cos(b*x+a)^2,x)

[Out]

1/b*(1/2*cos(b*x+a)*sin(b*x+a)+1/2*b*x+1/2*a)

_______________________________________________________________________________________

Maxima [A]  time = 1.38177, size = 30, normalized size = 1.2 \[ \frac{2 \, b x + 2 \, a + \sin \left (2 \, b x + 2 \, a\right )}{4 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(b*x + a)^2,x, algorithm="maxima")

[Out]

1/4*(2*b*x + 2*a + sin(2*b*x + 2*a))/b

_______________________________________________________________________________________

Fricas [A]  time = 0.244026, size = 30, normalized size = 1.2 \[ \frac{b x + \cos \left (b x + a\right ) \sin \left (b x + a\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(b*x + a)^2,x, algorithm="fricas")

[Out]

1/2*(b*x + cos(b*x + a)*sin(b*x + a))/b

_______________________________________________________________________________________

Sympy [A]  time = 0.263376, size = 46, normalized size = 1.84 \[ \begin{cases} \frac{x \sin ^{2}{\left (a + b x \right )}}{2} + \frac{x \cos ^{2}{\left (a + b x \right )}}{2} + \frac{\sin{\left (a + b x \right )} \cos{\left (a + b x \right )}}{2 b} & \text{for}\: b \neq 0 \\x \cos ^{2}{\left (a \right )} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(b*x+a)**2,x)

[Out]

Piecewise((x*sin(a + b*x)**2/2 + x*cos(a + b*x)**2/2 + sin(a + b*x)*cos(a + b*x)
/(2*b), Ne(b, 0)), (x*cos(a)**2, True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.20044, size = 24, normalized size = 0.96 \[ \frac{1}{2} \, x + \frac{\sin \left (2 \, b x + 2 \, a\right )}{4 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(cos(b*x + a)^2,x, algorithm="giac")

[Out]

1/2*x + 1/4*sin(2*b*x + 2*a)/b