Domain definition of functions in arrow notation I need to define a cost function $f(x)$ (of some quantity of goods $x$). Function $f$ is only defined on the domain of positive real numbers (i can only have positive quantities and costs), i.e. $f:\mathbb{R}_{+}\rightarrow\mathbb{R}_{+}$, with $f(x) = x^2$ (or any other polynomial/ function). Is such a definition valid?
 A: My assumption is that $\,\mathbb{R}_{+}\,=\,(0,+\infty)$.
Here is what is not valid: to write $f:\mathbb{R}_{+}\,\rightarrow\,\mathbb{R}_{+}$ when there is even one instance of $f(a) = A$ with $a > 0$ and $A \leq 0$, for the particular formula under consideration.
Examples:

*

*$\quad x^2$ is admissible for your $f$.

*$\quad-x$ is inadmissible.

*$\quad\log(x)$ is inadmissible.

To be clear, I mean admissible --- or not --- given your requirement that the domain of definition be $(0,+\infty)$ and the range of values be contained in $(0,+\infty)$.
The proper way to think of a function is as a triple item. The formula or rule; the domain of definition; the co-domain in which the outputs are required to appear.
Once your triple is set up (meaning there are no "contradictions") you are then free to "constrain" (restrict) the domain in any way that you like. But if you do so, you have actually changed the function (the triple), although you may have left the formula alone.
(This is a source of much confusion. A formula is not a function, but a formula can induce a function with biggest possible domain.)
All that is mathematics, within the basic theory of functions.
Now you have a concrete application; you are in business. Probably your formula will come from historical data, via statistical analysis. You might like to know that polynomials are very flexible for matching historical data.
You can take a look at the pictures at the link pasted below. There, all the data (the x and y values) are positive numbers, so the fitted polynomial stays close to the data points, and no negative outputs occur.
Also note that in business, it is unlikely that you need the domain to be $(0,+\infty).$ Say you are manufacturing pencils. You rightly pointed out that "quantity of goods < 0" makes no sense. You can also put a realistic, finite cap on the number of pencils that will ever be made by your business. Thus the fact that as $x \to \infty$, for a polynomial, $f(x) \to +\infty$ or $f(x) \to -\infty$ is not a problem.
Polynomial Regression
