Level 1 — RecognitionCalculus & Optimization Basics

Calculus & Optimization Basics

20 minutes30 marksprintable — key stays hidden on paper

Level 1 Examination — Recognition

Time Limit: 20 minutes Total Marks: 30

Instructions: Answer all questions. For True/False items, a one-line justification is required for full marks. Use ...... for any math you write.


Part A — Multiple Choice (1 mark each, 10 marks)

Q1. The gradient descent update rule for parameter θ\theta with learning rate η\eta is: (a) θθ+ηf(θ)\theta \leftarrow \theta + \eta \nabla f(\theta) (b) θθηf(θ)\theta \leftarrow \theta - \eta \nabla f(\theta) (c) θηθf(θ)\theta \leftarrow \eta \theta - \nabla f(\theta) (d) θθf(θ)/η\theta \leftarrow \theta - \nabla f(\theta)/\eta

Q2. For f(x,y)=x2yf(x,y) = x^2 y, the partial derivative fy\dfrac{\partial f}{\partial y} is: (a) 2xy2xy (b) x2x^2 (c) 2x2x (d) 2xy+x22xy + x^2

Q3. The Hessian matrix of a scalar function f:RnRf:\mathbb{R}^n\to\mathbb{R} contains: (a) first-order partial derivatives (b) second-order partial derivatives (c) directional derivatives only (d) the function values

Q4. A function is convex if its Hessian is everywhere: (a) negative definite (b) positive semidefinite (c) singular (d) skew-symmetric

Q5. The derivative of f(x)=sin(x2)f(x) = \sin(x^2) using the chain rule is: (a) cos(x2)\cos(x^2) (b) 2xcos(x2)2x\cos(x^2) (c) 2xsin(x2)2x\sin(x^2) (d) cos(2x)\cos(2x)

Q6. A saddle point of ff is a critical point where the Hessian is: (a) positive definite (b) negative definite (c) indefinite (d) zero matrix

Q7. If the learning rate η\eta is chosen too large, gradient descent typically: (a) converges faster with no downside (b) oscillates or diverges (c) always finds the global minimum (d) stops immediately

Q8. The Jacobian of a vector function f:RnRm\mathbf{f}:\mathbb{R}^n\to\mathbb{R}^m has dimensions: (a) n×nn\times n (b) m×mm\times m (c) m×nm\times n (d) n×mn\times m

Q9. The first-order Taylor approximation of ff about aa is: (a) f(a)f(a) (b) f(a)+f(a)(xa)f(a) + f'(a)(x-a) (c) f(a)+12f(a)(xa)2f(a) + \tfrac12 f''(a)(x-a)^2 (d) f(a)(xa)f'(a)(x-a)

Q10. The directional derivative of ff in the direction of unit vector u\mathbf{u} equals: (a) f\nabla f (b) fu\nabla f \cdot \mathbf{u} (c) f\|\nabla f\| (d) uu\mathbf{u}\cdot\mathbf{u}


Part B — Matching (5 marks)

Q11. Match each term (Column X) to its definition (Column Y). Write pairs like 1-c.

Column X Column Y
1. Local minimum a. Point where every partial derivative is zero
2. Global minimum b. Lowest value in a small neighborhood
3. Critical point c. Method for constrained optimization using f=λg\nabla f = \lambda \nabla g
4. Lagrange multiplier d. Lowest value over the entire domain
5. Continuity e. limxaf(x)=f(a)\lim_{x\to a} f(x) = f(a)

Part C — True/False with justification (3 marks each, 15 marks)

Q12. A differentiable function is always continuous. (True/False + one-line reason.)

Q13. At any local minimum of a differentiable function, the gradient is the zero vector.

Q14. For a convex function, every local minimum is also a global minimum.

Q15. The gradient f\nabla f points in the direction of steepest decrease of ff.

Q16. By Clairaut's theorem, for a function with continuous second partials, 2fxy=2fyx\dfrac{\partial^2 f}{\partial x\,\partial y} = \dfrac{\partial^2 f}{\partial y\,\partial x}.

Answer keyMark scheme & solutions

Part A — MCQ (1 mark each)

Q1. (b) — Gradient descent moves against the gradient to reduce the loss. (1)

Q2. (b) x2x^2 — Treat xx as constant; (x2y)/y=x2\partial(x^2 y)/\partial y = x^2. (1)

Q3. (b) — The Hessian is the matrix of second-order partials Hij=2f/xixjH_{ij}=\partial^2 f/\partial x_i\partial x_j. (1)

Q4. (b) — Convexity ⇔ Hessian positive semidefinite everywhere. (1)

Q5. (b) 2xcos(x2)2x\cos(x^2) — chain rule: outer cos(u)\cos(u) times inner u=2xu'=2x, u=x2u=x^2. (1)

Q6. (c) — A saddle has indefinite Hessian (mixed positive/negative curvature). (1)

Q7. (b) — Too large η\eta overshoots the minimum → oscillation/divergence. (1)

Q8. (c) m×nm\times n — rows = outputs (mm), columns = inputs (nn). (1)

Q9. (b) — First-order Taylor: f(a)+f(a)(xa)f(a)+f'(a)(x-a). (1)

Q10. (b) fu\nabla f\cdot\mathbf{u} — directional derivative = dot product of gradient with unit direction. (1)


Part B — Matching (1 mark each, 5 total)

Q11. 1-b, 2-d, 3-a, 4-c, 5-e

  • Local min = lowest in neighborhood (b); Global min = lowest over domain (d); Critical point = zero partials (a); Lagrange multiplier = constrained method (c); Continuity = limit equals value (e). (5)

Part C — True/False + justification (3 each)

Q12. True. (1) Differentiability at a point implies the limit defining the derivative exists, which forces the function to be continuous there. (2) (Converse is false: x|x| is continuous but not differentiable at 0.)

Q13. True. (1) A differentiable interior local minimum is a stationary point, so f=0\nabla f = \mathbf{0} (first-order necessary condition). (2)

Q14. True. (1) Convexity guarantees no separate lower valley elsewhere; any local min is global. (2) (Non-convex functions can have multiple distinct local minima.)

Q15. False. (1) The gradient points in the direction of steepest increase; steepest decrease is f-\nabla f. (2)

Q16. True. (1) Clairaut/Schwarz theorem: with continuous second partials, mixed partials are equal (symmetric Hessian). (2)


[
  {"claim":"Q2: d/dy of x^2*y equals x^2","code":"x,y=symbols('x y'); result = diff(x**2*y,y)==x**2"},
  {"claim":"Q5: d/dx of sin(x^2) equals 2x*cos(x^2)","code":"x=symbols('x'); result = simplify(diff(sin(x**2),x)-2*x*cos(x**2))==0"},
  {"claim":"Q16: mixed partials of a smooth function are equal","code":"x,y=symbols('x y'); f=x**3*y**2+sin(x*y); result = simplify(diff(f,x,y)-diff(f,y,x))==0"},
  {"claim":"Q9: first-order Taylor of exp about 0 is 1+x","code":"x=symbols('x'); result = series(exp(x),x,0,2).removeO()==1+x"}
]