Is the square of a function always positive

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 9K views
homegrown898
Messages
16
Reaction score
0
I'm curious, is the square of any function always positive?

It seems obvious that it's always positive because if you have a function (F), an input (x) and an output (y) then you have y = F(x)

And if you square the function then (F(x))2 = y2 which means that every value in the range is now positive.

Is this always true?

Also, if you can also answer this that would be great, if I have two positive functions and I am taking the definite integral of the product of those two functions, will I always get a number greater than or equal to 0?
 
Mathematics news on Phys.org
Yes, what you said is correct if you are careful with your qualifiers. If f is a real valued function, then [itex]f(x)^2[/itex] is non-negative (not, strictly speaking, "always positive"). That is because, for any x, f(x) is just a real number and the square of any real number is non-negative. (Note the difference between the function "f", and the real number, "f(x)", which is a number.)

If, for all x in [a, b], both f(x) and g(x) are greater than or equal to 0, then [itex]\int_a^b f(x)g(x)dx\ge 0[/itex].