1
$\begingroup$

I am trying to solve the system of differential equations dx/dt = (y-x)/(x+y), dy/dt = -y/(x+y), where x and y are functions of t, and x(0)=0, y(0)=c (positive constant). I would like to find x and y explicitly in terms of t.

This problem is related to my previous question "Probability problem with solution involving e."

Any help would be appreciated. Thanks.

$\endgroup$

3 Answers 3

1
$\begingroup$

Continuing Michael's answer: Solve $dy/dx = y/(x-y), y(0)=c$ to get (in terms of the Lambert W function) $y(x) = \operatorname{e} ^{W(-x/c) + \mathrm{log} (c)}$. Substitute this into the original equations to get a single equation: $$ \frac{d x (t)}{d t} = \frac{\operatorname{e} ^{\Bigl(W \Bigl(-\frac{x (t)}{c}\Bigr) + \operatorname{log} (c)\Bigr)} - x (t)}{\operatorname{e} ^{\Bigl(W \Bigl(-\frac{x (t)}{c}\Bigr) + \operatorname{ln} (c)\Bigr)} + x (t)} $$ $x(0)=0$. Maple finds two solutions for this

added

The one that seems to work for real $c > 0$ is: $$x(t) = -\left(W_{-1} \left(\frac{-(-t + 2 c) \operatorname{e} ^{-2}}{c}\right) + 2\right) \operatorname{e} ^{\Biggl(tW_{-1} \Biggl(\frac{-(-t + 2 c) \operatorname{e} ^{-2}}{c}\Biggr) + 2\Biggr)} c $$

$\endgroup$
2
  • $\begingroup$ The $t$ in the exponent is likely a typo. $\endgroup$ Jun 13, 2011 at 18:23
  • $\begingroup$ Yes, LambertW from Maple shortened to W for this, but the t was missed. $\endgroup$ Jun 14, 2011 at 12:20
2
$\begingroup$

I think it might be easier the other way round: solve $dx(y)/dy=x(y)/y-1$, $x(c)=0$ to get $x(y)=(\log c-\log y)y$. Then we are left with $$\frac{dy(t)}{dt}=-\frac1{\log c+1-\log y(t)}=\frac1{\log(y(t)/ec)}.$$ This is solved by $y(t)=\frac{t+d}{W((t+d)/ce^2)}$. Plugging in $y(0)=c$ gives $d=-2c$ for the lower branch of $W$, hence, barring mistakes, \begin{align} y(t)&=\frac{t-2c}{W_{-1}\left(\frac{t-2c}{ce^2}\right)},\\\\\\\\ x(t)&=2(c-y(t))-t, \end{align} for $-c(e-2)< t< 2c$. Note that $\lim_{t\to2c-}(x(t),y(t))=(0,0)$ and $\lim_{t\to(2-e)c+}(x(t),y(t))=(-ce,ce)$.

$\endgroup$
2
  • $\begingroup$ From this we get $$ \operatorname{e} ^{\Biggl(W_{-1} \Biggl(\frac{-(-t + 2 c) \operatorname{e} ^{-2}}{c}\Biggr) + 2\Biggr)} c $$ which seems to agree with my solution below $t=1$. Maybe we have different branches above $t=1$ or something. $\endgroup$ Jun 13, 2011 at 15:09
  • 1
    $\begingroup$ Actually the place where the two solutions differ is where $x$ switches from increasing to decreasing. My version of $y(t)$ has a corner there, yours doesn't. So perhaps I should switch to a different branch of $W$ there. $\endgroup$ Jun 13, 2011 at 15:17
0
$\begingroup$

$$dx/dy=x/y-1.$$ From this, you find $$\frac{d}{dy}(\frac{x}{y})=-\frac{1}{y}.$$

$\endgroup$
1
  • $\begingroup$ I understand what you did. I wonder if there is a way to solve for x and y explicity in terms of t. $\endgroup$ Jun 13, 2011 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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