1. Home
  2. Explore
  3. Mathematics
  4. First-Order Differential Equations

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

First-Order Differential Equations

Speaker 1Speaker 2

First-Order Differential Equations

16:44
0:00-16:44
  1. Corey

    Welcome to our first-order, first-degree differential equations episode. We’ll build from exact equations to integrating factors, then linear equations, equations reducible to linear form, and Bernoulli equations. The recurring question is: what form is this equation in, and what substitution or method makes it solvable?

  2. Anna

    Let’s begin with an equation written as M dx plus N dy equals zero. Here, both M and N may depend on x and y. We first test whether it’s exact by comparing the partial derivative of M with respect to y and the partial derivative of N with respect to x.

  3. Corey

    If those partial derivatives are equal, the equation is exact. The idea is that the left side represents the total differential of some function F of x and y, so the solution is F of x and y equals a constant.

  4. Anna

    A practical way to find F is to integrate M with respect to x, treating y as constant. That gives part of F, and we then use N to recover any missing function of y. In examples where N has terms independent of x, those terms tell us what to add when integrating with respect to y.

  5. Corey

    Let’s try the first example. After rearranging into M dx plus N dy equals zero, take M to be y cos x plus sin y plus y, and N to be sin x plus x cos y plus x.

  6. Anna

    Differentiate M with respect to y: cos x plus cos y plus one. Differentiate N with respect to x: cos x plus cos y plus one as well. Since they match, the equation is exact.

  7. Corey

    Now integrate M with respect to x, keeping y constant. We get y sin x plus x sin y plus xy. There are no terms in N that are independent of x, so there’s no additional y-only term to add. The general solution is y sin x plus x sin y plus xy equals C.

  8. Anna

    That C is the constant of integration, so this is a general solution. If a problem also gave a point or another condition, we could use it to find C and obtain a particular solution.

  9. Corey

    In another exact example, M is y times one plus one over x, plus cos y; N is x plus log x minus x sin y. The partial derivatives are both one plus one over x minus sin y, so again the equation is exact.

  10. Anna

    Integrating M with respect to x gives y times x plus log x, plus x cos y. Here too, N has no term independent of x, so the general solution is y times x plus log x, plus x cos y, equals C.

  11. Corey

    A more involved exact example shows why product and chain rules matter. Take M as y squared times e to the xy squared, plus four x cubed; and N as two xy times e to the xy squared, minus three y squared.

  12. Anna

    When we differentiate M with respect to y, the product rule gives two xy cubed e to the xy squared plus two y e to the xy squared. Differentiating N with respect to x gives the same expression, so the equation passes the exactness test.

  13. Corey

    Integrate M with respect to x, treating y as constant. The exponential term integrates to e to the xy squared, because the derivative of xy squared with respect to x is y squared. The other term integrates to x to the fourth, and the y-only contribution from N is minus y cubed.

  14. Anna

    So the solution is e to the xy squared plus x to the fourth minus y cubed equals C. Notice how the exactness test confirms that the pieces fit together into one potential function.

  15. Corey

    What if the partial derivatives don’t match? Then the equation isn’t exact as written. We can sometimes multiply it by an integrating factor—a function that changes the equation into an exact one—and then solve it using the method we just used.

  16. Anna

    The basic steps are: calculate the partial derivatives, identify a useful integrating factor, multiply every term in the equation by it, and then solve the resulting exact equation. There are four common patterns for finding that factor.

  17. Corey

    For the first pattern, calculate M sub y minus N sub x, then divide by N. If that quotient is a function of x alone, call it f of x. The integrating factor is e to the integral of f of x with respect to x.

  18. Anna

    The second pattern reverses the order: calculate N sub x minus M sub y, then divide by M. If that quotient depends only on y, call it f of y. The integrating factor is e to the integral of f of y with respect to y.

  19. Corey

    The third pattern applies when M has the form y times a function of xy, and N has the form x times a function of xy. Then an integrating factor is one divided by xM minus yN, wherever that denominator is nonzero.

  20. Anna

    And the fourth pattern is for a homogeneous differential equation: if dy over dx is a homogeneous function, an integrating factor is one divided by xM plus yN, again where the denominator isn’t zero. In this setting, homogeneous means the polynomial terms have the same total degree.

  21. Corey

    Let’s see the first pattern in action. Suppose M is xy squared minus e to the one over x cubed, and N is minus x squared y. Then M sub y is 2xy, while N sub x is minus 2xy, so the equation is not exact.

  22. Anna

    M sub y minus N sub x is 4xy. Divide by N, which is minus x squared y, and the result is minus four over x—a function of x alone. So the integrating factor is e to the integral of minus four over x, which simplifies to one over x to the fourth.

  23. Corey

    After multiplying through by that factor, the equation is exact. Integrating its M term with respect to x, while keeping y constant, gives minus y squared over two x squared plus one third e to the one over x cubed. The resulting solution is minus y squared over two x squared plus one third e to the one over x cubed equals C.

  24. Anna

    For the third pattern, consider M equal to y times the quantity x squared y squared plus two, and N equal to x times the quantity two minus two x squared y squared. Each has the required factor of y or x, with the remaining expression depending on xy.

  25. Corey

    Calculate xM minus yN. The terms involving x cubed y cubed cancel, leaving six xy. Therefore the integrating factor is one over six xy. A nonzero constant multiplier doesn’t change the essential integrating factor, so we can use the equivalent factor one over xy.

  26. Anna

    After multiplying and integrating, the solution can be written as one third log x, minus one third over x squared y squared, minus two thirds log y, equals C, on a domain where those logarithms are defined. The important move was recognizing the pattern before doing the integration.

  27. Corey

    For the homogeneous pattern, take M equal to x to the fourth plus y to the fourth, and N equal to minus xy cubed. The terms in the corresponding dy over dx expression have the same total degree, so it is homogeneous.

  28. Anna

    Here xM plus yN equals x times x to the fourth plus y to the fourth, minus xy to the fourth—which simplifies to x to the fifth. Thus an integrating factor is one over x to the fifth. The resulting solution is log x minus y to the fourth over four x to the fourth equals C, on a domain where the logarithm is defined.

  29. Corey

    Next up: linear differential equations. A common form is dy over dx plus P of x times y equals Q of x. The dependent variable y appears once, to the first power, and P and Q depend only on the independent variable x.

  30. Anna

    For this form, the integrating factor is e to the integral of P of x dx. The solution is y times the integrating factor equals the integral of Q times the integrating factor with respect to x, plus C.

  31. Corey

    The key idea is that the left side becomes the derivative of y times the integrating factor. So when using the formula, always multiply the dependent variable by the integrating factor—not automatically x or y by habit, but whichever variable is dependent.

  32. Anna

    There’s a parallel form when x is dependent and y is independent: dx over dy plus P of y times x equals Q of y. Its integrating factor is e to the integral of P of y dy, and the solution is x times that factor equals the integral of Q times that factor with respect to y, plus C.

  33. Corey

    For example, dy over dx plus four x over x squared plus one times y equals one over x squared plus one. Here P is four x over x squared plus one. Its integral is two log of x squared plus one, so the integrating factor is x squared plus one, all squared.

  34. Anna

    Substitute into the linear-equation formula. The right-hand integrand simplifies to one over x squared plus one, whose integral is arctan x. So the solution is y times x squared plus one, all squared, equals arctan x plus C.

  35. Corey

    A second example has x as the dependent variable and y as the independent variable. After rearranging, its form is dx over dy plus x times sec y plus tan y over one plus sin y, equals two y cos y over one plus sin y.

  36. Anna

    To find the integrating factor, simplify P. Write secant and tangent using sine and cosine; the numerator becomes one plus sin y over cos y. Dividing by one plus sin y leaves sec y, so the integral of P is the integral of sec y, or log of sec y plus tan y.

  37. Corey

    That makes the integrating factor sec y plus tan y. In the solution formula, the right-hand integrand simplifies to two y, so its integral is y squared. Therefore x times sec y plus tan y equals y squared plus C.

  38. Anna

    Some equations aren’t linear at first but can be reduced to linear form by substituting a function of the dependent variable. If an equation contains F of y and its derivative through F prime of y times dy over dx, set t equal to F of y.

  39. Corey

    Then differentiate t with respect to x using the chain rule: dt over dx equals F prime of y times dy over dx. Replacing those pieces gives an equation that may be linear in t. If x is dependent instead, use t equal to F of x and differentiate with respect to the independent variable y.

  40. Anna

    Consider y times dy over dx plus four x over three minus y squared over three x equals zero. Rearrange it so the derivative term and the y-squared term are together, and set t equal to y squared. Since dt over dx is two y dy over dx, y dy over dx becomes one half dt over dx.

  41. Corey

    After substituting and multiplying by two, we get dt over dx minus two t over three x equals minus eight x over three. That is linear in t. Its integrating factor is x to the minus two-thirds, and the solution, substituting back t equals y squared, is y squared times x to the minus two-thirds equals minus two x to the four-thirds plus C.

  42. Anna

    Another useful recognition is when the derivative of a more complicated expression appears. For instance, the derivative of x e to the x with respect to x is e to the x times x plus one. If the equation contains that expression multiplying dx over dy, set t equal to x e to the x.

  43. Corey

    The chain rule then turns e to the x times x plus one times dx over dy into dt over dy. In the example, the equation reduces to dt over dy minus t equals minus y e to the y. Its integrating factor is e to the minus y.

  44. Anna

    Using the linear formula gives t e to the minus y equals the integral of minus y, plus C, which is minus y squared over two plus C. Since t was x e to the x, the solution is x e to the quantity x minus y equals minus y squared over two plus C.

  45. Corey

    Bernoulli’s equation is another reducible form: dy over dx plus P of x times y equals Q of x times y to the n. The dependent variable appears once to the first power and again to the power n.

  46. Anna

    Divide through by y to the n, then use the substitution t equals y to the power one minus n. Differentiating gives dt over dx equals one minus n times y to the minus n times dy over dx. That substitution converts the equation into a linear equation in t.

  47. Corey

    More explicitly, after multiplying by one minus n, the transformed equation is dt over dx plus one minus n times P times t equals one minus n times Q. Solve that linear equation with its integrating factor, then replace t by y to the power one minus n.

  48. Anna

    For an example, take dr over d theta equal to r tan theta minus r squared sec theta. Rearrange it as dr over d theta minus r tan theta equals minus r squared sec theta. It’s Bernoulli: r is the dependent variable, theta is independent, and n equals two.

  49. Corey

    Divide by r squared and set t equal to minus one over r. The derivative of that substitution is one over r squared times dr over d theta, so the equation becomes dt over d theta plus t tan theta equals minus sec theta.

  50. Anna

    That is linear in t. Its integrating factor is sec theta. The solution formula gives t sec theta equal to the integral of minus sec squared theta, plus C—that is, minus tan theta plus C. Substituting back t equals minus one over r completes the solution.

  51. Corey

    One final example highlights how choosing the dependent variable matters. If the equation can be rearranged into dx over dy minus xy equals x squared y cubed, then x is the dependent variable and y is the independent variable.

  52. Anna

    Divide by x squared to get one over x squared times dx over dy, minus y over x, equals y cubed. Set t equal to minus one over x; then dt over dy is one over x squared times dx over dy. The result is dt over dy plus yt equals y cubed, a linear equation in t.

  53. Corey

    Its integrating factor is e to the y squared over two. The right-hand integral is the integral of y cubed e to the y squared over two dy, which evaluates to the quantity y squared minus two times e to the y squared over two.

  54. Anna

    So minus one over x times e to the y squared over two equals y squared minus two times e to the y squared over two, plus C. The integration uses substitution, and the main strategy was recognizing the equation as Bernoulli-like in x after switching which variable was dependent.

  55. Corey

    Let’s recap the decision process. For M dx plus N dy, test exactness with M sub y and N sub x. If they differ, check the integrating-factor patterns. For a linear equation, identify the dependent variable and use its integrating factor; for a reducible or Bernoulli equation, choose the substitution that makes the dependent-variable expression linear.

  56. Anna

    And keep track of what you’re differentiating or integrating with respect to: it’s the independent variable. Treat the other variable as constant for partial integration, and use the chain rule whenever you substitute. Those habits connect all the methods we covered.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent