1
$\begingroup$

I am trying to solve the following equation for x in terms of $y$ and $c$ (with $x,y \in [0,1]$) \begin{equation} \log\left(\frac{x}{1-x-y}\right) + \frac{x}{1-x-y} + \frac{y}{1-x-y} = c \end{equation}

I can solve this easier equation \begin{equation} \log\left(\frac{x}{1-x-y}\right) + \frac{x}{1-x-y} = c \end{equation}

Let \begin{equation} z = \frac{x}{1-x-y} \end{equation}

Then I can solve for $x$ using Lambert's W function \begin{align} \log(z) + z &= c \notag \\ z &= \exp(c)\exp(-z) \notag \\ z \exp(z) &= \exp(c) \notag \\ z &= W(\exp(c)) \notag \\ x &= \frac{(1-y)W(\exp(c))}{1+W(\exp(c))} \notag \end{align}

Can anyone help me solve the harder equation? Is Lambert's W function helpful here?

Thanks!

$\endgroup$
1
$\begingroup$

\begin{align} \ln\left(\frac{x}{1-x-y}\right) +\frac{x}{1-x-y} + \frac{y}{1-x-y} &= c \tag{1}\label{1} \end{align}

\begin{align} \ln\left(\frac{x}{1-x-y}\right) &= c+\frac{1-x-y-1}{1-x-y} ,\\ \ln\left(\frac{1-y}{1-x-y}-1\right) &= c+1-\frac{1}{1-x-y} ,\\ \ln\left(\frac{1-y}{1-x-y}-1\right) &= c-\left(\frac{1}{1-x-y}-1\right) ,\\ \ln\left(\frac{1-y}{1-x-y}-1\right) &= c-\frac{1}{1-y}\left(\frac{1-y}{1-x-y}-(1-y)\right) ,\\ \ln\left(\frac{1-y}{1-x-y}-1\right) &= c-\frac{1}{1-y}\left(\frac{1-y}{1-x-y}-(1-y)\right) ,\\ \ln\left(\frac{1-y}{1-x-y}-1\right) &= c-\frac{y}{1-y}-\frac{1}{1-y}\left(\frac{1-y}{1-x-y}-1\right) . \end{align}

Let

\begin{align} \frac{1-y}{1-x-y}-1&=z ,\\ c-\frac{y}{1-y}&=u ,\\ -\frac{1}{1-y}&=v \end{align}

and we have an equation

\begin{align} \ln z&=u+vz , \end{align}

which has a standard solution for $z$ in terms Lambert W function

\begin{align} z&=-\frac{\operatorname{W}(-v\exp(u))}{v} ,\\ x&=(1-y)\left(1-\frac1{1+z}\right) . \end{align}

$\endgroup$
0
$\begingroup$

You can use the Lambert $W$ to solve $$ \log(s) + s + t = c $$ and get a curve parameterized by $t$.

For each value of $(s,t)$, then, $$ \frac{x}{1-x-y} = s \qquad\qquad \frac{y}{1-x-y} = t $$ now reduces to a system of linear equations in $x$ and $y$, which is easy to solve.

All in all, you get $(x,y)$ as afunction of $t$.

$\endgroup$
  • $\begingroup$ Hi Henning, thanks for your answer! This makes sense to me. Do you agree that it gives an implicit solution in the sense that $t = y / (1 - x - y)$? Is an implicit solution the best we can hope for here? Thanks! $\endgroup$ – alex Sep 12 '18 at 12:18
  • $\begingroup$ @alex: I can't rule out that there is something smarter that could be done with this result, but I don't immediately see what it would be. $\endgroup$ – Henning Makholm Sep 12 '18 at 12:47
0
$\begingroup$

I fill in the details of Henning Makholm's answer here

First, the parametrized curve \begin{align} \log(s) + s + t &= c \notag \\ s \exp(s) &= \exp(c - t) \notag \\ s &= W(\exp(c-t)) \notag \end{align}

Second, the linear system gives \begin{equation} x = \frac{s}{1+s+t}, \quad \quad y = \frac{t}{1+s+t} \end{equation}

Substituting $s$ gives \begin{equation} x = \frac{W(\exp(c-t))}{1+W(\exp(c-t))+t}, \quad \quad y = \frac{t}{1+W(\exp(c-t))+t} \end{equation}

This solves for $x$ and $y$ in terms of $c$ and $t$. The solution is implicit in the sense that $t = \frac{y}{1-x-y}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.