Question: subs and eval works oddly with an assumed name

Hi

 

I've done the following assumptions about the name R

about(R)
Warning, inserted missing semicolon at end of statement
Originally R, renamed R~:
  Involved in the following expressions with properties
    -1/2*R+M*G assumed RealRange(-infinity,Open(0))
  is assumed to be: RealRange(Open(0),infinity)
  also used in the following assumed objects
  [-1/2*R+M*G] assumed RealRange(-infinity,Open(0))

 

later I need to calculate a series of a quantity involving R, for R>>

What I normally do, is

subs(R=1/U,%):
series(%,U=0)

 

But if I try the same in this case I obtain one output where some of the R's were effectively replaced by 1/u, but other ones are still R:

for example if I try the subs with this

((3*M*G*R-R^2)*R^2*R)*sqrt(-(3*M*G*R-R^2)^2* etc etc

I get:

(3*M*G*R-R^2)*R^2*sqrt(-(3*M*G/U-1/U^2)^2*etc etc

The R's outside the sqrt are not substituted, and, however, I don't understand why there is something like

R^2*R

and the product is not fully developed.

I've problems of the same kind with the eval routine.

Thank you for any help

S.V.

Please Wait...