MathGroup Archive 2014

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

Search the Archive

Re: Using FindRoot with free parameters

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132595] Re: Using FindRoot with free parameters
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 16 Apr 2014 03:39:46 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

On 4/14/14 at 11:00 PM, ssplotkin at gmail.com (steviep) wrote:



>Thanks, I had actually come up this solution in the meantime:

>xf[alpha_, n_] = Function[{alpha, n}, x /. FindRoot[f[n, x] - alpha,
>{x, 2}]][alpha,n]

>which gives the same answer. It also gives a bunch of warnings, as
>does Module when "=" is used instead of ":=".

>Is one method preferred over another? Thanks in any event. -S

Yes, you originally posted

>basically using FindRoot but holding off on substituting in the
>parameters until later. Is there a simple solution?

Delaying evaluation is the precise reason for using :=
(SetDelayed) rather than = (Set). Set evaluates its arguments immediately.




  • Prev by Date: Re: Simple list question
  • Next by Date: Speed of Join and Append. Was Re: Simple list question
  • Previous by thread: Re: Using FindRoot with free parameters
  • Next by thread: SequenceForm for graphics