P1 5.2 - Finding a curve from its gradient

P1 5.2 - Finding a curve from its gradient

Recover a curve's equation from its gradient function and one known point. First integrate to find a family of curves, then determine the constant and check that the final equation satisfies both pieces of information.

General antiderivative

If you know the tangent gradient everywhere, do you know the curve's exact position? You know its changes in height, but a vertical shift leaves every tangent gradient unchanged. A point on the curve supplies the missing height information.

When the information is dy/dx=2x\mathrm{d}y/\mathrm{d}x=2x, integrating gives y=x2+Cy=x^2+C. This is already an equation for a family of curves; it is not yet one particular curve.

General equation from a gradient

Given dy/dx=g(x)\mathrm{d}y/\mathrm{d}x=g(x), integrate g(x)g(x) to find

y=∫g(x) dx=G(x)+C,y=\int g(x)\,\mathrm{d}x=G(x)+C,

where G′(x)=g(x)G'(x)=g(x). The constant is determined only when extra information, such as a point on the curve, is supplied.

The same idea can be written as “given f′(x)f'(x), find f(x)f(x)”. Keep track of which function was supplied: integrating the gradient finds the curve; differentiating it instead would find the second derivative.

Worked example 1: a family of curves

Question. A curve has dy/dx=4x3−6x+2\mathrm{d}y/\mathrm{d}x=4x^3-6x+2. Find its general equation.

Plan. Integrate each gradient term and retain one arbitrary constant.

y=∫(4x3−6x+2) dx=44x4−62x2+2x+C=x4−3x2+2x+C\begin{aligned} y&=\int(4x^3-6x+2)\,\mathrm{d}x\\ &=\frac44x^4-\frac62x^2+2x+C\\ &=x^4-3x^2+2x+C \end{aligned}

Answer. y=x4−3x2+2x+Cy=x^4-3x^2+2x+C.

Check. Differentiating the result gives 4x3−6x+24x^3-6x+2, for every value of CC.

Change only the constant term in the gradient, from 22 to 55. It becomes a different linear term in the curve, not part of the arbitrary constant.

Worked example 2: a constant gradient term

Question. A curve has dy/dx=4x3−6x+5\mathrm{d}y/\mathrm{d}x=4x^3-6x+5. Find its general equation.

Plan. Integrate the same powers and integrate the constant gradient term as 5x5x.

y=∫(4x3−6x+5) dx=x4−3x2+5x+C\begin{aligned} y&=\int(4x^3-6x+5)\,\mathrm{d}x\\ &=x^4-3x^2+5x+C \end{aligned}

Answer. y=x4−3x2+5x+Cy=x^4-3x^2+5x+C.

Check. Differentiating gives 4x3−6x+54x^3-6x+5. An answer with +5+5 instead of +5x+5x would lose that gradient term.

A fixed numerical term in the gradient and the arbitrary constant in the curve play different roles.

Watch out

If dy/dx\mathrm{d}y/\mathrm{d}x contains +5+5, its integral contains +5x+5x. The separate +C+C is needed because its derivative is zero. You cannot merge 5x5x into CC: it varies with xx.

Find the whole family before using any point information.

Using a point to find the constant

A point on the curve tells you which member of the integrated family to choose.

Suppose integration gives y=x2+Cy=x^2+C, and the curve passes through (2,7)(2,7). Substituting both coordinates gives 7=4+C7=4+C, so C=3C=3. Substitute into the equation for yy, because a point specifies a height. Using only the derivative would not include CC.

Problem-solving

Integrate, include CC, substitute the given pair (x,y)(x,y), solve for CC, then write the final curve equation with that value in place.

Start with a polynomial gradient and a point whose input is 11.

Worked example 3: choose one curve

Question. A curve has dy/dx=6x2−4x+1\mathrm{d}y/\mathrm{d}x=6x^2-4x+1 and passes through (1,5)(1,5). Find an equation of the curve.

Plan. Integrate the gradient, then substitute x=1x=1 and y=5y=5 to determine CC.

y=2x3−2x2+x+Cintegrate5=2(1)3−2(1)2+1+Cuse the point5=1+CC=4\begin{aligned} y&=2x^3-2x^2+x+C &&\text{integrate}\\ 5&=2(1)^3-2(1)^2+1+C &&\text{use the point}\\ 5&=1+C\\ C&=4 \end{aligned}

Answer. y=2x3−2x2+x+4y=2x^3-2x^2+x+4.

Check. Differentiating gives 6x2−4x+16x^2-4x+1. At x=1x=1, the curve gives 2−2+1+4=52-2+1+4=5, so it passes through the point too.

Change only the point's height from 55 to −2-2. The integration step is unchanged; only the chosen constant changes.

Worked example 4: the same gradient, a different height

Question. A curve has dy/dx=6x2−4x+1\mathrm{d}y/\mathrm{d}x=6x^2-4x+1 and passes through (1,−2)(1,-2). Find an equation of the curve.

Plan. Use the same general antiderivative and impose the new point.

y=2x3−2x2+x+C−2=2−2+1+CC=−3\begin{aligned} y&=2x^3-2x^2+x+C\\ -2&=2-2+1+C\\ C&=-3 \end{aligned}

Answer. y=2x3−2x2+x−3y=2x^3-2x^2+x-3.

Check. The derivative is still 6x2−4x+16x^2-4x+1, while at x=1x=1 the height is 2−2+1−3=−22-2+1-3=-2. This curve lies 77 units below the previous one at every input.

The point provides the missing absolute height. This answers the opening question: gradients alone determine a family, and one point selects a member of that family on the interval considered.

Watch out

Do not stop at C=−3C=-3 when asked for the curve. Write y=2x3−2x2+x−3y=2x^3-2x^2+x-3. Also, keep CC until the point has determined it; assuming C=0C=0 would generally choose the wrong curve.

The constant may be zero, positive or negative; let the supplied point determine it.

Checking the recovered equation

A recovered equation must pass two separate checks: its derivative must be the supplied gradient, and the given point must lie on it.

The derivative check tests the variable terms, but cannot detect a wrong added constant. The point check tests the height at one input, but alone cannot establish the gradient function everywhere. Using both catches errors that either check can miss.

Key idea

Differentiate to check the gradient; substitute the given point to check the constant. If only the point check fails, adjust the constant. If the derivative check fails, changing the constant cannot repair the variable terms.

First test an equation that satisfies both conditions.

Worked example 5: verify both conditions

Question. A curve has gradient function 3x2−23x^2-2 and passes through (2,3)(2,3). Check whether y=x3−2x−1y=x^3-2x-1 is its equation.

Plan. Differentiate the proposed equation, then evaluate it at x=2x=2.

ddx(x3−2x−1)=3x2−2y(2)=8−4−1=3\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}x}(x^3-2x-1)&=3x^2-2\\ y(2)&=8-4-1=3 \end{aligned}

Answer. Yes. It has the required gradient function and passes through (2,3)(2,3).

Check. Direct integration gives y=x3−2x+Cy=x^3-2x+C, and the point gives 3=4+C3=4+C, so C=−1C=-1, confirming the candidate.

Change only the candidate's constant from −1-1 to +1+1. The derivative check will be identical, so the point check becomes decisive.

Worked example 6: detect a wrong constant

Question. A curve has gradient function 3x2−23x^2-2 and passes through (2,3)(2,3). Check whether y=x3−2x+1y=x^3-2x+1 is its equation, and correct it if necessary.

Plan. Test both conditions; if only the height is wrong, solve for the constant.

ddx(x3−2x+1)=3x2−2gradient is correcty(2)=8−4+1=5point is wrong3=8−4+Cimpose the required pointC=−1\begin{aligned} \frac{\mathrm{d}}{\mathrm{d}x}(x^3-2x+1)&=3x^2-2 &&\text{gradient is correct}\\ y(2)&=8-4+1=5 &&\text{point is wrong}\\ 3&=8-4+C &&\text{impose the required point}\\ C&=-1 \end{aligned}

Answer. The proposed equation is wrong. The correct equation is y=x3−2x−1y=x^3-2x-1.

Check. The original candidate was 22 units too high at x=2x=2. Subtracting 22 changes +1+1 to −1-1 and leaves its derivative unchanged.

By contrast, a candidate such as y=2x3−2x−1y=2x^3-2x-1 has derivative 6x2−26x^2-2. No choice of added constant could turn that into 3x2−23x^2-2.

Watch out

Matching a derivative is necessary but is not enough when a point is supplied. A final answer can have every variable term correct and still be the wrong curve because of its constant.

Test and, if needed, repair a new candidate using both conditions.

Quick Recap

  • Integrating a gradient gives a general equation containing CC.
  • Substitute both coordinates of a point into the integrated equation to find CC.
  • State the final curve equation after replacing CC by its value.
  • Check both the derivative and the supplied point: a derivative cannot reveal a wrong added constant.