Ask Your Question
0

how to use certain maxima functions (e.g. ratsubst)?

asked 13 years ago

matthjes gravatar image

updated 10 years ago

FrédéricC gravatar image

I cannot figure out how to use maxima functions like ratsubst within sage.

For example: X = maxima('x^2') Now I'd like to substitute x with k. In Maxima, this is done via: X: x^2; ratsubst(k, x, X);

How do I call ratsubst from Sage? If I use X.ratsubst('k', 'x') then it simply prints out 'x'...

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 13 years ago

achrzesz gravatar image
sage: maxima('X:x^2')            
x^2
sage: maxima('ratsubst(k,x,X)')
k^2
sage: maxima('X,x=k')            
k^2
Preview: (hide)
link

Comments

sage: X=x^2 sage: var('k') k sage: X(x=k) k^2

achrzesz gravatar imageachrzesz ( 13 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 13 years ago

Seen: 751 times

Last updated: Mar 12 '12