Compose a function with a parameter and given local maximum points.

68 Views Asked by At

I need to find a function $f_k: \mathbb R \rightarrow \mathbb R$ which includes the parameter $k \in \mathbb R$. The local maximum point of this function changes with the parameter $k$. This point is given by $M_k = \left(k-1,\quad e^{-k}\cdot\left(k^{2}+\left(k-1\right)\right)\right)$. This has the result that all of these points lie on the curve $y= e^{-x-1} \cdot \left(x^2+3x+1\right)$.

What I have right now is $$ f_k(x) = e^{-k}\left(\left(x-k\right)^{3}-3\left(x-k\right)+k^{2}\right) $$ which is incorrect, but the maximum is at $x = k-1$ (as is given by the point $M_k$).

I have created a desmos file to show this: https://www.desmos.com/calculator/9l8ohitaxp (The black curve is where all the maximum points are on; the red graph is my incorrect $f_k$. Change $k$ with the slider to visualize all the functions $f_k$. You can see that $M_k$ deviates from the graph of $f_k$)

As I understand it, I only need to change the height of the graph of $f_k$ at $x = k-1$ such that it meets the corresponding point. I have no clue how to even approach that. Thank you in advance.

2

There are 2 best solutions below

1
On BEST ANSWER

To construct a function $f:\mathbb{R}\longrightarrow \mathbb{R}$ which has a maximum at point $(x_0,y_0)$ one can simply take a parabola of the form $$f(x) = -(x-x_0)^2+y_0\,.$$

So to construct a family of functions $f_k:\mathbb{R}\longrightarrow \mathbb{R}$ whose maxima lie on the curve defined by $y = e^{-x-1}(x^2+3x+1)$, simply choose an appropriate parametrization of that curve e.g. $(k,e^{-k-1}(k^2+3k+1))$ and use above construction, yielding $$f_k(x) = -(x-k)^2+e^{-k-1}(k^2+3k+1)\,.$$ Hope that helps :)

0
On

Since there are very few restrictions on $f_k$, the possibilities are endless.

Construction

In the following, I give a possible way to construct your family $f_k$ (note that this only covers a small subset of all possible definitions of $f_k$):

  1. Take a functions $g:\mathbb{R}\to\mathbb{R}$ with well-known local maximum at $(x_0,y_0)$ (the parabola $g(x) = -x^2$ with maximum at $(0,0)$ that @StiftungWarentest mentions is a good choice)
  2. Compute the difference between the maximum of $g$ and the desired maximum $M_k=\left(k-1,e^{-k}(k^2+(k-1))\right)$:
    $\Delta x = k-1 - x_0$; $\Delta y = e^{-k}(k^2+(k-1)) - y_0$
  3. Shift $g$ by the computed difference to match the desired $M_k$: $$f_k(x) := g(x-\Delta x) + \Delta y$$

Some possible choices for $g$:

  1. The parabola $g(x) = -x^2$ with maximum at $(0,0)$ (see @StiftungWarentest post)
  2. The triangle $g(x) = -|x|$ with maximum at $(0,0)$
  3. The function $g(x) = \left\{\begin{array}{ll}0&\text{for }x\not=0\\1&\text{for }x=0\end{array}\right.\,$ with maximum at $(0,1)$ (continuity is not required)