Guozhen AIGlobal AI field notes and model intelligence

English translation

Compute partial derivatives

Published:

Category: AI Calculus for Beginners

Read time: 4 min

Reads: 0

Lesson #18Views are counted together with the original Chinese articleImages are preserved from the source page

Concept Map: Applications of Multivariable Calculus

Multivariable calculus enables us to model situations where multiple inputs jointly influence an output. Both loss surfaces and gradient descent in machine learning rely fundamentally on it.

Checklist for Applications of Multivariable Calculus

I’ll annotate the meaning of each variable beside it. The more variables involved, the less effective it is to focus solely on formulas.

In the previous article, we explored computing multiple integrals in multivariable calculus. Today, we continue this theme by diving deeper into real-world application cases—illustrating not only how to compute multiple integrals but also why multivariable calculus matters in solving practical problems.

Application Case: Multiple Integrals in Physics

Case 1: Computing the Mass of a Uniform-Density Sphere

Decision Card for Multivariable Calculus Applications

When analyzing applications of multivariable calculus, first identify:

  • the physical meaning of each variable,
  • the objective function,
  • partial derivatives,
  • gradient direction,
  • constraints, and
  • interpretation of results.

Suppose we have a solid sphere of radius ( R ) with uniform density ( \rho ). We can compute its total mass using a triple integral.

1. Modeling Setup

We adopt spherical coordinates for modeling. In this system, a point’s position is described by radial distance ( r ), polar angle ( \theta ), and azimuthal angle ( \phi ), related to Cartesian coordinates as follows:

  • ( x = r \sin \theta \cos \phi )
  • ( y = r \sin \theta \sin \phi )
  • ( z = r \cos \theta )

The infinitesimal volume element is:

dV=r2sinθdrdθdϕdV = r^2 \sin \theta \, dr \, d\theta \, d\phi

2. Computing Mass

The sphere’s mass ( M ) equals the integral of density over its volume:

M=VρdV=ρ0R0π02πr2sinθdrdθdϕM = \int_V \rho \, dV = \rho \int_0^R \int_0^\pi \int_0^{2\pi} r^2 \sin \theta \, dr \, d\theta \, d\phi

3. Evaluating the Integrals

First, integrate with respect to ( r ):

0Rr2dr=[r33]0R=R33\int_0^R r^2 \, dr = \left[ \frac{r^3}{3} \right]_0^R = \frac{R^3}{3}

Next, integrate with respect to ( \theta ):

0πsinθdθ=[cosθ]0π=2\int_0^\pi \sin \theta \, d\theta = [-\cos \theta]_0^\pi = 2

Finally, integrate with respect to ( \phi ):

02πdϕ=2π\int_0^{2\pi} d\phi = 2\pi

Thus, the total mass becomes:

M=ρR3322π=4πρR33M = \rho \cdot \frac{R^3}{3} \cdot 2 \cdot 2\pi = \frac{4\pi \rho R^3}{3}

This case demonstrates how multiple integrals solve concrete physical problems.

Application Case: Optimization of Multivariable Functions in Economics

Case 2: Profit Maximization Problem

Reading Roadmap Card

Before reading Applications of Multivariable Calculus, align the questions, keywords, actions, and success criteria shown in the diagram with the text—this makes reading more efficient. After finishing, try re-explaining the concepts using your own project.

In economics, corporate profit often depends on several interrelated factors. Suppose a firm produces two goods, ( x ) and ( y ), with profit function:

P(x,y)=100x+150y5x210y220xyP(x, y) = 100x + 150y - 5x^2 - 10y^2 - 20xy

Our goal is to find the production levels ( (x, y) ) that maximize profit.

1. Compute Partial Derivatives

To locate critical points, compute the first-order partial derivatives:

  • With respect to ( x ):
Px=10010x20y\frac{\partial P}{\partial x} = 100 - 10x - 20y
  • With respect to ( y ):
Py=15020y20x\frac{\partial P}{\partial y} = 150 - 20y - 20x

2. Set Up and Solve the System

Set both partial derivatives equal to zero:

{10010x20y=015020y20x=0\begin{cases} 100 - 10x - 20y = 0 \\ 150 - 20y - 20x = 0 \end{cases}

Solve this linear system using substitution or elimination to obtain the optimal ( (x, y) ).

3. Computation Using Python

We can implement this efficiently in Python using the sympy library:

import sympy as sp

x, y = sp.symbols('x y')
P = 100*x + 150*y - 5*x**2 - 10*y**2 - 20*x*y

# Compute partial derivatives
dP_dx = sp.diff(P, x)
dP_dy = sp.diff(P, y)

# Solve the system
solutions = sp.solve((dP_dx, dP_dy), (x, y))
print(solutions)

Running this code yields the optimal production quantities ( x ) and ( y ) that maximize profit.

Application Reflection Card: Multivariable Calculus

After studying Applications of Multivariable Calculus, try adapting the framework to your own scenario—pay close attention to whether inputs, processing steps, and outputs align coherently.

Application Validation Card: Multivariable Calculus

To apply Applications of Multivariable Calculus to your own task, start small: isolate and validate just one key decision point.

Summary

Today’s discussion showcased multivariable calculus in action—from physics to economics. Concepts like multiple integrals and partial derivatives provide powerful, practical tools for tackling real-world problems. Through concrete case studies, we’ve seen both the utility and necessity of calculus beyond abstract theory.

In our next article, we’ll introduce the fundamentals of differential equations—and explore how they model and solve problems involving dynamic change. Stay tuned!

Continue

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...