Pivot the Rule-Switcher

PIECEWISE FUNCTIONS — different rules for different input ranges. y = f(x) where f varies depending on which interval x falls in.

A story read by Pivot the Rule-Switcher

Press play to listen along. The line being read lights up as you go.

Show full transcript

Loading transcript…

01 Opening
Pivot the Rule-Switcher beat 1 of 5

Pivot stood at a big road fork. He was a junction-master. That was his job for twelve years. A junction-master helped people find their way. Roads split into different paths here. Each path went to a different place. Pivot made sure coaches took the right one.

The kingdom had three busy road forks. These places needed a full-time junction-master. One was Threefork. The main road split there. It went north, east, or south. Another was Whisp's Corner. It had a coast road. That road split to the harbor or inland. The third was Mason's Bend. A western road forked there. It went to the highlands or lowlands. Other small forks just had signs. But these three had real people.

Pivot was assigned to Threefork.

Pivot was nineteen years old. He got the job. The kingdom's road office hired him. They tested him first. Could he think fast? Could he speak clearly? Could he stay calm? Coachmen could get cranky. Pivot was good at all these things. He fit right in at Threefork.

The job worked like this:

A coach would roll up. Pivot waited in his little wooden booth. It sat right at the fork. He always looked at the coach. Had he seen it before? Many times, yes. Coachmen drove the same roads often. If he knew the coach, he knew where it was going. If not, he stepped out. He walked to the driver. "Where are you headed today?" he would ask.

02 Pivot the Rule-Switcher
Pivot the Rule-Switcher beat 2 of 5

The driver would call out a town. "Northgate!" Or "Easton!" Sometimes "Southport!" Once in a while, "The capital!" Or even, "I don't know. My lady just said to follow this road." If that happened, Pivot walked. He went to the lady in the coach. He asked her himself.

Then Pivot would tell them. "Take the north fork." Or "Take the east fork." Or "Take the south fork." If they needed the capital, it was trickier. "You want the central road," he'd say. "It's the middle one. Between the north and east forks. Look for the lion-and-star signs. That's the capital's crest."

The coach would proceed. The next coach would arrive.

Pivot did this work every day. Eleven hours a day. Six days a week. For twelve long years. He counted every coach. More than two hundred thousand! He never sent one the wrong way. The road office praised him often. He even won awards. Twice he got the "Reliable Service" award. It was a quiet award. But it meant a lot.

Pivot learned something important. It made him a great teacher later on. His job had a pattern. It was like a game with rules. The rules changed. They changed based on what the coachman said.

If a coach said "Northgate," Pivot's rule was "take the north fork." If a coach said "Easton," Pivot's rule was "take the east fork." If a coach said "Southport," Pivot's rule was "take the south fork." If a coach said "the capital," Pivot's rule was "take the central road; follow the lion-and-star signs."

Different words from the driver. Different rules from Pivot. The job was always the same. It was about directing coaches. But the answer changed. It changed based on where they wanted to go.

03 Pivot the Rule-Switcher
Pivot the Rule-Switcher beat 3 of 5

Pivot didn't know the fancy math word for it. Not yet. But what he did was called a piecewise function.

Pivot was thirty-one. The road office sent him help. A young man named Cobble arrived. Cobble was new. He just finished school. He knew a lot about math. On his second day, Pivot was busy. He told a driver to take the south fork. Cobble spoke up. "Sir," he said, "that's a piecewise function."

Pivot said: "A what?"

Cobble explained. "In math, it's a special kind of function. It has different rules. The rules change for different numbers. Like, if 'x' is small, you use one rule. If 'x' is big, you use another. It's still the same big function. But it has different parts. You do this every day, sir. You hear where the coach wants to go. That's the 'input.' Then you pick the right rule. You tell them which road to take."

Pivot thought about it. He thought for a few days. Then he told Cobble, "That's a good word. Piecewise. I'll keep that in mind."

Pivot turned thirty-three. He wrote a letter. It went to the FunctionForge academy. His letter said: "I've been a junction-master for twelve years. I've sent two hundred thousand coaches the right way. I just learned my job is a piecewise function. I want to teach this. I think the road office can find someone new for Threefork. And honestly, I'm tired of standing all day."

The head of the academy invited him. "Come teach!" they said. Pivot said yes. He left his job at the junction. The road office sent a new person. Later, Cobble took over Threefork.

04 Pivot the Rule-Switcher
Pivot the Rule-Switcher beat 4 of 5

Pivot has been teaching piecewise functions at the academy for eleven years.

In his classroom, Pivot always starts the same way. On the first day, he stands up front. "Imagine I'm at a road fork," he says. "Three coaches drive up. The first one wants to go to Northgate. What do I tell it?"

The children — always — say take the north fork.

Pivot says: "The second coach is bound for Easton."

The children say take the east fork.

Pivot says: "The third coach is bound for Southport."

The children say take the south fork.

05 Closing
Pivot the Rule-Switcher beat 5 of 5

Pivot smiles. "That's a piecewise function," he says. "The job is to direct traffic. That's the main function. What the driver says is the 'input.' My answer is the 'output.' The output changes. It changes based on the input. Different input, different rule. But it's still the same job."

Then he writes on the board:

If x < 0, y = x² If x ≥ 0, y = 2x

He points to the board. "Here's the math part," he says. "The function gets a number. It checks that number. Is it smaller than zero? Or is it zero or bigger? Then it uses the right rule. It's just like me at the junction! Different input, different rule. The function puts two rules together. It makes one piecewise function."

When children ask whether piecewise functions are hard, Pivot always says the same thing:

"They are not hard," Pivot says. "They are like road forks. You look at the input first. Then you use the rule that fits. Different inputs make different rules happen. The function is all the rules together. Each rule is a piece. That's why it's piecewise."

Pivot still visits Threefork. He goes twice a year. Cobble is the main junction-master now. He is always glad to see Pivot. They drink tea together. They sit at the little inn by the fork. They pretend to direct coaches. It's an old joke. The innkeeper has heard it too many times. She doesn't even smile anymore.

The FunctionForge ensemble

Pivot the Rule-Switcher is part of FunctionForge's distributed-narrative cast. Each character embodies a different curricular primitive; together they teach the full subject.