# Exponents in Functions

Hello.
I was doing algebra earlier today and I came across having to simplify $log(x)\cdot log(x)$. Now obviously this can be described as an exponent, but I am curious how to write it. Can I write it as $log(x)\cdot log(x)={log^2}(x)$ or should i do $log(x)\cdot log(x)=(log(x))^2$ I thought of this since if I did $log(x)\cdot log(x)=log{(x)^2}$ then that would mean that $log(x)\cdot log(x)=2log(x)$, which is not true. Same with other functions, like the sine function. How do I simplify $sin(x)\cdot sin(x)$? Or even for any other function? $f(x)\cdot f(x)={f^2}(x)?$

My second question about function notation is: does
$$f(x^2)=f{(x)^2}?$$

ie: $ln(x^2)=ln{(x)^2}?$

finally: my algebra teacher told me that you commonly write products with digits first, then constants, then variables (ie) $2\cdot l\cdot \pi=2\pi l$. I have seen this order all over math books and sites. my question is, in what order do you write products with digits, constants, variables, AND functions?

finaly, should you try to put multipliers that have exponents at the end, for example $\frac{2\cdot g}{\pi}=2g{\pi^{-1}}?$

Thank you.

Mentor
Hello.
I was doing algebra earlier today and I came across having to simplify $log(x)\cdot log(x)$. Now obviously this can be described as an exponent, but I am curious how to write it. Can I write it as $log(x)\cdot log(x)={log^2}(x)$
This (above) is how it's usually written. You see this notation often in trig functions, where the notation cos2(x) means [cos(x)]2.
or should i do $log(x)\cdot log(x)=(log(x))^2$ I thought of this since if I did $log(x)\cdot log(x)=log{(x)^2}$ then that would mean that $log(x)\cdot log(x)=2log(x)$, which is not true. Same with other functions, like the sine function. How do I simplify $sin(x)\cdot sin(x)$? Or even for any other function? $f(x)\cdot f(x)={f^2}(x)?$
sin2(x)
My second question about function notation is: does
$$f(x^2)=f{(x)^2}?$$
[STRIKE]Yes[/STRIKE]No. In my previous answer, I misinterpreted what you wrote. I thought you were asking whether f2(x) was the same as [f(x)]2.
ie: $ln(x^2)=ln{(x)^2}?$

finally: my algebra teacher told me that you commonly write products with digits first, then constants, then variables (ie) $2\cdot l\cdot \pi=2\pi l$. I have seen this order all over math books and sites. my question is, in what order do you write products with digits, constants, variables, AND functions?

finaly, should you try to put multipliers that have exponents at the end, for example $\frac{2\cdot g}{\pi}=2g{\pi^{-1}}?$
I don't know if there's a hard and fast rule for this.

Last edited:
Vorde
To Mark44 (and I guess to the OP):

##f(x)^2 ≠ f(x^2)##

If ##y = sin(x)##,
##f(x)^2## gives you sin2(x) while ##f(x^2)## gives you sin(x2), two very different functions.

so i can write: $sin(x)\cdot sin(x)={sin^2}(x)=sin{(x)^2}?$

and since logarithms have special properties, does that also mean: ${log^2}(x)=log{(x)^2}=2log(x)=log(x)\cdot log(x)?$

Vorde
Yes to the first thing, no to the second. First of all the difference between ##sin^2(x)## and ##sin(x)^2## is purely one of notation, but note that the exponent is outside the parentheses in both cases.

As mark44 noted, there is no set convention on whether to write 'log-squared' as ##log^2(x)## or ##log(x)^2## but note once again than in both cases the exponent is outside the parentheses.
The log property ##log(x^a)## = ##a*log(x)## is only valid when the exponent is in the parentheses.

Also as an algebraic note ##2log(x)## equals ##log(x) + log(x)##, not ##log(x)*log(x)##

Mentor
To Mark44 (and I guess to the OP):

##f(x)^2 ≠ f(x^2)##
You're right - I was looking at the LaTeX script and misinterpreted what the OP wrote. I know the difference between f(x)2 and f(x2). Somehow I misread what he wrote as f2(x).
If ##y = sin(x)##,
##f(x)^2## gives you sin2(x) while ##f(x^2)## gives you sin(x2), two very different functions.

ok, so (for example): $sin(x)\cdot sin(x)={sin^2}(x)=sin{(x)^2}$?
same with any other function like: $cos(x)\cdot cos(x)={cos^2}(x)=cos{(x)^2}$?
or even with a general function, say: $f(x)\cdot f(x)=f{(x)^2}≠{f^2}(x)$? for general functions i can not use the notation i used for the inequality? does, or doesn't "$f(x)\cdot f(x)={f^2}(x)$?

are the above equations true?

and thanks for pointing out the the expotnential property only works if the exponent is IN the parenthesis. by the way, i can turn a coeffecient of a logarithm into an exponent into the parenthesis?

Vorde
You have to be careful about this whole 'moving the square thing'. Generally, the best idea is just to keep the squares on the right side of the function and outside the parentheses. The habit of putting the superscript after the function name but before the x (like ##f^2(x)##) is really only done for trigonometric functions. Outside of trig you should always just do ##f(x)^2##.

For the rest of the stuff you are just making it more complex. It's silly to ask does ##f^a(x)## = ##f(x)^a## because both are the exact same thing (the function raised to the a power), the only difference is that the latter is common mathematical notation and the former isn't (unless you are dealing with trig functions).

You're right - I was looking at the LaTeX script and misinterpreted what the OP wrote. I know the difference between f(x)2 and f(x2). Somehow I misread what he wrote as f2(x).

I assumed as much, just making sure the OP didn't get confused, sorry if my comment sounded harsh.

Homework Helper
Gold Member
Dearly Missed
Be aware, though, that f^2(x) is sometimes used as shorthand for f(f(x)).
Thus, the moral about notation is to clearly define it locally in the text.

Also the -1 is sometimes tricky.

$f^{-1}(x)$

can mean either the inverse function of f or

$\frac{1}{f(x)}$

Mentor
Also the -1 is sometimes tricky.

$f^{-1}(x)$

can mean either the inverse function of f or

$\frac{1}{f(x)}$

I believe that the notation f-1(x) almost always refers to the inverse function.

Mentor
I assumed as much, just making sure the OP didn't get confused, sorry if my comment sounded harsh.
No problem - I didn't perceive it to be harsh.

I believe that the notation f-1(x) almost always refers to the inverse function.
Yes, that's my experience too. But I've seen it used both ways.

Vorde
I think the lesson to be learned is don't put the exponent right after the 'f' unless you're dealing with trig functions- you don't know what you might be accidentally saying otherwise.

which kind of makes sense. sin(x) isn't sin times x, its sine function at point x. sin(x) by sin(x) will be the squared sine at point x, hence sin2. and i guess that for other things like whether f-1(x) is the reciporacal of the value at point x, or the inverse of function f, at point x, would probably depend on what kind of math you are doing.

wither way, only trig functions have the exponent after the function name, gotcha. thanks

Mentor
$f(x)\cdot f(x)=f{(x)^2}≠{f^2}(x)$

Just in case - when we are talking about squaring, it should be $f(x)\cdot f(x)=f{(x)^2}={f^2}(x)$.

Which is an obvious conclusion when you read what others have wrote, somehow this equation slipped uncorrected.