Question: Difficult implicit odes

restart;
odes:=diff(x1(t),t)*diff(x2(t),t$2)*sin(x1(t)*x2(t))+5*diff(x1(t),t$2)*diff(x2(t),t)*cos(x1(t)^2)+t^2*x1(t)*x2(t)^2=exp(-x2(t)^2),diff(x1(t),t$2)*x2(t)+diff(x2(t),t$2)*diff(x1(t),t)*sin(x1(t)^2)+cos(diff(x2(t),t$2)*x2(t))=sin(t);
ics:=x1(0)=1,D(x1)(0)=1,x2(0)=2,D(x2)(0)=2;
subs(diff(x1(t),t$2)=yp2,diff(x2(t),t$2)=yp4,diff(x1(t),t)=Y[2],diff(x2(t),t)=Y[4],x1(t)=Y[1],x2(t)=Y[3],{odes});
p:=proc(N,t,Y,YP)
local eqs,yp2,yp4;
YP[1]=Y[2];
YP[3]=Y[4];
eqs:=[yp2*Y[3]+yp4*Y[2]*sin(Y[1]^2)+cos(yp4*Y[3]) = sin(t), Y[2]*yp4*sin(Y[1]*Y[3])+5*yp2*Y[4]*cos(Y[1]^2)+t^2*Y[1]*Y[3]^2 = exp(-Y[3]^2)];
YP[2],YP[4]:=op(subs(fsolve(eqs,{yp2=1,yp4=2}),[yp2,yp4]));
end proc:
res:=dsolve(numeric,procedure=p,initial=array([1,1,2,2]),number=4,procvars=[x1(t),diff(x1(t),t),x2(t),diff(x2(t),t)],start=0,maxfun=0);
plots:-odeplot(res,[t,x1(t)],0..5,gridlines=true);

It's a long time to wait for the odeplot.

Any advice is appreciated.

Please Wait...