# Trying to solve ODE. Need help with error messages [closed]

With this code I get an error-message:

Equation or list of equations expected instead of True in the first argument.

Apparently y'[0] == v0 gives True. The code does work if I put y'[1] == v0.

Question: what is happening here and why and how can I avoid this?

a = 1
b = 0.2
c = 4
y0 = 8.5
v0 = 0
DSolve[{a y''[t] + b y'[t] + c y[t] == 0, y[0] == y0, y'[0] == v0}, y[t], t]


By the way, if I use DSolveValue, then I get the same results, though with a different error-message:

Equation or list of equations expected in the first argument.

Here is what I get when I try your equation:

a = 1; b = 0.2; c = 4; y0 = 8.5; v0 = 0;

DSolve[{a y''[t] + b y'[t] + c y[t] == 0, y[0] == y0, y'[0] == v0}, y[t], t]

(* {{y[t] -> 8.5 E^(-0.1 t) (1. Cos[1.9975 t] + 0.0500626 Sin[1.9975 t])}} *)


You may need to restart your kernel and try again.

• Hmmm, that indeed worked! But... why? – GambitSquared May 1 '16 at 10:58
• @ImreVégh. It could be one of a variety of reasons. You may have previously stored a value in y'[0], so when you used y'[0] == v0 you got the result True. – RunnyKine May 1 '16 at 10:58
• @ImreVégh If RunnyKine is right, see the answers here for further explanation. – Michael E2 May 1 '16 at 13:02