2
$\begingroup$

I am trying to take the curl of a vector field.

A={A1,A2,A3}
B=Curl[A,{x,y,z}]

This yields

{0,0,0}

because Mathematica thinks that the vector is a constant. I would like for Mathematica to assume that the vector A varies as a function of position, so I make A1, A2, and A3 functions of [x,y,z] like so:

A={A1[x,y,z],A2[x,y,z],A3[x,y,z]}
B=Curl[A,{x,y,z}]

Now the output looks like this:

Mathematica Output Image

which is correct, but I would like to get rid of the [x,y,z] on all of the output terms which clutters up the output and makes it difficult to read.

$\endgroup$
3
  • $\begingroup$ Does B /. f_[x, y, z] :> f give what you need? $\endgroup$
    – kglr
    Commented Feb 4, 2015 at 20:07
  • $\begingroup$ See 15153 $\endgroup$
    – bbgodfrey
    Commented Feb 4, 2015 at 20:12
  • $\begingroup$ Yes, that works very nicely. Thank you! $\endgroup$
    – Charlie
    Commented Feb 4, 2015 at 20:46

1 Answer 1

1
$\begingroup$

B /. f_[x, y, z] :> f will get rid of the [x,y,z,t] on the functions.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.