Apply the initial condition
One point picks one curve
The equation \(\frac{dy}{dx} = 3x^2 - 3\) has the general solution \(y = x^3 - 3x + C\), and each value of \(C\) gives one curve. The top graph shows the slope \(3x^2 - 3\), and the lower graph shows the curves.
An initial condition names a point that the solution must pass through. Here \(y(2) = 5\) means that \(y = 5\) when \(x = 2\), and the ring marks the point \((2, 5)\).
Drag the slider for \(C\). The red segment joins the teal curve to the point at \(x = 2\), and it closes when the curve reaches the point.
At \(x = 2\), the curve has height \(2^3 - 3\cdot2 + C = 2 + C\). This height must be 5, so \(C = 3\), and only one curve passes through the point.
The gap fixes the constant
Let the general solution be \(y = F(x) + C\) and let the initial condition be \(y(x_0) = y_0\). The ring marks the point \((x_0, y_0)\).
At the input \(x_0\), the teal curve has height \(F(x_0) + C\), and the red segment is the gap between this height and \(y_0\). The orange bracket shows \(C\), the shift from the faint curve with \(C = 0\) to the teal curve.
Drag the slider for C. Two curves of the family differ by the same constant at every input, so they never cross, and only one passes through the point.
The gap closes when \(F(x_0) + C = y_0\), so the constant is the height of the point minus the height \(F(x_0)\) of the curve with \(C = 0\). Move the point up or down, and a different curve of the family passes through it.
Notation
Write the initial condition as \(y(x_0) = y_0\). The input is \(x_0\) and the output is \(y_0\).
\[y(x_0) = y_0\]Substitute the input \(x_0\) for \(x\) and the output \(y_0\) for \(y\) in the general solution. The equation then has one unknown, \(C\).
\[y_0 = F(x_0) + C\]Use both numbers. The input alone or the output alone does not fix \(C\).
Solve for \(C\).
\[C = y_0 - F(x_0)\]Write this value in the general solution. The result is the particular solution, the one curve that satisfies the equation and the initial condition.
\[y = F(x) + y_0 - F(x_0)\]
When it fails
One constant can fix only one condition. The curve with \(C = 3\) has height 3 at \(x = 0\), but the second point is at height 1. The red segment shows a gap of 2.
No other value of C helps, because it would move the curve away from the first point. A first-order equation has one constant, so it takes one initial condition.
Example 1: A logarithm
Find the solution of \(\dfrac{dy}{dx} = \dfrac{2}{x}\) with \(y(e) = 5\), for \(x > 0\).
Integrate the slope. The function \(\frac2x\) has the antiderivative \(2\ln x\) for \(x > 0\).
\[y = 2\ln x + C\]Substitute the input \(x = e\) and the output \(y = 5\).
\[5 = 2\ln e + C\]Because \(\ln e = 1\), this is \(5 = 2 + C\). Solve for \(C\).
\[C = 5 - 2 = 3\]Write the value of \(C\) in the general solution. As a check, \(y(e) = 2\cdot1 + 3 = 5\).
\[y = 2\ln x + 3\]
Example 2: A factor of sine
Find the solution of \(\dfrac{dy}{dx} = y\sin x\) with \(y(0) = 4\).
Separate and integrate. Then \(\int\frac{dy}{y} = \int\sin x\,dx\) gives \(\ln|y| = -\cos x + C\), so the general solution is \(y = Ae^{-\cos x}\) with \(A = \pm e^C\).
\[y = Ae^{-\cos x}\]A tempting wrong move: The condition gives \(y = 4\), so \(A = 4\).
\[A = 4\]With \(A = 4\), the height at \(x = 0\) is \(4e^{-\cos 0} = 4e^{-1} \approx 1.47\), far below the point \((0, 4)\). This step used the output 4 but not the input 0.
Substitute the input \(x = 0\) as well as the output \(y = 4\). Because \(\cos 0 = 1\), the right side is \(Ae^{-1}\).
\[4 = Ae^{-\cos 0} = Ae^{-1}\]Multiply both sides by \(e\) to solve for \(A\).
\[A = 4e\]Write the particular solution, and combine the powers of \(e\). As a check, \(y(0) = 4e^{0} = 4\).
\[y = 4e\cdot e^{-\cos x} = 4e^{1 - \cos x}\]
Practice
Find the solution of \(\dfrac{dy}{dt} = 6t^2 - 4t\) with \(y(2) = 10\).
Drag \(C\) until the red segment at \(t = 2\) closes. The constant is the height 10 of the point minus the height of the curve with \(C = 0\) at \(t = 2\).
Solution
Integrate the slope.
\[y = 2t^3 - 2t^2 + C\]Substitute the input \(t = 2\) and the output \(y = 10\).
\[10 = 2\cdot8 - 2\cdot4 + C = 8 + C\]Solve for \(C\) and write the particular solution.
\[C = 2, \qquad y = 2t^3 - 2t^2 + 2\]
Questions
Questions 1 and 2 use the curves \(y = \frac{x^2}{2} - x + C\), the solutions of \(\frac{dy}{dx} = x - 1\). The top graph shows the slope \(x - 1\).
The point is \((2, 3)\). Which value of \(C\) puts the curve through it?
- \(C = 3\)
- \(C = 5\)
- \(C = 1\)
- \(C = 2\)
Answer
\(C = 3\)
A second condition \(y(0) = 1\) is also given. Can one curve of the family pass through both \((2, 3)\) and \((0, 1)\)?
- No. The curve through \((0, 1)\) has \(C = 1\), so its height at \(x = 2\) is 1, not 3.
- Yes, because the family has infinitely many curves.
- Yes, with \(C = 2\), halfway between 1 and 3.
Answer
No. The curve through \((0, 1)\) has \(C = 1\), so its height at \(x = 2\) is 1, not 3.
The general solution of \(\frac{dy}{dt} = 6e^{2t}\) is \(y = 3e^{2t} + C\). With \(y(0) = 5\), what is \(C\)?
- 2
- 5
- 8
- \(-2\)
Answer
2
Summary
You substitute the initial input and output into the general solution, solve for the constant, and write the particular solution.
This works because the curves of the family never cross, so one value of the constant puts one curve through the starting point.
Use it when an initial condition comes with a general solution that has one constant.
This is one of four skills in topic 7.7 of Which & Why: AP Calculus.