MathGroup Archive 2011

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

Search the Archive

Re: how to replace with definition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123722] Re: how to replace with definition
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Fri, 16 Dec 2011 05:52:29 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

On 12/15/11 at 4:53 AM, radford.schantz at mms.gov (r_poetic) wrote:

>Hello, I can't seem to manage this replacement:

>k[t] = A[t]/L[t];

>L'[t] = lambda L[t]; A'[t] = s k[t]^alpha;

>D[k[t],t]

>output=  lambda A[t] + s (A[t]/L[t]) ^ alpha
>-----------------     -----------------------------
>L[t]            L[t]

>How can the ratio A[t]/L[t] be replaced with k[t] here?  I have
>tried a number of possibilities using /. or Replace.

You have defined k[t] to be A[t]/L[t] by using Set (=). So,
since Mathematica by default will evaluate everything it can,
immediately after replacing anything with k[t], Mathematica will
evaluate k[t] to A[t]/L[t]. That is, there is no way to get
A[t]/L[t] to become k[t] unless you do something to prevent
Mathematica from evaluating k[t] using Hold or something
equivalent. Best, if you want the end expression to have k[t]
simply don't define k[t] to be something using Set.




  • Prev by Date: Re: Find the derised results
  • Next by Date: Approximating ratio of incomplete gamma functions
  • Previous by thread: Re: how to replace with definition
  • Next by thread: Re: reliably sort?