MathGroup Archive 2006

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

Search the Archive

Re: How do I combine Solve and Maximize?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65766] Re: How do I combine Solve and Maximize?
  • From: "Chris Chiasson" <chris.chiasson at gmail.com>
  • Date: Mon, 17 Apr 2006 02:28:03 -0400 (EDT)
  • References: <e1suac$c5q$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

David:

This can't be (all of) your real Mathematica code, as there is only one
error from the cut and pasted code:

Solve::eqf x>0 is not a well formed equation

I recommend pasting (all of the InputForm) of your code.

Also, what is A980?

One problem is the use of Solve on a system of equations/inequalities
that is not algebraic (well, I could be wrong). You could use FindRoot
in this case, because your inequality is a restriction on the
independant variable.

Another problem is the use of SetDelayed (its infix form looks like
this :=   ) when it wouldn't produce dfferent output than using Set
(its infix form looks like this =    ).

Since one of your comments says "What values of x causes f1==80", I
would recommend:

In[8]:=
f[x_,y_]=-(x-10)^2-(y-10)^2+100;
In[9]:=
Maximize[{f[x,y],y>0,x>0},{x,y}]
Out[9]=
{100,{x\[Rule]10,y\[Rule]10}}

or maybe the RootSearch package someone mentioned a few days ago

or you could just use calculus??

Good Luck,


  • Prev by Date: Re: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2
  • Next by Date: Re: Beginner--Programming Problem with "if"
  • Previous by thread: How do I combine Solve and Maximize?
  • Next by thread: Simplifying equations for Mathematica