<s>[INST] A double-asymptote function I am facing a calculus problem which returns me a function which looks like this:

It seems to me, that it behaves half like a logarithm, half like an exponential. It is, of course, neither of both. It is different.
Some conditions are:


*

*$f\left(\frac{1}{2e}\right) = \frac{1}{2e}$

*$f(0) = W\left(\frac{1}{e}\right)$ and, by symmetry, $f\left(W\left(\frac{1}{e}\right)\right) = 0$


Its asymptotes are established as $y = \frac{1}{e}$ and $x = \frac{1}{e}$, so it looks symmetrical in respect of $f(x) = x$. Does anyone know which algebraic expression $f(x)$ correspond to this graph?
Preferably not a piecewise function, but just a single algebraic expression.
 [/INST] Here is a possible answer for your question.

As Lambert W function is used in the question, it inspired me to think of the following algebraic expression as the form:

$$(a-bx)^{a-cy}=(a-by)^{a-cx},\tag{1}$$
  where $a>e$ and $b,c>0$.


The above is the graph of the expression by substituting $a=\frac 1 e+e$ and $b=c=e$. It is symmetrical. The asymptotes are $x\approx0.7$ and $y\approx0.7$.

The shape is similar to yours if the straight line $y=x$ is removed.

By substituting the correct values of $a$, $b$ and $c$ and assuming $x\neq y$ when $x$ and $y \neq \frac 1 {2e}$, the expression might be found.

UPDATE-1

The values I calculated are $a\approx 4.26480$, $b\approx 8.87465$ and $c\approx 9.14674$. 

The graph satisfies all constraints.

UPDATE-2

Condition A:
$ \left\{
\begin{aligned}
x  = &   0\\
y  = &  W\left(\frac 1 e\right) \\
\end{aligned}
\right.$
Condition B: $ \left\{
\begin{aligned}
x  =   \frac 1 {2e}\\
y  =  \frac 1 {2e} \\
\end{aligned}
\right.$
Condition C: $y\to \frac 1 e$ as $x\to -\infty$. 
We try to use the above 3 conditions to find the values of $a$, $b$ and $c$.
First we use condition C to prove

$$b=e(a-1).\tag{2}$$

Since $y\to \frac 1 e$ as $x\to -\infty$, we assume $\lim_{x\to -\infty}y=\frac 1 e$.


Claim:
$$y=\frac a b+\frac {W_k\left(-Ke^{\left(\frac {ab} c -a\right)K}\right)}{bK},\tag{3}$$
  where $K=\frac{c\log(a-bx)}{b(a-cx)}.$

Take $\log$ on both sides in $(1)$,
\begin{align*}
(a-cy)\log(a-bx)&=(a-cx)\log(a-by)\\
(\frac {ab} c-by)\cdot \frac c b \log(a-bx)&=(a-cx)\log(a-by)\\
(\frac {ab} c-by)\cdot \frac{c\log(a-bx)}{b(a-cx)}&=\log(a-by).
\end{align*}
Let $K=\frac{c\log(a-bx)}{b(a-cx)}$,
\begin{align*}
\left(\frac {ab} c-by\right)K&=\log(a-by)\\
e^{\left(\frac {ab} c-by\right)K}&=a-by\tag{$\text{i}$}\\
e^{\frac {ab} c \cdot K}\cdot e^{-Kby}&=a-by\\
-Ke^{\frac {ab} c \cdot K}&=-K(a-by)e^{Kby}\tag{$\text{ii}$}\\
-Ke^{\frac {ab} c \cdot K}\cdot e^{-Ka}&=(Kby-Ka)e^{Kby-Ka}\tag{$\text{iii}$}\\
\therefore y&=\frac a b+\frac {W_k\left(-Ke^{\left(\frac {ab} c -a\right)K}\right)}{bK}.\tag{$\text{iv}$}
\end{align*}

Comment:


*

*In $(\text{i})$ on the R.H.S. we use the formula $e^{\log X}=X$.

*In $(\text{ii})$ we times $-Ke^{Kby}$ on both sides.

*In $(\text{iii})$ we times $e^{-Ka}$ on both sides.

*In $(\text{iv})$ we use the definition of W-function $Xe^X=Y\Leftrightarrow X=W_k(Y)$.

Note that
$$\lim_{x\to -\infty} K=\lim_{x\to -\infty} \frac{c\log(a-bx)}{b(a-cx)}=0,$$
Therefore, take the principle branch of $W$, set $k=0$,
$$\lim_{x\to -\infty} y=\lim_{K\to 0}\frac a b+\frac {W_0\left(-Ke^{\left(\frac {ab} c -a\right)K}\right)}{bK}=\frac{a-1}b=\frac 1 e.\tag{$\text{v}$}$$
$$\therefore b=e(a-1).$$

Comment:


*

*In $(\text{v})$ we use $e^{\left(\frac {ab} c -a\right)K}\sim 1$ and $W_0(-K)\sim -K$ as $K\to 0$.



Next we use condition B to prove

$$ c=\frac{2ea}{1+\frac{a+1}{a-1}\log\left(\frac {a+1} {2}\right)}.\tag{4}$$

Since it is symmetrical in respect of $y=x$, it's obvious that $y'|_{x=y=\frac 1 {2e}}=-1$, that is, the slope of tangent at $\left(\frac 1 {2e},\frac 1 {2e}\right)=-1$.
For $(1)$, differentiate both sides with respect to $x$, 
$\left(\frac {-b(a-cy)}{a-bx}-cy'\log(a-bx)\right)(a-bx)^{a-cy}=\left(\frac {-b(a-cx)}{a-by}y'-c\log(a-by)\right)(a-by)^{a-cx}.\tag{5}$
By putting $b=e(a-1)$, $x=y=\frac 1 {2e}$ and $y'|_{x=y=\frac 1 {2e}}=-1$ into $(5)$,
$\require{cancel} \left(\frac {-e(a-1)(a-\frac c {2e})}{a-\frac {e(a-1)} {2e}}+c\log(a-\frac {e(a-1)} {2e})\right)\bcancel{(a-\frac {e(a-1)} {2e})^{a-\frac c {2e}}}=\left(-\frac {-e(a-1)(a-\frac c {2e})}{a-\frac {e(a-1)} {2e}}-c\log(a-\frac {e(a-1)} {2e})\right)\bcancel{(a-\frac {e(a-1)} {2e})^{a-\frac c {2e}}},$
$$\frac {-(a-1)(2e\cdot a- c )}{a+1}+c\log\left(\frac {a+1} {2}\right)=\frac {(a-1)(2e\cdot a- c)}{a+1}-c\log\left(\frac {a+1} {2}\right)$$
$$\therefore c=\frac{2ea}{1+\frac{a+1}{a-1}\log\left(\frac {a+1} {2}\right)}.$$
Then we use condition A to prove

$$c=\frac 1 {W\left(\frac 1e \right)}\left(a-\frac{a\log\left(a-e(a-1)W\left(\frac 1e \right)\right)}{\log a}\right).\tag{6}$$

Substitute $x=0$, $y=W\left(\frac 1 e\right)$ and $(2)$ into $(1)$, we get
$$a^{a-c W\left(\frac 1 e\right)}=\left(a-e(a-1)W\left(\frac 1 e\right)\right)^a$$
$$\left(a-c W\left(\frac 1 e\right)\right)\log a=a\log\left(a-e(a-1)W\left(\frac 1 e\right)\right)\tag{$\text{vi}$}$$
$$a-c W\left(\frac 1 e\right)=\frac {a\log\left(a-e(a-1)W\left(\frac 1 e\right)\right)}{\log a}$$
$$\therefore c=\frac 1 {W\left(\frac 1e \right)}\left(a-\frac{a\log\left(a-e(a-1)W\left(\frac 1e \right)\right)}{\log a}\right).$$

Comment:


*

*In $(\text{vi})$ we take $\log$ on both sides.




Finally, put $(4)$ and $(6)$ together,

$$\frac{2ea}{1+\frac{a+1}{a-1}\log\left(\frac {a+1} {2}\right)}=\frac 1 {W\left(\frac 1e \right)}\left(a-\frac{a\log\left(a-e(a-1)W\left(\frac 1e \right)\right)}{\log a}\right).\tag{7}$$


Solve $a$, $a\approx 4.26480$, 
$b\approx 8.87465$ and
$c\approx 9.14674$.
</s>