Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

My friend posed to me an interesting physics problem that reduces to the differential equation $$\frac{dy}{dx} = \frac{a}{y} + b$$ where $a$ and $b$ are known, nonzero constants. After reading up on how to solve differential equations like this, I got it down to $$\frac{by - a\space \ln (a + by)}{b^2} = x + C$$ and this is where I hit a dead-end. Wolfram|Alpha tells me that $$y = \dfrac{a\left(-W\left(-\dfrac{e^{\dfrac{(x+C)b^2}{a}-1}}{a}\right)\right)-a}{b}$$ where $W(z)$ is the Lambert W-function, but this is incredibly complex and I have no idea how it got to that point.

How one would get to this solution, and is there possibly a simpler way of expressing this?

share|improve this question
1  
I think you got the sign of the logarithm wrong, and you should take the absolute value of its argument; but neither of those will help make the solution any nicer. –  joriki Nov 3 '11 at 22:57
    
Thanks, fixed. W|A refuses to give an answer altogether if I use absolute values, though, so I'm not even sure how that would even be reflected in the solution. –  algorithmshark Nov 3 '11 at 23:21

1 Answer 1

up vote 2 down vote accepted

Let's start with

$$\frac{by - a \ln (a + by)}{b^2} = x + C$$

and do a few rearrangements:

$$\frac{b}{a}y - \ln (a + by) = \frac{b^2}{a}(x + C)$$

and complicate things a little:

$$\begin{align*}1+\frac{b}{a}y - \ln\left(1 + \frac{b}{a}y\right) &= 1 + \frac{b^2}{a}(x + C)+\ln\,a\\\frac{\exp\left(1+\frac{b}{a}y\right)}{1+\frac{b}{a}y}&=\exp\left(1 + \frac{b^2}{a}(x + C)+\ln\,a\right)\\\left(-1-\frac{b}{a}y\right)\exp\left(-1-\frac{b}{a}y\right)&=-\frac1{a}\exp\left(- \frac{b^2}{a}(x + C)-1\right)\end{align*}$$

which is the cue for Lambert to enter the fray:

$$-1-\frac{b}{a}y=W\left(-\frac1{a}\exp\left(- \frac{b^2}{a}(x + C)-1\right)\right)$$

and finally

$$y=-\frac{a}{b}\left(1+W\left(-\frac1{a}\exp\left(- \frac{b^2}{a}(x + C)-1\right)\right)\right)$$

Which branch of the Lambert function will be needed will depend on your application.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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