As a given exercise, I am trying to find the expression of a continuous function $f:\mathbb{R}\setminus\{0\}\to\mathbb{R}$, which satisfies:
- $\lim_{|x|\to +\infty} f(x) =0$;
- there exists at least one $x\in\mathbb{R}\setminus\{0\}$ such that $f(x)>0$ (i.e. $f$ is nonnegative at one point at least);
- $f$ is eventually negative;
- $f(x)\le -1/|x|$ in a neighborhood of the origin.
This is the picture of the function I’m looking for the expression (I apologize for the low quality of the picture).

Moreover it is required, if possible, to define this function as a combination of $|x|^{-\alpha}$ with $\alpha>0$ (if not, it is required to motivate the answer).
$\textbf{My attempt:}$ I am thinking so far to $$f(x) = \frac{1}{|x|}-\frac{1}{|x|^4}.$$ Clearly it is not the function in the picture, but the problem is that I do not know to make it eventually negative and make it go to $0$ as $|x|\to +\infty$.
Could someone please help in finding that?
Thank you.
Here is my Suggestion/Idea :
$y=-2/|x| + 10\sin(\frac {2 \pi |x|}{1+|x|})$
I will try to Plot it & Explain why/how this works.
Plot generation curtesy of wolfram.
My Thinking :
Initially : We want a curve which starts @ 0 , goes to a Positive peak , then goes to 0 , then goes Negative which then returns to 0.
That indicates a Sine Curve but the argument must be between $0$ & $2\pi$. Hence , we can have the argument like $|x|/(1+|x|)$ scaled by $2\pi$.
That Curve will start @ 0 & end @ 0.
We want to change it a bit to start @ $-\infty$ , which indicates a new term.
Hence , we can have $-2/|x|$ which satisfies a requirement.
Putting that together we get the given Curve , where we require a scaling by 10 to get the Positive Part.
Possible tweaking :
We can change -2 to larger value.
We can take higher Power in Denominator.
We can Scale the Sine Curve by some other higher value.
In general , we can have :
$y=-A/|x|^B + C\sin(\frac {2 \pi |x|}{1+|x|})$
Earlier , $A=2$ , $B=1$ , $C=10$
Here is a Curve with tweaking , where I have taken $A=3$ , $B=3$ , $C=33$ :

Plot generation curtesy of wolfram.