particular function with these properties? [closed]
assume having a function $f_n(x)$ such that:
$\bigg\{ ^{\forall n \ odd \ \rightarrow f_n(x) = sign(x)} _{\forall n \ even \ \rightarrow f_n(x)=1}$
I need a function with these particular properties, I was wondering if you could help me find it and presumably show me how to, especially. I would be very grateful if you take a look at this
p.s. I don't know how to properly format the LaTeX bracket so that it looks like a system of equations.
Solution 1:
I guess you are working with a function $f_\bullet:\Bbb N\to\Bbb R^{\Bbb R}$, i.e. with a function that assigns to each value of $n\in\Bbb N$ a function $f_n:\Bbb R\to\Bbb R$, therefore you would call that a sequence of functions in order to distinguish it from its values, which most would conisider functions in a more natural way. Anyways, assuming that the identities in $x$ are meant to hold for all $x\in \Bbb R$, there is not much room for guessing: $f_n$ must be the $\operatorname{sgn}$ function for $n$ odd and the constant $1$ for $n$ even. Most authors would just write $$f_n(x)=\begin{cases}1&\text{if }n\text{ even}\\ \operatorname{sgn}x&\text{if }n\text{ odd}\end{cases}$$
But if you want a trick, you can go something like $$f_n(x)=\left(1-\left(n-2\left\lfloor\frac n2\right\rfloor\right)\right)\cdot 1+\left(n-2\left\lfloor\frac n2\right\rfloor\right)\operatorname{sgn}x=\\ =\frac{1+(-1)^n}2\cdot 1+\frac{1-(-1)^n}2\cdot\operatorname{sgn}x$$
I like to think of these tricks as things that certain people want more than anything in this world, until they are forced to use them. Then they don't want them anymore.