2017.EngineeringMathematics - Differentialequations 2
2017.EngineeringMathematics - Differentialequations 2
– Differential Equations –
Eric Yee
1st Trimester
ODE – Separating Variables
• Many practically useful ODEs can be reduced to the
form:
g ( y ) y′ = f (x )
∫ g ( y )y′dx = ∫ f (x )dx + c
∫ g ( y )dy = ∫ f (x )dx + c
• If f and g are continuous functions, the integrals exist
and by evaluating them, we obtain a general solution.
This method of solving ODEs is called the method of
separating variables (y appears only on the left while
the x appears only are on the right).
ODE – Separating Variables
• Example: The probability per − dn(t ) = λn(t )dt
unit time that a nucleus will
dn(t )
decay is constant. Let us call − = λdt
n(t )
this decay constant λ and at
time t, the number of atoms as dn(t )
−∫ dy = ∫ λdt
n(t). Derive the number of n(t )
undecayed nuclei at time t,
when the number of atoms at − ln n(t ) = λt + c
t = 0 is n0, that is n(0) = n0. n(t ) = e − λt −c
n(t ) = n0 e − λt
Activity α (t ) = α 0 e − λt
Modeling – Mixing Tank
• Problem: Consider a mixing problem involving a
single tank. A tank with 1,000 gal of water in
which initially 100 kg of salt is dissolved. Brine
runs in at a rate of 10 gal/min, and each gallon
contains 5 kg of dissolved salt. The mixture in the
tank is kept uniform by stirring. Brine runs out at
10 gal/min. Find the amount of salt in the tank at
any time t.
Modeling – Mixing Tank
• Step 1: Setting up a model. Let y(t) denote the amount of
salt in the tank at time t. Its time rate of change is
y’ = Salt inflow rate – Salt outflow rate Balance law
• Verify that the given ODE is exact (leave to you!). We find u(x,y)
using
u = − ∫ sin y cosh x dy + l ( x ) = cos y cosh x + l ( x )
from this,
∂u dl
= cos y sinh x + = M = cos y sinh x + 1
∂x dx
Hence dl/dx = 1 and from integration, l(x) = x + c1. This gives the
general solution
u ( x, y ) = cos y cosh x + x = c
y ( x ) = ce − ∫ p ( x )dx
• If c = 0, then we obtain the trivial solution y(x) = 0
Linear ODEs
• When the linear ODE has r(x) ≠ 0, it is considered
nonhomogeneous.
y′ + p(x ) y = r (x )
• By applying an appropriate integrating factor (actually
F = eh), we are able to obtain a solution
h = ∫ p( x )dx
(
y (x ) = e − h ∫ e h r dx + c )
• If we re-write the solution, we can see it is a sum of
two terms
y ( x ) = e − h ∫ e h r dx + ce − h