Author 
Message 
jimmij science forum beginner
Joined: 17 Jul 2006
Posts: 4

Posted: Wed Jul 19, 2006 5:28 pm Post subject:
maxima again...



(%i1) a: sqrt(1x);
(%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(1x^2)?
I tried ratsimp, trigsimp, expand, ratexpand, trigexpand...
Nothing works.

jimmij 

Back to top 


rjf science forum beginner
Joined: 05 May 2006
Posts: 5

Posted: Thu Jul 20, 2006 6:22 am Post subject:
Re: maxima again...



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(1x);
(%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(1x^2)?
I tried ratsimp, trigsimp, expand, ratexpand, trigexpand...
Nothing works.

jimmij 


Back to top 


jimmij science forum beginner
Joined: 17 Jul 2006
Posts: 4

Posted: Thu Jul 20, 2006 12:48 pm Post subject:
Re: maxima again...



"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: 1x;
(%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
(%i sign(sqrt(a));
(%o 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 


Christopher Creutzig science forum Guru Wannabe
Joined: 03 May 2005
Posts: 107

Posted: Thu Jul 20, 2006 5:32 pm Post subject:
Re: maxima again...



jimmij wrote:
Quote:  (%i12) ratsimp(sqrt(a*b));
(%o12) sqrt(1  x) sqrt(x + 1)
Where is a problem?

Obviously(?), maxima regards sqrt(1x)*sqrt(x+1) as simpler than
sqrt((1x)*(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 


Google


Back to top 



The time now is Thu Jan 24, 2019 2:49 am  All times are GMT

