MathGroup Archive 2006

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

Search the Archive

Re: Using FindRoot with an equation that includes Maximize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63790] Re: Using FindRoot with an equation that includes Maximize
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Sat, 14 Jan 2006 02:32:56 -0500 (EST)
  • References: <dq7uo4$40d$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Charles,

Maybe you could organize your functions like this
(just a toy example) :

In[1]:=w1a[M1_?NumericQ,m2_?NumericQ]:=-M1^2-m2^2+1;

In[2]:=w2a[M1_?NumericQ,m2_?NumericQ]:=-M1^2-2m2^2+2;

In[3]:=maxi1[m2_?NumericQ]:=First@Maximize[{w1a[M1,m2],0<M1<50},{M1}];

In[4]:=maxi2[m1_?NumericQ]:=First@Maximize[{w2a[M2,m1],0<M2<50},{M2}];

In[5]:=FindRoot[{0 == maxi1[m2],0==maxi2[m1]},{{m1,4.5},{m2,4.5}}]

Out[5]={m1 -> 1.,m2 -> 1.}

hth

v.a.


  • Prev by Date: Re: Plot PDF of a Discrete Random Variable
  • Next by Date: Re: Question about UpSet vs SetDelayed
  • Previous by thread: Re: removing dublicates in lists
  • Next by thread: Re: Using FindRoot with an equation that includes Maximize