### Home > CALC > Chapter Ch2 > Lesson 2.1.2 > Problem 2-23

Sara's roller coaster needs to be continuous. That means that the *y*-values at the boundary points (*x* = 0 and *x* = 2π) need to agree from the left and the right.

Determine the *y*-value of the roller coaster at *x* = 0: −2cos(0) + 3 = 1

Next, determine the *y*-value of the roller coaster at *x* = 2π: −cos(2(2*π*)) −4 = −5

We are ready to find the equation of the middle piece of the piecewise function. This piece has two unknowns, *a* and *b*. Fortunately, in Step 2 and Step 3, we found two values that exist on the middle equation, if the piecewise is continuous.

Write and solve a system for *a* and *b*:

1 = *a*cos(*bx*) −2 when *x* = 0

−5 = *a*cos(*bx*) −2 when *x* = 2π

Use the eTool below to dynamically adjust the graph.

Click the link at right for the full version of the eTool: Calc 2-23 HW eTool