ez:=proc(): print(` CIc(f,z,C0,r), CIr(f,z,C,a,b)`): end: #CIc(f,z,C0,r): the contour intergral of f(z) around the circle center C0 and radius r. Try #CIc(1/z,z,[0,0],3); CIc:=proc(f,z,C0,r) local t: int(evalc(I*subs(z=(C0[1]+r*cos(t))+(C0[2]+r*sin(t))*I,z*f) ),t=0..2*Pi)/(2*I*Pi): end: #CIcN(f,z,C0,r): the contour intergral of f(z) around the circle center C0 and radius r. done numerically. Try #CIcN(1/z,z,[0,0],3); CIcN:=proc(f,z,C0,r) local t: evalf(Int(evalc(I*subs(z=(C0[1]+r*cos(t))+(C0[2]+r*sin(t))*I,z*f) ),t=0..2*Pi)/(2*I*Pi)): end: #CIr(f,z,R): the contour intergral of f(z) around the rectangle with left-bottom corner at C with hozizontal side a and vertical side b #CIr(1/z,z,R); CIr:=proc(f,z,C,a,b) local H1,H2,V1,V2,x,y: H1:=int(evalc(subs(z=x+I*C[2],f)) ,x=C[1]..C[1]+a): V1:=int(evalc(subs(z=C[1]+a+I*y,f)*I) ,y=0..b): H2:=-int(evalc(subs(z=x+(C[2]+b)*I,f)) ,x=C[1]..C[1]+a): V2:=-int(evalc(subs(z=C[1]+I*y,I*f)) ,y=0..b): (H1+V1+H2+V2)/(2*Pi): end: