piecewise function with integrals



All,
  I am trying to define a piecewise function which include integral. I
first make a few assumptions:

assume (tau>0);
assume (T>0);
assume (T>tau);

  then define my function as

Vm(I0, a, b, tau, T, w,k, t):=if t<=tau then integrate
(2*k*I0*a*tt*cos(w*(t-tt)),tt,0,t) else  integrate
(2*k*I0*a*tt*cos(w*(t-tt)),tt,0,tau) + integrate
(2*k*I0*(b*tt-1)*cos(w*(t-tt)),tt,tau,t);

  If I ask maxima to evaluate Vm(I0, a, b, tau, T, w,k, t) I still get
if t<=tau then integrate(2*a*tt*cos((t-tt)*w)*I0,tt,0,t) else
integrate(2*(b*tt-1)*cos((t-tt)*w)*I0,tt,tau,t)+integrate(2*a*tt*cos((t-tt)*w)*I0,tt,0,tau)

  I would however expect maxima to carry this integral: if I do a
integrate(2*k*I0*(b*tt-1)*cos(w*(t-tt)),tt,tau,T);

  I get

2*I0*(((b*w*T-w)*sin(w*T-t*w)+b*cos(w*T-t*w))/w^2-((b*tau-1)*w*sin((tau-t)*w)+b*cos((tau-t)*w))/w^2)


  So why when I type Vm(I0, a, b, tau, T, w,k, t) I do not get a
result where the integral have been evaluated --  something like

if t<=tau then 2*a*(1/w^2-cos(t*w)/w^2)*I0 else
2*(b/w^2-((b*tau-1)*w*sin((tau-t)*w)+b*cos((tau-t)*w))/w^2)*I0+2*a*((tau*w*sin((tau-t)*w)+cos((tau-t)*w))/w^2-cos(t*w)/w^2)*I0

  Although this is not a big deal (I can redefine my function with the
integral worked out), I am wondering what I am missing. Thank you for
any help/suggestion,


               -- Philippe.

Philippe Piot,
http://nicadd.niu.edu/~piot/wiki/pmwiki.php

Northern Illinois University, Dept of Physics and
Northern Illinois Center for Accelerator & Detector Development
DeKalb, IL 60115, USA
Tel: 815 753 6473, Fax: 815 753 1772
Web:  http://www.physics.niu.edu/physics/

Fermi National Accelerator Laboratory,
Accelerator Physics Center, MS 306
PO Box 500, Batavia, IL 60510, USA
Tel: 630 840 6389, Fax 630 840 5231
Web:  http://apc.fnal.gov/