Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This might seem as a silly question, but is it feasible to use a mathematical expression as the name of a function?

For example, I'm studying the cross section of Compton scattering and there is a formula for the differential cross section, which is denoted as $\frac{d\sigma}{d\Omega}$. I'd like to express the latter as a function of energy E, angle θ and atomic number Z.

If I, naively, use $\frac{d\sigma}{d\Omega}[Z\_, E\_, \theta\_] := \ldots$ I get the anticipated error:

SetDelayed::write : Tag Times in dσ/dΩ[Z_,E_,θ_] is Protected

Instead of the obvious workaround of using a name such as diffSection[Z_,E_,θ_] := ... is there any other way ?

share|improve this question
    
A big barred underscript could do? –  Peltio Oct 9 '13 at 15:55
add comment

1 Answer

up vote 8 down vote accepted

You could use the Notation package:

<< Notation`
Symbolize[ParsedBoxWrapper[FractionBox["d\[Sigma]", "d\[CapitalOmega]"]]]
(d\[Sigma]/d\[CapitalOmega])[\[CapitalEpsilon]_, r_, \[Theta]_] := f[\[CapitalEpsilon], r, \[Theta]]

Notation package used to make a complicated symbol

share|improve this answer
    
Worked perfect! Thanks @TimothyWofford! –  Zet Oct 9 '13 at 17:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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