Should I be using parentheses when using things like $\log$ in LaTeX, and when handwriting?

Should I use $\log x$ or $\log(x)$?

If it's just one value or variable, I can see getting away with not using parentheses, but suppose I have a function in there:

$$
 \log p(w|v) \; \text{or} \; \log( p(w|v) ) \; ?
$$

Same question applies to things like $\sin$, $\arctan$, $\ln$, etc.