class EulersMethod extends ODE_Solvers
{
constructor(derivative, initial_condition, x, steps = 1000 )
{
super(derivative, initial_condition, x, steps);
}
solve()
{
this.current_point = this.initial_condition;
for(let i = 0; i < this.steps; i++)
{
this.current_point[0] += this.delta;
this.current_point[1] += this.delta * this.derivative(this.current_point[0], this.current_point[1]);
}
return this.current_point;
}
}