From a Slope Field to an Euler Polygon
A differential equation \(y'=f(t,y)\) assigns a slope to each point \((t,y)\) in the plane. A slope field displays this information using short line segments: the segment at \((t,y)\) has slope \(f(t,y)\). The field gives a visual picture of the equation, while Euler’s method turns that local slope information into a sequence of approximate points.
Plotting the Euler polygon means more than marking those points. Starting from the initial condition, draw a straight segment over each time step, using the slope at the segment’s starting point. The resulting connected path is piecewise linear: it consists of straight pieces that generally meet at corners.
The node \((t_n,y_n)\) is the starting point for step \(n\), and \(h_n\) is the horizontal distance to the next node. On a uniform grid, all step sizes have the same value \(h\). On a nonuniform grid, calculate each step with its own \(h_n\).
How to Draw One Step
Suppose the current node is \((t_n,y_n)\). First read or calculate the slope \(f(t_n,y_n)\) there. Then move horizontally by \(h_n\). Over that horizontal distance, move vertically by \(h_n f(t_n,y_n)\). This gives the next node. Draw a straight line between the two nodes.
A positive starting slope makes the segment rise as time increases; a negative slope makes it fall; and a zero slope makes it horizontal. The size of the vertical change depends on both the slope and the step size. For instance, a slope of \(2\) over a step of \(0.5\) gives a vertical change of \(1\), not \(2\).
The plotted slope-field marks are often drawn as short, equal-length strokes so that the diagram remains readable. Their lengths are only visual markers. To construct an Euler step, use the numerical slope, not the length of the field stroke.
Why the Euler Segment Has This Slope
The construction follows directly from the formula for the slope of a straight line. The line through the current node and the next node has horizontal change \(t_{n+1}-t_n=h_n\) and vertical change \(y_{n+1}-y_n\). The Euler update makes that vertical change equal to \(h_n f(t_n,y_n)\). Therefore, the segment’s slope is the value of the differential equation at its starting point.
More explicitly, for \(t_n\le t\le t_{n+1}\), the straight segment is described by
At \(t=t_n\), this gives \(y_E(t_n)=y_n\). At \(t=t_{n+1}=t_n+h_n\), it gives \(y_E(t_{n+1})=y_n+h_n f(t_n,y_n)=y_{n+1}\). Its slope throughout that interval is \(f(t_n,y_n)\), fixed at the start of the step. The slope field may assign different slopes at other points along the segment; Euler’s method does not update the segment’s slope partway through.
Worked Example: A Time-Dependent Slope Field
Worked Example: A Time-Dependent Slope Field
Plot two Euler steps for \(y'=t+y\), starting at \((t_0,y_0)=(0,1)\), with uniform step size \(h=0.5\).
First step. The slope at the starting point is
The horizontal change is \(0.5\), so the vertical change is
Thus the next node is \((t_1,y_1)=(0.5,1.5)\). Draw a straight segment from \((0,1)\) to \((0.5,1.5)\). Its slope checks as
Second step. Evaluate the slope at the new starting node, not at the previous one:
The vertical change is \(0.5(2)=1\), so
Draw a segment from \((0.5,1.5)\) to \((1,2.5)\). Its slope is
The Euler polygon consists of the two segments through \((0,1)\), \((0.5,1.5)\), and \((1,2.5)\). Each segment passes through a node and has the slope assigned by the field at that segment’s starting node.
Worked Example: Following Positive Slopes That Decrease
Worked Example: Following Positive Slopes That Decrease
Draw three Euler steps for \(y'=1-y\), beginning at \((0,0)\), with \(h=0.5\).
At \((0,0)\), the slope is \(1-0=1\). Thus \(y_1=0+0.5(1)=0.5\), and the first segment joins \((0,0)\) to \((0.5,0.5)\). Its slope check is
At \((0.5,0.5)\), the slope is \(1-0.5=0.5\). Thus \(y_2=0.5+0.5(0.5)=0.75\). The second segment joins \((0.5,0.5)\) to \((1,0.75)\), and
At \((1,0.75)\), the slope is \(1-0.75=0.25\). Thus \(y_3=0.75+0.5(0.25)=0.875\). The third segment joins \((1,0.75)\) to \((1.5,0.875)\), with slope
The nodes, in order, are \((0,0)\), \((0.5,0.5)\), \((1,0.75)\), and \((1.5,0.875)\). The slopes of successive pieces are positive and decrease from \(1\) to \(0.5\) to \(0.25\), just as the slope values evaluated at their starting nodes do.
Worked Example: A Segment Can Change from Falling to Rising
Worked Example: A Segment Can Change from Falling to Rising
Draw three Euler steps for \(y'=t-y\), starting at \((0,2)\), using \(h=0.5\).
At the initial node, \(f(0,2)=0-2=-2\). The first vertical change is \(0.5(-2)=-1\), so \(y_1=2-1=1\). The segment joins \((0,2)\) to \((0.5,1)\). Its slope checks as
At \((0.5,1)\), the slope is \(f(0.5,1)=0.5-1=-0.5\). The next vertical change is \(0.5(-0.5)=-0.25\), giving \(y_2=1-0.25=0.75\). The segment from \((0.5,1)\) to \((1,0.75)\) has slope
At \((1,0.75)\), the slope is \(f(1,0.75)=1-0.75=0.25\). The vertical change is \(0.5(0.25)=0.125\), so \(y_3=0.75+0.125=0.875\). The final segment joins \((1,0.75)\) to \((1.5,0.875)\), and its slope is
The first two pieces fall, while the third rises. This change is reflected by the sign change in the slope evaluated at the third starting node. The plotted path is still made by connecting successive Euler nodes with straight lines.
A Reliable Plotting Procedure
For a hand-drawn slope field and Euler polygon, keep the field and the path conceptually distinct: the field shows slopes at many points, while the polygon uses a selected sequence of those slopes. The following process makes the construction systematic.
Plot the specified point \((t_0,y_0)\) on axes with labeled scales.
Use the slope-field mark or calculate \(f(t_n,y_n)\) at the current node.
Move horizontally by \(h_n\), and vertically by \(h_n f(t_n,y_n)\).
Draw a straight segment between the current node and the new one.
Evaluate the slope there, then calculate and draw the next step.
Take care when interpreting the visual angle of a segment. The numerical slope is vertical change divided by horizontal change in the coordinate units. If the horizontal and vertical axes use different physical lengths per unit on the page, a segment’s apparent angle may not visually match its numerical slope. Trust the coordinate differences and calculations, rather than estimating the slope from the angle alone.
Common Mistake: Using the Endpoint Slope Too Soon
A frequent error is to evaluate the differential equation at the point where the step will end and use that value for the segment just being drawn. The Euler rule instead uses the slope at the starting point. In the first step of the example \(y'=t+y\) from \((0,1)\) with \(h=0.5\), using the endpoint slope prematurely would mean using \(f(0.5,1.5)=2\). That incorrect choice gives
This does not match the first segment’s required starting slope. The segment from \((0,1)\) to \((0.5,2)\) has slope \((2-1)/(0.5-0)=2\), whereas the field assigns slope \(f(0,1)=1\) at its starting point. The correct calculation uses \(f(0,1)=1\), giving \(y_1=1+0.5(1)=1.5\); the segment’s slope is then \((1.5-1)/0.5=1\), as required.
Check Your Understanding
For each question, use the starting-node rule and check the segment slope from its endpoints.
- For \(y'=2t-y\), starting at \((0,1)\) with \(h=0.25\), what are the slope and next node?
- For \(y'=y\), starting at \((1,2)\) with \(h=0.5\), calculate the next node and the slope of the segment.
- In one sentence, explain why the slope along an Euler segment is fixed by the field value at its starting point.
- For \(y'=t-y\), starting at \((0,1)\) with \(h=1\), calculate the next node. Does the segment rise, fall, or remain horizontal?
- A segment runs from \((2,3)\) to \((2.5,4)\). What slope does that segment represent, and what value must \(f(2,3)\) have for it to be an Euler step?