Skip to main content

Constructing the Taylor Series in Two Variables: A Step-by-Step Guide

The Taylor series is one of the most powerful tools in mathematics, helping us approximate complex functions with polynomials. In single-variable calculus, this series allows us to approximate a function f(x) around a point by considering its values and derivatives at that point. But what about functions of multiple variables? For functions in two variables, we use a similar concept to construct the Taylor series, but the process incorporates partial derivatives with respect to each variable. 

In this blog post, we’ll dive into the Taylor series in two variables, taking a close look at each step to construct it and discussing why it’s useful for approximating functions in applications like optimization, engineering, and even machine learning.


What is a Taylor Series?

The Taylor series for a function around a point (a, b) is a polynomial that approximates the function f(x, y) by adding up terms involving the function's partial derivatives at the point. The degree of the approximation can vary depending on how many terms we include, which allows us to choose an approximation that’s as simple or as accurate as needed.


For a function f(x, y), the general form of the Taylor series around the point (a,b) is:

where T_n(x, y) is the Taylor polynomial of degree n for f(x, y).


Step 1: Set Up and Understand Partial Derivatives

To construct the Taylor series in two variables, we first need to understand the partial derivatives of the function f(x, y). Partial derivatives tell us how the function changes as we vary one variable while keeping the other constant. For a Taylor series in two variables, we’ll use partial derivatives with respect to both x and y, up to the degree we desire for the approximation.


For example:

The first-order partial derivatives f_x(a, b) and f_y(a, b) describe the slopes of f in the x- and y-directions at the point (a,b). The second-order partial derivatives f_{xx}(a, b), f_{yy}(a, b), and f_{xy}(a, b) describe the curvature of f in various directions at (a, b).


Step 2: Construct the Taylor Polynomial

Let’s start building the Taylor series step-by-step for the cases where n = 1 (linear approximation), n = 2 (quadratic approximation), and n = 3 (cubic approximation).


First-Order Taylor Polynomial (Linear Approximation)

The first-order Taylor polynomial (often called the linear approximation) for f(x, y) around (a, b) is:


Second-Order Taylor Polynomial (Quadratic Approximation)

The second-order Taylor polynomial adds terms involving second-order partial derivatives, which account for the curvature of f around (a, b):

Third-Order Taylor Polynomial (Cubic Approximation)

To improve accuracy further, we can construct the third-order Taylor polynomial by adding terms involving third-order partial derivatives:

Each additional derivative term enhances the polynomial’s ability to match the original function’s shape near (a,b). 

Step 3: Interpret and use the Taylor Polynomial

  1. Each degree of the Taylor polynomial gives a different level of approximation accuracy
  2. Each additional derivative term enhances the polynomial’s ability to match the original function’s shape near (a,b). 
  3. Third order (cubic): Adds even more accuracy by capturing how curvature changes, useful for understanding finer details.

In practical applications, we choose the degree of the polynomial based on the desired accuracy and the complexity we can handle. For example:


In optimization, a second-order Taylor approximation (using derivatives up to the second order) is common to find critical points.


In physics and engineering, where precision is crucial, third-order or higher approximations may be used to understand local behavior in detail.


Example: Constructing a Second-Order Taylor Polynomial

Let's consider a concrete example. Suppose we have a function f(x, y) = exp(x+y) and we want to approximate it around the point (0, 0).


1. Evaluate f and its partial derivatives at (0, 0):

  


2. Construct the polynomial:

Simplifying, we get:

This polynomial provides a quadratic approximation of f(x, y) around (0, 0).

Final Thoughts

The Taylor series in two variables is an indispensable tool for approximating and analyzing functions of multiple variables. With each added degree, we capture more details of the function’s local behavior, which is invaluable in fields like engineering, physics, and machine learning. Whether you need a simple linear approximation or a detailed cubic model, the Taylor series provides a flexible and powerful framework to approximate complex functions with relative ease.






Comments

Popular posts from this blog

What is Mathematical Fluency?

What does it really mean for students to be mathematically fluent? If you’ve been in any math PD over the past few years, you’ve likely heard the phrase everywhere. We talk about fluency as something students should develop, strengthen, and demonstrate, but it can still feel abstract when we try to describe it in observable, classroom-ready terms. This post breaks down mathematical fluency into the two simplest frames we can use as teachers: what it looks like and what it sounds like . These descriptions can guide instruction, assessment, student goal-setting, and even walkthrough conversations with colleagues or administrators. What Mathematical Fluency Looks Like In a classroom where students are developing mathematical fluency, you see students making choices about strategies rather than following steps robotically. They use representations—number lines, diagrams, tables, graphs, manipulatives, symbolic expressions—and switch between them to make sense of a problem. They move ...

The Tribe of Math Mentors: 11 Questions Every Educator Should Answer

It is easy to get caught up in the vague, existential questions of education: How do I become a better teacher? How do I make math engaging? How do I survive the burnout? But as author Tim Ferriss noted when writing his book Tribe of Mentors, "Life punishes the vague wish and rewards the specific ask." When Ferriss set out to deconstruct the habits of world-class performers, he didn’t ask them broad questions about "the secret to success." He engineered 11 highly specific questions designed to bypass rehearsed answers and force his subjects to share actionable, vulnerable, and unconventional insights. Recently, I started thinking about how perfectly this methodology translates to our world. What if we asked these exact types of questions to master math teachers? What if we used them to guide the next generation of educators? Here is my best thinking of what Ferriss’s Tribe of Mentors questionnaire looks like when translated into the context of the mathematics classr...

Beyond Taylor Series: The Magic and History of Padé Approximations

If you have ever taken a calculus class, you probably remember the Taylor series. It is the mathematical magic trick that lets you turn complicated functions—like sines, cosines, and exponentials—into simple, infinitely long polynomials. For centuries, it has been a cornerstone of numerical mathematics. But the Taylor series has a dark secret: it frequently breaks. If a function has a vertical asymptote (a pole) or if you move too far from your starting point, the Taylor series spirals out of control into infinity. It is strictly bounded by what mathematicians call a "radius of convergence." Enter the Padé approximation . Instead of using a single polynomial to estimate a function, a Padé approximant uses a fraction (a ratio of two polynomials). This simple structural change unlocks a profound level of mathematical power, allowing us to see past the limits of Taylor series and model complex, chaotic systems in modern physics and engineering. A Brief History: From Franc...