Definition. A Differential Equation Is Any Equation That Involves Derivatives
Definition. A Differential Equation Is Any Equation That Involves Derivatives
Examples.
𝑑𝑦 𝑑2𝑖 𝑑𝑖 1
a) = 3𝑥 + 5 b) (x+1)dy +(y-3)dy = 0 c) 𝐿 + 𝑅 + 𝑖 = 𝐸𝜔 𝑐𝑜𝑠𝜔𝑡
𝑑𝑥 𝑑𝑡2 𝑑𝑡 𝑐
𝑑𝑦 4 𝑑 3𝑦 2 𝜕2𝑈 𝜕2𝑈
d) = 3− e) + =0 f) y’’ + 2y’ – 8y = x2 + cos x
𝑑𝑥 𝑑𝑥 3 𝜕𝑥 2 𝜕𝑦 2
Remarks
1. When the dependent variable in a differential eqution is a function of a single independent
variable, we call this equation an ordinary differential equation (ODE), while if the dependent
variable in a differential equation is a function of two or more independent variables, we call
this a partial differential equation (PDE)
2. The order of a differential equation is the order of the highest ordered derivative appearing in
the equation, while the degree of a differential equation is the degree of the highest ordered
derivative in the equation.
Exercise. Classify the given differential equations in the above examples as to its dependent and
independent variables, order and degree and being an ODE or PDE?
Definition. A linear nth order ODE or a linear ODE of order n is an equation of the form
𝑑𝑛 𝑦 𝑑 𝑛 −1 𝑦 𝑑𝑦
𝑎0 𝑥 𝑑𝑥𝑛
+ 𝑎1 𝑥 𝑑 𝑥 𝑛 −1
+ … + 𝑎𝑛−1 𝑥 𝑑𝑥
+ 𝑎𝑛 𝑥 𝑦 = R(x) or
Definition. A solution of a differential equation is a function that satisfies the given differential equation.
Usually, in checking that a given relation is a solution to a given ODE, the relation involves
arbitrary constants in general. In this case, elimination of these arbitrary constants will result to an ODE
consistent with the original relation.
2. Y = c1ex + c2e2x(*)
Solution.
Find y’ and y’’ since there are 2 arbitrary constants.
We have y’ = c1ex + 2c2e2x (**) and y’’ = c1ex + 4c2e2x (***). Eliminate the constants C1 and
C2 using appropriate methods. Now, let us begin by eliminating C 1 first. Subtract y from y’
using equations (*) and (**), respectively. Thus
y’- y = (c1ex + 2c2e2x) – (c1ex + c2e2x)= C2𝑒 2𝑥 . Hence, y’- y= C2𝑒 2𝑥 (#). This time eliminate
C1 by subtracting y from y”. That is, y” – y = (c1ex + 4c2e2x) – (c1ex + c2e2x), we get
y”– y = 3c2e2x. But by equation (#), y”– y = 3*y’- y]. This gives us y”– y = 3*y’- y+ = 3y’ – 3y and
consequently , we get y” - 3y’ + 2y = 0, which is the desired ODE.
Family of Curves
Recall the first example above, y2 = 4ax. If we assign a = 1, we simply have y2 = 4x, a parabola
opening to the right of the x-axis, vertex at the origin and with distance from the vertex to the focus is
p = 1. Thus, y2 = 4ax with the parameter a, is a family of parabolas with vertex at the origin with axis of
the parabola parallel to the x-axis and y2 = 4x is a particular member of the family.
The next few examples are still obtaining the desired ODE with the given properties of the
relation. That is, form the relation based from its given properties.
Example. Obtain the desired ODE of the given family of plane curves from the given properties.
.
1. Family of circles with center on the x-axis.
Solution.
Circles with center on the x-axis has the radius-center form of its equation as follows
( x – h )2 + y2 = r2, since k = 0. Thus, there are only 2 arbitrary constants, h and r. So we will eliminate h
and r to obtain the desired ODE. Differentiating ( x – h )2 + y2 = r2 with respect to we get,
2(x – h) + 2yy’ = 0, simplifying we have (x – h ) + yy’ = 0. Similarly, differentiating this (x – h ) + yy’= 0
With respect to x, we get 1 + y’y’ + yy” = 0 which the desired ODE, with order 2.
2. Family of parabolas with axis parallel to y-axis and distance from vertex to focus is
fixed as p.
Solution.
The family of parabolas has equation of the form (x-h)2 = 4p(y-k). Since p is fixed , we do not
eliminate p. Now, differentiating (x-h)2 = 4p(y-k) with respect to x, we get 2(x – h) = 4py’. Now,
Dx[2(x-h) = 4py’+, we have 2 = 4py”, simplifying, we obtain the desired ODE 1 - 4py”= 0
Exercises. Obtain the desired ODE of the given family of plane curves from the given properties.
1. Family of parabolas with vertex at the origin and axis of the parabola is the y –axis.
2. Family of circles with center on the y-axis.
3. Straight lines with slope and y-intercept equal.
4. Straight lines with equal intercepts
5. Circles with center on the line y = x and are tangent to the x and y axes.(*)Sketch 2
members of the family
Our main objective in this course is to find a solution of a given ODE. So, what we did earlier was
the other way around, obtaining the desired ODE from a given relation.
Below are the methods of solving an ODE.
METHODS IN SOLVING LINEAR FIRST ORDER ODE (first degree , first derivative only)
A. Separation of Variables
Consider the ODE M(x,y)dx + N(x,y)dy = 0 (*).
If equation (*) can be written in the form A(x)dx + B(y)dy = 0(**), then equation (*) is a variable
separable type of an equation and the solution is obtained by integrating equation (**) term by term.
1. ( x2 + 1)dx + 2xydy = 0
Solution .
Separate the variables by dividing all the terms of the given equation by x.
𝑥 2 +1 1
Thus, having the equation 𝑑𝑥 + 2𝑦𝑑𝑦 = 𝑥 + 𝑑𝑥 + 2𝑦𝑑𝑦 = 0 and integrating term by
𝑥 𝑥
𝐱𝟐
term we get, 𝟐 + 𝐥𝐧𝐱 + 𝐲 𝟐 = 𝐂. This is called the general solution because of the presence of the
arbitrary constant C.
2. xcos2ydx + tanydy = 0.
Solution.
𝑡𝑎𝑛𝑦
Divide all terms by cos2y, we get xdx + 𝑐𝑜𝑠 2 𝑦 𝑑𝑦 = 𝑥𝑑𝑥 + 𝑠𝑒𝑐 2 𝑦𝑡𝑎𝑛𝑦𝑑𝑦 = 0.
𝑥2 𝑡𝑎𝑛 2 𝑦
{𝑥𝑑𝑥 + 𝑠𝑒𝑐 2 𝑦𝑡𝑎𝑛𝑦𝑑𝑦 = 0} = 2
+ 2
=𝑐
𝒙𝟐 𝒕𝒂𝒏𝟐 𝒚
+ = 𝒄 , the general solution.
𝟐 𝟐
3. 2x(y + 1)dx – ydy = 0, where y = -2 when x = 2. This is called an initial –value problem (IVP)
with a given set of condition. In this case, we find a particular solution without the arbitrary
constant.
Solution.
𝑦 1
First divide all terms by y + 1, we get 2xdx - 𝑦 +1
dy = 2xdx – [1 - 𝑦 +1 ]dy = 0. By integrating this
1
equation 2xdx – [1 - ]dy = 0 term by term, we obtain the general solution
𝑦 +1
x – y + ln 𝒚 + 𝟏 = C. However, given the condition that y = -2 when x =2, we have the value of
2
𝑑𝑦
1. 𝑑𝑥
= 𝑐𝑜𝑠 2 𝑥 𝑐𝑜𝑠𝑦
2
2. 𝑦 = 𝑥𝑒 𝑦 −𝑥 , where y= 0 when x = 0.
′
Orthogonal Trajectory
Suppose we have a family of curves f(x, y, c) = 0. We will find another family of curves
g(x, y, c) = 0 such that whenever f and g intersect, their corresponding tangent lines are perpendicular.
That is, at each intersection point (point of tangency) the tangents line are at right angle.
Suppose M(x, y)dx + N(x, y)dy = 0 is the differential equation of a family of curves , we call this
𝑑𝑦 −𝑀
f(x, y). This means that 𝑑𝑥 = 𝑁 (the slope of the tangent lines of the f(x, y)). Thus, the slope of the
𝑑𝑦 𝑁
other family of curves, call this g(x, y) is 𝑑𝑥 = 𝑀 (the negative reciprocal) and we have
N(x, y)dx – M(x, y)dx = 0 the differential equation of g(x, y). By separation of variables, we obtain the
family of curves g(x, y) which we call the orthogonal trajectory of the family of curves f(x, y). In addition,
f(x, y) and g(x, y) are orthogonal trajectories.
2. X2 – y2 = c .
Solution.
𝑑𝑦 𝑥
Eliminating c in the equation, we obtain 2xdx – 2ydy = 0 or xdx – ydy = 0. Solving for = ,
𝑑𝑥 𝑦
𝑑𝑦 −𝑦 𝑑𝑦 𝑑𝑥
hence, we have now 𝑑𝑥 = 𝑥
. Separating the variables, −𝑦 = 𝑥
. Integrating term by term,
we obtain –lny = lnx + lnk or lny + lny = lnk , which is equivalent to xy = k. Thus we say,
x2 – y 2= c and xy = k are orthogonal trajectories.
Recall that the following are examples of homogeneous expressions of degree 3 and 5 , respectively,
2x3 + y3 and xy4 – 5x2y3 + x4y. This is done by inspection on the powers of the variables in all the terms in
the expression. How about this expression 𝑥 2 + 𝑦 2 ? If this is homogeneous, what is its degree?
So before giving the process of solving equations with homogeneous coefficients, we first define
what a homogeneous function is.
Definition. A function f(x,y) is called a homogeneous function of degree k in x and y if for any 𝜏,
f(𝜏x, 𝜏y) = 𝜏 𝑘 𝑓(𝑥, 𝑦).
Check the list of functions below whether or not they are homogeneous functions.
𝑥 +3𝑦
1. F(x,y) = .
𝑥 −3𝑦
𝑥𝜏 +3𝑦𝜏 𝜏(𝑥 +3𝑦 ) 𝑋+3𝑌
Solution. By definition, F(x𝜏, 𝑦𝜏) = 𝑥𝜏 −3𝑦𝜏
= 𝜏(𝑥 −3𝑦 ) = 𝜏 0 𝑋−3𝑌
= 𝜏 0 𝐹(𝑥, 𝑦). Therefore
The given function is homogeneous of degree 0.
2. G(x, y) = 2y + 𝑥 2 + 𝑦 2 .
Solution. By definition,
G(x𝜏, 𝑦𝜏) = 2𝑦𝜏 + 𝑥𝜏 2 + 𝑦𝜏 2 = 2𝑦𝜏 + 𝜏 2 (𝑥 2 + 𝑦 2 ) = 2𝑦𝜏 + 𝜏 𝑥 2 +𝑦 2
G(x𝜏, 𝑦𝜏) = 𝜏 2y + 𝑥 2 + 𝑦 2 = 𝜏𝐺(𝑥, 𝑦). Therefore G(x,y) is homogeneous of degree 1.
3. H(x,y)= x3 – xy + y3.
Solution. Again by definition,
H(x𝜏, 𝑦𝜏) = 𝑥𝜏 3 − 𝑥𝜏 𝑦𝜏 𝜏 + 𝑦𝜏 3 = 𝑥 3 𝜏 3 − 𝜏 2 𝑥𝑦 + 𝑦 3 𝜏 3 . There is no way we can
continue further. Hence, the function H(x,y) is non homogeneous function ,thus it has no
degree.
Type equation here.
Exercise.
𝑦 𝑥 𝑥
1. F(x,y) = x sin𝑥 − 𝑦𝑠𝑖𝑛 𝑦 2. 𝑔 𝑥, 𝑦 = 𝑦 2 𝑡𝑎𝑛 𝑦 3. F(x,y) = xlnx – ylny 4. H(x,y) = xy + tanxy
Remarks.
1. In the ODE M(x,y)dx + N(x,y)dy = 0, if both M and N are homogeneous of the same degree then
𝑀(𝑥,𝑦 )
the function 𝑁(𝑥,𝑦 )
= 𝑓(𝑥, 𝑦) is homogeneous of degree 0 in x and y.
therefore, f(x,y) is homogeneous of degree 0. This means we can express f(x,y) as a function of
𝑦 𝑥
𝑜𝑟 𝑎𝑙𝑜𝑛𝑒.
𝑥 𝑦
1. (x2 – xy + y2)dx –xydy = 0. By the illustration above M and N are homogeneous of degree 2.
𝑦
Note that N(x,y) has simpler expression than M(x,y) so we let v = 𝑥 . This means y = vx and dy = vdx +
xdv. Substitute these in the original equation we get
(x2 – x(vx) + (vx)2)dx –x(vx) (vdx + xdv) = x2dx – x2vdx + x2v2dx – x2v2dx – x3vdv = x2(1 – v)dx – x3vdv = 0.
Thus we have only (1 – v)dx – xvdv = 0, separate the variables by dividing both sides by x(I –v), we get
1 𝑣 1 𝑣 1 1
𝑑𝑥 − 𝑑𝑣 = 𝑑𝑥 + 𝑑𝑣 = 𝑑𝑥 + 1 + 𝑑𝑣 = 0. Thus integrating this
𝑥 1−𝑣 𝑥 𝑣−1 𝑥 𝑣−1
1 1
𝑥
𝑑𝑥 + 1 + 𝑣−1 𝑑𝑣 = 0 term by term we get ln 𝑥 + v + ln 𝑣 − 1 = lnC. BY property on logarithms
𝑦 𝑦
ln 𝑥 +ln 𝑒 𝑣 + ln 𝑣 − 1 = lnC ↔ x(v - 1)ev = C. Since v = 𝑥 , then Since v = 𝑥 , then we have
𝑦 𝒚
𝑦
x( − 1)𝑒 𝑥 = C and finally, we get the general solution (𝒚 − 𝒙)𝒆𝒙 = C.
𝑥
2. xydx + (x2 + y2)dy = 0. By inspection, the coefficients are homogeneous of same degree 2.
Now, note that M(x,y) has simpler expression than N(x,y) so we let x = vy this implies
dx = vdy + ydv. Substituting these in the original equation, we get
(vy)y(vdy + ydv) + ( [vy]2 + y2)dy = v2y2dy + vy3dv + v2y2dy + y2dy = 0. By dropping y2, we have
(2v2 + 1)dy + vydv = 0. This is a separable type of an equation, thus, by separating the variables
𝑑𝑦 𝑣
we obtain + 𝑑𝑣 = 0. Integrating term by term, we get the general solution
𝑦 2𝑣 2 +1
1 𝑥
ln 𝑦 + 4
𝑙𝑛 2𝑣 2 + 1 = C ↔ 4ln 𝑦 + 𝑙𝑛 2𝑣 2 + 1 = ln C ↔ y4(2v2 + 1) = C. But v = 𝑦 , hence,
𝑥2
y4(2𝑦 2 + 1) = 𝐶 ↔ y2(2x2 + y2) = C which is the general solution.
Note . After the substitution of the new variable v , after simplifying, the resulting equation is a variable
separable type which is always the case.
Exercise.
3. (16x2 + y2 + 7xy)dx = x2dy 4. 3(3x2 + y2)dx – 2xydy = 0 5. Xdx + sin2(y/x)[ydx – xdy] = 0(*)
C. Exact Equation
Definition. The ODE M(x,y)dx + N(x,y)dy = 0 is an exact equation if there exists a differential function
𝜕𝑓 𝜕𝑓
f(x,y) such that M(xy) = 𝜕𝑥 and N(x,y) = 𝜕𝑦 and the general solution is f(x,y) = C.
A tool for determining whether a given ODE is an exact equation is given by the next theorem.
𝜕𝑀 𝜕𝑁
Theorem. Let M(x,y), N(x,y), 𝜕𝑦
, 𝑎𝑛𝑑 𝜕𝑥
be continouos functions of x and y, then
𝜕𝑀 𝜕𝑁
M(x,y)dx + N(x,y)dy = 0 Is an exact equation if 𝜕𝑦
= 𝜕𝑥
.
Example.
2. (ex + y)dy + (yex + 1)dx = 0. Check that the given equation is exact.
Now, expand the given equation into exdy + ydy + yexdx + dx = 0. Similarly, we group the first
and the third term we get, exdy + yexdx + ydy + dx = 0. Note again that the first two terms is just
d(exy), thus, we can write the equation into d(exy) + ydy + dx = 0. Finally, integrating this term
𝒚𝟐 𝑦2
by term, we obtain the general solution exy + + 𝒙 = 𝑪, where f(x,y) = exy + + 𝑥.
𝟐 2
Exercise.
1. x(1 + y2)dx + (x2y + y)dy = 0 2. ex(y + x)dx + exdy = 0(*) 3. (4xy + 2x3)dx + (2x2 + 3y2)dy = 0
End of Module 1
Some helpful links:
Separable First Order Differential Equations - Basic Introduction
Homogeneous Differential Equations
Exact Differential Equations