Last Updated 10/28/2022

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

Manipulating Functions

Example 2

Once a function has been defined, you can evaluate it at various values or literal expressions using function notation. You have seen the following example in Section 1.

SageMath will leave expressions such as square-root symbolic, as shown below.

 

To obtain a compact and simplified answer, use the expand command.

 

 

To obtain a floating-point (numerical) value, use the n() command.

 

Try this!

Find and simplify f( x+4 ) for f( x )= x 2 +3x .

 


← Previous Example Next Example →