Last Updated 10/28/2022

Sage Essentials
Section 5: Functions: Defining, Evaluating and Graphing

Graphing Functions

The plot command introduced in Section 3 works the same for functions.

Example 1

For example, consider the function f( x )=cosx  on [ π,π ] .

To plot several functions simultaneously, use the same syntax as introduced in Section 3. For example, let us plot the functions f( x ) , f( 2x ) , and 2f( x )  on the same graph.

Try this!

For the function f defined above, plot the functions f( x ) , f( x )+2 , and f( x+2 ) on the same graph.

 


← Previous Example Next Example →