6.2: The Differential Equation y = f'(x)
- Page ID
- 212056
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\ket}[1]{\left| #1 \right>}\)
\(\newcommand{\bra}[1]{\left< #1 \right|}\)
\(\newcommand{\braket}[2]{\left< #1 \vphantom{#2} \right| \left. #2 \vphantom{#1} \right>}\)
\(\newcommand{\braopket}[3]{\left< #1 \vphantom{#2}\vphantom{#3} \right| #2 \vphantom{#1}\vphantom{#3} \left| #3 \vphantom{#1}\vphantom{#2} \right>}\)
\(\newcommand{\qmvec}[1]{\mathbf{\vec{#1}}}\)
\(\newcommand{\op}[1]{\hat{\mathbf{#1}}}\)
\(\newcommand{\expect}[1]{\langle #1 \rangle}\)
\(\newcommand{\dfn}[1]{\emph{\textbf{#1}}}\)
This section introduces some basic concepts and vocabulary of the study of ODEs as they apply to the familiar problem, \(y' = f(x)\): the notion of a general solution of an ODE, the (possibly unique) solution to an IVP and the direction field of an ODE. We’ll use these concepts in later sections as we examine more complicated differential equations and their applications.
Solving \(y' = f(x)\)
The solution of the ODE \(y' = f(x)\) is the collection of all antiderivatives of \(f\): \(\displaystyle y = \int f(x)\, dx\). (This is due to Corollary 2 to the Mean Value Theorem in Section 3.2.) If \(y = F(x)\) is one antiderivative of \(f\), then we have essentially found all antiderivatives of \(f\) because any antiderivative of \(f\) has the form \(F(x) + C\), for some value of the constant \(C\). If \(F\) is one particular antiderivative of \(f\), the collection of functions \(F(x) +C\) is called the general solution of \(y' = f(x)\). The general solution consists of a one-parameter family of functions (the parameter here is \(C\)).

Find the general solution of the ODE \(y' = 2x + e^{3x}\).
Solution
\(\displaystyle y = \int\left[2x + e^{3x}\right]\, dx = x^2 + \frac13 e^{3x} + C\).
Find general solutions for \(\displaystyle y' = x + \frac{3}{x+2}\) and \(\displaystyle y' = \frac{6}{x^2 + 1}\).
- Answer
-
\(\displaystyle y ' = x + \frac{3}{x + 2} \ \Rightarrow \ y = \int \left[x + \frac{3}{x + 2}\right]\, dx = \frac12 x^2 +3\ln\left(\left|x+2\right|\right) + C\)
\(\displaystyle y' = \frac{6}{x^2+1} \ \Rightarrow \ y = \int \frac{6}{x^2+1}\, dx = 6\arctan(x) +C\)
Direction Fields
Geometrically, a derivative tells us the slope of the tangent line to a curve, so we can interpret the ODE \(y' = f(x)\) as a geometric condition: at each point \((a,b)\) on the graph of the solution function \(y\), the slope of the tangent line is \(f(a)\). The ODE \(y' = 2x\) says that at each point \((a,b)\) on the graph of \(y\), the slope of the line tangent to the graph is \(2a\): if the point \((5,3)\) is on the graph of \(y\), then the slope of the tangent line there is \(2\cdot 5 = 10\). We can present this information graphically as a direction field: a collection of short line segments through some sample points in the plane so that the slope of the segment through \((a,b)\) is \(f(a)\). A direction field for \(y' = 2x\) appears below:

At a point \((a,b)\), the slope is \(2a\). What are the solutions to \(y' =3x^2\)? To \(y' = \cos(x)\)? Can you “see” those solution curves in the direction fields?
Direction fields for \(y' = 3x^2\) and \(y' = \cos(x)\) appear below:

For any ODE of the form \(y' = f(x)\), the values of \(y'\) depend only on \(x\), so along any vertical line (where \(x\) is fixed) all the small line segments have the same \(y'\), hence the same slope, and they are parallel:

If \(y'\) depends on both \(x\) and \(y\), then the slopes of the line segments will depend on both \(x\) and \(y\), and the slopes of the small line segments along a vertical line are not all the same. The figure below shows a direction field for \(y' = x - y\), where \(y'\) is a function of both \(x\) and \(y\):

A direction field of an ODE \(y'= g(x,y)\) is a collection of short line segments with slope \(g(a,b)\) at the point \((a, b)\).
Construct direction fields for:
- \(y'= x + 1\) and
- \(y' = x + y\)
by sketching a short line segment with slope \(y'\) at each point \((a, b)\) with integer coordinates from \(-3\) to \(3\).
- Answer
-
- If \(y'= x + 1\) then the table below lists values of \(y'\) for integer values of \(x\) and \(y\) from \(-3\) to \(3\) (notice that \(y'\) does not depend on the value of \(y\)):
The figure below shows the direction field:described above \(x = -3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(y = 3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(2\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(1\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(0\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(-1\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(-2\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(-3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\)

- If \(y' = x + y\) then the table below lists values of \(y'\) for integer values of \(x\) and \(y\) from \(-3\) to \(3\) (notice that \(y'\) here {\em does} depend on both \(x\) and \(y\)):
The figure below shows the direction field:\(x = -3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(y = 3\) \(0\) \(1\) \(2\) \(3\) \(4\) \(5\) \(6\) \(2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(5\) \(1\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(4\) \(0\) \(-3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(3\) \(-1\) \(-4\) \(-3\) \(-2\) \(-1\) \(0\) \(1\) \(2\) \(-2\) \(-5\) \(-4\) \(-3\) \(-2\) \(-1\) \(0\) \(1\) \(-3\) \(-6\) \(-5\) \(-4\) \(-3\) \(-2\) \(-1\) \(0\)

- If \(y'= x + 1\) then the table below lists values of \(y'\) for integer values of \(x\) and \(y\) from \(-3\) to \(3\) (notice that \(y'\) does not depend on the value of \(y\)):
As you discovered in the previous Practice problem, direction fields are usually tedious to plot by hand, but computers (and some calculators) can plot them quickly. If you only have a graph of the function \(f\) in the differential equation \(y' = f(x)\), you can construct an approximate direction field using the information you have about \(f\) from its graph.
Construct a direction field for the differential equation \(y' = f(x)\) for the \(f\) given graphically below left:

Solution
If \(x = 0\) then \(y' = f(0) = 1\), so at every point on the vertical line where \(x = 0\) (the \(y\)-axis) the line segments of the direction field have slope \(y' = 1\) (above right). Similarly, if \(x = 1\) then \(y' = f(1) = 0\), so the line segments of the direction field have slope \(y' = 0\) at every point on the vertical line where \(x = 1\). The small line segments along any vertical line are parallel.
Construct a direction field for the differential equation \(y' = f(x)\) for the \(f\) given graphically below:

- Answer
-
An approximate direction field for the ODE \(y' = f(x)\) appears below:

(The function shown is \(f(x)\), not a solution to the ODE.)
Once you have a direction field for an ODE, you can sketch curves that have the appropriate tangent-line slopes so you can “see” the shapes of the solution curves even if you do not have formulas for them:

These shapes can be useful for estimating which initial conditions lead to straight-line solutions or periodic solutions or solutions with other properties, and they can help us understand the behavior of machines and organisms in applied problems.
Initial Value Problems
An initial condition \(y(x_0) = y_0\) specifies that the solution \(y\) of the differential equation should go through the point \(\left(x_0, y_0\right)\) in the plane. To solve a differential equation with an initial condition, you typically use integration to find the general solution (a family of solutions containing an arbitrary constant) and then you use algebra to find the one value for the constant so the solution satisfies the initial condition.
Solve the differential equation \(y' = 2x\) with the initial condition \(y(2) = 1\).
Solution
The general solution is \(\displaystyle y = \int 2x\, dx = x^2 + C\). Substituting \(x_0 = 2\) and \(y_0 = 1\) into the general solution: \(1 = (2)^2+C \Rightarrow C = -3\). So the solution we want is \(y = x^2 - 3\). (A quick check verifies that \(\left[x^2-3\right]' = 2x\) and \(2^2-3 = 1\).) The figure below shows a direction field for \(y' = 2x\) and the solution curve that goes through \((2,1)\), \(y = x^2 - 3\), along with the solution of the ODE that satisfies \(y(1) = - 1\):

If you toss a ball upward with an initial velocity of 100 feet per second, its height \(y\) (in feet) at time \(t\) (in seconds) satisfies the differential equation \(y' = 100 - 32t\). Sketch the direction field for \(y\) (for \(0 \leq t \leq 4\)) and then sketch the solution that satisfies the condition that the ball is \(200\) feet high after \(3\) seconds.
Solution
\(\displaystyle y = \int \left[100 - 32t\right]\, dt = 100t - 16t^2 + C\); if \(y(3)=200\):\[200 = 100(3) - 16(3)^2 + C \ \Rightarrow \ 200 = 156 + C \ \Rightarrow C = 44\nonumber\]The function we want is \(y = 100t - 16t^2 + 44\). The direction field and the solution satisfying \(y(3) = 200\) appear below:

Find the solution of \(y' = 9x^2 - 6\sin(2x) + e^x\) that goes through the point \((0,6)\).
- Answer
-
\(\displaystyle y = \int \left[ 9x^2 - 6\sin\left( 2x \right) + e^x\right]\, dx = 3x^3 + 3\cos\left(2x\right) + e^x + C\) so:\[6 = y(0) = 3\cdot 0^3 + 3\cos(2\cdot 0) + e^0 + C = 0 + 3 + 1 + C \ \Rightarrow \ C = 2\nonumber\]and therefore \(\displaystyle y = 3x^3 + 3\cos\left(2x\right) + e^x + 2\).
Sketch the three solutions of the ODE \(y' = x - y\) that satisfy the initial conditions \(y(0) = 2\), \(y(0) = -1\) and \(y(1) = -2\).
Solution

Existence and Uniqueness
When solving IVPs, three questions often present themselves:
- Does a solution to the IVP exist?
- Is that solution unique?
- On what interval(s) is that solution valid?
We typically hope the answer the first two questions is “yes,” but (as we will see in the next section) that will not always be true. (Surprisingly, for reasonably “nice” IVPs, we will eventually be able to answer these questions without actually finding the solution.)
For IVPs of the form \(y' = f(x)\), \(y(x_0) = y_0\), where \(f(x)\) is continuous on some interval \((a,b)\) with \(a < x_0 < b\), the answer to the first two questions is “yes” and the answer to third question is “on the interval \((a, b)\), and possibly on some larger interval.” In this situation, define:\[y(x) = y_0 + \int_{x_0}^x f(t)\, dt\nonumber\]The Fundamental Theorem of Calculus tells us that \(y'(x) = f(x)\), so this \(y(x)\) solves the ODE, and:\[y(x_0) = y_0 + \int_{x_0}^{x_0} f(t)\, dt = y_0 + 0 = y_0\nonumber\]so it also satisfies the initial value condition. If \(\tilde{y}(x)\) is any other solution to the IVP, then \(\tilde{y}'(x) = f(x) = y'(x)\) so \(\tilde{y}(x) = y(x) + C\), but we also know that \(\tilde{y}(x_0) = y_0 = y(x_0)\):\[\tilde{y}(x_0) = y(x_0) + C \ \Rightarrow \ y_0 = y_0 + C \ \Rightarrow \ C = 0 \ \Rightarrow \tilde{y}(x) = y(x)\nonumber\]which tells us that \(y(x)\) is the only solution. Finally, \(f(x)\) is continuous on \((a,b)\), hence integrable on \((a,b)\), so the integral definition of \(y(x)\) is defined (and solves the IVP) on \((a,b)\).
Problems
In Problems 1–6, use the given direction field to sketch the solutions of the underlying ODE that satisfy the given initial conditions.
- See figure below; \(y(0) = 1\), \(y(1) = -2\) and \(y(1) = 3\).

- See figure above; \(y(0) = 2\), \(y(1) = -1\) and \(y(1) = -2\).
- See figure below; \(y(-2) = 1\), \(y(0) = 1\) and \(y(2) = 1\)

- See figure above; \(y(-2) = -1\), \(y(0) = -1\), \(y(2) = -1\).
- See figure below; \(y(0) = -2\), \(y(0) = 0\) and \(y(0) = 2\).

- See figure above; \(y(2) = -2\), \(y(2) = 0\) and \(y(2) = 2\).
- How do the three solutions in Problem 5 behave for large values of \(x\)?
- How do the three solutions in Problem 6 behave for large values of \(x\)?
In Problems 9–14:
- sketch a direction field for the given ODE and
- without solving the ODE, sketch solutions that go through the points \((0,1)\) and \((2,0)\).
- \(y' = 2x\)
- \(y' = 2 - x\)
- \(y' = 2 + \sin(x)\)
- \(y' = e^x\)
- \(y' = 2x + y\)
- \(y' = 2x - y\)
In Problems 15–20:
- find the family of functions that solve the given ODE,
- find the member of the family that satisfies the given IVP and
- report the interval on which the solution to the IVP is valid.
- \(y' = 2x - 3\), \(y(1) = 4\)
- \(y' = 1 - 2x\), \(y(2) = -3\)
- \(y' = e^x + \cos(x)\), \(y(0) = 7\)
- \(y' = \sin(2x) - \cos(x)\), \(y(0) = -5\)
- \(\displaystyle y' = \frac{6}{2x + 1} + \sqrt{x}\), \(y(1) = 4\)
- \(\displaystyle y' = \frac{e^x}{1 + e^x}\), \(y(0) = 0\)
Problems 21–22 concern a direction field (shown below) that comes from an ODE called the logistic equation, \(y' = y(1- y)\), used to model the growth of a population in an environment with renewable but limited resources.

(It is also used to describe the spread of a rumor or disease through a population.)
- Sketch the solution that satisfies the initial condition \(y(0) = 0.1\). What letter of the alphabet does this solution resemble?
- Sketch several solutions that have different initial values for \(y(0)\). What appears to happen to all of these solutions after a “long time” (for large values of \(x\))?
In Problems 23–24, the given figures show the direction of surface flow at different locations along a river. Sketch the paths small corks will follow if they are put into the river at the dots in each figure. (Because they indicate both the magnitude and the direction of flow, each diagram is called a vector field.) Notice that corks that start close to each other can drift far apart, and corks that start far apart can drift close together.
- See figure below.:

- See figure below.



