Skip to content
Tutorials Center
My learning

Topics

Lesson 67 of 68 ยท Practice and Review

Interview Questions

Practice calculus and engineering maths interview questions for engineering and data roles, with short answers and runnable sympy and numpy checks.

Interviewers rarely ask you to grind through a long integral. They ask short questions that test whether you understand what the symbols mean: why a derivative is a slope, why gradient descent works, what a Fourier transform tells you about a signal. The best answers are brief, correct and backed by an example.

This lesson collects questions in the style used for engineering, data-science and machine-learning roles. Each one has a compact model answer, and several have a runnable check so you can confirm a claim instead of memorizing it. Try to answer aloud before reading the answer. For worked problems with full solutions, see Practice Exercises with Solutions.

Limits, continuity and derivatives

What is a derivative, in one sentence? The derivative of f at x is the limit of the difference quotient (f(x+h) - f(x))/h as h goes to 0: the instantaneous rate of change, which is also the slope of the tangent line. See the derivative as a rate of change.

Can a function be continuous but not differentiable? Give an example. Yes. f(x) = |x| is continuous at 0 but has a corner there: the slope is -1 from the left and +1 from the right, so no single tangent exists. The reverse never happens: differentiable implies continuous.

What does 0/0 mean in a limit, and how do you handle it? It is an indeterminate form: it tells you nothing until you simplify. Factor and cancel, multiply by a conjugate, use a standard limit such as sin(x)/x -> 1, or apply L'Hopital's rule (differentiate numerator and denominator separately) when the conditions hold. See limit laws and tricks.

State the intermediate value theorem and one use of it. If f is continuous on [a, b] and y lies between f(a) and f(b), then some c in [a, b] has f(c) = y. It guarantees that bisection finds a root whenever f(a) and f(b) have opposite signs. See continuity.

How do you find and classify a maximum? Solve f'(x) = 0 (and check endpoints and points where f' does not exist). Then use the second derivative: f'' < 0 is a local maximum, f'' > 0 a local minimum, and f'' = 0 is inconclusive. For global extrema on a closed interval, compare all candidates.

Why does the chain rule matter for machine learning? A neural network is a composition of functions. Backpropagation is the chain rule applied layer by layer, reusing intermediate derivatives so the cost of the gradient is about the same as the cost of the forward pass. See the chain rule.

Python Check derivative and limit answers with sympy

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.

Integrals and the fundamental theorem

What does a definite integral mean? It is the limit of Riemann sums: the signed area between the curve and the x-axis, or more generally the accumulated change of a quantity from its rate. See the integral as accumulated change.

State the fundamental theorem of calculus. Part 1: if F(x) is the integral of f from a to x, then F'(x) = f(x). Part 2: if F is any antiderivative of f, then the integral of f from a to b equals F(b) - F(a). Differentiation and integration undo each other. See the fundamental theorem.

Why is there a "+ C" on an indefinite integral but not on a definite one? An antiderivative is only defined up to a constant, because constants vanish when you differentiate. In F(b) - F(a) the constant appears twice and cancels.

An integral has no elementary antiderivative. What do you do? Use numerical integration: the trapezoid or Simpson rule, or an adaptive routine such as scipy.integrate.quad. The Gaussian exp(-x**2) is the classic example; its integral over the whole line is sqrt(pi). See numerical integration and improper integrals.

What is the difference between convergence of a sequence and of a series? A sequence converges if its terms approach a limit. A series converges if its partial sums approach a limit. Terms going to zero is necessary for a series to converge but not sufficient: the harmonic series 1 + 1/2 + 1/3 + ... diverges.

Python Verify integral answers numerically

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.

Multivariable calculus

What does the gradient tell you? The gradient of f is the vector of partial derivatives. It points in the direction of steepest increase, its length is the rate of increase in that direction, and it is perpendicular to the level curves. Gradient descent steps along its negative. See gradient and directional derivatives.

How do you decide whether a critical point is a minimum, maximum or saddle? Compute the Hessian (the matrix of second partials) at the point. If all its eigenvalues are positive it is a minimum, all negative a maximum, and mixed signs a saddle. See optimization in several variables.

What do divergence and curl measure? Divergence is the net outflow per unit volume of a field (sources and sinks). Curl measures local rotation. A field with zero curl is conservative on a simply connected region, so line integrals depend only on endpoints. See vector calculus.

Why use polar coordinates for a double integral over a disc? The region becomes a rectangle in r and theta, and the area element becomes r dr dtheta. Forgetting that extra factor r is the most common error. See double and triple integrals.

Differential equations and transforms

What is the difference between an ODE and a PDE? An ODE has derivatives with respect to one variable (usually time); a PDE has partial derivatives with respect to several (for example time and position, as in the heat equation).

What do the roots of the characteristic equation tell you about a second-order system? Real distinct negative roots give an overdamped response, a repeated root is critical damping, and complex roots with negative real part give a decaying oscillation (underdamped). Any root with a positive real part means the solution grows without bound. See second-order linear ODEs.

Why is the explicit Euler method unstable for large steps? Each step multiplies the error by a factor that depends on h. For y' = -k y the factor is 1 - k h; if k h > 2 its magnitude exceeds 1 and errors grow instead of decaying. See solving ODEs numerically.

What is the Laplace transform good for? It turns constant-coefficient linear ODEs into algebra in the variable s, handles initial conditions automatically, and gives transfer functions whose poles describe stability. See the Laplace transform.

What does the Fourier transform tell you that the raw signal does not? Which frequencies are present and how strongly. A noisy time signal can have a clean, sparse spectrum. The FFT computes it in O(n log n) instead of O(n**2). See the Fourier transform and the FFT.

Python Euler stability and an FFT peak

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.

Numerical methods and data roles

Why is (1 - cos(x))/x**2 inaccurate for tiny x on a computer? Catastrophic cancellation: cos(x) is so close to 1 that subtracting leaves almost no correct digits. A stable rewrite is 2*sin(x/2)**2/x**2. See floating-point error and conditioning.

How does Newton's method work, and when does it fail? Replace the function by its tangent line and jump to where that line crosses zero: x_next = x - f(x)/f'(x). It converges quadratically near a simple root, but fails if f' is zero or tiny, if the start is far away, or if the iteration cycles. See linearization and Newton's method.

What is least squares in calculus terms? Choose parameters that minimise the sum of squared residuals. Setting the partial derivatives to zero gives the normal equations. See statistics, curve fitting and uncertainty.

How do you propagate measurement error through a formula? Use a first-order Taylor expansion: the uncertainty of f(x, y) is roughly sqrt((df/dx * sx)**2 + (df/dy * sy)**2) for independent errors sx and sy.

Why is a Taylor polynomial a good local but poor global approximation? It matches derivatives at one centre, so it is excellent nearby and drifts away farther out; outside the radius of convergence it diverges. See Taylor and Maclaurin series.

Python Cancellation, Newton and error propagation

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.

Habits that impress interviewers

  • State assumptions. "This holds if f is continuous on the closed interval" shows you know the theorem's conditions.
  • Sanity-check units and limits. If a formula for a falling object gives a negative time, something is wrong.
  • Offer a numerical check. Saying "I would confirm with a finite difference" or "I would let sympy verify the algebra" is a strength, not a weakness.
  • Name the trade-off. Larger step sizes are faster but less accurate; closed forms are exact but not always available.
flowchart LR
    A["Question"] --> B["State the definition"]
    B --> C["Give a small example"]
    C --> D["Name the conditions or limits"]
    D --> E["Offer a numeric check"]

A reliable structure for a short spoken answer.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A function is differentiable at a point. Which statement must be true?

    Differentiability implies continuity. The converse is false: |x| is continuous but not differentiable at 0.
  2. 2. At a critical point, the Hessian has eigenvalues 3 and -2. What is it?

    Eigenvalues of mixed sign mean the surface curves up in one direction and down in another, which is a saddle.
  3. 3. Why does the harmonic series 1 + 1/2 + 1/3 + ... diverge although its terms go to zero?

    Terms tending to zero is necessary, not sufficient. The partial sums behave like ln(n), which is unbounded.
  4. 4. Explicit Euler on y' = -k y has amplification factor 1 - k h per step. For which step sizes is it stable?

    The error shrinks only when |1 - k h| is less than 1, which means 0 < h < 2/k.

Summary

  • Short, precise answers beat long derivations: definition, small example, conditions, numeric check.
  • Know the standard facts: differentiable implies continuous, FTC parts 1 and 2, the Hessian test, divergence and curl meanings.
  • Connect the maths to practice: chain rule and backpropagation, gradients and descent, ODE roots and stability, FFT and frequencies.
  • Numerical awareness (cancellation, step size, stability, conditioning) separates engineers from textbook solvers.
  • Use sympy, numpy and scipy to check any claim you are unsure about.

Next: Cheat Sheet.