Formulas for computing composite function

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 1K views
rxh140630
Messages
60
Reaction score
11
Homework Statement
Let f and g be two functions defined as follows:

[itex] f(x) = \frac{x+|x|}{2}[/itex]

[itex] g(x) = \begin{cases}
x \text{ for x < 0} \\
x^2 \text{ for x ≥ 0}

\end{cases} [/itex]

Find a formula, or formulas, for computing the composite function h(x) = f[g(x)]
Relevant Equations
f ο g = f[g(x)]
h(x) = 0 for x ≤ 0
h(x) = x^2 for x>0

But my book says

h(x) = 0 for x<0
h(x) = x^2 for x≥0

Can my solution (the first one) work as well? Because the actual function value at x = 0 is zero. I feel like my solution is more elegant.
 
Physics news on Phys.org
Yes, the both give the same result.
 
  • Like
Likes   Reactions: rxh140630
rxh140630 said:
h(x) = 0 for x ≤ 0
h(x) = x^2 for x>0

But my book says

h(x) = 0 for x<0
h(x) = x^2 for x≥0

These define the same function ##h##. To see this, you can ask at what points do the function values differ?
 
  • Like
Likes   Reactions: rxh140630
PeroK said:
These define the same function ##h##. To see this, you can ask at what points do the function values differ?

They do not differ because x^2 at x=0 = 0, if we choose to use the authors definition.

Since they do not differ then they must be the same.
 
Last edited: