Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Differential Equations – Analytical Techniques for 1d
● Special cases of linear 1d equations● Integrals as solutions● Separable equations● General 1d linear differential equations –
Method of integrating factor
Reminder: Malthusian Growth
● Remember that the solution to
is: ● In 1d linear differential equations can be slightly
more general, i.e. of the form
How to solve those?
dP(t )dt
=rP (t) , P(0)=P0
P(t )=P0 er t
dx (t)dt
=a+bx (t) , x (0)=x0
Newton's Law of Cooling
● After a murder what a forensic scientist first does is take the temperature of the victim, a little later the temperature is taken again and these two data points usually allow to extrapolate the time of death
● Newton's law of cooling: rate of change in temperature of a cooling body is proportional to the difference in the body's temperature T and the surrounding environmental temperature T
e,
i.e.ddt
T=−k (T−T e)
Problem
● The victim is found at 8.30am and the temperature is 30 degrees. An hour later the temperature of the victim is found to be 28 degrees
● The temperature of the room in which the victim was found is constant at 22 degrees
● Determine the approximate time of death!● Need a solution of
ddt
T=−k (T−T e)
Solution (1)
● Can substitute z(t)=T-Te and then
● Hence: transforms into
● We already now this solution:● Re-susbtituting
ddt
T=−k (T−T e)
ddt
z=ddt
(T−T e)=ddt
T
ddt
z=−k z
z (t )=z0 e−kt
T (t)=z (t )+T e=T e+(T 0−T e)e−kt
Solution (2)
● To solve our forensic problem (ignoring units):
● Two equations for two unknowns (t, k). E.g. divide (2) by (1)
● Insert this into (1):
● The death occurred around 6.19am
30=22+(37−22)e−kt
28=22+(37−22)e−k (t+1 )
(1)
(2)
e−k=6 /8
8 /15=(6 /8)t
t=log(8 /15)/ log(6/ 8)≈2.19
Solution (3)
● Our substitution trick only works if Te=const.
● What if the temperature of the environment would be changing?
● To see what to do in the more general case, let's study the behaviour of a falling cat ... ● Surprisingly, cats sometimes fare better if falling
from a greater height than when falling from lower height
● Crucial question:Will it land on its feet?
● There are more detailed studies on this important topic, but we develop some simpler theory in this lecture ...
Falling Cats ...
● Cats usually need around 0.3 seconds to turn around. What is the minimum height a cat must fall from to land on its feet?
● Some physics: sum of forces acting on cat are only gravity
● Hence: ma=−mg
mass of catacceleration of cat g=979cm/sec2
Falling Cats (2)
● We need to solve the following differential equation:
● This is a second order linear equation● Let's assume:
– h(0)=h0 (height from which cat drops)– v(0)=h'(0)=0 (initial velocity zero)
● Need to find h0 such that h(0.3s)>0● (*) can be written as a system of two equations
h ' '=−g (*)
v '=−g h '=vand
Falling Cats (3)
● Let's investigate● More generally, this is of the form
(where the r.h.s. only depends on t and NOT on x)● Need a function x(t) which if differentiated yields f(t)● This is the integral:
(Since by the fundamental theorem of diff-int calc.
)● In our case:
d /dt v=−g
d /dt x=f (t )
x (t)=x0+∫t 0
tf (t ')dt '
d /dt (x0+ x (t))=d /dt∫t 0
tf (t ' )dt '=f (t)
v (t)=v 0−∫t 0
tgdt '=v0−g( t−t 0)
Falling Cats (4)
● Since v(0)=0 and t0=0 -> v(t)=-gt ● Also need to solve the second equation
● Again, r.h.s. independent of h and hence
● “Critical point” is h(0.3s)=0
h '=v
d /dt h=−t g
h( t)=h0−∫t0
tt ' gdt '
h( t)=h0−g/2 t 2
h0=g /2 (0.3s)2=44.05cm
“cats are fine if they jumpfrom heights larger than44.05cm”
Important to Remember
● If a 1d ODE is of the form
● with a r.h.s. independent of the unknown function x, it can be solved by integration:
d /dt x=f (t )
x (t)=x0+∫t 0
tf (t ' )dt '
Back to Malthus
● The Malthusian growth model
has a simple exponential solution:
● The model can be used in some form to predict human population growth, but a constant growth rate r is not realistic
● Add changes in r to model changing societal conditions?
d /dt P=r P (t) , P(t 0)=P0
P(t )=P0 exp(r (t−t 0))
d /dt P=r (t)P( t) ,P (t 0)=P0
Malthus (1)
● We have:
and let's say
(Technology improves and allows faster growth of population ...)
● This is still a linear (but non-autonomous) differential equation, but cannot be solved with the techniques discussed so far
● Q: Can we model the US census data for population from 1790 to 1990 with some choice of a and b?
d /dt P=r (t)P( t) ,P (t 0)=P0
r ( t)=a+bt
Separable Differential Equations
● Above Diff. Eq. has the form
● Rewrite this as:
(I.e. l.h.s. depends only on x and r.h.s. depends only on t)
● Solution:
dxdt
=f (x , t)=N (x )M ( t)
dxN (x )
=M (t)dt
∫dx
N (x )=∫M ( t)dt
Separable Equations
● Example: dxdt
=2 t x2
dx
x2 =2 t dt
∫dx
x2 =∫2 t dt
−1 / x=t 2+cIntegration constant
x (t)=−1
t 2+c
Back to Malthusian Growth
● Best fit of log P to US census data gives
a=-7 10-5 and b=0.03476
dPdt
=(a+bt)P , P(t 0)=P0
∫dPP
=∫(a+bt)dt
ln P=at+b /2 t2+c
P(t )=P0 exp(a(t−t 0)+b ' /2( t−t 0)2)
US Census Data and Malthusian Growth
General Linear Equations
● Our general formulation for a 1d diff equation is
● Which is linear if f is linear in y. Most general form of f is then:
● Conventionally, linear 1d equations are written as:
● Possible to give an algorithm to solve those● However: only for linear equations!
dydx
=f (x , y)
f (x , y)=g( x)−p (x ) y
dydx
+ p (x) y=g( x)
Integrating Factors ...
● Idea is to write l.h.s. as a total derivative. To achieve this multiply equation by a factor µ(x) (and µ(x) is later chosen suitably ...)
● Need:● Then Eq. can be written as
(and we can just integrate it ...)
dydx
+ p (x) y=g( x)
μ(x)dydx
+μ(x ) p (x) y=g( x)μ(x )
dμ( x)/dx=μ( x) p (x )ddx
(μ(x ) y)=g(x )μ(x )
(*)
(**)
Integrating Factors (2)
● Strategy: First solve (*) to find µ(x) and then integrate (**)
● (*) is:
this is a separable diff. equation and we employ the strategy developed earlier in the lecture:
● Now (**) becomes:
dμ( x)/dx=μ( x) p (x )
dμ(x )
μ=p(x )dx
μ(x)=exp (∫xp (s )ds)
y (x )=1/μ∫x0
xg (z)μ(z)dz
Integrating Factors (3)
● And putting all together we obtain a solution formula:
● Let's see how this is done in an example
● We first identify p(x)=-2/x● Then:
y (x )=exp(−∫xp(s)ds)(∫x0
xg(z )exp(−∫
zp(s)ds )dz+C )
d ydx
−2y / x=0
μ(x)=exp (∫xp (s )ds)=exp(∫
x−2/s ds)
=exp (−2 ln(x ))=x−2
(***)
Integrating Factor (4)
● Next: multiply both sides of (***) by µ(x)
x−2 d y
dx−2y / x
−3=0
x2 y '−2xy
x4 =0
ddx ( y
x2 )=0
y (x )=C x2
So ...
● This becomes all very complicated already for 1d linear differential equations!
● In the general case analytical solutions not available
● What can we do?● Numerical integration● Solutions available for certain classes of equations
(e.g. systems of linear differential equations)● Equilibrium analysis (and qualitative analysis
techniques for non-linear systems)
Pollution in a Lake
● Consider the scenario of a new pesticide that is applied upstream from a lake of volume V
● River receives a constant amount of this pesticide into its water and flows into the lake at a constant rate f (i.e. River has a constant concentration p of this pesticide)
● Lake is well-mixed and has constant volume, i.e. another river flows out of it at rate f
● Assuming the lake is initially clean, what is the concentration of the pesticide over time?