Direction Fields and Euler’s Method: Learn It 2

Using Direction Fields

You can use a direction field to predict the behavior of solutions to a differential equation without knowing the actual solution. For example, the direction field in Figure 2 serves as a guide to the behavior of solutions to the differential equation [latex]y^{\prime} = 3x + 2y - 4[/latex].

Before developing this method, let’s revisit an important concept – linear approximation.

The linear approximation of a function at a given point, also known as the linearization, is equivalent to the equation of the tangent line to the graph of the function at that point.

Since the slope of a function [latex]f(x)[/latex] at [latex](x_0, y_0)[/latex] is given by [latex]f'(x_0)[/latex], the linear approximation of a function [latex]f(x)[/latex] at point [latex](x_0, y_0)[/latex] is:

[latex]L(x) = y_0 + f'(x_0)(x - x_0)[/latex]

For values near the point [latex](x_0, y_0)[/latex], we have [latex]L(x) \approx f(x)[/latex]. In other words, [latex]L(x)[/latex] can predict function values near [latex](x_0, y_0)[/latex].

The actual change in function output, [latex]\Delta y[/latex], can be approximated using the slope at [latex](x_0, y_0)[/latex]:

[latex]\Delta y \approx f'(x_0) \Delta x[/latex]

To use a direction field, start by choosing any point in the field. The line segment at that point serves as a signpost telling you what direction to go from there.

Let’s continue with our equation [latex]y^{\prime} = 3x + 2y - 4[/latex]. Suppose a solution to this differential equation passes through point [latex](0, 1)[/latex]. The slope of the solution at that point is:

[latex]y^{\prime} = 3(0) + 2(1) - 4 = -2[/latex]

Now let [latex]x[/latex] increase slightly to [latex]x = 0.1[/latex]. Using linear approximation:

[latex]L(x) = y_0 + f'(x_0)(x - x_0) = 1 + (-2)(x - 0) = 1 - 2x[/latex]

Substituting [latex]x = 0.1[/latex] gives an approximate [latex]y[/latex] value of [latex]0.8[/latex].

At this new point, the slope changes according to the differential equation. You can keep progressing, recalculating the slope as you take small steps to the right, and watch how the solution behaves. Figure 3 shows the solution passing through point [latex](0, 1)[/latex].

A graph of the direction field for the differential equation y’ = 3 x + 2 y – 4 in all four quadrants. In quadrants two and three, the arrows point down and slightly to the right. On a diagonal line, roughly y = -x + 2, the arrows point further and further to the right, curve, and then point up above that line. The solution passing through the point (0, 1) is shown. It curves down through (-5, 10), (0, 2), (1, 0), and (3, -10).
Figure 3. Direction field for the differential equation [latex]y^{\prime} =3x+2y - 4[/latex] with the solution passing through the point [latex]\left(0,1\right)[/latex].

This curve is the graph of the solution to the initial-value problem:

[latex]y^{\prime} = 3x + 2y - 4, \quad y(0) = 1[/latex]

This curve is called a solution curve passing through the point [latex](0, 1)[/latex]. The exact solution to this initial-value problem is:

[latex]y = -\frac{3}{2}x + \frac{5}{4} - \frac{1}{4}e^{2x}[/latex]

The graph of this exact solution is identical to the curve in Figure 3.

Create a direction field for the differential equation [latex]y^{\prime} ={x}^{2}-{y}^{2}[/latex] and sketch a solution curve passing through the point [latex]\left(-1,2\right)[/latex].

Watch the following videos to see the worked solution to the above example.

You can view the transcript for “4.2.1” here (opens in new window).

You can view the transcript for “4.2.2” here (opens in new window).