Message Boards Message Boards

0
|
3721 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Manipulating Limits of Tables

Posted 10 years ago

Is it possible to manipulate the limits in in your table? How can I say to mathematica that I want to stop the evaluation in certain moment (Table)? I was trying to do this

F[x_]:=(x - 4) (x - 8) (x)
F2[x_] := If[0 < F[x] < F[x + 0.1], F[x]]
TableForm[Table[F2[x], {x, 0, 10, 0.1}]]
Plot[F[x], {x, -1, 9}]

This is a graph of a polynomial of third grade, what I need is to take one section of this function beginning in zero and ending near the critical point, I know that I can do it with calculus, but this method is better for me. I need that the upper limit finish when F[x] < F[x + 0.1] but I don´t know how to write it in Mathematica.

Greetings :)

POSTED BY: Charls Mejía
2 Replies

may be

ClearAll[x, f];
f[x_] := (x - 4) (x - 8) (x);
{y, x0} = FindMaximum[f[x], {x, 0, 9}];
Show[Plot[f[x], {x, 0, 9}], Plot[f[x], {x, 0, x /. x0}, PlotStyle -> {Thick, Red}]]

enter image description here

POSTED BY: Nasser M. Abbasi
Posted 10 years ago

Almost! The graph is not as important, the important thing is the value that I want no to obtain near de critical point, for example in your reply in FindMaxium you put limits from 0 to 9 , the 0 is ok, but instead of 9 I want that the evaluation stops when f (x + dx )< f(x) , where dx is a small increment that I chose.

POSTED BY: Charls Mejía
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract