On Mon, Apr 11, 2011 at 09:01:08AM +0100, Leo Butler wrote:
> < float(solve(diff(f(x),x)));
> < float(f(%));
> <
> < The answer was supposed to be in decimal btw.
>
>
> You should be able to do all the calculations symbolically, then
> convert the final answer to floating point. It is easier to check
> intermediate steps if you do this.
>
> I think, also, when you do
Fair enough - I just did this to save time...
>
> eqn : diff(f(x),x) = 0;
> critical_points : solve(eqn,x);
>
> you should get a list of 1 or more critical points. To find the value
> of f at each of this points, you can do the following:
>
> makelist( [ cp, y=f(rhs(cp)) ], cp, critical_points);
>
> which will give you a list of pairs list [x=1,y=2], etc.
Very nice, so just the turning points of the graph? Then I still find
x/y intercepts myself with solve and substituting 0 into f(x)?
Thanks,
Dan