Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7279

Re: how to replace with definition

From Bill Rowe <readnews@sbcglobal.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: how to replace with definition
Date 2011-12-16 11:06 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jcf8ng$71c$1@smc.vnet.net> (permalink)

Show all headers | View raw


On 12/15/11 at 4:53 AM, radford.schantz@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.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: how to replace with definition Bill Rowe <readnews@sbcglobal.net> - 2011-12-16 11:06 +0000

csiph-web