3.205 \(\int \frac {-1+\frac {c^2}{d^2}+\sin ^2(x)}{c+d \cos (x)} \, dx\)

Optimal. Leaf size=14 \[ \frac {c x}{d^2}-\frac {\sin (x)}{d} \]

[Out]

c*x/d^2-sin(x)/d

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {4397, 3016, 2637} \[ \frac {c x}{d^2}-\frac {\sin (x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + c^2/d^2 + Sin[x]^2)/(c + d*Cos[x]),x]

[Out]

(c*x)/d^2 - Sin[x]/d

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3016

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[
C/b^2, Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[-a + b*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C, m}, x
] && EqQ[A*b^2 + a^2*C, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \frac {-1+\frac {c^2}{d^2}+\sin ^2(x)}{c+d \cos (x)} \, dx &=\int \frac {\frac {c^2}{d^2}-\cos ^2(x)}{c+d \cos (x)} \, dx\\ &=-\frac {\int (-c+d \cos (x)) \, dx}{d^2}\\ &=\frac {c x}{d^2}-\frac {\int \cos (x) \, dx}{d}\\ &=\frac {c x}{d^2}-\frac {\sin (x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 14, normalized size = 1.00 \[ \frac {c x}{d^2}-\frac {\sin (x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(-1 + c^2/d^2 + Sin[x]^2)/(c + d*Cos[x]),x]

[Out]

(c*x)/d^2 - Sin[x]/d

________________________________________________________________________________________

fricas [A]  time = 0.63, size = 13, normalized size = 0.93 \[ \frac {c x - d \sin \relax (x)}{d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+c^2/d^2+sin(x)^2)/(c+d*cos(x)),x, algorithm="fricas")

[Out]

(c*x - d*sin(x))/d^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 26, normalized size = 1.86 \[ \frac {c x}{d^{2}} - \frac {2 \, \tan \left (\frac {1}{2} \, x\right )}{{\left (\tan \left (\frac {1}{2} \, x\right )^{2} + 1\right )} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+c^2/d^2+sin(x)^2)/(c+d*cos(x)),x, algorithm="giac")

[Out]

c*x/d^2 - 2*tan(1/2*x)/((tan(1/2*x)^2 + 1)*d)

________________________________________________________________________________________

maple [B]  time = 0.10, size = 32, normalized size = 2.29 \[ -\frac {2 \tan \left (\frac {x}{2}\right )}{d \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}+\frac {2 c \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-1+c^2/d^2+sin(x)^2)/(c+d*cos(x)),x)

[Out]

-2/d*tan(1/2*x)/(1+tan(1/2*x)^2)+2/d^2*c*arctan(tan(1/2*x))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+c^2/d^2+sin(x)^2)/(c+d*cos(x)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*d^2-4*c^2>0)', see `assume?`
 for more details)Is 4*d^2-4*c^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 2.47, size = 13, normalized size = 0.93 \[ \frac {c\,x-d\,\sin \relax (x)}{d^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((sin(x)^2 + c^2/d^2 - 1)/(c + d*cos(x)),x)

[Out]

(c*x - d*sin(x))/d^2

________________________________________________________________________________________

sympy [B]  time = 56.76, size = 61, normalized size = 4.36 \[ \frac {c x \tan ^{2}{\left (\frac {x}{2} \right )}}{d^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + d^{2}} + \frac {c x}{d^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + d^{2}} - \frac {2 d \tan {\left (\frac {x}{2} \right )}}{d^{2} \tan ^{2}{\left (\frac {x}{2} \right )} + d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-1+c**2/d**2+sin(x)**2)/(c+d*cos(x)),x)

[Out]

c*x*tan(x/2)**2/(d**2*tan(x/2)**2 + d**2) + c*x/(d**2*tan(x/2)**2 + d**2) - 2*d*tan(x/2)/(d**2*tan(x/2)**2 + d
**2)

________________________________________________________________________________________