Example 16: for and
Find and , if and are given by and . Show that .
For ,
At : and .
, so .
Want the reason behind every step, the basics and the checks?
The order of composition matters. means "do first, then ", and means "do first, then ". Here that is the difference between cosine then square-and-triple, giving , and square-and-triple then cosine, giving . Two functions are equal only if they agree at every input, so to show they are different we need just one input where they disagree. does it: against .
- Given
- and , both from to .
- To find and show
- Formulas for and ; then that and are not the same function.
- Plan
- (1) Check both composites are defined. (2) Substitute to get . (3) Substitute to get . (4) Recall what "equal functions" means, and find one where the two values differ.
Basics you need
For and , . The function nearer to acts first. Basics: what a function is
means "whatever goes in, square it and multiply by 3". So . The letter is only a placeholder.
means , the square of the cosine. It is not , the cosine of the square. For example .
means they have the same domain, the same codomain, and for every in the domain. So as soon as for a single . Basics: proving and disproving
, , , and for every real .
Solution
Both composites are defined
and both go from to . The codomain of is , which is the domain of , so is defined. In the same way the codomain of is the domain of , so is defined too.
Definition 8 needs the first function's outputs to be legal inputs for the second. Here every real number is a legal input to both and , so both orders work. (In Example 15 only one order was possible; here both are, which is what lets us compare them.)Find : cosine first, then
We first replace by what it equals, . That leaves : the rule applied to the number . The rule says square the input and multiply by 3, so the input becomes . The last equality is only the standard shorthand .whatever is put in the box (Basic 2). Writing the input in brackets, , avoids confusion with (Basic 3).Find : first, then cosine
Now the inner function is , so is computed first. Then , the cosine, is applied to that number. The square sits inside the cosine this time. The two answers contain the same ingredients (a cosine, a square, a factor 3), but in a different order, and that is exactly the point of the example.. With , the result is , not and not .Show with one value of
Both functions have domain and codomain , so they are equal only if for every real . Try :
Since , the two functions disagree at . Hence .
Blue: . Gold: . At the blue curve is at 3 and the gold one at 1. The curves do cross at two points in this window (circled, near ), so some inputs happen to give equal values, but a single input with different values is enough to make the functions different. "" is a claim about every real number, so one real number where it fails disproves it. That is why the textbook says only "for ": a single counterexample is a complete proof that the functions are not equal. We chose because both cosines are easy there (). The graph also shows why we must not test at a crossing point: there the two values agree, and that tells us nothing.Two functions are equal when they agree at every point of a common domain (Basic 4). One counterexample disproves a "for all" statement. Basics: proving and disprovingA second way to see the difference
Since for every real , the function never takes a value larger than 1. But . So the value 3 is in the range of and not in the range of . Functions with different ranges cannot be equal.
This argument does not even need to compare the two functions at the same input. It looks at the set of values each one produces. Their ranges are for (because ) and for . Different ranges force different functions.If , they produce exactly the same outputs, so their ranges are equal. Contrapositive: different ranges mean .
At , but , so . This agrees with the textbook's solution. Composition of functions is not commutative in general.
Another input: . Then , while , and , so . Again different. And at : , . The verification script checks these values and also confirms that the two curves really do meet near , where both equal about .
- Reading as . . At both happen to be 1, but at , while .
- Swapping the meaning of and . In the function (written on the right, next to ) acts first.
- Writing . The factor 3 belongs to , which acts first, so it ends up inside the cosine: .
- Trying to "prove" with algebra. No general manipulation is needed. A single value of where the outputs differ is a complete proof.
- Thinking one equal value means equal functions. The curves cross near . Equality at some points does not give equality as functions.
- To compose, substitute the inner function into the outer one: .
- In general : composition is not commutative. Always keep track of which function acts first.
- To show two functions are different, find one input where they differ. To show they are equal, you must argue for every input.
Every fact used, and where it comes from
| Fact | Used in | Source |
|---|---|---|
| Definition of composition | Steps 1–3 | Definition 8, Section 1.4 (Lesson: composition) |
| means | Step 2 | Standard notation for powers of trigonometric functions |
| Equal functions agree at every point | Step 4 | Meaning of equality of functions (Basics: what a function is) |
| ; | Steps 4, 5 | Values and range of cosine (Class 11) |
| One counterexample disproves a "for all" | Step 4 | Logic of quantifiers (Basics: proving and disproving) |
| Numerical values, crossing point, graph coordinates | Check, figure | Recomputed in the site's verification script |
Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →