Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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

Having this ordinary non linear differential equation

$$y'-x^2 (y+1)\cdot (y-2)^2= 0$$ with the boundary condition $y(4)=2$. When trying to solve this one with Mathematica by using

DSolve[{y'[x] - x^2 (y[x] + 1) (y[x] - 2)^2 == 0, y[4] == 2}, y[x], x]

it gives an empty set of solution and returns

DSolve::bvnul: For some branches of the general solution, the given boundary conditions lead to an empty solution. >>

As we have $$y'=x^2(y+1)\cdot (y-2)^2$$ which is clearly lipschitz continuous a local unique solution exists. In special $$y=2 \quad \forall x$$ is a solution of the differential equation. When using NDSolveand plotting the results it looks pretty much like the constant function which solves the ode. How does it come that Mathematica says there is no solution?

I am using Mathematica 9.0.1 (Student Edition).

share|improve this question
I would just generalize the boundary condition to y[a]==b. And to obtain trivial ones use Reduce. – swish May 3 '13 at 16:07

When you try to find the general solution with initial condition y[x0]==y0 you see what happens

sol = y[x] /. 
  First@DSolve[{y'[x] - x^2 (y[x] + 1) (y[x] - 2)^2 == 0, y[x0] == y0}, y[x], x]

enter image description here

As you see when y0==2 is directly inserted into the solution the denominator becomes zero. At this point you could use Limit to investigate further.

share|improve this answer

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.