Download ArticleDownload Article

A differential equation is an equation that relates a function with one or more of its derivatives. In most applications, the functions represent physical quantities, the derivatives represent their rates of change, and the equation defines a relationship between them.

In this article, we show the techniques required to solve certain types of ordinary differential equations whose solutions can be written out in terms of elementary functions – polynomials, exponentials, logarithms, and trigonometric functions and their inverses. Many of these equations are encountered in real life, but most others cannot be solved using these techniques, instead requiring that the answer be written in terms of special functions, power series, or be computed numerically.

This article assumes that you have a good understanding of both differential and integral calculus, as well as some knowledge of partial derivatives. It is also recommended that you have some knowledge on linear algebra for the theory behind differential equations, especially for the part regarding second-order differential equations, although actually solving them only requires knowledge of calculus.

Preliminaries

  • Differential equations are broadly categorized. In this article, we deal with ordinary differential equations - equations describing functions of one variable and its derivatives. Ordinary differential equations are much more understood and are easier to solve than partial differential equations, equations relating functions of more than one variable. We do not solve partial differential equations in this article because the methods for solving these types of equations are most often specific to the equation.[1]
    • Below are a few examples of ordinary differential equations.
    • Below are a few examples of partial differential equations.
  • We identify the order of the differential equation as the order of the highest derivative taken in the equation. The first equation we list as an example is a first-order equation. The second equation we list is a second-order equation. The degree of an equation is the power to which the highest order term is raised.
    • For example, the equation below is a third-order, second degree equation.
  • We say that a differential equation is a linear differential equation if the degree of the function and its derivatives are all 1. Otherwise, the equation is said to be a nonlinear differential equation. Linear differential equations are notable because they have solutions that can be added together in linear combinations to form further solutions.
    • Below are a few examples of linear differential equations.
    • Below are a few examples of nonlinear differential equations. The first equation is nonlinear because of the sine term.
  • The general solutions to ordinary differential equations are not unique, but introduce arbitrary constants. The number of constants is equal to the order of the equation in most instances. In applications, these constants are subject to be evaluated given initial conditions: the function and its derivatives at The number of initial conditions required to find a particular solution of a differential equation is also equal to the order of the equation in most cases.
    • For example, the equation below is one that we will discuss how to solve in this article. It is a second-order linear differential equation. Its general solution contains two arbitrary constants. To evaluate these constants, we also require initial conditions at and These initial conditions are usually given at but they do not have to be. We will also discuss finding particular solutions given initial conditions later in the article.
Part 1
Part 1 of 2:

First Order Equations

Download Article
  1. 1
    Linear first-order equations. In this section, we discuss the methods of solving the linear first-order differential equation both in general and in the special cases where certain terms are set to 0. We let and be functions of [2]


    By the fundamental theorem of calculus, the integral of a derivative of a function is the function itself. We can then simply integrate to obtain our answer. Remember that evaluating an indefinite integral introduces an arbitrary constant.

    We use the technique of separation of variables. Separation of variables intuitively puts each variable on different sides of the equation. For example, we move all terms to one side and the terms to the other. We may treat the and in the derivative as quantities that are able to be moved around, but keep in mind that this is merely a shorthand for a manipulation that takes advantage of the chain rule. The exact nature of these objects, called differentials, are outside the scope of this article.

    • First, we get each variable on opposite sides of the equation.
    • Integrate both sides. The integration introduces an arbitrary constant on both sides, but we may consolidate them on the right side.
    • Example 1.1. In the last step, we take advantage of the exponent law and replace with because it is again an arbitrary constant.

    To solve the general case, we introduce an integrating factor a function of that makes the equation easier to solve by bringing the left side under a common derivative.

    • Multiply both sides by
    • In order to bring the left side under a common derivative, we must have the following.
    • The latter equation implies that which has the following solution. This is the integrating factor that solves every linear first-order equation. We may now proceed to derive a formula that solves this equation in terms of but it is more instructive to simply do the calculations.
    • Example 1.2. This example also introduces the notion of finding a particular solution to the differential equation given initial conditions.
  2. 2
    Nonlinear first-order equations. In this section, we discuss the methods of solving certain nonlinear first-order differential equations. There is no general solution in closed form, but certain equations are able to be solved using the techniques below.[3]


    If the function can be separated into functions of one variable each, then the equation is said to be separable. We then proceed with the same method as before.
    • Example 1.3.

    Let and be functions of and Then a homogeneous differential equation is an equation where and are homogeneous functions of the same degree. That is to say, the function satisfies the property where is called the degree of homogeneity. Every homogeneous differential equation can be converted into a separable equation through a sufficient change of variables, either or

    • Example 1.4. The above discussion regarding homogeneity may be somewhat arcane. Let us see how this applies through an example.
      • We first observe that this is a nonlinear equation in We also see that this equation cannot be separated. However, it is a homogeneous differential equation because both the top and bottom are homogeneous of degree 3. Therefore, we can make the change of variables
      • This is now a separable equation in

    This is the Bernoulli differential equation, a particular example of a nonlinear first-order equation with solutions that can be written in terms of elementary functions.

    • Multiply by
    • Use the chain rule on the left side to convert the equation into a linear equation in which can then be solved using the previous techniques.

    Here, we discuss exact equations. We wish to find a function called the potential function, such that

    • To fulfill this condition, we have the following total derivative. The total derivative allows for additional variable dependencies. To calculate the total derivative of with respect to we allow for the possibility that may also depend on
    • Comparing terms, we have and It is a standard result from multivariable calculus that mixed derivatives for smooth functions are equal to each other. This is sometimes known as Clairaut's theorem. The differential equation is then exact if the following condition holds.
    • The method of solving exact equations is similar to finding potential functions in multivariable calculus, which we go into very shortly. We first integrate with respect to Because is a function of both and the integration can only partially recover which the term is intended to remind the reader of. There is also an integration constant that is a function of
    • We then take the partial derivative of our result with respect to compare terms with and integrate to obtain We can also start by integrating first and then taking the partial derivative of our result with respect to to solve for the arbitrary function Either method is fine, and usually, the simpler function to integrate is chosen.
    • Example 1.5. We can check that the equation below is exact by doing the partial derivatives.
    • If our differential equation is not exact, then there are certain instances where we can find an integrating factor that makes it exact. However, these equations are even harder to find applications of in the sciences, and integrating factors, though guaranteed to exist, are not at all guaranteed to easily be found. As such, we will not go into them here.
  3. Advertisement
Part 2
Part 2 of 2:

Second Order Equations

Download Article
  1. 1
    Homogeneous linear differential equations with constant coefficients. These equations are some of the most important to solve because of their widespread applicability. Here, homogeneous does not refer to homogeneous functions, but the fact that the equation is set to 0. We will see in the next section on how to solve the corresponding inhomogeneous differential equations. Below, and are constants.[4]


    Characteristic equation. This differential equation is notable because we can solve it very easily if we make some observations about what properties its solutions must have. This equation tells us that and its derivatives are all proportional to each other. From our previous examples in dealing with first-order equations, we know that only the exponential function has this property. Therefore, we will put forth an ansatz – an educated guess – on what the solution will be.

    • This ansatz is the exponential function where is a constant to be determined. Substituting into the equation, we have the following.
    • This equation tells us that an exponential function multiplied by a polynomial must equal 0. We know that the exponential function cannot be 0 anywhere. The polynomial being set to 0 is deemed the characteristic equation. We have effectively converted a differential equation problem into an algebraic equation problem – a problem that is much easier to solve.
    • We obtain two roots. Because this differential equation is a linear equation, the general solution consists of a linear combination of the individual solutions. Because this is a second-order equation, we know that this is the general solution. There are no others to be found. A more rigorous justification is contained in the existence and uniqueness theorems found in the literature.
    • A useful way to check if two solutions are linearly independent is by way of the Wronskian. The Wronskian is the determinant of a matrix whose columns are the functions and their successive derivatives going down the rows. A theorem in linear algebra is that the functions in the Wronskian matrix are linearly dependent if the Wronskian vanishes. In this part, we can check if two solutions are linearly independent by making sure that the Wronskian does not vanish. The Wronskian will become important in solving inhomogeneous differential equations with constant coefficients via the variation of parameters.
    • In terms of linear algebra, the solution set of this differential equation spans a vector space with dimension equal to the order of the differential equation. The solutions form a basis and are therefore linearly independent of one another. This is possible because the function is being acted on by a linear operator. The derivative is a linear operator because it maps the space of differentiable functions to the space of all functions. The reason why this is a homogeneous equation is because, for any linear operator we are looking for solutions of the equation

    We now proceed to go over two of the three cases. The repeated roots case will have to wait until the section on reduction of order.

    Two real and distinct roots. If are both real and are distinct, then the solution to the differential equation is given below.

    Two complex roots. It is a corollary of the fundamental theorem of algebra that solutions to polynomial equations with real coefficients contain roots that are real or come in conjugate pairs. Hence if is complex and is a root of the characteristic equation, then is a root as well. We can then write out the solution as but this solution is complex and is undesirable as an answer for a real differential equation.

    • We can instead make use of Euler's formula to write out the solution in terms of trigonometric functions.
    • We now replace the constant with and replace with This yields the solution below.
    • There is yet another way to write out this solution in terms of an amplitude and phase, which is typically more useful in physical applications. See the main article for details on this calculation.
    • Example 2.1. Find the solution to the differential equation below given initial conditions. To do so, we must use our solution as well as its derivative and substitute initial conditions in both results to solve for the arbitrary constants.
  2. 2
    Reduction of order. Reduction of order is a method in solving differential equations when one linearly independent solution is known. The method works by reducing the order of the equation by one, allowing for the equation to be solved using the techniques outlined in the previous part. Let be the known solution. The basic idea of reduction of order is to look for a solution of the following form, where is a function to be determined, substitute into the differential equation, and solve for We will see how reduction of order can be applied in finding the solution to the differential equation with constant coefficients with repeated roots.[5]


    Repeated roots to the homogeneous differential equation with constant coefficients. Recall that a second-order equation should have two linearly independent solutions. If the characteristic equation yields a repeating root, then the solution set fails to span the space because the solutions are linearly dependent. We must then use reduction of order to find the second linearly independent solution.

    • Let denote the repeated root of the characteristic equation. We assume the second solution as and substitute this into the differential equation. We find that most of the terms, save the term with the second derivative of cancel.
    • Example 2.2. Suppose we were working with the equation below, which has the repeated root Our substitution then fortuitously cancels most of the terms.
    • Much like our ansatz for the differential equation with constant coefficients, only the second derivative can be 0 here. Integrating twice leads to the desired expression for
    • The general solution to the differential equation with constant coefficients given repeated roots in its characteristic equation can then be written like so. As a handy way of remembering, one merely multiply the second term with an to achieve linear independence. Because this set is linearly independent, we have found all the solutions to this equation, and are done.

    Reduction of order applies if we know a solution to this equation, whether found by chance or given in a problem.

    • We look for a solution of the form and proceed to substitute this into the equation.
    • Because is already a solution to the differential equation, the terms with all vanish. What remains is a linear, first-order equation. To see this more clearly, make the change of variables
    • If the integrals can be done, then one would obtain the general solution in terms of elementary functions. If not, then the solution can be left in integral form.
  3. 3
    Euler-Cauchy equation. The Euler-Cauchy equation is a specific example of a second-order differential equation with variable coefficients that contain exact solutions. This equation is seen in some applications, such as when solving Laplace's equation in spherical coordinates.[6]


    Characteristic equation. The structure of this differential equation is such that each term is multiplied by a power term whose degree is equal to the order of the derivative.

    • This suggests that we try the ansatz where is yet to be determined, in a similar manner as trying the exponential function in dealing with the linear differential equation with constant coefficients. After differentiating and substituting, we obtain the following.
    • Here, we must assume that in order for us to use the characteristic equation. The point is called a regular singular point of the differential equation, a property that becomes important when solving differential equations using power series. This equation has two roots, which may be real and distinct, repeated, or complex conjugates.

    Two real and distinct roots. If are both real and are distinct, then the solution to the differential equation is given below.

    Two complex roots. If are the roots to the characteristic equation, then we obtain a complex function as our solution.

    • To convert this into a real function, we make the change of variables implying and use Euler's formula. A similar process is conducted as before in reassigning arbitrary constants.
    • The general solution can then be written as follows.

    Repeated roots. To obtain the second linearly independent solution, we must use reduction of order again.

    • There is much algebra involved, but the concept remains the same: we substitute into the equation, where is the first solution. Terms will cancel, and we are left with the following equation.
    • This is a linear first-order equation in Its solution is Our answer can therefore be written as follows. An easy way to remember this solution is that the second linearly independent solution merely needs an extra term.
  4. 4
    Inhomogeneous linear differential equations with constant coefficients. The inhomogeneous case deals with the equation where is called the source term. According to the theory of differential equations, the general solution to this equation is the superposition of the particular solution and the complementary solution The particular solution here, confusingly, refers not to a solution given initial conditions, but rather the solution that exists as a result of the inhomogeneous term. The complementary solution refers to the solution of the corresponding homogeneous differential equation by setting We may show that the general solution is a superposition of these two solutions by writing and noting that because this superposition is indeed the general solution.[7]


    Method of undetermined coefficients. The method of undetermined coefficients is a method that works when the source term is some combination of exponential, trigonometric, hyperbolic, or power terms. These terms are the only terms that have a finitely many number of linearly independent derivatives. In this section, we concentrate on finding the particular solution. [8]

    • Compare the terms in with the terms in disregarding multiplicative constants. There are three cases.
      • None of the terms are the same. The particular solution will then consist of a linear combination of the terms in and their linearly independent derivatives.
      • contains a term that is times a term in where is 0 or a positive integer, but this term originated from a distinct root of the characteristic equation. In this case, will consist of a linear combination of its linearly independent derivatives, as well as the other terms of and their linearly independent derivatives.
      • contains a term that is times a term in where is 0 or a positive integer, but this term originated from a repeated root of the characteristic equation. In this case, will consist of a linear combination of (where is the multiplicity of the root) and its linearly independent derivatives, as well as the other terms of and their linearly independent derivatives.
    • Write out as a linear combination of the aforementioned terms. The coefficients in this linear combination refer to the namesake of "undetermined coefficients." If terms that are in appear, they may be discarded because of the presence of the arbitrary constants in Once written out, substitute into the equation and equate like terms.
    • Solve for the coefficients. In general, one encounters a system of algebraic equations at this point, but this system is usually not too difficult to solve. Once found, is found, and we are done.
    • Example 2.3. The following differential equation is an inhomogeneous differential equation with a source term that contains a finitely many number of linearly independent derivatives. Hence we may use the method of undetermined coefficients to find its particular solution.

    Variation of parameters. Variation of parameters is a more general method of solving inhomogeneous differential equations, particularly when the source term does not contain a finitely many number of linearly independent derivatives. Source terms like and warrant the use of variation of parameters to find the particular solution. Variation of parameters may even be used to solve differential equations with variable coefficients, though with the exception of the Euler-Cauchy equation, this is less common because the complementary solution is typically not written in terms of elementary functions.[9]

    • Assume a solution of the form below. Its derivative is written on the second line.
    • Because the assumed solution is of a form in which there are two unknowns, yet there is only one equation, we must also impose an auxiliary condition. We choose the following auxiliary condition.
    • Now we proceed to obtain the second equation. After substituting and rearranging terms, we can group terms containing together and terms containing together. These terms all cancel because and are solutions to the corresponding homogeneous equation. We are then left with the following system of equations.
    • This system can be rearranged into a matrix equation of the form whose solution is The inverse of a matrix is found by dividing by the determinant, swapping the diagonal elements, and negating the off-diagonal elements. The determinant of this matrix is, in fact, the Wronskian.
    • The formulas for and are given below. Just like in reduction of order, the integration here introduces an arbitrary constant that incorporates the complementary solution into the general solution of the differential equation.
  5. Advertisement

Community Q&A

Search
Add New Question
  • Question
    Determine the particular solution of (y^2-1)dy/dx=3y given that y=1 and x=2?
    How.com.vn English: Ayisha A. Gill
    Ayisha A. Gill
    Community Answer
    After integrating it becomes y^3/3 -3y^2/2=x+c. Setting x=2 and y=1 in this equation we get c= -5/2 so the particular solution is y^3/3 - 3y^2/2 - x + 5/2=0.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Discussion

      Differential equations relate a function with one or more of its derivatives. Because such relations are extremely common, differential equations have many prominent applications in real life, and because we live in four dimensions, these equations are often partial differential equations. This section aims to discuss some of the more important ones.

      • Exponential growth and decay.[10] Radioactive decay. Compound interest. Chemical rate laws. Drug concentration in bloodstream. Unlimited population growth. Newton's cooling law. There are a plethora of systems in the real world whose rate of growth or decay at any instant in time is proportional to the amount at that particular time or can be well-approximated by such a model. It is for this reason that the exponential function, the solution to this differential equation, is one of the most important functions encountered in mathematics and the sciences. More generally, systems such as controlled population growth would contain additional terms that limit growth. Below, is a constant that can be positive or negative.
      • Harmonic motion. The harmonic oscillator, both in classical and quantum mechanics, is one of the most important physical systems because of its simplicity and its broad application in approximating more complicated systems, such as a simple pendulum. In classical mechanics, harmonic motion is described by an equation that relates the position of a particle with its acceleration via Hooke's law. Damping and driving forces may also be present in the analysis. Below, is the time derivative of is a parameter describing a damping force, is the angular frequency of the system, and is a time-dependent driving force. The harmonic oscillator is also present in systems such as the RLC circuit, and can in fact be realized more accurately in experiments than mechanical systems.
      • Bessel's equation.[11] Bessel's differential equation occurs in many applications in physics, including solving the wave equation, Laplace's equation, and the Schrödinger equation, especially in problems that have cylindrical or spherical symmetry. Because this is a second-order differential equation with variable coefficients and is not the Euler-Cauchy equation, the equation does not have solutions that can be written in terms of elementary functions. Solutions to Bessel's equation are Bessel functions and are well-studied because of their widespread applicability. Below, is a constant that is deemed the order of the Bessel function.
      • Maxwell's equations. Maxwell's equations, together with the Lorentz force, comprise all of classical electrodynamics. The equations are four partial differential equations in the electric field and magnetic field Below, is the charge density, is the current density, and and are the electric and magnetic constants, respectively.
      • Schrödinger equation. In quantum mechanics, the Schrödinger equation is the fundamental equation of motion that describes how particles, governed by a wavefunction evolve in time. The equation of motion is governed by the behavior of the Hamiltonian which is an operator that describes the energy of the system. We also write the Schrödinger equation of a single non-relativistic particle under the influence of a potential one very famous example of the Schrödinger equation as it pertains to physical systems. Many systems also involve the time-independent Schrödinger equation, which replaces the left side with where is the energy of the particle. Below, is the reduced Planck's constant.
      • Wave equation.[12] Waves are ubiquitous in physics and engineering and are present in all types of systems. In general, the wave equation is described by the equation below, where is the function to be found and is an experimentally determined constant. D'Alembert first discovered that in one (spatial) dimension, the solutions to the wave equation are any arbitrary function that admits as its argument, which describes a wave of arbitrary shape moving to the right with time. The general solution in one dimension describes a linear combination of this function with another function admitting as its argument, describing a left moving mode. We write this solution on the second line.
      • Navier-Stokes equations. The Navier-Stokes equations describe the motion of fluids. Because fluids are ubiquitous in virtually every branch of science and engineering, these equations are of paramount importance in weather forecasting, the design of aircraft, ocean currents, and many more applications. The Navier-Stokes equations are nonlinear partial differential equations and solving them in most cases is very difficult because the nonlinearity introduces turbulence whose stable solution requires such a fine mesh resolution that numerical solutions that attempt to numerically solve the equations directly require an impractical amount of computational power. Practical fluid dynamics relies on techniques such as time-averaging to model turbulent flows. Even more basic questions such as the existence and uniqueness of solutions for nonlinear partial differential equations are hard problems and the resolution of existence and uniqueness for the Navier-Stokes equations in three spacial dimensions in particular is the focus of one of the Millennium Prize problems. Below, we write out the equation of incompressible fluid flow with the continuity equation.

      Tips

      • Many differential equations simply cannot be solved by the above methods, especially those mentioned in the discussion section. This occurs when the equation contains variable coefficients and is not the Euler-Cauchy equation, or when the equation is nonlinear, save a few very special examples. The methods above, however, suffice to solve many important differential equations commonly encountered in the sciences.
      • Unlike differentiation, in which the derivative of any given expression can be calculated, the integral of many expressions simply cannot be found in terms of elementary functions. So do not waste your time trying to integrate an expression that cannot be integrated. Check a table of integrals to verify. The solution of a differential equation that cannot be written in terms of elementary functions can sometimes be written in integral form, but whether the integral can be done analytically is not important in this situation.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • One can easily be misled by the appearance of a differential equation and how easily its solutions can be obtained. For example, we list two first-order differential equations below. The first one can easily be solved by the methods outlined in this article. The seemingly modest replacement of the by a in the second equation makes it nonlinear and very difficult to solve.
      Advertisement

      About This Article

      How.com.vn English: Joseph Meyer
      Reviewed by:
      Math Teacher
      This article was reviewed by Joseph Meyer. Joseph Meyer is a High School Math Teacher based in Pittsburgh, Pennsylvania. He is an educator at City Charter High School, where he has been teaching for over 7 years. Joseph is also the founder of Sandbox Math, an online learning community dedicated to helping students succeed in Algebra. His site is set apart by its focus on fostering genuine comprehension through step-by-step understanding (instead of just getting the correct final answer), enabling learners to identify and overcome misunderstandings and confidently take on any test they face. He received his MA in Physics from Case Western Reserve University and his BA in Physics from Baldwin Wallace University. This article has been viewed 2,446,197 times.
      110 votes - 80%
      Co-authors: 35
      Updated: September 24, 2023
      Views: 2,446,197
      Thanks to all authors for creating a page that has been read 2,446,197 times.

      Reader Success Stories

      • How.com.vn English: Anonymous

        Anonymous

        Nov 16, 2017

        "Needed a review for use of an ODE solver. The examples were used to practice using the solver. Very useful to me..." more
        Rated this article:
      Share your story

      Did this article help you?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement