Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.soft-sys.math.maple > #1288

question on using subs replace ratio in expression

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.maple
Subject question on using subs replace ratio in expression
Date 2017-11-15 18:04 -0600
Organization Aioe.org NNTP Server
Message-ID <ouikm0$bdf$1@gioia.aioe.org> (permalink)

Show all headers | View raw


This works:

    expr1:=sqrt(m)/sqrt(k);
    subs(sqrt(m)/sqrt(k)=w,expr1);
    
gives
            w

And this works

    expr2:=5*sqrt(m)/sqrt(k);
    subs(sqrt(m)/sqrt(k)=w,expr2);

gives  5 * w

But why this does not work?

    expr3:=A*sqrt(m)/sqrt(k);
    subs(sqrt(m)/sqrt(k)=w,expr3);

I was expecting  A*w to be returned, but it returns
expr3 as is. algsubs also do not work.

How can one tell Maple to replace sqrt(m)/sqrt(k) by w anywhere
it appears in expression?

Using Maple 2017.2 on windows.

Thanks
--Nasser

Back to comp.soft-sys.math.maple | Previous | NextNext in thread | Find similar


Thread

question on using subs replace ratio in expression "Nasser M. Abbasi" <nma@12000.org> - 2017-11-15 18:04 -0600
  Re: question on using subs replace ratio in expression acer <maple@rogers.com> - 2017-11-15 20:48 -0800

csiph-web