|
[Date Index]
[Thread Index]
[Author Index]
Re: Derivatives in replacement rules
- To: mathgroup at smc.vnet.net
- Subject: [mg125776] Re: Derivatives in replacement rules
- From: Rodrigo Murta <murta at rodrigomurta.com>
- Date: Mon, 2 Apr 2012 04:22:48 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jl3v1b$3mi$1@smc.vnet.net>
On Mar 30, 6:39 am, Yi Wang <tririverwan... at gmail.com> wrote:
> Hi, all,
>
> When I am using the following replacement rule:
>
> b[t] c[t] a'[t] /. b_ a_'[t] -> D[b, t]
>
> I would expect to get D[b[t]c[t], t] = b'[t]c[t] + c'[t]b[t]. However,
> I got 0 actually. To debug, when I set
>
> b[t] c[t] a'[t] /. b_ a_'[t] -> b
>
> I get b[t] c[t]. Thus pattern matching works and it appears D[b,t]
> should be non-zero.
>
> Any ideas how I can get D[b[t]c[t], t] in the above pattern
> replacement? Thanks!
Hi Yi
Use the dalayed rule :> instead of ->
b[t] c[t] a'[t] /. x_ a_'[t] :> D[x, t]
and you will get your expected result
Best regards!
Murta
Prev by Date:
Image Processing Issues
Next by Date:
Re: simplify Arg[E^(I x)]?
Previous by thread:
Image Processing Issues
Next by thread:
Mathematica 8 3D Plot question
|