[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-mail] Defining piece-wise functions and drawing, integrating
From: |
Martin Rubey |
Subject: |
Re: [Axiom-mail] Defining piece-wise functions and drawing, integrating, ... |
Date: |
30 May 2007 09:11:43 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
"Sumant S.R. Oemrawsingh" <address@hidden> writes:
> Hi,
>
> Thanks for the reply. Too bad integration over such functions can't be done
> symbolically. I also don't quite understand why for the draw function, the
> function si compiled with type Variable x -> Polynomial Integer, when
> x=-1..1 is a range in R.
yes, that's very strange and should be debugged. Maybe you could file a report
on IssueTracker?
> I was hoping I could write down all my stuff in Axiom (symbolically), so that
> I would, say, never have to go through stacks of paper, manually calculating
> overlap integrals of two different, piece-wise functions, or stuff like
> that. It would appear that I still have to do all this manually, if I would
> like a symbolic answer :(
But you can still do this, if you know the boundaries of the functions! Use
something like
-- lf...list of functions
-- x...integration variable
-- lb...list of boundaries
integratePiecewise(lf: List EXPR INT, x: Symbol, lb: List EXPR INT): EXPR INT ==
reduce(+, [integrate(f, x=b1..b2) for f in lf for b1 in lb for b2 in rest
lb], 0)
Maybe you could even take a single f which is a piecewise defined function, and
extract the necessary information, but that will need a little detective work.
Martin