log through point with starting tangent I'm trying to create a logarithmic function that goes through the origin, has a slope of 1 at the y-intercept, and goes through an arbitrary point below the line y=x. How should I go about solving for that function?
I've worked out that all logarithmic functions that meet the tangential requirements can be stated as ln(cx+1)/c. I need help solving for c.
 A: If it goes through
$(x, y)$,
it seems that you must have
$\ln(cx+1)/c = y$
or
$cx+1 = e^{yc}$
or
$e^{-cy}(cx+1) = 1$.
To solve this for $c$,
I think that
the Lambert W function,
defined as the inverse of
$x e^x = y$,
might be used.
Off the top of my head,
I don't see how
to convert your equation
into Lambert W form,
but there have been
many equations that
I have seen converted;
yours might be one.
I'll leave it at this
in hopes that
the Lambertonians
can do the rest.
A: As marty cohen answered, the explicit solution of the equation $$\frac{\log (c x+1)}{c}=y$$ is given in terms of Lambert function. The Wikipedia page provide numerous examples of the manipulations to be done.
In this specific case, the solution is $$c=-\frac{W\left(-\frac{y }{x}e^{-\frac{y}{x}}\right)}{y}-\frac{1}{x}$$ The Wikipedia page gives series expansions for the evaluation of $W(a)$.
If you cannot use Lambert function, you would need some numerical method such as Newton. Writing $$f(c)=\log(cx+1)-cy$$ $$f'(c)=\frac{x}{c x+1}-y$$ and starting from a guess $c_0$, the iterates would be given by $$c_{n+1}=\frac{(c_n x+1) \log (c_n x+1)-c_n x}{x (c_n y-1)+y}$$ Notice that


*

*$c=0$ is a trivial solution (to be skipped)

*function $f(c)$ goes throught a maximum (second derivative test) for $c_*=\frac{x-y}{x y}$

*because of the above, you would need to select $c_0>c_*$

