       Plot function, finding numeric optima, intersection points

• To: mathgroup at smc.vnet.net
• Subject: [mg99265] Plot function, finding numeric optima, intersection points
• From: Mark <mryan1 at uoregon.edu>
• Date: Fri, 1 May 2009 05:23:32 -0400 (EDT)

```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: How to select several cells
• Next by Date: Re: New Wolfram Tutorial Collection documentation is ready
• Previous by thread: Re: issues with GraphPlot
• Next by thread: Re: Plot function, finding numeric optima, intersection points