Question on ev



There's another good function, called 'at'. 

(%i1) x_sho : A*sin(w*t) + B*cos(w*t)$
(%i2) diff(x_sho,t);
(%o2)                     w cos(t w) A - w sin(t w) B
(%i3) at(%,t=0);
(%o3)                                 w A

--
Andrei Zorine
 
> 
> On Mon, Nov 16, 2009 at 2:23 PM, Conrad Schiff <gravmath at yahoo.com> wrote:
> > I need some help interpreting the behavior of the ev command.
> >
> > I enter the expression:
> > (%i1)  x_sho : A*sin(w*t) + B*cos(w*t)$
> >
> > and then I want to setup equations for A and B in terms of x_sho(t=0) and vx_sho(t=0), where vx_sho = diff(x_sho,t).
> >
> > A straightforward application of ev leads immediately to one of the two equations I want:
> > (%i2)  IC1 : ev(x_sho,t=0) = x0;
> > (%o2)  A=x0
> >
> > however, my next attempt fails
> > (%i3)  IC2 : ev(diff(x_sho,t),t=0);
> > diff: second argument must be a variable; found 0
> >  -- an error.  To debug this try debugmode(true);
> >
> > I tried ev( ev(diff(x_sho,t),diff) , t=0 ), which also fails.  A trivial workaround is available by defining an intermediate expression vx_sho = diff(x,t) and then using ev(vx_sho,t=0) so this isn't a serious problem however it is annoying and the process looks so much cleaner if I don't have to define vx.
> >
> > Thanks,
> > Conrad
> >
> >
> >
> > _______________________________________________
> > Maxima mailing list
> > Maxima at math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>