tellsimp problem



I want to do both definite and indefinite integrals.  I understand the problems with definite integrals and I don't know 
what to do about them, Maxima does not always get them right if the function goes to infinity at some point between the 
lower limit and upper limit.  I didn't see your point before in the emails.

plot2d(
[
    exp(x) * unit_step(x-1),
    (%e^x*abs(x-1)+(x-1)*%e^x)/(2*abs(x-1))
],
[x, 0, 2], [y,-.5, 8],[plot_format, gnuplot])$

These two functions are the same function expressed two different ways.  I like the simplest way.  Now then there is a 
question as to which way is the simplest way to express the function.  exp(x)*unit_step(x-1) is the simple way in this 
case in my opinion.  Using absolute values might be simpler in other cases, using min and max might be better in a third 
case.  Maxima has a lot of discontinuos functions that may all be expressable in other ways using other discontinuos 
functions.  I don't want to get too complicated yet but I just am saying I get your point.

Rich

----- Original Message ----- 
From: "Barton Willis" <willisb at unk.edu>
To: "Richard Hennessy" <rvh2007 at comcast.net>
Cc: "Maxima List" <maxima at math.utexas.edu>
Sent: Saturday, October 25, 2008 9:02 PM
Subject: Re: [Maxima] tellsimp problem


I can't help you with your tellsimp problem. If your goal is
to find antiderivatives of functions that involve the unit_step,
here is one approach:

(%i14) load("pmint.mac")$
(%i15) put(abs, [lambda([u], u), true], 'darboux_poly)$
(%i16)  gradef(abs(x), abs(x) / x)$
(%i17) myintegrate(f,x) := pmint(subst('unit_step = lambda([s], (s + abs
(s))/(2*s)), f),x)$

(%i27) myintegrate(unit_step(x),x);
(%o27) (x^3*abs(x)+x^4)/(2*x^2*abs(x))

(%i31) myintegrate(unit_step(x^2-1),x);
(%o31) (x^5*abs(x^2-1)-2*x^3*abs(x^2-1)+x*abs
(x^2-1)+x^3*(x^2-1)^2-x*(x^2-1)^2)/(2*(x^2-1)^2*abs(x^2-1))

(%i32) myintegrate(exp(x) * unit_step(x-1),x);
(%o32) (x^2*%e^x*abs(x-1)-2*x*%e^x*abs(x-1)+%e^x*abs(x-1)+
(x-1)^2*x*%e^x-(x-1)^2*%e^x)/(2*(x-1)^2*abs(x-1))

The message

  http://www.math.utexas.edu/pipermail/maxima/2008/012535.html

has a link to a location of pmint.mac.


Barton