Hello, I’ve got a function I’m trying to integrate, it’s a single variable for a position in space (an electric potential at that point). I’d like to pass my function a position, and have it evaluate the integral at that point in space. So far it works like so.

function unknotintegralfunction(a,b,c,t)

1/(sqrt(square(a-unknotx(t))+square(b-unknot(t))+square©))

end

It basically calculates the distance at a point a,b,c from a paramaterized function which has the variable t. I then pass the function above to an integration function

function unknotpotential(a,b,c)

ans = quadgk(unknotintegralfunction(a,b,c),0,2*pi,order=quadorder)

end

Which I had hoped would integrate over my function for t from 0->2pi. In python I could do something like this with lambda, but I’m not too sure how to accomplish this in Julia. Any advice would be appreciated!