On Sun, 2010-04-11 at 15:17 +0100, Soares Guerra wrote:
> hello to all,
>
> i Would like to know why maxima doesn't integrate the following function.
>
> Thanks for your help
>
> a0:2/T*integrate(vi(t),t,-T/2,T/2);
>
> vi(t):=VAaux(t)+vb(t);
>
> VAaux(t):=if t<-T/2 then VAaux(t+T) elseif t<T/2 then va(t) else VAaux(t-T);
>
> vb(t):=1/4*cos(15*%pi*t)-1/8*sin(30*%pi*t);
You forgot to tell us how va(t) is defined.
Maxima can integrate some expressions, but it doesn't know how to
integrate a command such as "if something then something else something"
which is what you are trying to integrate.
In fact, since the integral is interval -T/2 < t < T/2, you don't need
VAaux and you can integrate directly va(t)+vb(t), which will work if the
body of va(t) is a simple expression as vb(t)'s
Regards,
Jaime