Chapter 2
Chapter 2
Chapter 2
-sin(3x)
-e^3x
-sin(3x)
Notice you need to hit the space bar twice before -sin(3x) . Of
course you also need hit space bar twice too before entering -e^3x to
exit the square root operator.
In general, you will need to hit the space bar as many times
an need to escape the power(subscript, division, etc.) mode
before you enter next term.
The backslash \ brings up the square root operator. Finally in
the integration variable place holder type x(see Figure 2 for the position
of each place holder.) Now hold down[Ctrl] to type [.] key and click on
any region outside the bounding box, if not in the auto execution
mode hit [F9] too, to find the antiderivative
Z
3
2
1
1
x + 2 e3x sin(3x) dx (x + 2) 2 exp3x + cos(3x)
3
3
3
. Here exp represent exponential function. From Calculus, we know
that
Z
3
2
1
1
x + 2 e3x sin(3x) dx = (x + 2) 2 exp3x + cos(3x) + C.
3
3
3
Mathcad omits the C for believing you know it! Remember C is important when we try to find a particular solution for a given, so called,
initial condition.
Example 1.3. Find a function x(t) such that x0 (t) = 2t and x(0) =
3.
Solution
which leads to
x(t) = t2 + C.
(1)
2. SEPARABLE EQUATIONS
R
x3
(c) (x2 +3)(x+5)
dx
R
2
(d) x tan(x + 1) dx
2. Separable equations
If we let x be the independent variable and y be the dependent
variable, a separable ODE is given by,
y 0 = f (x)g(y)
dy
where both f and g are given one variable functions and y 0 = dx
is the
derivative of y(x) with respect to x and y(x) is the unknown function
we want to find out.
When g(y) 1, that is g(y) is a constant function whose value is
always 1, the separable ODE becomes
y 0 = f (x)
, which is sometimes called integrable ODE . The general solution to
the integrable ODE is the antiderivative of f (x), i.e.
Z
y(x) = f (x) dx
So if we can find the antiderivative of f (x) we can find the explicit
general solution.
Example 2.1. Find solution y 0 = x2 + 3
Solution
dy
=
g(y)
Z
f (x) dx,
dI
= (b(t)S(t) r(t))I,
dt
divide its both sides by I, multiplying its both sides by dt and taking
antiderivative we have
Z
Z
dI
= b(t)S(t) r(t) dt
I
The left side is easy to find,
Z
dI
(3)
= ln |I| + C
I
Plug in the given functions, we get the right hand side
Z
Z
b(t)S(t) r(t) dt = t2 e3t 4 dt
I0 =
2. SEPARABLE EQUATIONS
Now open Mathcad window, click any blank area, type [Ctrl][I] to get
the antiderivative operator
Z
d
type t^2 *e^{-3t}
- 4 in the integrant place holder (again using
space bar to exit the power mode) and t in the other place holder, then
type [Ctrl][.], click any area outside the box. You will get
Z
1
2
2
(4)
t2 e3t 4 dt = t2 e3t te3t e3t 4t + C
3
9
27
Put (3) and (4) together, we have
ln |I(t)| = 13 t2 e3t 29 te3t
2 3t
e
27
4t + C
3t
3t
I(t) = e 3 t e 9 te 27 e 4t+C
1 2 3t 2 3t
2 3t
= Ce 3 t e 9 te 27 e 4t
a
The next example shows that sometimes we can find explicit formula for the solution of an separable ODE .
Example 2.3. Find general solution of y 0 =
ex +2x
sin(y)+3y 2 +3
dy
Solution Write y 0 as dx
, multiply both sides of the equation by
2
(sin(y) + 3y + 3)dy and take antiderivative, we have
Z
Z
2
sin(y) + 3y + 3 dy = ex + 2x dx
Z
ex + 2x dx = ex + x2 + C
Project
y(x) = e
a(x) dx
b(x)e
a(x) dx
dx + C
Click on the
T (t) = ekt
kekt 80 10 cos(t) dt + C .
k
kt
kt
kt
kt
e cos(t)+ 2
e sin(t)
ke 8010 cos(t) dt = 80e 10k 2
k + 2
k + 2
So the solution is
k
ekt cos(t)+ 2
ekt sin(t) +C
T (t) = ekt 80ekt 10k 2
k + 2
k + 2
a
Example 3.2. If in Example 3.1, we set k = 0.2 and = 4 , we
would have general solution
3.2
4
0.2t
0.2t
0.2t
0.2t
80e 5
T (t) = e
e cos(t)+
e sin(t) +C
0.64 + 2
0.64 + 2
The following graph displayed curves of several solutions with different
initial values T (0).
11
suppose r(t) = cos2 (t), find the general solution and graph
the solution for several different value for the constant C in
the same coordinate. Explain the long time behavior of the
solutions.
Drug Elimination: Let A(t) be the amount of certain drug in the bloodstream, measured by the excess over the
natural level of the drug. Then in many situations A(t) will
decline at a rate proportional to the current excess amount.
That is
dA
= A,
dt
where > 0 is called the elimination parameter of the drug.
Suppose for one type of drug, (t) = t21+4 find the general
solution. Discuss its longtime behavior by graphing several
solutions in the same coordinate.
dy
+ a(x)y = b(x)y n .
dx
You can see that when n = 1, we get linear equation. So linear equation
is a special case of Bernoulli equation. On the other hand if we let
v = y 1n , then
dv
dy
= (1 n)y n
dx
dx
n
Dividing both side of (5) by y , we have
y n
dy
+ a(x)y 1n = b(x)
dx
So
(6)
1 dv
+ a(x)v = b(x).
1 n dx
a bx + v 0 x = 0
1
x
is v, we have
v 0 + av b = 0,
or
v 0 + av = b.
Apply the solution formula for linear equation we have
Z
!
v = e
a dt
be
So
1
x= =
v
R
e
be
a dt
dt + C
a dt
a dt
dt + C
a
Solution
13
e
R
be
a dt
a dt
dt + C
So
x=
eat
R
eat
!=
beat dt + C
b at
e
a
!,
+C
a
,
b + aCeat
x(t) = e
a(t) dt
b(t)e
a(t) dt
!
dt + C ,
15
R
R
with a(t) = 2t and b(t) = 4t3 . So a(t) dt = 2t dt = t2 , and
Z
!
x(t) = et
4t3 et dt + C .
t2
2 t2
t2
x(t) = e
2t e 2e + C
Let t = 0 we have x(0) = C 2. From initial condition x(0) = 1 we see
that C = 3. So the solution is
t2
2 t2
t2
x(t) = e
2t e 2e + 3
a
However, for general first order ODE , the problem is not so nice,
the following theorem is a little bit hard to state and to understand.
Theorem 4.2. Let f (t, x) be defined on interval I. If the partial
(t,x)
derivative of f (t, x) with respect to y (denoted as fy
, reads partial f(t,x) over partial y) and f (t, x) are continuous at an open disk
centered at (t0 , x0 ), then the initial value problem
0
x = f (t, x)
x(t0 ) = x0
has an unique solution on some open interval containing the point t0 .
Remark 4.1. We will not discuss this existence and uniqueness
theorem for general ODE . But we would like to make some comments.
(t,x)
- To find ft
, you just need to treat x variable as a constant,
(t,x)
for example, let f (t, x) = t2 x3 + 3t 4x, we have ft
=
3
2tx +3, here 4x is a constant with respect to t, so the derivative
is 0, and x3 is also a constant, so t2 x3 when taking derivative
against t we have 2tx3 . Therefore finding partial derivative is
as easy as to find ordinary derivative.
- This theorem only guarantees a solution defined for t in an
open interval, which might be a bounded interval. For example
1
is the general solution, if
x0 = x2 , we see that x(t) = t+c
c = 2 then the solution is only defined on interval (0, 2) as
1
x(t) = t2
will become undefined at t = 2.
- Some time we could have more than one solution that satisfies
2
the same initial condition, for example, for x0 = x 3 and x(0) =
0 we have two different solution, one is x(t) = 0 another one
(t,x)
1
is x(t) = t 3 . The reason is that for f (t, x) = x 3 , fx
=
3x
which is undefined at (0, 0). So the conditions of the theorem
are violated.
17
Step one: Set f (x) = 0 solve the equation. The solution is called the
critical number of the equation x0 = f (x).
Step two: Plot the solution one a horizontal (or vertical)number line.
The solutions will divide the line into intervals (segments),
pick any number from each interval (segment) and determine
the sign of the value of f (x) at the picked value.
Step three: Using the sign in Step two to draw arrow on each segment, a
right (up) arrow for positive sign and a left (down) arrow for
negative sign.
Example 5.1. Draw phase diagram for x0 = (x 1)(x + 2)(x 3).
Solution
Step one: Here f (x) = (x 1)(x + 2)(x 3) so f (x) = 0 gives
(x 1)(x + 2)(x 3) = 0,
and it has three solutions, x = 2, 1, 3
Step two: Plot the three solution on the number line,
+
+
Step three: Draw the arrows on the number line. A right arrow for
positive sign and a left arrow for negative sign.
a
2
(a) d dtx(t)
> 0 on intervals, (2, 23 13 19), (1, 23 + 13 19), and
2
(3, ).
2
< 0 on intervals, (, 2), ( 32 31 19, 1), and ( 23 +
(b) d dtx(t)
2
1
19, 3).
3
With this information and the phase diagram we have the following
picture of typical solutions for x0 = (x 1)(x + 2)(x 3),
19
21
font. You can do this for headings etc. Graph Vector field
Goal: Familiar your self with an many different kind of vector fields,
defined by x0 = f (t, x), as possible and identify many general features
of solutions, especially the following features,
Does the equation has constant solutions? A constant solution is shown in vector field as horizontal line segments since
constant solution has slope equals zero.
Does solutions converge to an particular solution in the lang
run?
Do solutions grow to infinite an a finite time? Her vertical bars
indicate a solution might become unbounded in short time.
Do solutions display any periodicity? We know sin(t) has period of 2 and solution curve repeats itself. Here large interval
for t might be needed.
You can use the following functions
f (t, x) = sin(x)
f (t, x) = cos(t)
f (t, x) = x(x 1)
f (t, x) = et x + sin(x)
f (t, x) = x + xsin(t)
You should use the provide Mathcad file at the website
www.unf.edu/mzhan/vectorfield.mcd
as a starting point and superimpose solutions to the vector fields so
support your observation.