Chapter 7 Differential Equations
Chapter 7 Differential Equations
Chapter 7 Differential Equations
Example:
For each of the following differential equations, state which variable is dependent and which is
independent
d 2 y dy
a. x
dx 2 dx
dx 5
b. xt
dt
dvc
c. RC vc Vs ; R, C, Vs are constant
dt
The order of a differential equation is the degree of the highest derivative that occurs in the
equation.
Example:
dy
a. cos x 3 x 2 y x e3 x 0
dx
b. x y '' sin x y ' e xy arctan x
The solution of a differential equation can be obtained when an expression for y in terms of x
that can be substituted into the equation to make both sides equal. Note that a solution is an
expression of the dependent variable in terms of the independent variable.
The most general solution to the differential equation normally contains one or more arbitrary
constants.
Example:
d2y
Function y C1 sin 2 x C2 cos 2 x is a solution to the equation 4 y 0 . Indeed substituting
dx 2
y C1 sin 2 x C2 cos 2 x into equation we obtain
The General Solution to an ODE is the most general solution containing arbitrary constants.
The Particular Solution is obtained from general solution when we assign particular numerical
values to arbitrary constants.
d2y
Thus, function y C1 sin 2 x C2 cos 2 x is a general solution to the equation 4y 0 .
dx 2
Giving arbitrary constants numerical values, say, C1 2 and C2 3 , we obtain a particular
Example:
d 2 y dy
1. Show that y 5e 2 x is a solution of the equation 2y
dx 2 dx
dy
2. Show that y e x is not a solution of 2y
dx
Example:
dy
Solve equation x 1 .
dx
Solution:
The general solution is obtained by integrating f ( x) x 1 .
3
1
2
( x 1) 2 2( x 1) x 1
y x 1dx ( x 1) dx C C ,
3 3
2
where C is an arbitrary constant.
Example:
Solve equation y '' sin 3 x.
Solution:
Integrating once we obtain
1
y ' sin 3 xdx cos 3 x C1 , where C1 is an arbitrary constant.
3
1 1
y cos 3 x C1dx sin 3 x C1 x C2 , C1 and C2 are arbitrary constants.
3 9
Example:
Solve equation y ' x sin 3 x.
Solution:
Integrating
by parts
x u, dx du
cos 3x cos 3 x 1 1
y x sin 3xdx sin 3 xdx dv x dx x cos 3x cos 3 xdx
3 3 3 3
cos 3 x
v
3
1 1
x cos 3x sin 3x C.
3 9
Example:
Obtain the general solution of the equation
dy
1. cos x sin x
dx
d2y
2. 5e 2 x
dx 2
d2y
3. sin
d 2
Separable equations
dy
f ( x) g ( y ) (2)
dx
Example:
dy dy
1. x2 y3 3. ln x sec y
dx dx
dy dy y 1
2. y 2 sin x 4. y
dx dx x 1 x 1
dy
f x dx (3)
gy
To find the general solution of this equation we integrate both parts of (3).
1
g y dy f x dx
Example:
1
Rewrite each equation in g y dy f x dx form
dy dz
1. x2 y3 4. te z
dx dt
dy dv v 2
2. y 2 sin x 5.
dx dr r 2
dy dy
3. ln x sec y 6. y 3x 7
dx dx
Example:
dy y
Find general solution to the equation .
dx x
Solution:
dy dx
We present this equation in the form
y x
Integrating both parts of the equation, we obtain
dy dx
y x
ln | y | ln | x | C
| y | eln| x| C
| y | eC | x |
y eC x
Example:
dy
Find general solution to the equation xy y .
dx
Solution:
dy
We transform this equation to separate variables y ( x 1)
dx
dy
( x 1)dx
y
dy
Integrating we get ( x 1)dx
y
x2
ln | y | xC
2
x2
x C
2
Solving for y, we have y e
x2
x
C 2
y e e
x2
x
C 2
Denoting e by C1 , we obtain the general solution y C1e
Remark: In the solution above C1 eC and thus C1 0 . However y 0 is also a solution to
the equation in example. Hence, we can drop the requirement C1 0 and the general
2
x
dy x
solution to the equation xy y is y C1e 2 , where C1 is arbitrary constant.
dx
Example:
dy
1. Solve the first-order equation 3 ye x by separation of variables
dx
dy cos x
b.
dx sin 2 y
3. When an object such as a mass vibrating on a spring, or a pendulum oscillating under the
action of gravity, moves in simple harmonic motion its velocity v satisfies a differential
equation of the form
dv
v k 2 x
dx
Where x is displacement and k is a constant. Solve the equation.
In all previous examples we were able after integrating to express required solution explicitly as
y f ( x). In some cases it may be extremely difficult or even impossible.
Example:
dy y xy
Find general solution to the equation .
dx x xy
Solution:
Separating variables, we present the equation in the form
y 1 x 1
dy dx
y x
Integrating both parts, we obtain
y 1 x 1
dy dx
y x
1 1
1 y dy 1 x dx
y ln | y | x ln | x | C
y
ln x yC
x
y
eC e x y
x
y C1 xe x y
The last equation cannot be solved for y algebraically, and present the solution implicitly.
General solution to a differential equation generates infinitely many particular solutions. They
are obtained by giving arbitrary constants in the general solution particular numerical values.
Quite often, a particular application calls for a solution of a differential equation satisfying some
additional conditions. These conditions specify particular values for a solution and its derivatives
at given values of independent variable. These conditions are called boundary conditions. In the
special case in which all boundary conditions are given at the same value of independent
variable, the boundary conditions are called initial conditions. To find the solution to an ODE,
satisfying boundary or initial conditions is to solve boundary-value or initial-value
problem.
dy
Example: Solve the initial value problem for the ODE y 2 e3x ; y (0) 1 .
dx
Solution:
dy
First, we separate the variables 2
e3 x dx
y
Integrating both sides of this equality, we obtain:
dy
y 2
e3 x dx
1 1 3x
e C
y 3
3
y 3x
e C
Substituting initial conditions into this general solution, we have:
3
1 0
e C
3
1
1 C
1 C 3
C2
dy
Thus the solution to the differential equation y 2 e3x satisfying initial conditions y (0) 1 is
dx
3
y 3x
.
e 2
Example:
Solve the initial value problem for the ODE xy 2 y ' y 1; y (3e 2 ) 2 .
Solution:
First, we separate the variables
y2 dx
dy
y 1 x
To find general integral, we integrate both sides of this equality
y2 dx
dy
y 1 x
Using long division, we transform this equality into:
1 dx
y 1 y 1 dy x
After integrating, we obtain general integral for the differential equation
1 2
y y ln | y 1| ln | x | C
2
Substituting initial conditions into this equality, we find the value for the constant C.
1 2
2 2 ln | 2 1| ln | 3e 2 | C
2
ln 3 ln 3 2 C
2C 0
C 2
Thus the solution to the initial value problem is
1 2
y y ln | y 1| ln | x | 2
2
Example:
Solve the initial value problem for the ODE y '' 6 x 2; y '(1) 2, y (1) 5.
Solution:
Integrating both sides of this equality, we obtain:
y ' 3 x 2 2 x C1 (*)
2 3 12 2 1 C1
C1 1
y x 3 x 2 x C2 (**)
С2 4
Example:
dx 2
Find the particular solution of t that satisfies the condition x3 0
dt
Example:
Solve the particular solution for ODE x 2 1 y ' x y 1 with initial value y 0 2 .
Example:
Find the particular solution of y 1 x 2 y ' x 1 y 2 0 ;
y0 3
ASSIGNMENT
1. Find the general solution or general integral for the ODE.
4x d. xy ' y y 2
a. 3y '
y2
e. x sin y y ' cos y
b. y xy ' 0
x 2 y2 1
f. y'
c. e x y y ' 3x y x 1
2. Solve the following differential equations with the given initial or boundary conditions.
a. y ' 3 x 2 ( y 2); y (2) 8
2
b. 2 yy ' e x y ; y (4) 2
d2y 3
c. 2
sin 2 x; y '(0) , y (0) 4.
dx 2
d. y '' 24t 2 6t 4; y '(0) 2, y (1) 5.
dx
7. Find the general solutions of the equation t x 2 . Hence, find the particular
dt
solution that satisfies the condition x0 5 .
di
8. The equation iR L E where R, L and E are constants arises in electrical circuit
dt
theory. This equation can be solved by separation of variables. Find the solution that
satisfies the condition i 0 0 .
9. Find the particular solution of y ' ' ' 0 given that y 0 3 , y ' 1 4 and y" 2 6 .
dx
10. Solve the ordinary differential equation (ODE) : 5 x 3 for xt .
dt
dy
11. Solve the ODE with initial condition: 7 y 2 x3 for y 2 3
dx
dy
12. Find the particular solution of the differential equation x y y 1 given y = 2 when
dx
x = 1.