# Getting NDSolve::deqn error from NDSolve [duplicate]

s =
NDSolve[
{x''[t] == ω^2 x[t] + 2 ω y'[t], y''[t] == ω^2 y[t] - 2 ω x'[t],
x == -.5, x' == v0/Sqrt, y == 0, y' == v0/Sqrt},
{x, y}, t]


I am trying to solve the above coupled, second-order differential equation, but I'm getting this error:

NDSolve::deqn: Equation or list of equations expected instead of True in the first argument {True, y [t]-2 (x′)[t] == ω^2 y[t] - 2]ω x′[t], x == -0.5, True, y == 0, True}.

Any suggestions?

Try:

v0 = 1;
ω = 1;
s =
NDSolve[
{x''[t] == ω^2 x[t] + 2 ω y'[t], y''[t] == ω^2 y[t] - 2 ω x'[t],
x == -0.5, x' == v0/Sqrt, y == 0, y' == v0/Sqrt},
{x, y}, {t, 0, 1}];

Plot[{x[t] /. s, y[t] /. s}, {t, 0, 1},
PlotLegends -> {"x[t]", "y[t]"},
AxesLabel -> {t, {x[t], y[t]}}]


NDSolve needs numeric values assigned to constants.

If you need a symbolic solution try DSolve.

ClearAll["Global*"];

s1 =
DSolve[
{x''[t] == ω^2 x[t] + 2 ω y'[t], y''[t] == ω^2 y[t] - 2 ω x'[t],
x == -1/2, x' == v0/Sqrt, y == 0, y' == v0/Sqrt},
{x[t], y[t]}, t] // ExpToTrig // FullSimplify

s1 // Flatten // TeXForm
`

$$\{x(t)\to \frac{1}{2} \left(t \left(\sqrt{2} \text{v0}-\omega \right) \sin (t \omega )+\left(\sqrt{2} t \text{v0}-1\right) \cos (t \omega )\right),$$ $$y(t)\to \frac{1}{2} \left(\left(1-\sqrt{2} t \text{v0}\right) \sin (t \omega )+t \left(\sqrt{2} \text{v0}-\omega \right) \cos (t \omega )\right)\}$$