How do programs draw function graphs?

Click For Summary

Discussion Overview

The discussion revolves around how computer programs, such as GeoGebra, MATLAB, and Wolfram, plot graphs for functions. Participants explore various methods of graph construction, including numerical evaluation, interpolation, and geometric construction, while questioning the feasibility of constructing arbitrary functions both manually and computationally.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants suggest that programs evaluate function values over a specified range to generate points that can be interpolated, without needing to identify turning points or gradients.
  • Others argue that general-purpose plotting routines do not assume properties about the data source and may allow users to specify interpolation methods.
  • There is a question about whether arbitrary functions can be constructed geometrically, with examples like linear and circular functions mentioned as constructible.
  • Some participants express uncertainty about the construction of graphs for functions that approach infinity, suggesting that while complete graphs cannot be constructed, finite intervals can be plotted.
  • Participants discuss the constraints that functions must satisfy for geometric construction and whether these functions belong to specific categories.
  • One participant mentions that while certain functions like \(y = x^2\) can be constructed, others may require complex methods involving linkages and strings.
  • There is a reference to historical texts on the construction of curves, noting that modern computers compute positions numerically rather than using geometric methods.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the methods of constructing graphs for arbitrary functions. Multiple competing views remain regarding the feasibility of geometric construction versus numerical evaluation.

Contextual Notes

Limitations include the dependence on the definitions of constructible functions and the unresolved nature of the mathematical steps involved in determining which functions can be constructed geometrically.

Trysse
Messages
75
Reaction score
16
Hi there,

I was wondering how computer programs such as geogebra or more advanced packages such as mathlab or wolfram plot graphs for functions.

Do they calculate values and interpolate? Do they take derivates to determine maxima and turning points? Do they have any other way to somehow construct the curve?

Are there different approaches depending on the type of function?
 
Technology news on Phys.org
Basically, they evaluate the value of the function, over a specified range of the argument. That gives a list of points(x,y), that can be linearly interpolated.
They do not need to identify turning points, or the gradient of the line, as that will be done by the interpolator when it plots the function.
 
Trysse said:
Hi there,

I was wondering how computer programs such as geogebra or more advanced packages such as mathlab or wolfram plot graphs for functions.

Do they calculate values and interpolate? Do they take derivates to determine maxima and turning points? Do they have any other way to somehow construct the curve?

Are there different approaches depending on the type of function?
General-purpose plotting routines will not do anything that assumes something about the source of the data (like whether it comes from a function that has a derivative). They need to be able to plot data of all sorts. On the other hand, they may allow the user to specify how the data will be interpolated (linear, spline, etc.)
 
Ok. Thanks for the quick responses.

That means calculate and interpolate. Right?

Are there ways to construct graphs for arbitrary functions (on a computer or on apiece of paper)?

I know of some functions such as $$f(x)=ax+b$$ or $$f(x)=\sqrt{1-x^2}$$ that I can construct with ruler or a compass but what about arbitrary functions?

Can I construct or must I calculate and plot.

What constraints must a function satisfy so I can construct? Do these functions belong to some group or category of functions that has a name?
 
Conics?
 
Trysse said:
Are there ways to construct graphs for arbitrary functions (on a computer or on apiece of paper)?
There may well be ways, but you must first specify your arbitrary function.

Obviously, no computer is going to construct a function geometrically, when it can evaluate it and plot it numerically.
 
Trysse said:
Ok. Thanks for the quick responses.

That means calculate and interpolate. Right?

Are there ways to construct graphs for arbitrary functions (on a computer or on apiece of paper)?

I know of some functions such as $$f(x)=ax+b$$ or $$f(x)=\sqrt{1-x^2}$$ that I can construct with ruler or a compass but what about arbitrary functions?

Can I construct or must I calculate and plot.

What constraints must a function satisfy so I can construct? Do these functions belong to some group or category of functions that has a name?
On a computer, you can always make a large table of evaluated points.
Manually, it is good to find the zeros, poles, inflection points, maximums, minimums, asymptotic values, etc. And if they are compositions of functions that you can graph, then you can make a series of graphs following the composition.
 
Baluncore said:
but you must first specify your arbitrary function.
how about say $$f(x)=x^2$$ or $$f(x)=\frac{1}{\sqrt{1-x^2}}$$?

My guess is, that those graphs cannot be constructed. One reason is that they go to infinity. But maybe there is a way to construct the graph within a certain range. I still guess it is not possible. However, this guess is based purely on the fact that I don't know how to do it. And by construct I do not mean "more or less" but exactly.
 
Trysse said:
how about say $$f(x)=x^2$$ or $$f(x)=\frac{1}{\sqrt{1-x^2}}$$?

My guess is, that those graphs cannot be constructed. One reason is that they go to infinity. But maybe there is a way to construct the graph within a certain range. I still guess it is not possible. However, this guess is based purely on the fact that I don't know how to do it. And by construct I do not mean "more or less" but exactly.
Obviously a complete graph over the entire real line can't be constructed, but a program can draw a graph ove a finite interval. The graph of the first function is a parabola and that of the second function has a sort of parabolic shape in the interval (-1, 1).
 
  • #10
  • Like
Likes   Reactions: FactChecker
  • #11
Trysse said:
However, this guess is based purely on the fact that I don't know how to do it.
Curve sketching is an important subject in elementary mathematics as it gives one an intuitive insight into important functions, their roots and derivatives. You can learn about it from sites such as https://www.bbc.co.uk/bitesize/guides/zc62srd/revision/7

The topic is summarized on the Wikipedia page https://en.wikipedia.org/wiki/Curve_sketching and this page has references to books with more information. These books were published over a century ago from which you can infer two things:
  • the books are out of copyright and copies can be found by searching the internet; and
  • "advanced curve sketching" as a topic in intself is not something that people have been interested in for a very long time.
Trysse said:
And by construct I do not mean "more or less" but exactly.
What do you mean by 'construct a graph exactly'?
 
  • #12
Trysse said:
Can I construct or must I calculate and plot.

What constraints must a function satisfy so I can construct? Do these functions belong to some group or category of functions that has a name?
Are you asking about constructing a graph using some physical property like:
1) a circle using a protractor,
2) an ellipse using a string with its ends at the foci,
3) a straight line using a ruler,
etc.?
If so, that is a good question.
There might be a lot more that I am not familiar with and I do not know of any general term or categorization for them.
 
  • #13
Trysse said:
My guess is, that those graphs cannot be constructed.
The graph y = x2 can be constructed.
https://en.wikipedia.org/wiki/Parabola#Pin_and_string_construction

The other would be more difficult, as it involves three tricks, but I believe it would be possible using pins, linkages and string. There have been many books written on the subject of the generation of mathematical curves using linkages.

How To Draw A Straight Line; A Lecture On Linkages. A. B. Kempe, (1877).

I. I. Artobolevskii and W. Johnson (Auth.) - Mechanisms for the Generation of Plane Curves - Macmillan (1964).

Kinematics, Dynamics, and the Design of Machinery - K. J. Waldron and G. L. Kinzel - (1944, 2004).

There is no way a computer would use any of those methods to draw a graph today. The positions of the points and lines would be computed numerically.
 
  • Like
Likes   Reactions: FactChecker
  • #14
Baluncore said:
The graph y = x2 can be constructed.
https://en.wikipedia.org/wiki/Parabola#Pin_and_string_construction

The other would be more difficult, as it involves three tricks, but I believe it would be possible using pins, linkages and string. There have been many books written on the subject of the generation of mathematical curves using linkages.

How To Draw A Straight Line; A Lecture On Linkages. A. B. Kempe, (1877).

I. I. Artobolevskii and W. Johnson (Auth.) - Mechanisms for the Generation of Plane Curves - Macmillan (1964).

Kinematics, Dynamics, and the Design of Machinery - K. J. Waldron and G. L. Kinzel - (1944, 2004).

There is no way a computer would use any of those methods to draw a graph today. The positions of the points and lines would be computed numerically.
Interesting.
So if there is a good way to do multiplication any polynomial can be constructed.
Then if there is a good way to construct 1/x, any rational function can be constructed.

If there is a construction of ##e^x## all the trigonometric and hyperbolic functions can be constructed.
Finally, the inverse of any constructable graph is easy.
 
  • #15
FactChecker said:
If there is a construction of all the trigonometric and hyperbolic functions can be constructed.
Finally, the inverse of any constructable graph is easy.
Some transcendental functions are easier than a square. For example, sine and cosine are trivial, given a shaft and a crank. Tidal prediction machines sum the Fourier components with one long wire or chain that snakes through the machine.
https://en.wikipedia.org/wiki/Tide-predicting_machine

During WW2, the ballistic calculations on battleships were all done mechanically, including the atmospheric and Coriolis corrections.
https://en.wikipedia.org/wiki/Mark_I_Fire_Control_Computer

Accurate involute gear teeth are "generated" by a rotating straight edged hob.
https://en.wikipedia.org/wiki/Hobbing
 
  • Like
Likes   Reactions: FactChecker

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
979
  • · Replies 1 ·
Replies
1
Views
973
  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K