A2 · Lesson 2 · Domain, range and piecewise functions
An amplifier that runs out of room
Feed a small signal into an amplifier and the output is the input times the gain. Turn the input up and at some point the output stops growing, because it can't go beyond the supply voltage. The graph of output against input is a straight line in the middle with flat shelves on each side. No single formula like describes it. It's a function defined in pieces, and many real circuits (rectifiers, limiters, switches) are like that.
Play
- The graph shows an amplifier's output against its input. The dashed line is what the gain alone would give.
- Raise the gain . Where do the flat shelves start now?
- Lower the limit , the most the output can swing. How wide is the range of inputs that come out undistorted?
Predict
The amplifier has a gain of 3 and its output can't go beyond ±9 V. What does it put out for an input of 4 V?
9 V. The gain alone would ask for 12 V, but the output stops at its limit. Inputs up to V come through amplified; anything bigger lands on the shelf. To use a piecewise function, first decide which piece the input falls in.
Name it
Where a formula works, and what it can give
The domain of a function is the set of inputs it accepts. A formula rules some inputs out:
- Division: the bottom can't be zero. accepts every except 2.
- Even roots: what's under a square root can't be negative. needs , so .
- Logarithms: the argument must be positive. needs .
Physics often narrows the domain further: a resistance can't be negative, and time after a switch closes starts at .
The range is the set of outputs. gives only values ; gives only positive values; stays between −1 and 1. Reading the range off a graph means looking at how high and how low the curve goes.
Functions in pieces
A piecewise function uses different formulas on different parts of its domain:
That's the clipping amplifier above. Its linear range is . To evaluate a piecewise function, find the piece whose condition the input meets, then use only that piece's formula.
Three piecewise functions appear all through electrical engineering:
- Absolute value: for and for . It's the distance from zero, and is the distance from .
- The unit step: for and for . It's a switch closing at ; closes at .
- The ideal rectifier: passes positive inputs and blocks negative ones, for and otherwise. In one formula, .
Where two pieces meet, they may join (the clipper's shelves meet its slope) or jump (the step leaps from 0 to 1). A jump in a graph means something changed instantly, which in a circuit is an idealization: real switches take some time.
Worked example
What is the domain of ?
Show the solution
- Condition from the square root. It needs , so .
- Condition from the bottom. It can't be zero, so .
- Combine them. Both must hold: with removed. Written as intervals,
Answer the domain is every except , which is .
Worked example
A silicon diode rectifier passes nothing until the input reaches 0.7 V, then follows the input 0.7 V lower. Write its output as a piecewise function, and find the output when the input is 5 V and when it's 0.5 V.
Show the solution
- Write the two pieces.
- Input of 5 V. It's above 0.7 V, so use the second piece:
- Input of 0.5 V. The first piece applies, so .
- Where the pieces meet. At both give 0, so the graph has a corner there and no jump.
Answer the output is 0 up to 0.7 V and above it, so 5 V in gives 4.3 V out, and 0.5 V in gives 0.
Worked example
An amplifier with a gain of 10 runs from ±12 V supplies and can't swing past them. Write its output as a piecewise function of the input, give its range, and find the output for inputs of 0.5 V and 2 V.
Show the solution
- Find where it clips. The output follows until that would pass a rail, which happens at V.
- Write the pieces.
- Domain and range. The domain is every input, and the range is V.
- Input of 0.5 V. It's inside the linear piece, so it gives
- Input of 2 V. It's past the corner, so the output sits at 12 V, and a sine wave that big comes out with its tops flattened.
Answer the output is −12 V below an input of −1.2 V, in between, and 12 V above 1.2 V. Its range is V; 0.5 V in gives 5 V out, and 2 V in gives 12 V.
Check
An amplifier with a gain of 5 can't put out more than ±3 V. What is its output for an input of 4 V?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
An amplifier with a gain of 5 clips at ±3 V. Up to what input voltage does it amplify without clipping?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
What is the domain of ?
Check
. At what positive is undefined?
Check
for , and for . What is ?
Check
has two solutions. What is the larger one?
Check
A switch is closed at = 2 s, connecting a 5 V source. Which describes the voltage?
Check
Electricity costs 12 cents per kWh for the first 500 kWh in a month and 20 cents for every kWh after that.
(a)
What is the bill, in dollars, for a month that uses 900 kWh?
(b)
What is the average price that month, in cents per kWh?
(c)
How many kWh make the bill exactly 50 dollars more than the bill for 500 kWh?
Check
An amplifier with gain clips at . Derive where its linear piece ends.
Step 1
At what input does the output first reach ?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
At what input does it reach ?
Step 3
How wide is the range of inputs that come out undistorted?
Explain why
Why does the graph of an amplifier's output against its input have to be piecewise, and what sets where the pieces change?
An amplifier makes its output out of its power supply, so the output can't swing beyond the supply's voltages. For small inputs the output is the gain times the input, a straight line. Once that product would pass the limit, the output stays at the limit, a flat piece. The change happens where the gain times the input equals the limit, so a bigger gain or a smaller supply makes the straight part narrower.
Practice
Keep practicing
13 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.