# Mathematics: Function-Building Contest [closed]

I'm going to try something rather new with this puzzle - a contest.

The puzzle is this: I will list fifteen characteristics of functions, and whoever can some up with a function that has the most of those properties will be the winner. If the winner's function has ten or more of the listed properties, I will award that person $+50$ bounty from my own reputation. If the winner gets twelve or more (is it even possible?) I will award an additional $+100$ bounty.

Also, feel free to use things like graphing calculators to help you. This will get pretty difficult.

Disclaimer: Yes, I know this is a "math problem", but it's still a puzzle and deserves to be put on Puzzle SE. Also, it's not exactly a question that I need to have answered, which is what Math SE is intended for. So please, don't try to move me over to Math SE; I really think this contest belongs here.

Here are the fifteen functional properties:

1. $f(2)=f(3)=4$
2. $f'(1)=\infty$
3. $f(x)$ has at least $3$ zeroes
4. $f(x)$ has local maxima at $x=10$ and $x=-10$
5. $f(x)\ne -999, \forall x \in \mathbb R$
6. $\int_k^{k+1} f(x)dx=2$ for some $k \in \mathbb Z$
7. $f(x)$ has at least $3$ fixed points
8. $f(x)$ does not intersect $y=-\frac{100}{x}$
9. $f(5) \ne f(-5)$
10. $\lim_{x\to\infty}f(x)=3$
11. $f(x)$ has a vertical asymptote
12. $f(x)$ has no point discontinuities
13. $f(100^{100})=1$
14. $f(x)$ has an inflection point at $x=-7$
15. $f(x)$ intersects $y=\sin x$ at least twice

Also, NO PIECEWISE FUNCTIONS! That would make it too easy! Bwahaha! By "piecewise", I mean that the function cannot be defined using multiple other functions that appear at some values and disappear at others. Furthermore, since any function defined this way can be transformed into a "normal" function using floor and ceiling, the floor and ceiling functions are not allowed.

Have fun! I will end the contest in two weeks (June 29) and then I will post the best function that I have come up with. I will also give out bounties (if appropriate) and accept the winner's answer on that date.

## closed as too broad by dcfyj, JonMark Perry, Peregrine Rook, boboquack, AlconjaJun 16 '17 at 1:44

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Comments are not for extended discussion; this conversation has been moved to chat. – Deusovi Jun 15 '17 at 16:09
• I don't think this should be closed. We've had questions with a very similar feel, and this seems like a really fun challenge. – greenturtle3141 Jun 15 '17 at 16:39
• You made this a contest supposed to be spanning weeks and yet you accepted an answer? – n_plum Jun 15 '17 at 19:07
• @Nilknarf I'd still advise against accepting until you decide the contest is over. Take a look at the PPCG.SE contests work for some insight. An accepted answer could push other users away from answering. – David Starkey Jun 15 '17 at 20:16
• Downvoting because (as the current top answer shows) there's unlikely to be an objective way to disallow entries which are "effectively piecewise", thus making the challenge fairly uninteresting. – ais523 Jun 15 '17 at 21:52

First of all, let $G$ (think "Gaussian") be the function taking $x$ to $\exp(-1000x^2)$, which is almost exactly $0$ except when $x$ is very close to $0$, and has $G(0)=1$.

Let $f_0(x) = 3\tanh(1000x)$. This has $f_0(0)=0$, and except very close to $0$ it's almost exactly $-3$ for negative $x$ and $+3$ for positive $x$. Note that in particular $f_0$ satisfies condition $10$.

We will now make "local" modifications to $f_0$ to satisfy the required properties, mostly by adding shifted and scaled copies of $G$. The coefficients required to get the properties to hold exactly will be the result of solving a system of linear equations; we will make sure the system does have a solution.

1. So, we'll add $a_1\cdot G(x-2) + a_2\cdot G(x-3)$ where we expect $a_1 \approx 1$ and $a_2 \approx 1$. These will make our function satisfy condition $1$.

2. We'll add $a_3\cdot G(x-1)\cdot \sqrt[3]{x-1}$. This will make our function satisfy condition $2$ provided $a3>0$; we'll take it to be small and positive.

1. We'll add $a_4\cdot G(x-10) + a_5\cdot G(x+10)$. This will make our function satisfy condition $4$ provided $a4,a5>0$. Again we'll take these to be small and positive.

2. Condition 5 will be satisfied simply because we are starting with something well-behaved and never close to $-999$ and never doing anything to bring it close to $-999$.

3. We'll satisfy condition $6$ by adding $-a_6\cdot G\left(\frac{x-10^{500}}{10^{100}}\right)$ for some value of $a_6$ close to $-1$ (so we are making a big long stretch of values where $f$ is close to $2$ instead of $3$).

4. Condition 7 is satisfied because $f(x)=x$ near $x=0$, somewhere between $-3$ and $0$, and somewhere between $0$ and $3$. This is true for $f_0$ and can't be made untrue by any of the continuous local modifications we've made above.

5. Condition 8 is true of $f_0$ and, again, all the changes we've made (and will make) are too small to break it.

6. Condition 9 is satisfied because $f(5) \approx 3$ and $f(-5) \approx -3$.

7. Condition 10 is satisfied because it's true of $f_0$ and our final $f$ is $f_0$ plus things that tend to $0$ as $|x|\to\infty$.

8. Condition 11 unfortunately requires our function to have a discontinuity. Let's put one at $x=100$ by adding $a_{10}\cdot\frac{G(x-100)}{(x-100)^2}$. Although this makes an infinitely large change near to $x=100$, its effect is tiny away from there for the usual reasons. (Sorry for the out-of-order coefficient index; the first version of this answer claimed that conditions 11,12 were inconsistent because I misunderstood the OP's terminology, and this paragraph was added later.)

9. Condition 12 is satisfied because our function is a sum of continuous functions.

10. We'll satisfy condition 13 by adding $a_7\cdot G(x-10^{200})$ where $a_7 \approx -2$.

11. We'll satisfy condition 14 by adding $a_8\cdot G(x+7)\cdot(x+7)^3$. We'll take $a_8$ to be small and positive.

12. We'll satisfy condition 15 by adding $a_9\cdot G\left(x-\left(10^{1000}+\frac12\right)\pi\right)$ where $a_9 \approx -2$, so that we get two extra intersections near $10^{1000}$. Note that we aren't making $a_9$ large enough to push $f$ below the $x$-axis, so we don't violate condition 8.

OK, now how exactly do we choose our parameters? We begin with ones that don't interact with one another interestingly: let's say $$a_3=0.01,\quad a_4=0.01,\quad a_5=0.01,\quad a_8=0.01,\quad a_9=-2.1,\quad a_{10}=0.01$$ These enforce conditions 2, 4, 14, 15, 11, and provided our other coefficients aren't preposterously huge (which they won't be) the mostly-local modifications the others make can't stop these conditions holding.

Now we need to set $a_1,a_2,a_6,a_7$ so as to get the right values of $f(2), f(3)$, the integral from condition 6, and $f(10^{200})$. The point here is that the changes in these values are a linear function of those coefficients, and the matrix describing the changes is "diagonally dominant" because each coefficient has only a tiny effect on the "other" values we are trying to change. This guarantees that the matrix is invertible, and therefore that there are choices of $a_1,a_2,a_6,a_7$ that exactly achieve the required values.

Our final function is $f_0$ plus a sum of ten other smooth functions, each of them either Gaussian or another nice simple function times a Gaussian. It satisfies all the conditions.

• I stand by my statement that Gareth is math. – n_plum Jun 15 '17 at 17:19
• $11$ and $12$ are not incompatible. A point discontinuity is when the limit from both sides to an $x$-value exists, but the actual point does not. An example is $y=\frac{x}{x}$ at $x=0$. – Frpzzd Jun 15 '17 at 17:22
• Unless I'm misunderstanding somehow, $y=3\sinh(1000x)$ has only one fixed point and comes nowhere near $3$ for large $x$. – Frpzzd Jun 15 '17 at 17:27
• Whoops, I wrote sinh but meant tanh; will fix. – Gareth McCaughan Jun 15 '17 at 17:29
• Oh, I misconstrued what you meant by "point discontinuity" then. In that case it shouldn't be hard to get condition 11 as well. Will adjust. – Gareth McCaughan Jun 15 '17 at 17:31

Let's start simple.

Under the new rules, $f(x) = 0$ meets 6 conditions (3, 4, 5, 8, 12, 15).

• Wonderful, we have our first entry! – Frpzzd Jun 15 '17 at 15:33
• 4x also meets condition 9 (20 $\neq$ -20) – MikeQ Jun 15 '17 at 16:31
• Due to changes by the poster, these functions don't meet condition 11 (neither has a vertical asymptote) or condition 10 (neither has a limit approaching infinity of 3). Further, f(x)=4x does not meet conditions 4 (max is at infinity) or 5 (4x=-999 at x=-249.75). f(x)=0 does meet conditions 3 and 7. – Moose Jun 15 '17 at 16:45
• @Moose It's okay, don't butcher his answer. The properties have been changed since he posted this answer. – Frpzzd Jun 15 '17 at 16:49
• @Mnemonic Sorry about the rule change; my previous parameters got stomped on. :( – Frpzzd Jun 15 '17 at 16:55

$f(x)=3+\frac{50*0.5^{1/(x+7)}*(x-2)(x-3)(x-100)(x-101)}{x^5(x+999)(x-1)}$

This I think abides by rules: 2,9,10,11,12,14

• Does not fit $3,5,$ or $15$. But nice work anyways! – Frpzzd Jun 15 '17 at 17:16