       Re: just doesn't work

• To: mathgroup at smc.vnet.net
• Subject: [mg25385] Re: [mg25346] just doesn't work
• From: "Rosa Ma. Seco" <ceie at prodigy.net.mx>
• Date: Fri, 29 Sep 2000 01:06:16 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Question 1. Try to separate the notion of a text editor from a mathematical
system such as Mathematica. The function ReplaceAll is defined by
"expr /. rules applies a rule or list of rules in an attempt to transform
each
subpart of an expression expr." If you look at your expression in FullForm

In:=
FullForm[(4 a^3 b c K Pi Ro)/(15 r^3)]

Out//FullForm=
Times[Rational[4,15],Power[a,3],b,c,K,Pi,Power[r,-3],Ro]

you'll see that no sub part of it is ever going to be substituted by m.
However, in the text editor context simply use Find and Replace.

Question 2.  Use Simplify:

In:=
Simplify[a^2 b c + a b c]
Out=
a (1+a) b c

Tomas Garza
Mexico City

Borut L [mailto:justmyname at email.si] wrote:

> I am writing a paper in Mathematica 4.0, and I found it to be
> very powerful
> text editor. However, I encountered some deadly problems, which I cannot
> solve. Thanks for any help!
>
> 1. How can I replace a symbol m with (4 a b c Pi Ro)/3 in expr
>
> (4 a^3 b c K Pi Ro)/(15 r^3)
>
> expr/.(4 a b c Pi Ro)/3 -> m
> just doesn't work
>
>
> 2. How Can I 'bring out' a defined part from a sum of two terms.
>
> e.g.
>
> Bo[a^2 b c + a b c,a b c] - (would produce) - > a b c (a+1)
>
> Collect[expr,{a,b,c}]
> just doesn't work.

```

• Prev by Date: Re: About N in Mathematica 4
• Next by Date: Re: Integrate doesn't yield what I expect
• Previous by thread: Re: just doesn't work
• Next by thread: winding number