Question about math notiations and functions If you have a function for example $f(x) = x^2$
Say you insert $-5$ in to the function you get $f(-5) = (-5)^2$, how do you know when to use certain math notations? In this case, parentheses. So say I would like to make a function and make sure there should be no parentheses when you input $-5$, to make it $f(-5) = -5^2$ how do I do that? 
 A: Here $g(x) = x^2$ is the same thing as $g(x) = x\cdot x$ so you have $$ g(-5) = (-5)\cdot(-5) = 25.$$
If you want a function that instead returns $g(5) = 25$ and $g(-5) = -25$ (and similarly for other numbers) you could write it $$ g(x) = x|x|$$ where the $|x|$ is absolute value. 
A: First of all, mathematics isn't a game of meaninglessly search/replacing strings.  The symbols have meaning.
When we say $f(x)=x^2$, we mean that it takes a number $x$ and squares it.  So $f(-5)$ means to square the number -5, which gives 25.  If we want to show the substitution in the original formula, we write $f(-5) = (-5)^2$ and not $-5^2$ because the formula $(-5)^2$ means to square the number $-5$, and the formula $-5^2$ doesn't mean that.  
It doesn't make sense to say "make sure there should be no parentheses when you input −5".  When you replace $x$ by -5 in the expression for a function, the two symbols in -5 need to be treated as a unit, just like the single symbol $x$ was, because that's what it means to define a function by an expression.
A: Functions are like algorithms. They encode instructions about what operations to carry out on a number to get the answer. Let’s look at a slightly more complicated version:
$$f(x)=(x^2+5)/x$$
This mean, “take the number and square it. Then add five. Then divide the whole thing by the original number.”
These instructions never say “put the number in parentheses” because parentheses aren’t a thing you do to numbers in the same way addition or multiplication or squares are. They’re a way to keep track of the order that things that are real operations should be applied. $(-5)$ doesn’t mean anything different from $-5$. It’s only when combined with other operations that it means anything.
As a result, there are functions $f(x)$ such that $f(-5)=-25$, but there’s no way to say “don’t do parentheses.”
If you set the function in advance and give me a function, call it $f(x)$, I will always be able to create a new function $g(x)$ that calculates what $f$ would if you changed the order in which the pieces are evaluated. So when you say “make a function that’s $f(x)=x^2$ except when plugging in negative numbers switch the order of the exponent and the minus,” that’s easy: $g(x)=x|x|$. And if you give me a different function, $f(x)=(x+1)^2$, and told me to make a new function that does that excerpt squares before adding, I can give you $g(x)=x+1^2$. But what I’m doing here is correcting your notation.
You have some process in your mind that you wish to express mathematically, and you think it’s $f(x)=x^2$. But you’re really not thinking about that function at all, you’re really thinking about $g(x)=x|x|$ and just don’t realize it, and so are confusing the two equations. This is kind of like the mathematical equivalent of going “can I say “bangle” except be talking about breakfast food instead of jewelry.” In some sense the answer is “no, that’s not what that word means” but in another sense the correct response of “yes, except you have to pronounce it “bagel”.”
Unlike in English, mathematics always is going to have a near-by word for you to be trying to say. So yes, you can always find something that seems to take the old function but “does parentheses different.” But really what it really is is a new function that does parentheses the same way. You’re not rewriting the rules of parentheses, you’re fixing your spelling.
Is that helpful?
