From the series: Differential Equations and Linear Algebra
Gilbert Strang, Massachusetts Institute of Technology (MIT)
With constant coefficients in a differential equation, the basic solutions are exponentials est. The exponent s solves a simple equation such as As2 + Bs + C = 0.
OK. So today is unforced-- that means zero on the right-hand side, looking for null solutions-- damped-- that means there is a coefficient B in the first derivative. And what's the solution? This is really a basic, basic equation. In many applications, A would be the mass.
In a spring, for example, A would be a mass. B is the damping, the friction. And C is the spring constant, the force that pulls the mass back. Or in electronics, B would be the resistance. It's giving some friction, giving some heat.
So that's our equation. Just we have to be able to solve it. And we want to look for exponentials. A pure exponential is just right for a constant coefficient equation like that. So I'll substitute y equals e to the st. And what happens?
Well, so there's a C e to the st. That's a Cy. The derivative brings down an s. Two derivatives bring down s squared. So I simply have As squared, Bs, and C all together, multiplying e to the st. And how'd I get 0? Well the 0 is not going to come from e to the st, so it has to come from this.
So fundamentally, the whole video and more is about a quadratic equation. As squared plus Bs plus C equals 0. We have to solve it. We have to understand how does the answer depend on these numbers, A and B and C, the constants? OK?
So we know the route. We know the solutions. The quadratic formula tells us that the two solutions-- there are always two, but they could be equal-- have this-- do you recognize this expression?
You see the damping coefficient coming in. You see this all important square root, which tells us, depending on whether B squared is bigger than 4AC, B squared is equal 4AC, B squared is smaller. So smaller B means less damping. And it would be called underdamping..
So here are the possibilities. B could be 0. That puts us back in a previous video when the solution was a pure complex exponential, pure sine cosine. There was no damping. It just oscillated forever. That's the one we know.
Now, the new ones with a B are B squared could be smaller. So that's only a little damping. And in that case, what does the solution look like? If B squared is smaller than 4AC, I have to always look back here. So I have something negative.
Something negative, a minus B over 2A. And then plus or minus-- and what's important point about this guy? B squared is smarter than 4AC. This is negative inside. So its square root is an imaginary number. So the plus or minus, there's an imaginary number.
A little different from the natural frequency. It's called the damp frequency. Not quite as frequent. The damping slows the oscillation down a little bit, but it brings in exponential decay. I'll draw a picture this time or next time of the solution, e to the minus st.
But you see, e to the minus st is decaying to 0. It's like a spring that's slowly winding down to 0. But it's oscillating as it does it. OK. Now, we've got two more possibilities here.
And these are just fun to get straight. There's the next one. When B squared is exactly 4AC. Exactly 4AC. B squared over 4AC, that's going to be the critical ratio here. And here that ratio is 1. And in that case, that square root is nothing. The square root of B squared minus 4AC is 0. So we get s1 and s2 equal. Two equal frequencies.
Real numbers. They're the minus B over 2A. So s1 and s2 are both minus B over 2A. That's just the edge between the decay with oscillation from underdamping. And the opposite extreme is overdamping. Overdamping, when B squared is bigger than 4AC, then our formula-- we're always looking back at that quadratic formula. B squared bigger than 4AC, this is real. Square root of a positive number. It's perfectly real.
So in that case, we have two, s1 and s2. Oh, let me draw you some pictures. I'll draw you the parabola, the As squared. So this is a graph of As squared. Let me plot As squared plus Bs plus C.
So in this overdamping case, we might have a lot of damping. B is pretty large. And that would be-- this direction is s. And I'm graphing here s squared plus-- well, let me see. I think probably plus 2s. And now I'm going to choose this-- oh, actually, plus 0 to get that one.
So this has a root at-- this is overdamping. Overdamping. A big number there. C is 0. No mass at all. No stiffness at all. So this parabola has a root at 0 and a root at minus 2. That would be an extreme case with no stiffness whatever.
Now, let me add some stiffness. So what happens if I change the constant term? It lifts the graph. It lifts the graph. So let me make it 1. So I move the whole graph up by 1. So you see that as I move it up, these roots will come closer and closer. And at the right point, when I move it up to 1, what's going on there?
Critical damping. Critical damping. This is the case s squared plus 2s plus 1. Which is exactly s plus 1 twice. And it has that repeated root, which we always recognized as the marginal case when it doesn't go below, but it doesn't stay above either. It hits here twice.
So the root is minus 1 twice. That's critical. And now what? Increase this constant C even further. You'll lift the graph, lift the parabola up here. Lift it by one more, let's say. And what's going on there?
So this would be s squared plus 2s plus 2. And you see what that graph is telling us. It's telling us there are no roots, no real roots. This is a real graph in the real plane, and it's never 0. This is s plus 1. This is the case when I have s plus 1 squared plus 1. Can't be 0. Never 0.
So this has-- sorry. With the 2 there, it has damping. It has damping, but it's underdamping. The roots are complex. So this s plus 1 squared is 0. What are the roots of that? s is minus 1 plus or minus i. That's the case of underdamping. So let me write that.
We see so much from these graphs. So this was a graph in which I changed the constant term, the capital C, the stiffness, k. So that lifted the graph. And eventually the roots were complex. They weren't real anymore, because the parabola didn't cross the axis anymore. The roots are where it crosses the axis.
So that's one. I'll draw in the next video another picture. Maybe change B. Change the damping. So what would happen if I change the damping? If there's no damping, the roots are pure imaginary. Yeah. Let's just go back through those four possibilities, because that's what you have to learn.
If B is 0, there's no damping at all. And we're back in the pure oscillation, where is pure imaginary. We're just seeing cosines and sines. Then if we add a little damping, there appears a decay turn. If we add-- I could even draw these possibilities.
Let me draw the solution y of t, against t. OK. So underdamping-- the solutions say it starts there-- will oscillate, but decay. So this is underdamping. And you remember when that happens? That's when B is present but smaller. B squared is smaller than 4AC.
Overdamping, if it starts, let's say, here, it will going to 0, probably with no oscillation at all. It could have one oscillation. Depends how it starts. So ooh, let me make this picture. So that one is the overdamping. This guy is the underdamping. Underdamping still has oscillations. Overdamping has, at most, once. It could cross once. But overdamping is B squared bigger than 4AC.
OK. There's more to do. This is so central that you have to think about the ratio of B squared to 4AC. That has its own name. And it's a damping ratio, or the square of a damping ratio. And we identify all these solutions.
Does everybody know where the solution will be when B is 0? No damping at all. In that case, it will just oscillate. So my picture is getting, you could say, a little messed up. But this pure oscillation would be the B equals 0 with undamped.
OK. That's a first look at quadratic equations. As squared plus Bs plus C. It has the big name characteristic equation, but you could see, it's the fundamental equation for a second order differential equation. So we'll see more of it. Thanks.
1.1: Overview of Differential Equations Linear equations include dy/dt = y, dy/dt = –y, dy/dt = 2ty . The equation dy/dt = y *y is nonlinear.
1.2: The Calculus You Need The sum rule, product rule, and chain rule produce new derivatives from the derivatives of xn , sin(x ) and ex . The Fundamental Theorem of Calculus says that the integral inverts the derivative.
1.4b: Response to Exponential Input, exp(s*t) With exponential input, est , from outside and exponential growth, eat , from inside, the solution, y(t), is a combination of two exponentials.
1.4c: Response to Oscillating Input, cos(w*t) An oscillating input cos(ωt ) produces an oscillating output with the same frequency ω (and a phase shift).
1.4d: Solution for Any Input, q(t) To solve a linear first order equation, multiply each input q(s) by its growth factor and integrate those outputs.
1.4e: Step Function and Delta Function A unit step function jumps from 0 to 1. Its slope is a delta function: zero everywhere except infinite at the jump.
1.5: Response to Complex Exponential, exp(i*w*t) = cos(w*t)+i*sin(w*t) For linear equations, the solution for f = cos(ωt ) is the real part of the solution for f = eiωt . That complex solution has magnitude G (the gain).
1.6: Integrating Factor for a Constant Rate, a The integrating factor e-at multiplies the differential equation, y’=ay+q, to give the derivative of e-at y: ready for integration.
1.6b: Integrating Factor for a Varying Rate, a(t) The integral of a varying interest rate provides the exponent in the growing solution (the bank balance).
1.7: The Logistic Equation When –by2 slows down growth and makes the equation nonlinear, the solution approaches a steady state y( ∞) = a/b.
1.7c: The Stability and Instability of Steady States Steady state solutions can be stable or unstable – a simple test decides.
2.1: Second Order Equations For the oscillation equation with no damping and no forcing, all solutions share the same natural frequency.
2.1b: Forced Harmonic Motion With forcing f = cos(ωt ), the particular solution is Y *cos(ωt ). But if the forcing frequency equals the natural frequency there is resonance.
2.3: Unforced Damped Motion With constant coefficients in a differential equation, the basic solutions are exponentials est . The exponent s solves a simple equation such as As2 + Bs + C = 0 .
2.3c: Impulse Response and Step Response The impulse response g is the solution when the force is an impulse (a delta function). This also solves a null equation (no force) with a nonzero initial condition.
2.4: Exponential Response - Possible Resonance Resonance occurs when the natural frequency matches the forcing frequency — equal exponents from inside and outside.
2.4b: Second Order Equations With Damping A damped forced equation has a particular solution y = G cos(ωt – α). The damping ratio provides insight into the null solutions.
2.5: Electrical Networks: Voltages and Currents Current flowing around an RLC loop solves a linear equation with coefficients L (inductance), R (resistance), and 1/C (C = capacitance).
2.6: Methods of Undetermined Coefficients With constant coefficients and special forcing terms (powers of t , cosines/sines, exponentials), a particular solution has this same form.
2.6b: An Example of Method of Undetermined Coefficients This method is also successful for forces and solutions such as (at2 + bt +c) est : substitute into the equation to find a, b, c .
2.6c: Variations of Parameters Combine null solutions y1 and y2 with coefficients c1(t) and c2(t) to find a particular solution for any f(t).
2.7: Laplace Transform: First Order Equation Transform each term in the linear differential equation to create an algebra problem. You can then transform the algebra solution back to the ODE solution, y(t) .
2.7b: Laplace Transform: Second Order Equation The second derivative transforms to s2Y and the algebra problem involves the transfer function 1/ (As2 + Bs +C).
3.1: Pictures of the Solutions The direction field for dy/dt = f(t,y) has an arrow with slope f at each point t, y . Arrows with the same slope lie along an isocline.
3.2: Phase Plane Pictures: Source, Sink Saddle Solutions to second order equations can approach infinity or zero. Saddle points contain a positive and also a negative exponent or eigenvalue.
3.2b: Phase Plane Pictures: Spirals and Centers Imaginary exponents with pure oscillation provide a “center” in the phase plane. The point (y, dy/dt) travels forever around an ellipse.
3.2c: Two First Order Equations: Stability A second order equation gives two first order equations for y and dy/dt . The matrix becomes a companion matrix.
3.3: Linearization at Critical Points A critical point is a constant solution Y to the differential equation y’ = f(y) . Near that Y , the sign of df/dy decides stability or instability.
3.3b: Linearization of y'=f(y,z) and z'=g(y,z) With two equations, a critical point has f(Y,Z) = 0 and g(Y,Z) = 0. Near those constant solutions, the two linearized equations use the 2 by 2 matrix of partial derivatives of f and g .
3.3c: Eigenvalues and Stability: 2 by 2 Matrix, A Two equations y’ = Ay are stable (solutions approach zero) when the trace of A is negative and the determinant is positive.
5.1: The Column Space of a Matrix, A An m by n matrix A has n columns each in R m . Capturing all combinations Av of these columns gives the column space – a subspace of R m .
5.4: Independence, Basis, and Dimension Vectors v 1 to v d are a basis for a subspace if their combinations span the whole subspace and are independent: no basis vector is a combination of the others. Dimension d = number of basis vectors.
5.5: The Big Picture of Linear Algebra A matrix produces four subspaces – column space, row space (same dimension), the space of vectors perpendicular to all rows (the nullspace), and the space of vectors perpendicular to all columns.
5.6: Graphs A graph has n nodes connected by m edges (other edges can be missing). This is a useful model for the Internet, the brain, pipeline systems, and much more.
6.1: Eigenvalues and Eigenvectors The eigenvectors x remain in the same direction when multiplied by the matrix (A x = λx ). An n x n matrix has n eigenvalues.
6.2: Diagonalizing a Matrix A matrix can be diagonalized if it has n independent eigenvectors. The diagonal matrix Λis the eigenvalue matrix.
6.3: Solving Linear Systems d y /dt = A y contains solutions y = eλt x where λ and x are an eigenvalue / eigenvector pair for A .
6.4: The Matrix Exponential, exp(A*t) The shortest form of the solution uses the matrix exponential y = eAt y (0) . The matrix eAt has eigenvalues eλt and the eigenvectors of A.
6.4b: Similar Matrices, A and B=M^(-1)*A*M A and B are “similar” if B = M-1AM for some matrix M . B then has the same eigenvalues as A .
6.5: Symmetric Matrices, Real Eigenvalues, Orthogonal Eigenvectors Symmetric matrices have n perpendicular eigenvectors and n real eigenvalues.
7.2: Positive Definite Matrices, S=A'*A A positive definite matrix S has positive eigenvalues, positive pivots, positive determinants, and positive energy vT Sv for every vector v. S = AT A is always positive definite if A has independent columns.
7.2b: Singular Value Decomposition, SVD The SVD factors each matrix A into an orthogonal matrix U times a diagonal matrix Σ (the singular value) times another orthogonal matrix VT : rotation times stretch times rotation.
7.3: Boundary Conditions Replace Initial Conditions A second order equation can change its initial conditions on y(0) and dy/dt(0) to boundary conditions on y(0) and y(1) .
8.1: Fourier Series A Fourier series separates a periodic function F(x) into a combination (infinite) of all basis functions cos(nx) and sin(nx) .
8.1b: Examples of Fourier Series Even functions use only cosines (F(–x) = F(x) ) and odd functions use only sines. The coefficients an and bn come from integrals of F(x) cos(nx ) and F(x) sin(nx ).
8.1c: Fourier Series Solution of Laplace's Equation Inside a circle, the solution u (r , θ) combines rn cos(n θ) and rn sin(n θ). The boundary solution combines all entries in a Fourier series to match the boundary conditions.
8.3: Heat Equation The heat equation ∂u /∂t = ∂2u /∂x2 starts from a temperature distribution u at t = 0 and follows it for t > 0 as it quickly becomes smooth.