From: Eduardo O. <edu...@gm...> - 2022-01-02 16:35:17
|
Hi list! A beginner question... Suppose that we do this: f : sin(x)^4 * cos(x)^2; g : expand(exponentialize(f)); Then g will be a sum of exponentials that includes a constant term. I can obtain the coefficient of, say, exp(6*%i*x) in that sum by doing coeff(g, exp(6*%i*x)); but I don't know how to extract the constant term - i.e., how to obtain the coefficient of exp(0*%i*x)... these things don't work: coeff(g, exp(0*%i*x)); coeff(g, x, 0); coeff(g, 1); I know Emacs Lisp quite well but I haven't started playing with Common Lisp yet. The obvious answer to my question is "take a look at the `(defmfun $coeff ...)' and at the `(defun coeff ...)' and try to write something similar yourself - you will learn lots of useful things" - but is there a way to extract that coefficient from Maxima without tinkering with the Lisp? Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/eev-maxima.html |