Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Delayed Derivative Operator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg81816] Re: [mg81762] Delayed Derivative Operator
  • From: Curtis Osterhoudt <cfo at lanl.gov>
  • Date: Thu, 4 Oct 2007 04:21:37 -0400 (EDT)
  • Organization: LANL
  • References: <200710030626.CAA28793@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

On Wednesday 03 October 2007 00:26:48 ToddSmith wrote:
> Hi,
>  I would like to be able to have an equation
>
> eq := D[f[x],x]==5;
>
> And a substitution rule
>
> rule = f[x]->x^3;
>
> And perform the substitution
>
> eq/.rule
>
> And get back the equation 3x^2==5. But Mathematica sees f'[x] and
> doesn't do any substitutions. I tried a delayed assignment for eq but
> it didn't work. What can I do?
>
> -Thanks

Maybe 

eq := Hold[D[f[x], x] == 5]; 

rule = f[x] -> x^3; 

In[7]:= ReleaseHold[eq /. rule]

Out[7]= 3 x^2 == 5

will do what you want.

-- 
==========================================================
Curtis Osterhoudt
cfo at remove_this.lanl.and_this.gov
PGP Key ID: 0x4DCA2A10
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================================================


  • Prev by Date: Re: Controlling the display speed of exported Animate or Manipulate
  • Next by Date: Re: Re: Equivalent functionality to colorbar in Mathematica?
  • Previous by thread: Re: Delayed Derivative Operator
  • Next by thread: Re: Delayed Derivative Operator