Lesson 6 of 18

Partial Derivative ∂f/∂y

Partial Derivative with Respect to y

Just as ∂f/∂x\partial f / \partial x differentiates with xx varying and yy fixed, ∂f/∂y\partial f / \partial y differentiates with yy varying and xx fixed:

∂f∂y=lim⁡h→0f(x, y+h)−f(x, y−h)2h\frac{\partial f}{\partial y} = \lim_{h \to 0} \frac{f(x,\, y+h) - f(x,\, y-h)}{2h}

Symmetry Between Variables

For a "symmetric" function like f(x,y)=x2+y2f(x,y) = x^2 + y^2, we get:

  • ∂f/∂x=2x\partial f / \partial x = 2x
  • ∂f/∂y=2y\partial f / \partial y = 2y

They have the same form — xx and yy play identical roles.

Mixed Partials

Higher-order mixed partials ∂2f∂x∂y=∂2f∂y∂x\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x} for smooth functions (Schwarz's theorem). This symmetry is a powerful fact used throughout multivariable calculus.

Examples

For f(x,y)=x2y+sin⁡(y)f(x, y) = x^2 y + \sin(y):

  • ∂f/∂y=x2+cos⁡(y)\partial f / \partial y = x^2 + \cos(y)

For f(x,y)=ex⋅y2f(x, y) = e^x \cdot y^2:

  • ∂f/∂y=2y⋅ex\partial f / \partial y = 2y \cdot e^x

For f(x,y)=x3+3xy2f(x, y) = x^3 + 3xy^2:

  • ∂f/∂y=6xy\partial f / \partial y = 6xy

Your Task

Implement double partial_y(double (*f)(double, double), double x, double y, double h) that approximates ∂f/∂y\partial f / \partial y at (x,y)(x, y) using central differences.

TCC compiler loading...
Loading...
Click "Run" to execute your code.