FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
maxima again...
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Christopher Creutzig
science forum Guru Wannabe


Joined: 03 May 2005
Posts: 107

PostPosted: Thu Jul 20, 2006 5:32 pm    Post subject: Re: maxima again... Reply with quote

jimmij wrote:

Quote:
(%i12) ratsimp(sqrt(a*b));
(%o12) sqrt(1 - x) sqrt(x + 1)


Where is a problem?

Obviously(?), maxima regards sqrt(1-x)*sqrt(x+1) as simpler than
sqrt((1-x)*(x+1)). Note that it *did* use your assumptions.

I do not have maxima installed, but I'd guess that with your assumptions,

ratsimp(sqrt(a*b)-sqrt(a)*sqrt(b))

will equal zero, which without the assumptions would be wrong, as
Richard pointed out.


Regards,
Christopher
Back to top
jimmij
science forum beginner


Joined: 17 Jul 2006
Posts: 4

PostPosted: Thu Jul 20, 2006 12:48 pm    Post subject: Re: maxima again... Reply with quote

"rjf" <fateman@gmail.com> writes:

Quote:
in general, sqrt(a)*sqrt(b) is not equal to sqrt(a*b), so most computer
algebra systems are not going to do this for you by some standard
command.

let a=b=-1. Then sqrt(a)*sqrt(b) = i*i = -1.
but sqrt(a*b)=sqrt(1)=1. (at least by convention. really it should be
+/-1 but CAS don't usually make that observation). Of course sqrt(-1)
is +-i, by the same reasoning.

Thanks for explainations.
Lets then assume something:

(%i1) a: 1-x;
(%o1) 1 - x
(%i2) b: 1+x;
(%o2) x + 1
(%i3) assume(x<1);
(%o3) [x < 1]
(%i4) assume(x>0);
(%o4) [x > 0]
(%i5) sign(x);
(%o5) pos
(%i6) sign(a);
(%o6) pos
(%i7) sign(b);
(%o7) pos
(%iCool sign(sqrt(a));
(%oCool pos
(%i9) sign(sqrt(b));
(%i10) a*b;
(%o10) (1 - x) (x + 1)
(%i11) ratsimp(a*b);
2
(%o11) 1 - x
(%i12) ratsimp(sqrt(a*b));
(%o12) sqrt(1 - x) sqrt(x + 1)


Where is a problem?


--
jimmij
Back to top
rjf
science forum beginner


Joined: 05 May 2006
Posts: 5

PostPosted: Thu Jul 20, 2006 6:22 am    Post subject: Re: maxima again... Reply with quote

in general, sqrt(a)*sqrt(b) is not equal to sqrt(a*b), so most computer
algebra systems are not going to do this for you by some standard
command.

let a=b=-1. Then sqrt(a)*sqrt(b) = i*i = -1.
but sqrt(a*b)=sqrt(1)=1. (at least by convention. really it should be
+/-1 but CAS don't usually make that observation). Of course sqrt(-1)
is +-i, by the same reasoning.

radcan can do some related simplifications, and you can also see
describe(denest);


jimmij wrote:
Quote:
(%i1) a: sqrt(1-x);
(%o1) sqrt(1 - x)
(%i2) b: sqrt(1+x);
(%o2) sqrt(x + 1)
(%i3) a*b;
(%o3) sqrt(1 - x) sqrt(x + 1)

How can I simpify this to sqrt(1-x^2)?

I tried ratsimp, trigsimp, expand, ratexpand, trigexpand...
Nothing works.

--
jimmij
Back to top
jimmij
science forum beginner


Joined: 17 Jul 2006
Posts: 4

PostPosted: Wed Jul 19, 2006 5:28 pm    Post subject: maxima again... Reply with quote

(%i1) a: sqrt(1-x);
(%o1) sqrt(1 - x)
(%i2) b: sqrt(1+x);
(%o2) sqrt(x + 1)
(%i3) a*b;
(%o3) sqrt(1 - x) sqrt(x + 1)

How can I simpify this to sqrt(1-x^2)?

I tried ratsimp, trigsimp, expand, ratexpand, trigexpand...
Nothing works.

--
jimmij
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Tue Nov 12, 2013 4:40 pm | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts maxima problem jimmij Symbolic 2 Mon Jul 17, 2006 11:55 am
No new posts Apparent Bug In "Permutations" Function In Maxima 5.9.3 Mark Lawton Symbolic 2 Sat Jul 15, 2006 11:31 am
No new posts recompiling Maxima with ABCL (Lisp implemented in Java) robert.dodier@gmail.com Symbolic 3 Wed Jun 14, 2006 6:02 am
No new posts Slowly MAXIMA in TeXmacs Pike Symbolic 12 Wed May 31, 2006 10:42 am
No new posts Maple equivalent of the Maxima function "rat" Pi1 Symbolic 3 Tue May 23, 2006 7:05 am

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0677s ][ Queries: 18 (0.0375s) ][ GZIP on - Debug on ]