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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm given a problem with the ODE


I've tried

DSolve[{w'[x] == w[x]*Sqrt[4 - 2*w[x]]}, w[x], x]

which gives me

{{w[x] -> -2 (-1 + Tanh[1/2 (-2 x - Sqrt[2] C[1])]^2)}}
but that doesn't seem correct for some reason.

Can someone please point me in the direction of how to do this problem correctly? I don't really understand Mathematica at all.

share|cite|improve this question
Why do you think it isn't correct? – Dr. belisarius Oct 25 '12 at 17:27
Do you have boundary conditions by any chance that you could use to plot the solution? {{w[x] -> -2 (-1 + Tanh[1/2 (-2 x - Sqrt[2] C[1])]^2)}} is what I got on Mathematica as well. What were you expecting? – drN Oct 25 '12 at 22:30

here is a soultion by Maple

$$ x+\frac{1}{2}\,\ln \left( \sqrt {4-2\,y \left( x \right) }+2 \right)- \frac{1}{2}\, \ln \left( -2+\sqrt {4-2\,y \left( x \right) } \right) +{\it \_C1}=0\,.$$

solving the above equation for $y$, gives

$$ y(x) = -{\frac {{{8\rm e}^{2\,x+2\,{\it C1}}}}{ \left( {{\rm e}^{2\,x+2\, {\it C1}}}-1 \right) ^{2}}} \,.$$

The differential equation can be solved by the method of separation of variables

$$ \frac{dy}{dx}=y \sqrt{4-2y}\implies \int \frac{dy}{y \sqrt{4-2y}}=\int dx + C \,.$$

You need to work out the above integrals and then solve the resulting equation for y to get y as a function of $x$.

share|cite|improve this answer
How exactly did you come to this solution? – Jay Oct 25 '12 at 17:35
@Jay: I'll try to put more details. – Mhenni Benghorbal Oct 25 '12 at 17:37
Do you have any idea how to do this in Mathematica? – Jay Oct 25 '12 at 17:53
I think I'm close. Clear[eq1, eq2, x, y, func]; eq1 = Integrate[1/(w*Sqrt[4 - 2*w]), w]; eq2 = Integrate[1, x]; func = eq1 == eq2; Solve[func]; gives me {{x -> 1/2 Log[2 - Sqrt[4 - 2 w]] - 1/2 Log[2 + Sqrt[4 - 2 w]]}} – Jay Oct 25 '12 at 18:03

Your Answer


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.