%i arises when simplifying a square root in real domain
Subject: %i arises when simplifying a square root in real domain
From: Barton Willis
Date: Thu, 4 Oct 2012 13:13:47 +0000
One possibility is to additionally assume that -1 < a. Then
(%i1) assume(-1 < a,a< 1)$
(%i2) ratsimp(1/sqrt(a**2/(1-a**2)+1));
(%o2) sqrt(1-a^2)
Another possibility is
(%i1) (domain : complex, m1pbranch : true)$
(%i2) ratsimp(1/sqrt(a**2/(1-a**2)+1));
(%o2) 1/sqrt(-1/(a^2-1))
--Barton
________________________________________
From: maxima-bounces at math.utexas.edu [maxima-bounces at math.utexas.edu] on behalf of Jocelyn Etienne [jocelyn.etienne at ujf-grenoble.fr]
Sent: Thursday, October 04, 2012 07:17
To: maxima at math.utexas.edu
Subject: %i arises when simplifying a square root in real domain
Dear all,
I am having trouble with maxima when using square roots of the form
sqrt(1-a**2), as in some situations they get simplified into
%i*sqrt(a**2-1).
E.g., even with assume(a<1), if I try to get back to sqrt(1-a**2) from
this modified form:
(%i20) ratsimp(1/sqrt(a**2/(1-a**2)+1));
2
(%o20) - %i sqrt(a - 1)
It is then very awkward, as rootscontract e.g. would make the mistake of
writing %i=sqrt(-1), and get the wrong sign.
I could not find a boolean to tell maxima to avoid factoring out sqrt(-1),
does it exist?
Thanks.
--
Jocelyn ?TIENNE Research Scientist of the CNRS
Laboratoire Interdisciplinaire de Physique Universit? de Grenoble
Jocelyn.Etienne at ujf-grenoble.fr www-liphy.ujf-grenoble.fr/link/etienne
On leave at U. Cambridge until Dec 2012, www.pdn.cam.ac.uk/staff/sanson
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima