 Ordinarily, variation of parameters is introduced to solve second-order linear differential equations, but we can also talk about it in terms of first-order differential equations. So we'll introduce a few terms first. A differential equation in y and its derivatives is said to be homogeneous if all non-zero terms include a factor of y or one of its derivatives. So for example, d5y over dt5 plus y cubed dy dt equals y is homogeneous. dy dt plus y equals 5x is not homogeneous. Now, fair warning, at least that's one meaning of this term homogeneous. Contact is everything, and homogeneous means several different things, even within differential equations. What's useful to keep in mind here is that every non-homogeneous equation has a corresponding homogeneous equation produced by eliminating all terms except for y and its derivatives. And so the $64,000 question is, can we use the solution to a homogeneous equation to solve a non-homogeneous equation? Well, I hope so, otherwise this will be a very short video. So let's proceed as follows. Suppose we have a first-order linear differential equation. So we get a homogeneous equation by dropping all terms that don't include y or one of its derivatives, so that means this g of t over on the right-hand side will get rid of it and replace it with a zero. If the corresponding homogeneous equation has u of t as a solution, then we know that du dt plus f of t times u of t must equal to zero. And that's because u of t is a solution, so it must make the differential equation true. But wait, there's more. We also know that c u of t is also a solution for any constant c. You should prove this. And so we might hope that the solution to the non-homogeneous equation is somehow related to c u of t. So I've got to come up with an ansatz, a wild educated guess of what the solution might be. In this particular case, to obtain a solution will allow the parameter c to vary. In other words, we'll let c be a function. And you might wonder if we're allowed to do that. And again, in life and in differential equations, it's useful to remember that it's easier to obtain forgiveness than permission. If it works, we're in good shape. Now, since we don't want to work too hard to get our solution for convenience, we'll assume that it's a function of t. So our solution to the differential equation will be y of t equals some function of t times u of t, where u of t solves our homogeneous differential equation. And now we just need to find c of t. So we have y of t equals c of t times u of t. And since our differential equation requires a derivative, we can differentiate. We'll substitute these values into our differential equation. Since u of t solves the homogeneous equation, we know that u prime of t plus f of t, u of t, must equals zero. And if I multiply this equation by c of t, then I get, so that means these terms in our differential equation add to zero so we can get rid of them. And since we know u of t because it's a solution of homogeneous equation, and g of t because it's the non-homogeneous part of our differential equation, we can solve for c prime of t. And since the right-hand side is a function of t only, we can find c of t by integration. And so we find c of t is the anti-derivative of the quotient g of t over u of t dt. Now it may be tempting to memorize this formula as the fast way of finding c of t, but in fact the worst way of learning mathematics is to memorize formulas. Don't memorize formulas, understand concepts. In this case, the concept is we allowed our solution to be a product of two functions. We substituted the product into our differential equation and solved for the derivative of the second function. For example, let's try to solve this differential equation. First, we solve the homogeneous equation. We'll drop the term that doesn't include the variable y, and so that's going to give us dy dt plus 2 over ty equals 0. And this turns out to be a separable differential equation, so we'll separate and solve. And we'll absorb all our constants and everything so we get a nice function of y. And so our homogeneous equation has solution c over t squared. So in the homogeneous equation, c is a constant. So now we'll assume that c is some function of t. So now we assume y equals c of t over t squared and substitute. So we find our derivative. We'll replace it in our original differential equation. And these fractions are messy, so let's get rid of them by multiplying through by t to the fourth. We'll clean up the algebra and solve for c prime of t, throwing in the usual disclaimer, provided t is not equal to 0. But now, since I know c prime of t solely as a function of t, I can anti-differentiate to find c of t. And so I find that c of t is sine of t, plus don't forget that constant of anti-differentiation. And so assuming y equals c of t over t squared and substituting into our differential equation gives us c of t is sine t plus some constant. And so this gives our solution sine of t plus c over t squared.