The Beauty of Piecewise Functions
Imagine you are standing at a crossroads. To your left, the road is paved with one set of rules; to your right, a completely different landscape emerges. This is exactly what a piecewise function is—a mathematical journey where the rules of the game change depending on where you stand.
In this problem, we are dealing with two such functions, f(x) and g(x), and they are both continuous on the entire set of real numbers R. This continuity is our golden ticket. It tells us that no matter how the rules change at x=0, the two paths must meet seamlessly.
Phase 1
The Continuity Bridge
For a function to be continuous at a point, the left-hand limit must equal the right-hand limit. Think of it as a bridge that must be perfectly aligned.
For f(x), the transition point is x=0. The left-hand limit is limx→0−(x+a)=a. The right-hand limit is limx→0+∣x−4∣=∣0−4∣=4. Since the function is continuous, these must be equal: a=4.
Now, let's turn our attention to g(x). Again, the transition point is x=0. The left-hand limit is limx→0−(x+1)=1. The right-hand limit is limx→0+((x−4)2+b)=(0−4)2+b=16+b.
Setting these equal, we get 1=16+b, which leads us directly to b=−15. We have now fully defined our functions:
g(x)={x+1,(x−4)2−15,x<0x≥0
Phase 2
The Art of Composition
Now that we have the complete definitions, we need to evaluate (g∘f)(2)+(f∘g)(−2). The secret to composite functions is to work from the inside out.
Let's tackle (g∘f)(2) first. This means we need to find g(f(2)).
First, we evaluate f(2). Since 2>0, we use the second branch of f(x), which is ∣x−4∣. So, f(2)=∣2−4∣=∣−2∣=2.
Now, we take this result and plug it into g(x). We need to find g(2). Since 2≥0, we use the second branch of g(x), which is (x−4)2−15.
g(2)=(2−4)2−15=(−2)2−15=4−15=−11
The first part of our expression is −11.
Phase 3
The Final Calculation
Next, we evaluate (f∘g)(−2), which means f(g(−2)). First, we find g(−2). Since −2<0, we use the first branch of g(x), which is x+1.
Now, we take this result and plug it into f(x). We need to find f(−1). Since −1≤0, we use the first branch of f(x), which is x+4.
The second part of our expression is 3. Finally, we add our two results together:
We have successfully navigated the piecewise landscape and arrived at the final answer. The result is −8.