Anonymous user
Runge-Kutta method: Difference between revisions
→{{header|C#}}
Line 253:
=={{header|C#}}==
<lang
using System;
Line 262:
static void Main(string[] args)
{
//Incrementers to pass into the known solution
double t = 0.0;
Line 311 ⟶ 307:
while (i < y.Length - 1)
{
dy1 = dt * equation(s[i], y[i]);
Line 342 ⟶ 336:
{
double y_prime;
return y_prime = t*Math.Sqrt(y);
}
Line 350 ⟶ 343:
{
double actual;
actual = Math.Pow((Math.Pow(t, 2) + 4), 2)/16;
return actual;
}
|