A possible explanation is that some yet unsolved advanced functions have a known codomain, but not a known range.
Got any better ideas?
Mathematics Educators Stack Exchange is a question and answer site for those involved in the field of teaching mathematics. It only takes a minute to sign up.
Sign up to join this communityA possible explanation is that some yet unsolved advanced functions have a known codomain, but not a known range.
Got any better ideas?
Codomain is a primary notion in the definition of a function, range is something that can be computed given the whole definition, one cannot possibly replace the other. What bothers me is that you seem to imply that you introduced codomain after range, and I don't see how that could be.
The only possible question left would be "why not always introduce functions that have their range equal to their codomain?", i.e. "why don't we only define onto functions?" which might be your real question. To that, there are several answers:
the one you gave: it might be difficult to determine the range. This is a strong one, and you don't need to involve advanced functions. We want to be able to define the function $x\mapsto x^4-x^3+12x-7$ from $\mathbb{R}$ to $\mathbb{R}$ without having to determine its range!
in many occasion we want to have a larger codomain, e.g. when we consider composed function: the codomain of one function should match the domain of the other one; when we consider paths in, say, the plane: we don't want the path to take its value in some subset of the plane, but to consider it as taking its values in the plane itslef; imagine you are modeling a physical problem with a function, say the temperature at a point expressed as a function of the time: you would not like to have to know the range before getting started. This last case points to an important point: domain and codomain really are about the type of the input and output of the function (in the physics example, both are real numbers but physically one is a time and the other a temperature, in maths a function could have a integer input and real output, or real number input and point output, etc.)
I'll give a brief answer. Basically, $f: A \rightarrow B$ paired with a rule $f(x) \in B$ for each $x \in A$ defines a function. There are three moving parts, the choice of $A$, the choice of $B$ (the codomain) and the rule $f(x)$. These choices do not exist in isolation. We must have $f(x) \in B$ so the function is into and we must have $f(x)$ is a single element in $B$ so the function is single-valued. One very nice aspect of this definition is it allows us to change the domain without changing the formula and it allows us to change the codomain without changing the formula. Why this matters? Certainly good references to problems in higher mathematics which require the codomain have already been mentioned in the comments. I would point out the terminology allows us to take any function and create a corresponding bijection $\iota \circ f \circ s$ where $s: C \rightarrow A$ is a map which selects just one point in each fiber of the domain and $\iota: f(A) \rightarrow B$ is the inclusion map. If we were to exchange the range $f(A)$ for the codomain $B$ then it would be difficult or impossible to have this discussion.
But, I think your answer has the right idea for beginning students. We could say this: $f: A \rightarrow B$ is like planning a trip. The $B$ describes where you may possibly go whereas $f(A)$ is where you actually go. This reflects the view that we may hold a function with partial understanding. In particular, this is a reality for students who when given $f(x)$ do not entirely understand it's content (until they do much analysis of say, $f(x) = \frac{x}{x-2}$ etc.)