Differential equations, a tourist's guide | DE1

3Blue1Brown
31 Mar 201927:16

Summary

TLDRThis script delves into the world of differential equations, highlighting their prevalence in describing change in physics and beyond. It introduces ordinary and partial differential equations, using examples like planetary motion and pendulum swings to illustrate their applications. The video aims to provide a conceptual understanding, exploring numerical methods for solving these equations when exact solutions are elusive. It also touches on the challenges of prediction due to chaos theory, emphasizing the beauty and complexity of the mathematical models that underpin our understanding of the universe.

Takeaways

  • ๐Ÿ“š Differential equations are fundamental in expressing the laws of physics and are also applicable across various disciplines.
  • ๐ŸŒ The language of differential equations allows for a deeper understanding of changes in systems, rather than just their absolute states.
  • ๐Ÿ” Differential equations are categorized into ordinary differential equations (ODEs), which involve a single variable, and partial differential equations (PDEs), which involve multiple variables.
  • ๐Ÿ“‰ ODEs are used to model systems where a finite set of values change over time, often represented by time itself.
  • ๐ŸŒก PDEs are employed to describe systems with a continuum of values that evolve over time, such as temperature distribution across a material or fluid velocities.
  • ๐Ÿงฎ The study of differential equations often requires knowledge of calculus and, in some cases, basic linear algebra.
  • ๐ŸŒŸ Newtonian mechanics uses second-order differential equations to describe motion through the lens of forces leading to acceleration.
  • ๐Ÿ”„ The interplay between position and velocity in physics, exemplified by planetary motion, illustrates the complexity of differential equations where acceleration is a function of position.
  • ๐Ÿ“ˆ Solving differential equations involves finding functions that describe rates of change, such as velocity and acceleration, based on given conditions.
  • ๐Ÿ” The concept of phase space, a multi-dimensional representation of all possible states of a system, is crucial for understanding the dynamics of complex systems like the three-body problem.
  • ๐Ÿ’ป Numerical methods and simulations are essential tools for approximating solutions to differential equations when exact solutions are not feasible, highlighting the practical approach to studying these systems.

Q & A

  • What is the significance of differential equations in the study of physics?

    -Differential equations are significant in physics because they allow us to describe and model how quantities change over time or space. They are the language in which the laws of physics are expressed, making them essential for understanding and predicting phenomena in the physical world.

  • What are the two types of differential equations mentioned in the script, and how do they differ?

    -The two types of differential equations mentioned are Ordinary Differential Equations (ODEs) and Partial Differential Equations (PDEs). ODEs involve functions with a single input, often time, and describe changes in a finite collection of values. PDEs, on the other hand, deal with functions that have multiple inputs and can model changes across a continuum of values, such as temperature distribution in a solid body.

  • How does the script explain the concept of acceleration in the context of a thrown object?

    -The script explains acceleration by referring to the force of gravity near Earth's surface, which causes objects to accelerate downward at 9.8 meters per second squared. This means that for an object in free fall, the velocity increases by 9.8 meters per second every second, illustrating a simple example of a differential equation.

  • What is the role of initial conditions in solving differential equations?

    -Initial conditions play a crucial role in solving differential equations because they provide the starting point for the system's evolution. They determine the specific solution trajectory among potentially many, as the general solution to a differential equation may involve arbitrary constants that are fixed by the initial conditions.

  • Why are higher-order differential equations considered more complex than first-order ones?

    -Higher-order differential equations are more complex because they involve derivatives of higher orders, such as third or fourth derivatives. Solving these equations often requires finding functions whose higher-order derivatives are defined in terms of the function itself and its lower-order derivatives, which adds layers of complexity to the problem.

  • How does the script use the example of a pendulum to illustrate the difficulty of solving differential equations?

    -The script uses the pendulum example to show that even seemingly simple systems can lead to complex differential equations that are challenging to solve analytically. It points out that while the basic harmonic motion of a pendulum can be approximated under small angle assumptions, real pendulums exhibit more complex behavior that requires considering higher-order effects and non-linearities.

  • What is the significance of phase space in the study of differential equations?

    -Phase space is significant because it provides a geometric way to visualize the state of a system and its evolution over time. It is a space where each point represents a possible state of the system, and the trajectory through this space represents the system's evolution according to its differential equations. This visualization aids in understanding the dynamics and stability of the system.

  • How does the script relate the mathematical concept of differential equations to the concept of love and affection?

    -The script relates differential equations to love and affection by drawing an analogy between the mathematical model of a pendulum's swinging motion and the back-and-forth dynamics of a fluctuating romantic relationship. It suggests that the same mathematical tools used to analyze physical systems can also provide insights into human behavior and emotions.

  • What is the basic idea behind numerical methods for solving differential equations?

    -The basic idea behind numerical methods for solving differential equations is to approximate the solution by taking small, discrete steps through the phase space, guided by the vector field derived from the differential equations. This process simulates the continuous evolution of the system over time using finite differences instead of infinitesimals.

  • How does the script address the limitations of exact solutions in the context of chaos theory?

    -The script addresses the limitations of exact solutions by introducing chaos theory, which shows that even with a perfect solution, small changes in initial conditions can lead to vastly different outcomes in certain systems. This suggests that the complexity and unpredictability observed in the real world can be captured within the framework of differential equations, despite the challenges in finding exact solutions.

Outlines

00:00

๐Ÿ“š Introduction to Differential Equations

The paragraph introduces the concept of differential equations as a fundamental language of physics and other scientific disciplines. It emphasizes the importance of understanding this mathematical tool for analyzing change over time. The speaker outlines the purpose of the upcoming videos, which is to provide an overview of differential equations, including both ordinary (ODEs) and partial (PDEs) types. The basics of calculus and linear algebra are mentioned as prerequisites. Examples such as population growth and the motion described by Newtonian mechanics are given to illustrate the application of differential equations in describing change. The paragraph also introduces a simple example of a differential equation related to the gravitational acceleration of an object thrown in the air.

05:02

๐Ÿ” Deep Dive into Differential Equations and Their Complexity

This section delves deeper into the nature of differential equations, highlighting their complexity and the challenges they present. It discusses the difference between second-order and higher-order differential equations, using the example of a pendulum to illustrate the intricacies involved. The pendulum's motion is described by a differential equation that includes the sine function, which contrasts with the simple harmonic motion often taught in physics. The presence of air resistance adds a damping term to the equation, making it even more complex. The paragraph emphasizes the difficulty of solving these equations analytically and the need for numerical methods and computational tools to understand and predict the behavior of such systems.

10:05

๐ŸŒ Visualizing Dynamics with State Space and Vector Fields

The paragraph introduces the concept of state space and vector fields as a way to visualize and understand the dynamics of systems described by differential equations. It explains how a two-dimensional state space can represent all possible states of a pendulum with its angle and angular velocity. The vector field represents the rate of change of the system, and the trajectory through this space can be used to predict the system's evolution over time. The paragraph also discusses the use of numerical methods to approximate solutions by taking small steps in the state space based on the vector field. The idea of phase space is introduced as a more general term for state spaces, especially in the context of physics and Hamiltonian mechanics.

15:07

๐Ÿ”„ Exploring Stability and Attraction in Dynamic Systems

This section explores the concepts of stability and attraction in the context of dynamic systems, using the pendulum example to illustrate fixed points and their stability. It discusses how small perturbations can result in different behaviors, either returning to the fixed point or moving away from it. The paragraph also touches on the idea of phase flow, which describes the collection of all possible trajectories in the phase space. The concept is extended to non-physical systems, such as the dynamics of affection in relationships, showing the broad applicability of these mathematical tools. The paragraph concludes with a brief mention of numerical methods for solving differential equations, setting the stage for further discussion in upcoming videos.

20:10

๐Ÿ’ป Numerical Solutions and the Limits of Predictability

The final paragraph focuses on the practical aspect of solving differential equations through numerical methods, acknowledging the limitations of finding exact solutions. It provides a simple example of a Python program that numerically approximates the solution to the pendulum's differential equation. The paragraph discusses the trade-offs between accuracy and efficiency in numerical methods and introduces the broader implications of chaos theory. It reflects on the universe's complexity and the reassurance that this complexity can be studied and understood through mathematics, despite the inherent limits to prediction due to chaotic behavior in some systems.

Mindmap

Keywords

๐Ÿ’กDifferential Equations

Differential equations are mathematical equations that relate a function to its derivatives, expressing how the rate of change of a quantity depends on other quantities. In the video, differential equations are central to understanding the laws of physics and other fields. They are used to model phenomena where change is more easily described than absolute amounts, such as population growth or the motion of objects under gravity.

๐Ÿ’กOrdinary Differential Equations (ODEs)

ODEs are a type of differential equation that involves functions of a single variable, often time. The video explains that ODEs are used to model systems where a finite set of values changes over time, such as the motion of a thrown object under the influence of gravity, which is described by a simple ODE.

๐Ÿ’กPartial Differential Equations (PDEs)

PDEs involve functions with multiple inputs and are used to model systems where a continuum of values changes with time, such as temperature distribution across a solid body. The video mentions that PDEs will be explored in more detail in subsequent content, highlighting their complexity and importance in physics and engineering.

๐Ÿ’กDerivatives

Derivatives in calculus represent the rate of change of a function with respect to its variable. In the context of the video, derivatives are crucial for understanding how quantities evolve over time, as seen in the example of an object's velocity and acceleration being the first and second derivatives of its position.

๐Ÿ’กIntegrals

Integrals are the reverse process of differentiation and are used to find the accumulated change of a quantity. The video touches on the concept of integrating to solve differential equations, as in the case of finding the velocity and position of an object from its acceleration due to gravity.

๐Ÿ’กLinear Algebra

Linear algebra provides a structure for dealing with vectors and matrices, which are useful in handling multiple variables and transformations. The video mentions that some basic linear algebra is needed for more advanced discussions on differential equations, suggesting its role in handling complex systems with multiple dimensions.

๐Ÿ’กPhase Space

Phase space is a concept used to represent all possible states of a system. In the video, phase space is introduced as a way to visualize the evolution of a system through its state space, where each point represents a possible state of the system, and trajectories represent the system's evolution over time.

๐Ÿ’กVector Field

A vector field is a graphical representation where each point in space is associated with a vector, indicating the direction and magnitude of a quantity's change at that point. The video uses vector fields to illustrate how the state of a pendulum, described by its angle and angular velocity, evolves over time according to the differential equations governing its motion.

๐Ÿ’กNumerical Methods

Numerical methods are algorithms used to approximate the solutions of mathematical problems, particularly when exact solutions are not feasible. The video discusses numerical methods as a way to solve differential equations by simulating the system's evolution through small, discrete time steps, which is practical for complex systems that cannot be solved analytically.

๐Ÿ’กChaos Theory

Chaos theory deals with the study of dynamic systems that are highly sensitive to initial conditions, leading to unpredictable and complex behavior. The video alludes to chaos theory to explain that even with a perfect understanding of the equations governing a system, long-term prediction can be impossible due to the inherent unpredictability of chaotic systems.

Highlights

Differential equations are the language of change, essential for understanding physics and beyond.

The basics of calculus and linear algebra are prerequisites for studying differential equations.

Differential equations are used to model changes rather than absolute states, such as population growth or emotional changes.

Newtonian mechanics uses force to describe motion, which is a concept of change, leading to differential equations.

Differential equations come in two forms: Ordinary Differential Equations (ODEs) and Partial Differential Equations (PDEs).

PDEs deal with multiple inputs and are used to model phenomena like temperature distribution or fluid velocity.

ODEs are used for systems where change is described by a single variable, often time.

Physics provides simple yet profound examples to illustrate differential equations, such as the motion of objects under gravity.

The concept of gravity as g (9.8 m/sยฒ) near Earth's surface leads to a simple differential equation model.

Solving differential equations involves integrating to find the function based on its rate of change.

Differential equations in physics often involve second-order derivatives, representing acceleration.

Higher-order differential equations introduce more complexity, involving third or higher derivatives.

The study of pendulum motion provides a complex example of a differential equation that is not easily solvable.

The presence of a sine function in a differential equation can lead to non-sinusoidal behavior in the solution.

Differential equations can be approached without finding an exact solution, focusing on understanding and computation.

Phase space is a powerful concept for visualizing the state of a system in a multi-dimensional space.

Numerical methods allow for the approximation of solutions to differential equations through iterative steps.

Chaos theory reveals the limitations of prediction even with exact solutions due to sensitive dependence on initial conditions.

Differential equations and their solutions can be applied to various fields, including modeling human emotions and behaviors.

Transcripts

play00:03

Taking a quote from Stephen Strogatz, since Newton,

play00:06

mankind has come to realize that the laws of physics are always expressed in the

play00:10

language of differential equations.

play00:13

Of course, this language is spoken well beyond the boundaries of physics as well,

play00:17

and being able to speak it and read it adds a new color to how you view the world around

play00:21

you.

play00:22

In the next few videos, I want to give a sort of tour of this topic.

play00:25

The aim is to give a big picture view of what this piece of math is all about,

play00:29

while at the same time being happy to dig into the details of specific examples as they

play00:33

come along.

play00:35

I'll be assuming you know the basics of calculus,

play00:37

like what derivatives and integrals are, and in later videos we'll need some basic linear

play00:41

algebra, but not too much beyond that.

play00:44

Differential equations arise whenever it's easier

play00:47

to describe change than absolute amounts.

play00:49

It's easier to say why population sizes, for example,

play00:52

grow or shrink than it is to describe why they have the particular values they

play00:57

do at some point in time.

play00:59

It may be easier to describe why your love for someone

play01:02

is changing than why it happens to be where it is now.

play01:05

In physics, more specifically Newtonian mechanics,

play01:08

motion is often described in terms of force, and force determines acceleration,

play01:12

which is a statement about change.

play01:15

These equations come in two different flavors, ordinary differential equations,

play01:19

or ODEs, involving functions with a single input, often thought of as time,

play01:24

and partial differential equations, or PDEs, dealing with functions that have multiple

play01:29

inputs.

play01:30

Partial differential equations are something we'll

play01:32

be looking at more closely in the next video.

play01:35

You often think of them as involving a whole continuum of values changing with time,

play01:39

like the temperature at every point of a solid body,

play01:42

or the velocity of a fluid at every point in space.

play01:46

Ordinary differential equations, our focus for now,

play01:49

involve only a finite collection of values changing with time.

play01:53

And it doesn't have to be time per se, your one independent variable

play01:56

could be something else, but things changing with time are the

play01:59

prototypical and most common example of differential equations.

play02:04

Physics offers a nice playground for us here, with simple examples to start with,

play02:08

and no shortage of intricacy and nuance as we delve deeper.

play02:13

As a nice warmup, consider the trajectory of something you throw in the air.

play02:17

The force of gravity near the surface of Earth causes things

play02:21

to accelerate downward at 9.8 meters per second per second.

play02:26

Now unpack what that's really saying.

play02:28

It means if you look at that object free from other forces,

play02:32

and record its velocity at every second, these velocity vectors will accrue an

play02:38

additional small downward component of 9.8 meters per second every second,

play02:43

we call this constant 9.8 g for gravity.

play02:47

This is enough to give us an example of a differential equation,

play02:50

albeit a relatively simple one.

play02:52

Focus on the y-coordinate as a function of time.

play02:57

Its derivative gives the vertical component of velocity,

play03:01

whose derivative in turn gives the vertical component of acceleration.

play03:10

For compactness, let's write the first derivative

play03:12

as y-dot and the second derivative as y-double-dot.

play03:15

Our equation says that y-double-dot is equal to negative g, a simple constant.

play03:22

This is one we can solve by integrating, which

play03:24

is essentially working the question backwards.

play03:27

First, to find velocity, you ask, what function has negative g as a derivative?

play03:32

Well, it's negative g times t, or more specifically,

play03:36

negative gt plus the initial velocity.

play03:40

Notice that there are many functions with this particular derivative,

play03:43

so you have an extra degree of freedom which is determined by an initial condition.

play03:48

Now what function has this as a derivative?

play03:51

It turns out to be negative one-half g times t squared plus that initial velocity

play03:56

times t, and again we're free to add an additional constant without changing the

play04:01

derivative, and that constant is determined by whatever the initial position is.

play04:06

And there you go, we just solved a differential equation,

play04:09

figuring out what a function is based on information about its rate of change.

play04:14

Things get more interesting when the forces acting on a body depend on where that body is.

play04:20

For example, studying the motion of planets, stars,

play04:22

and moons, gravity can no longer be considered a constant.

play04:26

Given two bodies, the pole on one of them is in the direction of the other,

play04:30

with a strength inversely proportional to the square of the distance between them.

play04:37

As always, the rate of change of position is velocity,

play04:40

but now the rate of change of velocity, acceleration, is some function of position,

play04:45

so you have this dance between two mutually interacting variables,

play04:50

reminiscent of the dance between the two moving bodies which they describe.

play04:58

This is reflective of the fact that often in differential equations,

play05:02

the puzzles you face involve finding a function whose derivative and

play05:05

or higher order derivatives are defined in terms of the function itself.

play05:10

In physics it's most common to work with second order differential equations,

play05:14

which means the highest derivative you find in this expression is a second derivative.

play05:19

Higher order differential equations would be ones involving third derivatives,

play05:24

fourth derivatives, and so on, puzzles with more intricate clues.

play05:28

The sensation you get when really meditating on one of these

play05:31

equations is one of solving an infinite continuous jigsaw puzzle.

play05:35

In a sense, you have to find infinitely many numbers, one for each point in time t,

play05:40

but they're constrained by a very specific way that these values intertwine with

play05:45

their own rate of change, and the rate of change of that rate of change.

play05:50

To get a feel for what studying these can look like,

play05:53

I want you to take some time digging into a deceptively simple example, a pendulum.

play05:57

How does this angle theta that it makes with the vertical change as a function of time?

play06:04

This is often given as an example in introductory physics classes of harmonic motion,

play06:08

meaning it oscillates like a sine wave.

play06:10

More specifically, one with a period of 2 pi times the square root of l over g,

play06:16

where l is the length of the pendulum and g is the strength of gravity.

play06:22

However, these formulas are actually lies, or rather,

play06:25

approximations which only work in the realm of small angles.

play06:29

If you were to go and measure an actual pendulum,

play06:32

what you'd find is that as you pull it out farther,

play06:35

the period is longer than what the high school physics formulas would suggest.

play06:43

And when you pull it out really far, this value of theta

play06:47

plotted versus time doesn't even look like a sine wave anymore.

play06:54

To understand what's really going on, first things first,

play06:57

let's set up the differential equation.

play06:59

We'll measure the position of the pendulum's weight as a distance x along this arc,

play07:04

and if the angle theta we care about is measured in radians,

play07:08

we can write x as l times theta, where l is the length of the pendulum.

play07:13

As usual, gravity pulls down with an acceleration of g,

play07:16

but because the pendulum constrains the motion of this mass,

play07:19

we have to look at the component of this acceleration in the direction of motion.

play07:25

A little geometry exercise for you is to show

play07:28

that this little angle here is the same as theta.

play07:35

So the component of gravity in the direction of motion

play07:39

opposite this angle will be negative g times sine of theta.

play07:46

Here we're considering theta to be positive when the pendulum is swung to the right,

play07:50

and negative when it's swung to the left.

play07:52

This minus sign in the acceleration indicates that it's

play07:55

always pointed in the opposite direction from displacement.

play08:00

So what we have is that the second derivative of x,

play08:03

the acceleration, is negative g times sine of theta.

play08:07

As always, it's nice to do a quick gut check that our formula makes physical sense.

play08:12

When theta is zero, sine of zero is zero, so there's

play08:15

no acceleration in the direction of movement.

play08:18

When theta is 90 degrees, sine of theta is 1, so the

play08:21

acceleration is the same as it would be for freefall.

play08:25

Alright, that checks out.

play08:27

And because x is L times theta, that means the second

play08:31

derivative of theta is negative g over L times sine of theta.

play08:36

To be a little more realistic, let's add in a term to account for the air resistance,

play08:40

which maybe we model as being proportional to the velocity.

play08:44

We'll write this as negative mu times theta dot,

play08:46

where mu is some constant that encapsulates all the air resistance

play08:50

and friction and such that determines how quickly the pendulum loses energy.

play08:55

Now this, my friends, is a particularly juicy differential equation.

play09:00

It's not easy to solve, but it's not so hard that we can't

play09:03

reasonably get some meaningful understanding out of it.

play09:06

At first glance, you might think that the sine function you

play09:08

see here relates to the sine wave pattern for the pendulum.

play09:12

Ironically, though, what you'll eventually find is that the opposite is true.

play09:16

The presence of the sine in this equation is precisely

play09:19

why real pendulums don't oscillate with a sine wave pattern.

play09:23

If that sounds odd, consider the fact that here,

play09:26

the sine function is taking theta as an input,

play09:28

but in the approximate solution you might see in a physics class,

play09:32

theta itself is oscillating as the output of a sine function.

play09:36

Clearly something fishy is afoot.

play09:39

One thing I like about this example is that, even though it's comparatively simple,

play09:43

it exposes an important truth about differential equations that you need to grapple with.

play09:48

They're really freaking hard to solve.

play09:50

In this case, if we remove that dampening term,

play09:53

we can just barely write down an analytic solution, but it's hilariously complicated.

play09:58

It involves all these functions you've probably never heard of,

play10:01

written in terms of integrals and weird inverse integral problems.

play10:04

When you step back, presumably the reason for finding a solution is to then be able

play10:09

to make computations and build an understanding for whatever dynamics you're studying.

play10:15

In this case, those questions have been punted off to figuring out how to compute,

play10:19

and more importantly, understand, these new functions.

play10:23

And more often, like if we add back in that dampening term,

play10:26

there's not a known way to write down an exact analytic solution.

play10:31

Well, for any hard problem you could just define a new function to be the answer of

play10:35

that problem, heck, even name it after yourself if you want, but again,

play10:39

that's pointless unless it leads you to being able to make computations and build

play10:43

understanding.

play10:45

So instead, in the study of differential equations, we often do a sort of short circuit,

play10:50

and skip the actual solution part, since it's unattainable,

play10:53

and go straight to building understanding and making computations from the

play10:57

equations alone.

play10:58

Let me walk through what that might look like with a pendulum.

play11:02

What do you hold in your head, or what visualization can you get some software

play11:06

to pull up for you, to understand the many possible ways that a pendulum,

play11:10

governed by these laws, might evolve depending on its starting conditions?

play11:15

You might be tempted to try imagining the graph of theta vs.

play11:18

t, and somehow interpreting how this slope, position,

play11:22

and curvature all interrelate with each other.

play11:25

However, what will turn out to be both easier and more general is to

play11:29

start by visualizing all possible states in a two-dimensional plane.

play11:37

What I mean by the state of the pendulum is that you can describe it with two numbers,

play11:41

the angle and the angular velocity.

play11:43

You can freely change either one of those two values without necessarily

play11:47

changing the other, but the acceleration is purely a function of those two values.

play11:52

So each point of this two-dimensional plane fully

play11:55

describes the pendulum at any given moment.

play11:59

You might think of these as all possible initial conditions of that pendulum.

play12:03

If you know the initial angle and the angular velocity,

play12:07

that's enough to predict how the system will evolve as time moves forward.

play12:14

If you haven't worked with them before, these

play12:16

sorts of diagrams can take a little getting used to.

play12:18

What you're looking at now, this inward spiral,

play12:21

is a fairly typical trajectory for our pendulum,

play12:24

so take a moment to think carefully about what is being represented.

play12:30

Notice how at the start, as theta decreases, theta dot,

play12:33

the y-coordinate, gets more negative.

play12:36

Which makes sense, because the pendulum moves faster

play12:39

in the leftward direction as it approaches the bottom.

play12:43

Keep in mind, even though the velocity vector on this pendulum is pointed to the left,

play12:48

the value of that velocity is always being represented by

play12:51

the vertical component of our space.

play12:54

It's important to remind yourself that this state space is an abstract thing,

play12:58

and is distinct from the physical space where the pendulum itself lives and moves.

play13:04

Since we're modeling this as losing some of its energy to air resistance,

play13:09

this trajectory spirals inward, meaning the peak velocity and

play13:12

peak displacement each go down a bit with each swing.

play13:16

Our point is, in a sense, attracted to the origin, where theta and theta dot both equal 0.

play13:25

With this space, we can visualize a differential equation as a vector field.

play13:30

Here, let me show you what I mean.

play13:31

The pendulum state is a vector, theta, theta dot.

play13:35

Maybe you think of that as an arrow from the origin, or maybe you think of it as a point.

play13:39

What matters is that it has two coordinates, each a function of time.

play13:43

Taking the derivative of that vector gives you its rate of change,

play13:48

the direction and speed that it will tend to move in this diagram.

play13:53

That derivative is a new vector, theta dot theta double dot,

play13:57

which we visualize as being attached to the relevant point in space.

play14:03

Take a moment to interpret what this is saying.

play14:06

The first component for this rate of change vector is theta dot,

play14:09

which is also a coordinate in our space.

play14:12

The higher up we are in the diagram, the more the point tends to move to the right,

play14:17

and the lower we are, the more it tends to move to the left.

play14:24

The vertical component is theta double dot, which our differential

play14:28

equation lets us rewrite entirely in terms of theta and theta dot itself.

play14:32

In other words, the first derivative of our state vector is some function of

play14:37

that vector itself, with most of the intricacy tied up in that second coordinate.

play14:41

Doing the same at all points of this space will show

play14:44

how that state tends to change from any position.

play14:48

As is typical with vector fields, we artificially scale down the vectors when

play14:51

we draw them to prevent clutter, but use color to loosely indicate magnitude.

play14:56

Notice we've effectively broken up a single second-order

play15:00

equation into a system of two first-order equations.

play15:04

You might even give theta dot a different name,

play15:06

to emphasize that we're really thinking of two separate values,

play15:10

intertwined via this mutual effect they have on one another's rate of change.

play15:14

This is a common trick in the study of differential equations.

play15:17

Instead of thinking about higher order changes of a single value,

play15:21

we often prefer to think of the first derivative of vector values.

play15:25

In this form, we have a wonderful visual way to

play15:28

think about what solving the equation means.

play15:31

As our system evolves from some initial state,

play15:34

our point in this space will move along some trajectory in such a

play15:38

way that at every moment, the velocity of that point matches the vector from this field.

play15:44

And again, keep in mind, this velocity is not the same thing as

play15:48

the physical velocity of the pendulum, it's a more abstract rate of change,

play15:52

encoding the rates of change for both theta and theta dot.

play15:57

You might find it fun to pause for a moment and think through

play16:00

what exactly some of these trajectory lines say about the possible

play16:03

ways the pendulum evolves from different starting conditions.

play16:09

For example, in regions where theta dot is quite high,

play16:12

the vectors guide the point to travel to the right quite a ways before settling

play16:17

down into an inward spiral.

play16:19

This corresponds to a pendulum with a high enough initial velocity that it

play16:23

fully rotates around several times before settling into a decaying back and forth.

play16:31

Having a little more fun?

play16:33

When I tweak this air resistance term, mu, say increasing it,

play16:37

you can immediately see how this will result in trajectories that spiral inward faster,

play16:42

which is to say the pendulum slows down faster.

play16:46

That's obvious when I call it the air resistance term,

play16:48

but imagine that you saw these equations out of context,

play16:51

not knowing that they described a pendulum.

play16:54

It's not obvious just looking at them that increasing this value of mu

play16:58

means the system as a whole tends towards some attracting state faster.

play17:03

So getting some software to draw these vector fields for you

play17:06

can be a great way to build an intuition for how they behave.

play17:09

What's wonderful is that any system of ordinary differential equations can be

play17:14

described by a vector field like this, so it's a very general way to get a feel for them.

play17:19

Usually, though, they have many more dimensions.

play17:22

For example, consider the famous three-body problem,

play17:25

which is to predict how three masses in three-dimensional space evolve if

play17:29

they act on each other with gravity, and if you know their initial positions

play17:33

and velocities.

play17:35

Each mass has three coordinates describing its position,

play17:38

and three more describing its momentum.

play17:41

So the system has 18 degrees of freedom in total,

play17:44

and hence an 18-dimensional space of possible states.

play17:48

It's a bizarre thought, isn't it?

play17:50

A single point meandering through an 18-dimensional space that we cannot visualize,

play17:54

obediently taking steps through time based on whatever vector it happens to

play17:59

be sitting on from moment to moment, completely encoding the positions and

play18:03

the momenta of the three masses we see in ordinary, physical 3D space.

play18:08

In practice, you can reduce the number of dimensions here by taking

play18:11

advantage of the symmetries of your setup, but the point that more

play18:15

degrees of freedom results in higher dimensional state spaces remains the same.

play18:21

In math, we often call a space like this a phase space.

play18:25

You'll hear me use that term broadly for spaces encoding all kinds of

play18:28

states of changing systems, but you should know that in the context of physics,

play18:33

especially Hamiltonian mechanics, the term is often reserved for a more special case,

play18:37

namely a space whose axes represent position and momentum.

play18:41

So a physicist would agree that the 18-dimensional space describing the

play18:45

three-body problem is a phase space, but they might ask that we make a couple

play18:49

of modifications to our pendulum setup for it to properly deserve the term.

play18:54

For those of you who just watched the block collision video,

play18:57

the planes we worked with there would be called phase spaces by math folk,

play19:00

though a physicist might prefer other terminology.

play19:03

Just know that the specific meaning may depend on your context.

play19:07

It may seem like a simple idea, depending on how well indoctrinated you

play19:11

are to modern ways of thinking about math, but it's worth keeping in mind

play19:15

that it took humanity quite a while to really embrace thinking of dynamics

play19:19

spatially like this, especially when the dimensions get very large.

play19:23

In his book Chaos, the author James Glick describes phase space as,

play19:28

"One of the most powerful inventions of modern science".

play19:31

One reason its powerful is that you can ask questions,

play19:35

not just about a single initial condition but about a whole spectrum of initial states.

play19:40

The collection of all possible trajectories is reminiscent of a moving fluid.

play19:45

So we call it phase flow.

play19:46

To take one example of why phase flow is a fruitful idea,

play19:50

consider the question of stability.

play19:52

The origin of our space corresponds to the pendulum standing still,

play19:56

and so does this point over here, representing when the pendulum is perfectly

play20:00

balanced upright.

play20:02

These are the so-called fixed points of our system,

play20:05

and one natural question to ask is whether or not they're stable, that is,

play20:09

will tiny nudges to the system result in a state that tends back towards that

play20:14

fixed point, or away from it?

play20:16

Physical intuition for the pendulum makes the answer here kind of obvious,

play20:19

but how would you think about stability just looking at the equations,

play20:23

say if they arose in some completely different less intuitive context?

play20:28

We'll go over how to compute the answers to questions like this in following videos,

play20:32

and the intuition for the relevant computations are guided heavily by

play20:36

the thought of looking at small regions in space around a fixed point,

play20:39

and asking whether the flow tends to contract or expand.

play20:44

And speaking of attraction and stability, let's take a brief side-step to talk about love.

play20:50

The Strogatz quote that I mentioned earlier comes from a whimsical column in

play20:54

the New York Times on the mathematics of modelling affection,

play20:56

an example well worth pilfering to illustrate that we're not just talking

play21:00

about physics here.

play21:01

Imagine you've been flirting with someone, but there's been some frustrating

play21:05

inconsistency to how mutual your affection seems,

play21:07

and perhaps during a moment when you turn your attention towards physics

play21:11

to keep your mind off the romantic turmoil, mulling over the broken-up

play21:14

pendulum equations, you suddenly understand the on-again-off-again dynamics

play21:18

of your flirtation.

play21:19

You've noticed that your own affection tends to increase when your

play21:24

companion seems interested in you, but decrease when they seem colder.

play21:29

That is, the rate of change for your love is proportional to their feelings for you.

play21:35

But this sweetheart of yours is precisely the opposite,

play21:39

strangely attracted to you when you seem uninterested,

play21:42

but turned off once you seem too keen.

play21:46

The phase space for these equations looks very

play21:48

similar to the center part of your pendulum diagram.

play21:51

The two of you will go back and forth between affection and repulsion in an endless cycle.

play21:58

A metaphor of pendulum swings in your feelings would not just be apt,

play22:02

but mathematically verified.

play22:03

In fact, if your partner's feelings were further slowed when they feel

play22:07

themselves too in love, let's say out of a fear of being made vulnerable,

play22:11

we'd have a term matching the friction in the pendulum,

play22:14

and you too would be destined to an inward spiral towards mutual ambivalence.

play22:19

I hear wedding bells already.

play22:21

The point is that two very different-seeming laws of dynamics, one from physics,

play22:25

involving a single variable, and another from, uh, chemistry, with two variables,

play22:30

actually have a very similar structure, easier to recognize when you're looking at the

play22:35

phase diagram.

play22:36

Most notably, even though the equations are different,

play22:39

for example there's no sine function in the romance equations,

play22:42

the phase space exposes an underlying similarity nevertheless.

play22:47

In other words, you're not just studying a pendulum right now,

play22:50

the tactics you develop to study one case have a tendency to transfer to many others.

play22:57

Okay, so phase diagrams are a nice way to build understanding,

play23:00

but what about actually computing the answer to our equation?

play23:05

One way to do this is to essentially simulate what the universe would do,

play23:09

but using finite time steps instead of the infinitesimals and limits defining calculus.

play23:14

The basic idea is that if you're at some point in this phase diagram,

play23:18

take a step based on the vector you're sitting on for a small time step, delta t.

play23:22

Specifically, take a step equal to delta t times that vector.

play23:27

As a reminder, in drawing these vector fields,

play23:29

the magnitude for each vector has been artificially scaled down to prevent clutter.

play23:34

When you do this repeatedly, your final location will be an approximation of theta t,

play23:40

where t is the sum of all those time steps.

play23:44

If you think about what's being shown right now, though,

play23:46

and what that would imply for the pendulum's movement,

play23:49

you'd probably agree that this is grossly inaccurate.

play23:52

But that's only because the time step delta t of 0.5 is way too big.

play23:57

If we turned it down, say to 0.01, you can get a much more accurate approximation,

play24:02

it just takes more repeated steps is all.

play24:05

In this case, computing theta of 10 requires 1000 little steps.

play24:11

Luckily, we live in a world with computers, so repeating a simple task 1000

play24:15

times is as simple as articulating that task with a programming language.

play24:19

In fact, let's finish things off by writing a little

play24:22

python program that computes theta of t for us.

play24:25

What it has to do is make use of the differential equation,

play24:28

which returns the second derivative of theta as a function of theta and theta dot.

play24:34

You start off by defining two variables, theta and theta dot,

play24:37

each in terms of some initial conditions.

play24:40

In this case I'll have theta start at pi thirds,

play24:43

which is 60 degrees, and theta dot start at 0.

play24:47

Next, write a loop that corresponds to taking many little time steps

play24:52

between 0 and time t, each of size delta t, which I'm setting here to be 0.01.

play24:58

In each step of this loop, increase theta by theta dot times delta t,

play25:02

and increase theta dot by theta double dot times delta t,

play25:06

where theta double dot can be computed based on the differential equation.

play25:11

After all these little time steps, simply return the value of theta.

play25:16

This is called solving a differential equation numerically.

play25:20

Numerical methods can get way more sophisticated and intricate than this to better

play25:24

balance the tradeoff between accuracy and efficiency, but this loop gives the basic idea.

play25:30

So even though it sucks that we can't always find exact solutions,

play25:33

there are still meaningful ways to study differential equations in the face of

play25:37

this inability.

play25:38

In the following videos, we'll look at several methods for finding exact

play25:42

solutions when it's possible, but one theme I'd like to focus on is how these

play25:47

exact solutions can also help us to study the more general, unsolvable cases.

play25:52

But it gets worse.

play25:54

Just as there's a limit to how far exact analytic solutions can get us,

play25:58

one of the great fields to have emerged in the last century, chaos theory,

play26:02

has exposed that there are further limits on how well we can use these systems for

play26:06

prediction with or without solutions.

play26:09

Specifically, we know that for some systems, small variations to the initial conditions,

play26:14

say the kind due to necessarily imperfect measurements,

play26:17

result in wildly different trajectories.

play26:20

We've even built some good understanding for why this happens.

play26:23

The three-body problem, for example, is known to have seeds of chaos within it.

play26:28

So looking back at the quote from earlier, it seems almost cruel of the

play26:32

universe to fill its language with riddles that we either can't solve,

play26:36

or where we know that any solution would be useless for long-term prediction anyway.

play26:40

It is cruel, but then again it should also be reassuring.

play26:45

It gives some hope that the complexity we see in the world around us can be studied

play26:49

somewhere in this math, and that it's not hidden away in the mismatch between model and

play26:53

reality.

Rate This
โ˜…
โ˜…
โ˜…
โ˜…
โ˜…

5.0 / 5 (0 votes)

Related Tags
Differential EquationsPhysicsMathematicsChaos TheoryNewtonian MechanicsPhase SpaceVector FieldsNumerical MethodsLove DynamicsEducational Content