Hi,
I have a vector field function of the form
u[p_] := p*Tanh[Norm[p]/2]/Norm[p]
now i plot that function using for x=-5..5 and fixing y=2 and z=1
Plot[u[{x, 2, 1}], {x, -5, 5}]
and i get the expected plot with 3 curves (since u returns a 3-vector)
now i wanna plot the gradient of it with respect to the x-axis using
Plot[Grad[u[{x, 2, 1}], {x}], {x, -5, 5}]
or alternatively
f[{x_, y_, z_}] := Grad[u[{x, y, z}], {x}]
Plot[f[{x, 2, 1}], {x, -5, 5}]
but in both cases it will fail with the error message
General::ivar: -4.9998 is not a valid variable. >>
General::ivar: -4.79571 is not a valid variable. >>
General::ivar: -4.59163 is not a valid variable. >>
what do i do wrong ? can anybody help out ?
cheers