Question: Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations----------> Trouble with dsolve

Hi everyone, I have copied soem code from a paper. I hope to try and manupiluate some of the varables. However it seems while I am coping the code I get this error Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations .I have checked online but it seems that there is nothing I can find to fix this problem. My code is posted below 

Thanks for your time and help!

restart

with(VariationalCalculus)

with(ODEtools)

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received ODEtools

 

with(DEtools)

with(plots); with(plottools); PDEtools[declare]((theta, phi, psi)(t), prime = t)

`derivatives with respect to`*t*`of functions of one variable will now be displayed with '`

(1)

with(linalg)

We will now declare our first equations

 

 

x[1] := l[1]*sin(theta(t))

y[1] := -l[1]*cos(theta(t))``

x[2] := -l[2]*sin(theta(t)); y[2] := l[2]*cos(theta(t))

x[4] := x[1]-l[4]*sin(theta(t)+phi(t)); y[4] := y[1]+l[4]*cos(theta(t)+phi(t)); x[3] := x[2]+l[3]*sin(theta(t)-psi(t)); y[3] := y[2]-l[3]*cos(theta(t)-psi(t))

R[1] := vector(2, [x[1], y[1]]); R[2] := vector(2, [x[2], y[2]]); R[4] := vector(2, [x[4], y[4]]); R[3] := vector(2, [x[3], y[3]])

`\`R`[1]*` ≔ map`(diff, R[1], t); `\`R`[2]*` ≔ map`(diff, R[2], t); `\`R`[4]*` ≔ map`(diff, R[4], t); `\`R`[3]*`≔map`(diff, R[3], t)

NULL

NULL

T := combine(simplify(collect((1/2)*m[1]*innerprod(`\`R`[4]*`,`*R[4]*`)+m[2]/2*
innerprod(\`R[3]\`,\`R[3]`), [l[1], l[2], l[3], l[4], m[1], m[2], diff(theta(t), t), diff(phi(t), t), diff(psi(t), t), cos(psi(t)), sin(psi(t))])), trig)

NULL

U := collect(simplify(expand(g*m[1]*y[4]+g*m[2]*y[3])), [l[1], l[2], l[3], l[4], m[1], m[2], diff(theta(t), t), diff(phi(t), t), diff(psi(t), t), cos(psi(t)), sin(psi(t)), g])

NULL

L := simplify(collect(T-U, [l[1], l[2], l[3], l[4], m[1], m[2], diff(theta(t), t), diff(phi(t), t), diff(psi(t), t), cos(psi(t)), sin(psi(t))]))

NULL

NULL

NULL

Eul := remove(has, EulerLagrange(L, t, [theta(t), phi(t), psi(t)]), K[1]); eq1 := op(select(has, Eul, (diff(psi(t), t))^2)); eq2 := op(select(has, remove(has, Eul, (diff(psi(t), t))^2), sin(psi(t)))); eq3 := op(remove(has, remove(has, Eul, (diff(psi(t), t))^2), sin(psi(t))))

NULL

NULL

INITS := {phi(0) = (1/4)*Pi, psi(0) = (1/4)*Pi, theta(0) = 3*Pi*(1/4), (D(phi))(0) = 0, (D(psi))(0) = 0, (D(theta))(0) = 0}

NULL

PARAM := [g = 9.8, l[1] = 10, l[2] = 100, l[3] = 100, l[4] = 21, m[1] = 1000, m[2] = 1]

NULL

sys := eval([eq1, eq2, eq3], PARAM)

NULL

sol := dsolve([op(sys), op(INITS)], numeric, output = listprocedure)

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

 

NULL``

 

 

NULL

NULL

``

Download Test_1.mw

Please Wait...