-----Original Message-----
From: Rupert Swarbrick
Sent: Saturday, October 08, 2011 5:54 AM
To: maxima at math.utexas.edu
Subject: Re: [Maxima] if then and unit_step
It's not just for speed. What Richard Fateman was referring to was that
it can also be important for correctness. Consider something like this
function of x:
f(x) := if is(x > 0) then 1/x else 0
Trying to evaluate this via unit step functions would give something
that included a 1/0 when evaluated at the wrong place.
There are advantages to phrasing things in terms of the Heaviside step
function. I'm not sure whether Maxima deals with this, but I worked with
physicist who would write things like
f(x) = g(x) + ?(x-x?)h(x)
and then differentiate them, getting a distribution involving the Dirac
delta. Obviously, it's much harder to see what is going on with an "if,
else" definition.
Richard: If you want to see more of such techniques (in a situation
that's not the real line), you could try looking up "partitions of
unity". It's a way to define a function piecewise on a manifold but glue
together the bits so that the answer's smooth.
Rupert
Well, "partitions of unity" is something new for me to digest, I never heard
of that term before. Manifolds also come up a lot when you are listening to
mathematicians talk. I don't know what they are, but I can Google it and
get basic information.
Rich