The swing equation is of the form:
πΒ Μ = π
πΒ Μ =βπΌπ+π βπΎβsinβ‘(πβπππππ) //Take π=x and π=y.
So take F1(x,y,t) = y
Second one is G1(x,y,t)= -alpha*y + p - k*sin(x-Xgrid) //alpha=0.1,p=1,k=8
So please take F1 & G1 for n dimensions(i.e. F1,G1,F2,G2,F3,G3.....Fn,Gn) and write the code for solving using C language.