lst:=[[cot(b*x+a),x,1,ln(sin(b*x+a))/b,1], [cot(b*x+a)^2,x,2,-x-cot(b*x+a)/b,1], [cot(b*x+a)^3,x,2,-1/2*cot(b*x+a)^2/b-ln(sin(b*x+a))/b,1], [cot(b*x+a)^4,x,3,x+cot(b*x+a)/b-1/3*cot(b*x+a)^3/b,1], [cot(b*x+a)^5,x,3,1/2*cot(b*x+a)^2/b-1/4*cot(b*x+a)^4/b+ln(sin(b*x+a))/b,1], [cot(b*x+a)^6,x,4,-x-cot(b*x+a)/b+1/3*cot(b*x+a)^3/b-1/5*cot(b*x+a)^5/b,1], [cot(b*x+a)^7,x,4,-1/2*cot(b*x+a)^2/b+1/4*cot(b*x+a)^4/b-1/6*cot(b*x+a)^6/b-ln(sin(b*x+a))/b,1], [cot(b*x+a)^8,x,5,x+cot(b*x+a)/b-1/3*cot(b*x+a)^3/b+1/5*cot(b*x+a)^5/b-1/7*cot(b*x+a)^7/b,1], [(c*cot(b*x+a))^(7/2),x,12,c^(7/2)*arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b-c^(7/2)*arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b-c^(7/2)*arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b+2*c^3*sqrt(c*cot(b*x+a))/b-2/5*c*(c*cot(b*x+a))^(5/2)/b,1], [(c*cot(b*x+a))^(5/2),x,11,-c^(5/2)*arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b+c^(5/2)*arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b-c^(5/2)*arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b-2/3*c*(c*cot(b*x+a))^(3/2)/b,1], [(c*cot(b*x+a))^(3/2),x,11,-c^(3/2)*arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b+c^(3/2)*arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b+c^(3/2)*arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b-2*c*sqrt(c*cot(b*x+a))/b,1], [sqrt(c*cot(b*x+a)),x,10,sqrt(c)*arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b-sqrt(c)*arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b+sqrt(c)*arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b,1], [1/sqrt(c*cot(b*x+a)),x,10,arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/sqrt(c)-arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/sqrt(c)-arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b/sqrt(c),1], [1/(c*cot(b*x+a))^(3/2),x,11,-arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(3/2)+arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(3/2)-arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b/c^(3/2)+2/b/c/sqrt(c*cot(b*x+a)),1], [1/(c*cot(b*x+a))^(5/2),x,11,-arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(5/2)+arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(5/2)+arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b/c^(5/2)+2/3/b/c/(c*cot(b*x+a))^(3/2),1], [1/(c*cot(b*x+a))^(7/2),x,12,arctan(1-sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(7/2)-arctan(1+sqrt(2)*sqrt(c*cot(b*x+a))/sqrt(c))/sqrt(2)/b/c^(7/2)+arctanh(sqrt(2)*sqrt(c*cot(b*x+a))/(sqrt(c)+sqrt(c)*cot(b*x+a)))/sqrt(2)/b/c^(7/2)+2/5/b/c/(c*cot(b*x+a))^(5/2)-2/b/c^3/sqrt(c*cot(b*x+a)),1], [(c*cot(b*x+a))^(4/3),x,13,c^(4/3)*arctan((c*cot(b*x+a))^(1/3)/c^(1/3))/b-1/2*c^(4/3)*arctan(sqrt(3)-2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b+1/2*c^(4/3)*arctan(sqrt(3)+2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b-3*c*(c*cot(b*x+a))^(1/3)/b-1/4*sqrt(3)*c^(4/3)*ln(c^(2/3)-sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b+1/4*sqrt(3)*c^(4/3)*ln(c^(2/3)+sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b,1], [(c*cot(b*x+a))^(2/3),x,12,-c^(2/3)*arctan((c*cot(b*x+a))^(1/3)/c^(1/3))/b+1/2*c^(2/3)*arctan(sqrt(3)-2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b-1/2*c^(2/3)*arctan(sqrt(3)+2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b-1/4*sqrt(3)*c^(2/3)*ln(c^(2/3)-sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b+1/4*sqrt(3)*c^(2/3)*ln(c^(2/3)+sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b,1], [(c*cot(b*x+a))^(1/3),x,9,1/2*sqrt(3)*c^(1/3)*arctan((c^(2/3)-2*(c*cot(b*x+a))^(2/3))/sqrt(3)/c^(2/3))/b+1/2*c^(1/3)*ln(c^(2/3)+(c*cot(b*x+a))^(2/3))/b-1/4*c^(1/3)*ln(c^(4/3)-c^(2/3)*(c*cot(b*x+a))^(2/3)+(c*cot(b*x+a))^(4/3))/b,1], [1/(c*cot(b*x+a))^(1/3),x,9,1/2*sqrt(3)*arctan((c^(2/3)-2*(c*cot(b*x+a))^(2/3))/sqrt(3)/c^(2/3))/b/c^(1/3)-1/2*ln(c^(2/3)+(c*cot(b*x+a))^(2/3))/b/c^(1/3)+1/4*ln(c^(4/3)-c^(2/3)*(c*cot(b*x+a))^(2/3)+(c*cot(b*x+a))^(4/3))/b/c^(1/3),1], [1/(c*cot(b*x+a))^(2/3),x,12,-arctan((c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(2/3)+1/2*arctan(sqrt(3)-2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(2/3)-1/2*arctan(sqrt(3)+2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(2/3)+1/4*sqrt(3)*ln(c^(2/3)-sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b/c^(2/3)-1/4*sqrt(3)*ln(c^(2/3)+sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b/c^(2/3),1], [1/(c*cot(b*x+a))^(4/3),x,13,arctan((c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(4/3)-1/2*arctan(sqrt(3)-2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(4/3)+1/2*arctan(sqrt(3)+2*(c*cot(b*x+a))^(1/3)/c^(1/3))/b/c^(4/3)+3/b/c/(c*cot(b*x+a))^(1/3)+1/4*sqrt(3)*ln(c^(2/3)-sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b/c^(4/3)-1/4*sqrt(3)*ln(c^(2/3)+sqrt(3)*c^(1/3)*(c*cot(b*x+a))^(1/3)+(c*cot(b*x+a))^(2/3))/b/c^(4/3),1], [cot(b*x+a)^n,x,2,-cot(b*x+a)^(1+n)*hypergeom([1, 1/2+1/2*n],[3/2+1/2*n],-cot(b*x+a)^2)/b/(1+n),1], [(b*cot(d*x+c))^n,x,2,-(b*cot(d*x+c))^(1+n)*hypergeom([1, 1/2+1/2*n],[3/2+1/2*n],-cot(d*x+c)^2)/b/d/(1+n),1], [(a*cot(x)^2)^(3/2),x,3,-1/2*a*cot(x)*sqrt(a*cot(x)^2)-a*sqrt(a*cot(x)^2)*ln(sin(x))*tan(x),1], [sqrt(a*cot(x)^2),x,2,sqrt(a*cot(x)^2)*ln(sin(x))*tan(x),1], [1/sqrt(a*cot(x)^2),x,2,-cot(x)*ln(cos(x))/sqrt(a*cot(x)^2),1], [1/(a*cot(x)^2)^(3/2),x,3,cot(x)*ln(cos(x))/a/sqrt(a*cot(x)^2)+1/2*tan(x)/a/sqrt(a*cot(x)^2),1], [(a*cot(x)^3)^(3/2),x,13,2/3*a*sqrt(a*cot(x)^3)+a*arctan(1-sqrt(2)*sqrt(cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)-a*arctan(1+sqrt(2)*sqrt(cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)+a*arctanh(sqrt(2)*sqrt(cot(x))/(1+cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)-2/7*a*cot(x)^2*sqrt(a*cot(x)^3),1], [sqrt(a*cot(x)^3),x,12,-arctan(1-sqrt(2)*sqrt(cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)+arctan(1+sqrt(2)*sqrt(cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)+arctanh(sqrt(2)*sqrt(cot(x))/(1+cot(x)))*sqrt(a*cot(x)^3)/sqrt(2)/cot(x)^(3/2)-2*sqrt(a*cot(x)^3)*tan(x),1], [1/sqrt(a*cot(x)^3),x,12,2*cot(x)/sqrt(a*cot(x)^3)-arctan(1-sqrt(2)*sqrt(cot(x)))*cot(x)^(3/2)/sqrt(2)/sqrt(a*cot(x)^3)+arctan(1+sqrt(2)*sqrt(cot(x)))*cot(x)^(3/2)/sqrt(2)/sqrt(a*cot(x)^3)-arctanh(sqrt(2)*sqrt(cot(x))/(1+cot(x)))*cot(x)^(3/2)/sqrt(2)/sqrt(a*cot(x)^3),1], [1/(a*cot(x)^3)^(3/2),x,13,-2/3/a/sqrt(a*cot(x)^3)+arctan(1-sqrt(2)*sqrt(cot(x)))*cot(x)^(3/2)/sqrt(2)/a/sqrt(a*cot(x)^3)-arctan(1+sqrt(2)*sqrt(cot(x)))*cot(x)^(3/2)/sqrt(2)/a/sqrt(a*cot(x)^3)-arctanh(sqrt(2)*sqrt(cot(x))/(1+cot(x)))*cot(x)^(3/2)/sqrt(2)/a/sqrt(a*cot(x)^3)+2/7*tan(x)^2/a/sqrt(a*cot(x)^3),1], [(a*cot(x)^4)^(3/2),x,5,1/3*a*cot(x)*sqrt(a*cot(x)^4)-1/5*a*cot(x)^3*sqrt(a*cot(x)^4)-a*sqrt(a*cot(x)^4)*tan(x)-a*x*sqrt(a*cot(x)^4)*tan(x)^2,1], [sqrt(a*cot(x)^4),x,3,-sqrt(a*cot(x)^4)*tan(x)-x*sqrt(a*cot(x)^4)*tan(x)^2,1], [1/sqrt(a*cot(x)^4),x,3,cot(x)/sqrt(a*cot(x)^4)-x*cot(x)^2/sqrt(a*cot(x)^4),1], [1/(a*cot(x)^4)^(3/2),x,5,cot(x)/a/sqrt(a*cot(x)^4)-x*cot(x)^2/a/sqrt(a*cot(x)^4)-1/3*tan(x)/a/sqrt(a*cot(x)^4)+1/5*tan(x)^3/a/sqrt(a*cot(x)^4),1], [(b*cot(d*x+c)^p)^n,x,3,-cot(d*x+c)*(b*cot(d*x+c)^p)^n*hypergeom([1, 1/2*n*p+1/2],[1/2*n*p+3/2],-cot(d*x+c)^2)/d/(n*p+1),1], [(a*(b*cot(d*x+c))^p)^n,x,3,-cot(d*x+c)*(a*(b*cot(d*x+c))^p)^n*hypergeom([1, 1/2*n*p+1/2],[1/2*n*p+3/2],-cot(d*x+c)^2)/d/(n*p+1),1], [(b*cot(f*x+e))^n*(a*sin(f*x+e))^m,x,2,-(b*cot(f*x+e))^(1+n)*hypergeom([1/2+1/2*n, 1/2-1/2*m+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*(a*sin(f*x+e))^m*(sin(f*x+e)^2)^(1/2-1/2*m+1/2*n)/b/f/(1+n),1], [(a*cos(f*x+e))^m*(b*cot(f*x+e))^n,x,2,-(a*cos(f*x+e))^m*(b*cot(f*x+e))^(1+n)*hypergeom([1/2+1/2*n, 1/2+1/2*m+1/2*n],[3/2+1/2*m+1/2*n],cos(f*x+e)^2)*(sin(f*x+e)^2)^(1/2+1/2*n)/b/f/(1+m+n),1], [(a*cot(f*x+e))^m*(b*cot(f*x+e))^n,x,3,-(a*cot(f*x+e))^(1+m)*(b*cot(f*x+e))^n*hypergeom([1, 1/2+1/2*m+1/2*n],[3/2+1/2*m+1/2*n],-cot(f*x+e)^2)/a/f/(1+m+n),1], [(b*cot(f*x+e))^n*(a*sec(f*x+e))^m,x,3,-(b*cot(f*x+e))^(1+n)*hypergeom([1/2+1/2*n, 1/2-1/2*m+1/2*n],[3/2-1/2*m+1/2*n],cos(f*x+e)^2)*(a*sec(f*x+e))^m*(sin(f*x+e)^2)^(1/2+1/2*n)/b/f/(1-m+n),1], [(d*cot(f*x+e))^n*csc(f*x+e)^6,x,3,-(d*cot(f*x+e))^(1+n)/d/f/(1+n)-2*(d*cot(f*x+e))^(3+n)/d^3/f/(3+n)-(d*cot(f*x+e))^(5+n)/d^5/f/(5+n),1], [(d*cot(f*x+e))^n*csc(f*x+e)^4,x,3,-(d*cot(f*x+e))^(1+n)/d/f/(1+n)-(d*cot(f*x+e))^(3+n)/d^3/f/(3+n),1], [(d*cot(f*x+e))^n*csc(f*x+e)^2,x,2,-(d*cot(f*x+e))^(1+n)/d/f/(1+n),1], [(d*cot(f*x+e))^n*sin(f*x+e)^2,x,2,-(d*cot(f*x+e))^(1+n)*hypergeom([2, 1/2+1/2*n],[3/2+1/2*n],-cot(f*x+e)^2)/d/f/(1+n),1], [(d*cot(f*x+e))^n*sin(f*x+e)^4,x,2,-(d*cot(f*x+e))^(1+n)*hypergeom([3, 1/2+1/2*n],[3/2+1/2*n],-cot(f*x+e)^2)/d/f/(1+n),1], [(d*cot(f*x+e))^n*csc(f*x+e)^3,x,1,-(d*cot(f*x+e))^(1+n)*csc(f*x+e)^3*hypergeom([1/2+1/2*n, 2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*(sin(f*x+e)^2)^(2+1/2*n)/d/f/(1+n),1], [(d*cot(f*x+e))^n*csc(f*x+e),x,1,-(d*cot(f*x+e))^(1+n)*csc(f*x+e)*hypergeom([1/2+1/2*n, 1+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*(sin(f*x+e)^2)^(1+1/2*n)/d/f/(1+n),1], [(d*cot(f*x+e))^n*sin(f*x+e),x,1,-(d*cot(f*x+e))^(1+n)*hypergeom([1/2*n, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)*(sin(f*x+e)^2)^(1/2*n)/d/f/(1+n),1], [(d*cot(f*x+e))^n*sin(f*x+e)^3,x,1,-(d*cot(f*x+e))^(1+n)*hypergeom([-1+1/2*n, 1/2+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*sin(f*x+e)^3*(sin(f*x+e)^2)^(-1+1/2*n)/d/f/(1+n),1], [(b*cot(f*x+e))^n*(a*csc(f*x+e))^m,x,1,-(b*cot(f*x+e))^(1+n)*(a*csc(f*x+e))^m*hypergeom([1/2+1/2*n, 1/2+1/2*m+1/2*n],[3/2+1/2*n],cos(f*x+e)^2)*(sin(f*x+e)^2)^(1/2+1/2*m+1/2*n)/b/f/(1+n),1]]: