GeneralDisplaying mathematical functions

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
avp3000
Posts: 49
Joined: Thu Nov 15, 2007 4:22 pm

Displaying mathematical functions

Post by avp3000 »

Hi,

I want to ask whether there is a way in LaTeX for displaying graphics of mathematical functions where I do not need to draw them manually, but just give the definition (like f[x]:=2x^2+3x-2), as well as the intervalls. I am asking this, because sometimes I have to perform lots of mathematical calculations in order to find the coordinates, where two functions cross (since I am drawing them manually), whereas if I just define the functions and display them, than their crossing point would be displayed automatically. I know that this is possible for some trigonometric functions, but what about more general ones? Thank you very much in advance.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Displaying mathematical functions

Post by localghost »

Take a look at pgf/tikZ or pstricks. The manuals will tell you how to generate such graphs. In case of occuring difficulties, feel free to ask.


Best regards and welcome on Board
Thorsten
balf
Posts: 158
Joined: Sat Jan 12, 2008 1:11 am

Re: Displaying mathematical functions

Post by balf »

In pstricks, there is \psplot with 3 arguments : xmin, xmax and the function itself. Using pstricks-add with the option 'algebraic', you can use standard notation for your function, instead of postscript postfixed notation. Moreover, pst-func has predefined commands for polynomials, Fourier sums, Bessel functions, and pst-math defines some other functions (hyperbolic, gamma, and so on).

You also can make parametric or polar plots.

B.A.
Post Reply