26.4: A.4- Graphing a piecewise defined function
- Page ID
- 54491
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Suppose you wanted to graph the piecewise defined function
\[f(x)= \begin{cases}x^{2}, & x<2 \\ 2 x-7, & x \geq 2\end{cases} \nonumber \]
Go to the menu. We need to enter the function in the following way:
\[y=x^2(x<2)+(2x-7)(x\geq 2) \nonumber \]
The only new entries are in the inequality signs, which can be accessed through the “TEST” menu (\(\boxed{\text{2nd}}\)\(\boxed{\text{math}}\)).
Therefore, we press the keys: \(\boxed{\text{X,T,}\theta,n}\)\(\boxed{x^2}\)\(\boxed{\text{(}}\)\(\boxed{\text{X,T,}\theta,n}\)\(\boxed{\text{2nd}}\)\(\boxed{\text{math}}\)\(\boxed{\text{5}}\)\(\boxed{\text{2}}\)\(\boxed{\text{)}}\)\(\boxed{\text{+}}\)\(\boxed{\text{(}}\)\(\boxed{\text{2}}\)\(\boxed{\text{X,T,}\theta,n}\)\(\boxed{\text{-}}\)\(\boxed{\text{7}}\)\(\boxed{\text{)}}\)\(\boxed{\text{(}}\)\(\boxed{\text{X,T,}\theta,n}\)\(\boxed{\text{2nd}}\)\(\boxed{\text{math}}\)\(\boxed{\text{4}}\)\(\boxed{\text{2}}\)\(\boxed{\text{)}}\)\(\boxed{\text{enter}}\). The graph is displayed on the right:
The meaning of \(y=(x<2)\) as a function is that it is equal to \(1\) when it is true and \(0\) when it is false. In other words, the expression \((x<2)\) is \(1\) when \(x<2\) and \(0\) otherwise. You can use this idea to graph more complicated functions. For example to enter \(x+2\) for \(0<x<3\) you could enter \((x+2)(0<x)(x<3)\).
Note: When graphing piecewise defined functions the graph is sometimes different from what is expected. See the common errors section to interpret the resulting graph below.
Graphing with polar coordinates
Suppose you want to graph the curve \(r=\theta+\sin\theta\). Press \(\boxed{\text{mode}}\). On the fourth line highlight ’Pol’ and press \(\boxed{\text{enter}}\) (make sure you in radian mode also)
and press \(\boxed{y=}\). Your menu will have a list \(r_1, r_2,...\). After \(r_1\) type \(\boxed{\text{X,T,}\theta,n}\)\(\boxed{\text{+}}\)\(\boxed{\sin}\)\(\boxed{\text{X,T,}\theta,n}\)\(\boxed{\text{)}}\). Then to see the graph type \(\boxed{\text{graph}}\). You may have to adjust your window (zoom fit) to see the resulting spiral.
Graphing with parametric coordinates
Suppose you want to graph the curve given by \(y(t)=3\sin(t), x(t)=4\cos(t)\). First we need to set the mode to parametric mode: press \(\boxed{\text{mode}}\) and highlight ’PAR’ in the fourth line and press \(\boxed{\text{enter}}\).
Now go to the graphing screen . You will see a list that begins with X\(_{1T}\) and Y\(_{1T}\). To the right of X\(_{1T}\) type \(\boxed{\text{4}}\)\(\boxed{\cos}\)\(\boxed{\text{X,T,}\theta,n}\) and to the right of Y\(_{1T}\) type \(\boxed{\text{3}}\)\(\boxed{\sin}\)\(\boxed{\text{X,T,}\theta,n}\). Then to see the graph press \(\boxed{\text{graph}}\). You may need to \(\boxed{\text{zoom}}\)\(\boxed{\text{0}}\) (zoomfit) to see the resulting ellipse. (Also, be aware that the scale may be misleading– you may want to \(\boxed{\text{zoom}}\)\(\boxed{\text{5}}\) for a clearer understanding of the graph).