Thank you for visiting our site! You landed on this page because you entered a search term similar to this: *second order differential equation solvers*, here's the result:

**SUNY at Stony Brook MAT 142 Honors Calculus II**

**Notes on Second Order Differential Equations**

Anthony Phillips -- Fall 1998

**1.** The general second order homogeneous linear differentialequation with constant coefficients looks like

*a*

_{2}

*y*'' +

*a*

_{1}

*y*' +

*a*

_{0}

*y*=0,

where

*y*is an unknown function of the variable

*x*. If

*a*

_{2}=0 thisbecomes a first order linear equation which we know how to solve. Sowe will consider the case .Then we can divide through by

*a*

_{2}and obtain the equivalent equation

*y*'' +

*c*

_{1}

*y*' +

*c*

_{0}

*y*= 0

with

*c*

_{1}=

*a*

_{1}/

*a*

_{2}and

*c*

_{0}=

*a*

_{0}/

*a*

_{2}. ``Linear with constant coefficients''means that each term in the equation is a constant times

*y*or aderivative of

*y*. ``Homogeneous'' excludes equations like

*y*'' +

*c*

_{1}

*y*' +

*c*

_{0}

*y*=

*f*(

*x*) which can be solved, in certain importantcases, by an extension of the methods we will study here.

**2.** The method of solution that we will work on involveslooking for an exponential-type solution

Why? Because it works! We substitute in our equation. Thisgives

Since we can divide through and get

If we solve this quadratic equation for ,then willautomatically be a solution of our differential equation. So thesubstitution transforms the differential equation intoan algebraic equation! This equation is called the

*characteristicequation*(associated to the differential equation).

**3.** The solution of is(``quadratic formula'')

In this case

*a*=1,

*b*=

*c*

_{1},

*c*=

*c*

_{0}, so the solution is

If the

*discriminant*

*c*

_{1}

^{2}-4

*c*

_{0}is positive, then there are twosolutions, one for the plus sign and one for the minus.

*Example 1.* If the differential equation is *y*''-*y*=0 (so *c*_{1}=0 and *c*_{0}=-1) the roots of the characteristicequation are .Both *y*=*e*^{x} and *y*=*e*^{-x} are solutions. (Check this!)

*Example 2.* If the differential equation is *y*''+*y*'-2*y*=0 the roots of the characteristicequation are ,so and .Both *y*=*e*^{x} and *y*=*e*^{-2x} are solutions. (Check this!)

**4.** If the discriminant *c*_{1}^{2}-4*c*_{0} is negative, then the equation has no solutions, unless we enlarge the number field to include ,i.e. unless we work with complex numbers. If *c*_{1}^{2}-4*c*_{0}=-*k*^{2} (we can writeany positive number as *k*^{2}!) then *ik* is a square root of *c*_{1}^{2}-4*c*_{0}since (*ik*)^{2} = *i*^{2}*k*^{2} = (-1)*k*^{2} = -*k*^{2}. The solutions of the associatedalgebraic equation are then

*Example 3.* If we start with the differential equation*y*''+*y*=0 (so *c*_{1}=0 and *c*_{0}=1) the discriminant is *c*_{1}^{2}-4*c*_{0}=-4, so 2*i* is a square root of the discriminant and the solutions of thecharacteristic equation are and .

*Example 4.* If the differential equation is *y*''+2*y*'+2*y*=0 (so *c*_{1}=2 and *c*_{0}=2 and *c*_{1}^{2}-4*c*_{0}=4-8 =-4). In thiscase the solutions of thecharacteristic equation are ,i.e.and .

**5.** Going from the solutions of the characteristic equationto the solutions of the differential equation involves interpretingas a function of *x* when is a complex number.Suppose has real part *a* and imaginary part *ib*, so thatwith *a* and *b* real numbers. Then

assuming for the moment that complex numbers can be exponentiated so asto satisfy the law of exponents. The factor

*e*

^{ax}does not causea problem, but what is

*e*

^{ibx}? Everything will work out if we take

and we will see later that this formula is a necessary consequence ofthe elementary properties of the exponential, sine and cosine functions.

**6.** Let us try this formula with our examples.

*Example 3.* For *y*''+*y*=0 we found and ,so the solutions are *y*_{1}=*e*^{ix} and *y*_{2}=*e*^{-ix}.The formula gives us and .

Now here is a useful fact about linear differential equations: if *y*_{1}and *y*_{2} are solutions of the homogeneous differential equation*y*''+*c*_{1}*y*'+*c*_{2}*y*=0, then so is the linear combination *p y*_{1} + *q y*_{2} for any numbers *p* and *q*. This fact is easy to check (just plug *p y*_{1} + *q y*_{2} into the equation and regroup terms; note that the coefficients *a*_{1} and *a*_{0} do not need to be constant for this towork, that *p* and *q* can be complex as well as real constants, andthat this works for equations af any order).

Using this fact with the solutions from our example, we notice thatand are both solutions. *When we are given a problem with realcoefficients it is customary, and always possible, to exhibit realsolutions.* Using the fact about linear combinations again, we can saythat is a solution for any *p* and *q*. Thisis the general solution. (It is also correct to call *y*=*p e*^{ix} +*q e*^{-ix} the general solution; which one you use depends on the context.)

*Example 4.* *y*''+2*y*'+2*y*=0. We found and .Using the formula we have

Exactly as before we can take and to get the real solutions and .(Check thatthese functions both satisfy the differential equation!) The generalsolution will be .

**7.** *Repeated roots*. Suppose the discriminant is zero:*c*_{1}^{2}-4*c*_{0} =0. Then the characteristic equationhas one root. In this case both **and**are solutions of the differential equation.

*Example 5.* Consider the equation *y*''+4*y*'+4*y*=0. Here*c*_{1} = *c*_{0} = 4. The discriminant is .The only root is .Check that **both** *e*^{-2x} and*x e*^{-2x} are solutions. The general solution is then*y* = *p e*^{-2x} + *q x e*^{-2x}.

**8.** *Initial Conditions*. For a first-orderdifferential equation the undetermined constant can be adjusted tomake the solution satisfy the initial condition *y*(0)=*y*_{0}; in thesame way the *p* and the *q* in the general solution of a secondorder differential equation can be adjusted to satisfy initialconditions. Now there are two: we can specify both the value andthe first derivative of the solution for some ``initial'' valueof *x*.

*Example 5.* Suppose that for the differentialequation of Example 2, *y*''+*y*'-2*y*=0, we want a solution with*y*(0)=1 and *y*'(0)=-1. The general solution is *y*=*p e*^{x} + *q e*^{-2x}, since the two roots of the characteristicequation are 1 and -2. The method is to write down what theinitial conditions mean in terms of the general solution, and thento solve for *p* and *q*. In this case we have

This leads to the set of linear equations

*p*+

*q*= 1,

*p*-2

*q*= -1with solution

*q*= 2/3,

*p*= 1/3. Check that the solutionsatisfies the initialconditions.

*Example 6.* For the differential equation of Example 4, *y*''+2*y*'+2*y*=0, we found the general solution.To find a solutionsatisfying the initial conditions *y*(0)=-2 and *y*'(0)=1 we proceed as in the last example:

So

*p*= -2 and

*q*= -1. Check that the solutionsatisfies the initialconditions.

*Tony Phillips*

*Math Dept, SUNY at Stony Brook*

*1998-11-30*