Ordinary Differential Equations Dr. Marco A Roque Sol 12/01/2015 First Order Differential Equations

advertisement
First Order Differential Equations
Ordinary Differential Equations
Dr. Marco A Roque Sol
12/01/2015
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
First Order Differential Equations
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Example 4
Solve the following IVP:
cos(x)y 0 +sin(x)y = 2cos 3 (x)sin(x)−1;
√
π
y( ) = 3 2
4
0≤x <2
Solution
Rewrite the differential equation to get the coefficient of the
derivative a one.
1
sin(x)
y = 2cos 2 (x)sin(x) −
y0 +
cos(x)
cos(x)
y 0 + tan(x)y = 2cos 2 (x)sin(x) − sec(x)
Now find the integrating factor:
µ(x) = e
R
tanxdx
= e ln|secx| = e lnsecx = secx
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Multiply the integrating factor through the differential equation
and verify the left side is a product rule.
sec(x)y 0 + sec(x)tan(x)y = 2cos 2 (x)sin(x)sec(x) − sec 2 (x)
(sec(x)y (x))0 = 2cos(x)sin(x) − sec 2 (x)
Z
sec(x)y (x) =
2cos(x)sin(x) − sec 2 (x) dx
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Z
sec(x)y (x) =
sin(2x) − sec 2 (x) dx
1
sec(x)y (x) = − cos(2x) − tan(x) + c
2
y (x) = −
1 cos(2x) tan(x)
c
−
+
2 sec(x)
sec(x) sec(x)
y (x) = −
1 cos(2x)
− sin(x) + ccos(x)
2 sec(x)
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Finally, apply the initial condition to find the value of c.
√
1 cos( π2 )
π
π
π
3 2 = y( ) = −
π − sin( ) + ccos( )
4
2 sec( 4 )
4
4
√
√
√
2
2
3 2=−
+c
2
2
c=7
The solution is then
1
y (x) = − cos(2x)cos(x) − sin(x) + 7cos(x)
2
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Below is a plot of the solution.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Example 5
Find the solution to the following IVP.
ty 0 + 2y = t 2 − t + 1;
y (1) =
1
2
Solution
First, divide through by the t to get the differential equation into
the correct form.
1
2
y0 + y = t − 1 +
t
t
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Now find the integrating factor:
µ(t) = e
R
2
dt
t
2
2
= e 2ln|t| = e ln|t | = e lnt = t 2
Now, multiply the rewritten differential equation by the integrating
factor.
0
t 2y = t 3 − t 2 + t
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Integrate both sides and solve for the solution.
Z
2
t y =
t 3 − t 2 + t dt
t 2y =
y=
t4 t3 t2
−
+
+c
4
3
2
t2
t
1
c
− + + 2
4
3 2 t
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
And applying initial conditions
1
1 1 1
= y (1) = − + + c
2
4 3 2
c=
1
12
The solution is then,
y=
t2
t
1
1
− + +
4
3 2 12t 2
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Here is a plot of the solution.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Example 6
Find the solution to the following IVP.
ty 0 − 2y = t 5 sin(2t) − t 3 + 4t 4 ;
3
y (π) = (π))4
2
Solution
First, divide through by the t to get the differential equation into
the correct form.
2
y 0 − y = t 4 sin(2t) − t 2 + 4t 3
t
Dr. Marco A Roque Sol
Ordinary Differential Equations
Linear Equations
Separable Equations
First Order Differential Equations
Linear Equations
Now find the integrating factor:
1
t2
Now, multiply the rewritten differential equation by the integrating
factor.
1 0
1
1 2
y − 2 y = 2 t 4 sin(2t) − t 2 + 4t 3
2
t
t t
t
−2 0
2
t y = t sin(2t) − 1 + 4t
µ(t) = e −
R
2
dt
t
2
2
= e −2ln|t| = e −ln|t | = e −lnt =
Dr. Marco A Roque Sol
Ordinary Differential Equations
Linear Equations
Separable Equations
First Order Differential Equations
Linear Equations
Integrate both sides and solve for the solution.
Z
−2
t y =
t 2 sin(2t) − 1 + 4t dt
t
−2
Z
y=
2
Z
t sin(2t)dt −
Z
dt +
4tdt
1
1
1
t −2 y = − t 2 cos(2t) + tsin(2t) + cos(2t) − t + 2t 2 + c
2
2
4
1
1
1
y = − t 4 cos(2t) + t 3 sin(2t) + t 2 cos(2t) − t 3 + 2t 4 + ct 2
2
2
4
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
And applying initial conditions
3 2
1
(π) = y (π) = − (π)4 cos(2(π)) + ... − (π)3 + 2(π)4 − c(π)2
2
2
1
(π)3 − (π)2 = c(π)2
4
c =π−
1
4
The solution is then,
1
1
1
1
y = − t 4 cos(2t) + t 3 sin(2t) + t 2 cos(2t) − t + 2t 4 + (π − )t 2
2
2
4
4
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Here is a plot of the solution.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Example 7
Find the solution to the following IVP and determine all possible
behaviors of the solution as t goes to infinity. If this behavior
depends on the value of y0 , give this dependence.
2y 0 − y = 4sin(3t);
Solution
y (0) = y0
First, divide through by the t to get the differential equation into
the correct form.
1
y 0 − y = 2sin(3t)
2
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Now find the integrating factor:
µ(t) = e −
R
1
dt
2
t
= e− 2
Now, multiply the rewritten differential equation by the integrating
factor.
t
t 1
t
e − 2 y 0 − e − 2 y = 2sin(3t)e − 2
2
t 0
t
e − 2 y = 2sin(3t)e − 2
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Integrate both sides and solve for the solution.
t Z
t
e − 2 y = 2sin(3t)e − 2 dt
t
e− 2 y = −
y =−
t
24 − t
4
e 2 cos(3t) − e − 2 sin(3t) + c
37
37
t
4
24
cos(3t) − sin(3t) + ce 2
37
37
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
And applying initial conditions
y0 = y (0) = −
c = y0 +
24
+c
37
24
37
The solution is then,
y =−
t
24
4
24
cos(3t) − sin(3t) + y0 +
e2
37
37
37
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Now that we have the solution, let’s look at the long term behavior
of the solution.
The first two terms of the solution will remain finite for all values
of t. It is the last term that will determine the behavior of the
solution.
The exponential will always go to infinity as t goes to infinity,
however depending on the sign of the coefficient c ( = y0 + 24
37 ).
The following analysis gives the long term behavior of the solution
for all values of c.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
Range of c
c <0
c=0
c >0
Behavior of solution as
y →∞
y finite
y →∞
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Linear Equations
A graph of several of the solutions is shown below
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
We are now going to start looking at nonlinear first order
differential equations. The first type of nonlinear first order
differential equations that we will look at is separable differential
equations.
A separable differential equation is any differential equation that
we can write in the following form.
N(y )
dy
= −M(x)
dx
or equivalently
N(y ) dy
dx + M(x) = 0
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
M(x)dx + N(y )dy = 0
dy
−M(x)
=
dx
N(y )
dy
= f (x)g (y )
dx
Note that in order for a differential equation to be separable all the
y 0 s in the differential equation must be multiplied by the derivative
and all the x 0 s in the differential equation must be on the other
side of the equal sign.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
Solving a separable differential equation is fairly easy. First of all,
we rewrite the differential equation as the following
N(y )dy = −M(x)dx
Then you integrate both sides.
R
R
N(y )dy = − M(x)dx
So, after doing the integrations, will have an implicit solution that
you can hopefully solve for the explicit solution, y (x).
Note that it won’t always be possible to solve for an explicit
solution.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
Example 8
Solve the following differential equation and determine the interval
of validity for the solution.
dy
= 6y 2 x;
dx
y (1) =
1
25
Solution
It is clear, that this differential equation is separable. So, let us
separate the differential equation and integrate both sides.
As with the linear first order officially we will pick up a constant of
integration on both sides from the integrals on each side of the
equal sign.
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
The two can be moved to the same side and absorbed into each
other. We will use the convention that puts the single constant on
the side with the xs.
y −2 dy = 6xdx
Z
Z
−2
y dy = 6xdx
−
1
= 3x 2 + c
y
Applying initial conditions
−
1
1
25
= 3(1)2 + c
Dr. Marco A Roque Sol
Ordinary Differential Equations
First Order Differential Equations
Linear Equations
Separable Equations
Separable Equations
c = −28
Plug this into the general solution and then solve to get an explicit
solution.
−
1
= 3x 2 − 28
y
y (x) =
1
28 − 3x 2
From the solution
its natural
r
r Domain
r is
r we obtained,
28
28
28
28
; −
<x <
;
<x <∞
−∞ < x < −
3
3
3
3
Dr. Marco A Roque Sol
Ordinary Differential Equations
Download