when using Maple to do simple calculus I usually have to explicitly
state the dependence of each variable in the expression....for example
c*(1-cos(x[1](t)))+x[2](t)^2/2
is there a way to declare generic functions of a dependent variable
say
x1 = x1(t) or x2 = x2(x,y,z)
and avoid having to do it repeatedly in an expression? so the above
would be...c*(1-cos(x1))+x2^2/2, but still have the dependence on "t"
Thank you
In Maple 9.5:
f:=c*(1-cos(x1))+x2^2/2;
2
x2
f := c (1 - cos(x1)) + ---
2
> g:=subs({x1=x[1](t),x2=x[2](t)},f);
2
g := c (1 - cos(x[1](t))) + 1/2 x[2](t)
R.G. Vickson
Is there any other way besides subs? I thought there might be a way to
declare a generic function of several variables without have to give
the specifics...
use alias
alias(x1=x[1](t),x2=x[2](t)):
f := t -> c*(1-cos(x1))+x2^2/2;
Adri