# What does the Error Message in DSolve really mean?

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 hence local a 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).

-
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] /.

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.