Math 307 Lecture 4 - First Order Linear Equations!

Equation-Solving Lovefest!
Math 307 Lecture 4
First Order Linear Equations!
W.R. Casper
Department of Mathematics
University of Washington
October 1, 2014
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Today!
Last time:
First-Order Linear Equations
Method: Integrating factors
Method: Variation of parameters
This time:
More practice with First-Order Linear and Separable ODEs
Next time:
Modeling with First Order Equations
First homework due Friday!!!
W.R. Casper
Math 307 Lecture 4
Today’s lecture brought to
you by
Equation-Solving Lovefest!
Outline
1
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve the separable equation:
Example
Solve the separable equation y 0 = cos2 (x) cos2 (2y )
First we "separate":
sec2 (2y )y 0 = cos2 (x)
1
1
1
tan(2y ) = x+ sin(2x)+C
2
2
4
Lastly, if we can, solve for y :
2
2
sec (2y )dy = cos (x)dx
Then we integrate:
Z
Z
2
sec (2y )dy = cos2 (x)dx
W.R. Casper
y=
1
1
arctan(x+ sin(2x)+C)
2
2
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve the homogeneous equation:
Example
Solve the homogeneous equation y 0 =
Put it in a homogeneous form:
y0 =
1 + 3(y /x)
1 − (y /x)
z = y /x, y = z + xz
z + xz 0 =
Separate:
xz 0 =
Use the change of variables
0
x+3y
x−y
0
1 + 3z
1−z
W.R. Casper
1 + 2z + z 2
1−z
1−z
1
dz = dx
x
1 + 2z + z 2
Integrate:
Z
Z
1−z
1
dz =
dx
2
x
1 + 2z + z
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve the homogeneous equation (continued):
Example
Solve the homogeneous equation y 0 =
−2
− ln |1 + z| = ln |x| + C
1+z
x+3y
x−y
Figure : Plot of curve for c = 0
Replace z = y /x:
−2
−ln |1+(y /x)| = ln |x|+C
1 + (y /x)
Hard to solve for y (use Weierstrass W-function)
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with an integrating factor:
Example
2
Solve the first-order linear equation y 0 + 2ty = 2te−t by finding
an integrating factor.
Suppose that µ = µ(t) is the integrating factor
Then the linear equation
µ(t)y 0 + 2tµ(t)y = 2tµ(t)e−t
must be exact!
This means µ0 (t) = 2tµ(t).
W.R. Casper
Math 307 Lecture 4
2
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with an integrating factor (continued):
Example
2
Solve the first-order linear equation y 0 + 2ty = 2te−t by finding
an integrating factor.
The equation µ0 (t) = 2tµ(t) is separable
1
dµ
µ
Z
Z
1
2tdt =
dµ
µ
2tdt =
W.R. Casper
t 2 + C = ln |µ|
Need only 1 solution (C = 0)
µ = et
Math 307 Lecture 4
2
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with an integrating factor (continued):
Example
2
Solve the first-order linear equation y 0 + 2ty = 2te−t by finding
an integrating factor.
Plug in µ to get an exact equation
2
2
et y 0 + 2tet y = 2t
Gather up the y parts
Then we integrate:
Z
Z
2
(et y )0 dt = 2tdt
2
et y = t 2 + C
2
(et y )0 = 2t
Solve for y
2
y = t 2 e−t + Ce−t
W.R. Casper
Math 307 Lecture 4
2
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Integrating factors, another example!
Example
Solve the first-order linear equation y 0 + y = 5 sin(2t) by finding
an integrating factor.
Let µ = µ(t) be the integrating factor
Then the linear equation
µ(t)y 0 + µ(t)y = 5µ(t) sin(2t)
must be exact!
This means that
µ0 (t) = µ(t)
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with an integrating factor (continued):
Example
Solve the first-order linear equation y 0 + y = 5 sin(2t) by finding
an integrating factor.
The equation µ(t) = µ0 (t) is separable!
1
dµ
µ
Z
Z
1
dt =
dµ
µ
dt =
W.R. Casper
t + C = ln |µ|
Need only 1 solution (C = 0)
µ = et
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with an integrating factor (continued):
Example
Solve the first-order linear equation y 0 + y = 5 sin(2t) by finding
an integrating factor.
Plug in µ to get an exact equation
et y 0 + et y = 5et sin(2t)
Gather up the y parts
Then we integrate:
Z
Z
t
0
(e y ) dt = 5et sin(2t)dt
et y = et sin(2t)−2et cos(2t)+C
(et y )0 = 5et sin(2t)
Solve for y
y = sin(2t) − 2 cos(2t) + Ce−t
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Solve with variation of parameters:
Example
Solve the first-order linear equation ty 0 + 2y = sin(t) by
variation of parameters.
First solve the homogeneous
equation:
tyh0 + 2yh = 0
This is separable!
Then define v (t) by y = vyh
Then from V.O.P. equation
Z
q(t)
v (t) =
dt
yh (t)
with q(t) = sin(t), and thus
tyh0 = −2yh
A solution is yh =
v (t) = 2t sin(t)−(t 2 −2) cos(t)+C
t −2
Lastly y = vyh
y = v (t)yh = 2t −1 sin(t) − (1 − 2t −2 ) cos(t) + Ct −2
W.R. Casper
Math 307 Lecture 4
Equation-Solving Lovefest!
Separable and homogeneous equations
Integrating factors and Variation of Parameters
Summary!
What we did today:
We reviewed our current toolbox of solution methods
Plan for next time:
First homework due Friday!!
Modeling with first order equations
W.R. Casper
Math 307 Lecture 4