Higher-Order Partial Derivatives Explained: SageMath Visualizations & Real-World Applications
- Get link
- X
- Other Apps

๐ ๐ From Slopes to Surprises: Mastering Higher-Order Partial Derivatives with SageMath
Ever wondered how a mountain slope changes as you hike diagonally instead of straight up? Welcome to the world of higher-order partial derivatives — where slopes have their own slopes, and symmetry sometimes breaks.
In this visual + interactive post, we’ll explore:
- ✅ Basic and mixed partials
- ✅ When Clairaut’s Theorem fails
- ✅ Laplace’s Equation and physical equilibrium
- ✅ Coordinate transformations
- ✅ Directional derivatives in action
- fx : slope in x-direction
- fy : slope in y-direction
- fxx,fyy : how that slope changes — concavity in that direction
- fxy,fyx : how the slope in one direction changes as you move in the other — curvature interaction
- Where do you encounter "slopes of slopes" in your work or studies?
- Have you ever thought of second derivatives as curvatures?
- Heat flow ๐ฅต→❄️
- Electrostatics ⚡
- Fluid dynamics ๐
- Image processing ๐ธ
-
Harmonic:
f(x,y)=x2 - y2 → should give Laplacian = 0
Not Harmonic:
f(x,y)=x2 + y2 → Laplacian ≠ 0
- Can you think of a physical system in equilibrium? Could it obey Laplace’s equation?
- ❌ Forgetting to define functions symbolically: f(x,y) = ... is different from f = ...
- ⚠️ Division by zero in custom piecewise functions
- ๐ Use assume() to clean up symbolic simplifications
- ๐ Check the SageMath docs when in doubt!
- Can you sketch your own function where the mixed partials disagree?
- How does changing coordinate systems affect interpretation?
- Modify Laplace’s Equation with boundary constraints — what changes?
- ๐งฎ Multiple integrals in 2D and 3D
- ๐ฆ Volumes and surface areas of revolution
- ๐ฏ Real-world applications in physics, engineering, and material design
- ๐ง Until then — what’s your favorite example of “slopes of slopes”? Drop it in the comments!
And yes, we’ll do it all with SageMath! ๐
Summary:
You’ll learn how functions behave when second-order derivatives are involved, explore how symmetry and balance arise in math and physics, and gain hands-on skills with SageMath visualizations.
๐ Part 1: What Are Partial Derivatives, Really?
๐ง Intuition First
Imagine you’re on a hill. Walking in different directions changes how steep it feels. That “steepness” is what partial derivatives measure.
๐ฏ Mini Challenge
What do you think fxy will be for this function? Zero? Try and see.
✅ Checkpoint
๐งฉ Part 2: When Mixed Partials Disagree – A Smooth Lie?
❓ Why Do We Care?
Clairaut’s Theorem says: If the function is smooth, then fxy=fyx.But what if it’s not smooth at one point?
๐จ What's the Problem Here?
Try this strange function:

๐ At (0,0), the denominator becomes zero, and while we define it manually as 0, the partial derivatives may not behave nicely.
Check the mixed partials:
๐งจ Surprise! fxy≠fyx
๐ Clairaut’s Theorem fails here — because the function is not smooth (its partials aren’t continuous) at the origin.
⚡ Mini Challenge:
Can you construct a similar function with different powers in numerator/denominator that breaks Clairaut’s Theorem?
๐ง Quick History:
Alexis Clairaut (1713–1765) was one of the first to study symmetry in second derivatives — while working on planetary motion equations!
๐ Part 3: Harmony in Nature – Laplace’s Equation
๐ What It Models
The Laplacian,∇2 =fxx+fyy ,appears in:
Try:
๐งช Modify and compare:
๐จ Tip: Try plotting both to see what "balance" vs. "growth" looks like!
✅ Checkpoint
๐ Part 4: Switching Coordinates – A New Lens
๐ Why Switch?
Sometimes, switching to polar coordinates simplifies things — especially for circular symmetry.
๐ Visualize: Cartesian to Polar


❓ Challenge: Is \( f(x,y) = e^{-(x^2 + y^2)} \) harmonic?
๐ก Hint: Use polar Laplacian
The polar form of Laplace’s equation is: \( \nabla^2 f = \frac{\partial^2 f}{\partial r^2} + \frac{1}{r} \frac{\partial f}{\partial r} + \frac{1}{r^2} \frac{\partial^2 f}{\partial \theta^2} \)
๐งญ Part 5: Directional Derivatives – Choose Your Path
๐ง Intuition
You want the steepness in any direction? That’s what directional derivatives measure, via the gradient:
๐งญ The gradient vector points in the direction of steepest increase.
๐ Plot with:
๐ Application: In machine learning, directional derivatives guide optimization steps (like in gradient descent).
๐งฉ Bonus: Debugging in SageMath
๐ ️ Common Pitfalls
๐ Reflect & Explore
๐♀️ Poll: Have You Ever Caught Clairaut’s Theorem Failing?
๐ What’s Next?
Ready for the next step? We’ll explore:
- Get link
- X
- Other Apps
Comments
Post a Comment
If you have any queries, do not hesitate to reach out.
Unsure about something? Ask away—I’m here for you!