# Defining a function when the variables do not appear explicitly in the definition of the function

I am trying to take the curl of a vector field which is the a product of a scalar field (Psi) and a coordinate vector, {r,Theta,Phi}. After taking the curl I want to calculate the magnitude of the norm of the vector. My code for this is:

ψcurl = Curl[{r, θ, ϕ}*ψ[θ, ϕ,r], {r, θ, ϕ}, "Spherical"];

TEnorm[θ_, ϕ_, r_] := Abs[Norm[Evaluate[ψcurl[r, θ, ϕ]]]];


When I evaluate TEnorm for specific values of r, Theta, and Phi, it returns a long, non-numerical result which is the Abs-Norm of my vector function but r, Theta, and Phi still appear as symbolic variables instead of the values fed into the function, as if the function definition does not recognize that ψcurl contains the variables r, Theta, and Phi. Probably a bush-league mistake but what am I missing here?

• Are you sure that what you are trying to do is mathematically meaningful? I don't think that you can put r in a vector with angles. – mikado Jul 8 '16 at 19:01
• Possible duplicates: (11461), (69590) – Mr.Wizard Jul 15 '16 at 10:32

ψcurl = Curl[{r, θ, ϕ} ψ[θ, ϕ, r], {r, θ, ϕ}, "Spherical"];

In this case, you do not want to delay evaluation of the assignment (use = rather than :=) making the Evaluate redundant.
Putting [r, θ, ϕ] after ψcurl in the second line is wrong, as they don't appear in the definition in the first line.