MathGroup Archive 2009

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

Search the Archive

Re: Plot function, finding numeric optima, intersection points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg99321] Re: [mg99265] Plot function, finding numeric optima, intersection points
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sat, 2 May 2009 06:02:51 -0400 (EDT)
  • References: <5123850.1241172970047.JavaMail.root@n11>

You're more likely to get a good answer if you give an actual evaluable
example.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  


From: Mark [mailto:mryan1 at uoregon.edu] 


Hello,

  I am using the Manipulate and Plot functions to work with the graphs of
several composite, non-polynomial functions (they are of the form:
f[Min[Solve[eq,x],Solve[eq,y]]).

The Manipulate and Plot functions work fine. I get nice, quick graphs and I
can easily see the results of changing any of the parameter values.


My problem is that I need to do 2 things besides just *look* at the graphs
of these functions:

1. I need to be able to quickly find the coordinates of the intersection of
these curves with a very simple linear function (eg, intersection of f()
with the line y=x)

2. I need to keep track of the coordinates of the max of these functions
(they each have a single global max), particularly graph the position of the
max as a function of one of the parameters of f().


For 1., I used FindRoot[f()==x]. 
For 2., I used the form Plot[ArgMax[f(),x],{parameter,0,10}


These last 2 commands are VERY VERY slow to evaluate, and I am getting a
recurring "function is not a number at x=0.0345" error (even though it HAS
to be a number there and everywhere else) and some other headaches.


My question isnt so much about how to solve these particular problems, as
much as it is just asking "Is there a better way?" I dont need more than
about 2 decimal point precision for any of this.


When I use Manipulate and Plot, I can change the graph very quickly with
almost zero computational lag. Mathematica is clearly evaluating my function
at many many different points in order to be able to Plot the graph in the
first place. Is there some way that I could just save THOSE values (the ones
needed to run the Plot function) in a list so I can just find the max value
directly? Is there an option to the manipulate or plot functions that
automatically tags the max point on the curve, and/or automatically tags the
intersection point of two curves?

Thanks in advance for any help. I apologize if any of this was unclear!

:)




  • Prev by Date: Re: New Wolfram Tutorial Collection documentation is ready
  • Next by Date: Re: How do I send the palette behind other windows?
  • Previous by thread: Plot function, finding numeric optima, intersection points
  • Next by thread: Re: Re: NDSolve initial value problem