Skip to content
Tutorials Center
My learning

Topics

Lesson 65 of 68 ยท Practice and Review

Common Mistakes in Calculus and How to Avoid Them

The calculus errors that cost the most marks and the most bugs: dropped constants, chain rule slips, domain errors and unit errors, with sympy and numeric checks.

Most calculus mistakes are not deep misunderstandings. They are small slips, such as a forgotten + C, a missing factor from the chain rule, a sign dropped in integration by parts, or degrees fed into a function that expects radians. The frustrating part is that the answer looks reasonable, so nobody notices until a bridge deflection, a loss curve or an exam mark comes out wrong.

This lesson collects the errors that occur most often and, for each, gives you a check that takes seconds. The theme is that you almost never need to trust your algebra blindly. You can differentiate an antiderivative, test a formula at a point, or compare against a numerical estimate. Make those checks automatic.

flowchart TD
    A["You have an answer"] --> B{"Can you<br/>differentiate it<br/>or substitute back?"}
    B -- yes --> C["Do it:<br/>derivative of antiderivative<br/>= integrand"]
    B -- no --> D["Test one number<br/>against a numeric estimate"]
    C --> E{"Limiting cases<br/>and units sensible?"}
    D --> E
    E -- yes --> F["Trust it"]
    E -- no --> G["Find the slip"]

A three-step routine: verify exactly if you can, numerically if you cannot, then test limits and units.

Mistake 1: slips in the derivative rules

The chain rule. The derivative of a composite function needs the derivative of the inside as well. d/dx sin(x**2) is 2x*cos(x**2), not cos(x**2). d/dx exp(3x) is 3*exp(3x). If you can see a function inside another function, you owe one extra factor. The full rule is in The Chain Rule.

The product rule. d/dx (x*sin x) is sin x + x*cos x. The derivative of a product is not the product of the derivatives. Writing cos x there is the most common error of all.

The quotient rule. A fraction u/v has derivative (u'v - uv') / v**2. The numerator is not symmetric: swap the order and the sign flips.

A reliable test is to check the claimed derivative against sympy. The helper below subtracts your claim from the true derivative and asks whether the difference simplifies to zero.

Python A checker for derivatives and antiderivatives

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Every wrong claim prints False and every correct one prints True. Notice the last two lines: the sign of the log of cosine is exactly the sort of detail that is easy to get wrong in a hurry and impossible to hide from a check.

The same checker works in the other direction for integrals, and this is the single most useful habit in this lesson: to check an antiderivative, differentiate it. If the result is the original integrand, the antiderivative is right, no matter how it was found. For the cos(2x) example, the wrong answer sin(2x) fails because differentiating it gives 2*cos(2x). The substitution u = 2x needs the factor 1/2 from du = 2 dx.

Mistake 2: dropped constants and forgotten conditions

The constant of integration. integral of 2x dx is x**2 + C, and the C is not decoration. Without it you cannot meet an initial condition, and you silently lose the whole family of solutions. For an ODE like y' = 2x with y(1) = 5, the C is what lets you solve for the right member of the family.

Definite versus indefinite. A definite integral has no C: the constants cancel when you subtract the antiderivative at the two limits. Adding C to a definite integral is harmless but a sign that the two ideas are muddled.

Domain errors. Functions only exist on a domain, and algebra that ignores it produces nonsense:

  • sqrt(x**2) is |x|, not x. Its derivative at x = -3 is -1, not +1.
  • ln(x - 2) needs x > 2. sqrt(4 - x**2) needs -2 <= x <= 2.
  • Squaring both sides of an equation can introduce extraneous solutions. Solving sqrt(x + 6) = x by squaring gives x = -2 and x = 3, but x = -2 fails in the original equation because a square root is never negative.
  • 1/x**2 has an antiderivative -1/x, but you cannot apply the Fundamental Theorem across x = 0, where the function blows up. Plugging in the limits gives -1/1 - (-1/(-1)) = -2, and a negative area for a function that is always positive. The real answer is that the integral diverges (see Improper Integrals and Convergence).
Python The constant of integration and the domain

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Read the output from top to bottom. With the condition y(1) = 5 the constant is C = 4. The naive evaluation gives -2, while sympy reports oo (the integral is infinite), and the limit at zero explains why. The squared equation has two roots [-2, 3], but only x = 3 survives in the original equation, which is what solve returns directly.

Whenever you divide by something, cancel a factor, square both sides, take a square root or a logarithm, write down what you assumed about the sign or the zero. That one line of bookkeeping eliminates most domain errors.

Mistake 3: unit and angle errors

Radians versus degrees. The derivative of sin x is cos x only when x is in radians. If you measure angles in degrees, d/dx sin(x degrees) is (pi/180)*cos(x degrees), about 0.01745 at zero, not 1. The same holds for the small-angle approximation sin(x) ~ x: it needs radians. Five degrees is 0.0873 radians, and sin(0.0873) = 0.0872, a fine match, while treating the "5" as radians would claim sin(5) ~ 5, though sin(5) = -0.9589.

Mixed units. An integral multiplies the integrand's unit by the variable's unit. Speed in metres per second integrated over seconds gives metres. Speed in kilometres per hour integrated over seconds gives a number with no sensible unit: here the "distance" 540 is meaningless, a factor 3.6 and a unit conversion away from the correct 150 m. Convert first, integrate second.

Dimension check. Every term added together must have the same units, and an exponent or the argument of sin or ln must be dimensionless. exp(-R*x/L) is fine only if R*x/L has no units. If a formula fails this test, it is wrong, even before you plug in a number.

Python Units: degrees, radians and dimensions

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The first two lines show the effect cleanly: the derivative of sine is 1.0 in radians but only 0.017453 in degrees. In code, trigonometric functions in numpy, scipy, sympy and almost every language use radians. Convert once at the boundary, with np.radians, and stay in radians inside.

Mistake 4: algebra and bookkeeping slips

These are not calculus errors, but calculus exposes them:

  • (a + b)**2 is not a**2 + b**2, and sqrt(a + b) is not sqrt(a) + sqrt(b). See The Algebra Toolkit for Calculus.
  • A limit that gives 0/0 is not 0 and not 1: it is indeterminate, and needs factoring, a conjugate or L'Hopital's rule (see Limit Laws and Tricks).
  • In integration by parts, u dv = uv - v du: the minus sign is the one that gets lost. Substitution forgets to change the limits of a definite integral, or forgets du.
  • In optimisation, the derivative being zero only gives candidates. Check the endpoints and the second derivative: a critical point can be a maximum, a minimum or neither.
  • Rounding too early. Carry full precision through the calculation and round only the final answer.

A sanity-check toolkit

You can build a three-tool kit that catches nearly everything above.

  1. Differentiate your antiderivative (exact check, via sympy or by hand).
  2. Compare with numerics at a test point. Estimate a derivative with a central difference at one number, or an integral with scipy.integrate.quad, and compare with your formula. The answer should agree to many digits when the formula is right and miss by an obvious amount when it is wrong.
  3. Test limiting cases and special values. Does the formula give 1 at x = 0? Does it reduce to the right thing when a parameter goes to zero? Does the sign make physical sense? And do the units match?

The code below wraps the first two into one helper and applies the third to a decaying exponential.

Python Sanity checks that catch most errors

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The right answers match to about ten digits (0.14897559114 against 0.14897559114 for the derivative, 0.092098997012 for the integral). The wrong ones miss visibly: 0.4966 instead of 0.1490, and 2.6315 instead of 0.0921. A single test number was enough to expose both errors, and the sign slip in integration by parts would be invisible to a quick glance at the algebra.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What is the derivative of sin(x^2)?

    The chain rule needs the derivative of the inner function x^2, which is 2x, multiplied by the derivative of sine at the inner value.
  2. 2. What is the quickest reliable way to check an antiderivative you found?

    Differentiation undoes integration, so d/dx of a correct antiderivative equals the integrand exactly.
  3. 3. Why is it wrong to evaluate the integral of 1/x^2 from -1 to 1 with the antiderivative -1/x?

    The theorem requires a continuous integrand on the interval. Naive substitution gives -2, a negative number for a positive function, which is a red flag.
  4. 4. A signal is sin(x), where x is in degrees. What is its derivative with respect to x at x = 0?

    Writing sin(x degrees) as sin(pi x / 180), the chain rule contributes the factor pi/180. The simple rule d/dx sin x = cos x holds only in radians.
  5. 5. Solving sqrt(x + 6) = x by squaring gives x = -2 or x = 3. Which statement is correct?

    Squaring both sides can add solutions. Substituting back shows sqrt(4) = 2, which is not -2.

Summary

  • Most errors are slips: missing chain-rule factors, product-rule shortcuts, lost signs, forgotten + C.
  • Check an antiderivative by differentiating it; check a derivative with a central difference at one number.
  • Track domains: sqrt(x**2) = |x|, logs need positive arguments, squaring can add false solutions, and singularities block the Fundamental Theorem.
  • Angles must be in radians for d/dx sin x = cos x; convert units before integrating.
  • Test limiting cases and special values; a formula that fails them is wrong however neat it looks.
  • Keep full precision until the final answer.

Next: Practice Exercises with Solutions.