[Date Index]
[Thread Index]
[Author Index]
Re: Replacement Rule with Sqrt in denominator
*To*: mathgroup at smc.vnet.net
*Subject*: [mg114473] Re: Replacement Rule with Sqrt in denominator
*From*: Richard Fateman <fateman at cs.berkeley.edu>
*Date*: Sun, 5 Dec 2010 21:52:16 -0500 (EST)
*References*: <ic5igm$44p$1@smc.vnet.net> <ic8ad7$81f$1@smc.vnet.net> <id7t95$lh1$1@smc.vnet.net> <idagbn$js7$1@smc.vnet.net> <idd7s6$ngv$1@smc.vnet.net>
On 12/4/2010 3:15 AM, Roland Franzius wrote:
>>
>> and the pattern does not match. Maybe you don't want it to match in
>> this case, but the problem persists even if you do. Like this pattern:
>>
>> ((1 + I x)^(a/2)/(1 - I x)^(a/2)) /. {HoldPattern[
>> a_^(b_/c_) d_^(e_/c_)] :> (a^b d^e)^(1/c)}
>>
>> which fails.
>
> It seems you have not yet recognized that pattern matching in
> Mathematica fails by construction if the symbol name of pattern, here a_
> concides with a symbol in the expression.
Uh, no, I think you have it wrong.
Sin[a] + Sin[b] /. Sin[a_] -> h[a]
is perfectly happy to return h[a]+h[b]
Sin[a] + Sin[a + b] /. Sin[a_] -> h[a]
is perfectly happy to return h[a]+h[a+b].
...
>
> So the alternatives are to write an alternative language
... and possibly implement it in Mathematica...
> or to learn
> mastering the of use it. The same alternative holds for all of
> mathematics.
Actually this is obviously not correct, since Mathematica can (and does)
change. I don't know if "mathematics" changes, but certainly the
language of mathematics evolves.
RJF
Prev by Date:
**ANN: CMake module for Mathematica**
Next by Date:
**Re: How to use "Apply" to do differentiation ?**
Previous by thread:
**Re: Replacement Rule with Sqrt in denominator**
Next by thread:
**Re: Replacement Rule with Sqrt in denominator**
| |