First of all, this question is more appropriate for Mathematica.SE rather that here.
At first I posted the following comment, which I now have deleted:
You must've copied it wrong. I've just copy-and-pasted the four lines from your question into Mathematica on my computer, and it gave me an output: {{y -> InterpolatingFunction[{{-5., 5.}}, <>]}}
.
But then I figured that there's something else going on. I started a new notebook, so there was no possible interference from any previous inputs in my case. But what if something that happened earlier in your notebook affected the output in your case? And then I was able to reproduce this effect! It's not about NDSolve at all…
I bet when you entered it first, you made a very common typo by using =
instead of ==
in the equation to be solved:
a = -5;
c = 5;
Clear[solution, x, y, fakey];
solution = NDSolve[{y'[x] = (y[x]^2) - 1, y[0] == 0.9}, y, {x, a, c}]`
to which Mathematica responded
NDSolve::deqn: Equation or list of equations expected instead of -1+y[x]^2 in the first argument {-1+y[x]^2,y[0]==0.9}.
Then you realized your error and corrected your input:
a = -5;
c = 5;
Clear[solution, x, y, fakey];
solution = NDSolve[{y'[x] == (y[x]^2) - 1, y[0] == 0.9}, y, {x, a, c}]
and saw this puzzling response
NDSolve::deqn: Equation or list of equations expected instead of True in the first argument {True,y[0]==0.9}.
The reason this happened: in your first input, the clause y'[x] = (y[x]^2) - 1
was an assignment, resulting in y'[x]
now actually storing the expression (y[x]^2) - 1
. Next time, when you compare them with each other, the comparison naturally returned True
since they are equal to each other! Note that Clear[y]
had no effect on y'[x]
because roughly speaking it's a different symbol for Mathematica.