Subject: On broken wheels and user contributed code
From: Richard Hennessy
Date: Thu, 04 Jun 2009 17:03:11 -0400
By the fastest way I mean try plotting f(x) and then try computing an approximation to f(x) using Fourier expansion and compare how
long it takes the two ways to plot.
Rich
----- Original Message -----
From: "Richard Hennessy" <rich.hennessy at verizon.net>
To: "dlakelan" <dlakelan at street-artists.org>; "Maxima Mailing List" <maxima at math.utexas.edu>
Sent: Thursday, June 04, 2009 4:41 PM
Subject: Re: [Maxima] On broken wheels and user contributed code
You are probably right that the Fourier expansion is used a lot but using periodic is much faster and is not an approximation to the
function.
try
f(x):= ''(periodic(pw([-10,-x^3,0,-x^2,10],x),x,-10,10));
This is the fastest way. By the way my email has been down for a while but it is back up again, hence the late reply.
Rich
----- Original Message -----
From: "dlakelan" <dlakelan at street-artists.org>
To: "Richard Hennessy" <rich.hennessy at verizon.net>; "Maxima Mailing List" <maxima at math.utexas.edu>
Sent: Tuesday, May 26, 2009 5:41 PM
Subject: Re: [Maxima] 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.
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima