Finding a function with properties

160 Views Asked by At

I am looking for a function $f(x)$ with the following properties:

  1. Positive for $x\in(-\infty, 0)$ but tangent to the x-axis at $x=-1$
  2. A root at $x=0$ and negative for $x\in(0, 2)$
  3. A root at $x=2$ and positive for $x\in(2, \infty)$

I thought $f(x)=x(x-2)(x+1)^2$ would do the trick but it does not. The graph I have drawn on paper has a "w" shape with a local minimum at $x=-1$, a local maximum between $x=-1$ and $x=0$ and a local minimum between $x=0$ and $x=2$.

All help is greatly appreciated!

2

There are 2 best solutions below

1
On BEST ANSWER

I believe that your function works:

enter image description here

0
On

It does do the trick (well done). You have misdrawn the graph, unfortunately.