Defined Functions

You can plot a defined function in two different ways. Recall that you define a function such as f (x) = x sin x by placing the insertion point in the expression and choosing New Definition from the Define submenu.

$\blacktriangleright$ To plot a defined function f of one variable

To plot a piecewise-defined functionDM3-2.tex#Piecewise-defined function f, you may use either the function name f or the expression f (x) to create the plot. If the function is not continuous, these two choices will give different plots as illustrated in the second example below. In the first example, the function is

f (x) = $\displaystyle \left\{\vphantom{
\begin{array}{ccc}
x^{2}-1 & \text{if} & x<-...
...ext{if} & -1\leq x\leq 1 \\
x^{2}-1 & \text{if} & 1<x
\end{array}
}\right.$$\displaystyle \begin{array}{ccc}
x^{2}-1 & \text{if} & x<-1 \\
1-x^{2} & \text{if} & -1\leq x\leq 1 \\
x^{2}-1 & \text{if} & 1<x
\end{array}$

$\blacktriangleright$ Plot 2D + Rectangular

f

dtbpF3.0459in2.0392in0ptpiecews3.wmf

In the following example the function is

g(x) = $\displaystyle \left\{\vphantom{
\begin{array}{ccc}
x^{2}-1 & \text{if} & x<-...
...ext{if} & -1\leq x\leq 1 \\
x^{2}-1 & \text{if} & 1<x
\end{array}
}\right.$$\displaystyle \begin{array}{ccc}
x^{2}-1 & \text{if} & x<-1 \\
20-x^{2} & \text{if} & -1\leq x\leq 1 \\
x^{2}-1 & \text{if} & 1<x
\end{array}$

Observe that plotting the expression g(x) gives the graph of the function y = g(x), while plotting the function name g adds vertical lines at discontinuities to make a continuous graph.

$\blacktriangleright$ Plot 2D + Rectangular

g

dtbpF3.0277in2.028in0ptpcwscont.wmf

$\blacktriangleright$ Plot 2D + Rectangular

g(x)

dtbpF3.0277in2.028in0ptpcwsdisc.wmf

$\blacktriangleright$ To add a defined function f to a 2D plot

1.
Select the name f of the function or select the expression f (x).

2.
Drag your selection onto the plot.