First-Order Differential Equations
Definitions
CS 130: Mathematical Methods in Computer Science Ordinary Differential Equations Nestine Hope S. Hernandez Algorithms and Complexity Laboratory Department of Computer Science University of the Philippines, Diliman nshernandez@dcs.upd.edu.ph Day 8
First-Order Differential Equations
Definitions
Ordinary Differential Equations
Definitions
First-Order Differential Equations Separable Equations Homogeneous Linear First-Order ODE Non-homogeneous Linear First-Order ODE
First-Order Differential Equations
Definitions
Ordinary Differential Equations
Definitions
First-Order Differential Equations Separable Equations Homogeneous Linear First-Order ODE Non-homogeneous Linear First-Order ODE
Definitions
First-Order Differential Equations
A differential equation is an equation relating an unknown function to one or more of its derivatives.
First-Order Differential Equations
Definitions
A differential equation is an equation relating an unknown function to one or more of its derivatives.
Example 1. 2.
dy dx = cos x d2 y dx2 + ky = 2 2
0
3. (x + y )dx − 2xydy = 0 ∂2u 2 ∂2u 4. ∂u = h + 2 2 ∂t ∂x ∂y 2
d i di 5. L dt 2 + R dt +
1 Ci
= Eω cos ωt
First-Order Differential Equations
Definitions
A differential equation is an equation relating an unknown function to one or more of its derivatives.
Example 1. 2.
dy dx = cos x d2 y dx2 + ky = 2 2
0
3. (x + y )dx − 2xydy = 0 ∂2u 2 ∂2u 4. ∂u = h + 2 2 ∂t ∂x ∂y 2
d i di 5. L dt 2 + R dt +
1 Ci
= Eω cos ωt
• independent variable • dependent variable • parameter
————————————
First-Order Differential Equations
Definitions
A differential equation is an equation relating an unknown function to one or more of its derivatives.
Example 1. 2.
dy dx = cos x d2 y dx2 + ky = 2 2
0
3. (x + y )dx − 2xydy = 0 ∂2u 2 ∂2u 4. ∂u = h + 2 2 ∂t ∂x ∂y 2
d i di 5. L dt 2 + R dt +
1 Ci
= Eω cos ωt
• independent variable • dependent variable • parameter
———————————— • ordinary differential equations • partial differential equations
Definitions
First-Order Differential Equations
The order of a differential equation is the order of the highest-ordered derivative appearing in the equation.
First-Order Differential Equations
Definitions
The order of a differential equation is the order of the highest-ordered derivative appearing in the equation. Example :
d2 y dx2
dy 3 + 2b( dx ) +y =0
First-Order Differential Equations
Definitions
The order of a differential equation is the order of the highest-ordered derivative appearing in the equation. Example :
d2 y dx2
dy 3 + 2b( dx ) +y =0
A solution of a differential equation is a differentiable function that satisfies the equation on some interval (a, b) of values for the independent variable.
First-Order Differential Equations
Definitions
The order of a differential equation is the order of the highest-ordered derivative appearing in the equation. Example :
d2 y dx2
dy 3 + 2b( dx ) +y =0
A solution of a differential equation is a differentiable function that satisfies the equation on some interval (a, b) of values for the independent variable.
Example y = e2x is a solution of the equation
d2 y dx2
+
dy dx
− 6y = 0.
First-Order Differential Equations
Definitions
Ordinary Differential Equations
Definitions
First-Order Differential Equations Separable Equations Homogeneous Linear First-Order ODE Non-homogeneous Linear First-Order ODE
Definitions
First-Order Differential Equations
Differential equations of order one may be written as
Definitions
First-Order Differential Equations
Differential equations of order one may be written as
dy dx
= f (x, y).
Definitions
First-Order Differential Equations
Differential equations of order one may be written as We can write the equation in the form
dy dx
= f (x, y).
Definitions
First-Order Differential Equations
Differential equations of order one may be written as
dy dx
= f (x, y).
We can write the equation in the form M (x, y)dx + N (x, y)dy = 0.
First-Order Differential Equations
Definitions
Differential equations of order one may be written as
dy dx
= f (x, y).
We can write the equation in the form M (x, y)dx + N (x, y)dy = 0.
Example dy dx
= 1 − xy + y 2
First-Order Differential Equations
Definitions
Differential equations of order one may be written as
dy dx
= f (x, y).
We can write the equation in the form M (x, y)dx + N (x, y)dy = 0.
Example dy dx
= 1 − xy + y 2
If it happens that M is a function of x only and N is a function of y only, then M (x)dx + N (y)dy = 0. Such an equation is said to be separable.
First-Order Differential Equations
Definitions
Separable Equations M (x)dx + N (y)dy = 0 A separable equation can be solved by integrating the functions M and N .
First-Order Differential Equations
Definitions
Separable Equations M (x)dx + N (y)dy = 0 A separable equation can be solved by integrating the functions M and N .
Example Solve the following equations: 1.
dy dx
=
x2 1−y 2
First-Order Differential Equations
Definitions
Separable Equations M (x)dx + N (y)dy = 0 A separable equation can be solved by integrating the functions M and N .
Example Solve the following equations: 1.
dy dx
=
x2 1−y 2
2.
dy dx
=
4x−x3 4+y 3
First-Order Differential Equations
Definitions
Separable Equations M (x)dx + N (y)dy = 0 A separable equation can be solved by integrating the functions M and N .
Example Solve the following equations: 1.
dy dx
=
x2 1−y 2
2.
dy dx
=
4x−x3 4+y 3
3.
dy dx
=
(y−3) cos x 1+2y 2
First-Order Differential Equations
Definitions
Separable Equations M (x)dx + N (y)dy = 0 A separable equation can be solved by integrating the functions M and N .
Example Solve the following equations: 1.
dy dx
=
x2 1−y 2
2.
dy dx
=
4x−x3 4+y 3
3.
dy dx
=
(y−3) cos x 1+2y 2
4.
dy dx
=
3x2 +4x+2 2(y−1)
where y(0) = −1
First-Order Differential Equations
Definitions
Exercises Solve the following equations: 1. xdx + ye−x dy = 0 2. y 0 = (cos 2x)(cos2 y) 3. y 0 = xy 3 (1 + x2 )−1/2 where y(0) = 1
First-Order Differential Equations
Definitions
Homogeneous Linear First-Order ODE Any differential equation of the form a1 (x)y 0 + a0 (x)y = b(x) is a linear first-order differential equation.
First-Order Differential Equations
Definitions
Homogeneous Linear First-Order ODE Any differential equation of the form a1 (x)y 0 + a0 (x)y = b(x) is a linear first-order differential equation. Any other first-order ODE is said to be nonlinear.
First-Order Differential Equations
Definitions
Homogeneous Linear First-Order ODE Any differential equation of the form a1 (x)y 0 + a0 (x)y = b(x) is a linear first-order differential equation. Any other first-order ODE is said to be nonlinear. The simplest linear first-order ODE is of the form y 0 + p(x)y = 0, called a homogeneous linear first-order ODE.
Definitions
Example y 0 + (1 + 3x2 )y = 0
First-Order Differential Equations
First-Order Differential Equations
Definitions
Example y 0 + (1 + 3x2 )y = 0 For any homogeneous fist-order differential equation of the form y 0 + p(x)y = 0, the general solution is Ke竏単 (x) , where P is any antiderivative of p.
First-Order Differential Equations
Definitions
Exercises Solve the following equations: 1. (2 + x2 )y 0 + 2x y = 0 2. y 0 sin 2x + 2y cos 2x = 0 dy dy 3. y + 3x2 dx = x dx
First-Order Differential Equations
Definitions
Non-homogeneous Linear First-Order ODE y 0 + p(x)y = f (x)
First-Order Differential Equations
Definitions
Non-homogeneous Linear First-Order ODE y 0 + p(x)y = f (x)
For any nonhomogeneous linear fist-order differential equation of the form y 0 + p(x)y = f (x), R the general solution is y = e竏単 (x) eP (x) f (x)dx, where P is any antiderivative of p.
First-Order Differential Equations
Definitions
Non-homogeneous Linear First-Order ODE y 0 + p(x)y = f (x)
For any nonhomogeneous linear fist-order differential equation of the form y 0 + p(x)y = f (x), R the general solution is y = e竏単 (x) eP (x) f (x)dx, where P is any antiderivative of p.
Example 1. y 0 + 2y = 4
First-Order Differential Equations
Definitions
Non-homogeneous Linear First-Order ODE y 0 + p(x)y = f (x)
For any nonhomogeneous linear fist-order differential equation of the form y 0 + p(x)y = f (x), R the general solution is y = e竏単 (x) eP (x) f (x)dx, where P is any antiderivative of p.
Example 1. y 0 + 2y = 4 2. y 0 + y tan x = cos x
First-Order Differential Equations
Definitions
Questions? See you next meeting!