Questions tagged [functions]

For elementary questions about functions, notation, properties, and operations such as function composition. Consider also using the (graphing-functions) tag.

A function $f$ defined on a set $X$ is an assignment of an element in some set $Y$ to each element of $X$. The set $X$ is called the domain of the function and $Y$ is called the codomain. The elements of $X$ are the inputs to the function and the elements of $Y$ are the potential outputs. For some input $x \in X$, its corresponding output in $Y$ is denoted $f(x)$. Not every element of $Y$ needs to be the output corresponding to some input though: the subset of $Y$ containing the elements that are an output of the function is called the range of $f$. When a function $f$ has domain $X$ and codomain $Y$, this is signified by writing $f \colon X \to Y$, and the assignments of inputs to outputs is signified by writing $f\colon x \mapsto f(x)$.

If you have a function whose codomain is the domain of another function, you can compose those two functions. In symbols if you have a function $f\colon X \to Y$ and a function $g \colon Y \to Z$, their composite is a function $g\circ f\colon X\to Z$ defined by the assignment $g\circ f\colon x \mapsto g(f(x))$.

For many examples of functions, the domain and range of the function are topological spaces, meaning that they are equipped with some notion of geometry. In this case we like to think of the function $f\colon X\to Y$ geometrically as the subset of the points $(x,f(x))$ in the topological space $X \times Y$. This subset of all the input-output pairs is called the graph of $f$.

Often mathematics textbooks will define a function slightly more rigorously than this though. They'll say that a function $f \colon X \to Y$ is a relation $R$ on the set $X \times Y$ such that

  1. For each $x \in X$ there is some $y \in Y$ such that $xRy$. Each input needs an output.
  2. If $xRy$ and $xRz$, then $y=z$. Each input needs exactly one output.

Here are a bunch of examples of functions:

  • Many examples of functions covered in elementary and high school have as their domain and codomain the real numbers $\mathbf{R}$. A basic example is the function $f \colon \mathbf{R} \to \mathbf{R}$ defined by the rule $f(x) = x^2$. Thinking geometrically, the graph of $f$ is the set of all points $(x,x^2)$ in the plane $\mathbf{R}^2$, and this forms a parabola. Note that while the codomain of this function is $\mathbf{R}$, the range consists of only the non-negative real numbers.

  • Here's a silly example. For any set $X$ we can define an identity function $\mathbf{1}_X$ with domain and codomain $X$ such that $\mathbf{1}_X \colon x \mapsto x$.

  • Let $W$ denote the set of all strings of letters of the alphabet, so like $\text{npr}$ or $\text{asdfasdf}$ or $\text{butt}$ for example. And let $\mathbf{N}$ denote the set of natural numbers. We can define a function $\ell\colon W \to \mathbf{N}$ such that $\ell$ assigns to each word it's length. So $\ell(\text{defenestration}) = 14$. Also $\ell(\text{butt})=4$.

  • Using the same set $W$ in the last example, let's define another function $\tau\colon W \to W$ such that $\tau$ "reverses" a word. So $\tau(\text{defenestration}) = \text{noitartsenefed}$, and $\tau(\text{butt}) = \text{ttub}$. A few neat properties of $\tau$ that deserve to be pointed out, $\tau \circ \tau = \mathbf{1}_W$, and also $\ell\circ\tau = \ell$.

33723 questions
5
votes
3 answers

Function that returns $0$ for all negative values

I need a function that returns $0$ if the given number is negative, and otherwise doesn't change the number. Example: $$y(-5)=0,\ y(-2)=0,\ y(0)=0,\ y(3)=3,\ y(2566)=2566.$$ Does such a function exist?
lopata
  • 319
5
votes
3 answers

The difference between 'solution' and 'root'

I am wondering about the difference between the following demands: Prove that P(x) has at least one root. Prove that P(x) has at least one solution. Are they the same? The background to my question: Let $c \in \Bbb R$. Prove that the…
Alan
  • 2,791
5
votes
1 answer

How is this function additive?

Linear functions are said to be additive: $f(x + y) = f(x) + f(y)$ But if I have this simple function $f(x)= 7x+3$, I get, for example(at $x=5$ and $8$): $f(5)=38$ and $f(8)= 59$. The sum is $97$. $f(5+8)= 7\cdot 13+3 = 94$. $94\ne 97$. How come?…
5
votes
1 answer

Show that $f(a,b)$ is one-to-one

Let $$A=\{(x,y)\in\mathbb R^2:x>0, y>0\}$$ and define $f:A\to\mathbb R^2$ by $$f(a,b)=(a+b^2,2a^2+b).$$ Show that $f$ is one-to-one on $A$. I know that a function is one-to-one if all values of the range are mapped to by at most one value in the…
jon
  • 65
5
votes
1 answer

Maximum value of function given minimum value

Suppose there is a function $f(x)=\frac{x^2-2x+b}{x^2+2x+b}$ (the problem doesn't specify, but I am assuming $b$ is a real) that has a minimum value of $\frac{1}{2}$. What is the maximum value of $f(x)$? My first instinct was to divide out…
ether
  • 607
5
votes
3 answers

Delta function equation difficulty

1) Can we solve if we have two delta functions with $a=b$? Can we solve this? If not why? $$\int\delta (x−a)\delta(a−x)dx$$ 2) Can we solve this $$\int f(x)\delta (x)dx$$ ...where $f(x)=1/x$ i.e. $f(x)$ is infinite at $x=0$ and also delta function…
5
votes
3 answers

Equality of functions

How a function which is not defined for some value can be equal to a function which is defined for the same value? How is $f(x) = \frac{(x-2)(x-3)}{(x-2)(x-4)}$ equal to $g(x) = \frac{(x-3)}{(x-4)}$ when their domains are different?
LearningMath
  • 1,201
5
votes
1 answer

What is this function called (looks like a variant of the exponential function)

We set (as usual) $\displaystyle{x \choose k} := \frac{x \cdot (x-1) \cdots (x-k+1)}{k!}$ for $x\in \mathbb{C}$. Now we can define a function $\displaystyle f(x) := \sum\limits_{k=0}^\infty {x \choose k}$. Does anybody know how this function is…
Nubok
  • 219
4
votes
1 answer

Find $f$ and a $g$ function given that

Find an $f$ and a $g$ function given that $$f(g(x)) = \sqrt{1-x^2},\\ g(f(x)) = \left(\frac{x-2}{x+1}\right)^2$$ I'm a bit confused on this one. Would $g(x)$ and $f(x)$ for the two equations be represented as $x?$ And where do you go from here?
Hatmix5
  • 237
4
votes
3 answers

Demonstrating that a function is monotonically increasing/decreasing

my question is more of a conceptual one, but i'll use the problem i'm stuck on to keep things clear. I am confused about how to demonstrate whether a function is strictly monotonically increasing or decreasing etc. (i'm using the wrong brackets…
jm22b
  • 321
4
votes
6 answers

Find the range of $f(x) =(x-1)^{1/2} + 2\cdot(3-x)^{1/2}$

How to take out the range of the following function : $$f(x) =(x-1)^{1/2} + 2\cdot(3-x)^{1/2}$$ I am new to functions hence couldn't come up with a solution.
4
votes
1 answer

Is it of any value to express a function as the sum of an even and an odd function?

So I learned about this formula $$ f(x) = \frac{f(x)+f(-x)}{2}+\frac{f(x)-f(-x)}{2} $$ and I'm wondering, is it of any value to express a function in this form?
4
votes
2 answers

Is there a general (logistic?) function for sigmoids over a given range?

For a mapping algorithm I'm working on, I'm trying out the effect of sigmoid weightings. Right now I'm using $$y = \frac{1}{1+x^n}$$ where n is the steepness of the sigmoid function. This graph shows values of x between 0 and 256 and the following…
4
votes
2 answers

How to find a function that is given by an equation

I have a Lebesgue integrable function $f : [0,1] \to [0,1]$ that solves the equation $$ 4 x f(x^2 ) = f(x) + f(1-x)$$ for all $x \in [0,1]$. Is it possible to give an analytic expression for $f$ ? Edit 1: Is there a non-trivial solution $f \neq 0…
Adam
  • 3,679
4
votes
1 answer

A constant function

$f:\mathbb{Z}\to \mathbb{R}$ is bounded above and satisfies $$f(n)\le \frac{f(n+1)+f(n-1)}{2}$$ Does it follow $f$ is constant ? There was a dreadful typo in the previous question (in the previous question, the domain of $f$ was $\mathbb N$, here,…
shadow10
  • 5,616