Tools
Tools
The “Tools” menu makes the resources to solve the following types of problems
available:
4) 2D graphs plotting;
5) 3D graphs plotting;
6) Calculator.
If there is need to access the informed data set, click on the “Back” button.
To determine the numerical value of the defined integral of a function and also its first
and second derivatives for a value of X, the user must, at the “Tools” menu, click on “Integral,
derivative and ODE” or also on the “IDDE” button. Then, the following dialog box will appear:
Choosing the "Integral and derivative" option and clicking on the “OK” button the
following dialog box will appear:
At the first edit box the function that is under study must be written, in Fortran. At the
second and third boxes the integration limits must be written and, at the last one, the value of
X of the derivatives that will be determined. After, click on “OK”.
Then a new dialog box will appear and you can access the file with the (x,y) points
referring to the numeric solution (Runge-Kutta, fourth order).
Attention: If your ODE is not adequate for the general form shown on the dialog box,
you must transform it into a first order system.
Approximate solution for an ODE
You can try to determine an approximate function, with up to four parameters, for the
numeric solution of an ordinary differential equation (ODE) by using curve fitting. For this
purpose, execute the following steps:
1) Select and copy the points from the file with the numeric solution. If it is
possible, eliminate points with abscissa (or ordinate) smaller or equal to zero;
7) If Xo has a value between Xmin and Xmax you must solve the problem twice,
appending together the following results: a) from Xo up to Xf = Xmin b)
from Xo up to Xf = Xmax.
An Example
so you can supply the necessary information about the ODE. Then, two files are obtained:
Accomplishing the seven steps indicated previously for each obtained file, at the end,
the following approximate function is determined with four parameters (in the step 6 you
should set POWER = 50):
With the same seven steps an approximate function is determined for the first
derivative:
Attention: The Runge-Kutta method does not determine values referring to the second
derivative of the function obtained from a second order ODE but, if you
want it, you could obtain that by direct derivation of the approached function
for the first derivative, y'appr(x):
For verification purposes of the obtained results, you could determine y, y' and y'' for
x=0, x=0.5 and x=1.0 (from the approximate functions) which gives the following result:
You can observe that, for these results, with small tolerance, the ordinary differential
equation of this example is verified.
Fortran Syntax
Operations:
Addition: +
Subtraction: -
Multiplying: *
Division: /
Power: ** or ^
Sine of x: sin(x)
Cosine of x: cos(x)
Tangent of x: tan(x)
In case the user does not have a clear idea if the pointed interval is suitable or not, the
“Graph” button can be clicked and it will be possible to see the function plotted for the given
interval. For the information of the previous dialog box, we have:
It becomes clear, then, that if there are any roots, they must be at the interval between
X = -1,0 and 7,5 (because this is the region where the graph touches or crosses the X axis).
Then, when we close the window with the graph, it will be automatically returned to the dialog
box shown previously, the interval limits must be rewritten with the new values. When “OK” is
clicked, the results will be shown:
2D Graph: User model (G 2D)
To plot the graph of a function with 1 independent variable, the user must, at the “Tools”
menu, click on the “2D Graph: User model” option, or then at the “G 2D” button. Then, the
following dialog box will appear:
The user has, then, the option of informing the function (normal or parametric) or
importing a point set to be linked.
The second case, when “Ok” is clicked, the dialog box for the files’ selection will appear
(browse), and the user must indicate the non-formatted file with the points in columns.
At the first case, when “OK” is clicked for the parametric function, the following dialog
box will appear:
Then you must to inform X(u), Y(u) and the limits for the variable u.
At the first case, when “OK” is clicked for the function normally written, the following
dialog box will appear:
When “Ok” is clicked, the question if it is desired to draw another graph will appear (it
can be possible to plot up to 3 graphs simultaneously). Answering no, a new box for the
definition of how the graph must be plotted will appear:
Once the 2D graph is characterized, there are two options to print it.
To use the first option, click on “Print window ”, at the “File” menu, but this option is
used to print only a sketch, because the printing will not have a good quality: the printed picture
will have the same resolution shown on screen.
The second option makes possible to print a graph with a better quality than the
previous one, what can be done by clicking on the “Superzoom in” item at the “Graph” menu.
The graph will be, then, plotted again, but with a much higher resolution than the original one,
using a much bigger space than the available screen size. After that, at the “File” menu, the
user must click on “Print graph (superzoom)”.
To paste the graph, the user must choose, at the “Edit” menu, the “Select All” option as
it is shown at the picture at next:
Then, it is just a matter of opening the document, and pasting the image that was stored
at the clipboard.
At the first edit box, the function of two variables (X1 and X2) , which the graph will be
drawn must be written. At the following edit boxes, the interval limits of X1 and X2 must also be
written. When “OK” is clicked the graph will be drawn.
At the same time that the 3D graph is being drawn, a new box for the final
characterization appears (title, legend, axis and function definition):
Once the 3D graph is characterized, there are two options to print it.
To use the first option, we must click on “Print window”, at the “File” menu, but this
option is only used to print only a sketch, because the printing is not of good quality: the printed
picture will have the same resolution shown on screen.
The second option makes it possible to print a graph with a better quality than the
previous one, what can be done by clicking on the “Superzoom in” item from the “Graph”
menu. The graph will be, then, drawn again, but with a resolution much higher than the original
one, occupying a much bigger space than the available screen size. After that, at the “File”
menu, the user must click on “Print graph (superzoom)”.
To paste the graph on a document, the user must, at the “Edit” menu, select the “Select
All” option as it is shown at the picture at next:
After, at the same “Edit” menu, we must click on “Copy”, as it is shown at next.
Then, it is only a matter of opening the document, and pasting the image that was
stored at the clipboard.
The “Rotation (surface: wire)” option makes it possible to rotate the graph in up to 45
degrees (the default is 0 degrees) but does not work for a solid mesh which is the default
option. Whereas the “Color” option makes it possible to choose among six distinct colors
(standard, blue, red, magenta, green and gray, the default is standard) for the drawing of the
wire frame or the solid mesh. The “Grid” option makes it possible to draw grids at the X1-Y,
X2-Y and X1-X2 planes (the default is with grids enabled) whereas, clicking on “Lines”, the user
can indicate with how many lines the surface must be drawn (from 10 up to 100, the default is
40).