Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.maple > #1289
| X-Received | by 10.55.161.1 with SMTP id k1mr300984qke.52.1510807681416; Wed, 15 Nov 2017 20:48:01 -0800 (PST) |
|---|---|
| X-Received | by 10.31.201.198 with SMTP id z189mr38111vkf.0.1510807681288; Wed, 15 Nov 2017 20:48:01 -0800 (PST) |
| Path | csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!g35no49744qtk.1!news-out.google.com!t48ni92qtc.1!nntp.google.com!g35no49739qtk.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.soft-sys.math.maple |
| Date | Wed, 15 Nov 2017 20:48:00 -0800 (PST) |
| In-Reply-To | <ouikm0$bdf$1@gioia.aioe.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=2607:fea8:95e0:673:0:0:0:5; posting-account=fuODWQoAAACwKFkiR1AZOPqJMnEnSkk2 |
| NNTP-Posting-Host | 2607:fea8:95e0:673:0:0:0:5 |
| References | <ouikm0$bdf$1@gioia.aioe.org> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <c70462ea-5be5-43db-8bcb-997d6fe4efd2@googlegroups.com> (permalink) |
| Subject | Re: question on using subs replace ratio in expression |
| From | acer <maple@rogers.com> |
| Injection-Date | Thu, 16 Nov 2017 04:48:01 +0000 |
| Content-Type | text/plain; charset="UTF-8" |
| Lines | 63 |
| Xref | csiph.com comp.soft-sys.math.maple:1289 |
Show key headers only | View raw
On Wednesday, November 15, 2017 at 7:04:20 PM UTC-5, Nasser M. Abbasi wrote:
> 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
The expression resulting from the execution of sqrt(m)/sqrt(k) does not appear as a subexpression (or operand) of the expression resulting from the execution of A*sqrt(m)/sqrt(k) .
restart;
expr:=A*sqrt(m)/sqrt(k)+sqrt(m)+m/sqrt(k);
(1/2)
A m (1/2) m
expr := -------- + m + ------
(1/2) (1/2)
k k
thaw(algsubs(freeze(m^(1/2))*freeze(k^(-1/2))=w,
subs([m^(1/2)=freeze(m^(1/2)),
k^(-1/2)=freeze(k^(-1/2))],
expr)));
m (1/2)
A w + ------ + m
(1/2)
k
subsindets(expr,
And(`*`,
satisfies(u->(member(m^(1/2),[op(u)])
and member(k^(-1/2),[op(u)])))),
u->u*w*sqrt(k)/sqrt(m));
m (1/2)
A w + ------ + m
(1/2)
k
Back to comp.soft-sys.math.maple | Previous | Next — Previous in thread | Find similar
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