47 Solving Differential Equations

advertisement
“Teach A Level Maths”
Vol. 2: A2 Core Modules
47: Solving Differential
Equations
© Christine Crisp
Solving Differential Equations
Module C4
"Certain images and/or photos on this presentation are the copyrighted property of JupiterImages and are being used with
permission under license. These images and/or photos may not be copied or downloaded without permission from JupiterImages"
Solving Differential Equations
A differential equation is an equation which contains
dy
dA
a derivative such as
or
.
dx
dt
Solving a differential equation means finding an
expression for y in terms of x or for A in terms of t
without the derivative.
e.g. (1)
dy
x
dx
e.g. (2)
dy
 y
dx
To solve (1) we just integrate with respect to x.
dy
x2
x  y
C
dx
2
However, we can’t integrate y w.r.t. x so (2)
needs another method.
Solving Differential Equations
e.g. (2)
dy
 y
dx
Before we see how to solve the equation, it’s useful
to get some idea of the solution.
The equation tells us that the graph of y has a
gradient that always equals y.
We can sketch the graph by drawing a
gradient diagram.
For example, at every
point where y = 2, the
2
gradient equals 2. We can
1
draw a set of small lines
showing this gradient.
We can cover the page with similar lines.
Solving Differential Equations
dy
 y
dx
We can now draw a curve through any point following
the gradients.
Solving Differential Equations
dy
 y
dx
However, we haven’t got just one curve.
Solving Differential Equations
dy
 y
dx
The solution is a family of curves.
Can you guess what sort of equation these curves
represent ?
ANS: They are exponential curves.
Solving Differential Equations
dy
Solving
y
dx
We use a method called “ Separating the Variables”
and the title describes exactly what we do.
We rearrange so that x terms are on the right and y
on the left.
Multiply by dx
and divide by y.
dy
y 
dx
1
dy  dx
y
Now
insert
integration
signs .of. the
. derivative
We
can
separate
the 2 parts
because
and integrate
although it isn’t1actually a fraction, it behaves like
dy  one.
dx 
ln y  x  C
y

We l.h.s.
don’t need
a constant
on both
theyw.r.t. x)
(the
is integrated
w.r.t.
y andsides
the as
r.h.s.
can be combined. I usually put it on the r.h.s.
Solving Differential Equations
dy
 y
dx

ln y  x  C
We’ve now solved the differential equation to find the
general solution but we have an implicit equation and we
often want it to be explicit ( in the form y = . . . )
A log is just an index, so
ln y  x  C

y  ex  C
( We now have the exponential that we spotted from
the gradient diagram. )
However, it can be simplified.
Solving Differential Equations
y  ex  C
We can write e x  C as e x  e C.
Since e C is a constant it can be replaced by a single
letter, k.
dy
So,
 y  y   ke x where k is positive
dx
x
This is usually written as y  Ae where A is
positive or negative.
So,
dy
y 
dx
y  Ae
x
In this type of example, because the result is valid
for positive and negative values, I usually use A
directly when I change from log to exponential form.
Solving Differential Equations
dy
 y  y  Ae x
dx
Changing the value of A gives the different curves we
saw on the gradient diagram.
e.g. A = 2 gives
Solving Differential Equations
dy
The differential equation
 y is important as it is
dx
one of a group used to model actual situations.
These are situations where there is exponential
growth or decay.
We will investigate them further in the next
presentation.
We will now solve some other equations using the
method of separating the variables.
Solving Differential Equations
e.g. 3 Solve the equation below giving the answer in
the form y  f ( x ) .
dy
2
 y cos x
dx
1
Solution: Separating the variables:
dy

cos
x
dx
2
y
Insert integration signs:


y  2 dy  cos x dx
1
y
Integrate:
 sin x  C
1
1
   sin x  C
y
1
y

sin x  C
Solving Differential Equations
e.g. 4 Solve the equation below giving the answer in
the form y  f ( x ) .
dy
 x  xy
dx
Solution:
It’s no good dividing by y as this would give
1
x
dy   x which is no help.
y
y
Instead, we take out x as a common factor on the
r.h.s., so
dy
dy
 x (1  y )
 x  xy 
dx
dx
We can now separate the variables by dividing by (1  y )
Solving Differential Equations


dy
 x (1  y )
dx

1
dy  x dx
1 y
x2
ln 1  y 
C
2



1 y  e
x2  C
2
1 y  A e
x2
2
Solving Differential Equations


dy
 x (1  y )
dx

1
dy  x dx
1 y
x2
ln 1  y 
C
2



1 y  e
x2  C
2
1 y  A e
x2
2
You may sometimes
see this written as
 x2
exp 
 2




Solving Differential Equations


dy
 x (1  y )
dx

1
dy  x dx
1 y
x2
ln 1  y 
C
2




1 y  e
x2  C
2
1 y  A e
y
x2
2
x2
Ae 2
1
Solving Differential Equations
•
•
SUMMARY
Some differential equations can be solved by
separating the variables.
To use the method we need to be able to write the
equation in the form
f ( y )dy  g( x )dx
( If the equation has a total of 3 terms we will need to
bracket 2 together before separating the variables. )
•
The l.h.s. is integrated w.r.t. y and the r.h.s.
w.r.t. x, so
 f ( y )dy   g( x )dx
•
•
The answer is often written explicitly.
The solution is called the general solution.
Exercise
Solving Differential Equations
1. Find the general solutions of the following equations
giving your answers in the form y  f ( x ) :
(a)
dy
(1  x )
 2x
dx
2
(b)
dy
e
1
dx
y
2. Find the general solutions of the following
equations leaving the answers in implicit form:
(a)
dy
sin y
 cos x
dx
b)
dy
 yx 2  y
dx
3. Find the equation of the curve given by the following
equation and which passes through the given point.
dy
 2 x 2e  y : x  0 , y  0
dx
( This is called a particular solution. )
Solving Differential Equations
Solutions:
dy
(1  x )
 2x
dx
2



dy 
1 x
2x
2

dx
f ( x )
dx
f ( x)
y  ln( 1  x 2 )  C
(b)
dy
e
1
dx
y




e y dy  dx
ey  xC 
y  ln x  C
Solving Differential Equations
dy
sin y
 cos x
dx
2(a)


b)


sin y dy  cos x dx
 cos y  sin x  C
dy
dy
2
 yx  y 
 y( x 2  1)
dx
dx
1
2
dy

(
x
 1) dx

y
3
x
ln y 
xC
3


Solving Differential Equations
3.
dy
 2 x 2e  y : x  0 , y  0
dx
1
2
dy

2
x
dx

y
e


e


y

dy  2 x dx
 2x
2
3
e 
y
y
You might prefer to write e3
xseparate
 0 , y the
0 variables.
1 C


3
2x
e 
1
3
y
C1
as
e
y
before you
3
or
2x
y  ln
1
3
Solving Differential Equations
Solving Differential Equations
The following slides contain repeats of
information on earlier slides, shown without
colour, so that they can be printed and
photocopied.
For most purposes the slides can be printed
as “Handouts” with up to 6 slides per sheet.
Solving Differential Equations
e.g. 1 Solving
dy

y
dx
We use a method called “ Separating the Variables”
and the title describes exactly what we do.
We rearrange so that x terms are on the right and y
on the left.
Multiply by dx
and divide by y.
dy
y 
dx
Now insert integration signs . . .


1
dy  dx
y

1
dy  dx
y
and integrate
ln y  x  C
(the l.h.s. is integrated w.r.t. y and the r.h.s. w.r.t. x)
Solving Differential Equations
dy
 y
dx

ln y  x  C
We’ve now solved the differential equation to find the
general solution but we have an implicit equation and we
often want it to be explicit ( in the form y = . . . )
A log is just an index, so
ln y  x  C
 y  ex  C
This can be simplified.
We can write e x  C as e x  e C. Since e C is a
constant it can be replaced by a single letter.
We usually use A. So,
dy
 y  y  Ae x
dx
Solving Differential Equations
e.g. 2 Solve the equation below giving the answer in
the form y  f ( x ) .
dy
 y cos x
dx
1
Solution: Separating the variables:
dy  cos x dx
y
Insert integration signs:

Integrate:

1
dy  cos x dx
y
ln y  sin x  C

y  e sin x C

y  Ae sin x
Solving Differential Equations
e.g. 3 Solve the equation below giving the answer in
the form y  f ( x ) .
dy
 x  xy
dx
Solution:
It’s no good dividing by y as this would give
1
x
dy   x which is no help.
y
y
Instead, we take out x as a common factor on the
r.h.s.
dy
 x (1  y )
dx
We can now separate the variables by dividing by (1  y )
Solving Differential Equations


dy
 x (1  y )
dx


1
dy  x dx
1 y
x2
ln( 1  y ) 
C
2



1 y  e
x2
C
2
1 y 
x2
Ae 2
y
x2
Ae 2
1
Solving Differential Equations
•
•
SUMMARY
Some differential equations can be solved by
separating the variables.
To use the method we need to be able to write the
equation in the form
f ( y )dy  g( x )dx
( If the equation has a total of 3 terms we will need to
bracket 2 together before separating the variables. )
•
The l.h.s. is integrated w.r.t. y and the r.h.s.
w.r.t. x, so
 f ( y )dy   g( x )dx
•
•
The answer is often written explicitly.
The solution is called the general solution.
Download