Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Symbolic manipulation with Sqrt[-1] ?
Replies: 31   Last Post: Dec 10, 2009 1:16 PM

 Messages: [ Previous | Next ]
 Axel Vogt Posts: 1,068 Registered: 5/5/07
Re: Symbolic manipulation with Sqrt[-1] ?
Posted: Dec 7, 2009 2:21 PM

clicliclic@freenet.de wrote:
> Axel Vogt schrieb:
...
>> And it does not work for constants like simplify( 1/sqrt(2), {2=y^2}
>> ).

>
> Do I understand you correctly that it is impossible in Maple to
> substitute something for arbitrary subexpressions? Are only variables
> (and predefined constants like I) allowed? Would
>
> eval( 1/x^2, x^2 = y^4 );
>
> or
>
> eval( 2*cos(x^2), cos(x^2) = sin(y) );
>
> be forbidden syntactically?
>
> Martin.

G A Edgar already said it, here is a bit more ...

2*x; subs(2=a, %); # or eval(%, 2=a);

x a

For 1/sqrt(2) it does not work, since it is given by 1/2*2^(1/2).

Note however:

eval( 1/sqrt(2), 2=y^2);
2 1/2
(y )
-------
2

thus the '2' in the two 1/2 of are not replaced. But with string
processing one certainly could enforce that (which should work
for replacing '-I' as well, but that is ugly for my taste).

I think that comes from the internal representation, which may be
different from what 'we' see & recognize or is shown on the screen
(Maple uses a DAG, a directed acyclic graph, but is too long ago
that I played with that, for me as user it usually is too deep in
the implementation details).

The simplify with side relations seems not to work for constants,
but the usual command works

simplify( 2, {2=y^2});
2

eval( 2, {2=y^2}); # or subs ...
2
y

Date Subject Author
12/5/09 AES
12/5/09 Richard Fateman
12/5/09 clicliclic@freenet.de
12/5/09 AES
12/6/09 Nasser Abbasi
12/6/09 Nasser Abbasi
12/6/09 Richard Fateman
12/6/09 Mark McClure
12/6/09 Mark McClure
12/6/09 Nasser Abbasi
12/6/09 Richard Fateman
12/6/09 AES
12/6/09 Mark McClure
12/6/09 Richard Fateman
12/7/09 Nasser Abbasi
12/7/09 Richard Fateman
12/7/09 Nasser Abbasi
12/8/09 clicliclic@freenet.de
12/8/09 Jon McLoone
12/9/09 clicliclic@freenet.de
12/10/09 fateman@gmail.com
12/10/09 Dave
12/10/09 fateman@gmail.com
12/9/09 Dave
12/10/09 Dave
12/6/09 Nasser Abbasi
12/6/09 Richard Fateman
12/6/09 Axel Vogt
12/7/09 clicliclic@freenet.de
12/7/09 G. A. Edgar
12/7/09 Axel Vogt
12/7/09 acer