On broken wheels and user contributed code



Richard Hennessy wrote:
> Maybe I should have explained this better.
> 
> periodic(expr,x,a,b):=
> block
> (
>     ratsubst(a+mod(x,b-a),x,expr)
> )$
> 
> The idea is the expr is modified so it repeats it's behavior between a and b for all x an infinite number of times.  Hence the name 
> periodic.
> 
> Rich

Rich, this sounds like a somewhat useful concept but by the time you 
have a periodic function perhaps expansion in terms of sin and cos are a 
better way to get approximations?

It seems to me the most useful reason for the PW package is to replicate 
the typical stuff done in engineering where people just fit a few 
piecewise polynomials through or around a cloud of datapoints and then 
codify it into law saying "this is the function to use to evaluate the 
behavior of xyz". See for example the AISC steel design buckling 
strength equations, or the typical way in which people represent stress 
vs strain for materials that have different "regimes" like elastic / 
plastic models.