RK4[f_,u0_,h_,t0_,T_]:=(
n=Ceiling[(T-t0)/h];
t=Table[i h,{i,0,n}];
y=Table[0,{n+1}];
y[[1]]=u0;
For[i=1,i≤n,i++,
k1=h f[t[[i]],y[[i]]];
k2=h f[t[[i]]+h/2,y[[i]]+k1/2];
k3=h f[t[[i]]+h/2,y[[i]]+k2/2];
k4=h f[t[[i]]+h,y[[i]]+k3];
y[[i+1]]=y[[i]]+(1/6)(k1+2k2+2k3+k4)
];
y
)

λ=1000000;
f[t_,y_]:=λ(-y+Sin[t]);
y=RK4[f,0,0.0001,0,10];
plotAppr=ListLinePlot[Table[{t[[i+1]], y[[i+1]]},{i,0,n}]];
c=(λ/(1+(λ^2)));
plotExact=Plot[c (E^(-λ t))+((λ^2)/(1+(λ^2)))Sin[t]-(λ/(1+(λ^2)))Cos[t],{t,0,10},PlotStyle->Red];
Show[plotAppr,plotExact]

plotAppr=ListPlot[Table[{t[[i+1]], y[[i+1]]},{i,0,n}]]