Investigating Piecewise Explicit Formulas

We've learned that sequences are functions whose domain is over the positive integers. This is true for other types of functions, including some piecewise functions. Recall that a piecewise function is a function defined by multiple subsections. A different formula might represent each individual subsection.

How To

Given an explicit formula for a piecewise function, write the first n terms of a sequence

  1. Identify the formula to which n=1 applies.

  2. To find the first term, a_1, use n=1 in the appropriate formula.

  3. Identify the formula to which n=2 applies.

  4. To find the second term, a_2, use n=2 in the appropriate formula.

  5. Continue in the same manner until you have identified all n terms.

Example 3

Writing the Terms of a Sequence Defined by a Piecewise Explicit Formula

Write the first six terms of the sequence.

a_{n}=\left\{\begin{array}{lll}n^{2} & \text { if } n & \text { is not divisible by } 3 \\\frac{n}{3} & \text { if } n & \text { is divisible by } 3\end{array}\right.

Solution

Substitute n=1,n=2, and so on in the appropriate formula. Use n^2 when n is not a multiple of 3. Use \frac{n}{3} when n is a multiple of 3.

\begin{array}{ll}a_{1}=1^{2}=1 & 1 \text { is not a multiple of } 3 . \text { Use } n^{2} . \\a_{2}=2^{2}=4 & 2 \text { is not a multiple of } 3 . \text { Use } n^{2} . \\a_{3}=\frac{3}{3}=1 & 3 \text { is a multiple of } 3 . \text { Use } \frac{n}{3} . \\a_{4}=4^{2}=16 & 4 \text { is not a multiple of } 3 . \text { Use } n^{2} . \\a_{5}=5^{2}=25 & 5 \text { is not a multiple of } 3 . \text { Use } n^{2} . \\a_{6}=\frac{6}{3}=2 & 6 \text { is a. multiple of } 3 . \text { Use } \frac{n}{3} .\end{array}

The first six terms are \{1,4,1,16,25,2\}.

Analysis

Every third point on the graph shown in Figure 4 stands out from the two nearby points. This occurs because the sequence was defined by a piecewise function.

Graph of a scattered plot where the x-axis is labeled n and the y-axis is labeled a_n.

Figure 4

Try It #3

Write the first six terms of the sequence.

a_{n}=\left\{\begin{array}{lll}2n^{3} & \text { if } n & \text { is odd } \\\frac{5n}{2} & \text { if } n & \text { is even }\end{array}\right.