MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Assigning to superscripted variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg34319] Re: Assigning to superscripted variables
  • From: lzhao at ihw.com.cn (Instanton)
  • Date: Wed, 15 May 2002 03:35:05 -0400 (EDT)
  • References: <abo3f4$5dt$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

Mathematica internally understands "superscripted variables" as the
power function of its Head, i.e.

A^i

is understood as the variable A raised to the power of i. So, when
you're assigning values to a superscripted variable, you are actually
modifying the definition of the function Power. This is quite danguous
because if you assigned
a^i = 5 by unprotecting Power, the system would use this rule in all
subsequent calculations of any expression involving Power and may give
rise to wrong results. So, please do not use this kind of assignment.

Now I guess that your motivation of doing the above assignment should
be one of the following:

i) you wished to define a variable whose name is a^i and whose value
is 5;
ii) you wished to define the variable a whose i-th power is evaluated
to 5;
iii) you wished to define the variable i which satisfies Power[A,i]=5.

In the case i), I suggest that you change the superscript into a
subscript; for the case ii) or iii), I would preferr to define a or i
as

a:=5^(1/i)

or

i=Log[5]/Log[a].

--------------------------------------------------------------------
 

"Dave Snead" <dsnead6 at charter.net> wrote in message news:<abo3f4$5dt$1 at smc.vnet.net>...
> Hi,
> 
> I've been trying to assign values to superscripted variable, ex,
> a^i = 5
> but I get a message that Tag Power is protected.
> I can
> Unprotect[Power]
> first and then it works fine.
> However after a few more expressions, Power somehow gets reprotected!
> Does anyone know what causes this?
> How can I keep Power unprotected for the remainder of the session?
> 
> Thanks in advance,
> Dave Snead


  • Prev by Date: MathML Conference: Schedule Set
  • Next by Date: Re: Re: Limit with restrictions
  • Previous by thread: RE: Assigning to superscripted variables
  • Next by thread: Re: Assigning to superscripted variables