Question: Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

Hello,

I want to solve the differential equation and put the solution in a list to be able to animate the pendulum.

 

tipe6 := proc (longueur, thetaInitial, rayonBoule, nombrePoints)

local eq, sol, valeurstheta, x, y, plotseq;

eq := ((1/2)*longueur^2+(1/5)*rayonBoule^2)*(diff(theta(t), t))^2+g*l*(cos(theta(t))-cos(thetaInitial)) = 0;

sol := dsolve({theta(0) = thetaInitial, (D(theta))(0) = 0, eq}, theta(t), numeric);

valeurstheta := seq(rhs(sol((1/30)*i)[2]), i = 1 .. nombrePoints);

x := seq(longueur*sin(valeurstheta[i]), i = 1 .. nombrePoints);

y := seq(longueur*(1-cos(valeurstheta[i])), i = 1 .. nombrePoints);

plotseq := [seq(plot([[x[i], y[i]]], style = point), i = 1 .. nombrePoints)];

plots:-display(plotseq, insequence = true)

end proc;

 

When I try to run it, I have  the message

Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

I don't understand why...

Thank you for your help

Please Wait...