I am trying to numerically solve an equation with NDSolve, where there is a ODE coupled to a PDE, like the following:
NDSolve[{ Derivative[1, 0][u][t,x] == -0.8*u[t, x] - (5.*n[t]*Derivative[0, 1][u][t, x])/(5. + n[t]) + (50.*n[t]^2*Derivative[0, 2][u][t, x])/(5. + n[t])^2, Derivative[1][n][t] == 100. - 0.8*n[t] - (0.5*Integrate[u[t, x], {x, 0, 2*Pi}]*n[t])/(5. + n[t]), u[0, x] == 200., n[0] == 50., u[t, 0] == u[t, 2*Pi]}, {u, n}, {t, 0., 2.}, {x, 0., 6.28}] Unfortunately Mathematica tells me "NDSolve::ndode: Input is not an ordinary differential equation".
When i change n[t] to n[t,x] it calculates something, but n[t,x] doesn't stay uniform over time, which it should because n wasn't a function of x in the first place.
Would anyone know a way around this?


nfunction by hand and explicitly add it to the equation? $\endgroup$[Theta], [Omega]in place of\[Theta],\[Omega]and a constant isn't defined. You could edit the question with the full problem - that would help people get interested in this. $\endgroup$