I have the following function whose definition needs an integral to be evaluated. The integral itself is dependent on the function input variables.
r0 = 0.5;
z0 = 0.5;
G(r,z,z-z0) = 1/2*r*r0^2 * integral(cos(lambda)/sqrt((r^2+r0^2-2*r*r0*cos(lambda)+(z-z0)^2)) dlambda, -pi, pi);
Could someone please help me how I can get for example G(0.75, 0.75, 0.25)? My final goal is to find G over a rectangular meshgrid.