differential equations text

Upload: ea

Post on 08-Aug-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/22/2019 Differential Equations Text

    1/238

    Lectures on Differential Equations

    Philip KormanDepartment of Mathematical Sciences

    University of CincinnatiCincinnati Ohio 45221-0025

    Copyright @ 2008, by Philip L. Korman

  • 8/22/2019 Differential Equations Text

    2/238

    Contents

    Introduction vi

    1 First Order Equations 11.1 Integration by Guess-and-Check . . . . . . . . . . . . . . . . . 1

    1.2 First Order Linear Equations . . . . . . . . . . . . . . . . . . 3

    1.2.1 Background . . . . . . . . . . . . . . . . . . . . . . . . 3

    1.2.2 Integrating Factor . . . . . . . . . . . . . . . . . . . . 5

    1.3 Separable Equations . . . . . . . . . . . . . . . . . . . . . . . 9

    1.3.1 Background . . . . . . . . . . . . . . . . . . . . . . . . 9

    1.3.2 The method . . . . . . . . . . . . . . . . . . . . . . . . 10

    1.3.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.4 Some Special Equations . . . . . . . . . . . . . . . . . . . . . 14

    1.4.1 Homogeneous Equations . . . . . . . . . . . . . . . . . 14

    1.4.2 The Logistic Population Model . . . . . . . . . . . . . 171.4.3 Bernoullis Equation . . . . . . . . . . . . . . . . . . . 19

    1.4.4 Riccatis Equation . . . . . . . . . . . . . . . . . . . . 201.4.5 Parametric Integration . . . . . . . . . . . . . . . . . . 221.4.6 Some Applications . . . . . . . . . . . . . . . . . . . . 23

    1.5 Exact Equations . . . . . . . . . . . . . . . . . . . . . . . . . 25

    1.6 Existence and Uniqueness of Solution . . . . . . . . . . . . . . 29

    1.7 Numerical Solution by Eulers method . . . . . . . . . . . . . 31

    1.7.1 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 32

    2 Second Order Equations 37

    2.1 Special Second Order Equations . . . . . . . . . . . . . . . . . 372.1.1 y is not present in the equation . . . . . . . . . . . . . 38

    2.1.2 x is not present in the equation . . . . . . . . . . . . . 392.2 Linear Homogeneous Equations with Constant Coefficients . . 40

    2.2.1 Characteristic equation has two distinct real roots . . 41

    ii

  • 8/22/2019 Differential Equations Text

    3/238

    CONTENTS iii

    2.2.2 Characteristic equation has only one (repeated) real

    root . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.3 Characteristic equation has two complex conjugate roots . . . 452.3.1 Eulers formula . . . . . . . . . . . . . . . . . . . . . 452.3.2 The General Solution . . . . . . . . . . . . . . . . . . 452.3.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 47

    2.4 Linear Second Order Equations with Variable Coefficients . . 502.5 Some Applications of the Theory . . . . . . . . . . . . . . . . 54

    2.5.1 The Hyperbolic Sine and Cosine Functions . . . . . . 542.5.2 Different Ways to Write a General Solution . . . . . . 542.5.3 Finding the Second Solution . . . . . . . . . . . . . . . 562.5.4 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 57

    2.6 Non-homogeneous Equations. The easy case. . . . . . . . . . 582.7 Non-homogeneous Equations. When one needs something ex-

    tra. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 622.8 Variation of Parameters . . . . . . . . . . . . . . . . . . . . . 632.9 Convolution Integral . . . . . . . . . . . . . . . . . . . . . . . 65

    2.9.1 Differentiating Integrals . . . . . . . . . . . . . . . . . 652.9.2 Yet Another Way to Compute a Particular Solution . 66

    2.10 Applications of Second Order Equations . . . . . . . . . . . . 672.10.1 Vibrating Spring . . . . . . . . . . . . . . . . . . . . . 672.10.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 692.10.3 Meteor Approaching the Earth . . . . . . . . . . . . . 722.10.4 Damped Oscillations . . . . . . . . . . . . . . . . . . . 74

    2.11 Further Applications . . . . . . . . . . . . . . . . . . . . . . . 752.11.1 Forced and Damped Oscillations . . . . . . . . . . . . 752.11.2 Discontinuous Forcing Term . . . . . . . . . . . . . . . 762.11.3 Oscillations of a Pendulum . . . . . . . . . . . . . . . 772.11.4 Sympathetic Oscillations . . . . . . . . . . . . . . . . . 78

    2.12 Oscillations of a Spring Subject to a Periodic Force . . . . . . 802.12.1 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . 802.12.2 Vibrations of a Spring Subject to a Periodic Force . . 83

    2.13 Eulers Equation . . . . . . . . . . . . . . . . . . . . . . . . . 842.13.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . 842.13.2 The Important Class of Equations . . . . . . . . . . . 84

    2.14 Linear Equations of Order Higher Than Two . . . . . . . . . 872.14.1 The Polar Form of Complex Numbers . . . . . . . . . 872.14.2 Linear Homogeneous Equations . . . . . . . . . . . . . 892.14.3 Non-Homogeneous Equations . . . . . . . . . . . . . . 912.14.4 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 91

  • 8/22/2019 Differential Equations Text

    4/238

    iv CONTENTS

    3 Using Infinite Series to Solve Differential Equations 95

    3.1 Series Solution Near a Regular Point . . . . . . . . . . . . . . 953.1.1 Maclauren and Taylor Series . . . . . . . . . . . . . . 95

    3.1.2 A Toy Problem . . . . . . . . . . . . . . . . . . . . . . 973.1.3 Using Series When Other Methods Fail . . . . . . . . 98

    3.2 Solution Near a Mildly Singular Point . . . . . . . . . . . . . 102

    3.2.1 Derivation of J0(x) by differentiation of the equation . 1063.3 Moderately Singular Equations . . . . . . . . . . . . . . . . . 107

    3.3.1 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 1 12

    4 Laplace Transform 1164.1 Laplace Transform And Its Inverse . . . . . . . . . . . . . . . 116

    4.1.1 Review of Improper Integrals . . . . . . . . . . . . . . 116

    4.1.2 Laplace Transform . . . . . . . . . . . . . . . . . . . . 1174.1.3 Inverse Laplace Transform . . . . . . . . . . . . . . . . 118

    4.2 Solving The Initial Value Problems . . . . . . . . . . . . . . . 1204.2.1 Step Functions . . . . . . . . . . . . . . . . . . . . . . 123

    4.3 The Delta Function and Impulse Forces . . . . . . . . . . . . 1254.4 Convolution and the Tautochrone curve . . . . . . . . . . . . 127

    4.4.1 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 1 32

    5 Systems of Differential Equations 1385.1 The Case of Distinct Eigenvalues . . . . . . . . . . . . . . . . 138

    5.1.1 Review of Vectors and Matrices . . . . . . . . . . . . . 138

    5.1.2 Linear First Order Systems with Constant Coefficients 1395.2 A Pair of Complex Conjugate Eigenvalues . . . . . . . . . . . 144

    5.2.1 Complex Valued Functions . . . . . . . . . . . . . . . 144

    5.2.2 General Solution . . . . . . . . . . . . . . . . . . . . . 1445.2.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 1 46

    5.3 Predator-Prey Interaction . . . . . . . . . . . . . . . . . . . . 147

    5.4 An application to epidemiology . . . . . . . . . . . . . . . . . 1515.5 Lyapunov stability . . . . . . . . . . . . . . . . . . . . . . . . 1535.6 Exponential of a matrix . . . . . . . . . . . . . . . . . . . . . 155

    5.6.1 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 1 57

    6 Fourier Series and Boundary Value Problems 1596.1 Fourier series for functions of an arbitrary period . . . . . . 159

    6.1.1 Even and odd functions . . . . . . . . . . . . . . . . . 1616.1.2 Further examples and the convergence theorem . . . . 163

    6.2 Fourier cosine and Fourier sine series . . . . . . . . . . . . . 165

  • 8/22/2019 Differential Equations Text

    5/238

    CONTENTS v

    6.3 Two point boundary value problems . . . . . . . . . . . . . . 168

    6.3.1 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 1706.4 Heat equation and separation of variables . . . . . . . . . . . 1746.4.1 Separation of variables . . . . . . . . . . . . . . . . . . 175

    6.5 Laplaces equation . . . . . . . . . . . . . . . . . . . . . . . . 1816.6 The wave equation . . . . . . . . . . . . . . . . . . . . . . . . 185

    6.6.1 Non-homogeneous problems . . . . . . . . . . . . . . . 1886.6.2 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 191

    6.7 Calculating the Earths temperature . . . . . . . . . . . . . . 1946.7.1 The complex form of the Fourier series . . . . . . . . . 1946.7.2 Temperatures inside the Earth and wine cellars . . . . 196

    6.8 Laplaces equation in circular domains . . . . . . . . . . . . . 1976.9 Sturm-Liouville problems . . . . . . . . . . . . . . . . . . . . 201

    6.9.1 Fourier-Bessel series . . . . . . . . . . . . . . . . . . . 2046.9.2 Cooling of a cylindrical tank . . . . . . . . . . . . . . 206

    6.10 Greens function . . . . . . . . . . . . . . . . . . . . . . . . . 2076.11 Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . 2106.12 Problems on infinite domains . . . . . . . . . . . . . . . . . . 212

    6.12.1 Evaluation of some integrals . . . . . . . . . . . . . . . 2126.12.2 Heat equation for < x < . . . . . . . . . . . . 2136.12.3 Steady state temperatures for the upper half plane . . 2146.12.4 Using Laplace transform for a semi-infinite string . . . 2156.12.5 Problems . . . . . . . . . . . . . . . . . . . . . . . . . 216

    7 Numerical Computations 2217.1 The capabilities of software systems, like Mathematica . . . . 2 2 17.2 Solving boundary value problems . . . . . . . . . . . . . . . 2247.3 Solving nonlinear boundary value problems . . . . . . . . . . 2277.4 Direction fields . . . . . . . . . . . . . . . . . . . . . . . . . . 229

  • 8/22/2019 Differential Equations Text

    6/238

    Introduction

    This book is based on several courses that I taught at the University ofCincinnati. Chapters 1-4 are based on the course Differential Equationsfor sophomores in science and engineering. These are actual lecture notes,

    more informal than many textbooks. While some theoretical material iseither quoted, or just mentioned without proof, I have tried to show all ofthe details when doing problems. I have tried to use plain language, and notto be too wordy. I think, an extra word of explanation has often as muchpotential to confuse a student, as to be helpful.

    How useful are differential equations? Here is what Isaac Newton said:It is useful to solve differential equations. And what he knew was justthe beginning. Today differential equations are used widely in science andengineering. It is also a beautiful subject, and it lets students see Calculusin action.

    It is a pleasure to thank Ken Meyer and Dieter Schmidt for constantencouragement, while I was writing this book. I also wish to thank Ken forseveral specific suggestions, like doing Fourier series early, with applicationsto periodic vibrations and radio tuning. I wish to thank Roger Chalkley,Tomasz Adamowicz and Ning Zhong for a number of useful comments.

    vi

  • 8/22/2019 Differential Equations Text

    7/238

    Chapter 1

    First Order Equations

    1.1 Integration by Guess-and-Check

    Many problems in differential equations end with a computation of an inte-gral. One even uses the term integration of a differential equation insteadof solution. We need to be able to compute integrals quickly.

    Recall the product rule

    (f g) = f g + fg .

    Example

    xex dx. We need to find the function, whose derivative is xex.

    If we try a guess: xex

    , then its derivative

    (xex) = xex + ex

    has an extra term ex. To remove this extra term, we subtract ex from theinitial guess, i.e.,

    xex dx = xex ex + c.By differentiation, we verify that this is correct. Of course, integration byparts may also be used.

    Example

    x cos3x dx. Starting with the initial guess

    1

    3x sin3x, whose

    derivative is x cos3x + 13 sin3x, we computex cos3x dx =

    1

    3x sin3x +

    1

    9cos3x + c.

    1

  • 8/22/2019 Differential Equations Text

    8/238

    2 CHAPTER 1. FIRST ORDER EQUATIONS

    We see that the initial guess is the product f(x)g(x), chosen in such a

    way that f(x)g(x) gives the integrand.Example

    xe5x dx. Starting with the initial guess 1

    5xe5x, we compute

    xe5x dx = 1

    5xe5x 1

    25e5x + c.

    Example

    x2 sin3x dx. The initial guess is 1

    3x2 cos3x. Its derivative

    1

    3x2 cos3x

    = x2 sin3x 2

    3x cos3x

    has an extra term 23

    x cos3x. To remove this term, we modify our guess:

    13

    x2 cos3x +2

    9x sin3x. Its derivative

    1

    3x2 cos3x +

    2

    9x sin3x

    = x2 sin3x +

    2

    9sin3x

    still has an extra term2

    9sin3x. So we make the final adjustment

    x2 sin3x dx = 1

    3x2 cos3x +

    2

    9x sin3x +

    2

    27cos3x + c .

    This is easier than integrating by parts twice.

    Example

    x

    x2 + 4 dx. We begin by rewriting this integral as

    x

    x2 + 41/2

    dx.

    One usually computes this integral by a substitution u = x2 + 4, with

    du = 2x dx. Forgetting a constant multiple, the integral becomes

    u1/2 du.

    Ignoring a constant multiple again, this evaluates to u3/2. Returning to the

    original variable, we have our initial guess

    x2 + 43/2

    . Differentiation

    d

    dx x2 + 4

    3/2= 3xx

    2 + 4

    gives us the integrand with an extra factor of 3. To fix that, we multiplythe initial guess by 13 :

    x

    x2 + 4 dx =1

    3

    x2 + 4

    3/2+ c.

  • 8/22/2019 Differential Equations Text

    9/238

    1.2. FIRST ORDER LINEAR EQUATIONS 3

    Example

    1(x2 + 1)(x2 + 4)

    dx. Instead of using partial fractions, let us

    try to split the integrand as

    1

    x2 + 1 1

    x2 + 4.

    We see that this is off by a factor. The correct formula is

    1

    (x2 + 1)(x2 + 4)=

    1

    3

    1

    x2 + 1 1

    x2 + 4

    .

    Then 1(x2 + 1)(x2 + 4) dx =

    1

    3 tan1

    x 1

    6 tan1 x

    2 + c .

    Sometimes one can guess the splitting twice, as in the following case.

    Example

    1

    x2 (1 x2) dx.

    1

    x2 (1 x2) =1

    x2+

    1

    1 x2 =1

    x2+

    1

    (1 x)(1+ x) =1

    x2+

    1

    2

    1

    1 x +1

    2

    1

    1 + x.

    Then

    1x2 (1 x2) dx =

    1

    x 1

    2 ln(1 x) +1

    2 ln(1 + x) + c .

    1.2 First Order Linear Equations

    1.2.1 Background

    Suppose we need to find the function y(x) so that

    y(x) = x.

    This is a differential equation, because it involves a derivative of the unknownfunction. This is a first order equation, as it only involves the first derivative.

    Solution is of coursey(x) =

    x2

    2+ c,(2.1)

    where c is an arbitrary constant. We see that differential equations haveinfinitely many solutions. The formula (2.1) gives us the general solution.

  • 8/22/2019 Differential Equations Text

    10/238

    4 CHAPTER 1. FIRST ORDER EQUATIONS

    Then we can select the one that satisfies an extra initial condition. For

    example, for the problem

    y(x) = x(2.2)y(0) = 5

    we begin with the general solution given in formula (2.1), and then evaluateit at x = 0

    y(0) = c = 5.

    So that c = 5, and solution of the problem (2.2) is

    y(x) =x2

    2

    + 5.

    The problem (2.2) is an example of an initial value problem. If the variablex represents time, then the value ofy(x) at the initial time is prescribed tobe 5. The initial condition may be prescribed at other values ofx, as in thefollowing example:

    y = yy(1) = 2e .

    Here the initial condition is prescribed at x = 1, e denotes the Euler numbere 2.718. Observe that while y and y are both functions of x, we do notspell this out. This problem is still in the Calculus realm. Indeed, we arelooking for a function y(x) whos derivative is the same as y(x). This isa property of the function ex, and its constant multiples. I.e., the generalsolution is

    y(x) = cex,

    and then the initial condition gives

    y(1) = ce = 2e,

    so that c = 2. The solution is then

    y(x) = 2e

    x

    .

    We see that the main thing is finding the general solution. Selecting cto satisfy the initial condition, is usually easy.

  • 8/22/2019 Differential Equations Text

    11/238

    1.2. FIRST ORDER LINEAR EQUATIONS 5

    Recall from Calculus that

    ddx

    eg(x) = eg(x)g(x).

    In case g(x) is an integral, we have

    d

    dxe

    p(x)dx = p(x)e

    p(x)dx,(2.3)

    because derivative of the integral is p(x).

    1.2.2 Integrating Factor

    Let us find the general solution of the equation

    y +p(x)y = g(x),(2.4)

    where p(x) and g(x) are given functions. This is a linear equation, as wehave a linear function of y and y. Because we know p(x), we can calculatethe function

    (x) = e

    p(x)dx ,

    and its derivative(x) = p(x)e

    p(x)dx = p(x).(2.5)

    We now multiply the equation (2.4) by (x), giving

    y + yp(x) = g(x).(2.6)Let us use the product rule and the formula (2.5) to calculate a derivative

    d

    dx[y] = y + y = y + yp(x).

    So, we may rewrite (2.6) in the form

    d

    dx[y] = g(x).(2.7)

    This allows us to compute the general solution. Indeed, we know the functionon the right. By integration we express (x)y(x) = (x)g(x) dx, and thensolve for y(x).

    In practice one needs to memorize the formula for (x) and the form(2.7). Computation of (x) will involve a constant of integration. We willalways set c = 0, because the method works for any c.

  • 8/22/2019 Differential Equations Text

    12/238

    6 CHAPTER 1. FIRST ORDER EQUATIONS

    Example Solve

    y + 2xy = xy(0) = 2 .

    Here p(x) = 2x and g(x) = x. Compute

    (x) = e2xdx = ex

    2.

    Equation (2.7) takes the form

    d

    dx

    ex

    2y

    = xex2

    .

    Integrate both sides, and then perform integration by parts (or guess-and-check)

    ex2

    y =

    xex

    2dx =

    1

    2ex

    2+ c.

    Solving for y

    y(x) =1

    2+ cex

    2.

    From the initial condition

    y(0) =1

    2+ c = 2,

    i.e., c=32 . Answer: y(x) = 12 + 32ex

    2

    .

    Example Solve

    y + 1t y = cos2ty(/2) = 1 .

    Here the independent variable is t, y = y(t), but the method is of course thesame. Compute

    (t) = e

    1tdt = eln t = t,

    and thend

    dt [ty] = t cos2t.

    Integrate both sides, and perform integration by parts

    ty =

    t cos2t dt =

    1

    2t sin2t +

    1

    4cos2t + c.

  • 8/22/2019 Differential Equations Text

    13/238

    1.2. FIRST ORDER LINEAR EQUATIONS 7

    Divide by t

    y(t) =1

    2 sin2t +1

    4

    cos2t

    t +c

    t .

    The initial condition gives

    y(/2) = 14

    1

    /2+

    c

    /2= 1,

    i.e.,

    c = /2 +1

    4,

    and so the solution is

    y(t) =1

    2 sin2t +1

    4

    cos2t

    t +/2 + 1

    4t .(2.8)

    This function y(t) gives us a curve, called the integral curve. The initialcondition tells us that y = 1 when t = /2, i.e., the point (/2, 1) lies onthe integral curve. What is the maximal interval on which the solution (2.8)is valid? I.e., starting with the initial t = /2, how far can we continue thesolution to the left and to the right of the initial t? We see from (2.8) thatthe maximal interval is (0, ). At t = 0 the solution y(t) is undefined.Example Solve

    x dydx + 2y = sin x

    y() = 2 .

    Here the equation is not in the form (2.4), for which the theory applies. Wedivide the equation by x

    dy

    dx+

    2

    xy =

    sin x

    x.

    Now the equation is in the right form, with p(x) = 2x and g(x) =sinxx . As

    before, we compute using the properties of logarithms

    (x) = e

    2xdx = e2 lnx = elnx

    2= x2.

    And thend

    dx

    x2y

    = x2

    sin x

    x= x sin x.

  • 8/22/2019 Differential Equations Text

    14/238

    8 CHAPTER 1. FIRST ORDER EQUATIONS

    Integrate both sides, and perform integration by parts

    x2y =

    x sin x dx = x cos x + sin x + c,

    giving us the general solution

    y(x) = cos xx

    +sin x

    x2+

    c

    x2.

    The initial condition implies

    y() = 1

    +c

    2= 2.

    Solve for c: c = 22 + .

    Answer: y(x) = cos xx + sinxx2 + 22+

    x2. This solution is valid on the interval

    (, 0) (that is how far it can be continued to the left and to the right,starting from the initial x = ).Example Solve

    dydx =

    1yx

    y(1) = 0 .

    We have a problem: not only this equation is not in the right form, it isa nonlinear equation, because 1yx is not a linear function of y, no matterwhat the number x is. We need a little trick. Let us pretend that dy anddx are numbers, and take reciprocals of both sides of the equation

    dx

    dy= y x,

    ordx

    dy+ x = y.

    Let us now think ofy as independent variable, and x as a function ofy, i.e.,

    x = x(y). Then the last equation is linear, with p(y) = 1 and g(y) = y. We

    proceed as usual: (y) = e1 dy = ey, and

    d

    dy[eyx] = yey.

  • 8/22/2019 Differential Equations Text

    15/238

    1.3. SEPARABLE EQUATIONS 9

    0.0 0.5 1.0 1.5 2.0 2.5 3.0

    1

    0

    1

    2

    3

    Figure 1.1: The integral curve x = y1+2ey , with the initial point marked

    Integrating

    eyx =

    yey dy = yey ey + c,

    orx(y) = y 1 + cey.

    To find c we need a initial condition. The original initial condition tellsus that y = 0 for x = 1. For the inverse function x(y) this translates tox(0) = 1. So that c = 2.

    Answer: x(y) = y 1 + 2ey (see the Figure 1.1).The rigorous justification of this method is based on the formula for

    the derivative of an inverse function, that we recall next. Let y = y(x) besome function, and y0 = y(x0). Let x = x(y) be its inverse function. Thenx0 = x(y0), and we have

    dx

    dy(y0) =

    1dydx(x0)

    .

    1.3 Separable Equations1.3.1 Background

    Suppose we have a function F(y), and y in turn depends on x, i.e., y = y(x).So that in effect F depends on x. To differentiate F with respect to x we

  • 8/22/2019 Differential Equations Text

    16/238

    10 CHAPTER 1. FIRST ORDER EQUATIONS

    use the Chain Rule from Calculus

    ddx

    F(y(x)) = F(y(x)) dydx

    .

    1.3.2 The method

    Suppose we are given two functions F(y) and G(x), and let us use thecorresponding lower case letters to denote their derivatives, i.e., F(y) = f(y)and G(x) = g(x). Our goal is to solve the equation (i.e., to find the generalsolution)

    f(y)dy

    dx= g(x).(3.1)

    This is a nonlinear equation.

    We begin by rewriting this equation, using the upper case functions

    F(y)dy

    dx= G(x).

    Using the Chain Rule, we rewrite the equation as

    d

    dxF(y) =

    d

    dxG(x).

    If derivatives of two functions are the same, these functions differ by aconstant, i.e.,

    F(y) = G(x) + c.(3.2)

    This is the desired general solution! If one is lucky, it may be possible tosolve this relation for y as a function of x. If not, maybe one can solve forx as a function of y. If both attempts fail, one can use implicit plottingroutine to draw the integral curves, i.e., the curves given by (3.2).

    We now describe a simple procedure, which leads from the equation (3.1)to its solution (3.2). Let us pretend that dydx is not a notation for a derivative,but a ratio of two numbers dy and dx. Clearing the denominator in (3.1)

    f(y) dy = g(x) dx.

    We have separated the variables, everything involving y is now on the left,while x appears only on the right. Integrate both sides:

    f(y) dy =

    g(x) dx,

  • 8/22/2019 Differential Equations Text

    17/238

    1.3. SEPARABLE EQUATIONS 11

    which gives us immediately the solution (3.2).

    Example Solvedy

    dx= x(1 + y2).

    To separate the variables, we multiply by dx, and divide by (1 + y2)dy

    1 + y2dy =

    x d x .

    I.e., the general solution is

    arctan y =1

    2x2 + c,

    which we can also put into the form

    y = tan(1

    2x2 + c).

    Example Solve xy2 + x

    dx + ex dy = 0 .

    This is an example of a differential equation, written in differential form.

    (Dividing through by exdx, we can put it into a familiar form dydx = xy2+xex ,

    although there is no need to do that.)

    By factoring, we are able to separate the variables:

    ex dy = x(y2 + 1) dx;dy

    y2 + 1=

    xex dx;

    tan1 y = xex + ex + c .

    Answer: y(x) = tan

    xex + ex + c

    .

    Recall that by the Main Theorem of Calculus ddxxa f(t) dt = f(x), for

    any constant a. The integralxa f(t) dt gives us an anti-derivative of f(x),

    i.e., we may write

    f(x) dx =

    xa f(t) dt+c. Here we can let c be an arbitrary

    constant, and a to be fixed, or the other way around.Example Solve

    dydx = e

    x2y2

    y(1) = 2 .

  • 8/22/2019 Differential Equations Text

    18/238

    12 CHAPTER 1. FIRST ORDER EQUATIONS

    Separation of variables:

    dy

    y2dy =

    ex

    2dx

    gives on the right an integral that cannot be evaluated in elementary func-tions. We shall change it to a definite integral, as above. We choose a = 1,because the initial condition was given at x = 1:

    dy

    y2dy =

    x1

    et2

    dt + c;

    1y

    = x

    1et

    2dt + c .

    When x = 1, we have y = 2, which means that c = 12 . Answer: y(x) = 1x

    1 et2 dt + 12

    . For any x, the integralx1 e

    t2 dt can be quickly computed

    by a numerical integration method, e.g., by the trapezoidal method.

    1.3.3 Problems

    I. Integrate by Guess-and-Check:

    1. xe5x dx. 2. x sin3x dx.

    3.

    xe

    12x dx. Ans. ex/2(4 2x) + c.

    4.

    x2 cos2x dx. Ans.

    1

    2x cos2x +

    1

    2x2 1

    4

    sin2x + c.

    5.

    x

    x2 + 1dx. Ans.

    x2 + 1 + c.

    6.

    x

    (x2 + 1)(x2 + 2)dx. Ans.

    1

    2ln

    x2 + 1

    1

    2ln

    x2 + 2

    + c.

    7. 1

    (x2 + 1)(x2 + 9)dx. Ans.

    1

    8tan1 x 1

    24tan1

    x

    3+ c.

    8.

    (ln x)5

    xdx. Ans.

    1

    6(ln x)6 + c.

    9.

    x2ex

    3dx. Ans.

    1

    3ex

    3+ c.

  • 8/22/2019 Differential Equations Text

    19/238

    1.3. SEPARABLE EQUATIONS 13

    10. e2x sin3x dx. Ans. e2x

    2

    13sin3x

    3

    13cos3x + c.

    (Hint: Look for the anti-derivative in the form Ae2x sin3x+Be2x cos3x, anddetermine the constants A and B by differentiation.)

    II. Find the general solution of the linear problems:

    1. y +1

    xy = cos x. Ans. y =

    c

    x+ sin x +

    cos x

    x.

    2. xy + 2y = ex. Ans. y =c

    x2 (x + 1)e

    x

    x2.

    3. x4

    y + 3x3

    y = x2

    ex

    . Ans. y =

    c

    x3 +

    (x

    1)ex

    x3 .

    4.dy

    dx= 2x(x2 + y). Ans. y = cex

    2 x2 1.

    5. xy 2y = xe1/x. Ans. y = cx2 x2e1/x.

    6. y + 2y = sin3x. Ans. y = ce2x +2

    13sin3x 3

    13cos3x.

    7. xyy 1 = y2. (Hint: Set v = y2. Then v = 2yy , and one obtains a

    linear equation for v = v(x)) Ans. y2 = 2x + cx2.

    III. Find the solution of the initial value problem, and state the maximuminterval on which this solution is valid:

    1. y +1

    xy = cos x, y(

    2) = 1. Ans. y = cos(x)+x sin(x)x ; (0, ).

    2. xy+(2+x)y = 1, y(2) = 0. Ans. y = 1x

    +3ex2

    x2 1

    x2; (, 0).

    3. x(y y) = ex, y(1) = 1e

    . Ans. y = ex ln |x| + ex; (, 0).

    4. (t + 2)dy

    dt+ y = 5, y(1) = 1. Ans. y =

    5t 2t + 2

    ; (2, ).

    5. ty 2y = t4

    cos t, y(/2) = 0.

    Ans. y = t3 sin t + t2 cos t 2

    t2; (, ). Solution is valid for all t.

    6. t ln tdr

    dt+ r = 5tet, r(2) = 0. Ans. r =

    5et 5e2ln t

    ; (1, ).

  • 8/22/2019 Differential Equations Text

    20/238

    14 CHAPTER 1. FIRST ORDER EQUATIONS

    7.dy

    dx=

    1

    y2 + x, y(2) = 0.

    Hint: Obtain a linear equation fordx

    dy. Ans. x = 2 + 4ey 2y y2.

    8. Find a solution (y = y(t)) ofy+ y = sin 2t, which is a periodic function.

    Hint: Look for a solution in the form y(t) = A sin2t + B cos2t, plug thisinto the equation, and determine the constants A and B.

    Ans. y =1

    5sin2t 2

    5cos2t.

    9. Show that the equation y + y = sin2t has no other periodic solutions.

    Hint: Consider the equation that the difference of any two solutions satisfies.

    IV. Solve by separating the variables

    1.dy

    dx=

    2

    x(y3 + 1). Ans.

    y4

    4+ y 2 ln x = c.

    2. exdx ydy = 0, y(0) = 1. Ans. y = 2ex 1.

    3. (x2y2 + y2)dx yxdy = 0. Ans. y = ex2

    2+ln x+c = cxe

    x2

    2 .

    4. y(t) = ty2(1 + t2)1/2, y(0) = 2. Ans. y =

    2

    2t2 + 1 3.

    5. (y xy + x 1)dx + x2dy = 0, y(1) = 0. Ans. y = e e1xx

    e.

    6. y = ex2

    y, y(2) = 1. Ans. y = ex

    2et2dt.

    7. y = xy2 + xy, y(0) = 2. Ans. y =2e

    x2

    2

    3 2ex22.

    1.4 Some Special Equations

    1.4.1 Homogeneous Equations

    Let f(t) be a given function. If we set here t = yx , we obtain a function f(yx).

    Then f( yx) is a function of two variables x and y, but it depends on them

  • 8/22/2019 Differential Equations Text

    21/238

    1.4. SOME SPECIAL EQUATIONS 15

    in a special way. One calls such function to be homogeneous. For example,y

    4x

    xy is a homogeneous function, because we can put it into the formy 4xx y =

    y/x 41 y/x ,

    i.e., here f(t) = t41t .

    Our goal is to solve the equation

    dy

    dx= f(

    y

    x).(4.1)

    Set v = yx . Since y is a function of x, the same is true of v = v(x).

    Solving for y, y = xv, and then by the product ruledy

    dx= v + x

    dv

    dx.

    Switching to v in (4.1)

    v + xdv

    dx= f(v).(4.2)

    This a separable equation! Indeed, after taking v to the right, we can sepa-rate the variables

    dv

    f(v) v dv =

    dx

    x.

    After solving this for v(x), we can express the original unknown y = xv(x).

    In practice, one should try to remember the formula (4.2).

    Example Solve

    dydx =

    x2+3y2

    2xy

    y(1) = 2 .

    To see that the equation is homogeneous, we rewrite it as

    dy

    dx

    =1

    2

    x

    y

    +3

    2

    y

    x

    .

    Set v = yx , or y = xv. Observing thatxy =

    1v , we have

    v + xdv

    dx=

    1

    2

    1

    v+

    3

    2v

  • 8/22/2019 Differential Equations Text

    22/238

    16 CHAPTER 1. FIRST ORDER EQUATIONS

    Simplify

    x dvdx = 12 1v + 12 v = 1 + v

    2

    2v .

    Separating variables 2v

    1 + v2dv =

    dx

    x.

    We now obtain the general solution, by doing the following steps (observethat ln c is another way to write an arbitrary constant)

    ln (1+ v2) = ln x + ln c = ln cx;

    1 + v2 = cx;

    v = cx 1;y(x) = xv = xcx 1;

    From the initial condition

    y(1) = c 1 = 2.

    It follows that we need to select minus, and c = 5.

    Answer: y(x) = x5x 1.We mention next an alternative definition: the function f(x, y) is called

    homogeneous if

    f(tx, ty) = f(x, y) for all constants t.

    If this holds, then setting t = 1x , we see that

    f(x, y) = f(tx, ty) = f(1,y

    x),

    i.e., f(x, y) is some function of yx , as the old definition was saying.

    Example Solvedy

    dx=

    y

    x +

    xy, with x > 0 .

    It is more straightforward to use the new definition to verify that the functionf(x, y) = yx+xy is homogeneous:

    f(tx, ty) =(ty)

    (tx) +

    (tx)(ty)=

    y

    x +

    xy= f(x, y) .

  • 8/22/2019 Differential Equations Text

    23/238

    1.4. SOME SPECIAL EQUATIONS 17

    Letting y/x = v or y = xv we rewrite the equation

    v + xv = xvx +

    x xv

    = v1 +

    v

    .

    We proceed to separate the variables:

    xdv

    dx=

    v

    1 +

    v v = v

    3/2

    1 +

    v;

    1 +

    v

    v3/2dv =

    dx

    x;

    2v1/2 + ln v = ln x + c;

    The integral on the left was evaluated by division. Finally, we replace v byy/x:

    2

    x

    y+ ln

    y

    x= ln x + c ;

    2

    x

    y+ ln y = c .

    We have obtained an implicit representation of solution.

    When separating the variables, we had to assume that v = 0 (in orderto divide by v3/2). In case v = 0, we obtain another solution: y = 0.

    1.4.2 The Logistic Population Model

    Let y(t) denote the number of rabbits on a tropical island at time t. Thesimplest model of population growth is

    y = ayy(0) = y0 .

    This model assumes that initially the number of rabbits was equal to somenumber y0 > 0, while the rate of change of population, i.e., y(t), is propor-tional to the number of rabbits. Here a is a given constant. The populationof rabbits grows, which results in a faster and faster rate of growth. Oneexpects an explosive growth. Indeed, solving the equation, we get

    y(t) = ceat .

    From the initial condition y(0) = c = y0, which gives us y(t) = y0eat,

    i.e., exponential growth. This is the notorious Malthusian model. Is it

  • 8/22/2019 Differential Equations Text

    24/238

    18 CHAPTER 1. FIRST ORDER EQUATIONS

    realistic? Yes, sometimes, for a limited time. If the initial number of rabbits

    y0 is small, then for a while their number may grow exponentially.A more realistic model, which can be used for a long time is the Logistic

    Model:

    y = ay by2y(0) = y0 .

    Here y = y(t); a, b and y0 are positive constants that are given. If y0is small, then at first y(t) is small. Then the by2 term is negligible, andwe have exponential growth. As y(t) increases, this term is not negligibleanymore, and we can expect the rate of growth to get smaller and smaller.

    (Writing the equation as y = (a b y)y, we can regard the a b y term asthe rate of growth.) In case the initial number y0 is large, the quadratic onthe right is negative, i.e., y(t) < 0, and the population decreases. We nowsolve the problem to confirm our guesses.

    This problem can be solved by separation of variables. Instead, we useanother technique. Divide both sides of the equation by y2

    y2y = ay1 b.

    Introduce a new unknown function v(t) = y1(t) = 1y(t) . By the generalizedpower rule v = y2y, so that we can rewrite the last equation as

    v = av b,

    or

    v + av = b.

    This a linear equation for v(t)! To solve it, we follow the familiar steps, andthen we return to the original unknown function y(t):

    (t) = e

    adt = eat;

    d

    dteatv = beat;

    eatv = b

    eat dt =

    b

    aeat + c;

    v =b

    a+ ceat;

  • 8/22/2019 Differential Equations Text

    25/238

    1.4. SOME SPECIAL EQUATIONS 19

    0.2 0.4 0.6 0.8 1.0 1.2 1.4t

    0.5

    1.0

    1.5

    2.0

    2.5

    y

    Figure 1.2: The solution of y = 5y 2y2, y(0) = 0.2

    y(t) = 1v

    = 1ba + ce

    at .

    To find the constant c, we use the initial condition

    y(0) =1

    ba + c

    = y0;

    c =1

    y0 b

    a;

    y(t) =1

    ba +

    1y0

    ba eat

    .

    The problem is solved. Observe that limt+ y(t) = ab , no matter whatinitial value y0 we take. The number

    ab is called the carrying capacity. It

    tells us the number of rabbits in the long run, that our island will support.A typical solution curve, called the logistic curve is given in Figure 1.2.

    1.4.3 Bernoullis Equation

    Let us solve the equation

    y(t) = p(t)y(t) + g(t)yn(t).

    Here p(t) and g(t) are given functions, n is a given constant. We see that

    the logistic model above is just a particular example of Bernoullis equation.

    We divide this equation by yn

    yny = p(t)y1n + g(t).

  • 8/22/2019 Differential Equations Text

    26/238

    20 CHAPTER 1. FIRST ORDER EQUATIONS

    Introduce a new unknown function v(t) = y1n(t). Compute v = (1 n)y

    n

    y, i.e., yn

    y =1

    1nv, and rewrite the equation asv = (1 n)p(t)v + (1 n)g(t).

    This is a linear equation for v(t)! After solving for v(t), we calculate y(t) =

    v1

    1n (t).

    Example Solve

    y = y +ty

    .

    Writing this equation in the form y = y + ty1/2, we see that this is aBernoullis equation, with n =

    1/2, i.e., we need to divide through by

    y1/2. But that is the same as multiplying through by y1/2, which we do,obtaining

    y1/2y = y3/2 + t .

    We now let v(t) = y3/2, v(t) = 32y1/2y, obtaining a linear equation for v,

    which we solve as usual:

    2

    3v = v + t; v 3

    2v =

    3

    2t;

    (t) = e

    32dt = e

    32t;

    d

    dt

    e

    32tv

    =3

    2te

    32t

    e 32 tv =

    32

    te 32 t dt = te 32 t 23

    e 32 t + c;

    v = t 23

    + ce32t .

    Returning to the original variable y, we have the answer: y =

    t 2

    3+ ce

    32t2/3

    .

    1.4.4 Riccatis Equation

    Let us try to solve the equation

    y(t) + a(t)y(t) + b(t)y2(t) = c(t).

    Here a(t), b(t) and c(t) are given functions. In case c(t) = 0, this is aBernoullis equation, which we can solve. For general c(t) one needs someluck to solve this equation. Namely, one needs to guess a particular solution

  • 8/22/2019 Differential Equations Text

    27/238

    1.4. SOME SPECIAL EQUATIONS 21

    p(t). Then a substitution y(t) = p(t) + z(t) produces a Bernoullis equation

    for z(t), which we can solve.There is no general way to find a particular solution, which means thatone cannot always solve Riccatis equation. Occasionally one can get lucky.

    Example Solvey + y2 = t2 2t .

    We have a quadratic on the right, which suggest that we look for the so-lution in the form y = at + b. Plugging in, we get a quadratic on the lefttoo. Equating the coefficients in t2, t and constant terms, we obtain threeequations to find a and b. In general three equations with two unknowns willhave no solution, but this is a lucky case, a =

    1, b = 1, i.e., p(t) =

    t + 1

    is a particular solution. Substituting y(t) = t + 1 + v(t) into the equation,and simplifying, we get

    v + 2(1 t)v = v2 .This is a Bernoullis equation. As before, we divide through by v2, and thenset z = 1v , z

    = vv2 , to get a linear equation:v2v + 2(1 t)v1 = 1; z 2(1 t)z = 1;

    = e2(1t)dt = et

    22t;d

    dt

    et

    22tz

    = et22t;

    et22tz = et22t dt .

    The last integral cannot be evaluated through elementary functions (Math-ematica can evaluate it through a special function, called Erfi). So weleave this integral unevaluated. We then get z from the last formula, afterwhich we express v, and finally y. We have obtained a family of solutions:

    y(t) = t + 1 + et22t

    et22t dt

    . (The usual arbitrary constant c is now inside

    the integral.) Another solution: y = t + 1.Example Solve

    y + 2y2 =6

    t2.(4.3)

    This time we look for solution in the form y(t) = a/t. Plugging in, wedetermine a = 2, i.e., p(t) = 2/t is a particular solution (a = 3/2 is also apossibility). Substitution y(t) = 2/t + v(t) produces a Bernoullis equation

    v +8

    tv + 2v2 = 0 .

  • 8/22/2019 Differential Equations Text

    28/238

    22 CHAPTER 1. FIRST ORDER EQUATIONS

    Solving it as before, we obtain v(t) =7

    ct8

    2t

    , and v = 0. Solutions:

    y(t) = 2t

    + 7ct8 2t , and also y =

    2t .

    Let us outline an alternative approach to this problem. Set y = 1z , wherez = z(t) is a new unknown function. Plugging into (4.3), then clearing thedenominators, we have

    z

    z2+ 2

    1

    z2=

    6

    t2;

    z + 2 = 6z2

    t2.

    This is a homogeneous equation, which can be solved as before.

    Think what are other equations, for which this neat trick would work. (Butdo not try to publish your findings, this was done by Jacoby around twohundred years ago.)

    There are some important ideas that we have learned in this subsection.Knowledge of one particular solution may help to crack open the equation,and get all of its solutions. Also, the form of this particular solution dependson the function in the right hand side of the equation.

    1.4.5 Parametric Integration

    Let us solve the problem (here y = y(x))

    y =

    1 y2y(0) = 1 .

    Unlike the previous problems, this equation is not solved for the derivativey(x). Solving for y(x), and then separating the variables, one may indeedfind the solution. Instead, let us assume that

    y(x) = sin t,

    where t is a parameter. From the equation

    y =

    1 sin2

    t = cos2

    t = cos t,

    if we assume that cos t > 0. Recall differentials: dy = y(x) dx, or

    dx =dy

    y(x)=

    sin t dtsin t

    = dt,

  • 8/22/2019 Differential Equations Text

    29/238

    1.4. SOME SPECIAL EQUATIONS 23

    i.e.,

    x = t + c.We have obtained a family of solutions in a parametric form:

    x = t + cy = cos t .

    Solving for t, t = x + c, i.e., y = cos(x + c). From the initial conditionc = 0, giving us the solution y = cos x. This solution is valid on infinitelymany disjoint intervals where cos x 0 (because we see from the equationthat y 0). This problem admits another solution: y = 1.

    For the equation

    y5 + y = x

    we do not have an option of solving for y(x). Parametric integration appearsto be the only way to solve it. We let y(x) = t, so that from the equationx = t5 + t, and dx = (5t4 + 1) dt. Then

    dy = y(x) dx = t(5t4 + 1) dt .

    I.e., dydt = t(5t4 + 1), which gives y = 56 t

    6 + 12t2 + c. We have obtained a

    family of solutions in a parametric form:

    x = t5 + t

    y = 56t6 + 12 t2 + c .

    1.4.6 Some Applications

    Differential equations arise naturally in geometric and physical problems.

    Example Find all positive decreasing functions y = f(x), with the follow-ing property: the area of the triangle formed by the vertical line going downfrom the curve, the x-axis and the tangent line to this curve is constant,equal to a > 0.

    Let (x0, f(x0)) be an arbitrary point on the graph of y = f(x). Drawthe triangle in question, formed by the horizontal line x = x0, the x-axis,

    and the tangent line to this curve. The tangent line intersects the x-axis atsome point x1 to the right of x0, because f(x) is decreasing. The slope ofthe tangent line is f(x0), so that the point-slope equation of the tangentline is

    y = f(x0) + f(x0)(x x0) .

  • 8/22/2019 Differential Equations Text

    30/238

    24 CHAPTER 1. FIRST ORDER EQUATIONS

    At x1, we have y = 0, i.e.,

    0 = f(x0) + f(x0)(x1 x0) .Solve this for x1, x1 = x0 f(x0)f(x0) . It follows that the horizontal side of ourtriangle is f(x0)f(x0) , while the vertical side is f(x0). The area of the righttriangle is then

    12

    f2(x0)

    f(x0)= a .

    (Observe that f(x0) < 0, so that the area is positive.) The point x0 wasarbitrary, so that we replace it by x, and then we replace f(x) by y, andf(x) by y:

    1

    2

    y2

    y = a; or y

    y2 =

    1

    2a .We solve this differential equation by taking antiderivatives of both sides:

    1

    y=

    1

    2ax + c; Answer: y(x) = 2ax+2ac .

    This is a family of hyperbolas. One of them is y =2a

    x.

    E

    T

    c

    x

    y

    (x0, f(x0))

    y = f(x)

    x1

    dddddd

    The triangle formed by the tangent line, the line x = x0, and the x-axis

    Example A tank holding 10L (liters) is originally filled with water. A salt-water mixture is pumped into the tank at a rate of 2L per minute. This

  • 8/22/2019 Differential Equations Text

    31/238

    1.5. EXACT EQUATIONS 25

    mixture contains 0.3 kg of salt per liter. The excess fluid is flowing out of

    the tank at the same rate (i.e., 2L per minute). How much salt does thetank contain after 4 minutes.

    Let t be the time (in minutes) since the mixture started flowing, and lety(t) denote the amount of salt in the tank at time t. The derivative y(t)gives the rate of change of salt per minute. The salt is pumped in at a rateof 0.6 kg per minute. The density of salt at time t is y(t)10 (i.e., each liter of

    solution in the tank contains y(t)10 kg of salt). So the salt flows out at the

    rate 2 y(t)10 = 0.2 y(t) kg/min. The difference of these two rates is y(t). I.e.,

    y = 0.6 0.2y .

    This is a linear differential equation. Initially, there was no salt in the tank,i.e., y(0) = 0 is our initial condition. Solving this equation together withthe initial condition, we have y(t) = 3 3e0.2t. After 4 minutes we havey(4) = 3 3e0.8 1.65 kg of salt in the tank.

    Now suppose a patient has food poisoning, and doctors are pumpingwater to flush his stomach out. One can compute similarly the weight ofpoison left in the stomach at time t.

    1.5 Exact Equations

    Let us begin by recalling the partial derivatives. If a function f(x) = x2 + adepends on a parameter a, then f(x) = 2x. If g(x) = x2 + y2, with aparameter y, we have dgdx = 2x. Another way to denote this derivative isgx = 2x. We can also regard g as a function of two variables, g = g(x, y).Then a partial derivativewith respect to x is computed by regarding y to bea parameter, gx = 2x. Alternative notation:

    gx = 2x. Similarly, a partial

    derivative with respect to y is gy =gy = 2y. It gives us the rate of change

    in y, when x is kept fixed.

    The equation (here y = y(x))

    y2

    + 2xyy = 0can be easily solved if we rewrite it in the equivalent form

    d

    dx

    xy2

    = 0.

  • 8/22/2019 Differential Equations Text

    32/238

    26 CHAPTER 1. FIRST ORDER EQUATIONS

    Then xy2 = c, and the general solution is

    y(x) = cx

    .

    We wish to play the same game for general equations of the form

    M(x, y) + N(x, y)y(x) = 0.(5.1)

    Here the functions M(x, y) and N(x, y) are given. In the above exampleM = y2 and N = 2xy.

    Definition The equation (5.1) is called exact if there is a function (x, y),so that we can rewrite (5.1) in the form

    d

    dx(x, y) = 0.(5.2)

    The general solution of the exact equation is

    (x, y) = c.(5.3)

    There are two natural questions: when is the equation (5.1) exact, andif it is exact, how does one find (x, y)?

    Theorem 1 Assume that the functions M, N, My and Nx are continuous

    in some discD : (xx0)2

    + (y y0)2

    < r2

    . Then the equation (5.1) is exactin D if and only if the following partial derivatives are equal

    My = Nx for all points (x, y) in D.(5.4)

    This theorem says two things: if the equation is exact, then the partialsare equal, and conversely, if the partials are equal, then the equation isexact.Proof: 1. Assume the equation (5.1) is exact, i.e., it can be written inthe form (5.2). Performing the differentiation in (5.2), we write it as

    x + yy = 0.

    But this is the same equation as (5.1), i.e.,

    x = M

    y = N .

  • 8/22/2019 Differential Equations Text

    33/238

    1.5. EXACT EQUATIONS 27

    Taking the second partials

    xy = My

    yx = Nx .

    We know from Calculus that xy = yx, therefore My = Nx.

    2. Assume that My = Nx. We will show that the equation (5.1) is thenexact by producing (x, y). We had just seen that (x, y) must satisfy

    x = M(x, y)(5.5)

    y = N(x, y) .

    Take anti-derivative in x of the first equation

    (x, y) =

    M(x, y) dx + h(y),(5.6)

    where h(y) is an arbitrary function of y. To determine h(y), plug the lastformula into the second line of (5.5)

    y =

    My(x, y) dx + h

    (y) = N(x, y),

    or

    h(y) = N(x, y)

    My(x, y) dx p(x, y).(5.7)

    Observe that we have denoted by p(x, y) the right side of the last equation.It turns out that p(x, y) does not really depend on x! Indeed,

    xp(x, y) = Nx My = 0,

    because it was given to us that My = Nx. So that p(x, y) is a function of yonly, so let us denote it p(y). The equation (5.7) takes the form

    h(y) = p(y).

    We integrate this to determine h(y), which we then plug into (5.6) to get

    (x, y). The equation

    M(x, y) dx + N(x, y) dy = 0

    is an alternative form of (5.1).

  • 8/22/2019 Differential Equations Text

    34/238

    28 CHAPTER 1. FIRST ORDER EQUATIONS

    Example Solve

    ex sin y + y3 (3x ex cos y) dydx

    = 0.

    Here M(x, y) = ex sin y + y3, N(x, y) = 3x + ex cos y. Compute

    My = ex cos y + 3y2

    Nx = ex cos y 3 .

    The partials are not the same, the equation is not exact, and our theorydoes not apply.

    Example Solve

    yx + 6x

    dx + (ln x 2) dy = 0 .

    Here M(x, y) = yx + 6x and N(x, y) = ln x 2. Compute

    My =1

    x= Nx,

    and so the equation is exact. To find (x, y), we observe that the equations(5.5) take the form

    x =yx + 6x

    y = ln x 2 .

    Take anti-derivative in x of the first equation

    (x, y) = y ln x + 3x2 + h(y),

    where h(y) is an arbitrary function of y. Plug this into the second equation

    y = ln x + h(y) = ln x 2,

    i.e.,h(y) = 2.

    Integrating, h(y) = 2y, and so (x, y) = y ln x + 3x2 2y, giving us thegeneral solution

    y ln x + 3x2 2y = c .We can solve this equation for y, y(x) = c3x

    2

    lnx2 . Observe that when solvingfor h(y), we choose the integration constant to be zero, because at the nextstep we set (x, y) equal to c, an arbitrary constant.

  • 8/22/2019 Differential Equations Text

    35/238

    1.6. EXISTENCE AND UNIQUENESS OF SOLUTION 29

    Example Find the constant b, for which the equationye2xy + x

    dx + bxe2xy dy = 0

    is exact, and then solve the equation with that b.

    Setting equal the partials My and Nx, we have

    e2xy + 2xye2xy = be2xy + 2bxye2xy.

    We see that b = 1. When b = 1 the equation becomesye2xy + x

    dx + xe2xy dy = 0,

    and we know that it is exact. We look for (x, y) as before:

    x = ye2xy + x

    y = xe2xy .

    Just for practice, let us begin this time with the second equation. Takingan antiderivative in y in the second equation

    (x, y) =1

    2e2xy + h(x) ,

    where h(x) is an arbitrary function ofx. Plugging this into the first equation,

    x = ye2xy + h(x) = ye2xy + x .

    This tells us that h(x) = x, h(x) = 1

    2x2, and then (x, y) = 1

    2e2xy + 1

    2x2.

    Answer:1

    2e2xy +

    1

    2x2 = c, or y = 12x ln(2c x2).

    Exact equations are connected with the conservative vector fields. Recallthat a vector field F(x, y) =< M(x, y), N(x, y) > is called conservative ifthere is a function (x, y), called the potential, such that F(x, y) = (x, y).Recalling that (x, y) =< x, y >, we have x = M, and y = N, thesame relations that we had for exact equations.

    1.6 Existence and Uniqueness of Solution

    Let us consider a general initial value problem

    y = f(x, y)y(x0) = y0 ,

  • 8/22/2019 Differential Equations Text

    36/238

    30 CHAPTER 1. FIRST ORDER EQUATIONS

    with a given function f(x, y), and given numbers x0 and y0. Let us ask two

    basic questions: is there a solution of this problem, and if there is, is thesolution unique?

    Theorem 2 Assume that the functions f(x, y) and fy(x, y) are continuousin some neighborhood of the initial point (x0, y0). Then there exists a so-lution, and there is only one solution. The solution y = y(x) is defined onsome interval (x1, x2) that includes x0.

    One sees that the conditions of this theorem are not too restrictive, sothat the theorem tends to apply, providing us with existence and uniquenessof solution. But not always!

    Example Solve

    y = yy(0) = 0 .

    The function f(x, y) =

    y is continuous (for y 0), but its partial,fy(x, y) =

    12y , is not even defined at the initial point (0, 0). The theorem

    does not apply. One checks that the function y = x2

    4 solves our initialvalue problem. But here is another solution: y = 0. (Having two different

    solutions of the same initial value problem is like having two primadonnasin the same theater.)

    Observe that the theorem guarantees existence of solution only on someinterval (it is not happily ever after).

    Example Solve for y = y(t)

    y = y2

    y(0) = 1 .

    Here f(t, y) = y

    2

    , and fy(t, y) = 2y are continuous functions. The theoremapplies. By separation of variables, we determine the solution y(t) =

    1

    1 t .As time t approaches 1, this solution disappears, by going to infinity. Thisis sometimes called blow up in finite time.

  • 8/22/2019 Differential Equations Text

    37/238

    1.7. NUMERICAL SOLUTION BY EULERS METHOD 31

    1.7 Numerical Solution by Eulers method

    We have learned a number of techniques for solving differential equations,however the sad truth is that most equations cannot be solved. Even asimple looking equation like

    y = x + y3

    is totally out of reach. Fortunately, if you need a specific solution, say theone satisfying the initial condition y(0) = 1, it can be easily approximated(we know that such solution exists, and is unique).

    In general we shall deal with the problem

    y = f(x, y)y(x0) = y0 .

    Here the function f(x, y) is given (in the example above we had f(x, y) =x + y3), and the initial condition prescribes that solution is equal to a givennumber y0 at a given point x0. Fix a step size h, and let x1 = x0 + h,x2 = x0 + 2h , . . . , xn = x0 + nh. We will approximate y(xn), the value ofsolution at xn. We call this approximation yn. To go from the point (xn, yn)to the point (xn+1, yn+1) on the graph of solution y(x), we use the tangentline approximation:

    yn+1 yn + y(xn)(xn+1 xn) = yn + y(xn)h = yn + f(xn, yn)h .

    (We have expressed y(xn) = f(xn, yn) from the differential equation.) Theresulting formula is easy to implement, it is just one loop, starting with(x0, y0).

    One continues the computations until the point xn goes as far as youwant. Decreasing the step size h, will improve the accuracy. Smaller hswill require more steps, but with the power of modern computers that isnot a problem, particularly for simple examples, as the one above. In thatexample x0 = 0, y0 = 1. If we choose h = 0.05, then x1 = 0.05, and

    y1 = y0 + f(x0, y0)h = 1 + (0 + 13) 0.05 = 1.05.

    Continuing, we have x2 = 0.1, and

    y2 = y1 + f(x1, y1)h = 1.05 + (0.05 + 1.053) 0.05 1.11 .

  • 8/22/2019 Differential Equations Text

    38/238

    32 CHAPTER 1. FIRST ORDER EQUATIONS

    Then x3 = 0.15, and

    y3 = y2 + f(x2, y2)h = 1.11 + (0.1 + 1.113) 0.05 1.18 .

    If you need to approximate the solution on the interval (0, 0.4), you willneed to make 5 more steps. Of course, it is better to program a computer.

    Euler method is using tangent line approximation, i.e., the first two termsof the Taylor series approximation. One can use more terms of the Taylorseries, and develop more sophisticated methods (which is done in books onnumerical methods). But here is a question: if it is so easy to compute nu-merical approximation to solution, why bother learning analytical solutions?The reason is that we seek not just to solve a differential equation, but to

    understand it. What happens if the initial condition changes? The equationmay include some parameters, what happens if they change? What happensto solutions in the long term?

    1.7.1 Problems

    I. Determine if the equation is homogeneous, and if it is, solve it:

    1.dy

    dx=

    y + 2x

    x. Ans. y = cx + 2x ln x.

    2.dy

    dx

    =x2 xy + y2

    x2

    . Ans. y =x + cx + x ln x

    c + ln x

    .

    3.dy

    dx=

    y2 + 2x

    y.

    4.dy

    dx=

    y2 + 2xy

    x2, y(1) = 2. Ans. y =

    2x2

    3 2x .

    5. xy y = x tan yx

    . Ans. siny

    x= cx.

    6. y =x2 + y2

    xy, y(1) = 2. Ans. y =

    x2 ln x2 + 4x2.

    7. y =y + x1/2y3/2

    xy, with x > 0, y > 0. Ans. 2y

    x= ln x + c.

    II. Solve the following Bernoullis equations

    1. y 1x

    y = y2, y(2) = 2. Ans. y = 2xx2 2 .

  • 8/22/2019 Differential Equations Text

    39/238

    1.7. NUMERICAL SOLUTION BY EULERS METHOD 33

    2.dy

    dx

    =y2 + 2x

    y

    . Ans. y =

    1

    2x + ce2x.

    3. y + x 3

    y = 3y. Ans. y =

    x

    3+

    1

    6+ ce2x

    32

    , and y = 0.

    Hint: When dividing the equation by 3

    y, one needs to check if y = 0 is asolution, which indeed it is.

    4. y + xy = y3.

    III. Determine if the equation is exact, and if it is, solve it:

    1. (2x + 3x2y) dx + (x3 3y2) dy = 0. Ans. x2 + x3y y3 = c.

    2. (x +sin y) dx + (x cos y 2y) dy = 0. Ans.1

    2 x2

    + x sin y y2

    = c.

    3.x

    (x2 + y2)3/2dx +

    y

    (x2 + y2)3/2dy = 0. Ans. x2 + y2 = c2.

    4.x

    (x2 + y2)3/2dx +

    y

    (x2 + y2)3/2dy = 0, y(1) = 3. What is the x

    interval, on which the solution is valid? Sketch the graph of the solution.

    5. (6xy cos y) dx + (3x2 + x sin y + 1) dy = 0.6. (2x y) dx + (2y x) dy = 0, y(1) = 2. Ans. x2 + y2 xy = 3.7. Find the value ofb for which the following equation is exact, and then

    solve the equation, using that value of b

    (yexy + 2x) dx + bxexy dy = 0 .

    Ans. b = 1, y =1

    xln(c x2).

    IV 1. Use parametric integration to solve

    y3 + y = x .

    Ans. x = t3 + t, y =3

    4t4 +

    1

    2t2 + c.

    2. Use parametric integration to solve

    y = ln(1 + y2) .

    Ans. x = 2 tan1 t + c, y = ln(1 + t2). Another solution: y = 0.

  • 8/22/2019 Differential Equations Text

    40/238

    34 CHAPTER 1. FIRST ORDER EQUATIONS

    3. Use parametric integration to solve

    y + sin(y) = x .

    Ans. x = t + sin t, y =1

    2t2 + t sin t + cos t + c.

    4. A tank has 100L of water-salt mixture, which initially contains 10 kg ofsalt. Water is flowing in at a rate of 5L per minute. The new mixture flowsout at the same rate. How much salt remains in the tank after an hour?

    Ans. 0.5 kg.

    5. A tank has 100L of water-salt mixture, which initially contains 10 kg ofsalt. A water-salt mixture is flowing in at a rate of 3L per minute, and each

    liter of it contains 0.1 kg of salt. The new mixture flows out at the samerate. How much salt remains in the tank after t minutes?

    Ans. 10 kg.

    6. Water is being pumped into patients stomach at a rate of 0.5 L perminute to flush out 300 grams of alcohol poisoning. The excess fluid isflowing out at the same rate. The stomach holds 3 L. The patient can bedischarged when the amount of poison drops to 50 grams. How long shouldthis procedure last?

    7. Find all curves y = f(x) with the following property: if you draw atangent line at any point (x, f(x)) on this curve, and continue the tangent

    line until it intersects the x -axis, then the point of intersection isx

    2 .Ans. y = cx2.

    8. Find all positive decreasing functions y = f(x), with the following prop-erty: in the triangle formed by the vertical line going down from the curve,the x-axis and the tangent line to this curve, the sum of two sides adjacentto the right angle is constant, equal to a > 0.

    Ans. y a ln y = x + c.9. (i) Apply Eulers method to

    y = x(1 + y), y(0) = 1 .

    Take h = 0.25 and do four steps, obtaining an approximation for y(1).

    (ii) Apply Eulers method to

    y = x(1 + y), y(0) = 1 .

  • 8/22/2019 Differential Equations Text

    41/238

    1.7. NUMERICAL SOLUTION BY EULERS METHOD 35

    Take h = 0.2 and do five steps, obtaining another approximation for y(1).

    (iii) Solve the above problem analytically, and determine which one of thetwo approximations is better.

    10. (From the Putnam competition, 2009) Show that any solution of

    y =x2 y2

    x2(y2 + 1)

    satisfies limx y(x) = .

    Hint: Using partial fractions, rewrite the equation as

    y =1 + 1/x2

    y2 + 1 1

    x2 .

    Assume, on the contrary, that y(x) is bounded when x is large. Then y(x)exceeds a positive constant for all large x, and therefore y(x) tends to infinity,a contradiction (observe that 1x2 becomes negligible for large x).

    11. Solve

    x(y ey) + 2 = 0 .

    Hint: Divide the equation by ey, then set v = ey , obtaining a linear equa-tion for v = v(x). Ans. y =

    ln(x + cx2).

    12. Solve the integral equation

    y(x) =

    x1

    y(t) dt + x + 1 .

    Hint: Differentiate the equation, and also evaluate y(1).

    Ans. y = 3ex1 1.

    V 1. Find two solutions of the initial value problem

    y = (y 1)1/3, y(1) = 1 .Is it good to have two solutions of the same initial value problem? Whatwent wrong? (I.e., why the existence and uniqueness theorem does notapply?)

  • 8/22/2019 Differential Equations Text

    42/238

    36 CHAPTER 1. FIRST ORDER EQUATIONS

    2. Find all y0, for which the following problem has a unique solution

    y = xy22xy(2) = y0 .

    Hint: Apply the existence and uniqueness theorem.

    Ans. All y0 except 2.

  • 8/22/2019 Differential Equations Text

    43/238

    Chapter 2

    Second Order Equations

    2.1 Special Second Order Equations

    Probably the simplest second order equation is

    y(x) = 0.

    Taking antiderivative

    y(x) = c1 .

    We have denoted the arbitrary constant c1, because we expect another

    arbitrary constant to make an appearance. Indeed, taking another anti-derivative, we get the general solution

    y(x) = c1x + c2 .

    We see that general solutions for second order equations depend on twoarbitrary constants.

    General second order equation for the unknown function y = y(x) canoften be written as

    y = f(x,y ,y),

    where f is a given function of its three variables. We cannot expect all suchequation to be solvable, as we could not even solve all first order equations.In this section we study special second order equations, which are reducibleto first order equations, greatly increasing their chances to be solved.

    37

  • 8/22/2019 Differential Equations Text

    44/238

    38 CHAPTER 2. SECOND ORDER EQUATIONS

    2.1.1 y is not present in the equation

    Let us solve for y(t) the equation

    ty y = t2 .

    We see derivatives ofy in this equation, but not y itself. We denote y(t) =v(t), and v(t) is our new unknown function. Clearly, y(t) = v(t), and theequation becomes

    tv v = t2 .This is a first order equation for v(t)! It is actually a linear first orderequation, so that we solve it as before. Once we have v(t), we determine thesolution y(t) by integration. Details:

    v 1t

    v = t ;

    (t) = e

    1tdt = e ln t = eln

    1t =

    1

    t;

    d

    dt

    1

    tv

    = 1;

    1

    tv = t + c1 ;

    y = v = t2 + c1t ;

    y(t) = t3

    3+ c1 t

    2

    2+ c2 .

    Let us solve the following equation for y(x):

    y + 2xy2 = 0 .

    Again, y is missing in the equation. By setting y = v, with y = v, weobtain a first order equation. This time the equation for v(x) is not linear,but we can separate the variables. Here are the details:

    v

    + 2xv2 = 0 ;dv

    dx=

    2xv2 .

    This equation has a solution v = 0, giving y = c. Assuming v = 0, wecontinue

    dv

    v2dv =

    2x dx ;

  • 8/22/2019 Differential Equations Text

    45/238

    2.1. SPECIAL SECOND ORDER EQUATIONS 39

    1v

    = x2 c1 ;

    y = v =1

    x2 + c1;

    Let us now assume that c1 > 0. Then

    y(x) =

    1

    x2 + c1dx =

    1c1

    arctanxc1

    + c2.

    If c1 = 0 or c1 < 0, we get two different formulas for solution! Indeed, incase c1 = 0, we have y = 1x2 , and the integration gives us, y = 1x + c3, thesecond family of solutions. In case c1 < 0, we can write

    y =1

    x2 c21 =1

    2c1 1

    x c1 1

    x + c1

    ;

    Integrating, we get the third family of solutions,

    y =1

    2c1ln |x c1| 1

    2c1ln |x + c1| + c4 .

    And, the fourth family of solutions is y = c.

    2.1.2 x is not present in the equation

    Let us solve for y(x)

    y + yy 3

    = 0 .All three functions appearing in the equation are functions of x, but x itselfis not present in the equation.

    On the curve y = y(x) the slope y is a function of x, but it is also afunction ofy. We therefore set y = v(y), and v(y) will be our new unknownfunction. By the Chain Rule

    y(x) =d

    dxv(y) = v(y)

    dy

    dx= vv.

    and our equation takes the form

    vv + yv3 = 0 .

    This a first order equation! To solve it, we begin by factoring

    v

    v + yv2

    = 0.

  • 8/22/2019 Differential Equations Text

    46/238

    40 CHAPTER 2. SECOND ORDER EQUATIONS

    If the first factor is zero, y = v = 0, we obtain a family of solutions y = c.

    Setting the second factor to zerodv

    dy+ yv2 = 0 ,

    we have a separable equation. Separating the variables

    dv

    v2=

    y dy ;

    1

    v= y2/2 + c1 =

    y2 + 2c12

    ;

    dy

    dx = v =

    2

    y2 + 2c1 .

    To find y(x) we need to solve another first order equation. Again, we sepa-rate the variables

    y2 + 2c1

    dy =

    2 dx ;

    y3/3 + 2c1y = 2x + c2 .

    This gives us the second family of solutions.

    2.2 Linear Homogeneous Equations with Constant

    CoefficientsWe wish to find solution y = y(t) of the equation

    ay + by + cy = 0 ,

    where a, b and c are given numbers. This is arguably the most importantclass of differential equations, because it arises when applying Newtons sec-ond law of motion. If y(t) denotes displacement of an object at time t, thenthis equation relates the displacement with velocity y(t) and accelerationy(t). This is equation is linear, because we only multiply y and its deriva-tives by constants, and add. The word homogeneous refers to the right hand

    side of this equation being zero.Observe, ify(t) is a solution, so is 2y(t). Indeed, plug this function into

    the equation:

    a(2y) + b(2y) + c(2y) = 2ay + by + cy

    = 0 .

  • 8/22/2019 Differential Equations Text

    47/238

    2.2. LINEAR HOMOGENEOUS EQUATIONS WITH CONSTANT COEFFICIENTS41

    The same argument shows that c1y(t) is a solution for any constant c1. If

    y1(t) and y2(t) are two solutions, similar argument will show that y1(t)+y2(t)and y1(t) y2(t) are also solutions. More generally, c1y1(t) + c2y2(t) is asolution for any c1 and c2. (This is called a linear combination of twosolutions.) Indeed,

    a (c1y1(t) + c2y2(t)) + b (c1y1(t) + c2y2(t)) + c (c1y1(t) + c2y2(t)) =

    c1 (ay1 + by1 + cy1) + c2 (ay2 + by2 + cy2) = 0 .

    We now try to find a solution of the form y = ert, where r is a constantto be determined. We have y = rert and y = r2ert, so that plugging intothe equation gives

    a(r2

    ert

    ) + b(rert

    ) + cert

    = ert

    ar2

    + br + c

    = 0 .

    Dividing by a positive quantity ert, we get

    ar2 + br + c = 0 .

    This is a quadratic equation for r, called the characteristic equation. If r isa root (solution) of this equation, then ert solves our differential equation.When solving a quadratic equation, it is possible to encounter two real roots,one (repeated) real root, or two complex conjugate roots. We will look atthese cases in turn.

    2.2.1 Characteristic equation has two distinct real roots

    Call the roots r1 and r2, and r2 = r1. Then er1t and er2t are two solutions,and their linear combination gives us the general solution

    y(t) = c1er1t + c2e

    r2t .

    As we have two constants to play with, one can prescribe two additionalconditions for the solution to satisfy.

    Example Solve

    y + 4y + 3y = 0

    y(0) = 2y(0) = 1 .

    We prescribe that at time zero the displacement is 2, and the velocity is1. These two conditions are usually referred to as initial conditions, and

  • 8/22/2019 Differential Equations Text

    48/238

    42 CHAPTER 2. SECOND ORDER EQUATIONS

    together with the differential equation, they form an initial value problem.

    The characteristic equation is

    r2 + 4r + 3 = 0 .

    Solving it (say by factoring as (r + 1)(r + 3) = 0), we get its roots r1 = 1and r2 = 3. The general solution is then

    y(t) = c1et + c2e3t .

    Then y(0) = c1 + c2. Compute y(t) = c1et 3c2e3t, and therefore

    y(0) = c1 3c2. Initial conditions tell us that

    c1 + c2 = 2

    c1 3c2 = 1 .

    We have two equations to find two unknowns c1 and c2. We find thatc1 = 5/2 and c2 = 1/2 (say by adding the equations). Answer: y(t) =5

    2et 1

    2e3t.

    Example Solvey 4y = 0 .

    The characteristic equation is

    r2

    4 = 0 .

    Its roots are r1 = 2 and r2 = 2. The general solution is then

    y(t) = c1e2t + c2e2t .

    More generally, for the equation

    y a2y = 0 ( a is a given constant)

    the general solution isy(t) = c1e

    at + c2eat .

    This should become automatic, because such equations appear often.

    Example Find the constant a, so that the solution of the initial problem

    9y y = 0, y(0) = 2, y(0) = a .

  • 8/22/2019 Differential Equations Text

    49/238

    2.2. LINEAR HOMOGENEOUS EQUATIONS WITH CONSTANT COEFFICIENTS43

    is bounded as t , and find that solution.We begin by writing down (automatically!) the general solution

    y(t) = c1e1

    3t + c2e

    13t .

    Compute y(t) = 13

    c1e1

    3t +

    1

    3c2e

    13t, and then the initial conditions give

    y(0) = c1 + c2 = 2

    y(0) = 13c1 + 13c2 = a .Solving the system of two equation for c1 and c2 (by multiplying the secondequation through by 3 and adding it to the first equation), we get c2 = 1+

    32a

    and c1 = 1 3

    2a. Solution of the initial value problem is then

    y(t) =

    1 3

    2a

    e

    13t +

    1 +

    3

    2a

    e13t .

    In order for this solution to stay bounded as t , the coefficient in frontof e

    13t must be zero. I.e., 1 + 32a = 0, and a = 23 . The solution then

    becomes y(t) = 2e13t.

    Finally, observe that ifr1 and r2 are roots of the characteristic equation,then we can factor the characteristic polynomial as

    ar2 + br + c = a(r r1)(r r2) .(2.1)

    2.2.2 Characteristic equation has only one (repeated) realroot

    This is the case we get r2 = r1, when solving the characteristic equation.We still have a solution y1(t) = e

    r1t. Of course, any constant multiple of thissolution is also a solution, but to form a general solution we need anothertruly different solution, as we saw in the preceding case. It turns out thaty2(t) = te

    r1t is that second solution, and the general solution is then

    y(t) = c1er1t + c2te

    r1t .

    To justify that y2(t) = ter1t is a solution, we observe that in this case

    formula (2.1) becomes

    ar2 + br + c = a(r r1)2 .

  • 8/22/2019 Differential Equations Text

    50/238

    44 CHAPTER 2. SECOND ORDER EQUATIONS

    Square out the quadratic on the right as ar2 2ar1r + ar21. Because it isequal to the quadratic on the left, the coefficients of both polynomials in r

    2

    ,r, and the constant terms are the same. We equate the coefficients in r:

    b = 2ar1 .(2.2)To plug y2(t) into the equation, we compute its derivatives y

    2(t) = e

    r1t +r1te

    r1t = er1t (1 + r1t), and similarly y2 (t) = e

    r1t

    2r1 + r21t

    . Then

    ay2 + by2 + cy2 = aer1t

    2r1 + r21t

    + ber1t (1 + r1t) + cter1t =

    er1t (2ar1 + b) + ter1t

    ar21 + br1 + c

    = 0 .

    In the last line the first bracket is zero because of (2.2), and the secondbracket is zero because r1 is a solution of the characteristic equation.

    Example 9y + 6y + y = 0.The characteristic equation

    9r2 + 6r + 1 = 0

    has a double root r = 13 . The general solution is then

    y(t) = c1e1

    3t + c2te

    13t .

    Example Solve

    y 4y + 4y = 0y(0) = 1, y(0) = 2 .

    The characteristic equation

    r2 4r + 4 = 0has a double root r = 2. The general solution is then

    y(t) = c1e2t + c2te

    2t .

    Here y(t) = 2c1e2t + c2e2t + 2c2te2t, and from the initial conditions

    y(0) = c1 = 1

    y(0) = 2c1 + c2 = 2 .From the first equation c1 = 1, and then c2 = 4. Answer: y(t) = e2t4te2t.

  • 8/22/2019 Differential Equations Text

    51/238

    2.3. CHARACTERISTIC EQUATION HAS TWO COMPLEX CONJUGATE ROOTS45

    2.3 Characteristic equation has two complex con-

    jugate roots2.3.1 Eulers formula

    Recall the Maclaurens formula

    ez = 1 + z +1

    2!z2 +

    1

    3!z3 +

    1

    4!z4 +

    1

    5!z5 + . . . .

    Plug in z = i , where i =1 the imaginary unit, and is a real number.

    Calculating the powers, and separating the real and imaginary parts, wehave

    ei = 1 + i + 12!(i )2 + 13!(i )3 + 14!(i )4 + 15!(i )5 + . . .

    = 1 + i 12!2 13! i 3 + 14!4 + 15! i 5 + . . .=

    1 12!2 + 14!4 + . . .

    + i

    13!3 + 15!5 + . . .

    = cos + i sin .

    We have derived Eulers formula:

    ei = cos + i sin .(3.1)

    Replacing by , we have

    ei = cos() + i sin() = cos i sin .(3.2)

    Adding the last two formulas, we express

    cos =ei + ei

    2.(3.3)

    Subtracting from (3.1) the formula (3.2), and dividing by 2i

    sin =ei ei

    2i.(3.4)

    2.3.2 The General Solution

    Recall that to solve the equation

    ay + by + cy = 0

  • 8/22/2019 Differential Equations Text

    52/238

    46 CHAPTER 2. SECOND ORDER EQUATIONS

    we begin with solving the characteristic equation

    ar2 + br + c = 0 .

    Complex roots come in conjugate pairs: if p + iq is one root, then p iq isthe other. These roots are of course different, so that we have two solutionsz1 = e

    (p+iq)t and z2 = e(piq)t. The problem with these solutions is that

    they are complex-valued. If we add z1 + z2, we get another solution. If wedivide this new solution by 2, we get yet another solution. I.e., the function

    y1(t) =z1 + z2

    2is a solution of our equation, and similarly the function

    y2(t) =z1 z2

    2iis another solution. Using the formula (3.3), compute

    y1(t) = e(p+iq)t + e(piq)t

    2= ept eiqt + eiqt

    2= ept cos qt .

    This is a real valued solution of our equation! Similarly,

    y2(t) =e(p+iq)t e(piq)t

    2i= ept

    eiqt eiqt2i

    = ept sin qt

    is our second solution. The general solution is then

    y(t) = c1ept cos qt + c2e

    pt sin qt .

    Example Solve y + 4y + 5y = 0.

    The characteristic equation

    r2 + 4r + 5 = 0

    can be solved quickly by completing the square:

    (r + 2)2 + 1 = 0; (r + 2)2 = 1;

    r + 2 = i; r = 2 i .Here p =

    2, q = 1, and the general solution is y(t) = c1e

    2t cos t +

    c2e2t sin t.Example Solve y + y = 0.

    The characteristic equationr2 + 1 = 0

  • 8/22/2019 Differential Equations Text

    53/238

    2.3. CHARACTERISTIC EQUATION HAS TWO COMPLEX CONJUGATE ROOTS47

    has roots i. Here p = 0 and q = 1, and the general solution is y(t) =c1 cos t + c2 sin t. More generally, for the equation

    y + a2y = 0 ( a is a given constant)

    the general solution is

    y(t) = c1 cos at + c2 sin at .

    This should become automatic, because such equations appear often.

    Example Solve

    y + 4y = 0, y(/3) = 2, y(/3) =

    4 .

    The general solution is

    y(t) = c1 cos2t + c2 sin2t .

    Compute y(t) = 2c1 sin2t + 2c2 cos2t. From the initial conditions

    y(/3) = c1 cos2

    3+ c2 sin

    2

    3= 1

    2c1 +

    3

    2c2 = 2

    y(/3) = 2c1 sin 23

    + 2c2 cos2

    3=

    3c1 c2 = 4 .

    This gives c1 = 3 1, c2 = 3 + 1. Answer:y(t) = (

    3 1)cos2t + (

    3 + 1) sin 2t .

    2.3.3 Problems

    I. Solve the second order equations, with y missing:

    1. 2y y = 1. Ans. y =

    2

    3

    (x + c1)3/2 + c2.

    2. xy + y = x. Ans. y =x2

    4+ c1 ln x + c2.

    3. y + y = x2. Ans. y =x3

    3 x2 + 2x + c1ex + c2.

  • 8/22/2019 Differential Equations Text

    54/238

    48 CHAPTER 2. SECOND ORDER EQUATIONS

    4. xy+ 2y = (y)2, y(1) = 0, y(1) = 1. Ans. y = 2 tan1 x 2

    .

    II. Solve the second order equations, with x missing:

    1. yy 3 (y)3 = 0. Ans. 3 (y ln y y) + c1y = x + c2, and y = c.2. yy + (y)2 = 0. Ans. y2 = c1 + c2x (this includes the y = c family).

    3. y = 2yy , y(0) = 0, y(0) = 1. Ans. y = tan x.

    4. yy = 2xy2, y(0) = 1, y(0) = 4.Hint: Write:

    yy

    y2 = (2x

    1)y2;yy y2

    y2= 2x

    1;

    y

    y

    = 2x

    1 .

    Integrating, and using the initial conditions

    yy

    = x2 x + 14

    =(2x 1)2

    4.

    Ans. y = e4x

    2x1 .

    III. Solve the linear second order equations, with constant coefficients

    1. y + 4y + 3y = 0. Ans. y = c1et + c2e3t.

    2. y 3y = 0. Ans. y = c1 + c2e3t.3. 2y + y y = 0. Ans. y = c1et + c2e

    12t.

    4. y 3y = 0. Ans. y = c1e3t + c2e

    3t.

    5. 3y 5y 2y = 0.6. y 9y = 0, y(0) = 3, y(0) = 3. Ans. y = e3t + 2e3t.7. y + 5y = 0, y(0) = 1, y(0) = 10. Ans. y = 3 + 2e5t.

    8. y + y 6y = 0, y(0) = 2, y(0) = 3. Ans. y = 75

    e3t 3e2t

    5.

    9. 4y y = 0.10. 3y 2y y = 0, y(0) = 1, y(0) = 3. Ans. y = 3et/3 2et.

  • 8/22/2019 Differential Equations Text

    55/238

    2.3. CHARACTERISTIC EQUATION HAS TWO COMPLEX CONJUGATE ROOTS49

    11. 3y 2y y = 0, y(0) = 1, y(0) = a. Then find the value of a forwhich the solution is bounded, as t . Ans. a =

    1

    3 .

    IV. Solve the linear second order equations, with constant coefficients

    1. y + 6y + 9y = 0. Ans. y = c1e3t + c2te3t.

    2. 4y 4y + y = 0. Ans. y = c1e 12 t + c2te 12 t.3. y 2y + y = 0, y(0) = 0, y(0) = 2. Ans. y = 2tet.4. 9y 6y + y = 0, y(0) = 1, y(0) = 2.

    V. Using Eulers formula, compute: 1. ei 2. ei/2 3. ei3

    4

    4. e2i 5.

    2ei94

    5. Show that sin3 = 3 cos2 sin sin3 , and alsocos3 = 3sin2 cos + cos3 .Hint: Begin with ei3 = (cos + i sin )3. Apply Eulers formula on the left,and cube out on the right. Then equate the real and imaginary parts.

    VI. Solve the linear second order equations, with constant coefficients

    1. y + 4y + 8y = 0. Ans. y = c1e2t cos2t + c2e2t sin2t.

    2. y + 16y = 0. Ans. y = c1 cos4t + c2 sin4t.

    3. y 4y + 5y = 0, y(0) = 1, y(0) = 2. Ans. y = e2t cos t 4e2t sin t.

    4. y + 4y = 0, y(0) = 2, y(0) = 0. Ans. y = 2cos2t.

    5. 9y + y = 0, y(0) = 0, y(0) = 5. Ans. y = 15 sin1

    3t.

    6. y y + y = 0. Ans. y = e t2

    c1 cos

    3

    2t + c2 sin

    3

    2t

    .

    7. 4y + 8y + 5y = 0, y() = 0, y() = 4. Ans. y = 8et cos 12

    t.

    8. y + y = 0, y(/4) = 0, y(/4) = 1. Ans. y = sin(t /4).

  • 8/22/2019 Differential Equations Text

    56/238

    50 CHAPTER 2. SECOND ORDER EQUATIONS

    2.4 Linear Second Order Equations with Variable

    CoefficientsLinear Systems

    Recall that a system of two equations (here the numbers a, b, c, d, g and hare given, while x and y are unknowns)

    a x + b y = g

    c x + d y = h

    has a unique solution if and only if the determinant of the system is non-

    zero, i.e., a bc d

    = ad bc = 0. This is justified by explicitly solving thesystem:

    x =dg bhad bc , y =

    ah cgad bc .

    It is also easy to justify that a determinant is zero, i.e.,

    a bc d = 0, if

    and only if its columns are proportional, i.e., a = b and c = d, for someconstant .

    General Theory

    We consider an initial value problem for linear second order equations

    y +p(t)y + g(t)y = f(t)(4.1)y(t0) =

    y(t0) = .

    We are given the coefficient functions p(t) and g(t), and the function f(t).The constants t0, and are also given, i.e., at some initial time t = t0the values of the solution and its derivative are prescribed. Is there a solutionto this problem? If so, is solution unique, and how far can it be continued?

    Theorem 3 Assume that the coefficient functions p(t), g(t) and f(t) arecontinuous on some interval that includes t0. Then the problem (4.1) has asolution, and only one solution. This solution can be continued to the leftand to the right of the initial point t0, so long as the coefficient functionsremain continuous.

  • 8/22/2019 Differential Equations Text

    57/238

    2.4. LINEAR SECOND ORDER EQUATIONS WITH VARIABLE COEFFICIENTS51

    If the coefficient functions are continuous for all t, then the solution can

    be continued for all t, < t < . This is better than what we had forfirst order equations. Why? Because the equation here is linear. Linearitypays!

    Corollary Letz(t) be a solution of (4.1) with the same initial data: z(t0) = and z(t0) = . Then z(t) = y(t) for all t.

    Let us now study the homogeneous equations (for y = y(t))

    y + p(t)y + g(t)y = 0 ,(4.2)

    with the given coefficient functions p(t) and g(t). Although the equationlooks relatively simple, its analytical solution is totally out of reach, in gen-

    eral. (One has to either solve it numerically, or use infinite series.) In thissection we shall study some theoretical aspects. In particular, we shall provethat linear combination of two solutions, that are not constant multiple ofone another, gives a general solution (a fact that we had intuitively used forequations with constant coefficients).

    We shall need a concept of the Wronskian determinantof two functionsy1(t) and y2(t), or Wronskian, for short:

    W(t) =

    y1(t) y2(t)y1(t) y2(t)

    = y1(t)y2(t) y1(t)y2(t) .

    Sometimes the Wronskian is written as W(y1, y2)(t) to stress its dependenceon y1(t) and y2(t). For example,

    W(cos2t, sin2t)(t) =

    cos2t sin2t2sin2t 2cos2t = 2 cos2 2t + 2 sin2 2t = 2 .

    Given the Wronskian and one of the functions, one can determine theother one.

    Example If f(t) = t, and W(f, g)(t) = t2et, find g(t).

    Solution: Here f(t) = 1, and so

    W(f, g)(t) = t g(t)1 g(t) = tg(t) g(t) = t2et .

    This is a linear first order equation for g(t). We solve it as usual, obtaining

    g(t) = tet + ct .

  • 8/22/2019 Differential Equations Text

    58/238

    52 CHAPTER 2. SECOND ORDER EQUATIONS

    Ifg(t) = cf(t), with some constant c, then we compute that W(f, g)(t) =

    0 for all t. The converse statement is not true. For example, the functionsf(t) = t2 and

    g(t) =

    t2 if t 0t2 if t < 0

    are not constant multiples of one another, but W(f, g)(t) = 0. This is seenby computing the Wronskian separately in case t 0, and for t < 0.Theorem 4 Lety1(t) and y2(t) be two solutions of (4.2), and W(t) is theirWronskian. Then

    W(t) = ce

    p(t)dt.(4.3)

    where c is some constant.

    This is a remarkable fact. Even though we do not know y1(t) and y2(t),we can compute their Wronskian.

    Proof: We differentiate the Wronskian W(t) = y1(t)y2(t) y1(t)y2(t):

    W = y1y2 + y1y

    2 y1y2 y1y2 = y1y2 y1y2 .

    Because y1 is a solution of (4.2), we have y1 + p(t)y

    1 + g(t)y1 = 0, or

    y1 = p(t)y1 g(t)y1, and similarly y2 = p(t)y2 g(t)y2. With theseformulas, we continue

    W = y1 (p(t)y2 g(t)y2) (p(t)y1 g(t)y1) y2= p(t) (y1y2 y1y2) = p(t)W .

    We have obtained a linear first order equation for W(t). Solving it byseparation of variables, we get (4.3). Corollary We see from (4.3) that either W(t) = 0 for all t, when c = 0, orelse W(t) is never zero, in case c = 0.

    Theorem 5 Lety1(t) and y2(t) be two solutions of (4.2), and W(t) is theirWronskian. Then W(t) = 0, if and only if y1(t) and y2(t) are constantmultiples of each other.

    We just saw that if two functions are constant multiples of each otherthen their Wronskian is zero, while the converse (opposite) statement is nottrue in general. But if these functions happen to be solutions of (4.2), thenthe converse is true.

  • 8/22/2019 Differential Equations Text

    59/238

    2.4. LINEAR SECOND ORDER EQUATIONS WITH VARIABLE COEFFICIENTS53

    Proof: Assume that the Wronskian of two solutions y1(t) and y2(t) is zero.

    In particular it is zero at any point t0, i.e., y1(t0) y2(t0)y1(t0) y2(t0)

    = 0. When a2 2 determinant is zero, its columns are proportional. Let us assume thesecond column is times the first, where is some number, i.e., y2(t0) =y1(t0) and y2(t0) = y1(t0). Assume, first, that = 0. Consider thefunction z(t) = y2(t)/. It is a solution of the homogeneous equation (4.2),and it has initial values z(t0) = y1(t0) and z(t0) = y1(t0) the same as y1(t).It follows that z(t) = y1(t), i.e., y2(t) = y1(t). In case = 0, a similarargument shows that y2(t) = 0, i.e., y2(t) = 0 y1(t). Definition We say that two solutions y1(t) and y2(t) of (4.2) form a funda-mental set, if for any other solution z(t), we can find two constants c01 and

    c02, so that z(t) = c01y1(t) + c02y2(t). In other words, the linear combinationc1y1(t) + c2y2(t) gives us all solutions of (4.2).

    Theorem 6 Lety1(t) and y2(t) be two solutions of (4.2), that are not con-stant multiples of one another. Then they form a fundamental set.

    Proof: Let y(t) be a solution of the equation (4.2). Let us try to find theconstants c1 and c2, so that z(t) = c1y1(t) + c2y2(t) satisfies the same initialconditions as y(t), i.e.,

    z(t0) = c1y1(t0) + c2y2(t0) = y(t0)(4.4)

    z(t0) = c1y1(t0) + c2y2(t0) = y(t0) .

    This is a system of two linear equations to find c1 and c2. The determinantof this system is just the Wronskian of y1(t) and y2(t), evaluated at t0. Thisdeterminant is not zero, because y1(t) and y2(t) are not constant multiplesof one another. (This determinant is W(t0). If W(t0) = 0, then W(t) = 0for all t, by the Corollary to Theorem 4, and then by Theorem 5, y1(t)and y2(t) would have to be constant multiples of one another.) It followsthat the 2 2 system (4.4) has a unique solution c1 = c01, c2 = c02. Thefunction z(t) = c01y1(t) + c

    02y2(t) is then a solution of the same equation

    (4.2), satisfying the same initial conditions, as does y(t). By Corollary toTheorem 3, y(t) = z(t) for all t. So that any solution y(t) is a particularcase of the general solution c1y1(t) + c2y2(t).