Some Easy (hopefully) Questions

*To*: mathgroup at christensen.cybernetics.net*Subject*: [mg2030] Some Easy (hopefully) Questions*From*: Rob Carscadden <carscadd at pps.pubpol.duke.edu>*Date*: Sat, 16 Sep 1995 01:40:17 -0400*Organization*: Duke University, Durham, NC, USA

I'm trying to run a model using Mathematica. I've scoured all our libraries and all the books are gone. Working with all too basic Mathematica By Example, I haven't been able to find how to do some rather easy things. The first thing I want to do is find a max (I need to plug the max and where it occurs into anther equation). I have a function, and I have taken both the first and second derivatives. I solve for f'(x) = 0. But here's where the trouble comes in. I want to plug these points back into my f(x). How can I do this. Look at the following example: possmax = Solve[(x - 1)^2 == 0,x] // N I get {{x -> 1.},{x ->1.}} and when I try possmax[[1]] I get {x ->1.} but I want the number 1 instead. I know this if probably extremely basic, but due to lack of available documentation here, I can not figure it out. P.S. another useful trick to know would be how many objects are in a list. My function a bit more complicated (compositions, logs etc.), and I don't exactly how many solutions I will have from the Solve[ ] statement. -- Rob Carscadden carscadd at pps.duke.edu http://www.duke.edu/~cars 49% of all Statistics are made up on the spot!