# Graphic Solution of a First-Order Differential Equation

Graphic Solution of a First-Order Differential Equation

This Demonstration presents Euler's method for the approximate (or graphics) solution of a first-order differential equation with initial condition , .

y'=f(x,y)

y(x)=y

1

1

The method consists of calculating the approximation of by

y(x)

x=x+h

i+1

i

y=y+hy'(x)=y+hfx,y

i+1

i

i

i

i

i

where .

i=1,…,n-1

These coordinates determine points , , …, . These points form Euler's polygonal line that is an approximate solution of the problem. The Demonstration compares it with a better solution provided by Mathematica's built-in NDSolve function (brown line).

P

1

P

2

P

n