Integrand size = 27, antiderivative size = 118 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {2 b^3 \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a \left (a^2-b^2\right )^{3/2} d}-\frac {\text {arctanh}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d}+\frac {b \sec (c+d x) (b-a \sin (c+d x))}{a \left (a^2-b^2\right ) d} \] Output:
2*b^3*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2))/a/(a^2-b^2)^(3/2)/d -arctanh(cos(d*x+c))/a/d+sec(d*x+c)/a/d+b*sec(d*x+c)*(b-a*sin(d*x+c))/a/(a ^2-b^2)/d
Time = 1.35 (sec) , antiderivative size = 191, normalized size of antiderivative = 1.62 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {2 b^3 \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right ) \cos (c+d x)+\sqrt {a^2-b^2} \left (-\left (\left (a^2-b^2\right ) \cos (c+d x) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )+a (a-b \sin (c+d x))\right )}{a (a-b) (a+b) \sqrt {a^2-b^2} d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \] Input:
Integrate[(Csc[c + d*x]*Sec[c + d*x]^2)/(a + b*Sin[c + d*x]),x]
Output:
(2*b^3*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]]*Cos[c + d*x] + Sqr t[a^2 - b^2]*(-((a^2 - b^2)*Cos[c + d*x]*(Log[Cos[(c + d*x)/2]] - Log[Sin[ (c + d*x)/2]])) + a*(a - b*Sin[c + d*x])))/(a*(a - b)*(a + b)*Sqrt[a^2 - b ^2]*d*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*(Cos[(c + d*x)/2] + Sin[(c + d *x)/2]))
Time = 0.48 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {3042, 3377, 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 \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\sin (c+d x) \cos (c+d x)^2 (a+b \sin (c+d x))}dx\) |
\(\Big \downarrow \) 3377 |
\(\displaystyle \int \left (\frac {\csc (c+d x) \sec ^2(c+d x)}{a}-\frac {b \sec ^2(c+d x)}{a (a+b \sin (c+d x))}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 b^3 \arctan \left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a d \left (a^2-b^2\right )^{3/2}}+\frac {b \sec (c+d x) (b-a \sin (c+d x))}{a d \left (a^2-b^2\right )}-\frac {\text {arctanh}(\cos (c+d x))}{a d}+\frac {\sec (c+d x)}{a d}\) |
Input:
Int[(Csc[c + d*x]*Sec[c + d*x]^2)/(a + b*Sin[c + d*x]),x]
Output:
(2*b^3*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a*(a^2 - b^2)^(3 /2)*d) - ArcTanh[Cos[c + d*x]]/(a*d) + Sec[c + d*x]/(a*d) + (b*Sec[c + d*x ]*(b - a*Sin[c + d*x]))/(a*(a^2 - b^2)*d)
Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*sin[(e_.) + (f_.)*(x_)]^(n_))/((a _) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, sin[e + f*x]^n/(a + b*sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[n] && (LtQ[n, 0] || IGtQ[p + 1/ 2, 0])
Time = 0.54 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.03
method | result | size |
derivativedivides | \(\frac {\frac {1}{\left (a -b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{\left (a +b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 b^{3} \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a -b \right ) \left (a +b \right ) a \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(122\) |
default | \(\frac {\frac {1}{\left (a -b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {1}{\left (a +b \right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {2 b^{3} \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a -b \right ) \left (a +b \right ) a \sqrt {a^{2}-b^{2}}}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{d}\) | \(122\) |
risch | \(\frac {2 i \left (i a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{d \left (-a^{2}+b^{2}\right ) \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {i b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a +a^{2}-b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d a}-\frac {i b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i \left (\sqrt {a^{2}-b^{2}}\, a -a^{2}+b^{2}\right )}{b \sqrt {a^{2}-b^{2}}}\right )}{\sqrt {a^{2}-b^{2}}\, \left (a +b \right ) \left (a -b \right ) d a}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}\) | \(256\) |
Input:
int(csc(d*x+c)*sec(d*x+c)^2/(a+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
1/d*(1/(a-b)/(tan(1/2*d*x+1/2*c)+1)-1/(a+b)/(tan(1/2*d*x+1/2*c)-1)+2*b^3/( a-b)/(a+b)/a/(a^2-b^2)^(1/2)*arctan(1/2*(2*a*tan(1/2*d*x+1/2*c)+2*b)/(a^2- b^2)^(1/2))+1/a*ln(tan(1/2*d*x+1/2*c)))
Time = 0.22 (sec) , antiderivative size = 457, normalized size of antiderivative = 3.87 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\left [\frac {\sqrt {-a^{2} + b^{2}} b^{3} \cos \left (d x + c\right ) \log \left (-\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} - 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right ) + 2 \, a^{4} - 2 \, a^{2} b^{2} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 2 \, {\left (a^{3} b - a b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d \cos \left (d x + c\right )}, -\frac {2 \, \sqrt {a^{2} - b^{2}} b^{3} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right ) \cos \left (d x + c\right ) - 2 \, a^{4} + 2 \, a^{2} b^{2} + {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (a^{3} b - a b^{3}\right )} \sin \left (d x + c\right )}{2 \, {\left (a^{5} - 2 \, a^{3} b^{2} + a b^{4}\right )} d \cos \left (d x + c\right )}\right ] \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="fricas")
Output:
[1/2*(sqrt(-a^2 + b^2)*b^3*cos(d*x + c)*log(-((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 - 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos (d*x + c))*sqrt(-a^2 + b^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^ 2 - b^2)) + 2*a^4 - 2*a^2*b^2 - (a^4 - 2*a^2*b^2 + b^4)*cos(d*x + c)*log(1 /2*cos(d*x + c) + 1/2) + (a^4 - 2*a^2*b^2 + b^4)*cos(d*x + c)*log(-1/2*cos (d*x + c) + 1/2) - 2*(a^3*b - a*b^3)*sin(d*x + c))/((a^5 - 2*a^3*b^2 + a*b ^4)*d*cos(d*x + c)), -1/2*(2*sqrt(a^2 - b^2)*b^3*arctan(-(a*sin(d*x + c) + b)/(sqrt(a^2 - b^2)*cos(d*x + c)))*cos(d*x + c) - 2*a^4 + 2*a^2*b^2 + (a^ 4 - 2*a^2*b^2 + b^4)*cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2) - (a^4 - 2*a ^2*b^2 + b^4)*cos(d*x + c)*log(-1/2*cos(d*x + c) + 1/2) + 2*(a^3*b - a*b^3 )*sin(d*x + c))/((a^5 - 2*a^3*b^2 + a*b^4)*d*cos(d*x + c))]
\[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\int \frac {\csc {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \] Input:
integrate(csc(d*x+c)*sec(d*x+c)**2/(a+b*sin(d*x+c)),x)
Output:
Integral(csc(c + d*x)*sec(c + d*x)**2/(a + b*sin(c + d*x)), x)
Exception generated. \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.21 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.14 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {\frac {2 \, {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} b^{3}}{{\left (a^{3} - a b^{2}\right )} \sqrt {a^{2} - b^{2}}} + \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} + \frac {2 \, {\left (b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a\right )}}{{\left (a^{2} - b^{2}\right )} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}}}{d} \] Input:
integrate(csc(d*x+c)*sec(d*x+c)^2/(a+b*sin(d*x+c)),x, algorithm="giac")
Output:
(2*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*d*x + 1/2* c) + b)/sqrt(a^2 - b^2)))*b^3/((a^3 - a*b^2)*sqrt(a^2 - b^2)) + log(abs(ta n(1/2*d*x + 1/2*c)))/a + 2*(b*tan(1/2*d*x + 1/2*c) - a)/((a^2 - b^2)*(tan( 1/2*d*x + 1/2*c)^2 - 1)))/d
Time = 20.73 (sec) , antiderivative size = 659, normalized size of antiderivative = 5.58 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {a^6\,\cos \left (c+d\,x\right )+a^6+a^2\,b^4-2\,a^4\,b^2+a^6\,\cos \left (c+d\,x\right )\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-b^6\,\cos \left (c+d\,x\right )\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+a^2\,b^4\,\cos \left (c+d\,x\right )-2\,a^4\,b^2\,\cos \left (c+d\,x\right )+2\,a^3\,b^3\,\sin \left (c+d\,x\right )-a\,b^5\,\sin \left (c+d\,x\right )-a^5\,b\,\sin \left (c+d\,x\right )+3\,a^2\,b^4\,\cos \left (c+d\,x\right )\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-3\,a^4\,b^2\,\cos \left (c+d\,x\right )\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )+b^3\,\cos \left (c+d\,x\right )\,\mathrm {atan}\left (\frac {a^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,1{}\mathrm {i}+b^4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,4{}\mathrm {i}-a^2\,b^2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,3{}\mathrm {i}+a\,b^3\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,2{}\mathrm {i}-a^3\,b\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^7+2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^6\,b-3\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^5\,b^2-7\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^4\,b^3+4\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3\,b^4+9\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b^5-2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a\,b^6-4\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^7}\right )\,\sqrt {-a^6+3\,a^4\,b^2-3\,a^2\,b^4+b^6}\,2{}\mathrm {i}}{a\,d\,\cos \left (c+d\,x\right )\,\left (a^2-b^2\right )\,\left (a^4-2\,a^2\,b^2+b^4\right )} \] Input:
int(1/(cos(c + d*x)^2*sin(c + d*x)*(a + b*sin(c + d*x))),x)
Output:
(a^6*cos(c + d*x) + a^6 + a^2*b^4 - 2*a^4*b^2 + a^6*cos(c + d*x)*log(sin(c /2 + (d*x)/2)/cos(c/2 + (d*x)/2)) - b^6*cos(c + d*x)*log(sin(c/2 + (d*x)/2 )/cos(c/2 + (d*x)/2)) + a^2*b^4*cos(c + d*x) - 2*a^4*b^2*cos(c + d*x) + 2* a^3*b^3*sin(c + d*x) - a*b^5*sin(c + d*x) - a^5*b*sin(c + d*x) + b^3*cos(c + d*x)*atan((a^4*sin(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^( 1/2)*1i + b^4*sin(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2) *4i - a^2*b^2*sin(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2) *3i + a*b^3*cos(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2)*2 i - a^3*b*cos(c/2 + (d*x)/2)*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2)*1i) /(a^7*cos(c/2 + (d*x)/2) - 4*b^7*sin(c/2 + (d*x)/2) - 2*a*b^6*cos(c/2 + (d *x)/2) + 2*a^6*b*sin(c/2 + (d*x)/2) + 4*a^3*b^4*cos(c/2 + (d*x)/2) - 3*a^5 *b^2*cos(c/2 + (d*x)/2) + 9*a^2*b^5*sin(c/2 + (d*x)/2) - 7*a^4*b^3*sin(c/2 + (d*x)/2)))*(b^6 - a^6 - 3*a^2*b^4 + 3*a^4*b^2)^(1/2)*2i + 3*a^2*b^4*cos (c + d*x)*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)) - 3*a^4*b^2*cos(c + d *x)*log(sin(c/2 + (d*x)/2)/cos(c/2 + (d*x)/2)))/(a*d*cos(c + d*x)*(a^2 - b ^2)*(a^4 + b^4 - 2*a^2*b^2))
Time = 0.19 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.72 \[ \int \frac {\csc (c+d x) \sec ^2(c+d x)}{a+b \sin (c+d x)} \, dx=\frac {2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \cos \left (d x +c \right ) b^{3}+\cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{4}-2 \cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a^{2} b^{2}+\cos \left (d x +c \right ) \mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) b^{4}-\cos \left (d x +c \right ) a^{4}+\cos \left (d x +c \right ) a^{2} b^{2}-\sin \left (d x +c \right ) a^{3} b +\sin \left (d x +c \right ) a \,b^{3}+a^{4}-a^{2} b^{2}}{\cos \left (d x +c \right ) a d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )} \] Input:
int(csc(d*x+c)*sec(d*x+c)^2/(a+b*sin(d*x+c)),x)
Output:
(2*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*cos( c + d*x)*b**3 + cos(c + d*x)*log(tan((c + d*x)/2))*a**4 - 2*cos(c + d*x)*l og(tan((c + d*x)/2))*a**2*b**2 + cos(c + d*x)*log(tan((c + d*x)/2))*b**4 - cos(c + d*x)*a**4 + cos(c + d*x)*a**2*b**2 - sin(c + d*x)*a**3*b + sin(c + d*x)*a*b**3 + a**4 - a**2*b**2)/(cos(c + d*x)*a*d*(a**4 - 2*a**2*b**2 + b**4))