0
0
MATLABdata~5 mins

Numerical differentiation in MATLAB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is numerical differentiation?
Numerical differentiation is a way to find the slope or rate of change of a function using numbers instead of formulas. It estimates the derivative by using values of the function at certain points.
Click to reveal answer
beginner
What is the forward difference formula for numerical differentiation?
The forward difference formula estimates the derivative at a point x by using the function values at x and a point slightly ahead, x + h: f'(x) ≈ (f(x + h) - f(x)) / h, where h is a small step size.
Click to reveal answer
intermediate
Why do we choose a small step size h in numerical differentiation?
A small step size h helps get a better estimate of the derivative because it measures the change over a tiny interval. But if h is too small, rounding errors can happen, so we balance between accuracy and errors.
Click to reveal answer
intermediate
What is the central difference formula and why is it better than forward difference?
The central difference formula uses points before and after x: f'(x) ≈ (f(x + h) - f(x - h)) / (2h). It is usually more accurate than forward difference because it balances the slope from both sides.
Click to reveal answer
beginner
Show a simple MATLAB code snippet to compute the numerical derivative of sin(x) at x = pi/4 using central difference.
h = 1e-5; x = pi/4; derivative = (sin(x + h) - sin(x - h)) / (2 * h); disp(derivative);
Click to reveal answer
Which formula uses points on both sides of x to estimate the derivative?
ACentral difference
BForward difference
CBackward difference
DEuler's method
In numerical differentiation, what happens if the step size h is too large?
ANo effect on accuracy
BThe estimate becomes more accurate
CThe estimate becomes less accurate
DThe function value becomes zero
What MATLAB command displays the value of a variable on the screen?
Aprint()
Becho()
Cshow()
Ddisp()
Which of these is NOT a common numerical differentiation method?
AForward difference
BIntegration by parts
CBackward difference
DCentral difference
Why might very small h cause problems in numerical differentiation?
ARounding errors increase
BFunction values become negative
CDerivative becomes zero
DStep size is ignored
Explain how to estimate the derivative of a function at a point using numerical differentiation.
Think about how you find slope using points close to the target point.
You got /4 concepts.
    Describe the difference between forward difference and central difference methods.
    Consider which points around x each method uses.
    You got /4 concepts.