I have this very strange phenomenon happening on my computer. When I try to calculate a simple ODE
DSolve[{y''[x] == y[x]}, y[x], x]
It outputs
DSolve[{True}, y[x], x]
with an error message Equation or list of equations expected instead of True in the first argument {True}
I looked deeper and I found the following. If I do
D[y[x], {x, 1}]
I get
Derivative[1][y][x]
, which is correct.
But if I do
D[y[x], {x, 2}]
I get
y[x]
And if I do
D[y[x], {x, 3}]
I get
Derivative[1][y][x]
again! It shows that whenever I do a second derivative on my Mathematica, it always gives me the original function back. Am I doing something wrong here? Or is there anything I can fix this problem?
Restart Mathematica, type exactly and only this into a notebook, nothing more, nothing less
DSolve[{y''[x] == y[x]}, y[x], x]
followed by shift and enter and I get this
{{y[x] -> E^x C[1] + E^-x C[2]}}
I suspect the reason for what you saw was that you had previously somehow assigned values to some variables or functions. Mathematica does not make that obvious and the results can be very confusing. Sometimes restarting will resolve this. Sometimes using the menu to quit the kernel will resolve this.
Simon, I believe I figured out why that happened. In my first attempt to use the DSolve routine, I mistakenly used ‘=’ for ‘==’. That assignment side effect ruin all later computations.
Thank you guys. Now the expressions work perfectly! I am still new to the language so sorry for the silliness