I am trying to fit a positive function $f(x)$ , $0 < x\leq 1$, with the following properties:
$$f(0) =\infty$$
$$f(1) = 1$$
$$\frac{df}{dx}(1) > 0$$
$$f(x) > 0,\text{ }\forall\text{ }x\in(0,1)$$
So, briefly, the function dips down from +infinity to some value and climbs back to $1$ at $x = 1$.
I have numerical values for $f(x)$ and $x$. What would be a good choice of basis function here ? I tried something like $\frac{a_1}{z} + a_2 + a_3z + a_4z^2 + ...$, but that did not work.
Let $(x_k,y_k)$, $k=1,\cdots n$ be the data.
Three answering levels :
A) Here is a "starter function"
fulfilling the different constraints (with $df/dx(1)=1/3>0$).
B) From here, there is a degree of freedom allowing a better initial fit obtained by taking a power of this function, an operation preserving all the constraints :
$n$ being a positive number ($n=1/2,3/2,2,...$), not necessarily integer, providing a better fit to your data, taking a particular attention to the initial data (close to the asymptote) are correctly represented. It remains to "tune" this answer by a
C) The issue is that you cannot expect a very good fit when you have an asymptote. Said otherwise : I imagine you data have, say, $2$ order of magnitude between them (for example having at the same time $(x_1,y_1)=(0.05, 150)$ whereas $(x_5,y_5)=(0.95, 0.98)$). Therefore, I advise you, from the beginning, to operate
(it is a little the idea I have used in part B).
Remark : The curve of $f_1$ is a hyperbola with a vertical asymptote $x=0$ and a slant asymptote $y=\dfrac{2x}{3}$. Its minimum has the following coordinates : $(\dfrac{\sqrt{2}}{2},\dfrac{2\sqrt{2}}{3})$.