About Global Documents
Global Documents provides you with documents from around the globe on a variety of topics for your enjoyment.
Global Documents utilizes edocr for all its document needs due to edocr's wonderful content features. Thousands of professionals and businesses around the globe publish marketing, sales, operations, customer service and financial documents making it easier for prospects and customers to find content.
by Steven Holzner, PhD
Differential
Equations
FOR
DUMmIES
‰
Differential
Equations
FOR
DUMmIES
‰
by Steven Holzner, PhD
Differential
Equations
FOR
DUMmIES
‰
Differential Equations For Dummies®
Published by
Wiley Publishing, Inc.
111 River St.
Hoboken, NJ 070305774
www.wiley.com
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form
or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as per
mitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate percopy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, 9787508400, fax 9786468600.
Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,
Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, 3175723447, fax 3175724355, or online at
http://www.wiley.com/go/permissions.
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the
Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com and related trade
dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United
States and other countries, and may not be used without written permission. All other trademarks are the
property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor
mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REP
RESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CON
TENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT
LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CRE
ATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CON
TAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A
COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION
OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FUR
THER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFOR
MATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE.
FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE
CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care
Department within the U.S. at 8007622974, outside the U.S. at 3175723993, or fax 3175724002.
For technical support, please visit www.wiley.com/techsupport.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic books.
Library of Congress Control Number: 2008925781
ISBN: 9780470178140
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
About the Author
Steven Holzner is an awardwinning author of science, math, and technical
books. He got his training in differential equations at MIT and at Cornell
University, where he got his PhD. He has been on the faculty at both MIT and
Cornell University, and has written such bestsellers as Physics For Dummies
and Physics Workbook For Dummies.
Dedication
To Nancy, always and forever.
Author’s Acknowledgments
The book you hold in your hands is the work of many people. I’d especially
like to thank Tracy Boggier, Georgette Beatty, Jessica Smith, technical
reviewer Jamie Song, PhD, and the folks in Composition Services who put the
book together so beautifully.
Publisher’s Acknowledgments
We’re proud of this book; please send us your comments through our Dummies online registration
form located at www.dummies.com/register/.
Some of the people who helped bring this book to market include the following:
Acquisitions, Editorial, and
Media Development
Project Editor: Georgette Beatty
Acquisitions Editor: Tracy Boggier
Copy Editor: Jessica Smith
Editorial Program Coordinator:
Erin Calligan Mooney
Technical Editor: Jamie Song, PhD
Editorial Manager: Michelle Hacker
Editorial Assistants: Joe Niesen, Leeann Harney
Cartoons: Rich Tennant
(www.the5thwave.com)
Composition Services
Project Coordinator: Erin Smith
Layout and Graphics: Carrie A. Cesavice,
Stephanie D. Jumper
Proofreaders: Caitie Kelly, Linda D. Morris
Indexer: Broccoli Information Management
Publishing and Editorial for Consumer Dummies
Diane Graves Steele, Vice President and Publisher, Consumer Dummies
Joyce Pepple, Acquisitions Director, Consumer Dummies
Kristin A. Cocks, Product Development Director, Consumer Dummies
Michael Spring, Vice President and Publisher, Travel
Kelly Regan, Editorial Director, Travel
Publishing for Technology Dummies
Andy Cummings, Vice President and Publisher, Dummies Technology/General User
Composition Services
Gerry Fahey, Vice President of Production Services
Debbie Stailey, Director of Composition Services
Contents at a Glance
Introduction .................................................................1
Part I: Focusing on First Order Differential Equations......5
Chapter 1: Welcome to the World of Differential Equations .........................................7
Chapter 2: Looking at Linear First Order Differential Equations................................23
Chapter 3: Sorting Out Separable First Order Differential Equations........................41
Chapter 4: Exploring Exact First Order Differential Equations
and Euler’s Method........................................................................................................63
Part II: Surveying Second and Higher Order
Differential Equations .................................................89
Chapter 5: Examining Second Order Linear Homogeneous
Differential Equations....................................................................................................91
Chapter 6: Studying Second Order Linear Nonhomogeneous
Differential Equations..................................................................................................123
Chapter 7: Handling Higher Order Linear Homogeneous Differential
Equations ......................................................................................................................151
Chapter 8: Taking On Higher Order Linear Nonhomogeneous
Differential Equations..................................................................................................173
Part III: The Power Stuff: Advanced Techniques ..........189
Chapter 9: Getting Serious with Power Series and Ordinary Points........................191
Chapter 10: Powering through Singular Points ..........................................................213
Chapter 11: Working with Laplace Transforms ..........................................................239
Chapter 12: Tackling Systems of First Order Linear Differential Equations ...........265
Chapter 13: Discovering Three FailProof Numerical Methods ................................293
Part IV: The Part of Tens ...........................................315
Chapter 14: Ten SuperHelpful Online Differential Equation Tutorials....................317
Chapter 15: Ten Really Cool Online Differential Equation Solving Tools ................321
Index .......................................................................325
Table of Contents
Introduction..................................................................1
About This Book...............................................................................................1
Conventions Used in This Book .....................................................................1
What You’re Not to Read.................................................................................2
Foolish Assumptions .......................................................................................2
How This Book Is Organized...........................................................................2
Part I: Focusing on First Order Differential Equations.......................3
Part II: Surveying Second and Higher Order
Differential Equations.........................................................................3
Part III: The Power Stuff: Advanced Techniques ................................3
Part IV: The Part of Tens........................................................................3
Icons Used in This Book..................................................................................4
Where to Go from Here....................................................................................4
Part I: Focusing on First Order Differential Equations ......5
Chapter 1: Welcome to the World of Differential Equations . . . . . . . . .7
The Essence of Differential Equations...........................................................8
Derivatives: The Foundation of Differential Equations .............................11
Derivatives that are constants............................................................11
Derivatives that are powers................................................................12
Derivatives involving trigonometry ...................................................12
Derivatives involving multiple functions ..........................................12
Seeing the Big Picture with Direction Fields...............................................13
Plotting a direction field ......................................................................13
Connecting slopes into an integral curve .........................................14
Recognizing the equilibrium value.....................................................16
Classifying Differential Equations ................................................................17
Classifying equations by order ...........................................................17
Classifying ordinary versus partial equations..................................17
Classifying linear versus nonlinear equations..................................18
Solving First Order Differential Equations ..................................................19
Tackling Second Order and Higher Order Differential Equations............20
Having Fun with Advanced Techniques ......................................................21
First Things First: The Basics of Solving Linear First Order
Differential Equations ................................................................................24
Applying initial conditions from the start.........................................24
Stepping up to solving differential
equations involving functions.........................................................25
Adding a couple of constants to the mix...........................................26
Solving Linear First Order Differential Equations
with Integrating Factors ............................................................................26
Solving for an integrating factor.........................................................27
Using an integrating factor to solve a differential equation ...........28
Moving on up: Using integrating factors in differential
equations with functions .................................................................29
Trying a special shortcut ....................................................................30
Solving an advanced example.............................................................32
Determining Whether a Solution for a Linear First Order
Equation Exists ...........................................................................................35
Spelling out the existence and uniqueness theorem
for linear differential equations ......................................................35
Finding the general solution ...............................................................36
Checking out some existence and uniqueness examples ...............37
Figuring Out Whether a Solution for a Nonlinear
Differential Equation Exists.......................................................................38
The existence and uniqueness theorem for
nonlinear differential equations......................................................39
A couple of nonlinear existence and uniqueness examples ...........39
Chapter 3: Sorting Out Separable First Order
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Beginning with the Basics of Separable Differential Equations ...............42
Starting easy: Linear separable equations ........................................43
Introducing implicit solutions ............................................................43
Finding explicit solutions from implicit solutions ...........................45
Tough to crack: When you can’t find an explicit solution ..............48
A neat trick: Turning nonlinear separable equations into
linear separable equations ..............................................................49
Trying Out Some Real World Separable Equations....................................52
Getting in control with a sample flow problem ................................52
Striking it rich with a sample monetary problem ............................55
Break It Up! Using Partial Fractions in Separable Equations....................59
Equations and Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Exploring the Basics of Exact Differential Equations ................................63
Defining exact differential equations .................................................64
Working out a typical exact differential equation ............................65
Determining Whether a Differential Equation Is Exact..............................66
Checking out a useful theorem...........................................................66
Applying the theorem ..........................................................................67
Conquering Nonexact Differential Equations
with Integrating Factors ............................................................................70
Finding an integrating factor...............................................................71
Using an integrating factor to get an exact equation.......................73
The finishing touch: Solving the exact equation ..............................74
Getting Numerical with Euler’s Method ......................................................75
Understanding the method .................................................................76
Checking the method’s accuracy on a computer.............................77
Delving into Difference Equations................................................................83
Some handy terminology ....................................................................84
Iterative solutions ................................................................................84
Equilibrium solutions ..........................................................................85
Part II: Surveying Second and Higher Order
Differential Equations..................................................89
Chapter 5: Examining Second Order Linear
Homogeneous Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . .91
The Basics of Second Order Differential Equations...................................91
Linear equations...................................................................................92
Homogeneous equations.....................................................................93
Second Order Linear Homogeneous Equations
with Constant Coefficients ........................................................................94
Elementary solutions ...........................................................................94
Initial conditions...................................................................................95
Checking Out Characteristic Equations ......................................................96
Real and distinct roots.........................................................................97
Complex roots.....................................................................................100
Identical real roots .............................................................................106
Getting a Second Solution by Reduction of Order ...................................109
Seeing how reduction of order works..............................................110
Trying out an example .......................................................................111
Linear independence .........................................................................115
The Wronskian....................................................................................117
Chapter 6: Studying Second Order Linear Nonhomogeneous
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
The General Solution of Second Order Linear
Nonhomogeneous Equations ..................................................................124
Understanding an important theorem.............................................124
Putting the theorem to work.............................................................125
Finding Particular Solutions with the Method of
Undetermined Coefficients......................................................................127
When g(x) is in the form of erx ..........................................................127
When g(x) is a polynomial of order n ..............................................128
When g(x) is a combination of sines and cosines ..........................131
When g(x) is a product of two different forms ...............................133
Breaking Down Equations with the Variation of Parameters Method ....135
Nailing down the basics of the method...........................................136
Solving a typical example..................................................................137
Applying the method to any linear equation..................................138
What a pair! The variation of parameters method
meets the Wronskian......................................................................142
Bouncing Around with Springs ’n’ Things ................................................143
A mass without friction .....................................................................144
A mass with drag force ......................................................................148
Chapter 7: Handling Higher Order Linear Homogeneous
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
The Write Stuff: The Notation of Higher Order
Differential Equations ..............................................................................152
Introducing the Basics of Higher Order Linear
Homogeneous Equations.........................................................................153
The format, solutions, and initial conditions .................................153
A couple of cool theorems ................................................................155
Tackling Different Types of Higher Order Linear
Homogeneous Equations.........................................................................156
Real and distinct roots.......................................................................156
Real and imaginary roots ..................................................................161
Complex roots.....................................................................................164
Duplicate roots ...................................................................................166
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
Mastering the Method of Undetermined Coefficients
for Higher Order Equations.....................................................................174
When g(x) is in the form erx ...............................................................176
When g(x) is a polynomial of order n ..............................................179
When g(x) is a combination of sines and cosines ..........................182
Solving Higher Order Equations with Variation of Parameters..............185
The basics of the method..................................................................185
Working through an example............................................................186
Part III: The Power Stuff: Advanced Techniques...........189
Chapter 9: Getting Serious with Power Series
and Ordinary Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Perusing the Basics of Power Series..........................................................191
Determining Whether a Power Series Converges
with the Ratio Test ...................................................................................192
The fundamentals of the ratio test...................................................192
Plugging in some numbers ................................................................193
Shifting the Series Index..............................................................................195
Taking a Look at the Taylor Series .............................................................195
Solving Second Order Differential Equations with Power Series ...........196
When you already know the solution ..............................................198
When you don’t know the solution beforehand.............................204
A famous problem: Airy’s equation..................................................207
Chapter 10: Powering through Singular Points . . . . . . . . . . . . . . . . . .213
Pointing Out the Basics of Singular Points ...............................................213
Finding singular points ......................................................................214
The behavior of singular points .......................................................214
Regular versus irregular singular points.........................................215
Exploring Exciting Euler Equations ...........................................................219
Real and distinct roots.......................................................................220
Real and equal roots ..........................................................................222
Complex roots.....................................................................................223
Putting it all together with a theorem..............................................224
Figuring Series Solutions Near Regular Singular Points..........................225
Identifying the general solution........................................................225
The basics of solving equations near singular points ...................227
A numerical example of solving an equation
near singular points........................................................................230
Taking a closer look at indicial equations.......................................235
Breaking Down a Typical Laplace Transform...........................................239
Deciding Whether a Laplace Transform Converges ................................240
Calculating Basic Laplace Transforms ......................................................241
The transform of 1..............................................................................242
The transform of eat............................................................................242
The transform of sin at ......................................................................242
Consulting a handy table for some relief ........................................244
Solving Differential Equations with Laplace Transforms........................245
A few theorems to send you on your way.......................................246
Solving a second order homogeneous equation ............................247
Solving a second order nonhomogeneous equation .....................251
Solving a higher order equation .......................................................255
Factoring Laplace Transforms and Convolution Integrals .....................258
Factoring a Laplace transform into fractions .................................258
Checking out convolution integrals .................................................259
Surveying Step Functions............................................................................261
Defining the step function .................................................................261
Figuring the Laplace transform of the step function .....................262
Chapter 12: Tackling Systems of First Order Linear
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
Introducing the Basics of Matrices ............................................................266
Setting up a matrix .............................................................................266
Working through the algebra ............................................................267
Examining matrices............................................................................268
Mastering Matrix Operations......................................................................269
Equality................................................................................................269
Addition ...............................................................................................270
Subtraction..........................................................................................270
Multiplication of a matrix and a number.........................................270
Multiplication of two matrices..........................................................270
Multiplication of a matrix and a vector ...........................................271
Identity.................................................................................................272
The inverse of a matrix......................................................................272
Having Fun with Eigenvectors ’n’ Things..................................................278
Linear independence .........................................................................278
Eigenvalues and eigenvectors ..........................................................281
Solving Systems of FirstOrder Linear Homogeneous
Differential Equations ..............................................................................283
Understanding the basics..................................................................284
Making your way through an example ............................................285
Solving Systems of First Order Linear Nonhomogeneous Equations .....288
Assuming the correct form of the particular solution...................289
Crunching the numbers.....................................................................290
Winding up your work .......................................................................292
Number Crunching with Euler’s Method ..................................................294
The fundamentals of the method .....................................................294
Using code to see the method in action..........................................295
Moving On Up with the Improved Euler’s Method ..................................299
Understanding the improvements ...................................................300
Coming up with new code.................................................................300
Plugging a steep slope into the new code.......................................304
Adding Even More Precision with the RungeKutta Method ..................308
The method’s recurrence relation....................................................308
Working with the method in code ....................................................309
Part IV: The Part of Tens............................................315
Chapter 14: Ten SuperHelpful Online Differential
Equation Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317
AnalyzeMath.com’s Introduction to Differential Equations ...................317
Harvey Mudd College Mathematics Online Tutorial ...............................318
John Appleby’s Introduction to Differential Equations...........................318
Kardi Teknomo’s Page .................................................................................318
Martin J. Osborne’s Differential Equation Tutorial..................................318
Midnight Tutor’s Video Tutorial.................................................................319
The Ohio State University Physics Department’s
Introduction to Differential Equations...................................................319
Paul’s Online Math Notes ............................................................................319
S.O.S. Math ....................................................................................................319
University of Surrey Tutorial ......................................................................320
Chapter 15: Ten Really Cool Online Differential
Equation Solving Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
AnalyzeMath.com’s RungeKutta Method Applet ....................................321
Coolmath.com’s Graphing Calculator .......................................................321
Direction Field Plotter .................................................................................322
An Equation Solver from QuickMath Automatic Math Solutions...........322
First Order Differential Equation Solver....................................................322
GCalc Online Graphing Calculator .............................................................322
JavaView Ode Solver....................................................................................323
Math @ CowPi’s System Solver...................................................................323
A Matrix Inverter from QuickMath Automatic Math Solutions ..............323
Visual Differential Equation Solving Applet ..............................................323
Index........................................................................325
Introduction
For too many people who study differential equations, their only exposure
to this amazingly rich and rewarding field of mathematics is through a
textbook that lands with an 800page whump on their desk. And what follows
is a weary struggle as the reader tries to scale the impenetrable fortress of
the massive tome.
Has no one ever thought to write a book on differential equations from the
reader’s point of view? Yes indeed — that’s where this book comes in.
About This Book
Differential Equations For Dummies is all about differential equations from
your point of view. I’ve watched many people struggle with differential equa
tions the standard way, and most of them share one common feeling:
Confusion as to what they did to deserve such torture.
This book is different; rather than being written from the professor’s point
of view, it has been written from the reader’s point of view. This book was
designed to be crammed full of the good stuff, and only the good stuff. No
extra filler has been added; and that means the issues aren’t clouded. In this
book, you discover ways that professors and instructors make solving prob
lems simple.
You can leaf through this book as you like. In other words, it isn’t important
that you read it from beginning to end. Like other For Dummies books, this one
has been designed to let you skip around as much as possible — this is your
book, and now differential equations are your oyster.
Conventions Used in This Book
Some books have a dozen confusing conventions that you need to know
before you can even start reading. Not this one. Here are the few simple con
ventions that I include to help you navigate this book:
Boldfaced text highlights important theorems, matrices (arrays of num
bers), keywords in bulleted lists, and actions to take in numbered steps.
Monofont points out Web addresses.
When this book was printed, some Web addresses may have needed to break
across two lines of text. If that happens, rest assured that I haven’t put in any
extra characters (such as hyphens) to indicate the break. So when using one
of these Web addresses, type in exactly what you see in this book, pretending
as though the line break doesn’t exist.
What You’re Not to Read
Throughout this book, I share bits of information that may be interesting to
you but not crucial to your understanding of an aspect of differential equa
tions. You’ll see this information either placed in a sidebar (a shaded gray
box) or marked with a Technical Stuff icon. I won’t be offended if you skip
any of this text — really!
oolish Assumptions
This book assumes that you have no experience solving differential equations.
Maybe you’re a college student freshly enrolled in a class on differential equa
tions, and you need a little extra help wrapping your brain around them. Or
perhaps you’re a student studying physics, chemistry, biology, economics,
or engineering, and you quickly need to get a handle on differential equations
to better understand your subject area.
Any study of differential equations takes as its starting point a knowledge of
calculus. So I wrote this book with the assumption in mind that you know
how to take basic derivatives and how to integrate. If you’re totally at sea
with these tasks, pick up a copy of Calculus For Dummies by Mark Ryan
(Wiley) before you pick up this book.
How This Book Is Organized
The world of differential equations is, well, big. And to handle it, I break that
world down into different parts. Here are the various parts you see in this book.
Differential Equations
I start this book with first order differential equations — that is, differential
equations that involve derivatives to the first power. You see how to work
with linear first order differential equations (linear means that the derivatives
aren’t squared, cubed, or anything like that). You also discover how to work
with separable first order differential equations, which can be separated so
that only terms in y appear on one side, and only terms in x (and constants)
appear on the other. And, finally, in this part, you figure out how to handle
exact differential equations. With this type of equation you try to find a func
tion whose partial derivatives correspond to the terms in a differential equa
tion (which makes solving the equation much easier).
Part II: Surveying Second and Higher
Order Differential Equations
In this part, I take things to a whole new level as I show you how to deal with
second order and higher order differential equations. I divide equations into
two main types: linear homogeneous equations and linear nonhomogeneous
equations. You also find out that a whole new array of dazzling techniques
can be used here, such as the method of undetermined coefficients and the
method of variation of parameters.
Part III: The Power Stuff: Advanced
Techniques
Some differential equations are tougher than others, and in this part, I bring
out the big guns. You see heavyduty techniques like Laplace transforms and
series solutions, and you start working with systems of differential equations.
You also figure out how to use numerical methods to solve differential equa
tions. These are methods of last resort, but they rarely fail.
Part IV: The Part of Tens
You see the Part of Tens in all For Dummies books. This part is made up of
fastpaced lists of ten items each; in this book, you find ten online differential
equation tutorials and ten top online tools for solving differential equations.
cons Used in This Book
You can find several icons in the margins of this book, and here’s what they
mean:
This icon marks something to remember, such as a law of differential equa
tions or a particularly juicy equation.
The text next to this icon is technical, insider stuff. You don’t have to read it
if you don’t want to, but if you want to become a differential equations pro
(and who doesn’t?), take a look.
This icon alerts you to helpful hints in solving differential equations. If you’re
looking for shortcuts, search for this icon.
When you see this icon, watch out! It indicates something particularly tough
to keep an eye out for.
Where to Go from Here
You’re ready to jump into Chapter 1. However, you don’t have to start there if
you don’t want to; you can jump in anywhere you like — this book was writ
ten to allow you to do just that. But if you want to get the full story on differ
ential equations from the beginning, jump into Chapter 1 first — that’s where
all the action starts.
Focusing on First
Order Differential
Equations
In this part . . .
In this part, I welcome you to the world of differential
equations and start you off easy with linear first order
differential equations. With first order equations, you
have first order derivatives that are raised to the first
power, not squared or raised to any higher power. I also
show you how to work with separable first order differen
tial equations, which are those equations that can be sep
arated so that terms in y appear on one side and terms in
x (and constants) appear on the other. Finally, I introduce
exact differential equations and Euler’s method.
Welcome to the World of
Differential Equations
This Chapter
Breaking into the basics of differential equations
Getting the scoop on derivatives
Checking out direction fields
Putting differential equations into different categories
Distinguishing among different orders of differential equations
Surveying some advanced methods
It’s a tense moment in the physics lab. The international team of high
powered physicists has attached a weight to a spring, and the weight is
bouncing up and down.
“What’s happening?” the physicists cry. “We have to understand this in terms
of math! We need a formula to describe the motion of the weight!”
You, the renowned Differential Equations Expert, enter the conversation
calmly. “No problem,” you say. “I can derive a formula for you that will
describe the motion you’re seeing. But it’s going to cost you.”
The physicists look worried. “How much?” they ask, checking their grants
and funding sources. You tell them.
“Okay, anything,” they cry. “Just give us a formula.”
You take out your clipboard and start writing.
“What’s that?” one of the physicists asks, pointing at your calculations.
math at lightning speed.
“I’ve got it,” you announce. “Your formula is y = 10 sin (5t), where y is the
weight’s vertical position, and t is time, measured in seconds.”
“Wow,” the physicists cry, “all that just from solving a differential equation?”
“Yep,” you say, “now pay up.”
Well, you’re probably not a renowned differential equations expert — not yet,
at least! But with the help of this book, you very well may become one. In this
chapter, I give you the basics to get started with differential equations, such
as derivatives, direction fields, and equation classifications.
he Essence of Differential Equations
In essence, differential equations involve derivatives, which specify how a
quantity changes; by solving the differential equation, you get a formula for
the quantity itself that doesn’t involve derivatives.
Because derivatives are essential to differential equations, I take the time in
the next section to get you up to speed on them. (If you’re already an expert
on derivatives, feel free to skip the next section.) In this section, however,
I take a look at a qualitative example, just to get things started in an easily
digestible way.
Say that you’re a longtime shopper at your local grocery store, and you’ve
noticed prices have been increasing with time. Here’s the table you’ve been
writing down, tracking the price of a jar of peanut butter:
Month
Price
1
$2.40
2
$2.50
3
$2.60
4
$2.70
5
$2.80
6
$2.90
peanut butter going to be a year from now?
You know that the slope of a line is ∆y/∆x (that is, the change in y divided by
the change in x). Here, you use the symbols ∆p for the change in price and ∆t
for the change in time. So the slope of the line in Figure 11 is ∆p/∆t.
Because the price of peanut butter is going up 10 cents every month, you
know that the slope of the line in Figure 11 is:
t
p
∆
∆
= 10¢/month
The slope of a line is a constant, indicating its rate of change. The derivative
of a quantity also gives its rate of change at any one point, so you can think of
the derivative as the slope at a particular point. Because the rate of change of
a line is constant, you can write:
dt
dp
t
p
∆
∆
=
= 10¢/month
In this case, dp/dt is the derivative of the price of peanut butter with respect
to time. (When you see the d symbol, you know it’s a derivative.)
And so you get this differential equation:
dt
dp
= 10¢/month
1
2
3
4
Time
Price5
6
2.40
2.50
2.60
2.70
2.80
2.90
igure 11:
e price of
peanut
butter by
month.
tion, and you can solve for price as a function of time like this:
p = 10t + c
In this equation, p is price (measured in cents), t is time (measured in months),
and c is an arbitrary constant that you use to match the initial conditions of
the problem. (You need a constant, c, because when you take the derivative of
10t + c, you just get 10, so you can’t tell whether there’s a constant that should
be added to 10t — matching the initial conditions will tell you.)
The missing link is the value of c, so just plug in the numbers you have for
price and time to solve for it. For example, the cost of peanut butter in month 1
is $2.40, so you can solve for c by plugging in 1 for t and $2.40 for p (240 cents),
giving you:
240 = 10 + c
By solving this equation, you calculate that c = 230, so the solution to your
differential equation is:
p = 10t + 230
And that’s your solution — that’s the price of peanut butter by month. You
started with a differential equation, which gave the rate of change in the price
of peanut butter, and then you solved that differential equation to get the
price as a function of time, p = 10t + 230.
Want to see the solution to your differential equation in action? Go for it! Find
out what the price of peanut butter is going to be in month 12. Now that you
have your equation, it’s easy enough to figure out:
p = 10t + 230
10(12) + 230 = 350
As you can see, in month 12, peanut butter is going to cost a steep $3.50,
which you were able to figure out because you knew the rate at which the
price was increasing. This is how any typical differential equation may work:
You have a differential equation for the rate at which some quantity changes
(in this case, price), and then you solve the differential equation to get
another equation, which in this case related price to time.
Note that when you substitute the solution (p = 10t + 230) into the differential
equation, dp/dt indeed gives you 10 cents per month, as it should.
Derivatives: The Foundation of
Differential Equations
As I mention in the previous section, a derivative simply specifies the rate at
which a quantity changes. In math terms, the derivative of a function f(x),
which is depicted as df(x)/dx, or more commonly in this book, as f'(x), indi
cates how f(x) is changing at any value of x. The function f(x) has to be con
tinuous at a particular point for the derivative to exist at that point.
Take a closer look at this concept. The amount f(x) changes in a small distance
along the x axis ∆x is:
f(x + ∆x) – f(x)
The rate at which f(x) changes over the change ∆x is:
x
f x
x
f x
∆
∆
+

^
^
h
h
So far so good. Now to get the derivative dy/dx, where y = f(x), you must let
∆x get very small, approaching zero. You can do that with a limiting expres
sion, which you can evaluate as ∆x goes to zero. In this case, the limiting
expression is:
∆
lim
dx
dy
x
f x
x
f x
∆
∆
x
0
=
+

"
^
^
h
h
In other words, the derivative of f(x) is the amount f(x) changes in ∆x, divided
by ∆x, as ∆x goes to zero.
I take a look at some common derivatives in the following sections; you’ll see
these derivatives throughout this book.
Derivatives that are constants
The first type of derivative you’ll encounter is when f(x) equals a constant, c.
If f(x) = c, then f(x + ∆x) = c also, and f(x + ∆x) – f(x) = 0 (because all these
amounts are actually the same), so df(x)/dx = 0. Therefore:
f x
c
dx
df x
0
=
=
^
^
h
h
So f(x + ∆x) – f(x) = c ∆x and (f(x + ∆x) – f(x))/∆x = c. Therefore:
f x
cx
dx
df x
c
=
=
^
^
h
h
Derivatives that are powers
Another type of derivative that pops up is one that includes raising x to the
power n. Derivatives with powers work like this:
f x
x
dx
df x
n x
n
n 1
=
=

^
^
h
h
Raising e to a certain power is always popular when working with differential
equations (e is the natural logarithm base, e = 2.7128 . . ., and a is a constant):
f x
e
dx
df x
a e
ax
ax
=
=
^
^
h
h
And there’s also the inverse of ea, which is the natural log, which works like
this:
ln
f x
x
dx
df x
x
1
=
=
^
^
^
h
h
h
Derivatives involving trigonometry
Now for some trigonometry, starting with the derivative of sin(x):
sin
cos
f x
x
dx
df x
x
=
=
^
^
^
^
h
h
h
h
And here’s the derivative of cos(x):
cos
sin
f x
x
dx
df x
x
=
= 
^
^
^
^
h
h
h
h
Derivatives involving multiple functions
The derivative of the sum (or difference) of two functions is equal to the sum
(or difference) of the derivatives of the functions (that’s easy enough to
remember!):
f x
a x
b x
dx
df x
dx
d a x
dx
d b x
!
!
=
=
^
^
^
^
^
^
h
h
h
h
h
h
tive of the first. For example:
f x
a x b x
dx
df x
a x
dx
d b x
b x
dx
d a x
=
=
+
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
How about the derivative of the quotient of two functions? That derivative is
equal to the function in the denominator times the derivative of the function
in the numerator, minus the function in the numerator times the derivative
of the function in the denominator, all divided by the square of the function
in the denominator:
f x
b x
a x
dx
df x
b x
b x
dx
d a x
a x
dx
d b x
2
=
=

^
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
h
eeing the Big Picture
with Direction Fields
It’s all too easy to get caught in the math details of a differential equation,
thereby losing any idea of the bigger picture. One useful tool for getting an
overview of differential equations is a direction field, which I discuss in more
detail in Chapter 2. Direction fields are great for getting a handle on differen
tial equations of the following form:
,
dx
dy
f x y
= _
i
The previous equation gives the slope of the equation y = f(x) at any point x. A
direction field can help you visualize such an equation without actually having
to solve for the solution. That field is a twodimensional graph consisting of
many, sometimes hundreds, of short line segments, showing the slope — that
is, the value of the derivative — at multiple points. In the following sections,
I walk you through the process of plotting and understanding direction fields.
Plotting a direction field
Here’s an example to give you an idea of what a direction field looks like.
A body falling through air experiences this force:
F = mg – γ v
γ is the drag coefficient (which adds the effect of air friction and is measured
in newtons sec/meter), and v is the speed of the object as it plummets
through the air.
If you’re familiar with physics, consider Newton’s second law. It says that
F = ma, where F is the net force acting on an object, m is its mass, and a is its
acceleration. But the object’s acceleration is also dv/dt, the derivative of the
object’s speed with respect to time (that is, the rate of change of the object’s
speed). Putting all this together gives you:
F ma m dt
dv mg
v
=
=
=
 c
Now you’re back in differential equation territory, with this differential equa
tion for speed as a function of time:
dt
dv
g m v
= 
c
Now you can get specific by plugging in some numbers. The acceleration due
to gravity, g, is 9.8 meters/sec2 near the Earth’s surface, and let’s say that the
drag coefficient is 1.0 newtons sec/meter and the object has a mass of 4.0 kilo
grams. Here’s what you’d get:
.
dt
dv
v
9 8
4
=

To get a handle on this equation without attempting to solve it, you can plot
it as a direction field. To do so you create a twodimensional plot and add
dozens of short line segments that give the slope at those locations (you can
do this by hand or with software). The direction field for this equation
appears in Figure 12. As you can see in the figure, there are dozens of short
lines in the graph, each of which give the slope of the solution at that point.
The vertical axis is v, and the horizontal axis is t.
Because the slope of the solution function at any one point doesn’t depend
on t, the slopes along any horizontal line are the same.
Connecting slopes into an integral curve
You can get a visual handle on what’s happening with the solutions to a dif
ferential equation by looking at its direction field. How? All those slanted line
segments give you the solutions of the differential equations — all you have
to do is draw lines connecting the slopes. One such solution appears in
Figure 13. A solution like the one in the figure is called an integral curve of
the differential equation.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
50
igure 13:
olution in
direction
field.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
igure 12:
direction
field.
As you can see from Figure 13, there are many solutions to the equation that
you’re trying to solve. As it happens, the actual solution to that differential
equation is:
v = 39.2 + ce–t/4
In the previous solution, c is an arbitrary constant that can take any value.
That means there are an infinite number of solutions to the differential
equation.
But you don’t have to know that solution to determine what the solutions
behave like. You can tell just by looking at the direction field that all solutions
tend toward a particular value, called the equilibrium value. For instance, you
can see from the direction field graph in Figure 13 that the equilibrium value
is 39.2. You also can see that equilibrium value in Figure 14.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
50
igure 14:
An
quilibrium
value in a
direction
field.
Classifying Differential Equations
Tons of differential equations exist in Math and Science Land, and the way
you tackle them differs by type. As a result, there are several classifications
that you can put differential equations into. I explain them in the following
sections.
Classifying equations by order
The most common classification of differential equations is based on order.
The order of a differential equation simply is the order of its highest deriva
tive. For example, check out the following, which is a first order differential
equation:
dx
dy
x
5
=
Here’s an example of a second order differential equation:
dx
d y
dx
dy
x
19
4
2
2
+
=
+
And so on, up to order n:
. . .
dx
d y
dx
d
y
dx
d y
dx
dy
x
9
16
14
12
19
4
0
n
n
n
n
1
1
2
2

+
+
+

+ =


As you might imagine, first order differential equations are usually the most
easily managed, followed by second order equations, and so on. I discuss
first order, second order, and higher order differential equations in a bit more
detail later in this chapter.
Classifying ordinary versus
partial equations
You can also classify differential equations as ordinary or partial. This classifi
cation depends on whether you have only ordinary derivatives involved or
only partial derivatives.
of an ordinary differential equation, relating the charge Q(t) in a circuit to the
electromotive force E(t) (that is, the voltage source connected to the circuit):
L
dt
d Q
R dt
dQ
C Q E t
1
2
2
+
+
=
^ h
Here, Q is the charge, L is the inductance of the circuit, C is the capacitance
of the circuit, and E(t) is the electromotive force (voltage) applied to the cir
cuit. This is an ordinary differential equation because only ordinary deriva
tives appear.
On the other hand, partial derivatives are taken with respect to only one vari
able, although the function depends on two or more. Here’s an example of a
partial differential equation (note the squiggly d’s):
,
,
x
u x t
t
u x t
α 2
2
2
2
2
2
2
=
_
_
i
i
In this heat conduction equation, α is a physical constant of the system that
you’re trying to track the heat flow of, and u(x, t) is the actual heat.
Note that u(x, t) depends on both x and t and that both derivatives are partial
derivatives — that is, the derivatives are taken with respect to one or the
other of x or t, but not both.
In this book, I focus on ordinary differential equations, because partial differ
ential equations are usually the subject of more advanced texts. Never fear
though: I promise to get you your fair share of partial differential equations.
Classifying linear versus
nonlinear equations
Another way that you can classify differential equations is as linear or non
linear. You call a differential equation linear if it exclusively involves linear
terms (that is, terms to the power 1) of y, y', y", and beyond to y(n). For exam
ple, this equation is a linear differential equation:
L
dt
d Q
R dt
dQ
C Q E t
1
2
2
+
+
=
^ h
clear:
LQ" RQ C Q E t
1
+
+
=
l
^ h
On the other hand, nonlinear differential equations involve nonlinear terms in
any of y, y', y", up to y(n). The following equation, which describes the angle of
a pendulum, is a nonlinear differential equation that involves the term sin θ
(not just θ):
sin
dt
d
L
g
θ
θ
0
2
2
+
=
Handling nonlinear differential equations is generally more difficult than han
dling linear equations. After all, it’s often tough enough to solve linear differ
ential equations without messing things up by adding higher powers and
other nonlinear terms. For that reason, you’ll often see scientists cheat when
it comes to nonlinear equations. Usually they make an approximation that
reduces the nonlinear equation to a linear one.
For example, when it comes to pendulums, you can say that for small angles,
sin θ ≈ θ. This means that the following equation is the standard form of the
pendulum equation that you’ll find in physics textbooks:
dt
d
L
g
θ
θ
0
2
2
+
=
As you can see, this equation is a linear differential equation, and as such,
it’s much more manageable. Yes, it’s a cheat to use only small angles so that
sin θ ≈ θ, but unless you cheat like that, you’ll sometimes be reduced to using
numerical calculations on a computer to solve nonlinear differential equa
tions; obviously these calculations work, but it’s much less satisfying than
cracking the equation yourself (if you’re a math geek like me).
olving First Order Differential Equations
Chapters 2, 3, and 4 take a look at differential equations of the form f'(x) =
f(x, y); these equations are known as first order differential equations
because the derivative involved is of first order (for more on these types
of equations, see the earlier section “Classifying equations by order.”
tions in Chapters 2, 3, and 4. The following are some examples of what you
can look forward to:
As you know, first order differential equations look like this: f'(x) = f(x, y).
In the upcoming chapters, I show you how to deal with the case where
f(x, y) is linear in x — for example, f'(x) = 5x — and then nonlinear in x,
as in f'(x) = 5x2.
You find out how to work with separable equations, where you can
factor out all the terms having to do with y on one side of the equation
and all the terms having to do with x on the other.
I also help you solve first order differential equations in cool ways, such
as by finding integrating factors to make more difficult problems simple.
Direction fields, which I discuss earlier in this chapter, work only for equa
tions of the type f'(x) = f(x, y) — that is, where only the first derivative is
involved — because the first derivative of f(x) gives you the slope of f(x) at
any point (and, of course, connecting the slope line segments is what direc
tion fields are all about).
ackling Second Order and Higher Order
Differential Equations
As noted in the earlier section “Classifying equations by order,” second order
differential equations involve only the second derivative, d2y/dx2, also known
as y". In many physics situations, second order differential equations are
where the action is.
For example, you can handle physics situations such as masses on springs or
the electrical oscillations of inductorcapacitor circuits with a differential
equation like this:
y" – ay = 0
In Part II, I show you how to tackle second order differential equations with a
large arsenal of tools, such as the Wronskian matrix determinant, which will tell
you if there are solutions to a second (or higher) order differential equation.
Other tools I introduce you to include the method of undetermined coefficients
and the method of variation of parameters.
equations, which I also cover in Part II. With these highend equations, you
find terms like dny/dxn, where n > 2.
The derivative dny/dxn is also written as y(n). Using the standard syntax, deriv
atives are written as y', y", y''', yiv, yv, and so on. In general, the nth derivative
of y is written as y(n).
Higher order differential equations can be tough; many of them don’t have
solutions at all. But don’t worry, because to help you solve them I bring to
bear the wisdom of more than 300 years of mathematicians.
Having Fun with Advanced Techniques
You discover dozens of tools in Part III of this book; all of these tools have been
developed and proved powerful over the years. Laplace Transforms, Euler’s
method, integrating factors, numerical methods — they’re all in this book.
These tools are what this book is all about — applying the knowledge of hun
dreds of years of solving differential equations. As you may know, differential
equations can be broken down by type, and there’s always a set of tools devel
oped that allows you to work with whatever type of equation you come up
with. In this book, you’ll find a great many powerful tools that are just waiting
to solve all of your differential equations — from the simplest to the seemingly
impossible!
Looking at Linear First Order
Differential Equations
This Chapter
Beginning with the basics of solving linear first order differential equations
Using integrating factors
Determining whether solutions exist for linear and nonlinear equations
As you find out in Chapter 1, a first order differential equation simply has
a derivative of the first order. Here’s what a typical first order differen
tial equation looks like, where f(t, y) is a function of the variables t and y (of
course, you can use any variables here, such as x and y or u and v, not just t
and y):
,
dt
dy
f t y
= _
i
In this chapter, you work with linear first order differential equations — that
is, differential equations where the highest power of y is 1 (you can find out
the difference between linear and nonlinear equations in Chapter 1). For
example:
dt
dy
5
=
dt
dt
y
1
= +
dt
dt
y
3
1
= +
I provide some general information on nonlinear differential equations at the
end of the chapter for comparison.
irst Things First: The Basics of Solving
inear First Order Differential Equations
In the following sections, I take a look at how to handle linear first order dif
ferential equations in general. Get ready to find out about initial conditions,
solving equations that involve functions, and constants.
Applying initial conditions from the start
When you’re given a differential equation of the form dy/dt = f(t, y), your goal
is to find a function, y(t), that solves it. You may start by integrating the equa
tion to come up with a solution that includes a constant, and then you apply
an initial condition to customize the solution. Applying the initial condition
allows you to select one solution among the infinite number that result from
the integration. Sounds cool, doesn’t it?
Take a look at this simple linear first order differential equation:
dt
dy
a
=
As you can see, a is just a regular old number, meaning that this is a simple
example to start with and to introduce the idea of initial conditions. How can
you solve it? First of all, you may have noticed that another way of writing
this equation is:
dy = a dt
This equation looks promising. Why? Well, because now you can integrate
like this:
dy
a dt
x
t
y
y
0
0
= #
#
Performing the integration gives you the following equation:
y – y0 = at – at0
You can combine y0 – at0 into a new constant, c, by adding y0 to the right side
of the equation, which gives you:
y = at + c
So, for example, if a = 3 in the differential equation, here’s the equation you
would have:
dt
dy
3
=
The solution for this equation is y = 3t + c.
Note that c, the result of integrating, can be any value, which leads to an infi
nite set of solutions: y = 3t + 5, y = 3t + 6, y = 3t + 589,303,202. How do you track
down the value of c that works for you? Well, it all depends on your initial con
ditions; for example, you may specify that the value of y at t = 0 be 15. Setting
this initial condition allows you to state the whole problem — differential
equation and initial condition — as follows:
dt
dy
3
=
y(0) = 15
Substituting the initial condition, y(0) = 15, into the solution y = 3t + c gives
you the following equation:
y(t) = 3t + 15
Stepping up to solving differential
equations involving functions
Of course, dy/dt = 3 (the example from the previous section) isn’t the most
exciting differential equation. However, it does show you how to solve a dif
ferential equation using integration and how to apply an initial condition. The
next step is to solve linear differential equations that involve functions of t
rather than just a simple number.
This type of differential equation still contains only dy/dt and terms of t,
making it easy to integrate. Here’s the basic form:
dt
dy
g t
= ^ h
where g(t) is some function of t.
Here’s an example of this type of differential equation:
dt
dy
t
t
t
3
3
2
=  +
dy = t3 dt – 3t2 dt + t dt
Then you can integrate to get this equation:
y
t
t
t
c
4
2
4
3
2
=  + +
Adding a couple of constants to the mix
The next step up from equations such as dy/dx = a or dy/dt = g(t) are equa
tions of the following form, which involve y, dy/dt, and the constants a and b:
dt
dy
ay
b
= 
How do you handle this equation and find a solution? Using some handy alge
bra, you can rewrite the equation like this:
/
/
y
b a
dy dt
a

=
_
i
Integrating both sides gives you the following equation:
ln  y – (b/a)  = at + c
where c is an arbitrary constant. Now get y out of the natural logarithm,
which gives you:
y = (b/a) + deat
where d = ec. And that’s it! You’re done. Good job!
olving Linear First Order Differential
quations with Integrating Factors
Sometimes integrating linear first order differential equations isn’t as easy as
it is in the examples earlier in this chapter. But it turns out that you can often
convert general equations into something that’s easy to integrate if you find
an integrating factor, which is a function, µ(t). The idea here is to multiply the
differential equation by an integrating factor so that the resulting equation
can easily be integrated and solved.
In the following sections, I provide tips and tricks for solving for an integrating
factor and plugging it back into different types of linear first order equations.
In general, first order differential equations don’t lend themselves to easy
integration, which is where integrating factors come in. How does the method
of integrating factors work? To understand, say, for example, that you have
this linear differential equation:
dt
dy
y
2
4
+ =
First, you multiply the previous equation by µ(t), which is a standin for the
undetermined integrating factor, giving you:
t dt
dy
t y
t
µ
µ
µ
2
4
+
=
^
^
^
h
h
h
Now you have to choose µ(t) so that you can recognize the left side of this
equation as the derivative of some expression. This way it can easily be
integrated.
Here’s the key: The left side of the previous equation looks very much like
differentiating the product µ(t)y. So try to choose µ(t) so that the left side of
the equation is indeed the derivative of µ(t)y. Doing so makes the integration
easy.
The derivative of µ(t)y by t is:
dt
d
t y
t dt
dy
dt
d
t y
µ
µ
µ
=
+
^
^
^
h
h
h
8
B
Comparing the previous two equations term by term gives you:
dt
d
t
t
µ
µ
2
=
^
^
h
h
Hey, not bad. Now you’re making progress! This is a differential equation you
can solve. Rearranging the equation so that all occurrences of µ(t) are on the
same side gives you:
/
t
d
t dt
µ
µ
2
=
^
^
h
h
Now the equation can be rearranged to look like this:
t
d
t
dt
µ
µ
2
=
^
^
h
h
Fine work. Integration gives you:
ln µ(t) = 2t + b
where b is an arbitrary constant of integration.
µ(t) = ce2t
where c is an arbitrary constant.
So that’s it — you’ve solved for the integrating factor! It’s µ(t) = ce2t.
Using an integrating factor to solve
a differential equation
After you solve for an integrating factor, you can plug that factor into the
original linear differential equation as multiplied by µ(t). For instance, take
your original equation from the previous section:
t dt
dy
t y
t
µ
µ
µ
2
4
+
=
^
^
^
h
h
h
and plug in the integrating factor to get this equation:
ce dt
dy
ce y
ce
2
4
t
t
t
2
2
2
+
=
Note that c drops out of this equation when you divide by c, so you get the
following equation (because you’re just looking for an arbitrary integrating
factor, you could also set c = 1):
e dt
dy
e y
e
2
4
t
t
t
2
2
2
+
=
When you use an integrating factor, you attempt to find a function µ(t) that,
when multiplied on both sides of a differential equation, makes the left side
into the derivative of a product. Figuring out the product allows you to solve
the differential equation.
In the previous example, you can now recognize the left side as the derivative
of e2t y. (If you can’t recognize the left side as a derivative of some product, in
general, it’s time to go on to other methods of solving the differential equation).
In other words, the differential equation has been conquered, because now
you have it in this form:
dt
d e y
e
4
t
t
2
2
=
_
i
You can integrate both sides of the equation to get this:
e2ty = 2e2t + c
y = 2 + ce–2t
You’ve got yourself a solution. Beautiful.
The use of an integrating factor isn’t always going to help you; sometimes,
when you use an integrating factor in a linear differential equation, the left
side isn’t going to be recognizable as the derivative of a product of functions.
In that case, where integrating factors don’t seem to help, you have to turn to
other methods. One of those methods is to determine whether the differen
tial equation is separable, which I discuss in Chapter 3.
Moving on up: Using integrating factors in
differential equations with functions
Now you’re going to take integrating factors to a new level. Check out this
linear equation, where g(t) is a function of t:
dt
dy
ay
g t
+ = ^ h
This one’s a little more tricky. However, using the same integrating factor
from the previous two sections, eat (remember that the c dropped out), works
here as well. After you multiply both sides by eat, you get this equation:
e dt
dy
a e y
e g t
at
at
at
+
=
^ h
Now you can recast this equation in the following form:
dt
d e y
e g t
at
at
=
_
^
i
h
To integrate the function g, I use s as the variable of integration. Integration
gives you this equation:
e y
e g s ds
c
at
as
=
+
#
^ h
You can solve for y here, which gives you the following equation:
y
e
e g s ds
ce
at
as
at
=
+


#
^ h
And that’s it! You’ve got your answer!
Of course, solving this equation depends on whether you can calculate the
integral in the previous equation. If you can do it, you’ve solved the differential
equation. Otherwise, you may have to leave the solution in the integral form.
In this section, I give you a shortcut for solving some particular differential
equations. Ready? Here’s the tip: In general, the integrating factor for an
equation in this form:
dt
dy
ay
g t
+ = ^ h
is this:
exp
t
a dt
µ =
#
^ h
In this equation, exp(x) means ex.
As an example, try solving the following differential equation with the shortcut:
dt
dy
y
t
2
1
4
+
= +
Assume that the initial condition is
y = 8, when t = 0
This equation is an example of the general equation solved in the previous
section. In this case, g(t) = 4 + t, and a = 1⁄2.
Using a, you find that the integrating factor is et/2, so multiply both sides of
equation by that factor:
e dt
dy
e y
e
te
2
4
/
/
/
/
t
t
t
t
2
2
2
2
+
=
+
Now you can combine the two terms on the left to give you this equation:
dt
d e y
e
te
4
/
/
/
t
t
t
2
2
2
=
+
_
i
All you have to do now is integrate this result. The term on the left and the
first term on the right are no problem. The last term on the right is another
story.
You can use integration by parts to integrate this term. Integration by parts
works like this:
f x g x dx
f b g b
f a g a
f x g x dx
a
b
a
b
=


#
#
l
l
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
et/2 y = 8et/2 + 2 t et/2 – 4et/2 + c
where c is an arbitrary constant, set by the initial conditions. Dividing by eat
gives you this equation:
y = 4 + 2t + ce–at
By applying the initial condition, y(0) = 8, you get
y(0) = 8
8 = 4 + c
Or c = 4. So the general solution of the differential equation is:
y = 4 + 2t + 4e–t/2
In Chapter 1, I explain that direction fields are great tools for visualizing dif
ferential equations. You can see a direction field for the previously noted
general solution in Figure 21.
0
0
1
2
3
4
5
6
7
8
9
10
y
x
25
20
15
10
5
igure 21:
The
direction
eld of the
general
solution.
Solving an advanced example
I think you’re ready for another, somewhat more advanced, example. Try
solving this differential equation to show that you can have different integrat
ing factors:
t dt
dy
y
t
2
4 2
+ =
where y(1) = 4.
To solve, first you have to find an integrating factor for the equation. To get it
into the form:
dt
dy
ay
g t
+ = ^ h
you have to divide both sides by t, which gives you this equation:
dt
dy
t y
t
2
4
+
=
0
0
1
2
3
4
5
6
7
8
9
10
y
x
25
20
15
10
5
igure 22:
e graph of
e general
solution.
exp
exp
t
a dt
t dt
µ
2
=
=
#
#
^ h
Performing the integral gives you this equation:
exp
t
t dt
e
t
µ
2
ln
t
2
2
=
=
=
#
^ h
So the integrating factor here is t2, which is a new one. Multiplying both sides
of the equation by the integrating factor, µ(t) = t2, gives you:
t dt
dy
ty
t
2
4
2
3
+ =
Because the left side is a readily apparent derivative, you can also write it in
this form:
dt
d yt
t4
2
3
=
_
i
Now simply integrate both sides to get:
yt2 = t4 + c
Finally you get:
y
t
t
c
2
2
= +
where c is an arbitrary constant of integration.
Now you can plug in the initial condition y(1) = 4, which allows you to see
that c = 3. And that helps you come to this solution:
y
t
t
3
2
2
= +
And there you have it. You can see a direction field for the many general solu
tions to this differential equation in Figure 23.
You can see this function graphed in Figure 24.
2
–2
–1
0
1
2
y
x
8
7
6
5
4
3
igure 24:
e graph of
a more
advanced
solution.
–5
–2
–1
0
1
2
y
x
4
3
2
1
0
–1
–2
–3
–4
igure 23:
The
direction
field of a
more
advanced
solution.
Determining Whether a Solution for a
inear First Order Equation Exists
I show you how to deal with different kinds of linear first order differential
equations earlier in this chapter, but the fact remains that not all linear differ
ential equations actually do have a solution.
Luckily, a theorem exists that tells you when a given linear differential equa
tion with an initial condition has a solution. That theorem is called the exis
tence and uniqueness theorem.
This theorem is worth knowing. After all, if a differential equation doesn’t have
a solution, what use is it to search for a solution? In other words, this theorem
represents another way to tackle linear first order differential equations.
Spelling out the existence and uniqueness
theorem for linear differential equations
In this section, I explain what the existence and uniqueness theorem for linear
differential equations says. Before I continue, however, note that a continuous
function is a function for which small changes in the input result in small
changes in the output (for example, f(x) = 1/x is not continuous at x = 0).
Without further ado, here’s the existence and uniqueness theorem:
If there is an interval I that contains the point to, and if the functions p(x)
and g(x) are continuous on that interval, and if you have this differential
equation:
dx
dy
p x y
g x
+
=
^
^
h
h
then there exists a unique function, y(x), that is the solution to that differen
tial equation for each x in interval I that also satisfies this initial condition:
y(to) = yo
where yo is an arbitrary initial value.
In other words, this theorem says that a solution exists and that the solution
is unique.
Thinking about the theorem in the previous section begs the question: What
is the general solution to the following linear differential equation?
dx
dy
p x y
g x
+
=
^
^
h
h
Note that this differential equation has a function p(x) and g(x), which pro
vides a more complex situation. So you can’t use the simple form I explain in
the earlier section “Adding a couple of constants to the mix,” where a and b
are constants like this:
dx
dy
ay
b
= 
The solution here is:
y = (b/a) + ceat
Now you face a more complex situation, with functions p(x) and g(x). A gen
eral solution to the general equation does exist, and here it is:
y
t
s g s ds
c
µ
µ
=
+
#
^
^
^
h
h
h
where the integrating factor is the following:
exp
t
p t dt
µ =
#
^
^
h
h
The integrals in these equations may not be possible to perform, of course.
But together, the equations represent the general solution.
Note that for linear differential equations, the solution, if there is one, is com
pletely specified, up to a constant of integration, as in the solution you get in
the earlier section “Solving an advanced example”:
y
t
t
c
2
2
= +
where c is a constant of integration.
You can’t necessarily say the same thing about nonlinear differential
equations — they may have solutions of completely different forms, not just
differing in the value of a constant. Because the solution to a linear differen
tial equation has one form, differing only by the value of a constant, those
solutions are referred to as general solutions. This term isn’t used when dis
cussing nonlinear differential equations, which may have multiple solutions
of completely different forms. I discuss nonlinear first order differential equa
tions later in this chapter.
and uniqueness examples
In this section, I include a few examples to help you understand the existence
and uniqueness theorem for linear differential equations.
Example 1
Apply the existence and uniqueness theorem to the following equation to
show that there exists a unique solution:
dx
dy
y
x
5
4
=

_
i
Just kidding! This equation isn’t linear because the term (y – 5) is in the denom
inator of the right side. And, of course, because the equation isn’t linear, the
existence and uniqueness theorem doesn’t apply. Did you catch that?
Example 2
Try this differential equation (which I promise is linear!). Does a unique solu
tion exist?
dx
dy
y
x
2
4 2
+ =
where y(1) = 2.
The equation is already in the correct form:
dx
dy
p x y
g x
+
=
^
^
h
h
where p(x) = 2 and g(x) = 4x2.
Note that p(x) and g(x) are continuous everywhere, so there’s a general solu
tion that’s valid on the interval, –∞ < x < ∞.
In particular, the initial condition is y(1) = 2, which is definitely inside the
interval that p(x) and g(x) are continuous (everything is inside that interval).
So, yes, there exists a solution to the initial value problem.
Example 3
Now take a look at this equation, which is similar to the example in the previ
ous section, and determine whether a unique solution exists:
x dx
dy
y
x
2
4 2
+ =
where y(1) = 2.
dx
dy
p x y
g x
+
=
^
^
h
h
Here’s what the equation should look like:
dx
dy
x
y
x
2
4
+ =
In other words:
p x
x
2
=
^ h
and
g(x) = 4x
Note that p(x) and g(x) aren’t continuous everywhere. In particular, p(x) is
discontinuous at x = 0, which makes the interval in which p(x) and g(x) are
continuous on the interval 0 > x and 0 < x.
Because the initial condition here is y(1) = 2, the point of interest is x = 1,
which is inside the interval where p(x) and g(x) are continuous. Therefore, by
the existence and uniqueness theorem, the initial value problem indeed has a
unique solution. Cool, huh?
iguring Out Whether a Solution for a
Nonlinear Differential Equation Exists
In the previous sections of this chapter, I cover linear first order differential
equations in detail. But you may be wondering: Is there such a thing as a non
linear differential equation? You bet there is! A nonlinear differential equation
simply includes nonlinear terms in y, y', y", and so on. Nonlinear equations
are pretty tough, so I don’t delve into them a lot in this book. But I do want to
discuss one important theorem related to solving these equations.
You see, the existence and uniqueness theorem (which you use for linear
equations, and which I cover earlier in this chapter) is analogous to another
theorem that’s used for nonlinear equations. I explain this theorem and show
some examples in the following sections.
nonlinear differential equations
Here’s the existence and uniqueness of solutions for nonlinear equations:
Say that you have a rectangle R that contains the point (to, yo) and that the
functions f and df/dy are continuous in that rectangle. Then, in an interval
to – h < t < to + h contained in R, there’s a unique solution to the initial
value problem:
,
,
dt
dy
f t y
y t
y
0
0
=
=
_
_
i
i
Note that this theorem discusses the continuity of both f and df/dy instead of
the continuity of both p(x) and g(x). Like the first theorem in this chapter,
this theorem guarantees the existence of a unique solution if its conditions
are met.
Here’s another note: If the differential equation in question actually is linear,
the theorem reduces to the first theorem in this chapter. In that case, f(t, y) =
–p(t)y + g(t) and df/dy = –p(t). So demanding that f and df/dy be continuous is
the same as saying that p(t) and g(t) be continuous.
Here’s a side note that many differential equations books won’t tell you: The
first theorem in this chapter guarantees a unique solution, but it’s actually a
little tighter than it needs to be in order to guarantee just a solution (which
isn’t necessarily unique). In fact, you can show that there’s a solution — but
not that it’s unique — to the nonlinear differential equation merely by proving
that f is continuous.
A couple of nonlinear existence and
uniqueness examples
In the following sections, I provide two examples that put the nonlinear exis
tence and uniqueness theorem into action.
Example 1
Determine what the two theorems in this chapter have to say about the fol
lowing differential equation as far as its solutions go:
dx
dy
y
x
x
2
4
5
9
6
2
=

+ +
_
i
where y(0) = –1.
That means you need the nonlinear theorem. Note that for this theorem:
,
f x y
y
x
x
2
4
5
9
6
2
=

+ +
_
_
i
i
and
dy
df
y
x
x
2
4
5
9
6
2
2
= 

+ +
_
i
These two functions, f and df/dy, are continuous, except at y = 4.
So you can draw a rectangle around the initial condition point, (0, –1) in which
both f and df/dy are continuous. And the existence and uniqueness theorem
for nonlinear equations guarantees that this differential equation has a solu
tion in that rectangle.
Example 2
Now determine what the existence and uniqueness theorems say about this
differential equation:
dx
dy
y /
1 5
=
where y(1) = 0.
Clearly, this equation isn’t linear, so the first theorem is no good. Instead you
have to try the second theorem. Here, f is:
f(x, y) = y1/5
and df/dy is:
dy
df
y
5
/4 5
=

Now you know that f(x, y) is continuous at the initial condition point given by:
y(1) = 0
But df/dy isn’t continuous at this point. The upshot is that neither the first
theorem nor the second theorem have anything to say about this initial value
problem. On the other hand, a solution to this differential equation is still
guaranteed because f(x, y) is continuous. However, it doesn’t guarantee the
uniqueness of that solution.
Sorting Out Separable First Order
Differential Equations
This Chapter
Figuring out the fundamentals of separable differential equations
Applying separable differential equations to real life
Advancing with partial fractions
Some rocket scientists call you, the Consulting Differential Equation
Expert, into their headquarters.
“We’ve got a problem,” they explain. “Our rockets are wobbling because we
can’t solve their differential equation. All the rockets we launch wobble and
then crash!”
They show you to a blackboard with the following differential equation:
dx
dy
y
x
2
2
2
=

“It’s not linear,” the scientists cry. “There’s a y2 in there!”
“I can see that,” you say. “Fortunately, it is separable.”
“Separable? What does that mean?” they ask.
“Separable means that you can recast the equation like this, where x is on
one side and y is on the other,” you say while showing them the following
equation on your clipboard:
(2 – y2) dy = x2 dx
“You can integrate the equation with respect to y on one side, and x on the
other,” you say.
“We never thought of that. That was too easy.”
to the first order.) I explain the basics of separable equations here, such as
determining the difference between linear and nonlinear separable equations
and figuring out different types of solutions, such as implicit and explicit. I also
introduce you to a fancy method for solving separable equations involving
partial fractions. Finally, I show you a couple of real world applications for
separable equations. When you’re an expert at these equations, you too can
solve problems for rocket scientists.
Beginning with the Basics of Separable
Differential Equations
Separable differential equations, unlike general linear equations in Chapter 2,
let you separate variables so only variables of one kind appear on one side,
and only variables of another kind appear on the other. Say, for example, that
you have a differential equation of the following form, in which M and N are
functions:
,
,
M x y
N x y dx
dy
0
+
=
_
_
i
i
And furthermore, imagine that you could reduce this equation to the follow
ing form, where the function M depends only on x and the function N depends
only on y:
M x
N y x
dy
0
+
=
^
_
h
i
This equation is a separable equation; in other words, you can separate the
parts so that only x appears on one side, and only y appears on the other.
You write the previous equation like this:
M(x) dx + N(y) dy = 0
Or in other words:
M(x) dx = –N(y) dy
If you can separate a differential equation, all that’s left to do at that point is
to integrate each side (assuming that’s possible). Note that the general form
of a separable differential equation looks like this:
M x
N y dx
dy
0
+
=
^
_
h
i
x
y dx
dy
0
2
+
=
And if you’re still not convinced, check out this one, which is also separable
but not linear:
x
y dx
dy
1
0
9
3
+ 
=
_
i
In the following sections, I ease you into linear separable equations before
tackling nonlinear separable equations. I also show you a trick for turning
nonlinear equations into linear equations. (It’s so cool that it’ll impress all
your friends!)
Starting easy: Linear separable equations
To get yourself started with linear separable equations, say that you have
this differential equation:
dx
dy
x
0
2
 =
This equation qualifies as linear. This also is an easily separated differential
equation. All you have to do is put it into this form:
dy = x2 dx
And now you should be able to see the idea behind solving separable differ
ential equations immediately. You just have to integrate, which gives you this
equation:
y
x
c
3
3
= +
where c is an arbitrary constant. There’s your solution! How easy was that?
Introducing implicit solutions
Not all separable equation solutions are going to be as easy as the one in the
previous section. Sometimes finding a solution in the y = f(x) format isn’t ter
ribly easy to get. Mathematicians refer to a solution that isn’t in the form
y = f(x) as an implicit solution. Coming up with such a solution is often the
best you can do, because solving a separable differential equation involves
tion; I show you how to find an explicit solution from an implicit solution in
the next section.)
Try this differential equation to see what I mean:
dx
dy
y
x
2
2
2
=

How about it? One of the first things that should occur to you is that this isn’t
a linear differential equation, so the techniques in the first part of this chap
ter won’t help. However, you’ll probably notice that you can write this equa
tion as:
(2 – y2) dy = x2 dx
As you can see, this is a separable differential equation because you can put y
on one side and x on the other. You can also write the differential equation
like this:
x
y dx
dy
2
0
2
2
 + 
=
_
i
You can cast this particular equation in terms of a derivative of x, and then
you integrate with respect to x to solve it. After integration, you wind up with
the following:
/
x
dx
d
x 3
2
3
 =

_
i
Note that:
/
y dx
dy
dx
d y
y
2
2
3
2
3

=

_
_
i
i
because of the chain rule, which says that:
dx
df
dy
df
dx
dy
=
So now you can write the original equation like this:
x
y dx
dy
dx
d
x
y
y
2
3
2
3
0
2
2
3
3
 + 
=

+ 
=
_
e
i
o
If the derivative of the term on the right is 0, it must be a constant this way:
x
y
y
c
3
2
3
3
3

+ 
=
e
o
–x3 + 6y – y3 = c
To see how the solutions look graphically, check out the direction field for this
differential equation in Figure 31. (I introduce direction fields in Chapter 1.)
Finding explicit solutions from
implicit solutions
The implicit solution in the previous section, with terms in y and y3, isn’t ter
ribly easy to cram into the y = f(x) format. In this section, you discover that
you can find an explicit solution to a separable equation by using a quadratic
equation, which is the general solution to polynomials of order two.
Try another, somewhat more tractable problem. Solve this differential
equation:
dx
dy
y
x
x
2
1
9
6
4
2
=

+ +
_
i
where y(0) = –1.
–4
–4
4
3
2
1
0
–1
–2
–3
y
x
4
3
2
1
0
–1
–2
–3
igure 31:
The
direction
field of a
nonlinear
separable
equation.
dx
dy
x
x
9
6
4
2
=
+ +
there would be no problem. After all, you would just integrate. But you’ve
probably noticed that pesky 2(y – 1) term in the denominator on the right
side. Fortunately, you may also realize that this is a separable differential
equation because you can put y on one side and x on the other. Simply write
the equation like this:
2(y – 1) dy = (9x2 + 6x + 4) dx
Now you integrate to get this equation:
y2 – 2y = 3x3 + 3x2 +4x + c
Using the initial condition, y(0) = –1, substitute x = 0 and y = –1 to get the
following:
1 + 2 = c
Now you can see that c = 3 and that the implicit solution to the separable
equation is:
y2 – 2y = 3x3 + 3x2 +4x + 3
If you want to find the explicit solution to this and similar separable equa
tions, simply solve for y with the quadratic equation because the highest
power of y is 2. Solving for y using the quadratic formula gives you:
y
x
x
x
1
3
3
4
4
3
2
!
=
+
+ +
You have two solutions here: one where the addition sign is used and one
where the subtraction sign is used. To match the initial condition that y(0) =
–1, however, only one solution will work. Which one? The one using the sub
traction sign:
y
x
x
x
1
3
3
4
4
3
2
= 
+
+ +
In this case, the solution with the subtraction is valid as long as the expres
sion under the square root is positive — in other words, as long as x > –1.
You can see the direction field for the general solutions to this differential
equation in Figure 32.
As I note in Chapter 1, connecting the slanting lines in a direction field gives
you a graph of the solution. You can see a graph of this particular function in
Figure 33.
–5
–2
3
2
1
0
–1
y
x
2
1
0
–1
–2
–3
–4
igure 33:
A graph of
e solution
of a
separable
equation
with initial
onditions.
–5
–2
3
2
1
0
–1
y
x
1
0
–1
–2
–3
–4
igure 32:
The
direction
field of a
separable
equation
with initial
onditions.
explicit solution
Most of the time, you can find an explicit solution from an implicit solution.
But every once in a while, getting an explicit solution is pretty tough to do.
Here’s an example:
sin
dx
dy
y
y
x
1
2 2
=
+
_
i
where y(0) = 1.
As you get down to work (bringing to bear all your differential equation skills!),
the first thing that may strike you is that this equation isn’t linear. But, you’ll
also likely note that it’s separable. So simply separate the equation into y on
the left and x on the right, which gives you this equation:
sin
y
y dy
x dx
1
2 2
+
=
_
i
This equation subsequently becomes
sin
y
dy
y dy
x dx
2
+
=
Now you can integrate to get this:
lny + y2 = –cos x + c
Next, take a look at the initial condition: y(0) = 1. Plugging that condition into
your solution gives you this equation:
0 + 1 = –1 + c
or
c = 2
So your solution to the initial separable equation is:
lny + y2 = –cos x + 2
This is an implicit solution, not an explicit solution, which would be in terms
of y = f(x). In fact, as you can see from the form of this implicit solution, get
ting an explicit solution would be no easy task.
tion field for this differential equation, which indicates what the integral curves
look like, in Figure 34.
A neat trick: Turning nonlinear separable
equations into linear separable equations
In this section, I introduce you to a neat trick that helps with some differen
tial equations. With it, you can make a linear equation out of a seemingly non
linear one. All you have to do to use this trick is to substitute the following
equation, in which v is a variable:
y = xv
In some cases, the result is a separable equation.
As an example, try solving this differential equation:
dx
dy
xy
y
x
2
3
4
4
=
+
–3
–4
–3
–2
–1
0
1
2
3
4
–2
–1
0
1
y
x
2
3
igure 34:
The
direction
field of a
separable
equation
th a hard
tofind
explicit
solution.
dx
dy
x
y
y
x
2
3
3
= +
What do you do now? Keep reading to find out.
Knowing when to substitute
You can use the trick of setting y = xv when you have a differential equation
that’s of the following form:
,
dx
dy
f x y
= _
i
when f(x, y) = f(tx, ty), where t is a constant.
You can see that substitution is possible, because substituting tx and ty into
this differential equation gives you the following result:
dx
dy
txt y
t y
t x
2
3
3
4
4
4
4
=
+
which breaks down to:
dx
dy
xy
y
x
2
3
4
4
=
+
Substituting y = xv into this differential equation gives you:
v
x dx
dv
x xv
xv
x
2
3
4
4
+
=
+
^
^
h
h
This equation now can be simplified to look like this:
x dx
dv
v
v
1
3
4
=
+
You now have a separable equation!
Separating and integrating
Continuing with the example from the previous section, you can now sepa
rate the terms, which gives you:
x
dx
v
v dv
1
4
3
=
+
ln
ln
x
v
c
4
1
=
+
+
^
_
h
i
where c is a constant of integration. Bearing in mind that, where k is a constant:
ln(x) + ln(k) = ln(kx)
and that:
n ln(x) = ln(xn)
you get:
v4 + 1 = (kx)4
where:
c = –ln(k)
Where does all this get you? You’re ready to substitute with the following:
v
x
y
=
This substitution gives you:
x
y
kx
1
4
4
+ =
d
^
n
h
So:
y4 + x4 = mx8
where m = k4. And solving for y gives you the following:
y = (mx8 – x4)1/4
And there’s your solution. Nice work!
rying Out Some Real World
eparable Equations
In the following sections, I take a look at some real world examples featuring
separable equations.
Getting in control with a sample
flow problem
To understand the relevance of differential equations in the real world, here’s
a sample problem to ponder: Say that you have a 10liter pitcher of water, and
that you’re mixing juice concentrate into the pitcher at the same time that
you’re pouring juice out. If the concentrate going into the pitcher has 1⁄4 kg of
sugar per liter, the rate at which the concentrate is going into the pitcher,
which I’ll call rin, is 1⁄100 liter per second, and the juice in the pitcher starts off
with 4 kg of sugar, find the amount of sugar in the juice, Q, as a function of
time, t.
Because this problem involves a rate — dQ/dt, which is the change in the
amount of sugar in the pitcher — it’s a differential equation, not just a simple
algebraic equation. I walk you through the steps of solving the equation in
the following sections.
Determining the basic numbers
When you start trying to work out this problem, remember that the change in
the amount of sugar in the pitcher, dQ/dt, has to be the rate of sugar flow in
minus the rate of sugar flow out, or something like this:
dt
dQ
rate of sugar flow in
rate of sugar flow out
=

_
_
i
i
Now you ask: What’s the rate of sugar flow in? That’s easy; it’s just the con
centration of sugar in the juice concentrate multiplied by the rate at which
the juice concentrate is flowing into the pitcher, which I’ll call rin. So, your
equation looks something like this:
r
rate of sugar flow in
4 kg/sec
in
=
_
i
Now what about the flow of sugar out? The rate of sugar flow out is related to
the rate at which juice leaves the pitcher. So if you assume that the amount of
juice in the pitcher is constant, then rin = rout = r. That, in turn, means the rate
of the pitcher (10 liters), or Q/10. Here’s what your equation would look like:
Q
r
rate of sugar flow out
10 kg/sec
=
_
i
So that means:
dt
dQ
r
Qr
4
10
rate of sugar flow in
rate of sugar flow out
=

= 
_
_
i
i
where the initial condition is:
Q0 = 4 kg
Solving the equation
The equation at the end of the previous section is separable, and separating
the variables, each on their own side, gives you this equation:
dt
dQ Qr
r
10
4
+
=
Now that, you might say, is a linear differential in Q. And you’d be right. So you
know that the equation is both linear and separable.
You can handle this differential equation using the methods in Chapter 2. For
instance, to solve, you find an integrating factor, multiply both sides by the
integrating factor, and then see if you can figure out what product the left
side is the derivative of and integrate it. Whew! It sounds rough, but note that
the equation is of the following form:
dt
dy
ay
b
+ =
The solution to this kind of differential equation is already found in Chapter 2;
you use an integrating factor of eat. The solution to this kind of equation is:
y = (b/a) + ce–at
So you can see that the solution to the juice flow problem is:
Q(t) = 2.5 + ce–rt/10
Because r = 1⁄100 liter per second, the equation becomes:
Q(t) = 2.5 + ce–t/1000
Q0 = 4 kg
you know that:
Q = 2.5 + 1.5 e–t/1000
Note the solution as t → ∞ is 2.5 kg of sugar, and that’s what you’d expect.
Why? Because the concentrate has 1⁄4 kg of sugar per liter, and 10 liters of
water are in the pitcher. So 10/4 = 2.5 kg.
The direction field for different values of Q0 appears in Figure 35. Notice that
all the solutions tend toward the final Q of 2.5 kg of sugar, as you’d expect.
You can see a graph of this solution in Figure 36.
0
0
300
600
900
1200
1500
1800
2100
2400
2700
3000
Q
t
20
15
10
5
igure 35:
The
direction
field of a
flow
problem
solution.
Striking it rich with a sample
monetary problem
You may not have realized that differential equations can be used to solve
money problems. Well they can! And here’s a problem to prove it: Say that
you’re deciding whether to deposit your money in the bank. You can calcu
late how your money grows, dQ/dt, given the interest rate of the bank and the
amount of money, Q, that you have in the bank. As you can see, this is a job
for differential equations.
Figuring out the general solution
Suppose your bank compounds interest continuously. The rate at which your
savings, Q, grows, is:
dt
dQ
rQ
=
where r is the interest rate that your bank pays.
0
0
300
600
900
1200
1500
1800
2100
2400
2700
3000
Q
t
4
3
2
1
igure 36:
e graph of
e solution
of a flow
problem.
equation for the rate at which your money grows, not the actual amount of
money.
Say that you have Q0 money at t = 0:
Q(0) = Q0
How much money would you have at a certain time in the future? That’s easy
enough to figure out. Separate the variables, each on their own side, like this:
Q
dQ
r dt
=
Then integrate:
lnQ = rt
Finally, exponentiate both sides, which gives you the following equation:
Q = cert
To match the initial condition:
Q(0) = Q0
the solution becomes:
Q = Q0e
rt
So, in other words, your money would grow exponentially. Not bad.
Compounding interest at set intervals
Now I want you to examine the result from the previous section a little, deriv
ing it another way so that it makes more sense. If your bank compounded
interest once a year, not continuously, after t years, you’d have this much
money:
Q = Q0(1 + r)
t
That’s because if your interest was 5 percent, after the first year, you would
have 1.05Q0; at the end of the second year, 1.05
2Q0, and so on.
Q = Q0(1 + r)
2t
No, you wouldn’t. Why? Because that would pay you r percent interest twice
a year. For example, if r = 8 percent, the previous equation would pay you 8
percent of your total savings twice a year. Instead, banks divide the interest
rate they pay you by the number of times they compound per year, like this:
Q Q
r
1
2
t
0
2
=
+
c
m
In other words, if the bank compounds twice a year, and the annual interest
rate is 8 percent, six months into the year it pays you 4 percent, and at the
end of the year it pays another 4 percent.
In general, if your bank compounds interest m times a year, after t years,
you’d have:
Q Q
m
r
1
mt
0
=
+
c
m
If you take the limit as m → ∞ — that is, as your bank starts to compound
continuously — you get this equation:
lim
Q
Q
m
r
1
m
mt
0
=
+
"3
c
m
But that’s just the expansion for ert. So, as the bank compounds continuously,
you get:
lim
Q
Q
m
r
Q e
1
m
mt
r
0
0
=
+
=
"3
t
c
m
And this result confirms the answer you got from solving the differential
equation in the previous section.
So if you had $25 invested, and you left it alone at 6 percent for 60 years,
you’d have:
Q = Q0e
rt = 25e0.06(60)
or:
Q = Q0e
rt = 25e0.06(60) = $914.96
Hmm, not such a magnificent fortune.
How about if you add a set amount every year to the equation in the previous
section? That would be better, wouldn’t it? Say that you add $5,000 a year. In
that case, remember that the set amount would change the differential equa
tion for your savings, which was this:
dt
dQ
rQ
=
The equation would change to this, where k is the amount you contribute
regularly:
dt
dQ
rQ k
= +
If you deposit regularly, k > 0; if you withdraw regularly, k < 0. Ideally, you
should add or subtract k from your account continuously over the year to
make your solution exact, but here you can just assume that you add or sub
tract k once a year.
Putting this new equation into standard separable form gives you this:
dt
dQ
rQ k
 =
This equation is of the following form:
dt
dy
ay
b
+ =
The solution to this kind of equation is:
y = (b/a) + ce–at
In this case, that solution means:
Q = cert – k/r
What’s going on here? It looks like you have the solution for leaving money in
the bank without adding anything minus the amount you’ve added. Can that
be right? The answer is in c, the constant of integration. Here, the initial con
dition is:
Q(0) = Q0
which means that:
Q(0) = cer0 – k/r = c – k/r = Q0
c = Q0 + k/r
So your solution turns out to be:
Q = cert – k/r = (Q0 + k/r)e
rt – k/r
Working this out gives you:
/
/
Q Q
k r e
k r Q e
r
k e
1
rt
rt
rt
0
0
=
+
 =
+

_
_
i
i
That looks a little better! Now the first term is the amount that you’d earn if
you just left Q0 in the account, and the second term is the amount resulting
from depositing or withdrawing k dollars regularly.
For example, say you started off with $25, but then you added $5,000 every
year for 60 years. At the end of 60 years at 6 percent, you’d have:
.
,
Q Q e
r
k e
e
e
1
25
0 06
5 000
1
.
( )
.
(
)
rt
rt
0
0 06 60
0 06 60
=
+
 =
+

_
_
i
i
After calculating this out, you’d get:
.
,
$
.
$ ,
,
$ ,
,
Q
e
e
25
0 06
5 000
1
914 96
2 966 519
2 967 434
.
( )
.
(
)
0 06 60
0 06 60
=
+
 =
+
=
_
i
Quite a tidy sum.
Break It Up! Using Partial Fractions
n Separable Equations
When a term in a separable differential equation looks a little difficult to inte
grate, you can use the method of partial fractions to separate it. This method
is used to reduce the degree of the denominator of a rational expression.
For example, using the method of partial fractions, you can express:
x
x
2
8
6
2+ 
as the following equation:
x
x
x
x
2
8
6
2
1
4
1
2+ 
=


+
Differential
Equations
FOR
DUMmIES
‰
Differential
Equations
FOR
DUMmIES
‰
by Steven Holzner, PhD
Differential
Equations
FOR
DUMmIES
‰
Differential Equations For Dummies®
Published by
Wiley Publishing, Inc.
111 River St.
Hoboken, NJ 070305774
www.wiley.com
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form
or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as per
mitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate percopy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, 9787508400, fax 9786468600.
Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,
Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, 3175723447, fax 3175724355, or online at
http://www.wiley.com/go/permissions.
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the
Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com and related trade
dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United
States and other countries, and may not be used without written permission. All other trademarks are the
property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor
mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REP
RESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CON
TENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT
LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CRE
ATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CON
TAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A
COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION
OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FUR
THER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFOR
MATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE.
FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE
CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care
Department within the U.S. at 8007622974, outside the U.S. at 3175723993, or fax 3175724002.
For technical support, please visit www.wiley.com/techsupport.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may
not be available in electronic books.
Library of Congress Control Number: 2008925781
ISBN: 9780470178140
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
About the Author
Steven Holzner is an awardwinning author of science, math, and technical
books. He got his training in differential equations at MIT and at Cornell
University, where he got his PhD. He has been on the faculty at both MIT and
Cornell University, and has written such bestsellers as Physics For Dummies
and Physics Workbook For Dummies.
Dedication
To Nancy, always and forever.
Author’s Acknowledgments
The book you hold in your hands is the work of many people. I’d especially
like to thank Tracy Boggier, Georgette Beatty, Jessica Smith, technical
reviewer Jamie Song, PhD, and the folks in Composition Services who put the
book together so beautifully.
Publisher’s Acknowledgments
We’re proud of this book; please send us your comments through our Dummies online registration
form located at www.dummies.com/register/.
Some of the people who helped bring this book to market include the following:
Acquisitions, Editorial, and
Media Development
Project Editor: Georgette Beatty
Acquisitions Editor: Tracy Boggier
Copy Editor: Jessica Smith
Editorial Program Coordinator:
Erin Calligan Mooney
Technical Editor: Jamie Song, PhD
Editorial Manager: Michelle Hacker
Editorial Assistants: Joe Niesen, Leeann Harney
Cartoons: Rich Tennant
(www.the5thwave.com)
Composition Services
Project Coordinator: Erin Smith
Layout and Graphics: Carrie A. Cesavice,
Stephanie D. Jumper
Proofreaders: Caitie Kelly, Linda D. Morris
Indexer: Broccoli Information Management
Publishing and Editorial for Consumer Dummies
Diane Graves Steele, Vice President and Publisher, Consumer Dummies
Joyce Pepple, Acquisitions Director, Consumer Dummies
Kristin A. Cocks, Product Development Director, Consumer Dummies
Michael Spring, Vice President and Publisher, Travel
Kelly Regan, Editorial Director, Travel
Publishing for Technology Dummies
Andy Cummings, Vice President and Publisher, Dummies Technology/General User
Composition Services
Gerry Fahey, Vice President of Production Services
Debbie Stailey, Director of Composition Services
Contents at a Glance
Introduction .................................................................1
Part I: Focusing on First Order Differential Equations......5
Chapter 1: Welcome to the World of Differential Equations .........................................7
Chapter 2: Looking at Linear First Order Differential Equations................................23
Chapter 3: Sorting Out Separable First Order Differential Equations........................41
Chapter 4: Exploring Exact First Order Differential Equations
and Euler’s Method........................................................................................................63
Part II: Surveying Second and Higher Order
Differential Equations .................................................89
Chapter 5: Examining Second Order Linear Homogeneous
Differential Equations....................................................................................................91
Chapter 6: Studying Second Order Linear Nonhomogeneous
Differential Equations..................................................................................................123
Chapter 7: Handling Higher Order Linear Homogeneous Differential
Equations ......................................................................................................................151
Chapter 8: Taking On Higher Order Linear Nonhomogeneous
Differential Equations..................................................................................................173
Part III: The Power Stuff: Advanced Techniques ..........189
Chapter 9: Getting Serious with Power Series and Ordinary Points........................191
Chapter 10: Powering through Singular Points ..........................................................213
Chapter 11: Working with Laplace Transforms ..........................................................239
Chapter 12: Tackling Systems of First Order Linear Differential Equations ...........265
Chapter 13: Discovering Three FailProof Numerical Methods ................................293
Part IV: The Part of Tens ...........................................315
Chapter 14: Ten SuperHelpful Online Differential Equation Tutorials....................317
Chapter 15: Ten Really Cool Online Differential Equation Solving Tools ................321
Index .......................................................................325
Table of Contents
Introduction..................................................................1
About This Book...............................................................................................1
Conventions Used in This Book .....................................................................1
What You’re Not to Read.................................................................................2
Foolish Assumptions .......................................................................................2
How This Book Is Organized...........................................................................2
Part I: Focusing on First Order Differential Equations.......................3
Part II: Surveying Second and Higher Order
Differential Equations.........................................................................3
Part III: The Power Stuff: Advanced Techniques ................................3
Part IV: The Part of Tens........................................................................3
Icons Used in This Book..................................................................................4
Where to Go from Here....................................................................................4
Part I: Focusing on First Order Differential Equations ......5
Chapter 1: Welcome to the World of Differential Equations . . . . . . . . .7
The Essence of Differential Equations...........................................................8
Derivatives: The Foundation of Differential Equations .............................11
Derivatives that are constants............................................................11
Derivatives that are powers................................................................12
Derivatives involving trigonometry ...................................................12
Derivatives involving multiple functions ..........................................12
Seeing the Big Picture with Direction Fields...............................................13
Plotting a direction field ......................................................................13
Connecting slopes into an integral curve .........................................14
Recognizing the equilibrium value.....................................................16
Classifying Differential Equations ................................................................17
Classifying equations by order ...........................................................17
Classifying ordinary versus partial equations..................................17
Classifying linear versus nonlinear equations..................................18
Solving First Order Differential Equations ..................................................19
Tackling Second Order and Higher Order Differential Equations............20
Having Fun with Advanced Techniques ......................................................21
First Things First: The Basics of Solving Linear First Order
Differential Equations ................................................................................24
Applying initial conditions from the start.........................................24
Stepping up to solving differential
equations involving functions.........................................................25
Adding a couple of constants to the mix...........................................26
Solving Linear First Order Differential Equations
with Integrating Factors ............................................................................26
Solving for an integrating factor.........................................................27
Using an integrating factor to solve a differential equation ...........28
Moving on up: Using integrating factors in differential
equations with functions .................................................................29
Trying a special shortcut ....................................................................30
Solving an advanced example.............................................................32
Determining Whether a Solution for a Linear First Order
Equation Exists ...........................................................................................35
Spelling out the existence and uniqueness theorem
for linear differential equations ......................................................35
Finding the general solution ...............................................................36
Checking out some existence and uniqueness examples ...............37
Figuring Out Whether a Solution for a Nonlinear
Differential Equation Exists.......................................................................38
The existence and uniqueness theorem for
nonlinear differential equations......................................................39
A couple of nonlinear existence and uniqueness examples ...........39
Chapter 3: Sorting Out Separable First Order
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41
Beginning with the Basics of Separable Differential Equations ...............42
Starting easy: Linear separable equations ........................................43
Introducing implicit solutions ............................................................43
Finding explicit solutions from implicit solutions ...........................45
Tough to crack: When you can’t find an explicit solution ..............48
A neat trick: Turning nonlinear separable equations into
linear separable equations ..............................................................49
Trying Out Some Real World Separable Equations....................................52
Getting in control with a sample flow problem ................................52
Striking it rich with a sample monetary problem ............................55
Break It Up! Using Partial Fractions in Separable Equations....................59
Equations and Euler’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
Exploring the Basics of Exact Differential Equations ................................63
Defining exact differential equations .................................................64
Working out a typical exact differential equation ............................65
Determining Whether a Differential Equation Is Exact..............................66
Checking out a useful theorem...........................................................66
Applying the theorem ..........................................................................67
Conquering Nonexact Differential Equations
with Integrating Factors ............................................................................70
Finding an integrating factor...............................................................71
Using an integrating factor to get an exact equation.......................73
The finishing touch: Solving the exact equation ..............................74
Getting Numerical with Euler’s Method ......................................................75
Understanding the method .................................................................76
Checking the method’s accuracy on a computer.............................77
Delving into Difference Equations................................................................83
Some handy terminology ....................................................................84
Iterative solutions ................................................................................84
Equilibrium solutions ..........................................................................85
Part II: Surveying Second and Higher Order
Differential Equations..................................................89
Chapter 5: Examining Second Order Linear
Homogeneous Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . .91
The Basics of Second Order Differential Equations...................................91
Linear equations...................................................................................92
Homogeneous equations.....................................................................93
Second Order Linear Homogeneous Equations
with Constant Coefficients ........................................................................94
Elementary solutions ...........................................................................94
Initial conditions...................................................................................95
Checking Out Characteristic Equations ......................................................96
Real and distinct roots.........................................................................97
Complex roots.....................................................................................100
Identical real roots .............................................................................106
Getting a Second Solution by Reduction of Order ...................................109
Seeing how reduction of order works..............................................110
Trying out an example .......................................................................111
Linear independence .........................................................................115
The Wronskian....................................................................................117
Chapter 6: Studying Second Order Linear Nonhomogeneous
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
The General Solution of Second Order Linear
Nonhomogeneous Equations ..................................................................124
Understanding an important theorem.............................................124
Putting the theorem to work.............................................................125
Finding Particular Solutions with the Method of
Undetermined Coefficients......................................................................127
When g(x) is in the form of erx ..........................................................127
When g(x) is a polynomial of order n ..............................................128
When g(x) is a combination of sines and cosines ..........................131
When g(x) is a product of two different forms ...............................133
Breaking Down Equations with the Variation of Parameters Method ....135
Nailing down the basics of the method...........................................136
Solving a typical example..................................................................137
Applying the method to any linear equation..................................138
What a pair! The variation of parameters method
meets the Wronskian......................................................................142
Bouncing Around with Springs ’n’ Things ................................................143
A mass without friction .....................................................................144
A mass with drag force ......................................................................148
Chapter 7: Handling Higher Order Linear Homogeneous
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
The Write Stuff: The Notation of Higher Order
Differential Equations ..............................................................................152
Introducing the Basics of Higher Order Linear
Homogeneous Equations.........................................................................153
The format, solutions, and initial conditions .................................153
A couple of cool theorems ................................................................155
Tackling Different Types of Higher Order Linear
Homogeneous Equations.........................................................................156
Real and distinct roots.......................................................................156
Real and imaginary roots ..................................................................161
Complex roots.....................................................................................164
Duplicate roots ...................................................................................166
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
Mastering the Method of Undetermined Coefficients
for Higher Order Equations.....................................................................174
When g(x) is in the form erx ...............................................................176
When g(x) is a polynomial of order n ..............................................179
When g(x) is a combination of sines and cosines ..........................182
Solving Higher Order Equations with Variation of Parameters..............185
The basics of the method..................................................................185
Working through an example............................................................186
Part III: The Power Stuff: Advanced Techniques...........189
Chapter 9: Getting Serious with Power Series
and Ordinary Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Perusing the Basics of Power Series..........................................................191
Determining Whether a Power Series Converges
with the Ratio Test ...................................................................................192
The fundamentals of the ratio test...................................................192
Plugging in some numbers ................................................................193
Shifting the Series Index..............................................................................195
Taking a Look at the Taylor Series .............................................................195
Solving Second Order Differential Equations with Power Series ...........196
When you already know the solution ..............................................198
When you don’t know the solution beforehand.............................204
A famous problem: Airy’s equation..................................................207
Chapter 10: Powering through Singular Points . . . . . . . . . . . . . . . . . .213
Pointing Out the Basics of Singular Points ...............................................213
Finding singular points ......................................................................214
The behavior of singular points .......................................................214
Regular versus irregular singular points.........................................215
Exploring Exciting Euler Equations ...........................................................219
Real and distinct roots.......................................................................220
Real and equal roots ..........................................................................222
Complex roots.....................................................................................223
Putting it all together with a theorem..............................................224
Figuring Series Solutions Near Regular Singular Points..........................225
Identifying the general solution........................................................225
The basics of solving equations near singular points ...................227
A numerical example of solving an equation
near singular points........................................................................230
Taking a closer look at indicial equations.......................................235
Breaking Down a Typical Laplace Transform...........................................239
Deciding Whether a Laplace Transform Converges ................................240
Calculating Basic Laplace Transforms ......................................................241
The transform of 1..............................................................................242
The transform of eat............................................................................242
The transform of sin at ......................................................................242
Consulting a handy table for some relief ........................................244
Solving Differential Equations with Laplace Transforms........................245
A few theorems to send you on your way.......................................246
Solving a second order homogeneous equation ............................247
Solving a second order nonhomogeneous equation .....................251
Solving a higher order equation .......................................................255
Factoring Laplace Transforms and Convolution Integrals .....................258
Factoring a Laplace transform into fractions .................................258
Checking out convolution integrals .................................................259
Surveying Step Functions............................................................................261
Defining the step function .................................................................261
Figuring the Laplace transform of the step function .....................262
Chapter 12: Tackling Systems of First Order Linear
Differential Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
Introducing the Basics of Matrices ............................................................266
Setting up a matrix .............................................................................266
Working through the algebra ............................................................267
Examining matrices............................................................................268
Mastering Matrix Operations......................................................................269
Equality................................................................................................269
Addition ...............................................................................................270
Subtraction..........................................................................................270
Multiplication of a matrix and a number.........................................270
Multiplication of two matrices..........................................................270
Multiplication of a matrix and a vector ...........................................271
Identity.................................................................................................272
The inverse of a matrix......................................................................272
Having Fun with Eigenvectors ’n’ Things..................................................278
Linear independence .........................................................................278
Eigenvalues and eigenvectors ..........................................................281
Solving Systems of FirstOrder Linear Homogeneous
Differential Equations ..............................................................................283
Understanding the basics..................................................................284
Making your way through an example ............................................285
Solving Systems of First Order Linear Nonhomogeneous Equations .....288
Assuming the correct form of the particular solution...................289
Crunching the numbers.....................................................................290
Winding up your work .......................................................................292
Number Crunching with Euler’s Method ..................................................294
The fundamentals of the method .....................................................294
Using code to see the method in action..........................................295
Moving On Up with the Improved Euler’s Method ..................................299
Understanding the improvements ...................................................300
Coming up with new code.................................................................300
Plugging a steep slope into the new code.......................................304
Adding Even More Precision with the RungeKutta Method ..................308
The method’s recurrence relation....................................................308
Working with the method in code ....................................................309
Part IV: The Part of Tens............................................315
Chapter 14: Ten SuperHelpful Online Differential
Equation Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317
AnalyzeMath.com’s Introduction to Differential Equations ...................317
Harvey Mudd College Mathematics Online Tutorial ...............................318
John Appleby’s Introduction to Differential Equations...........................318
Kardi Teknomo’s Page .................................................................................318
Martin J. Osborne’s Differential Equation Tutorial..................................318
Midnight Tutor’s Video Tutorial.................................................................319
The Ohio State University Physics Department’s
Introduction to Differential Equations...................................................319
Paul’s Online Math Notes ............................................................................319
S.O.S. Math ....................................................................................................319
University of Surrey Tutorial ......................................................................320
Chapter 15: Ten Really Cool Online Differential
Equation Solving Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
AnalyzeMath.com’s RungeKutta Method Applet ....................................321
Coolmath.com’s Graphing Calculator .......................................................321
Direction Field Plotter .................................................................................322
An Equation Solver from QuickMath Automatic Math Solutions...........322
First Order Differential Equation Solver....................................................322
GCalc Online Graphing Calculator .............................................................322
JavaView Ode Solver....................................................................................323
Math @ CowPi’s System Solver...................................................................323
A Matrix Inverter from QuickMath Automatic Math Solutions ..............323
Visual Differential Equation Solving Applet ..............................................323
Index........................................................................325
Introduction
For too many people who study differential equations, their only exposure
to this amazingly rich and rewarding field of mathematics is through a
textbook that lands with an 800page whump on their desk. And what follows
is a weary struggle as the reader tries to scale the impenetrable fortress of
the massive tome.
Has no one ever thought to write a book on differential equations from the
reader’s point of view? Yes indeed — that’s where this book comes in.
About This Book
Differential Equations For Dummies is all about differential equations from
your point of view. I’ve watched many people struggle with differential equa
tions the standard way, and most of them share one common feeling:
Confusion as to what they did to deserve such torture.
This book is different; rather than being written from the professor’s point
of view, it has been written from the reader’s point of view. This book was
designed to be crammed full of the good stuff, and only the good stuff. No
extra filler has been added; and that means the issues aren’t clouded. In this
book, you discover ways that professors and instructors make solving prob
lems simple.
You can leaf through this book as you like. In other words, it isn’t important
that you read it from beginning to end. Like other For Dummies books, this one
has been designed to let you skip around as much as possible — this is your
book, and now differential equations are your oyster.
Conventions Used in This Book
Some books have a dozen confusing conventions that you need to know
before you can even start reading. Not this one. Here are the few simple con
ventions that I include to help you navigate this book:
Boldfaced text highlights important theorems, matrices (arrays of num
bers), keywords in bulleted lists, and actions to take in numbered steps.
Monofont points out Web addresses.
When this book was printed, some Web addresses may have needed to break
across two lines of text. If that happens, rest assured that I haven’t put in any
extra characters (such as hyphens) to indicate the break. So when using one
of these Web addresses, type in exactly what you see in this book, pretending
as though the line break doesn’t exist.
What You’re Not to Read
Throughout this book, I share bits of information that may be interesting to
you but not crucial to your understanding of an aspect of differential equa
tions. You’ll see this information either placed in a sidebar (a shaded gray
box) or marked with a Technical Stuff icon. I won’t be offended if you skip
any of this text — really!
oolish Assumptions
This book assumes that you have no experience solving differential equations.
Maybe you’re a college student freshly enrolled in a class on differential equa
tions, and you need a little extra help wrapping your brain around them. Or
perhaps you’re a student studying physics, chemistry, biology, economics,
or engineering, and you quickly need to get a handle on differential equations
to better understand your subject area.
Any study of differential equations takes as its starting point a knowledge of
calculus. So I wrote this book with the assumption in mind that you know
how to take basic derivatives and how to integrate. If you’re totally at sea
with these tasks, pick up a copy of Calculus For Dummies by Mark Ryan
(Wiley) before you pick up this book.
How This Book Is Organized
The world of differential equations is, well, big. And to handle it, I break that
world down into different parts. Here are the various parts you see in this book.
Differential Equations
I start this book with first order differential equations — that is, differential
equations that involve derivatives to the first power. You see how to work
with linear first order differential equations (linear means that the derivatives
aren’t squared, cubed, or anything like that). You also discover how to work
with separable first order differential equations, which can be separated so
that only terms in y appear on one side, and only terms in x (and constants)
appear on the other. And, finally, in this part, you figure out how to handle
exact differential equations. With this type of equation you try to find a func
tion whose partial derivatives correspond to the terms in a differential equa
tion (which makes solving the equation much easier).
Part II: Surveying Second and Higher
Order Differential Equations
In this part, I take things to a whole new level as I show you how to deal with
second order and higher order differential equations. I divide equations into
two main types: linear homogeneous equations and linear nonhomogeneous
equations. You also find out that a whole new array of dazzling techniques
can be used here, such as the method of undetermined coefficients and the
method of variation of parameters.
Part III: The Power Stuff: Advanced
Techniques
Some differential equations are tougher than others, and in this part, I bring
out the big guns. You see heavyduty techniques like Laplace transforms and
series solutions, and you start working with systems of differential equations.
You also figure out how to use numerical methods to solve differential equa
tions. These are methods of last resort, but they rarely fail.
Part IV: The Part of Tens
You see the Part of Tens in all For Dummies books. This part is made up of
fastpaced lists of ten items each; in this book, you find ten online differential
equation tutorials and ten top online tools for solving differential equations.
cons Used in This Book
You can find several icons in the margins of this book, and here’s what they
mean:
This icon marks something to remember, such as a law of differential equa
tions or a particularly juicy equation.
The text next to this icon is technical, insider stuff. You don’t have to read it
if you don’t want to, but if you want to become a differential equations pro
(and who doesn’t?), take a look.
This icon alerts you to helpful hints in solving differential equations. If you’re
looking for shortcuts, search for this icon.
When you see this icon, watch out! It indicates something particularly tough
to keep an eye out for.
Where to Go from Here
You’re ready to jump into Chapter 1. However, you don’t have to start there if
you don’t want to; you can jump in anywhere you like — this book was writ
ten to allow you to do just that. But if you want to get the full story on differ
ential equations from the beginning, jump into Chapter 1 first — that’s where
all the action starts.
Focusing on First
Order Differential
Equations
In this part . . .
In this part, I welcome you to the world of differential
equations and start you off easy with linear first order
differential equations. With first order equations, you
have first order derivatives that are raised to the first
power, not squared or raised to any higher power. I also
show you how to work with separable first order differen
tial equations, which are those equations that can be sep
arated so that terms in y appear on one side and terms in
x (and constants) appear on the other. Finally, I introduce
exact differential equations and Euler’s method.
Welcome to the World of
Differential Equations
This Chapter
Breaking into the basics of differential equations
Getting the scoop on derivatives
Checking out direction fields
Putting differential equations into different categories
Distinguishing among different orders of differential equations
Surveying some advanced methods
It’s a tense moment in the physics lab. The international team of high
powered physicists has attached a weight to a spring, and the weight is
bouncing up and down.
“What’s happening?” the physicists cry. “We have to understand this in terms
of math! We need a formula to describe the motion of the weight!”
You, the renowned Differential Equations Expert, enter the conversation
calmly. “No problem,” you say. “I can derive a formula for you that will
describe the motion you’re seeing. But it’s going to cost you.”
The physicists look worried. “How much?” they ask, checking their grants
and funding sources. You tell them.
“Okay, anything,” they cry. “Just give us a formula.”
You take out your clipboard and start writing.
“What’s that?” one of the physicists asks, pointing at your calculations.
math at lightning speed.
“I’ve got it,” you announce. “Your formula is y = 10 sin (5t), where y is the
weight’s vertical position, and t is time, measured in seconds.”
“Wow,” the physicists cry, “all that just from solving a differential equation?”
“Yep,” you say, “now pay up.”
Well, you’re probably not a renowned differential equations expert — not yet,
at least! But with the help of this book, you very well may become one. In this
chapter, I give you the basics to get started with differential equations, such
as derivatives, direction fields, and equation classifications.
he Essence of Differential Equations
In essence, differential equations involve derivatives, which specify how a
quantity changes; by solving the differential equation, you get a formula for
the quantity itself that doesn’t involve derivatives.
Because derivatives are essential to differential equations, I take the time in
the next section to get you up to speed on them. (If you’re already an expert
on derivatives, feel free to skip the next section.) In this section, however,
I take a look at a qualitative example, just to get things started in an easily
digestible way.
Say that you’re a longtime shopper at your local grocery store, and you’ve
noticed prices have been increasing with time. Here’s the table you’ve been
writing down, tracking the price of a jar of peanut butter:
Month
Price
1
$2.40
2
$2.50
3
$2.60
4
$2.70
5
$2.80
6
$2.90
peanut butter going to be a year from now?
You know that the slope of a line is ∆y/∆x (that is, the change in y divided by
the change in x). Here, you use the symbols ∆p for the change in price and ∆t
for the change in time. So the slope of the line in Figure 11 is ∆p/∆t.
Because the price of peanut butter is going up 10 cents every month, you
know that the slope of the line in Figure 11 is:
t
p
∆
∆
= 10¢/month
The slope of a line is a constant, indicating its rate of change. The derivative
of a quantity also gives its rate of change at any one point, so you can think of
the derivative as the slope at a particular point. Because the rate of change of
a line is constant, you can write:
dt
dp
t
p
∆
∆
=
= 10¢/month
In this case, dp/dt is the derivative of the price of peanut butter with respect
to time. (When you see the d symbol, you know it’s a derivative.)
And so you get this differential equation:
dt
dp
= 10¢/month
1
2
3
4
Time
Price5
6
2.40
2.50
2.60
2.70
2.80
2.90
igure 11:
e price of
peanut
butter by
month.
tion, and you can solve for price as a function of time like this:
p = 10t + c
In this equation, p is price (measured in cents), t is time (measured in months),
and c is an arbitrary constant that you use to match the initial conditions of
the problem. (You need a constant, c, because when you take the derivative of
10t + c, you just get 10, so you can’t tell whether there’s a constant that should
be added to 10t — matching the initial conditions will tell you.)
The missing link is the value of c, so just plug in the numbers you have for
price and time to solve for it. For example, the cost of peanut butter in month 1
is $2.40, so you can solve for c by plugging in 1 for t and $2.40 for p (240 cents),
giving you:
240 = 10 + c
By solving this equation, you calculate that c = 230, so the solution to your
differential equation is:
p = 10t + 230
And that’s your solution — that’s the price of peanut butter by month. You
started with a differential equation, which gave the rate of change in the price
of peanut butter, and then you solved that differential equation to get the
price as a function of time, p = 10t + 230.
Want to see the solution to your differential equation in action? Go for it! Find
out what the price of peanut butter is going to be in month 12. Now that you
have your equation, it’s easy enough to figure out:
p = 10t + 230
10(12) + 230 = 350
As you can see, in month 12, peanut butter is going to cost a steep $3.50,
which you were able to figure out because you knew the rate at which the
price was increasing. This is how any typical differential equation may work:
You have a differential equation for the rate at which some quantity changes
(in this case, price), and then you solve the differential equation to get
another equation, which in this case related price to time.
Note that when you substitute the solution (p = 10t + 230) into the differential
equation, dp/dt indeed gives you 10 cents per month, as it should.
Derivatives: The Foundation of
Differential Equations
As I mention in the previous section, a derivative simply specifies the rate at
which a quantity changes. In math terms, the derivative of a function f(x),
which is depicted as df(x)/dx, or more commonly in this book, as f'(x), indi
cates how f(x) is changing at any value of x. The function f(x) has to be con
tinuous at a particular point for the derivative to exist at that point.
Take a closer look at this concept. The amount f(x) changes in a small distance
along the x axis ∆x is:
f(x + ∆x) – f(x)
The rate at which f(x) changes over the change ∆x is:
x
f x
x
f x
∆
∆
+

^
^
h
h
So far so good. Now to get the derivative dy/dx, where y = f(x), you must let
∆x get very small, approaching zero. You can do that with a limiting expres
sion, which you can evaluate as ∆x goes to zero. In this case, the limiting
expression is:
∆
lim
dx
dy
x
f x
x
f x
∆
∆
x
0
=
+

"
^
^
h
h
In other words, the derivative of f(x) is the amount f(x) changes in ∆x, divided
by ∆x, as ∆x goes to zero.
I take a look at some common derivatives in the following sections; you’ll see
these derivatives throughout this book.
Derivatives that are constants
The first type of derivative you’ll encounter is when f(x) equals a constant, c.
If f(x) = c, then f(x + ∆x) = c also, and f(x + ∆x) – f(x) = 0 (because all these
amounts are actually the same), so df(x)/dx = 0. Therefore:
f x
c
dx
df x
0
=
=
^
^
h
h
So f(x + ∆x) – f(x) = c ∆x and (f(x + ∆x) – f(x))/∆x = c. Therefore:
f x
cx
dx
df x
c
=
=
^
^
h
h
Derivatives that are powers
Another type of derivative that pops up is one that includes raising x to the
power n. Derivatives with powers work like this:
f x
x
dx
df x
n x
n
n 1
=
=

^
^
h
h
Raising e to a certain power is always popular when working with differential
equations (e is the natural logarithm base, e = 2.7128 . . ., and a is a constant):
f x
e
dx
df x
a e
ax
ax
=
=
^
^
h
h
And there’s also the inverse of ea, which is the natural log, which works like
this:
ln
f x
x
dx
df x
x
1
=
=
^
^
^
h
h
h
Derivatives involving trigonometry
Now for some trigonometry, starting with the derivative of sin(x):
sin
cos
f x
x
dx
df x
x
=
=
^
^
^
^
h
h
h
h
And here’s the derivative of cos(x):
cos
sin
f x
x
dx
df x
x
=
= 
^
^
^
^
h
h
h
h
Derivatives involving multiple functions
The derivative of the sum (or difference) of two functions is equal to the sum
(or difference) of the derivatives of the functions (that’s easy enough to
remember!):
f x
a x
b x
dx
df x
dx
d a x
dx
d b x
!
!
=
=
^
^
^
^
^
^
h
h
h
h
h
h
tive of the first. For example:
f x
a x b x
dx
df x
a x
dx
d b x
b x
dx
d a x
=
=
+
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
How about the derivative of the quotient of two functions? That derivative is
equal to the function in the denominator times the derivative of the function
in the numerator, minus the function in the numerator times the derivative
of the function in the denominator, all divided by the square of the function
in the denominator:
f x
b x
a x
dx
df x
b x
b x
dx
d a x
a x
dx
d b x
2
=
=

^
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
h
eeing the Big Picture
with Direction Fields
It’s all too easy to get caught in the math details of a differential equation,
thereby losing any idea of the bigger picture. One useful tool for getting an
overview of differential equations is a direction field, which I discuss in more
detail in Chapter 2. Direction fields are great for getting a handle on differen
tial equations of the following form:
,
dx
dy
f x y
= _
i
The previous equation gives the slope of the equation y = f(x) at any point x. A
direction field can help you visualize such an equation without actually having
to solve for the solution. That field is a twodimensional graph consisting of
many, sometimes hundreds, of short line segments, showing the slope — that
is, the value of the derivative — at multiple points. In the following sections,
I walk you through the process of plotting and understanding direction fields.
Plotting a direction field
Here’s an example to give you an idea of what a direction field looks like.
A body falling through air experiences this force:
F = mg – γ v
γ is the drag coefficient (which adds the effect of air friction and is measured
in newtons sec/meter), and v is the speed of the object as it plummets
through the air.
If you’re familiar with physics, consider Newton’s second law. It says that
F = ma, where F is the net force acting on an object, m is its mass, and a is its
acceleration. But the object’s acceleration is also dv/dt, the derivative of the
object’s speed with respect to time (that is, the rate of change of the object’s
speed). Putting all this together gives you:
F ma m dt
dv mg
v
=
=
=
 c
Now you’re back in differential equation territory, with this differential equa
tion for speed as a function of time:
dt
dv
g m v
= 
c
Now you can get specific by plugging in some numbers. The acceleration due
to gravity, g, is 9.8 meters/sec2 near the Earth’s surface, and let’s say that the
drag coefficient is 1.0 newtons sec/meter and the object has a mass of 4.0 kilo
grams. Here’s what you’d get:
.
dt
dv
v
9 8
4
=

To get a handle on this equation without attempting to solve it, you can plot
it as a direction field. To do so you create a twodimensional plot and add
dozens of short line segments that give the slope at those locations (you can
do this by hand or with software). The direction field for this equation
appears in Figure 12. As you can see in the figure, there are dozens of short
lines in the graph, each of which give the slope of the solution at that point.
The vertical axis is v, and the horizontal axis is t.
Because the slope of the solution function at any one point doesn’t depend
on t, the slopes along any horizontal line are the same.
Connecting slopes into an integral curve
You can get a visual handle on what’s happening with the solutions to a dif
ferential equation by looking at its direction field. How? All those slanted line
segments give you the solutions of the differential equations — all you have
to do is draw lines connecting the slopes. One such solution appears in
Figure 13. A solution like the one in the figure is called an integral curve of
the differential equation.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
50
igure 13:
olution in
direction
field.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
igure 12:
direction
field.
As you can see from Figure 13, there are many solutions to the equation that
you’re trying to solve. As it happens, the actual solution to that differential
equation is:
v = 39.2 + ce–t/4
In the previous solution, c is an arbitrary constant that can take any value.
That means there are an infinite number of solutions to the differential
equation.
But you don’t have to know that solution to determine what the solutions
behave like. You can tell just by looking at the direction field that all solutions
tend toward a particular value, called the equilibrium value. For instance, you
can see from the direction field graph in Figure 13 that the equilibrium value
is 39.2. You also can see that equilibrium value in Figure 14.
20
1
2
3
4
5
6
7
8
9
10
25
30
35
40
v
t
45
50
igure 14:
An
quilibrium
value in a
direction
field.
Classifying Differential Equations
Tons of differential equations exist in Math and Science Land, and the way
you tackle them differs by type. As a result, there are several classifications
that you can put differential equations into. I explain them in the following
sections.
Classifying equations by order
The most common classification of differential equations is based on order.
The order of a differential equation simply is the order of its highest deriva
tive. For example, check out the following, which is a first order differential
equation:
dx
dy
x
5
=
Here’s an example of a second order differential equation:
dx
d y
dx
dy
x
19
4
2
2
+
=
+
And so on, up to order n:
. . .
dx
d y
dx
d
y
dx
d y
dx
dy
x
9
16
14
12
19
4
0
n
n
n
n
1
1
2
2

+
+
+

+ =


As you might imagine, first order differential equations are usually the most
easily managed, followed by second order equations, and so on. I discuss
first order, second order, and higher order differential equations in a bit more
detail later in this chapter.
Classifying ordinary versus
partial equations
You can also classify differential equations as ordinary or partial. This classifi
cation depends on whether you have only ordinary derivatives involved or
only partial derivatives.
of an ordinary differential equation, relating the charge Q(t) in a circuit to the
electromotive force E(t) (that is, the voltage source connected to the circuit):
L
dt
d Q
R dt
dQ
C Q E t
1
2
2
+
+
=
^ h
Here, Q is the charge, L is the inductance of the circuit, C is the capacitance
of the circuit, and E(t) is the electromotive force (voltage) applied to the cir
cuit. This is an ordinary differential equation because only ordinary deriva
tives appear.
On the other hand, partial derivatives are taken with respect to only one vari
able, although the function depends on two or more. Here’s an example of a
partial differential equation (note the squiggly d’s):
,
,
x
u x t
t
u x t
α 2
2
2
2
2
2
2
=
_
_
i
i
In this heat conduction equation, α is a physical constant of the system that
you’re trying to track the heat flow of, and u(x, t) is the actual heat.
Note that u(x, t) depends on both x and t and that both derivatives are partial
derivatives — that is, the derivatives are taken with respect to one or the
other of x or t, but not both.
In this book, I focus on ordinary differential equations, because partial differ
ential equations are usually the subject of more advanced texts. Never fear
though: I promise to get you your fair share of partial differential equations.
Classifying linear versus
nonlinear equations
Another way that you can classify differential equations is as linear or non
linear. You call a differential equation linear if it exclusively involves linear
terms (that is, terms to the power 1) of y, y', y", and beyond to y(n). For exam
ple, this equation is a linear differential equation:
L
dt
d Q
R dt
dQ
C Q E t
1
2
2
+
+
=
^ h
clear:
LQ" RQ C Q E t
1
+
+
=
l
^ h
On the other hand, nonlinear differential equations involve nonlinear terms in
any of y, y', y", up to y(n). The following equation, which describes the angle of
a pendulum, is a nonlinear differential equation that involves the term sin θ
(not just θ):
sin
dt
d
L
g
θ
θ
0
2
2
+
=
Handling nonlinear differential equations is generally more difficult than han
dling linear equations. After all, it’s often tough enough to solve linear differ
ential equations without messing things up by adding higher powers and
other nonlinear terms. For that reason, you’ll often see scientists cheat when
it comes to nonlinear equations. Usually they make an approximation that
reduces the nonlinear equation to a linear one.
For example, when it comes to pendulums, you can say that for small angles,
sin θ ≈ θ. This means that the following equation is the standard form of the
pendulum equation that you’ll find in physics textbooks:
dt
d
L
g
θ
θ
0
2
2
+
=
As you can see, this equation is a linear differential equation, and as such,
it’s much more manageable. Yes, it’s a cheat to use only small angles so that
sin θ ≈ θ, but unless you cheat like that, you’ll sometimes be reduced to using
numerical calculations on a computer to solve nonlinear differential equa
tions; obviously these calculations work, but it’s much less satisfying than
cracking the equation yourself (if you’re a math geek like me).
olving First Order Differential Equations
Chapters 2, 3, and 4 take a look at differential equations of the form f'(x) =
f(x, y); these equations are known as first order differential equations
because the derivative involved is of first order (for more on these types
of equations, see the earlier section “Classifying equations by order.”
tions in Chapters 2, 3, and 4. The following are some examples of what you
can look forward to:
As you know, first order differential equations look like this: f'(x) = f(x, y).
In the upcoming chapters, I show you how to deal with the case where
f(x, y) is linear in x — for example, f'(x) = 5x — and then nonlinear in x,
as in f'(x) = 5x2.
You find out how to work with separable equations, where you can
factor out all the terms having to do with y on one side of the equation
and all the terms having to do with x on the other.
I also help you solve first order differential equations in cool ways, such
as by finding integrating factors to make more difficult problems simple.
Direction fields, which I discuss earlier in this chapter, work only for equa
tions of the type f'(x) = f(x, y) — that is, where only the first derivative is
involved — because the first derivative of f(x) gives you the slope of f(x) at
any point (and, of course, connecting the slope line segments is what direc
tion fields are all about).
ackling Second Order and Higher Order
Differential Equations
As noted in the earlier section “Classifying equations by order,” second order
differential equations involve only the second derivative, d2y/dx2, also known
as y". In many physics situations, second order differential equations are
where the action is.
For example, you can handle physics situations such as masses on springs or
the electrical oscillations of inductorcapacitor circuits with a differential
equation like this:
y" – ay = 0
In Part II, I show you how to tackle second order differential equations with a
large arsenal of tools, such as the Wronskian matrix determinant, which will tell
you if there are solutions to a second (or higher) order differential equation.
Other tools I introduce you to include the method of undetermined coefficients
and the method of variation of parameters.
equations, which I also cover in Part II. With these highend equations, you
find terms like dny/dxn, where n > 2.
The derivative dny/dxn is also written as y(n). Using the standard syntax, deriv
atives are written as y', y", y''', yiv, yv, and so on. In general, the nth derivative
of y is written as y(n).
Higher order differential equations can be tough; many of them don’t have
solutions at all. But don’t worry, because to help you solve them I bring to
bear the wisdom of more than 300 years of mathematicians.
Having Fun with Advanced Techniques
You discover dozens of tools in Part III of this book; all of these tools have been
developed and proved powerful over the years. Laplace Transforms, Euler’s
method, integrating factors, numerical methods — they’re all in this book.
These tools are what this book is all about — applying the knowledge of hun
dreds of years of solving differential equations. As you may know, differential
equations can be broken down by type, and there’s always a set of tools devel
oped that allows you to work with whatever type of equation you come up
with. In this book, you’ll find a great many powerful tools that are just waiting
to solve all of your differential equations — from the simplest to the seemingly
impossible!
Looking at Linear First Order
Differential Equations
This Chapter
Beginning with the basics of solving linear first order differential equations
Using integrating factors
Determining whether solutions exist for linear and nonlinear equations
As you find out in Chapter 1, a first order differential equation simply has
a derivative of the first order. Here’s what a typical first order differen
tial equation looks like, where f(t, y) is a function of the variables t and y (of
course, you can use any variables here, such as x and y or u and v, not just t
and y):
,
dt
dy
f t y
= _
i
In this chapter, you work with linear first order differential equations — that
is, differential equations where the highest power of y is 1 (you can find out
the difference between linear and nonlinear equations in Chapter 1). For
example:
dt
dy
5
=
dt
dt
y
1
= +
dt
dt
y
3
1
= +
I provide some general information on nonlinear differential equations at the
end of the chapter for comparison.
irst Things First: The Basics of Solving
inear First Order Differential Equations
In the following sections, I take a look at how to handle linear first order dif
ferential equations in general. Get ready to find out about initial conditions,
solving equations that involve functions, and constants.
Applying initial conditions from the start
When you’re given a differential equation of the form dy/dt = f(t, y), your goal
is to find a function, y(t), that solves it. You may start by integrating the equa
tion to come up with a solution that includes a constant, and then you apply
an initial condition to customize the solution. Applying the initial condition
allows you to select one solution among the infinite number that result from
the integration. Sounds cool, doesn’t it?
Take a look at this simple linear first order differential equation:
dt
dy
a
=
As you can see, a is just a regular old number, meaning that this is a simple
example to start with and to introduce the idea of initial conditions. How can
you solve it? First of all, you may have noticed that another way of writing
this equation is:
dy = a dt
This equation looks promising. Why? Well, because now you can integrate
like this:
dy
a dt
x
t
y
y
0
0
= #
#
Performing the integration gives you the following equation:
y – y0 = at – at0
You can combine y0 – at0 into a new constant, c, by adding y0 to the right side
of the equation, which gives you:
y = at + c
So, for example, if a = 3 in the differential equation, here’s the equation you
would have:
dt
dy
3
=
The solution for this equation is y = 3t + c.
Note that c, the result of integrating, can be any value, which leads to an infi
nite set of solutions: y = 3t + 5, y = 3t + 6, y = 3t + 589,303,202. How do you track
down the value of c that works for you? Well, it all depends on your initial con
ditions; for example, you may specify that the value of y at t = 0 be 15. Setting
this initial condition allows you to state the whole problem — differential
equation and initial condition — as follows:
dt
dy
3
=
y(0) = 15
Substituting the initial condition, y(0) = 15, into the solution y = 3t + c gives
you the following equation:
y(t) = 3t + 15
Stepping up to solving differential
equations involving functions
Of course, dy/dt = 3 (the example from the previous section) isn’t the most
exciting differential equation. However, it does show you how to solve a dif
ferential equation using integration and how to apply an initial condition. The
next step is to solve linear differential equations that involve functions of t
rather than just a simple number.
This type of differential equation still contains only dy/dt and terms of t,
making it easy to integrate. Here’s the basic form:
dt
dy
g t
= ^ h
where g(t) is some function of t.
Here’s an example of this type of differential equation:
dt
dy
t
t
t
3
3
2
=  +
dy = t3 dt – 3t2 dt + t dt
Then you can integrate to get this equation:
y
t
t
t
c
4
2
4
3
2
=  + +
Adding a couple of constants to the mix
The next step up from equations such as dy/dx = a or dy/dt = g(t) are equa
tions of the following form, which involve y, dy/dt, and the constants a and b:
dt
dy
ay
b
= 
How do you handle this equation and find a solution? Using some handy alge
bra, you can rewrite the equation like this:
/
/
y
b a
dy dt
a

=
_
i
Integrating both sides gives you the following equation:
ln  y – (b/a)  = at + c
where c is an arbitrary constant. Now get y out of the natural logarithm,
which gives you:
y = (b/a) + deat
where d = ec. And that’s it! You’re done. Good job!
olving Linear First Order Differential
quations with Integrating Factors
Sometimes integrating linear first order differential equations isn’t as easy as
it is in the examples earlier in this chapter. But it turns out that you can often
convert general equations into something that’s easy to integrate if you find
an integrating factor, which is a function, µ(t). The idea here is to multiply the
differential equation by an integrating factor so that the resulting equation
can easily be integrated and solved.
In the following sections, I provide tips and tricks for solving for an integrating
factor and plugging it back into different types of linear first order equations.
In general, first order differential equations don’t lend themselves to easy
integration, which is where integrating factors come in. How does the method
of integrating factors work? To understand, say, for example, that you have
this linear differential equation:
dt
dy
y
2
4
+ =
First, you multiply the previous equation by µ(t), which is a standin for the
undetermined integrating factor, giving you:
t dt
dy
t y
t
µ
µ
µ
2
4
+
=
^
^
^
h
h
h
Now you have to choose µ(t) so that you can recognize the left side of this
equation as the derivative of some expression. This way it can easily be
integrated.
Here’s the key: The left side of the previous equation looks very much like
differentiating the product µ(t)y. So try to choose µ(t) so that the left side of
the equation is indeed the derivative of µ(t)y. Doing so makes the integration
easy.
The derivative of µ(t)y by t is:
dt
d
t y
t dt
dy
dt
d
t y
µ
µ
µ
=
+
^
^
^
h
h
h
8
B
Comparing the previous two equations term by term gives you:
dt
d
t
t
µ
µ
2
=
^
^
h
h
Hey, not bad. Now you’re making progress! This is a differential equation you
can solve. Rearranging the equation so that all occurrences of µ(t) are on the
same side gives you:
/
t
d
t dt
µ
µ
2
=
^
^
h
h
Now the equation can be rearranged to look like this:
t
d
t
dt
µ
µ
2
=
^
^
h
h
Fine work. Integration gives you:
ln µ(t) = 2t + b
where b is an arbitrary constant of integration.
µ(t) = ce2t
where c is an arbitrary constant.
So that’s it — you’ve solved for the integrating factor! It’s µ(t) = ce2t.
Using an integrating factor to solve
a differential equation
After you solve for an integrating factor, you can plug that factor into the
original linear differential equation as multiplied by µ(t). For instance, take
your original equation from the previous section:
t dt
dy
t y
t
µ
µ
µ
2
4
+
=
^
^
^
h
h
h
and plug in the integrating factor to get this equation:
ce dt
dy
ce y
ce
2
4
t
t
t
2
2
2
+
=
Note that c drops out of this equation when you divide by c, so you get the
following equation (because you’re just looking for an arbitrary integrating
factor, you could also set c = 1):
e dt
dy
e y
e
2
4
t
t
t
2
2
2
+
=
When you use an integrating factor, you attempt to find a function µ(t) that,
when multiplied on both sides of a differential equation, makes the left side
into the derivative of a product. Figuring out the product allows you to solve
the differential equation.
In the previous example, you can now recognize the left side as the derivative
of e2t y. (If you can’t recognize the left side as a derivative of some product, in
general, it’s time to go on to other methods of solving the differential equation).
In other words, the differential equation has been conquered, because now
you have it in this form:
dt
d e y
e
4
t
t
2
2
=
_
i
You can integrate both sides of the equation to get this:
e2ty = 2e2t + c
y = 2 + ce–2t
You’ve got yourself a solution. Beautiful.
The use of an integrating factor isn’t always going to help you; sometimes,
when you use an integrating factor in a linear differential equation, the left
side isn’t going to be recognizable as the derivative of a product of functions.
In that case, where integrating factors don’t seem to help, you have to turn to
other methods. One of those methods is to determine whether the differen
tial equation is separable, which I discuss in Chapter 3.
Moving on up: Using integrating factors in
differential equations with functions
Now you’re going to take integrating factors to a new level. Check out this
linear equation, where g(t) is a function of t:
dt
dy
ay
g t
+ = ^ h
This one’s a little more tricky. However, using the same integrating factor
from the previous two sections, eat (remember that the c dropped out), works
here as well. After you multiply both sides by eat, you get this equation:
e dt
dy
a e y
e g t
at
at
at
+
=
^ h
Now you can recast this equation in the following form:
dt
d e y
e g t
at
at
=
_
^
i
h
To integrate the function g, I use s as the variable of integration. Integration
gives you this equation:
e y
e g s ds
c
at
as
=
+
#
^ h
You can solve for y here, which gives you the following equation:
y
e
e g s ds
ce
at
as
at
=
+


#
^ h
And that’s it! You’ve got your answer!
Of course, solving this equation depends on whether you can calculate the
integral in the previous equation. If you can do it, you’ve solved the differential
equation. Otherwise, you may have to leave the solution in the integral form.
In this section, I give you a shortcut for solving some particular differential
equations. Ready? Here’s the tip: In general, the integrating factor for an
equation in this form:
dt
dy
ay
g t
+ = ^ h
is this:
exp
t
a dt
µ =
#
^ h
In this equation, exp(x) means ex.
As an example, try solving the following differential equation with the shortcut:
dt
dy
y
t
2
1
4
+
= +
Assume that the initial condition is
y = 8, when t = 0
This equation is an example of the general equation solved in the previous
section. In this case, g(t) = 4 + t, and a = 1⁄2.
Using a, you find that the integrating factor is et/2, so multiply both sides of
equation by that factor:
e dt
dy
e y
e
te
2
4
/
/
/
/
t
t
t
t
2
2
2
2
+
=
+
Now you can combine the two terms on the left to give you this equation:
dt
d e y
e
te
4
/
/
/
t
t
t
2
2
2
=
+
_
i
All you have to do now is integrate this result. The term on the left and the
first term on the right are no problem. The last term on the right is another
story.
You can use integration by parts to integrate this term. Integration by parts
works like this:
f x g x dx
f b g b
f a g a
f x g x dx
a
b
a
b
=


#
#
l
l
^
^
^
^
^
^
^
^
h
h
h
h
h
h
h
h
et/2 y = 8et/2 + 2 t et/2 – 4et/2 + c
where c is an arbitrary constant, set by the initial conditions. Dividing by eat
gives you this equation:
y = 4 + 2t + ce–at
By applying the initial condition, y(0) = 8, you get
y(0) = 8
8 = 4 + c
Or c = 4. So the general solution of the differential equation is:
y = 4 + 2t + 4e–t/2
In Chapter 1, I explain that direction fields are great tools for visualizing dif
ferential equations. You can see a direction field for the previously noted
general solution in Figure 21.
0
0
1
2
3
4
5
6
7
8
9
10
y
x
25
20
15
10
5
igure 21:
The
direction
eld of the
general
solution.
Solving an advanced example
I think you’re ready for another, somewhat more advanced, example. Try
solving this differential equation to show that you can have different integrat
ing factors:
t dt
dy
y
t
2
4 2
+ =
where y(1) = 4.
To solve, first you have to find an integrating factor for the equation. To get it
into the form:
dt
dy
ay
g t
+ = ^ h
you have to divide both sides by t, which gives you this equation:
dt
dy
t y
t
2
4
+
=
0
0
1
2
3
4
5
6
7
8
9
10
y
x
25
20
15
10
5
igure 22:
e graph of
e general
solution.
exp
exp
t
a dt
t dt
µ
2
=
=
#
#
^ h
Performing the integral gives you this equation:
exp
t
t dt
e
t
µ
2
ln
t
2
2
=
=
=
#
^ h
So the integrating factor here is t2, which is a new one. Multiplying both sides
of the equation by the integrating factor, µ(t) = t2, gives you:
t dt
dy
ty
t
2
4
2
3
+ =
Because the left side is a readily apparent derivative, you can also write it in
this form:
dt
d yt
t4
2
3
=
_
i
Now simply integrate both sides to get:
yt2 = t4 + c
Finally you get:
y
t
t
c
2
2
= +
where c is an arbitrary constant of integration.
Now you can plug in the initial condition y(1) = 4, which allows you to see
that c = 3. And that helps you come to this solution:
y
t
t
3
2
2
= +
And there you have it. You can see a direction field for the many general solu
tions to this differential equation in Figure 23.
You can see this function graphed in Figure 24.
2
–2
–1
0
1
2
y
x
8
7
6
5
4
3
igure 24:
e graph of
a more
advanced
solution.
–5
–2
–1
0
1
2
y
x
4
3
2
1
0
–1
–2
–3
–4
igure 23:
The
direction
field of a
more
advanced
solution.
Determining Whether a Solution for a
inear First Order Equation Exists
I show you how to deal with different kinds of linear first order differential
equations earlier in this chapter, but the fact remains that not all linear differ
ential equations actually do have a solution.
Luckily, a theorem exists that tells you when a given linear differential equa
tion with an initial condition has a solution. That theorem is called the exis
tence and uniqueness theorem.
This theorem is worth knowing. After all, if a differential equation doesn’t have
a solution, what use is it to search for a solution? In other words, this theorem
represents another way to tackle linear first order differential equations.
Spelling out the existence and uniqueness
theorem for linear differential equations
In this section, I explain what the existence and uniqueness theorem for linear
differential equations says. Before I continue, however, note that a continuous
function is a function for which small changes in the input result in small
changes in the output (for example, f(x) = 1/x is not continuous at x = 0).
Without further ado, here’s the existence and uniqueness theorem:
If there is an interval I that contains the point to, and if the functions p(x)
and g(x) are continuous on that interval, and if you have this differential
equation:
dx
dy
p x y
g x
+
=
^
^
h
h
then there exists a unique function, y(x), that is the solution to that differen
tial equation for each x in interval I that also satisfies this initial condition:
y(to) = yo
where yo is an arbitrary initial value.
In other words, this theorem says that a solution exists and that the solution
is unique.
Thinking about the theorem in the previous section begs the question: What
is the general solution to the following linear differential equation?
dx
dy
p x y
g x
+
=
^
^
h
h
Note that this differential equation has a function p(x) and g(x), which pro
vides a more complex situation. So you can’t use the simple form I explain in
the earlier section “Adding a couple of constants to the mix,” where a and b
are constants like this:
dx
dy
ay
b
= 
The solution here is:
y = (b/a) + ceat
Now you face a more complex situation, with functions p(x) and g(x). A gen
eral solution to the general equation does exist, and here it is:
y
t
s g s ds
c
µ
µ
=
+
#
^
^
^
h
h
h
where the integrating factor is the following:
exp
t
p t dt
µ =
#
^
^
h
h
The integrals in these equations may not be possible to perform, of course.
But together, the equations represent the general solution.
Note that for linear differential equations, the solution, if there is one, is com
pletely specified, up to a constant of integration, as in the solution you get in
the earlier section “Solving an advanced example”:
y
t
t
c
2
2
= +
where c is a constant of integration.
You can’t necessarily say the same thing about nonlinear differential
equations — they may have solutions of completely different forms, not just
differing in the value of a constant. Because the solution to a linear differen
tial equation has one form, differing only by the value of a constant, those
solutions are referred to as general solutions. This term isn’t used when dis
cussing nonlinear differential equations, which may have multiple solutions
of completely different forms. I discuss nonlinear first order differential equa
tions later in this chapter.
and uniqueness examples
In this section, I include a few examples to help you understand the existence
and uniqueness theorem for linear differential equations.
Example 1
Apply the existence and uniqueness theorem to the following equation to
show that there exists a unique solution:
dx
dy
y
x
5
4
=

_
i
Just kidding! This equation isn’t linear because the term (y – 5) is in the denom
inator of the right side. And, of course, because the equation isn’t linear, the
existence and uniqueness theorem doesn’t apply. Did you catch that?
Example 2
Try this differential equation (which I promise is linear!). Does a unique solu
tion exist?
dx
dy
y
x
2
4 2
+ =
where y(1) = 2.
The equation is already in the correct form:
dx
dy
p x y
g x
+
=
^
^
h
h
where p(x) = 2 and g(x) = 4x2.
Note that p(x) and g(x) are continuous everywhere, so there’s a general solu
tion that’s valid on the interval, –∞ < x < ∞.
In particular, the initial condition is y(1) = 2, which is definitely inside the
interval that p(x) and g(x) are continuous (everything is inside that interval).
So, yes, there exists a solution to the initial value problem.
Example 3
Now take a look at this equation, which is similar to the example in the previ
ous section, and determine whether a unique solution exists:
x dx
dy
y
x
2
4 2
+ =
where y(1) = 2.
dx
dy
p x y
g x
+
=
^
^
h
h
Here’s what the equation should look like:
dx
dy
x
y
x
2
4
+ =
In other words:
p x
x
2
=
^ h
and
g(x) = 4x
Note that p(x) and g(x) aren’t continuous everywhere. In particular, p(x) is
discontinuous at x = 0, which makes the interval in which p(x) and g(x) are
continuous on the interval 0 > x and 0 < x.
Because the initial condition here is y(1) = 2, the point of interest is x = 1,
which is inside the interval where p(x) and g(x) are continuous. Therefore, by
the existence and uniqueness theorem, the initial value problem indeed has a
unique solution. Cool, huh?
iguring Out Whether a Solution for a
Nonlinear Differential Equation Exists
In the previous sections of this chapter, I cover linear first order differential
equations in detail. But you may be wondering: Is there such a thing as a non
linear differential equation? You bet there is! A nonlinear differential equation
simply includes nonlinear terms in y, y', y", and so on. Nonlinear equations
are pretty tough, so I don’t delve into them a lot in this book. But I do want to
discuss one important theorem related to solving these equations.
You see, the existence and uniqueness theorem (which you use for linear
equations, and which I cover earlier in this chapter) is analogous to another
theorem that’s used for nonlinear equations. I explain this theorem and show
some examples in the following sections.
nonlinear differential equations
Here’s the existence and uniqueness of solutions for nonlinear equations:
Say that you have a rectangle R that contains the point (to, yo) and that the
functions f and df/dy are continuous in that rectangle. Then, in an interval
to – h < t < to + h contained in R, there’s a unique solution to the initial
value problem:
,
,
dt
dy
f t y
y t
y
0
0
=
=
_
_
i
i
Note that this theorem discusses the continuity of both f and df/dy instead of
the continuity of both p(x) and g(x). Like the first theorem in this chapter,
this theorem guarantees the existence of a unique solution if its conditions
are met.
Here’s another note: If the differential equation in question actually is linear,
the theorem reduces to the first theorem in this chapter. In that case, f(t, y) =
–p(t)y + g(t) and df/dy = –p(t). So demanding that f and df/dy be continuous is
the same as saying that p(t) and g(t) be continuous.
Here’s a side note that many differential equations books won’t tell you: The
first theorem in this chapter guarantees a unique solution, but it’s actually a
little tighter than it needs to be in order to guarantee just a solution (which
isn’t necessarily unique). In fact, you can show that there’s a solution — but
not that it’s unique — to the nonlinear differential equation merely by proving
that f is continuous.
A couple of nonlinear existence and
uniqueness examples
In the following sections, I provide two examples that put the nonlinear exis
tence and uniqueness theorem into action.
Example 1
Determine what the two theorems in this chapter have to say about the fol
lowing differential equation as far as its solutions go:
dx
dy
y
x
x
2
4
5
9
6
2
=

+ +
_
i
where y(0) = –1.
That means you need the nonlinear theorem. Note that for this theorem:
,
f x y
y
x
x
2
4
5
9
6
2
=

+ +
_
_
i
i
and
dy
df
y
x
x
2
4
5
9
6
2
2
= 

+ +
_
i
These two functions, f and df/dy, are continuous, except at y = 4.
So you can draw a rectangle around the initial condition point, (0, –1) in which
both f and df/dy are continuous. And the existence and uniqueness theorem
for nonlinear equations guarantees that this differential equation has a solu
tion in that rectangle.
Example 2
Now determine what the existence and uniqueness theorems say about this
differential equation:
dx
dy
y /
1 5
=
where y(1) = 0.
Clearly, this equation isn’t linear, so the first theorem is no good. Instead you
have to try the second theorem. Here, f is:
f(x, y) = y1/5
and df/dy is:
dy
df
y
5
/4 5
=

Now you know that f(x, y) is continuous at the initial condition point given by:
y(1) = 0
But df/dy isn’t continuous at this point. The upshot is that neither the first
theorem nor the second theorem have anything to say about this initial value
problem. On the other hand, a solution to this differential equation is still
guaranteed because f(x, y) is continuous. However, it doesn’t guarantee the
uniqueness of that solution.
Sorting Out Separable First Order
Differential Equations
This Chapter
Figuring out the fundamentals of separable differential equations
Applying separable differential equations to real life
Advancing with partial fractions
Some rocket scientists call you, the Consulting Differential Equation
Expert, into their headquarters.
“We’ve got a problem,” they explain. “Our rockets are wobbling because we
can’t solve their differential equation. All the rockets we launch wobble and
then crash!”
They show you to a blackboard with the following differential equation:
dx
dy
y
x
2
2
2
=

“It’s not linear,” the scientists cry. “There’s a y2 in there!”
“I can see that,” you say. “Fortunately, it is separable.”
“Separable? What does that mean?” they ask.
“Separable means that you can recast the equation like this, where x is on
one side and y is on the other,” you say while showing them the following
equation on your clipboard:
(2 – y2) dy = x2 dx
“You can integrate the equation with respect to y on one side, and x on the
other,” you say.
“We never thought of that. That was too easy.”
to the first order.) I explain the basics of separable equations here, such as
determining the difference between linear and nonlinear separable equations
and figuring out different types of solutions, such as implicit and explicit. I also
introduce you to a fancy method for solving separable equations involving
partial fractions. Finally, I show you a couple of real world applications for
separable equations. When you’re an expert at these equations, you too can
solve problems for rocket scientists.
Beginning with the Basics of Separable
Differential Equations
Separable differential equations, unlike general linear equations in Chapter 2,
let you separate variables so only variables of one kind appear on one side,
and only variables of another kind appear on the other. Say, for example, that
you have a differential equation of the following form, in which M and N are
functions:
,
,
M x y
N x y dx
dy
0
+
=
_
_
i
i
And furthermore, imagine that you could reduce this equation to the follow
ing form, where the function M depends only on x and the function N depends
only on y:
M x
N y x
dy
0
+
=
^
_
h
i
This equation is a separable equation; in other words, you can separate the
parts so that only x appears on one side, and only y appears on the other.
You write the previous equation like this:
M(x) dx + N(y) dy = 0
Or in other words:
M(x) dx = –N(y) dy
If you can separate a differential equation, all that’s left to do at that point is
to integrate each side (assuming that’s possible). Note that the general form
of a separable differential equation looks like this:
M x
N y dx
dy
0
+
=
^
_
h
i
x
y dx
dy
0
2
+
=
And if you’re still not convinced, check out this one, which is also separable
but not linear:
x
y dx
dy
1
0
9
3
+ 
=
_
i
In the following sections, I ease you into linear separable equations before
tackling nonlinear separable equations. I also show you a trick for turning
nonlinear equations into linear equations. (It’s so cool that it’ll impress all
your friends!)
Starting easy: Linear separable equations
To get yourself started with linear separable equations, say that you have
this differential equation:
dx
dy
x
0
2
 =
This equation qualifies as linear. This also is an easily separated differential
equation. All you have to do is put it into this form:
dy = x2 dx
And now you should be able to see the idea behind solving separable differ
ential equations immediately. You just have to integrate, which gives you this
equation:
y
x
c
3
3
= +
where c is an arbitrary constant. There’s your solution! How easy was that?
Introducing implicit solutions
Not all separable equation solutions are going to be as easy as the one in the
previous section. Sometimes finding a solution in the y = f(x) format isn’t ter
ribly easy to get. Mathematicians refer to a solution that isn’t in the form
y = f(x) as an implicit solution. Coming up with such a solution is often the
best you can do, because solving a separable differential equation involves
tion; I show you how to find an explicit solution from an implicit solution in
the next section.)
Try this differential equation to see what I mean:
dx
dy
y
x
2
2
2
=

How about it? One of the first things that should occur to you is that this isn’t
a linear differential equation, so the techniques in the first part of this chap
ter won’t help. However, you’ll probably notice that you can write this equa
tion as:
(2 – y2) dy = x2 dx
As you can see, this is a separable differential equation because you can put y
on one side and x on the other. You can also write the differential equation
like this:
x
y dx
dy
2
0
2
2
 + 
=
_
i
You can cast this particular equation in terms of a derivative of x, and then
you integrate with respect to x to solve it. After integration, you wind up with
the following:
/
x
dx
d
x 3
2
3
 =

_
i
Note that:
/
y dx
dy
dx
d y
y
2
2
3
2
3

=

_
_
i
i
because of the chain rule, which says that:
dx
df
dy
df
dx
dy
=
So now you can write the original equation like this:
x
y dx
dy
dx
d
x
y
y
2
3
2
3
0
2
2
3
3
 + 
=

+ 
=
_
e
i
o
If the derivative of the term on the right is 0, it must be a constant this way:
x
y
y
c
3
2
3
3
3

+ 
=
e
o
–x3 + 6y – y3 = c
To see how the solutions look graphically, check out the direction field for this
differential equation in Figure 31. (I introduce direction fields in Chapter 1.)
Finding explicit solutions from
implicit solutions
The implicit solution in the previous section, with terms in y and y3, isn’t ter
ribly easy to cram into the y = f(x) format. In this section, you discover that
you can find an explicit solution to a separable equation by using a quadratic
equation, which is the general solution to polynomials of order two.
Try another, somewhat more tractable problem. Solve this differential
equation:
dx
dy
y
x
x
2
1
9
6
4
2
=

+ +
_
i
where y(0) = –1.
–4
–4
4
3
2
1
0
–1
–2
–3
y
x
4
3
2
1
0
–1
–2
–3
igure 31:
The
direction
field of a
nonlinear
separable
equation.
dx
dy
x
x
9
6
4
2
=
+ +
there would be no problem. After all, you would just integrate. But you’ve
probably noticed that pesky 2(y – 1) term in the denominator on the right
side. Fortunately, you may also realize that this is a separable differential
equation because you can put y on one side and x on the other. Simply write
the equation like this:
2(y – 1) dy = (9x2 + 6x + 4) dx
Now you integrate to get this equation:
y2 – 2y = 3x3 + 3x2 +4x + c
Using the initial condition, y(0) = –1, substitute x = 0 and y = –1 to get the
following:
1 + 2 = c
Now you can see that c = 3 and that the implicit solution to the separable
equation is:
y2 – 2y = 3x3 + 3x2 +4x + 3
If you want to find the explicit solution to this and similar separable equa
tions, simply solve for y with the quadratic equation because the highest
power of y is 2. Solving for y using the quadratic formula gives you:
y
x
x
x
1
3
3
4
4
3
2
!
=
+
+ +
You have two solutions here: one where the addition sign is used and one
where the subtraction sign is used. To match the initial condition that y(0) =
–1, however, only one solution will work. Which one? The one using the sub
traction sign:
y
x
x
x
1
3
3
4
4
3
2
= 
+
+ +
In this case, the solution with the subtraction is valid as long as the expres
sion under the square root is positive — in other words, as long as x > –1.
You can see the direction field for the general solutions to this differential
equation in Figure 32.
As I note in Chapter 1, connecting the slanting lines in a direction field gives
you a graph of the solution. You can see a graph of this particular function in
Figure 33.
–5
–2
3
2
1
0
–1
y
x
2
1
0
–1
–2
–3
–4
igure 33:
A graph of
e solution
of a
separable
equation
with initial
onditions.
–5
–2
3
2
1
0
–1
y
x
1
0
–1
–2
–3
–4
igure 32:
The
direction
field of a
separable
equation
with initial
onditions.
explicit solution
Most of the time, you can find an explicit solution from an implicit solution.
But every once in a while, getting an explicit solution is pretty tough to do.
Here’s an example:
sin
dx
dy
y
y
x
1
2 2
=
+
_
i
where y(0) = 1.
As you get down to work (bringing to bear all your differential equation skills!),
the first thing that may strike you is that this equation isn’t linear. But, you’ll
also likely note that it’s separable. So simply separate the equation into y on
the left and x on the right, which gives you this equation:
sin
y
y dy
x dx
1
2 2
+
=
_
i
This equation subsequently becomes
sin
y
dy
y dy
x dx
2
+
=
Now you can integrate to get this:
lny + y2 = –cos x + c
Next, take a look at the initial condition: y(0) = 1. Plugging that condition into
your solution gives you this equation:
0 + 1 = –1 + c
or
c = 2
So your solution to the initial separable equation is:
lny + y2 = –cos x + 2
This is an implicit solution, not an explicit solution, which would be in terms
of y = f(x). In fact, as you can see from the form of this implicit solution, get
ting an explicit solution would be no easy task.
tion field for this differential equation, which indicates what the integral curves
look like, in Figure 34.
A neat trick: Turning nonlinear separable
equations into linear separable equations
In this section, I introduce you to a neat trick that helps with some differen
tial equations. With it, you can make a linear equation out of a seemingly non
linear one. All you have to do to use this trick is to substitute the following
equation, in which v is a variable:
y = xv
In some cases, the result is a separable equation.
As an example, try solving this differential equation:
dx
dy
xy
y
x
2
3
4
4
=
+
–3
–4
–3
–2
–1
0
1
2
3
4
–2
–1
0
1
y
x
2
3
igure 34:
The
direction
field of a
separable
equation
th a hard
tofind
explicit
solution.
dx
dy
x
y
y
x
2
3
3
= +
What do you do now? Keep reading to find out.
Knowing when to substitute
You can use the trick of setting y = xv when you have a differential equation
that’s of the following form:
,
dx
dy
f x y
= _
i
when f(x, y) = f(tx, ty), where t is a constant.
You can see that substitution is possible, because substituting tx and ty into
this differential equation gives you the following result:
dx
dy
txt y
t y
t x
2
3
3
4
4
4
4
=
+
which breaks down to:
dx
dy
xy
y
x
2
3
4
4
=
+
Substituting y = xv into this differential equation gives you:
v
x dx
dv
x xv
xv
x
2
3
4
4
+
=
+
^
^
h
h
This equation now can be simplified to look like this:
x dx
dv
v
v
1
3
4
=
+
You now have a separable equation!
Separating and integrating
Continuing with the example from the previous section, you can now sepa
rate the terms, which gives you:
x
dx
v
v dv
1
4
3
=
+
ln
ln
x
v
c
4
1
=
+
+
^
_
h
i
where c is a constant of integration. Bearing in mind that, where k is a constant:
ln(x) + ln(k) = ln(kx)
and that:
n ln(x) = ln(xn)
you get:
v4 + 1 = (kx)4
where:
c = –ln(k)
Where does all this get you? You’re ready to substitute with the following:
v
x
y
=
This substitution gives you:
x
y
kx
1
4
4
+ =
d
^
n
h
So:
y4 + x4 = mx8
where m = k4. And solving for y gives you the following:
y = (mx8 – x4)1/4
And there’s your solution. Nice work!
rying Out Some Real World
eparable Equations
In the following sections, I take a look at some real world examples featuring
separable equations.
Getting in control with a sample
flow problem
To understand the relevance of differential equations in the real world, here’s
a sample problem to ponder: Say that you have a 10liter pitcher of water, and
that you’re mixing juice concentrate into the pitcher at the same time that
you’re pouring juice out. If the concentrate going into the pitcher has 1⁄4 kg of
sugar per liter, the rate at which the concentrate is going into the pitcher,
which I’ll call rin, is 1⁄100 liter per second, and the juice in the pitcher starts off
with 4 kg of sugar, find the amount of sugar in the juice, Q, as a function of
time, t.
Because this problem involves a rate — dQ/dt, which is the change in the
amount of sugar in the pitcher — it’s a differential equation, not just a simple
algebraic equation. I walk you through the steps of solving the equation in
the following sections.
Determining the basic numbers
When you start trying to work out this problem, remember that the change in
the amount of sugar in the pitcher, dQ/dt, has to be the rate of sugar flow in
minus the rate of sugar flow out, or something like this:
dt
dQ
rate of sugar flow in
rate of sugar flow out
=

_
_
i
i
Now you ask: What’s the rate of sugar flow in? That’s easy; it’s just the con
centration of sugar in the juice concentrate multiplied by the rate at which
the juice concentrate is flowing into the pitcher, which I’ll call rin. So, your
equation looks something like this:
r
rate of sugar flow in
4 kg/sec
in
=
_
i
Now what about the flow of sugar out? The rate of sugar flow out is related to
the rate at which juice leaves the pitcher. So if you assume that the amount of
juice in the pitcher is constant, then rin = rout = r. That, in turn, means the rate
of the pitcher (10 liters), or Q/10. Here’s what your equation would look like:
Q
r
rate of sugar flow out
10 kg/sec
=
_
i
So that means:
dt
dQ
r
Qr
4
10
rate of sugar flow in
rate of sugar flow out
=

= 
_
_
i
i
where the initial condition is:
Q0 = 4 kg
Solving the equation
The equation at the end of the previous section is separable, and separating
the variables, each on their own side, gives you this equation:
dt
dQ Qr
r
10
4
+
=
Now that, you might say, is a linear differential in Q. And you’d be right. So you
know that the equation is both linear and separable.
You can handle this differential equation using the methods in Chapter 2. For
instance, to solve, you find an integrating factor, multiply both sides by the
integrating factor, and then see if you can figure out what product the left
side is the derivative of and integrate it. Whew! It sounds rough, but note that
the equation is of the following form:
dt
dy
ay
b
+ =
The solution to this kind of differential equation is already found in Chapter 2;
you use an integrating factor of eat. The solution to this kind of equation is:
y = (b/a) + ce–at
So you can see that the solution to the juice flow problem is:
Q(t) = 2.5 + ce–rt/10
Because r = 1⁄100 liter per second, the equation becomes:
Q(t) = 2.5 + ce–t/1000
Q0 = 4 kg
you know that:
Q = 2.5 + 1.5 e–t/1000
Note the solution as t → ∞ is 2.5 kg of sugar, and that’s what you’d expect.
Why? Because the concentrate has 1⁄4 kg of sugar per liter, and 10 liters of
water are in the pitcher. So 10/4 = 2.5 kg.
The direction field for different values of Q0 appears in Figure 35. Notice that
all the solutions tend toward the final Q of 2.5 kg of sugar, as you’d expect.
You can see a graph of this solution in Figure 36.
0
0
300
600
900
1200
1500
1800
2100
2400
2700
3000
Q
t
20
15
10
5
igure 35:
The
direction
field of a
flow
problem
solution.
Striking it rich with a sample
monetary problem
You may not have realized that differential equations can be used to solve
money problems. Well they can! And here’s a problem to prove it: Say that
you’re deciding whether to deposit your money in the bank. You can calcu
late how your money grows, dQ/dt, given the interest rate of the bank and the
amount of money, Q, that you have in the bank. As you can see, this is a job
for differential equations.
Figuring out the general solution
Suppose your bank compounds interest continuously. The rate at which your
savings, Q, grows, is:
dt
dQ
rQ
=
where r is the interest rate that your bank pays.
0
0
300
600
900
1200
1500
1800
2100
2400
2700
3000
Q
t
4
3
2
1
igure 36:
e graph of
e solution
of a flow
problem.
equation for the rate at which your money grows, not the actual amount of
money.
Say that you have Q0 money at t = 0:
Q(0) = Q0
How much money would you have at a certain time in the future? That’s easy
enough to figure out. Separate the variables, each on their own side, like this:
Q
dQ
r dt
=
Then integrate:
lnQ = rt
Finally, exponentiate both sides, which gives you the following equation:
Q = cert
To match the initial condition:
Q(0) = Q0
the solution becomes:
Q = Q0e
rt
So, in other words, your money would grow exponentially. Not bad.
Compounding interest at set intervals
Now I want you to examine the result from the previous section a little, deriv
ing it another way so that it makes more sense. If your bank compounded
interest once a year, not continuously, after t years, you’d have this much
money:
Q = Q0(1 + r)
t
That’s because if your interest was 5 percent, after the first year, you would
have 1.05Q0; at the end of the second year, 1.05
2Q0, and so on.
Q = Q0(1 + r)
2t
No, you wouldn’t. Why? Because that would pay you r percent interest twice
a year. For example, if r = 8 percent, the previous equation would pay you 8
percent of your total savings twice a year. Instead, banks divide the interest
rate they pay you by the number of times they compound per year, like this:
Q Q
r
1
2
t
0
2
=
+
c
m
In other words, if the bank compounds twice a year, and the annual interest
rate is 8 percent, six months into the year it pays you 4 percent, and at the
end of the year it pays another 4 percent.
In general, if your bank compounds interest m times a year, after t years,
you’d have:
Q Q
m
r
1
mt
0
=
+
c
m
If you take the limit as m → ∞ — that is, as your bank starts to compound
continuously — you get this equation:
lim
Q
Q
m
r
1
m
mt
0
=
+
"3
c
m
But that’s just the expansion for ert. So, as the bank compounds continuously,
you get:
lim
Q
Q
m
r
Q e
1
m
mt
r
0
0
=
+
=
"3
t
c
m
And this result confirms the answer you got from solving the differential
equation in the previous section.
So if you had $25 invested, and you left it alone at 6 percent for 60 years,
you’d have:
Q = Q0e
rt = 25e0.06(60)
or:
Q = Q0e
rt = 25e0.06(60) = $914.96
Hmm, not such a magnificent fortune.
How about if you add a set amount every year to the equation in the previous
section? That would be better, wouldn’t it? Say that you add $5,000 a year. In
that case, remember that the set amount would change the differential equa
tion for your savings, which was this:
dt
dQ
rQ
=
The equation would change to this, where k is the amount you contribute
regularly:
dt
dQ
rQ k
= +
If you deposit regularly, k > 0; if you withdraw regularly, k < 0. Ideally, you
should add or subtract k from your account continuously over the year to
make your solution exact, but here you can just assume that you add or sub
tract k once a year.
Putting this new equation into standard separable form gives you this:
dt
dQ
rQ k
 =
This equation is of the following form:
dt
dy
ay
b
+ =
The solution to this kind of equation is:
y = (b/a) + ce–at
In this case, that solution means:
Q = cert – k/r
What’s going on here? It looks like you have the solution for leaving money in
the bank without adding anything minus the amount you’ve added. Can that
be right? The answer is in c, the constant of integration. Here, the initial con
dition is:
Q(0) = Q0
which means that:
Q(0) = cer0 – k/r = c – k/r = Q0
c = Q0 + k/r
So your solution turns out to be:
Q = cert – k/r = (Q0 + k/r)e
rt – k/r
Working this out gives you:
/
/
Q Q
k r e
k r Q e
r
k e
1
rt
rt
rt
0
0
=
+
 =
+

_
_
i
i
That looks a little better! Now the first term is the amount that you’d earn if
you just left Q0 in the account, and the second term is the amount resulting
from depositing or withdrawing k dollars regularly.
For example, say you started off with $25, but then you added $5,000 every
year for 60 years. At the end of 60 years at 6 percent, you’d have:
.
,
Q Q e
r
k e
e
e
1
25
0 06
5 000
1
.
( )
.
(
)
rt
rt
0
0 06 60
0 06 60
=
+
 =
+

_
_
i
i
After calculating this out, you’d get:
.
,
$
.
$ ,
,
$ ,
,
Q
e
e
25
0 06
5 000
1
914 96
2 966 519
2 967 434
.
( )
.
(
)
0 06 60
0 06 60
=
+
 =
+
=
_
i
Quite a tidy sum.
Break It Up! Using Partial Fractions
n Separable Equations
When a term in a separable differential equation looks a little difficult to inte
grate, you can use the method of partial fractions to separate it. This method
is used to reduce the degree of the denominator of a rational expression.
For example, using the method of partial fractions, you can express:
x
x
2
8
6
2+ 
as the following equation:
x
x
x
x
2
8
6
2
1
4
1
2+ 
=


+