Question: How to solve differential equations by Runge-Kutta fourth order method


I solved these equations numerically but I need to solve it by Runge-Kutta fourth order Method. Kindly help me in the coding of the same.


N1 :=1:N2 :=1: N3 :=0.1 :R := -1:
EQ:={(1+N1)*diff(f(x),x$4)-N1*diff(g(x),x$2)-R*(-diff(f(x),x)*diff(f(x),x$2)+f(x)*diff(f(x),x$3))=0, N2*diff(g(x),x$2)+N1*(diff(f(x),x$2)-2*g(x))-N3*R*(f(x)*diff(g(x),x)-diff(f(x),x)*g(x))=0}:

IC:={D(D(f))(0)=0, D(f)(1)=0,f(0)=0,f(1)=1,g(0)=0,  g(1)=0}:

sol:= dsolve(EQ union IC, numeric,output=Array([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1])):

Please Wait...