Differentiate a proposed solution
A candidate and its slope
A differential equation tells what slope a solution must have, and a candidate is a function that someone proposes as a solution. To test a candidate, you first find the slope it has.
The curve is the candidate \(y = x - 1 + 2e^{-x}\). Drag the slider to move the orange dot along it. The orange line is the tangent at the dot, and its slope is the derivative of the candidate.
At \(x = 0\), the dot is at height 1 and the slope is −1. At \(x = 1\), the height is \(2/e\) and the slope is \(1 - 2/e\), about 0.26.
You find the slope by differentiating the candidate with the usual rules. You do not find it from the equation.
How many derivatives
The candidate is now any function \(g\), and the orange tangent has slope \(g'(x)\), the derivative of \(g\). Press "Show g′" and drag the dot. The lower graph plots the slope of the tangent at each \(x\).
The equation tells you how many derivatives to take. If it contains \(dy/dx\), take one. If it contains \(y''\), take two, because the second derivative is the slope of the first.
Press "Show g″". The new orange line touches the lower graph at the dot, and its slope is \(g''(x)\). It shows how fast the slope of \(g\) changes.
Notation
Write the candidate as \(y = g(x)\).
\[g(x) = x - 1 + 2e^{-x}\]The equation names the derivative that you need: \(dy/dx\) for the first derivative, or \(y''\) for the second.
Differentiate the candidate with the usual rules, not from the equation. The lower graph plots this derivative.
\[\cy{g'(x)} = 1 - 2e^{-x}\]A letter that stands for a fixed number, such as \(C\), is a constant, so it stays as a factor when it multiplies a term. In the candidate above, the constant term \(-1\) has derivative 0, so it disappears.
\[\dfrac{d}{dx}\left(Ce^{2x}\right) = 2Ce^{2x}\]If the equation names \(y''\), differentiate the result once more. The orange line on the lower graph has this slope.
\[g''(x) = 2e^{-x}\]
When it fails
The candidate \(y = |x|\) has a corner at \(x = 0\). To the left of the corner the slope is −1, and to the right it is 1, so at the corner no tangent exists.
A solution needs a derivative at every point of its interval. This candidate can be a solution only on an interval that does not contain 0.
Example 1: a product
The equation is \(\dfrac{dy}{dx} - 2y = e^{2x}\). Find the derivative of the candidate \(y = (x + 1)e^{2x}\).
The equation names \(dy/dx\), so differentiate once.
The candidate is a product of \(x + 1\) and \(e^{2x}\), so use the product rule. By the chain rule, the derivative of \(e^{2x}\) is \(2e^{2x}\).
\[\dfrac{dy}{dx} = (1)\,e^{2x} + (x + 1)\,(2e^{2x})\]Factor out \(e^{2x}\).
\[\cy{\dfrac{dy}{dx}} = (2x + 3)\,e^{2x}\]At \(x = 0\), the slope is \(3e^0 = 3\), which matches the orange tangent.
Example 2: an exponent
The equation is \(\dfrac{dy}{dx} = -2xy\). Find the derivative of the candidate \(y = 4e^{-x^2}\).
The equation names \(dy/dx\), so differentiate once. The candidate is \(4e^{u}\) with the inner function \(u = -x^2\).
A tempting wrong move: The derivative of \(e^{u}\) is \(e^{u}\), so the derivative is the same as the candidate.
\[\dfrac{dy}{dx} = 4e^{-x^2}\]The curve has its peak at \(x = 0\), so the tangent is flat there and the slope is 0. The red dashed curve on the lower graph plots this claimed derivative, and it gives 4 at \(x = 0\). For \(x > 0\) the curve falls, but the claimed derivative stays positive.
Use the chain rule: multiply by the derivative of \(u\), which is \(-2x\).
\[\cy{\dfrac{dy}{dx}} = 4e^{-x^2}\,(-2x) = -8x\,e^{-x^2}\]At \(x = 0\), this gives 0, and the tangent at the peak is flat. At \(x = 1\), it gives \(-8/e\), about −2.9, and the tangent there falls.
Practice
The equation is \(x\,\dfrac{dy}{dx} = y + x\), for \(x > 0\). The candidate is \(y = x\ln x + Cx\), where \(C\) is a constant. Find \(\dfrac{dy}{dx}\).
Use the product rule on \(x\ln x\), and treat \(C\) as a constant. Then move the slider for \(C\): at \(x = 1\), your derivative must match the slope shown under the figure.
Solution
Differentiate the first term with the product rule.
\[\begin{aligned} \dfrac{d}{dx}\left(x\ln x\right) &= \ln x + x \cdot \dfrac{1}{x} \\ &= \ln x + 1 \end{aligned}\]The letter \(C\) is a constant, so \(Cx\) has derivative \(C\), as \(3x\) has derivative 3.
\[\dfrac{d}{dx}\left(Cx\right) = C\]Add the two derivatives. At \(x = 1\), \(\ln 1 = 0\), so the slope is \(1 + C\), as shown under the figure.
\[\cy{\dfrac{dy}{dx}} = \ln x + 1 + C\]
Questions
The graph shows the candidate \(g(x) = x^3 - 3x\). After you answer, an orange tangent appears with slope \(g'(x)\).
At which values of x is the derivative of the candidate equal to 0?
- \(x = -1\) and \(x = 1\)
- \(x = -\sqrt{3}\), 0 and \(\sqrt{3}\)
- \(x = 0\) only
Answer
\(x = -1\) and \(x = 1\)
What is the slope of the tangent at x = 0?
- −3
- 0
- 3
Answer
−3
The equation \(y'' = 9y\) names the second derivative. What is \(y''(0)\) for the candidate \(y = 2e^{3x}\)?
- 18
- 6
- 2
Answer
18
Summary
You read which derivative the equation names, then differentiate the candidate that many times with the usual rules, and C stays a constant.
This works because the slope of the tangent is the derivative of the candidate, whatever slope the equation asks for.
This is the first step in testing any proposed solution.
This is one of four skills in topic 7.2 of Which & Why: AP Calculus.