Hello,
?
1)
?
declare(a, constant, b, constant)$
?
then it should be ok
?
2) try
?
p: (x + y + z)^5$
rat(p, x);
hth
> Message du 28/08/12 13:40
> De : "Amadeus W.M."
> A : maxima at math.utexas.edu
> Copie ? :
> Objet : [Maxima] Two newbie questions
>
> I have two newbie questions:
>
> 1) I want to define a linear operator E (expectation), so I do
>
> declare(E,linear);
>
> Then E(2*x+3*y) = 2 E(x) + 3 E(y) as expected. But I have to do things
> like E(a*x + b*y) where a and b are constant. Maxima outputs E(ax) + E
> (by). How do I make it tread a and b as constants?
>
>
> 2) I have an expression of the form f(x,y,z) + g(x,y,z) + h(x,y,z) where
> f, g and h are polynomials in x, y, z. How do I collect the like terms in
> x, say? That is, how do I make Maxima treat y and z as constants and
> treat f+g+h as a polynomial in x only? It's probably related to the first
> question.
>
> Thanks!
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>