4.1 Differential elements analysis
4.1.1 Introduction
Some engineering problems lead to differential equations whose independent variable is a spatial coordinate (, or , or an angle). A good way to set these up is to analyse a small (differential) element.
- Draw a diagram of a small element of the system (size , , , …), with every force or flux acting on it.
- Balance forces (or energy fluxes) on the element. Keep terms of first order in the small quantities and drop products of them. Divide by the element size and let it tend to zero to get an ODE.
- Solve the ODE.
Explanation Why may products like δT δθ be dropped?
After you divide by the element size (say ), a first-order term such as becomes . A second-order term such as becomes , which tends to zero in the limit. So second-order terms never reach the ODE. The same reasoning lets you use and (Small-x approximations): the errors are .
- Element → balance (keep first-order small terms only) → divide by → limit → ODE → solve.
- Use , , and drop -type products.
4.1.2 Differential elements analysis of hydrostatic pressure
Find how pressure varies with depth in a calm lake. Take a small element of water of thickness and plan area , with measured downwards from the surface. Assume the density is not significantly changed by the higher pressure near the bottom.
Pressure pushes down on the top face and pushes up on the bottom face. The weight acts down. Forces on the sides are horizontal and cancel.
The lecture’s working:
- Volume of element:
- Weight of element:
- Resolving forces vertically:
- Simplifying gives , and in the limit .
- The fluid is incompressible, so is constant. Integrating gives the result below.
is the depth below the surface (measured downwards) and is the pressure at the surface (). Valid for constant (incompressible fluid).
Show derivation
Use the element of thickness and plan area in Element of water in a calm lake. It is in equilibrium (Static equilibrium (2.14), (2.15)). Resolve vertically, taking upward as positive:
This is the same result as Hydrostatic pressure (3.3), now obtained as an ODE.
Explanation Why does the area A drop out?
Every force on the element is proportional to , so cancels and the answer cannot depend on how big an element you chose. That is a useful check on any element balance: if the element size survives into the ODE, you have made a mistake.
If is not constant (a compressible gas, ), the ODE still holds. Only the integration step changes.
- Measure downwards so that . If is measured upwards, the sign flips.
- The integration to needs constant (incompressible).
4.1.3 Differential elements analysis of a lossless transmission line
A high-frequency transmission line without loss (e.g. a coaxial cable) is modelled as a chain of distributed elements. Each element of length contains:
- an inductance (from the magnetic field around the wires), with impedance (Impedance of an inductor);
- a capacitance between the two conductors, with impedance (Impedance of a capacitor).
Here and are the inductance and capacitance per unit length.
The series inductor carries . The shunt capacitor draws at the output node.
Write the voltages and currents as complex sinusoids (Complex form of a sinusoid):
- input voltage , output voltage ;
- input current , output current , capacitor current .
Voltage (Ohm’s law / KVL: impedance × current = voltage difference):
Current (KCL, conservation of current at the node: ):
The approximation neglects . So , giving .
and are the complex amplitudes of voltage and current at position . and are the inductance and capacitance per unit length.
Show derivation
Use the element in One element of a lossless transmission line, with every quantity .
- KVL across the inductor , which carries : , so .
- KCL at the output node: , so . The capacitor current is . Dropping the second-order term gives .
Let in both. The factor cancels throughout.
Differentiate the first equation and substitute the second:
and . is the amplitude of the forward travelling wave and that of the backward travelling wave.
Show derivation
Differentiate the first of the Lossless transmission line equations and substitute the second: . Define , so .
This is a linear constant-coefficient ODE. The trial solution gives , so . The general solution is with two arbitrary constants. Multiply by to get .
This is the speed at which the phase of the forward wave travels along the line.
Show derivation
Follow a point of constant phase on the forward wave: . Differentiate with respect to : , so . With (Voltage waves on a lossless line) this is . For the backward wave, gives : the same speed in the direction.
Press ▶ with : the dots ride on the crests of the forward wave (blue dashed), which move to at . Then raise . The backward wave (red dashed) moves to . At the sum (purple) is a standing wave, , which no longer travels.
Explanation Why is it fine to replace V + δV by V in the capacitor current?
. The last term is a product of two small quantities. After dividing by it becomes . The answer would be the same if the capacitor were drawn at the input end of the element. Where exactly you put the shunt element only affects second-order terms.
Explanation Is this the same idea as the wave equation for a string?
Yes. Without the complex amplitudes, the two first-order equations combine to , a wave equation with speed . Here we used , so , and that turns it into the ODE . For a coaxial cable is the speed of light in the dielectric, roughly m/s.
- Element: series () and shunt (). and are per unit length.
- KVL across the inductor gives ; KCL at the node gives . Drop .
- Eliminate to get with . Then is the forward wave and the backward wave.
4.1.4 Differential elements analysis of a capstan
A capstan uses friction to reduce the tension needed to hold a load in place (e.g. a ship). A rope is wrapped around a fixed cylinder with coefficient of friction . The load pulls on one end () and a much smaller holding tension is needed at the other end ().
A half turn of wrap ().
Take an element of rope that subtends at the centre, with the rope on the point of slipping towards the load. Tensions and act along the tangents at its two ends, each inclined at to the tangent at the element’s mid-point. The cylinder pushes on the rope with a normal force (radially outwards) and a limiting friction force (towards the low-tension side).
The element subtends at the centre O. Each end tension is inclined at to the tangent at the mid-point. Friction opposes the impending slip towards the high-tension (load) side.
The lecture’s working:
- Resolving tangentially:
- for , therefore
- Resolving radially:
- for , therefore
- Therefore , ignoring the second-order term
- Combining: , which gives
- Solving by separation of variables gives the result below.
is the angle of wrap (radians) measured from the holding end, where . So on the point of slipping.
Show derivation
Use the element in Forces on an element of rope on the capstan, in equilibrium, with limiting friction (Dry friction (4.1)).
- Tangentially: . With : .
- Radially: . With and the term dropped: .
Combine: . Divide by and let : . Separate the variables: , so , i.e. with .
This is the belt-friction result Belt (rope) friction over a pulley, derived here as an ODE.
- is the total wrap angle in radians: each full turn adds .
- is the limiting case (rope about to slip). If it is not slipping, .
- The larger tension is on the side the rope is trying to slip towards (the load).
The fraction of the load you must hold falls exponentially with the wrap. With , one turn needs about 15 % of the load and three turns well under 1 %. Change to see how strongly the answer depends on it.
Explanation Why does the drum radius not appear?
A bigger drum puts more rope in contact, but the rope presses on it less hard per unit length: the normal force per unit length is . Friction per unit length is , and over an arc that gives , so cancels. Only the angle matters. Each extra turn multiplies the tension ratio by : about 6.6 for .
- Tangential balance gives ; radial balance gives (small angles, drop ).
- Tension grows exponentially with wrap angle and is independent of the drum radius.
- in radians, all turns counted. Valid on the point of slipping.
4.1.5 Differential elements analysis of a catenary: Diagram, force balance and ODE
A chain hanging under its own weight takes the shape of a catenary (e.g. a steel rope bridge across a gorge, or fibre-optic cable between telegraph posts). The model is a flexible cable with negligible flexural rigidity, so it carries only tension along its tangent. It hangs under its own weight with mass per unit length . is the angle of the tangent to the horizontal, so .
The element of arc length spans horizontally and vertically. Tension acts at angle at the left end and at angle at the right end. The weight is .
Resolving horizontally.
Using and : , so . Expanding and ignoring the very small term gives .
The left-hand side is . Equivalently, divide by and let :
With no horizontal loads, the horizontal component of tension is the same everywhere along the cable. is the tension at the lowest point, where .
Show derivation
Resolve horizontally on the element in Element of a hanging cable: . The weight is vertical, so it does not appear. Expand (databook maths p4, then small angles). This gives
Resolving vertically, again using and and dropping :
Therefore . Divide by , take the limit and combine as the derivative of a product:
Since , we have . Also , so
To remove as a variable: , and form a right-angled triangle, .
Show derivation
By Pythagoras on the element, . Divide by to get . Let and take the positive root ( increases with ).
is the mass per unit length of cable, the (constant) horizontal component of tension, and a length.
Show derivation
Resolve vertically on the element in Element of a hanging cable: . Expand with databook maths p4 and small angles, and drop : . Divide by , let and use the product rule: .
By Horizontal component of tension is constant, . So . Substitute from Arc length per unit x and divide by .
Explanation Why ds and not dx in the weight?
The chain’s weight is spread along its length, so the element weighs , not . That is what produces the . If instead the load is spread uniformly per unit horizontal distance (a deck hung from the cable, a “curtain” load, cable weight negligible), the weight term becomes . The ODE is then , whose solution is a parabola.
- Flexible cable: tension acts along the tangent, ; weight (per unit length of cable).
- Horizontal balance gives (constant).
- Vertical balance gives ; with this is the ODE.
4.1.6 Differential elements analysis of a catenary: Solving the ODE
is a nonlinear second-order ODE, which we do not yet know how to solve. The trick that converts it to a linear ODE is to square, then differentiate:
So either or . But , therefore .
To get a second-order ODE, define , so that :
Using and (Hyperbolic sine, cosine, tangent):
with and .
Constants. Exploit the symmetry: put at the centre of the span, where . This gives , since . Then , and the original equation requires . So
is measured from the lowest point (the centre of a symmetric span) and is an unknown constant of integration that sets the vertical position.
Show derivation
Start from the Catenary ODE . Square it and differentiate: . Since , this gives .
Let , so . The trial solution gives , so (definitions of Hyperbolic sine, cosine, tangent, databook maths p4).
At the lowest point we have , so . Squaring may have introduced solutions that are not genuine, so substitute back into the unsquared ODE. With it requires . Squaring gives (Hyperbolic identities), and the right-hand side must be positive, so . Hence . Integrating (Derivatives of the hyperbolic functions) gives .
The supports are at . Large means a tight cable (large compared with the weight): the sag is small and the catenary is almost indistinguishable from a parabola. Small means a slack cable, and the catenary is visibly steeper near the supports than the parabola. The readout gives the tension at the supports as a multiple of .
Explanation A quicker route: treat it as a first-order ODE in z = y’
With the ODE is , which is first-order and separable:
Explanation What was the solution D = −1 that squaring let in?
, i.e. , satisfies the squared equation but has : an upside-down catenary. It corresponds to a negative , i.e. compression. That is the ideal shape for an arch carrying its own weight: the line of thrust (Line of thrust (thrust line)) follows the inverted hanging chain.
Explanation How big is the tension along the cable?
From Horizontal component of tension is constant, . The tension is smallest at the lowest point and largest at the supports. With it equals : the tension at any point is the weight of a length of cable equal to that point’s height above the level .
assumes at the lowest point, where . For supports at unequal heights the lowest point is not at mid-span. Then keep both constants, or shift the origin and find where the lowest point is.
- Nonlinear ODE: square, differentiate and cancel to get ; with this becomes the linear ODE .
- Alternatively, separate directly.
- Origin at the lowest point gives . Substituting back gives , so .
- Tension , largest at the supports.
4.2 Linear difference equations
4.2.1 Introduction
The theory for solving linear ODEs extends to linear difference equations, the discrete analogue of differential equations.
An equation relating the terms of a sequence to earlier terms, e.g. .
- Order: the largest gap in index (here 2).
- Linear: each appears only to the first power, with no products of ’s.
- Homogeneous: every term contains an (right-hand side zero).
From an ODE to a difference equation. Suppose we want to solve on a computer. Approximate the derivative by a forward Euler estimate (databook maths p27; Euler's method):
Rearranging gives . For this is , and more generally .
and is the time step.
Show derivation
The forward Euler scheme (databook maths p27) is . With : . Each step multiplies by the same factor , so after steps (by induction on ).
Link to the exact solution. For small , the Taylor series of gives .
Since , this is , the solution of .
Show derivation
Lecture’s argument: the Taylor series (databook maths p6) gives . So .
Exact limit: fix and take steps with . Then as , using (databook maths p3).
This is an equally valid alternative (handout footnote).
Show derivation
Use the backward difference , evaluated at the new point: . Collect the terms: .
Exact in blue, forward Euler in red, with . Small : the factor is close to and the points hug the curve. Increase past 1: the factor turns negative and the points alternate in sign. Past 2 they grow, although the true solution decays. Toggle backward Euler (green): it always decays.
Second-order equations. For a 2nd-order linear ODE, trying gives the characteristic equation . The discrete equivalent is , so for a difference equation we try .
and are the (distinct) roots. The constants and come from two initial or boundary values.
Show derivation
Substitute : . Divide by (): . Each root gives a solution .
The equation is linear and homogeneous, so any combination is also a solution.
It is the general solution. The recurrence fixes every once and are known. The two equations and always have a unique solution when , because their determinant (Cramer's rule (2 × 2)).
Line up the indices before writing the characteristic equation: the term with the highest index takes , the lowest takes . For example, becomes , so .
Explanation What do the roots γ tell you?
Compare with the ODE, where :
- : that part of the solution decays (like );
- : it grows;
- : it alternates in sign from one step to the next. No real exponential does that; it is purely a discrete effect, the oscillation seen in the Euler widget when .
The method is the same as for ODEs: guess an exponential (here a power ), get a polynomial, superpose the roots, then fit the constants. Repeated roots and forcing terms are not covered here. For a repeated root the second solution is , just as is for ODEs.
- Forward Euler turns into , which tends to as .
- Linear homogeneous difference equation: try to get a polynomial in .
- General solution: . Fit and to two given values (e.g. , ).
4.2.2 Fibonacci numbers
Each Fibonacci number is the sum of the previous two: To analyse this, write
which as a difference equation is
Rearranged, : a 2nd-order homogeneous linear difference equation.
Example Solving the Fibonacci recurrence
- Trial solution : , giving the characteristic equation .
- Quadratic formula: .
- General solution: .
- First condition, : , hence .
- Second condition, : , so .
- Check for : . So ✓.
This solves with , .
Show derivation
Apply Characteristic equation of a 2nd-order linear difference equation with , , : , so (distinct). Then .
- gives .
- gives .
So and .
The dots come from the recurrence. The dashed curve is the first term alone, with . Step through : the second term (from ) alternates in sign and shrinks, so it only ever nudges onto the nearest integer.
Explanation Why is S_n always a whole number when the formula is full of √5?
Expand both powers with the binomial theorem. The terms containing odd powers of have opposite signs in the two brackets, so they survive the subtraction. Each of them contains one factor , which cancels the in front. All the irrational parts cancel. Also, since , the second term tends to 0. So is rounded to the nearest integer, and (the golden ratio).
- Write the recurrence in homogeneous form: , so .
- Roots ; fit , to get .
- Check the closed form against a small (e.g. ).
- The dominant root sets the growth rate.
4.2.3 Triangle numbers
The triangle numbers count the dots in equilateral triangles. The th triangle is the th with a new row of dots added:
The dots are drawn left-aligned, so each row still holds dots. The red row is the dots added at step . Switch on the second copy (green): two triangles fill an rectangle, so .
This is a non-homogeneous (forced) linear difference equation. It is solved exactly like a forced ODE.
Write the equation as (homogeneous part) = (driving term), e.g. . Then
- Find the CF with the trial .
- Choose the PI trial from the form of the driving term, as for ODEs: a constant → ; a polynomial in → a polynomial of the same degree; → .
- If the trial (or part of it) is already in the CF, multiply it by .
- Fit the constants to the initial/boundary values last, using the complete solution CF + PI.
Show derivation
Write the equation as , where is linear: and .
- If is any one solution (the PI) and is any other solution, then . So solves the homogeneous equation and is a combination of the CF terms (Characteristic equation of a 2nd-order linear difference equation). Hence every solution is CF + PI.
- Why multiply by : in the first-order case , any gives , so it can never match a forcing . The trial gives , which can be matched.
Complementary function. The homogeneous equation has characteristic equation , so and
Particular solution of .
- Try a polynomial of the same order, . Then and . The terms cancel, so this can never equal : the PI is not of the form .
- approximates a derivative, and differentiating a quadratic gives a linear term. So try a quadratic, :
- Matching to : and , so .
Complete solution: . The boundary condition gives .
The databook gives the same result as .
Show derivation
By Forced linear difference equations: CF + PI, solve as CF + PI.
- CF: , so .
- PI: try . A linear trial fails because its constant is part of the CF. Then . Matching to gives .
- Complete: . gives , so .
Check: ✓.
Explanation Why did the linear trial fail, and why is the constant c never found on its own?
The forcing is “a polynomial times ”, and is a root of the characteristic equation. This is the discrete version of ODE resonance. The fix is the same: multiply the polynomial trial by , giving . The lecture’s extra constant is itself a CF term (), so it merges with . That is why the boundary condition only fixes the combination .
Another view: is a backward difference, roughly . The ODE has solution , which is the leading term of the exact answer.
- Rearrange: homogeneous part on the left, driving term on the right. Solution = CF + PI.
- Driving term with in the CF: the PI trial must be quadratic, .
- Fit constants to the complete solution: .
4.2.4 Tower of Hanoi
Three rods and discs of different radii. The discs start stacked on one rod in decreasing size, smallest at the top. The aim is to move the whole stack to another rod, obeying:
- move only one disc at a time;
- take only the top disc;
- never place a disc on a smaller one.
Press ▶. Stage 1 takes moves, stage 2 one move of the largest (red) disc, stage 3 another moves. Change : the total is .
Setting up the difference equation. To move a tower of height from the left rod to the right rod:
- move the tower of height to the centre rod: moves;
- move the largest disc to the right rod: 1 move;
- move the tower of height from the centre onto it: another moves.
So the number of moves for a tower of height is
Solving it. Rewrite as .
- CF: gives the characteristic equation , so and .
- PI: try a constant : , so .
- General solution: .
- Boundary condition : , so .
For discs this is 511 moves.
Show derivation
Recurrence: moving discs = move the top out of the way (), move the largest disc (1), put the back on top of it ().
Solve by Forced linear difference equations: CF + PI. The CF is (root ). The constant trial is not in the CF and gives . So , and gives .
Check: , ✓.
Apply the boundary condition to the complete solution , not to the CF alone. Doing it to the CF gives , which is wrong.
Explanation Is 2ⁿ − 1 really the fewest possible moves?
Yes. The largest disc must move at least once. Just before its first move, the other discs must all sit on the third rod: at least moves. After its last move, they must all be stacked back onto it: at least another . So any solution needs at least moves, and the recursive strategy achieves exactly that.
Each extra disc doubles the work, because . With 64 discs, moves: at one move per second that is about years.
- Recursion: (move , move the largest, move again).
- CF , PI , then gives .
- Constant forcing → constant trial, unless is a root (then use ).
4.2.5 Algorithmic complexity
A common computing approach (divide and conquer) splits a problem with inputs into two problems of half the size. The running time is then modelled as
where is the time taken to combine the two smaller solutions.
Turning it into a difference equation. Let , so that can always be halved, and let . Then and
- CF: exactly as for the Tower of Hanoi, .
- PI: the forcing has the same form as the CF. So, just as with ODEs, try :
Dividing by : , so and .
- In total: .
Since and :
is the cost of a problem of size 1. For large , is larger than , so the running time scales as .
Show derivation
Put and , so that . By Forced linear difference equations: CF + PI:
- CF: , so .
- The forcing is in the CF, so try : , giving .
So . At (), , so . Substitute and .
The fast Fourier transform (FFT), met later in the course, is an example of an algorithm.
Every level of merging costs in total, and there are such levels: . The problems of size 1 at the bottom cost . Together these give Running time of divide and conquer.
Explanation Why substitute n = 2ᵏ?
relates at and . These are not neighbouring terms of a sequence in . With , halving means stepping back by one, so it becomes an ordinary first-order difference equation in . At the end, convert back with . The same trick works for any “split into parts” recurrence with .
- Divide and conquer: . Substitute , to get .
- Forcing is in the CF, so the PI trial is , giving .
- , which scales as (e.g. the FFT).
4.3 Partial differentiation
4.3.1 What is partial differentiation?
For a function of one variable, the gradient is
For a function of two variables there is a gradient in each direction.
The gradient in the direction, keeping constant:
Surface . The blue curve is the slice and the red curve the slice . Each arrow rises by the slope of its slice over one unit of run, so its rise is the partial derivative. Drag to rotate, and move the point: the two slopes change independently.
For smooth functions
Show derivation not required
Define the double difference
- Group it as with . The mean value theorem gives for some between and . Applying it again in : at some point inside the small rectangle.
- Grouping the other way (first in , then in ) gives at another point of the rectangle.
Divide both by and let the rectangle shrink to . If the second derivatives are continuous (“smooth”), both tend to their values at , so they are equal.
Be clear which variables are held constant. depends on what the other variables are. If is rewritten in terms of a different set of variables, can change. When there is a risk of confusion, write , as the databook does with .
- : differentiate in with every other variable treated as a constant. It is the slope of the slice .
- Smooth : , so the order of mixed differentiation does not matter. Use this as a check.
4.3.2 Example: Rate of change of the volume of a cylinder
Example Partial derivatives of V = πr²h
A cylinder of height and radius has volume .
- Keep constant and change : .
- Keep constant and change : .
- Mixed derivatives:
The two mixed derivatives agree, as Mixed partial derivatives commute says they must.
Explanation What do ∂V/∂r and ∂V/∂h mean physically?
is the end area: raising the height by adds a thin disc of volume . is the curved surface area: increasing the radius by adds a thin shell of volume . The widget in 4.3.3 shows both pieces.
4.3.3 Small changes
Change the radius by and the height by :
Subtract :
and are small, so , and are of higher order of smallness and can be neglected:
using and from 4.3.2. The total change is the sum of the partial changes due to each variable. This generalises:
Correct to first order in the small changes . The partial derivatives are evaluated at the starting point. (The databook gives this as the total differential .)
Show derivation
Split the change into a step in followed by a step in :
- Second bracket: only changes. By the definition of Partial derivative and 1D Linearisation about x = a, it is plus terms of order .
- First bracket: only changes, at height . It is plus terms of order . Also, , so this bracket is plus terms of order .
Dropping all second-order terms gives the result. With a third variable, add a third step in .
Half cross-section of the cylinder ( m, m), with the axis on the left. Rotating it about the axis gives the solid. The blue shell is , the red lid is , and the orange corner is second order and is dropped. Dashed strips are volume removed (negative or ). The starting values are those of 4.3.4. Make and large and watch the error grow like their squares.
- : total change = sum of partial changes. Valid to first order only.
- Drop products of small quantities (, , …).
- Evaluate the partial derivatives at the starting point; keep the signs of the changes (a decrease is negative).
4.3.4 Small changes numerical example
Example Cylinder: r = 5 m → 5.2 m, h = 10 m → 9.9 m
The radius increases by m and the height decreases by m, so m and m. With :
Small-change estimate:
Exact:
The estimate is within about 1 %.
Explanation Where did the missing 0.196π m³ go?
It is exactly the neglected higher-order terms from 4.3.3:
4.3.5 Total differential
Take in the limit where , and become infinitesimally small. Replacing them by , and :
The total differential is the sum of the partial differentials.
Show derivation
From Small changes, , where consists of second-order terms (, , , …). As the changes tend to zero, vanishes faster than and . The relation between the infinitesimals , , is therefore the linear part, and it holds exactly.
Explanation What is the difference between δf and df?
is an actual, finite change, and the formula for it is only approximate. is the linear (first-order) part, and the relation between , and is exact. In practice you write to derive relations (chain rule, rates) and when you plug in numbers. Geometrically, is the change along the tangent plane to the surface : the plane containing both arrows in Partial derivatives are slopes of slices through the surface.
- (databook p7): exact for infinitesimals; for finite changes it is the small-change estimate.
4.3.6 The chain rule
If and are both functions of, for example, time, and , then depends on through both of them.
The two-dimensional version of the Chain rule. is the total derivative: the rate of change of following the path . (The databook states the general form, )
Show derivation
Let change by . Then and change by and . By Small changes,
The grey curves are contours of . The point moves along , (dashed). The readout splits into its and contributions; their sum always equals the directly computed rate. Where the green velocity arrow runs along a contour, .
Example Quick check of the chain rule
with , :
If also depends on explicitly, , there is an extra term:
- : add one term per route by which reaches .
- Explicit -dependence adds .
- Comes straight from the small-change formula divided by .
4.3.7 Taylor series in two dimensions
Idea: reduce it to a one-dimensional Taylor series. Define
which moves smoothly along a straight line from to .
First derivative. Along the line, and , and , . The chain rule gives
Second derivative. Apply the same rule to the function :
The two mixed terms are equal by Mixed partial derivatives commute, which gives the factor 2.
Taylor series of . The function is smooth, so the 1D Taylor series of about , evaluated at , gives
All derivatives are evaluated at . Note that the mixed term has no : the of cancels the 2 from the two equal mixed derivatives.
Show derivation
Let , and , so that and are constants.
- Chain rule in two variables (total derivative): .
- Apply the chain rule again to and (they are also functions of ): , and by Mixed partial derivatives commute.
- At , . The 1D Taylor series at is
Substituting gives the result.
about . Purple: the exact along the line to . Blue: first order (the Small changes estimate). Red: second order. The value at (dotted line) is the 2D Taylor estimate. Shrink and and both approximations close in. The second order is always closer for small steps.
Explanation Is there a pattern for higher orders?
Yes. Write . Then , expanded like a binomial: , has coefficients , and so on. So
- Trick: ; chain rule for and , then 1D Taylor at .
- Second-order terms: , so the mixed term carries no .
- Truncating after the first-order terms gives the small-change formula.