Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Mathematical Methods - Lecture 7
Yuliya Tarabalka
Inria Sophia-Antipolis Mediterranee, Titane team,http://www-sop.inria.fr/members/Yuliya.Tarabalka/
Tel.: +33 (0)4 92 38 77 09email: [email protected]
Yuliya Tarabalka ([email protected]) Differential Equations 1 / 31
Outline
1 Ordinary Differential Equations
2 First-order Differential Equations
Yuliya Tarabalka ([email protected]) Differential Equations 2 / 31
Ordinary Differential Equations
What is a differential equation?
Yuliya Tarabalka ([email protected]) Differential Equations 3 / 31
Ordinary Differential Equations
What is a differential equation?
Differential equations are the group of equations that containderivatives.
An ordinary differential equation (ODE):
contains only ordinary derivatives (no partial derivatives)
describes the relationship between these derivatives of the dependentvariable (ex: y) with respect to the independent variable (ex: x)
The solution to such an ODE is a function of x : y(x)
Yuliya Tarabalka ([email protected]) Differential Equations 4 / 31
Ordinary Differential Equations
What is a differential equation?
Differential equations are the group of equations that containderivatives.
An ordinary differential equation (ODE):
contains only ordinary derivatives (no partial derivatives)
describes the relationship between these derivatives of the dependentvariable (ex: y) with respect to the independent variable (ex: x)
The solution to such an ODE is a function of x : y(x)
Yuliya Tarabalka ([email protected]) Differential Equations 4 / 31
Ordinary Differential Equations
What is a differential equation?
Differential equations are the group of equations that containderivatives.
An ordinary differential equation (ODE):
contains only ordinary derivatives (no partial derivatives)
describes the relationship between these derivatives of the dependentvariable (ex: y) with respect to the independent variable (ex: x)
The solution to such an ODE is a function of x : y(x)
Yuliya Tarabalka ([email protected]) Differential Equations 4 / 31
Ordinary Differential Equations
The simplest type of differential equation
The simplest ODEs have the form:
dnx
dtn= G(t),
where G(t) depends only on the independent variable t
Newton’s law: F = ma ⇒
md2x
dt2= −mg ,
x = height of the object over the ground, m = its mass,g = constant gravitational acceleration
Yuliya Tarabalka ([email protected]) Differential Equations 5 / 31
Ordinary Differential Equations
The simplest type of differential equation
The simplest ODEs have the form:
dnx
dtn= G(t),
where G(t) depends only on the independent variable t
Newton’s law: F = ma ⇒
md2x
dt2= −mg ,
x = height of the object over the ground, m = its mass,g = constant gravitational acceleration
Yuliya Tarabalka ([email protected]) Differential Equations 5 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
md2x
dt2= −mg ⇒ d2x
dt2= −g
The first integration yields:
dx
dt= A − gt,
with A the constant of integration
The second integration yields the general solution:
x = B +At − 1
2gt2,
with B the second constant of integration
Yuliya Tarabalka ([email protected]) Differential Equations 6 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
md2x
dt2= −mg ⇒ d2x
dt2= −g
The first integration yields:
dx
dt= A − gt,
with A the constant of integration
The second integration yields the general solution:
x = B +At − 1
2gt2,
with B the second constant of integration
Yuliya Tarabalka ([email protected]) Differential Equations 6 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
md2x
dt2= −mg ⇒ d2x
dt2= −g
The first integration yields:
dx
dt= A − gt,
with A the constant of integration
The second integration yields the general solution:
x = B +At − 1
2gt2,
with B the second constant of integrationYuliya Tarabalka ([email protected]) Differential Equations 6 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
x = B +At − 1
2gt2
Two constants of integration A and B can be found from initialconditions:
x(0) = x0, ;dx
dt(0) = v0
We get:x(0) = x0 = B
dx
dt(0) = v0 = A
Yuliya Tarabalka ([email protected]) Differential Equations 7 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
x = B +At − 1
2gt2
Two constants of integration A and B can be found from initialconditions:
x(0) = x0, ;dx
dt(0) = v0
We get:x(0) = x0 = B
dx
dt(0) = v0 = A
Yuliya Tarabalka ([email protected]) Differential Equations 7 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
x = B +At − 1
2gt2
Two constants of integration A and B can be found from initialconditions:
x(0) = x0, ;dx
dt(0) = v0
We get:x(0) = x0 = B
dx
dt(0) = v0 = A
Yuliya Tarabalka ([email protected]) Differential Equations 7 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
General solution:
x = B +At − 1
2gt2
Particular solution (unique solution that satisfies both the ODE andthe initial conditions):
x(t) = x0 + v0t −1
2gt2
Example: We drop a ball off from the top of a 50 meter building withv0 = 0. When will the ball hit the ground?
Yuliya Tarabalka ([email protected]) Differential Equations 8 / 31
Ordinary Differential Equations
The simplest type of differential equation - Example
General solution:
x = B +At − 1
2gt2
Particular solution (unique solution that satisfies both the ODE andthe initial conditions):
x(t) = x0 + v0t −1
2gt2
Example: We drop a ball off from the top of a 50 meter building withv0 = 0. When will the ball hit the ground?
Yuliya Tarabalka ([email protected]) Differential Equations 8 / 31
Ordinary Differential Equations
Order of differential equations
The order of an ODE is the order of the highest derivative it contains
dy
dx
d2y
dx2
d3y
dx3
Yuliya Tarabalka ([email protected]) Differential Equations 9 / 31
First-order Differential Equations
First-order differential equations
The general first-degree first-order differential equation for thefunction y = y(x) can be written in either of two standard forms:
dy
dx= f (x , y), A(x , y)dx +B(x , y)dy = 0,
f (x , y),A(x , y),B(x , y) are in general functions of both x and y
How to solve?
Yuliya Tarabalka ([email protected]) Differential Equations 10 / 31
First-order Differential Equations
First-order differential equations
The general first-degree first-order differential equation for thefunction y = y(x) can be written in either of two standard forms:
dy
dx= f (x , y), A(x , y)dx +B(x , y)dy = 0,
f (x , y),A(x , y),B(x , y) are in general functions of both x and y
How to solve?
Yuliya Tarabalka ([email protected]) Differential Equations 10 / 31
First-order Differential Equations
The Euler method
The general first-order differential equation for the function y = y(x):
dy
dx= f (x , y) (1)
/ It is not always possible to find an analytical solution of (1) fory = y(x)
, It is always possible to determine a unique NUMERICAL solutiongiven:
an initial vaue y(x0) = y0
provided f (x , y) is a well-behaved function
Yuliya Tarabalka ([email protected]) Differential Equations 11 / 31
First-order Differential Equations
The Euler method
The general first-order differential equation for the function y = y(x):
dy
dx= f (x , y) (1)
/ It is not always possible to find an analytical solution of (1) fory = y(x)
, It is always possible to determine a unique NUMERICAL solutiongiven:
an initial vaue y(x0) = y0
provided f (x , y) is a well-behaved function
Yuliya Tarabalka ([email protected]) Differential Equations 11 / 31
First-order Differential Equations
The Euler method
The general first-order differential equation for the function y = y(x):
dy
dx= f (x , y) (1)
/ It is not always possible to find an analytical solution of (1) fory = y(x)
, It is always possible to determine a unique NUMERICAL solutiongiven:
an initial vaue y(x0) = y0
provided f (x , y) is a well-behaved function
Yuliya Tarabalka ([email protected]) Differential Equations 11 / 31
First-order Differential Equations
The Euler method = the simplest Runge-Kutta method
ODE dydx = f (x , y) gives the slope f (x0, y0) of the tangent line to the
solution curve y = y(x) at the point (x0, y0):
dy
dx(0) = lim
∆x→0
y(x0 +∆x) − y(x0)∆x
= f (x0, y0)
Yuliya Tarabalka ([email protected]) Differential Equations 12 / 31
First-order Differential Equations
The Euler method = the simplest Runge-Kutta method
1 The first point: (x0, y0)
2 The next point is obtained by choosing a small ∆x , and computingthe next y -coordinate (along the tangent line):
x = x0 +∆x , y(x0 +∆x) = y(x0) +∆xf (x0, y0)
3 (x0 +∆x , y0 +∆y) becomes the initial condition and we repeat step 2
Yuliya Tarabalka ([email protected]) Differential Equations 13 / 31
First-order Differential Equations
The Euler method = the simplest Runge-Kutta method
1 The first point: (x0, y0)2 The next point is obtained by choosing a small ∆x , and computing
the next y -coordinate (along the tangent line):
x = x0 +∆x , y(x0 +∆x) = y(x0) +∆xf (x0, y0)
3 (x0 +∆x , y0 +∆y) becomes the initial condition and we repeat step 2
Yuliya Tarabalka ([email protected]) Differential Equations 13 / 31
First-order Differential Equations
The Euler method = the simplest Runge-Kutta method
1 The first point: (x0, y0)2 The next point is obtained by choosing a small ∆x , and computing
the next y -coordinate (along the tangent line):
x = x0 +∆x , y(x0 +∆x) = y(x0) +∆xf (x0, y0)
3 (x0 +∆x , y0 +∆y) becomes the initial condition and we repeat step 2
Yuliya Tarabalka ([email protected]) Differential Equations 13 / 31
First-order Differential Equations
The Euler method = the simplest Runge-Kutta method
For small enough ∆x , the numerical solution converges to the exactsolution!
Yuliya Tarabalka ([email protected]) Differential Equations 14 / 31
First-order Differential Equations
Analytical solution
The general first-order differential equation for the function y = y(x):
dy
dx= f (x , y),
Some special forms of this equation can be solved analytically:
separable equations
exact equations
inexact equations
linear equations
. . .
Yuliya Tarabalka ([email protected]) Differential Equations 15 / 31
First-order Differential Equations
Separable equations
A first-order ODE is separable if it can be written in the form:
g(y)dydx
= f (x)
or
dy
dx= f (x)g(y)
where f (x) is independent of y and g(y) is indepedent of x
Yuliya Tarabalka ([email protected]) Differential Equations 16 / 31
First-order Differential Equations
Separable equations
A first-order ODE is separable if it can be written in the form:
g(y)dydx
= f (x)
1 Rearrange (factorise if needed) the equation so that the termsdepending on x and y appear on opposite sides:
g(y)dy = f (x)dx
2 Integrate:
∫ g(y)dy = ∫ f (x)dx
Yuliya Tarabalka ([email protected]) Differential Equations 17 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= x + xy
Since x + xy = x(1 + y):
∫dy
1 + y = ∫ xdx
⇓
ln(1 + y) = x2
2+ c , c = const
⇓
1 + y = exp(x2
2+ c) = A exp(x
2
2) , A = const
Yuliya Tarabalka ([email protected]) Differential Equations 18 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= x + xy
Since x + xy = x(1 + y):
∫dy
1 + y = ∫ xdx
⇓
ln(1 + y) = x2
2+ c , c = const
⇓
1 + y = exp(x2
2+ c) = A exp(x
2
2) , A = const
Yuliya Tarabalka ([email protected]) Differential Equations 18 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= x + xy
Since x + xy = x(1 + y):
∫dy
1 + y = ∫ xdx
⇓
ln(1 + y) = x2
2+ c , c = const
⇓
1 + y = exp(x2
2+ c) = A exp(x
2
2) , A = const
Yuliya Tarabalka ([email protected]) Differential Equations 18 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= x + xy
Since x + xy = x(1 + y):
∫dy
1 + y = ∫ xdx
⇓
ln(1 + y) = x2
2+ c , c = const
⇓
1 + y = exp(x2
2+ c) = A exp(x
2
2) , A = const
Yuliya Tarabalka ([email protected]) Differential Equations 18 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= 2 cos 2x
3 + 2y, y(0) = −1
Solution:
y(x) = −3
2+ 1
2
√1 + 4 sin 2x
Yuliya Tarabalka ([email protected]) Differential Equations 19 / 31
First-order Differential Equations
Separable equations - Example
Solve:dy
dx= 2 cos 2x
3 + 2y, y(0) = −1
Solution:
y(x) = −3
2+ 1
2
√1 + 4 sin 2x
Yuliya Tarabalka ([email protected]) Differential Equations 19 / 31
First-order Differential Equations
Linear equations
The first-order linear differential equation (linear in y and itsderivative) can be written in the form:
dy
dx+ p(x)y = g(x)
with (optional) the initial condition y(x0) = y0
These equations can be integrated using an integrating factor µ(x)
Yuliya Tarabalka ([email protected]) Differential Equations 20 / 31
First-order Differential Equations
Linear equations
The first-order linear differential equation (linear in y and itsderivative) can be written in the form:
dy
dx+ p(x)y = g(x)
with (optional) the initial condition y(x0) = y0
These equations can be integrated using an integrating factor µ(x)
Yuliya Tarabalka ([email protected]) Differential Equations 20 / 31
First-order Differential Equations
Linear equations
dy
dx+ p(x)y = g(x) ⇒ µ(x) [dy
dx+ p(x)y] = µ(x)g(x)
We need to determine µ(x) so that:
µ(x) [dydx+ p(x)y] = d
dx[µ(x)y]
⇓d
dx[µ(x)y] = µ(x)g(x)
Using µ(x0) = µ0 and y(x0) = y0:
µ(x)y − µ0y0 = ∫x
x0
µ(x)g(x)dx
⇓
y = 1
µ(x) (µ0y0 + ∫x
x0
µ(x)g(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 21 / 31
First-order Differential Equations
Linear equations
dy
dx+ p(x)y = g(x) ⇒ µ(x) [dy
dx+ p(x)y] = µ(x)g(x)
We need to determine µ(x) so that:
µ(x) [dydx+ p(x)y] = d
dx[µ(x)y]
⇓d
dx[µ(x)y] = µ(x)g(x)
Using µ(x0) = µ0 and y(x0) = y0:
µ(x)y − µ0y0 = ∫x
x0
µ(x)g(x)dx
⇓
y = 1
µ(x) (µ0y0 + ∫x
x0
µ(x)g(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 21 / 31
First-order Differential Equations
Linear equations
dy
dx+ p(x)y = g(x) ⇒ µ(x) [dy
dx+ p(x)y] = µ(x)g(x)
We need to determine µ(x) so that:
µ(x) [dydx+ p(x)y] = d
dx[µ(x)y]
⇓d
dx[µ(x)y] = µ(x)g(x)
Using µ(x0) = µ0 and y(x0) = y0:
µ(x)y − µ0y0 = ∫x
x0
µ(x)g(x)dx
⇓
y = 1
µ(x) (µ0y0 + ∫x
x0
µ(x)g(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 21 / 31
First-order Differential Equations
Linear equations
dy
dx+ p(x)y = g(x) ⇒ µ(x) [dy
dx+ p(x)y] = µ(x)g(x)
We need to determine µ(x) so that:
µ(x) [dydx+ p(x)y] = d
dx[µ(x)y]
⇓d
dx[µ(x)y] = µ(x)g(x)
Using µ(x0) = µ0 and y(x0) = y0:
µ(x)y − µ0y0 = ∫x
x0
µ(x)g(x)dx
⇓
y = 1
µ(x) (µ0y0 + ∫x
x0
µ(x)g(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 21 / 31
First-order Differential Equations
Linear equations
dy
dx+ p(x)y = g(x) ⇒ µ(x) [dy
dx+ p(x)y] = µ(x)g(x)
We need to determine µ(x) so that:
µ(x) [dydx+ p(x)y] = d
dx[µ(x)y]
⇓d
dx[µ(x)y] = µ(x)g(x)
Using µ(x0) = µ0 and y(x0) = y0:
µ(x)y − µ0y0 = ∫x
x0
µ(x)g(x)dx
⇓
y = 1
µ(x) (µ0y0 + ∫x
x0
µ(x)g(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 21 / 31
First-order Differential Equations
Linear equations
Next step: Determine µ(x) from µ(x) [dydx + p(x)y] =ddx [µ(x)y]
Using product rule for differentiation:
µdy
dx+ pµy = dµ
dxy + µdy
dx⇓
dµ
dx= pµ
This equation is separable:
∫µ
µ0
dµ
µ= ∫
x
x0
p(x)dx
lnµ
µ0= ∫
x
x0
p(x)dx ⇒ µ(x) = µ0 exp(∫x
x0
p(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 22 / 31
First-order Differential Equations
Linear equations
Next step: Determine µ(x) from µ(x) [dydx + p(x)y] =ddx [µ(x)y]
Using product rule for differentiation:
µdy
dx+ pµy = dµ
dxy + µdy
dx
⇓dµ
dx= pµ
This equation is separable:
∫µ
µ0
dµ
µ= ∫
x
x0
p(x)dx
lnµ
µ0= ∫
x
x0
p(x)dx ⇒ µ(x) = µ0 exp(∫x
x0
p(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 22 / 31
First-order Differential Equations
Linear equations
Next step: Determine µ(x) from µ(x) [dydx + p(x)y] =ddx [µ(x)y]
Using product rule for differentiation:
µdy
dx+ pµy = dµ
dxy + µdy
dx⇓
dµ
dx= pµ
This equation is separable:
∫µ
µ0
dµ
µ= ∫
x
x0
p(x)dx
lnµ
µ0= ∫
x
x0
p(x)dx ⇒ µ(x) = µ0 exp(∫x
x0
p(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 22 / 31
First-order Differential Equations
Linear equations
Next step: Determine µ(x) from µ(x) [dydx + p(x)y] =ddx [µ(x)y]
Using product rule for differentiation:
µdy
dx+ pµy = dµ
dxy + µdy
dx⇓
dµ
dx= pµ
This equation is separable:
∫µ
µ0
dµ
µ= ∫
x
x0
p(x)dx
lnµ
µ0= ∫
x
x0
p(x)dx ⇒ µ(x) = µ0 exp(∫x
x0
p(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 22 / 31
First-order Differential Equations
Linear equations
Next step: Determine µ(x) from µ(x) [dydx + p(x)y] =ddx [µ(x)y]
Using product rule for differentiation:
µdy
dx+ pµy = dµ
dxy + µdy
dx⇓
dµ
dx= pµ
This equation is separable:
∫µ
µ0
dµ
µ= ∫
x
x0
p(x)dx
lnµ
µ0= ∫
x
x0
p(x)dx ⇒ µ(x) = µ0 exp(∫x
x0
p(x)dx)
Yuliya Tarabalka ([email protected]) Differential Equations 22 / 31
First-order Differential Equations
Linear equations
The first-order linear differential equation:
dy
dx+ p(x)y = g(x)
Its solution satisfying the initial condition y(x0) = y0 is written as:
y = 1
µ(x) (y0 + ∫x
x0
µ(x)g(x)dx)
with
µ(x) = exp(∫x
x0
p(x)dx)
Frequent use in applied mathematics!
Yuliya Tarabalka ([email protected]) Differential Equations 23 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Linear equations - Example
Solve:dy
dx+ 2y = e−x , with y(0) = 3/4
This equation is not separable
With p(x) = 2 and g(x) = e−x , we have:
µ(x) = exp(∫x
02dx)
= e2x
andy = e−2x (3
4+ ∫
x
0e2xe−xdx) = e−2x (3
4+ ∫
x
0exdx)
= e−2x (3
4+ (ex − 1)) = e−2x (ex − 1
4)
e−x (1 − 1
4e−x)
Yuliya Tarabalka ([email protected]) Differential Equations 24 / 31
First-order Differential Equations
Example 2
Solve:dy
dx− 2xy = x , with y(0) = 0
Solution:
y = 1
2(ex2 − 1)
Yuliya Tarabalka ([email protected]) Differential Equations 25 / 31
First-order Differential Equations
Example 2
Solve:dy
dx− 2xy = x , with y(0) = 0
Solution:
y = 1
2(ex2 − 1)
Yuliya Tarabalka ([email protected]) Differential Equations 25 / 31
First-order Differential Equations
Bernoulli’s equation
Bernoulli’s equation has the form:
dy
dx+ P(x)y = Q(x)yn, where n ≠ 0 or 1
The equation can be made linear by substituting v = y1−n andcorrespondingly:
dy
dx= ( yn
1 − n)dv
dx
Bernoulli’s equation becomes linear:
dv
dx+ (1 − n)P(x)v = (1 − n)Q(x)
Yuliya Tarabalka ([email protected]) Differential Equations 26 / 31
First-order Differential Equations
Bernoulli’s equation
Bernoulli’s equation has the form:
dy
dx+ P(x)y = Q(x)yn, where n ≠ 0 or 1
The equation can be made linear by substituting v = y1−n andcorrespondingly:
dy
dx= ( yn
1 − n)dv
dx
Bernoulli’s equation becomes linear:
dv
dx+ (1 − n)P(x)v = (1 − n)Q(x)
Yuliya Tarabalka ([email protected]) Differential Equations 26 / 31
First-order Differential Equations
Business analytics application: compound interest
Equation for growth of an investment with continuous compoundingof interest?
S(t) = value of the investment at time t
r = annual interest rate compounded after every time interval ∆t
k = annual deposit amount
suppose that an installment is deposited after every time interval ∆t
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
Example: S(t) = $10000, r = 6% per year, ∆t = 1 month = 1/12 year
The interest awarded after 1 month is r∆tS = (0.06/12)×$10000 = $50
Yuliya Tarabalka ([email protected]) Differential Equations 27 / 31
First-order Differential Equations
Business analytics application: compound interest
Equation for growth of an investment with continuous compoundingof interest?
S(t) = value of the investment at time t
r = annual interest rate compounded after every time interval ∆t
k = annual deposit amount
suppose that an installment is deposited after every time interval ∆t
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
Example: S(t) = $10000, r = 6% per year, ∆t = 1 month = 1/12 year
The interest awarded after 1 month is r∆tS = (0.06/12)×$10000 = $50
Yuliya Tarabalka ([email protected]) Differential Equations 27 / 31
First-order Differential Equations
Business analytics application: compound interest
Equation for growth of an investment with continuous compoundingof interest?
S(t) = value of the investment at time t
r = annual interest rate compounded after every time interval ∆t
k = annual deposit amount
suppose that an installment is deposited after every time interval ∆t
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
Example: S(t) = $10000, r = 6% per year, ∆t = 1 month = 1/12 year
The interest awarded after 1 month is r∆tS = (0.06/12)×$10000 = $50
Yuliya Tarabalka ([email protected]) Differential Equations 27 / 31
First-order Differential Equations
Business analytics application: compound interest
Equation for growth of an investment with continuous compoundingof interest?
S(t) = value of the investment at time t
r = annual interest rate compounded after every time interval ∆t
k = annual deposit amount
suppose that an installment is deposited after every time interval ∆t
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
Example: S(t) = $10000, r = 6% per year, ∆t = 1 month = 1/12 year
The interest awarded after 1 month is r∆tS = (0.06/12)×$10000 = $50
Yuliya Tarabalka ([email protected]) Differential Equations 27 / 31
First-order Differential Equations
Business analytics application: compound interest
Equation for growth of an investment with continuous compoundingof interest?
S(t) = value of the investment at time t
r = annual interest rate compounded after every time interval ∆t
k = annual deposit amount
suppose that an installment is deposited after every time interval ∆t
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
Example: S(t) = $10000, r = 6% per year, ∆t = 1 month = 1/12 year
The interest awarded after 1 month is r∆tS = (0.06/12)×$10000 = $50
Yuliya Tarabalka ([email protected]) Differential Equations 27 / 31
First-order Differential Equations
Business analytics application: compound interest
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
⇓S(t +∆t) − S(t)
∆t= rS(t) + k
The ODE for continuous compounding of interest and continuousdeposits is obtained by taking the limit ∆t → 0:
dS
dt= rS + k
It can be solved with the initial condition S(0) = S0
S0 = initial capital
Yuliya Tarabalka ([email protected]) Differential Equations 28 / 31
First-order Differential Equations
Business analytics application: compound interest
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
⇓S(t +∆t) − S(t)
∆t= rS(t) + k
The ODE for continuous compounding of interest and continuousdeposits is obtained by taking the limit ∆t → 0:
dS
dt= rS + k
It can be solved with the initial condition S(0) = S0
S0 = initial capital
Yuliya Tarabalka ([email protected]) Differential Equations 28 / 31
First-order Differential Equations
Business analytics application: compound interest
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
⇓S(t +∆t) − S(t)
∆t= rS(t) + k
The ODE for continuous compounding of interest and continuousdeposits is obtained by taking the limit ∆t → 0:
dS
dt= rS + k
It can be solved with the initial condition S(0) = S0
S0 = initial capital
Yuliya Tarabalka ([email protected]) Differential Equations 28 / 31
First-order Differential Equations
Business analytics application: compound interest
The value of the investment at the time t +∆t is given by:
S(t +∆t) = S(t) + (r∆t)S(t) + k∆t
⇓S(t +∆t) − S(t)
∆t= rS(t) + k
The ODE for continuous compounding of interest and continuousdeposits is obtained by taking the limit ∆t → 0:
dS
dt= rS + k
It can be solved with the initial condition S(0) = S0
S0 = initial capital
Yuliya Tarabalka ([email protected]) Differential Equations 28 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
∫S
S0
dS
rS + k = ∫t
0dt
1
rln( rS + k
rS0 + k) = t
rS + k = (rS0 + k)ert
S = rS0ert + kert − k
r
S = S0ert + k
rert(1 − e−rt)
Yuliya Tarabalka ([email protected]) Differential Equations 29 / 31
First-order Differential Equations
Business analytics application: compound interest
The ODE for the growth of an investment:
dS
dt= rS + k
The solution:
S = S0ert + k
rert(1 − e−rt)
The first term on the right-hand side comes from the initial investedcapital
The second term comes from deposits (or withdrawals)
Compounding results in the exponential growth of an investment
Yuliya Tarabalka ([email protected]) Differential Equations 30 / 31
First-order Differential Equations
Business analytics application: compound interest
The solution to the ODE for the growth of an investment:
S = S0ert + k
rert(1 − e−rt)
Exercise: A 25-year old plans to set aside a fixed amount every year,invests at a real return of 6%, and retires at age 65. How much musthe invest every year to have $8,000,000 at retirement?
Solution:
k = rS(t)ert − 1
k = 0.06 × 8,000,000
e0.06×40 − 1= $47,889year−1
Yuliya Tarabalka ([email protected]) Differential Equations 31 / 31
First-order Differential Equations
Business analytics application: compound interest
The solution to the ODE for the growth of an investment:
S = S0ert + k
rert(1 − e−rt)
Exercise: A 25-year old plans to set aside a fixed amount every year,invests at a real return of 6%, and retires at age 65. How much musthe invest every year to have $8,000,000 at retirement?
Solution:
k = rS(t)ert − 1
k = 0.06 × 8,000,000
e0.06×40 − 1= $47,889year−1
Yuliya Tarabalka ([email protected]) Differential Equations 31 / 31
First-order Differential Equations
Business analytics application: compound interest
The solution to the ODE for the growth of an investment:
S = S0ert + k
rert(1 − e−rt)
Exercise: A 25-year old plans to set aside a fixed amount every year,invests at a real return of 6%, and retires at age 65. How much musthe invest every year to have $8,000,000 at retirement?
Solution:
k = rS(t)ert − 1
k = 0.06 × 8,000,000
e0.06×40 − 1= $47,889year−1
Yuliya Tarabalka ([email protected]) Differential Equations 31 / 31