Calculus & Optimization Basics
Chapter: Calculus & Optimization Basics Difficulty Level: 2 — Recall / Standard textbook problems Time Limit: 30 minutes Total Marks: 40
Instructions
- Answer all questions.
- Show working where derivations are requested.
- Use notation for mathematical expressions.
Q1. Define continuity of a function at a point using the limit condition. [3 marks]
Q2. Differentiate the following, stating the rule used in each case: [4 marks]
- (a)
- (b)
Q3. For , compute the partial derivatives and . [4 marks]
Q4. For , compute the gradient at the point , and find the directional derivative at that point in the direction of the unit vector . [4 marks]
Q5. State the definition of the Jacobian matrix for a vector-valued function . Then compute the Jacobian of . [4 marks]
Q6. For , compute the Hessian matrix . [4 marks]
Q7. Write the second-order Taylor series approximation of about , and use it to estimate . [4 marks]
Q8. (a) State the definition of a convex function on an interval. (b) State whether and are convex on , giving a brief reason. [4 marks]
Q9. For , find all critical points and classify each as a local minimum, local maximum, or saddle/inflection using the second derivative test. [5 marks]
Q10. State the gradient descent update rule for minimizing , and briefly explain the effect of choosing a learning rate that is (i) too large and (ii) too small. [4 marks]
END OF PAPER
Answer keyMark scheme & solutions
Q1. (3 marks) is continuous at if all three hold:
- is defined [1]
- exists [1]
- [1]
Why: Continuity requires the function value and the limit to coincide with no gap/jump.
Q2. (4 marks)
- (a) Product rule: [2] (1 for rule, 1 for correct terms)
- (b) Quotient rule: [2]
Q3. (4 marks) [2] [2]
Why: Treat the other variable as constant during each partial differentiation.
Q4. (4 marks) , so at : [2] Directional derivative [2]
Why: The directional derivative is the dot product of the gradient with the unit direction vector.
Q5. (4 marks) Definition: The Jacobian is the matrix of first-order partial derivatives, . [2] For : [2]
Q6. (4 marks) First partials: , . [1] Second partials: , , . [2] [1]
Q7. (4 marks) Taylor: [2] At : [2]
Why: All derivatives of equal at . (True value .)
Q8. (4 marks) (a) is convex on an interval if for all and : [2] (Equivalently, if twice differentiable.) (b) : convex, since everywhere. [1] : not convex on , since for . [1]
Q9. (5 marks) [2] . [1] At : local minimum (value ). [1] At : local maximum (value ). [1]
Q10. (4 marks) Update rule: , where is the learning rate. [2] (i) Too large: may overshoot the minimum, causing oscillation or divergence. [1] (ii) Too small: very slow convergence, may take many iterations / get stuck near flat regions. [1]
[
{"claim":"Q4 directional derivative = 4.4","code":"x,y=symbols('x y'); f=x**2+y**2; grad=Matrix([diff(f,x),diff(f,y)]).subs({x:1,y:2}); u=Matrix([Rational(3,5),Rational(4,5)]); result=(grad.dot(u)==Rational(22,5))"},
{"claim":"Q2b derivative = -2/(x-1)**2","code":"x=symbols('x'); g=(x+1)/(x-1); result=simplify(diff(g,x)-(-2/(x-1)**2))==0"},
{"claim":"Q7 Taylor estimate of e^0.1 = 1.105","code":"x=symbols('x'); T=1+x+x**2/2; result=T.subs(x,Rational(1,10))==Rational(1105,1000)"},
{"claim":"Q9 f(1)=-2 local min, f(-1)=2 local max","code":"x=symbols('x'); f=x**3-3*x; f2=diff(f,x,2); result=(f.subs(x,1)==-2) and (f.subs(x,-1)==2) and (f2.subs(x,1)>0) and (f2.subs(x,-1)<0)"}
]