Question: Error in Solving System of ODEs: "System must be entered as a set/list of expressions/equations"

I'm trying to solve a system of coupled differential equations numerically, but I'm getting the following error

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

The error occurs at the dsolve step, despite trying to ensure that all equations and conditions are in the correct form (sets/lists).

Could someone help me identify what I'm missing here?

Thanks in advance!

L := 200; K := 99; kappa := 1; omegaD := 1; beta := 1; delta := 0.5e-1; j := 2; tmax := 3000; h := L/(K+1); nsp := [`$`(-(1/2)*L+h*i, i = 0 .. L/h)]; km := nops(nsp); omegaD2 := h^2*omegaD^2; deltaHat := h*delta; a := 2; var := seq(x[i](t), i = 1 .. km); initialPositions := seq(x = a*sin(j*h*Pi*nsp[i]/L), i = 1 .. km); initialVelocities := seq((D(x[i]))(0) = 0, i = 2 .. km-1)

boundaryConditions := [x[1](t) = 0, x[km](t) = 0]

equations := seq(diff(x[n](t), t, t)-kappa*(x[n+1](t)-2*x[n](t)+x[n-1](t))+deltaHat*(diff(x[n](t), t))-omegaD2^2*(x[n](t)-beta*x[n](t)^3) = 0, n = 2 .. km-1)

sol := dsolve({equations, boundaryConditions, initialPositions, initialVelocities}, var, numeric, method = rkf45, range = 0 .. tmax)

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

NULL

Download dsolve_error.mw

Please Wait...