problems
- Subject: problems
- From: Barton Willis
- Date: Sun, 10 Jul 2011 10:32:59 -0500
By the way:
(%i2) :lisp(defun manifestly-pure-imaginary-p (e) (eq '$imaginary ($csign e)));
MANIFESTLY-PURE-IMAGINARY-P
(%i2) map(lambda([s], print(facts()), conjugate(s)), [1/sqrt(x),1/sqrt(x)]);
[]
[notequal(x,0)]
(%o2) [conjugate(1/sqrt(x)),1/sqrt(x)]
A conservative approach might be
(defun conjugate-mexpt (e)
(let ((x (first e)) (p (second e)))
(cond ((or (off-negative-real-axisp x) ($featurep p '$integer))
(power (take '($conjugate) x) (take '($conjugate) p)))
((and (on-negative-real-axisp x) (manifestly-real-p p))
(mul -1 (power x p)))
Then
(%i3) assume(a > b);
(%o3) [a>b]
(%i5) conjugate(sqrt(b-a));
(%o5) -sqrt(b-a)
--Barton