Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Differential Equations (MTH401) VU
Lecture#1 Background Linear y=mx+c Quadratic ax2+bx+c=0 Cubic ax3+bx2+cx+d=0 Systems of Linear equations ax+by+c=0 lx+my+n=0 Solution ? Equation Differential Operator 1dy
dx x=
Taking anti derivative on both sides y=ln x From the past
Algebra Trigonometry Calculus Differentiation Integration
Differentiation
• Algebraic Functions • Trigonometric Functions • Logarithmic Functions • Exponential Functions • Inverse Trigonometric Functions
More Differentiation • Successive Differentiation • Higher Order • Leibnitz Theorem
Applications • Maxima and Minima
1 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
• Tangent and Normal Partial Derivatives
y=f(x) f(x,y)=0 z=f(x,y) Integration
Reverse of Differentiation By parts By substitution By Partial Fractions Reduction Formula
Frequently required Standard Differentiation formulae Standard Integration Formulae
Differential Equations Something New Mostly old stuff
• Presented differently • Analyzed differently • Applied Differently
( )32
2
2 2
2 2
5 1
4 0
5 4
0
2 0
x
dy ydxy x dx xdy
d y dy y edx dx
u vy xu vx y ux yu u u
x t t
− =
− + =
⎛ ⎞+ − =⎜ ⎟⎝ ⎠
∂ ∂+ =
∂ ∂∂ ∂
+ =∂ ∂
∂ ∂ ∂− + =
∂ ∂ ∂
2 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture-2: Fundamentals
Definition of a differential equation.
Classification of differential equations.
Solution of a differential equation.
Initial value problems associated to DE.
Existence and uniqueness of solutions Elements of the Theory
Applicable to: • Chemistry • Physics • Engineering • Medicine • Biology • Anthropology
Differential Equation – involves an unknown function with one or more of its derivatives
Ordinary D.E. – a function where the unknown is dependent upon only one independent variable
Examples of DEs
( )32
2
2 2
2 2
5 1
4 0
5 4
0
2 0
x
dy ydxy x dx xdy
d y dy y edx dx
u vy xu vx y ux yu u u
x t t
− =
− + =
⎛ ⎞+ − =⎜ ⎟⎝ ⎠
∂ ∂+ =
∂ ∂∂ ∂
+ =∂ ∂
∂ ∂ ∂− + =
∂ ∂ ∂
Specific Examples of ODE’s
3 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
The order of an equation: • The order of the highest derivative appearing in the equation
32
2 5 4 xd y dy y e
dx dx⎛ ⎞+ − =⎜ ⎟⎝ ⎠
4 22
4 2 0y ua
x x∂ ∂
+ =∂ ∂
Ordinary Differential Equation If an equation contains only ordinary derivatives of one or more dependent variables, w.r.t a single variable, then it is said to be an Ordinary Differential Equation (ODE). For example the differential equation
32
2 5 4 xd y dy y e
dx dx⎛ ⎞+ − =⎜ ⎟⎝ ⎠
is an ordinary differential equation. Partial Differential Equation
4 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Similarly an equation that involves partial derivatives of one or more dependent variables w.r.t two or more independent variables is called a Partial Differential Equation (PDE). For example the equation
4 22
4 2 0u ua
x x∂ ∂
+ =∂ ∂
is a partial differential equation. Results from ODE data
The solution of a general differential equation: • f(t, y, y’, . . . , y(n)) = 0 • is defined over some interval I having the following properties:
y(t) and its first n derivatives exist for all t in I so that y(t) and its first n - 1 derivates must be continuous in I
y(t) satisfies the differential equation for all t in I
General Solution – all solutions to the differential equation can be represented in this form for all constants
Particular Solution – contains no arbitrary constants Initial Condition Boundary Condition Initial Value Problem (IVP) Boundary Value Problem (BVP)
IVP Examples
The Logistic Equation • p’ = ap – bp2 • with initial condition p(t0) = p0; for p0 = 10 the solution is: • p(t) = 10a / (10b + (a – 10b)e-a(t-t0))
The mass-spring system equation • x’’ + (a / m) x’ + (k / m)x = g + (F(t) / m)
BVP Examples
• Differential equations y’’ + 9y = sin(t)
• with initial conditions y(0) = 1, y’(2p) = -1 • y(t) = (1/8) sin(t) + cos(3t) + sin (3t)
y’’ + p2y = 0 • with initial conditions y(0) = 2, y(1) = -2 • y(t) = 2cos(pt) + (c)sin(pt)
5 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Properties of ODE’s Linear – if the nth-order differential equation can be written:
• an(t)y(n) + an-1(t)y(n-1) + . . . + a1y’ + a0(t)y = h(t)
Nonlinear – not linear x3(y’’’)3-x2y(y’’)2+3xy’+5y=ex Superposition
Superposition – allows us to decompose a problem into smaller, simpler parts and then combine them to find a solution to the original problem.
Explicit Solution A solution of a differential equation 2 2
2 2, , , , , 0dy d y d yF x ydx dx dx
⎛ ⎞=⎜ ⎟
⎝ ⎠ that can be written as y = f(x) is known as an explicit solution . Example: The solution y = xex is an explicit solution of the differential equation 2
2 2 0d y dy ydx dx
− + = Implicit Solution A relation G(x,y) is known as an implicit solution of a differential equation, if it defines one or more explicit solution on I. Example: The solution x2 + y2 - 4=0 is an implicit solution of the equation y’ = - x/y as it defines two explicit solutions y=+(4-x2)1/2
6 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
Separable Equations
The differential equation of the form
),( yxfdxdy
=
is called separable if it can be written in the form
)()( ygxhdxdy
=
To solve a separable equation, we perform the following steps: 1. We solve the equation 0)( =yg to find the constant solutions of the equation. 2. For non-constant solutions we write the equation in the form.
dxxhygdy )(
)(=
Then integrate ⎮⌡⌠ = ∫ dxxhdyyg )()(
1
to obtain a solution of the form CxHyG += )()( 3. We list the entire constant and the non-constant solutions to avoid repetition.. 4. If you are given an IVP, use the initial condition to find the particular solution. Note that: (a) No need to use two constants of integration because CCC =− 21 . (b) The constants of integration may be relabeled in a convenient way. (c) Since a particular solution may coincide with a constant solution, step 3 is important. Example 1: Find the particular solution of
2)1( ,12
=−
= yx
ydxdy
Solution: 1. By solving the equation
012 =−y
7 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
We obtain the constant solutions 1±=y2. Rewrite the equation as
xdx
ydy
=−12
Resolving into partial fractions and integrating, we obtain
⎮⌡⌠=⎮
⌡
⌠⎥⎦
⎤⎢⎣
⎡+
−−
dxx
dyyy
1 1
11
121
Integration of rational functions, we get
Cxyy
+=+− ||ln
|1||1|ln
21
3. The solutions to the given differential equation are
⎪⎩
⎪⎨⎧
±=
+=+−
1
||ln|1||1|ln
21
y
Cxyy
4. Since the constant solutions do not satisfy the initial condition, we plug in the condition
2=y When in the solution found in step 2 to find the value of . 1=x C
C=⎟⎠⎞
⎜⎝⎛
31ln
21
The above implicit solution can be rewritten in an explicit form as:
22
33
xxy
−+
=
Example 2: Solve the differential equation
211ydt
dy+=
Solution:
1. We find roots of the equation to find constant solutions
011 2 =+ y
No constant solutions exist because the equation has no real roots. 2. For non-constant solutions, we separate the variables and integrate
∫=⎮⌡⌠
+dt
ydy
2/11
8 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
Since 1
111/11
122
2
2 +−=
+=
+ yyy
y
Thus ⎮⌡⌠ −=
+− )(tan
/11
2 yyy1dy
So that Ctyy +=− − )(tan 1
It is not easy to find the solution in an explicit form i.e. as a function of t. y3. Since no constant solutions, all solutions are given by the implicit equation
found ∃
in step 2. Example 3: Solve the initial value problem
10 ,1 2222 =+++= )y(ytytdtdy
Solution:
1. Since )1)(1(1 222222 ytytyt ++=+++The equation is separable & has no constant solutions because∃ no real roots of
. 01 2 =+ y2. For non-constant solutions we separate the variables and integrate.
dttydy )1(
12
2 +=+
∫ dttydy )1(
12
2 +=⎮⌡⌠
+
Ctty ++=−3
)(tan3
1
Which can be written as
⎟⎟⎠
⎞⎜⎜⎝
⎛++= Ctty
3tan
3
3. Since no constant solutions, all solutions are given by the implicit or explicit equation.
∃
4. The initial condition 1)0( =y gives
4)1(tan 1 π== −C
The particular solution to the initial value problem is
9 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
43)(tan
31 π++=− tty
or in the explicit form ⎟⎟⎠
⎞⎜⎜⎝
⎛++=
43tan
3 πtty
Example 4: Solve ( ) 01 =−+ ydxdyx Solution:
Dividing with , we can write the given equation as ( )yx+1
( )xy
dxdy
+=
1
1. The only constant solution is 0=y 2. For non-constant solution we separate the variables
xdx
ydy
+=
1
Integrating both sides, we have
⎮⌡⌠
+=⎮⌡
⌠x
dxy
dy1
11lnln cxy ++=
11 .|1|ln|1|ln cexecxey +=++=
or ( )xcecexy +±==+= 1 |1| 11
( ) 11 , c
y C x C e= + = ±
If we use instead of then the solution can be written as ||ln c 1c ||ln|1|ln||ln cxy ++= or ( )xcy += 1ln||ln So that ( )xcy += 1 . 3. The solutions to the given equation are
( )0
1
=
+=
y
xcy
10 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
Example 5 Solve ( ) 02 324 =++ − dyeydxxy x . Solution: The differential equation can be written as
⎟⎟⎠
⎞⎜⎜⎝
⎛+
⎟⎠⎞⎜
⎝⎛−=
2 3 2
4
yyxxe
dxdy
1. Since 022
4
=⇒+
yy
y . Therefore, the only constant solution is 0=y .
2. We separate the variables
( ) 02or 02 42342
3 =++=+
+ −− dyyydxxedyy
ydxxe xx
Integrating, with use integration by parts by parts on the first term, yields
13133
32
91
31 cyyexe xx =−−− −−
( ) ccyyxex =++=− 13
3 9c where6913
3. All the solutions are
( )
0 y
6913 33
=
++=− cyy
xe x
Example 6:
Solve the initial value problems
(a) ( ) 1)0( ,1 2 =−= yydxdy (b) ( ) 01.1)0( ,1 2 =−= yy
dxdy
and compare the solutions.
11 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
Solutions: 1. Since . Therefore, the only constant solution is . 10)1( 2 =⇒=− yy 0=y2. We separate the variables
( )
( ) dxdyy- dxy
dy==
−−2
2 1or 1
Integrating both sides we have
( )∫ 1 2 ∫=− − dxdyy
( ) cxy +=
+−− +−
121 12
or cxy
+=−
−1
1
3. All the solutions of the equation are
1
11
=
+=−
−
y
cxy
4. We plug in the conditions to find particular solutions of both the problems (a) . So we have ( ) 0 when 110 ==⇒= xyy −∞=⇒−=⇒+=
−− ccc
010
111
The particular solution is
011
1=−⇒−∞=
−− y
y
So that the solution is , which is same as constant solution. 1=y(b) ( ) 0 when 01.101.10 ==⇒= xyy . So we have
1000101.1
1−=⇒+=
−− cc
So that solution of the problem is
x
yxy −
+=⇒−=−
−100
111001
1
5. Comparison: A radical change in the solutions of the differential equation has Occurred corresponding to a very small change in the condition!!
Example 7:
Solve the initial value problems
(a) ( ) 1)0( ,01.01 2 =+−= yydxdy (b) ( ) .1)0( ,01.01 2 =−−= yy
dxdy
12 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
Solution:
(a) First consider the problem
( ) 1)0( ,01.01 2 =+−= yydxdy
We separate the variables to find the non-constant solutions
( ) ( ) dxy =−+ 22 101.0dy
( )
Integrate both sides
( ) ( )⎮⌡⌠
=−+
−∫ dx
y
yd22 101.0
1
So that cx +=y −−
01.0tan
01.01 11
( )cxy +=⎟⎟⎠
⎞⎜⎜⎝
⎛ −− 01.001.01tan 1
( )[ ]cx += 01.0tan01.0
y −1
or ( )[ ]cxy ++= 01.0tan01.01 Applying ( ) 0 when 110 ==⇒= xyy , we have
( ) ( ) cc =⇒+=− 0001.00tan 1 Thus the solution of the problem is
( )xy 01.0tan01.01+=
(b) Now consider the problem ( ) .1)0( ,01.01 2 =−−= yy
dxdy
We separate the variables to find the non-constant solutions
13 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
( ) ( )22
1 0.01
d y dxy
=− −
( )
( ) ( )221
1 0.01
d ydx
y
⌠⎮⎮⎮⌡
−=
− −∫
cxyy
+=+−−−
01.0101.01ln
01.021
Applying the condition ( ) 0 when 110 ==⇒= xyy
001.001.0ln
01.021
=⇒=− cc
xyy 01.02
01.0101.01ln =
+−−−
101.01
01.01 eyy
=+−−− 01.02 x
Simplification:
By using the property dcdc
baba
dc
ba
−+
=−+
⇒=
1
101.0101.0101.0101.01
01.02
01.02
−
+=
−+−−−+−+−−
xe
xeyyyy
2 0.01
2 0.012 2 12 0.01 1
y e
e
− +=
− −
1
101.01
01.02
01.02
−
+=
−−
e
ey
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
−
+−=−
1
101.0101.02
01.02
e
ey
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
−
+−=
1
101.0101.02
01.02
e
ey
Comparison: The solutions of both the problems are
14 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
(a) ( )xy 01.0tan 01.01 += (b)
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
−
+−=
1
101.0101.02
01.02
e
ey
Again a radical change has occurred corresponding to a very small in the differential equation!
Exercise:
Solve the given differential equation by separation of variables.
1. 2
2
5432⎟⎠⎞
⎜⎝⎛
++
=xy
dxdy
2. 0cscsec =+ ydxxdy
( ) 0cos2sin dyyexxdxe 2 =−+ yy 3.
4. 842 −+−
=yxxydx
33 −−+ yxxydy
5. 33 −+−
=xyxydx
22 −−+ xyxydy
6. ( ) ( ) dxydyxy 2222 44 +=−11
7. ( ) yydx
xx +=+ dy
Solve the given differential equation subject to the indicated initial condition.
15 © Copyright Virtual University of Pakistan
Differential Equations (MTH401)
( ) ( )y− dyxxdxe cos1sin1 +=+ , ( ) 00 =y 8.
( ) ( ) 0411 =+++ dxyxdyx ( ) 01 =y 24 , 9.
10. ( ) dxyxydy 22 14 +=1
, ( ) 10 =y
16 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture 4
Homogeneous Differential Equations A differential equation of the form
),( yxfdxdy
=
Is said to be homogeneous if the function is homogeneous, which means ),( yxf
For some real number n, for any number ),(),( yxfttytxf n= t . Example 1 Determine whether the following functions are homogeneous
( )⎪⎩
⎪⎨⎧
+−=+
=
)4/(3ln),(
),(232
22
xyxyxyxgyx
xyyxf
Solution: The functions is homogeneous because ),( yxf
),()(),( 22222
2
yxfyx
xyyxt
xyttytxf =+
=+
=
Similarly, for the function we see that ),( yxg
),(43ln
)4(3ln),( 23
2
233
23
yxgxyxyx
xyxtyxttytxg =⎟⎟
⎠
⎞⎜⎜⎝
⎛+
−=⎟⎟
⎠
⎞⎜⎜⎝
⎛+
−=
Therefore, the second function is also homogeneous. Hence the differential equations
⎪⎩
⎪⎨
⎧
=
=
),(
),(
yxgdxdy
yxfdxdy
Are homogeneous differential equations
17 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Method of Solution: To solve the homogeneous differential equation
),( yxfdxdy
=
We use the substitution
xyv =
If is homogeneous of degree zero, then we have ),( yxf )(),1(),( vFvfyxf == Since , the differential equation becomes vvxy +′=′
),1( vfvdxdvx =+
This is a separable equation. We solve and go back to old variable y through . xvy =
Summary: 1. Identify the equation as homogeneous by checking ; ),(),( yxfttytxf n=
2. Write out the substitutionxyv = ;
3. Through easy differentiation, find the new equation satisfied by the new function v ;
),1( vfvdxdvx =+
4. Solve the new equation (which is always separable) to find ; v 5. Go back to the old function through the substitutiony vxy = ; 6. If we have an IVP, we need to use the initial condition to find the constant of integration. Caution:
Since we have to solve a separable equation, we must be careful about the constant solutions.
If the substitution vxy = does not reduce the equation to separable form then the equation is not homogeneous or something is wrong along the way.
18 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Illustration: Example 2 Solve the differential equation
yxyx
dxdy
++−
=2
52
Solution: Step 1. It is easy to check that the function
yxyxyxf
++−
=2
52),(
is a homogeneous function. Step 2. To solve the differential equation we substitute
xyv =
Step 3. Differentiating w.r.t , we obtain x
vv
xvxxvxvvx
++−
=++−
=+′2
522
52
which gives
⎟⎠⎞
⎜⎝⎛ −
++−
= vv
vxdx
dv2
521
This is a separable. At this stage please refer to the Caution! Step 4. Solving by separation of variables all solutions are implicitly given by
Cxvv +=−+−− |)ln(||1|ln3|)2ln(|4 Step 5. Going back to the function y through the substitution vxy = , we get
Cxyxy ||ln3|2|ln4 =−+−−
19 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
4 3
1 1
4 3
14 3
4 3
14 3
4 3
14 3
4 31
4 31
24 ln 3ln ln
2ln ln ln ln , ln
( 2 ) ( )ln ln ln
( 2 ) ( )ln . ln
( 2 ) ( ).
( 2 ) ( )
( 2 ) ( )
y x y x x cx x
y x y x x c c cx x
y x y x c xx x
y x y x c xx x
y x y x c xx x
x y x y x c x
y x y x c
−
−
−
−
−
−
−
−
−
− −− + = +
− −+ = + =
− −+ =
− −=
− −=
− − =
− − =
Note that the implicit equation can be rewritten as
4
13 )2()( xyCxy −=−
20 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Equations reducible to homogenous form The differential equation
222
111
cybxacybxa
dxdy
++++
=
is not homogenous. However, it can be reduced to a homogenous form as detailed below
Case 1: 2
1
2
1
bb
aa
=
We use the substitution ybxaz 11 += which reduces the equation to a separable equation in the variables andx z . Solving the resulting separable equation and replacing with , we obtain the solution of the given differential equation. z ybxa 11 +
Case 2: 2
1
2
1
bb
aa
≠
In this case we substitute kYyhXx +=+= , Where h and k are constants to be determined. Then the equation becomes
22222
11111
ckbhaYbXackbhaYbXa
dXdY
++++++++
=
We choose and h k such that
⎭⎬⎫
=++=++
00
222
111
ckbhackbha
This reduces the equation to
YbXaYbXa
dXdY
22
11
++
=
Which is homogenous differential equation in X andY , and can be solved accordingly. After having solved the last equation we come back to the old variables x and . y
21 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 3 Solve the differential equation
232132
++−+
−=yxyx
dxdy
Solution:
Since2
1
2
1 1bb
aa
== , we substitute yxz 32 += , so that
⎟⎠⎞
⎜⎝⎛ −= 2
31
dxdz
dxdy
Thus the equation becomes
212
31
+−
−=⎟⎠⎞
⎜⎝⎛ −
zz
dxdz
i.e. 27
++−
=zz
dxdz
This is a variable separable form, and can be written as
dxdzz
z=⎟
⎠⎞
⎜⎝⎛
+−+
72
Integrating both sides we get
( ) Axzz +=−−− 7ln9
z with x y32 + , we obtain Simplifying and replacing
( )9 Ayxyx ++=−+− 33732ln
or ( ) ( ) Ayx+− 39 ecceyx ==−+ ,732
22 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 4 Solve the differential equation
( )
5242
−+−+
=yxyx
dxdy
Solution: By substitution kYyhXx +=+= , The given differential equation reduces to
( ) ( )( ) ( )522422
−+++−+++
=khYXkhYX
dXdY
We choose and h k such that ,042 =−+ kh 052 =−+ kh Solving these equations we have 2=h , 1=k . Therefore, we have
YXYX
dXdY
++
=2
2
This is a homogenous equation. We substitute VXY = to obtain
V
VdXdVX
+−
=21 2
or X
dXdVVV
=⎥⎦⎤
⎢⎣⎡−+
212
Resolving into partial fractions and integrating both sides we obtain
( ) ( )⎮⌡⌠
⎮⌡⌠=⎥
⎦
⎤⎢⎣
⎡+
+− X
dXdVVV 12
112
3
or ( ) ( ) AXVV lnln1ln
211ln
23
+=++−−
Simplifying and removing ( ) from both sides, we get ln ( ) ( ) 23 1/1 −=+− CXVV , 2−= AC
23 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
( ) ( )
( )
( )
( )
( )
3 12 2
3 12 2
3 12 2
13 2 2
13 2 2
3 12 2
3
3 1ln 1 ln 1 ln ln2 2
ln(1 ) ln 1 ln
ln(1 ) 1 ln
(1 ) 1" 2"
(1 ) 1
(1 ) 1
( )
V V X
V V XA
V V XA
V V XAtaking power on both sides
V V X AYput VX
Y Y X AX X
X Y X Y X AX X
X Y XX Y
−
−
−
− − −
−− −
−− −
− − + + = +
− + + =
− + =
− + =
−
− + =
=
⎛ ⎞− + =⎜ ⎟⎝ ⎠
− +⎛ ⎞ ⎛ ⎞ =⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠
−+
A
3 1 2 2
2
3
3
,( )
2, 1( 1) / 3
X A
say c AX Y cX Y
put X x Y yx y x y c
− + − −
−
=
=
−=
+= − = −
+ − + − =
Now substitutingXYV = , x 2= −X , 1−= yY and simplifying, we obtain
( ) ( ) Cyxyx =−+−− 3/1 3 This is solution of the given differential equation, an implicit one. Exercise
Solve the following Differential Equations
1. 02)( 344 =−+ ydyxdxyx
24 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2. 122
++=yx
xy
dxdy
3. xydydxyex xy
=⎟⎟⎠
⎞⎜⎜⎝
⎛+
−22
4. 0cos =⎟⎟⎠
⎞⎜⎜⎝
⎛−+ dyx
yxyydx
5. ( ) 0222223 =+−++ dyyxxydxyxyx
Solve the initial value problems
6. ( ) ( ) 6)2( ,046593 222 −==+−++ ydyxyxdxyxyx
7. ( ) 121 ,2 =⎟⎠⎞
⎜⎝⎛=−+ yy
dxdyxyyx
8. ( ) 0)1( ,0// ==−+ ydyxedxyex xyxy
9. 0)1( ,cosh ==− yxy
xy
dxdy
25 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu
Lecture 5 Exact Differential Equations
Let us first rewrite the given differential equation
),( yxfdxdy
=
into the alternative form
),(),(),( where0),(),(
yxNyxMyxfdyyxNdxyxM −==+
This equation is an exact differential equation if the following condition is satisfied
xN
yM
∂∂
=∂∂
This condition of exactness insures the existence of a function such that ),( yxF
),( yxMxF=
∂∂
, ),( yxNyF=
∂∂
Method of Solution: If the given equation is exact then the solution procedure consists of the following steps:
Step 1. Check that the equation is exact by verifying the condition xN
yM
∂∂
=∂∂
Step 2. Write down the system ),( yxMxF=
∂∂
, ),( yxNyF=
∂∂
Step 3. Integrate either the 1st equation w. r. to x or 2nd w. r. to y. If we choose the 1st equation then
∫ += )(),(),( ydxyxMyxF θ The function )( yθ is an arbitrary function of y , integration w.r.to x ; y being constant. Step 4. Use second equation in step 2 and the equation in step 3 to find )( yθ ′ .
( ) ),()(),( yxNydxyxMyyF
=′+∂∂
=∂∂
∫ θ
∫∂∂
−=′ dxyxMy
yxNy ),(),()(θ
Step 5. Integrate to find )( yθ and write down the function F (x, y); Step 6. All the solutions are given by the implicit equation CyxF =),( Step 7. If you are given an IVP, plug in the initial condition to find the constant C.
26 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu
Caution: x should disappear from )( yθ ′ . Otherwise something is wrong!
Example 1
Solve ( ) ( ) 023 32 =+++ dyyxdxyx Solution: Here yxNyxM +=+= 32 and 23
22 3,3 xxNx
yM
=∂∂
=∂∂
i.e. xN
yM
∂∂
=∂∂
Hence the equation is exact. The LHS of the equation must be an exact differential i.e. ∃
a function such that ),( yxf
Myxxf
=+=∂∂ 23 2
Nyxyf
=+=∂∂ 3
Integrating 1st of these equations w. r. t. x, have
),(2),( 3 yhxyxyxf ++=
where is the constant of integration. Differentiating the above equation w. r. t. y and
using 2nd, we obtain
)(yh
Nyxyhxyf
=+=′+=∂∂ 33 )(
Comparing is independent of x. yyh =′ )(
or.
Integrating, we have
2
)(2yyh =
Thus 2
2),(2
3 yxyxyxf ++=
Hence the general solution of the given equation is given by
27 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu cyxf =),(
i.e. cyxyx =++2
22
3
Note that we could start with the 2nd equation
Nyxyf
=+=∂∂ 3
to reach on the above solution of the given equation!
Example 2
Solve the initial value problem
( ) ( ) .0cos2sinsincossin2 22 =−++ dyxyxdxxyxxy .3)0( =y
Solution: Here
xyxxyM sincossin2 2+=
and xyxN cos2sin 2 −=
,sin2cossin2 xyxxy
M+=
∂∂
,sin2cossin2 xyxxxN
+=∂∂
This implies xN
yM
∂∂
=∂∂
Thus given equation is exact.
Hence there exists a function such that ),( yxf
Mxyxxyxf
=+=∂∂ sincossin2 2
Nxyxyf
=−=∂∂ cos2sin 2
Integrating 1st of these w. r. t. x, we have
28 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu
),(cossin),( 22 yhxyxyyxf +−=
Differentiating this equation w. r. t. y substituting in Nyf=
∂∂
xyxyhxyx cos2sin)(cos2sin 22 −=′+−
1)(or 0)( cyhyh ==′
Hence the general solution of the given equation is
2),( cyxf =
i.e. where ,cossin 22 Cxyxy =− 21 ccC −=
Applying the initial condition that when ,3,0 == yx we have
c=− 9
since 9sincos 22 =− xyxy
is the required solution.
Example 3: Solve the DE ( ) ( )2 2cos 2 cos 2 0y ye y xy dx xe x x y y dy− + − + = Solution: The equation is neither separable nor homogenous.
Since, ( )( ) ⎪⎭
⎪⎬⎫
+−=
−=
yxyxxeyxNxyyeyxM
y
y
2cos2,cos,
2
2
and
xNxyxyxye
yM y
∂∂
=−+=∂∂ cossin2 2
Hence the given equation is exact and a function exist for which ),( yxf
( )xfyxM∂∂
=, and ( )yfyxN∂∂
=,
which means that
xyyexf y cos2 −=∂∂
and yxyxxeyf y 2cos2 2 +−=∂∂
Let us start with the second equation i.e.
yxyxxeyf y 2cos2 2 +−=∂∂
29 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu Integrating both sides w.r.to , we obtain y
( ) ∫ ydyxydyxdyyexyxf 2cos22, +∫−∫=Note that while integrating w.r.to , y x is treated as constant. Therefore ( ) ( )xhyxyxeyxf y ++−= 22 sin, h is an arbitrary function of x . From this equation we obtain
xf∂∂ and equate it to M
( ) xyyexhxyyexf yy coscos 22 −=′+−=∂∂
So that ( ) Cxhxh =⇒=′ )(0 Hence a one-parameter family of solution is given by
0sin 22 =++− cyxyxe y Example 4
Solve ( ) 0 1 2 2 =−+ dyxdxxy Solution: Clearly and ( ) xyyxM 2, = ( ) =yxN , 12 −x
Therefore xNx
yM
∂∂
==∂∂ 2
The equation is exact and a function ∃ ( )yxf , such that
xyxf 2=∂∂
and 12 −=∂∂ xyf
We integrate first of these equations to obtain. ( ) ( )ygyxyxf += 2,
Here is an arbitrary function . We find ( )yg yyf∂∂ and equate it to ( )yxN ,
( ) 122 −=′+=∂∂ xygxyf
30 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu
( ) yygyg −=⇒−=′ )( 1 Constant of integration need not to be included as the solution is given by
( ) cyxf =, Hence a one-parameter family of solutions is given by
cyyx =−2
Example 5
Solve the initial value problem
( ) ( ) 01sincos 22 =−+− dyxydxxyxx , ( )0 2y = Solution:
Since ( )⎪⎩⎪⎨⎧
−=
−=2
2
1 ),(
sin . cos),(
xyyxN
yxxxyxM
and xNxy
yM
∂∂
=−=∂∂ 2
Therefore the equation is exact and ∃ a function ( )yxf , such that
2 s . cos yxxinxxf
−=∂∂
and )1( 2xyyf
−=∂∂
Now integrating 2nd of these equations w.r.t. ‘ ’ keeping ‘y x ’constant, we obtain
( ) ( ) ( )xhxyyxf +−= 22
12
,
Differentiate w.r.t. ‘ x ’ and equate the result to ),( yxM
( ) 22 sincos xyxxxhxyxf
−=′+−=∂∂
The last equation implies that.
( ) xxxh sincos=′Integrating w.r.to x , we obtain
( ) ( )( ) xdxxxxh 2cos21sincos −=−−= ∫
31 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu Thus a one parameter family solutions of the given differential equation is
( ) 1222
cos211
2cxxy =−−
or
( ) cxxy =−− 222 cos1 where has been replaced by C . The initial condition 12c 2=y when demand, that
so that . Thus the solution of the initial value problem is 0=x
( ) ( )2 c=− 0cos14 3=c
( ) 3cos1 =−− xxy 222
32 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) vu
Exercise
Determine whether the given equations is exact. If so, please solve.
( ) ( ) 0coscossinsin =++− dyyxxdxxyy 1.
2. ( )dyxdxxyx ln1ln1 −=⎟⎠⎞
⎜⎝⎛ ++
3. ( ) 0ln1ln =⎟⎟⎠
⎞⎜⎜⎝
⎛++− − dyy
ydxeyy xy
4. 03sin343cos12 32 =+−+⎟⎠⎞
⎜⎝⎛ +− xyx
xy
dxdyx
xy
5. 011 22222 =⎟⎟⎠
⎞⎜⎜⎝
⎛+
++⎟⎟⎠
⎞⎜⎜⎝
⎛+
−+ dyyx
xyedxyx
yxx
y
Solve the given differential equations subject to indicated initial conditions.
( ) ( ) 1)0( ,02 ==++++ ydyyexdxye yx 6.
7. 1)1( ,02
345 ==+⎟⎟
⎠
⎞⎜⎜⎝
⎛ − yyx
dxdy
yxy 22
8. 1y(0) ),sin(2cos1
12 =+=⎟⎟
⎠
⎞⎜⎜⎝
⎛−+
+xyy
dxdyxyx
y
9. Find the value of k, so that the given differential equation is exact. ( ) ( )3y 4 32 sin 20 sin 0x y xy ky dx x x xy dy− + − + =
( ) ( ) 0sincos6 =−−+ dyyxykxdxyxy 223 10.
33 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture - 6
Integrating Factor Technique
If the equation 0),(),( =+ dyyxNdxyxM is not exact, then we must have
xN
yM
∂∂
≠∂∂
Therefore, we look for a function u (x, y) such that the equation 0),(),(),(),( + =dyyxNyxudxyxMyxu becomes exact. The function u (x, y) (if it exists) is called the integrating factor (IF) and it satisfies the equation due to the condition of exactness.
Nxuu
xNM
yuu
yM
∂∂
+∂∂
=∂∂
+∂∂
This is a partial differential equation and is very difficult to solve. Consequently, the determination of the integrating factor is extremely difficult except for some special cases: Example
Show that is an integrating factor for the equation )/(1 22 yx + ( ) ,022 =−−+ ydydxxyx and then solve the equation.
Solution: Since yxyxM −=−+= N ,22
Therefore 0 ,2 =∂∂
=∂∂
xNy
yM
So that xN
yM
∂∂
≠∂∂
and the equation is not exact. However, if the equation is multiplied by then )/(1 22 yx +
the equation becomes
01 2222 =+−⎟⎟
⎠
⎞⎜⎜⎝
⎛+
− dyyx
ydxyx
x
34 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Now 2222 and 1 yxyN
yxxM
+−=
+−=
Therefore ( ) x
N
yx
xyy
M∂∂
=+
=∂∂ 2 222
So that this new equation is exact. The equation can be solved. However, it is simpler to
observe that the given equation can also written
[ ] 0)ln(21or 0 2222 =+−=+
+− yxddx
yxydyxdxdx
or ( ) 02
ln 22=
⎥⎥⎦
⎤
⎢⎢⎣
⎡ +−
yxxd
Hence, by integration, we have
kyxx =+− 22ln
Case 1: When an integrating factor u (x), a function of ∃ x only. This happens if the expression
NxN
yM
∂∂
−∂∂
is a function of x only. Then the integrating factor is given by ),( yxu
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
⎮⎮
⌡
⌠ ∂∂
−∂∂
= dxN
xN
yM
u exp
Case 2: When an integrating factor , a function of y only. This happens if the expression ∃ )(yu
My
MxN
∂∂
−∂∂
is a function of only. Then IF is given by y ),( yxu
35 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
⎮⎮
⌡
⌠ ∂∂
−∂∂
= dyM
yM
xN
u exp
Case 3: If the given equation is homogeneous and 0≠+ yNxM
Then yNxMu
+=
1
Case 4: If the given equation is of the form 0)()( =+ dyxyxgdxxyyf
and 0− ≠yNxM Then
yNxMu
−=
1
Once the IF is found, we multiply the old equation by u to get a new one, which is exact. Solve the exact equation and write the solution. Advice: If possible, we should check whether or not the new equation is exact? Summary: Step 1. Write the given equation in the form 0),(),( =+ dyyxNdxyxM provided the equation is not already in this form and determine M and . NStep 2. Check for exactness of the equation by finding whether or not
xN
yM
∂∂
=∂∂
Step 3. (a) If the equation is not exact, then evaluate
NxN
yM
∂∂
−∂∂
If this expression is a function of only, then x
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
⎮⎮
⌡
⌠ ∂∂
−∂∂
= dxN
xN
yM
xu exp)(
36 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Otherwise, evaluate
M
yM
xN
∂∂
−∂∂
If this expression is a function of y only, then
⎟⎟⎟⎟
⎠
⎞
⎜⎜⎜⎜
⎝
⎛
⎮⎮
⌡
⌠ ∂∂
−∂∂
= dyM
yM
xN
yu exp)(
In the absence of these 2 possibilities, better use some other technique. However, we could also try cases 3 and 4 in step 4 and 5 Step 4. Test whether the equation is homogeneous and
0≠+ yNxM
If yes then yNxMu
+=
1
Step 5. Test whether the equation is of the form
0)()( =+ dyxyxgdxxyyf
and whether 0− ≠yNxM If yes then
yNxMu
−=
1
Step 6. Multiply old equation by u. if possible, check whether or not the new equation is exact? Step 7. Solve the new equation using steps described in the previous section. Illustration: Example 1 Solve the differential equation
xyxyxy
dxdy
++
−= 223
Solution: 1. The given differential equation can be written in form
0)()3( 22 =+++ dyxyxdxyxy Therefore
23),( yxyyxM +=
37 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
xyxyxN += 2),(
2. Now yxy
M 23 +=∂∂ , yx
xN
+=∂∂ 2 .
xN
yM
∂∂
≠∂∂
∴
3. To find an IF we evaluate
xN
xN
yM
1=
∂∂
−∂∂
which is a function of x only. 4.Therefore, an IF u (x) exists and is given by
xeexu xdx
x ===⎮⌡⌠
)ln(1
)(
5. Multiplying the given equation with the IF, we obtain
0)()3( 2322 =+++ dyyxxdxxyyx which is exact. (Please check!) 6. This step consists of solving this last exact differential equation.
38 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Solution of new exact equation:
1. SincexNxyx
yM
∂∂
=+=∂∂ 23 2 , the equation is exact.
2. We find F (x, y) by solving the system
⎪⎪⎩
⎪⎪⎨
⎧
+=∂∂
+=∂∂
.
3
23
22
yxxyF
xyyxxF
3. We integrate the first equation to get
)(2
),( 22
3 yyxyxyxF θ++=
4. We differentiate w. r. t. ‘y’ and use the second equation of the system in step 2 to Fobtain
yxxyyxxyF 2323 )( +=′++=∂∂ θ
′ 0⇒ =θ , No dependence on x. 5. Integrating the last equation to obtain C=θ . Therefore, the function is ),( yxF
22
3
2),( yxyxyxF +=
We don't have to keep the constant C, see next step. 6. All the solutions are given by the implicit equation CyxF =),( i.e.
2 2
32
x yx y C+ =
Note that it can be verified that the function
1( , )
2 (2 )u x y
xy x y=
+
is another integrating factor for the same equation as the new equation
2 21 1(3 ) ( ) 0
2 (2 ) 2 (2 )xy y dx x xy dy
xy x y xy x y+ + +
+ +=
is exact. This means that we may not have uniqueness of the integrating factor.
39 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 2. Solve
( ) 0222 22 =++− xydydxyxx Solution:
xyN
yxxM2
22 22
=+−=
yxNy
yM 2,4 =
∂∂
=∂∂
xN
yM
∂∂
≠∂∂
∴
The equation is not exact.
Here xxy
yyN
NM xy 12
24=
−=
−
Therefore, I.F. is given by
⎟⎠⎞
⎜⎝⎛= ∫ dxxu
1exp
xu =
∴ I.F is x.
Multiplying the equation by x, we have
( ) 0222 2223 =++− ydyxdxxyxx This equation is exact. The required Solution is
022
34
32
4cyxxx =+−
cyxxx =+− 2234 1283
40 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 3
Solve 0sin =⎟⎟⎠
⎞⎜⎜⎝
⎛−+ dyy
yxdx
Solution: Here
xN
yM
yxN
yM
yyxNM
∂∂
≠∂∂
∴
=∂∂
=∂∂
−==
1 ,0
sin ,1
The equation is not exact.
Now
y
yM
MN yx 11
01
=−
=−
Therefore, the IF is yy
dyyu == ∫exp)(
Multiplying the equation by y, we have
0)sin( =−+ dyyyxydx
or 0sin =−+ ydyyxdyydx
or 0sin)( =− ydyyxyd
Integrating, we have
cyyyxy =−+ sincos
Which is the required solution.
41 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 4 Solve ( ) ( ) 032 2322 =−−− dyyxxdxxyyx Solution: Comparing with
0=+ NdyMdx we see that
2 2 32 and N ( 3 )2M x y xy x x y= − = − − Since both M and are homogeneous. Therefore, the given equation is homogeneous. NNow
032 22223223 ≠=+−−=+ yxyxyxyxyxyNxMHence, the factor u is given by
221yx
u = yNxMu
+=
1∵
Multiplying the given equation with the integrating factor , we obtain. u
0321 2 =⎟⎟⎠
⎞⎜⎜⎝
⎛−−⎟⎟
⎠
⎞⎜⎜⎝
⎛− dy
yyxdx
xy
Now
yy
xxy
M 3N and 21 2 +−
=−=
and therefore
xN
yyM
∂∂
=−=∂∂
21
Therefore, the new equation is exact and solution of this new equation is given by
Cyxyx
=+− ||ln3||ln2
Example 5 Solve ( ) ( ) 02 2222 =−++ dyyxxyxdxyxxyy Solution: The given equation is of the form
0)()( =+ dyxyxgdxxyyf Now comparing with
42 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
0=+ NdyMdx
We see that ( ) ( )2222 N and 2 yxxyxyxxyyM −=+=
Further
0 3
233
33223322
≠=
+−+=−
yx
yxyxyxyxyNxM
Therefore, the integrating factor u is
yNxMu
yxu
−==
1 ,3
133 ∵
Now multiplying the given equation by the integrating factor, we obtain
0113121
31
22 =⎟⎟⎠
⎞⎜⎜⎝
⎛−+⎟⎟
⎠
⎞⎜⎜⎝
⎛+ dy
yxydx
xyx
Therefore, solutions of the given differential equation are given by
Cyxxy
=−+− ||ln||ln21
where 3C0 =C
43 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Exercise Solve by finding an I.F
1. ()dx y x ydx xdy2 2+ = −
2. 0sin =−+ dxx
xydy
3. ( ) ( ) 0422 434 =−+++ dyxyxydxyy 4. ( ) 0222 =++ xydydxyx 5. ( ) 0234 2 =++ xydydxyx 6. ( ) ( ) 0223 3342 =++ dyyxdxxyyx
7. 12 −+= yedxdy x
8. ( ) ( ) 03 22 =+++ dyxyxdxyxy 9. ( ) 02 2 =−+ − dyexyydx y 10. ( ) 0cossin2 =++ ydyxydxx
44 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture 7
First Order Linear Equations
The differential equation of the form:
)()()( xcyxbdxdyxa =+
is a linear differential equation of first order. The equation can be rewritten in the following famous form.
)()( xqyxpdxdy
=+
where and are continuous functions.)(xp )(xq Method of solution: The general solution of the first order linear differential equation is given by
∫
)()()(
xuCdxxqxuy +=
Where ∫( )dxxx )()( pu exp= The function is called the integrating factor. If it is an IVP then use it to find the constant C.
)(xu
Summary:
1. Identify that the equation is 1st order linear equation. Rewrite it in the form
)()( xqyxpdxdy
=+
if the equation is not already in this form. 2. Find the integrating factor
∫=
dxxpexu
)()(
3. Write down the general solution
)(
)()(
xu
Cdxxqxuy
∫ +=
4. If you are given an IVP, use the initial condition to find the constant C. 5. Plug in the calculated value to write the particular solution of the problem.
45 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 1: Solve the initial value problem
2)0( ),(cos)tan( 2 ==+′ yxyxySolution: 1.The equation is already in the standard form
)()( xqyxpdxdy
=+
with
⎩⎨⎧
=
=
xq(x)
xxp2cos
tan)(
2. Since
∫ xxdxx secln cosln tan =−= Therefore, the integrating factor is given by
∫ xdxxexu sec tan)( ==
3. Further, because
∫∫ == xdxxdxxx sin cos cossec 2 So that the general solution is given by
( ) xCxxCxy cos sin
secsin
+=+
=
4. We use the initial condition 2)0( =y to find the value of the constant C
2)0( == Cy
5. Therefore the solution of the initial value problem is
( ) xxy cos2sin +=
46 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 2: Solve the IVP 4.0)0( ,12
12
22 =+=
+− y
ty
tt
dtdy
Solution: 1.The given equation is a 1st order linear and is already in the requisite form
)()( xqyxpdxdy
=+
with ⎪⎩
⎪⎨
⎧
+=
+−=
2
2
12 )(
12)(
ttq
tttp
2. Since |1|ln1
2 22 tdtt
t+−=⎮⌡
⌠⎟⎠⎞
⎜⎝⎛
+−
Therefore, the integrating factor is given by
1221
2
)1()( −⎮⌡
⌠
+−
+== tetudt
t
t
3. Hence, the general solution is given by
)(
)()(
tu
Cdttqtuy ∫ += , ∫ ⎮⌡
⌠+
= dtt
dttqtu 22 )1(2)()(
Now dtt
tt
dtt
ttdtt ⎮⌡
⌠⎟⎟⎠
⎞⎜⎜⎝
⎛+
−+
=⎮⌡⌠
+−+
=⎮⌡⌠
+ 222
222
22
22 )1(112
)1(12
)1(2
The first integral is clearly . For the 2t1tan− nd we will use integration by parts with t as first function and 22 )1(
2t
t+ as 2
nd function.
⎮⌡
⌠⎮⌡⌠ +
+−=
++⎟
⎠⎞
⎜⎝⎛
+−=
+− )(tan
111
11
)1(2 1
22222
2
tt
tdttt
tdttt
211
21
22 1)(tan)(tan
1)(tan2
)1(2
tttt
tttdt
t ++=−
++=⎮⌡
⌠+
−−−
The general solution is: ⎟⎠⎞
⎜⎝⎛ +
+++= C
tttty 2
1-2
1)(tan )1(
4. The condition gives 4.0)0( =y 4.0=C 5. Therefore, solution to the initial value problem can be written as:
)1(4.0)(tan)1( 212 tttty ++++= −
47 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 3:
Find the solution to the problem
, 1 . cos . sincos 32 +−=′ ytytt 04
=⎟⎠⎞
⎜⎝⎛πy
Solution: 1. The equation is 1st order linear and is not in the standard form
)()( xqyxpdxdy
=+
Therefore we rewrite the equation as
tt
ytty
sincos1
sin cos
2=+′
2. Hence, the integrating factor is given by
ttedt
tt
etu sin| sin|lnsincos
)( ===⎮⎮
⌡
⌠
3. Therefore, the general solution is given by
t
Cdttt
t y
sin sincos
1sin 2⎮⌡⌠ +
=
Since
tdttdt
ttt tan
cos1
sin cos1sin 22 =⎮⌡
⌠=⎮⌡⌠
Therefore
tCtt
Ctt
Cty csc secsincos
1sin tan
+=+=+
=
(1) The initial condition 0)4/( =πy implies 022 =+C
which gives . 1−=C(2) Therefore, the particular solution to the initial value problem is tty cscsec −=
48 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 4 Solve ( )32 dyx y ydx+ = Solution: We have
32yxy
dxdy
+=
This equation is not linear in . Let us regard y x as dependent variable and as independent variable. The equation may be written as
y
y
yxdydx 32+
=
or 221 yxydy
dx=−
Which is linear in x
yy
dyy
IF 11lnexp1exp =⎥⎦
⎤⎢⎣
⎡=⎥
⎦
⎤⎢⎣
⎡⎮⌡
⌠⎟⎟⎠
⎞⎜⎜⎝
⎛−=
Multiplying with they
IF 1= , we get
211 2 yxydydx
y=−
yyx
dyd 2 =⎟⎟
⎠
⎞⎜⎜⎝
⎛
Integrating, we have
2 cyyx
+=
( ) 2 cyyx += is the required solution.
49 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Example 5 Solve
( ) ( ) 121431 +=−+− xyxdxdyx
Solution: The equation can be rewritten as
( )311
14
−
+=
−+
x
xyxdx
dy
Here ( ) .1
4−
=x
xP
Therefore, an integrating factor of the given equation is
( )[ ] ( )44 11lnexp1
4exp −=−=⎥⎦⎤
⎢⎣⎡⎮⌡⌠
−= xx
xdxIF
Multiplying the given equation by the IF, we get
( ) ( ) 1141 234 −=−+− xyxdxdyx
or ( )[ ] 11 24 −=− xxydxd
Integrating both sides, we obtain
( ) cxxxy +−=−3
13
4
which is the required solution.
50 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Exercise Solve the following differential equations
1. xey
xx
dxdy 212 −=⎟
⎠⎞
⎜⎝⎛ ++
2. xexydxdy 3233 −=+
3. ( ) xyxxdxdyx =++ cot1
4. ( ) ( ) 111 ++=−+ nx xenydxdyx
5. ( )( )22
2
1141x
xydxdyx
+=++
6. θθθ
cossec =+ rddr
7. xxx
eeey
dxdy
−
−
+−
=+21
8. ( )dyxedx y 23 −=
Solve the initial value problems
9. ( ) ( ) 20 ,2 23 =−+= yeexydxdy xx
10. ( ) ( ) ( ) 11 ,31122 2 =−+=+++ yxyxdxdyxx
51 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture 8
Bernoulli Equations
A differential equation that can be written in the form
nyxqyxp
dxdy )()( =+
is called Bernoulli equation. Method of solution: For the equation reduces to 11,0=n st order linear DE and can be solved accordingly.
For we divide the equation with to write it in the form 1,0≠nny
)()( 1 xqyxpdxdyy nn =+ −−
and then put
nyv −= 1
Differentiating w.r.t. ‘x’, we obtain
yynv n ′−=′ −)1( Therefore the equation becomes
)()1()()1( xqnvxpndxdv
−=−+
This is a linear equation satisfied by . Once it is solved, you will obtain the function v
)1(
1nvy −=
If , then we add the solution 1>n 0=y to the solutions found the above technique.
52 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Summary: 1.Identify the equation
nyxqyxp
dxdy )()( =+
as Bernoulli equation. Find n. If divide by and substitute; 1,0≠n ny
nyv −= 1
2. Through easy differentiation, find the new equation
)()1()()1( xqnvxpndxdv
−=−+
3. This is a linear equation. Solve the linear equation to find v.
4. Go back to the old function y through the substitution )1(
1nvy −= .
6. If , then include y = 0 to in the solution. 1>n 7. If you have an IVP, use the initial condition to find the particular solution.
Example 1: Solve the equation 3yy
dxdy
+=
Solution: 1. The given differential can be written as
3yy
dxdy
=−
which is a Bernoulli equation with 1)(,1)( =−= xqxp , n=3. Dividing with we get 3y
123 =− −− ydxdyy
Therefore we substitute
231 −− == yyv
53 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2. Differentiating w.r.t. ‘x’ we have
⎟⎠⎞
⎜⎝⎛−=−
dxdv
dxdyy
213
So that the equation reduces to
22 −=+ vdxdv
3. This is a linear equation. To solve this we find the integrating factor )(xu
xdx eexu 2
2)( =∫=
The solution of the linear equation is given by
( )
x
x
e
cdxe
xu
cdxxqxuv 2
2 2
)(
)()( ∫∫ +−=+=
Since xx edxe 22 )2( −=−∫
Therefore, the solution for is given by v
12
2
2
−=+−
= − xxx
Cee
Cev 4. To go back to y we substitute 2−= yv . Therefore the general solution of the given DE is
( ) 21
2 1 −− −±= xCey 5. Since , we include the 1>n 0=y in the solutions. Hence, all solutions are
0=y , 212 )1(
−− −±= xCey Example 2:
Solve 21 xyyxdx
dy=+
Solution: In the given equation we identify ( ) ( ) 2 and ,1 === nxxqx
xP .
Thus the substitution gives 1−= yw
.1 xwxdx
dw−=−
The integrating factor for this linear equation is
1lnln 1 −−⎮⌡
⌠−===
−
xeee xxxdx
54 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Hence [ ] .11 −=− wxdxd
Integrating this latter form, we get .or 21 cxxwcxwx +−=+−=−
Since , we obtain 1−= yww
y 1= or
cxx
y+−
= 21
For the trivial solution 0>n 0=y is a solution of the given equation. In this example, is a singular solution of the given equation. 0=y
Example 3: Solve:
21
21xy
xxy
dxdy
=−
+ (1)
Solution: Dividing (1) by 21
y , the given equation becomes
xyx
xdxdyy =
−+
−21
221
1 (2)
Put vy =21
or. dxdv
dxdyy =
−2
1
21
Then (2) reduces to
( ) 212 2xv
xx
dxdv
=−
+ (3)
This is linear in v .
( ) ( ) ( )41
222 11ln4
1exp12
expI.F−
−=⎥⎦⎤
⎢⎣⎡ −−
=⎥⎦
⎤⎢⎣
⎡⎮⌡⌠
−= xxdx
xx
Multiplying (3) by ( ) ,1 41
2−
− x we get
( )( ) ( ) 4/124/52
41
2
12121
x
xvx
xdxdvx
−=
−+−
−
or ( ) ( )⎥⎥⎦
⎤
⎢⎢⎣
⎡−−
−=
⎥⎥⎦
⎤
⎢⎢⎣
⎡−
−−41
241
2 12411 xxvx
dxd
55 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Integrating, we have
( ) ( ) cxxv +−−=−−
4/31
411
43
241
2
or ( )3
1124/12 xxcv −−−=
or ( )3
1124/122
1xxcy −−−=
is the required solution.
56 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Exercise
Solve the following differential equations
1. xyydxdyx ln2=+
2. 3xyydxdy
=+
3. 2yeydxdy x=−
4. ( )13 −= xyydxdy
5. ( ) 21 xyyxdxdyx =+−
6. xyydxdyx =+ 22
Solve the initial-value problems
7. ( )211 ,32 42 ==− yyxy
dxdyx
8. ( ) 40 ,12/32/1 ==+ yydxdyy
9. ( ) ( ) 01 ,11 2 ==+ ydxdyxyxy
10. ( ) 11 ,2 2 =−= yyx
xy
dxdy
57 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
SUBSTITUTIONS
Sometimes a differential equation can be transformed by means of a substitution into a form that could then be solved by one of the standard methods i.e. Methods used to solve separable, homogeneous, exact, linear, and Bernoulli’s differential equation.
An equation may look different from any of those that we have studied in the previous lectures, but through a sensible change of variables perhaps an apparently difficult problem may be readily solved.
Although no firm rules can be given on the basis of which these substitution could be selected, a working axiom might be: Try something! It sometimes pays to be clever.
Example 1 The differential equation
( ) ( ) 02121 =−++ dyxyxdxxyy is not separable, not homogeneous, not exact, not linear, and not Bernoulli. However, if we stare at the equation long enough, we might be prompted to try the substitution
xuyxyu2
or 2 ==
Since 22xudxxdudy −=
The equation becomes, after we simplify
( ) .012 2 =−+ xduudxu we obtain cuux =−− − lnln2 1
58 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
xyc
yx
21
2ln +=
,22/1
1xyec
yx
=
xyyecx 2/112=
where was replaced by . We can also replace by if desired ce 1c 12c 2c Note that The differential equation in the example possesses the trivial solution , but then this function is not included in the one-parameter family of solution.
0=y
Example 2 Solve
.6322 2 −=+ xydxdyxy
Solution:
The presence of the term dxdyy2 prompts us to try 2yu =
Since
dxdyy
dxdu 2=
Therefore, the equation becomes
Now 632 −=+ xudxdux
or x
uxdx
du 632 −=+
This equation has the form of 1st order linear differential equation
)()( xQyxPdxdy
=+
59 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
with x
xP 2)( = and x
xQ 63)( −=
Therefore, the integrating factor of the equation is given by
I.F = 2ln
22
xee xdx
x ==⎮⌡⌠
Multiplying with the IF gives
[ ] xxuxdxd 63 22 −=
Integrating both sides, we obtain 3 232 cxxux +−=
or .3 2322 cxxyx +−= Example 3 Solve
xye
yxy
dxdyx /
3=−
Solution: If we let
xyu =
Then the given differential equation can be simplified to
dxduuue =− Integrating both sides, we have
∫∫ =− dxduuue Using the integration by parts on LHS, we have
cxueuue +=−−−− or
Where c( ) uexcu −=+ 11 1=-c We then re-substitute
xyu =
60 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
and simplify to obtain
( ) xyexcxxy / 1 −=+ Example 4 Solve
2
2
22 ⎟
⎠⎞
⎜⎝⎛=
dxdyx
dxyd
Solution: If we let
yu ′= Then ydxdu ′′=/ Then, the equation reduces to
2 2xudxdu
=
Which is separable form. Separating the variables, we obtain
xdxudu 22 =
Integrating both sides yields
∫∫ =− xdxduu 22
or u− 2121 cx +=−
The constant is written as for convenience. 21c
Since yu ′=− /11
Therefore 1
21
2 cxdxdy
+−=
or 21
2 cxdx+
−dy =
⎮⌡
⌠
+ 22 1cx
dx−=∫dy
1
1
12 tan
1cx
c−−=cy +
61 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Exercise Solve the differential equations by using an appropriate substitution. 1. 0)1( =++ dyyeydx x
2. ( ) ( ) 0 /12 2 / =−++ − dyyxdxe yx
3. )(tan ln2 2 csc2 yxdxdyyx −=
4. )( sin1 yxex
dxdy +−=+
5. yxexx
dxdyy =+ ln2
6. 12 242 +=+ yxxydxdyx
7. 22 xe
dxdyxe yy =−
62 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture-09
2 2
2 2
2 2 2
2
2
2
2 2
x + yE x a m p le 1 : y '=x y
d y x + yS o lu t i o n : =d x x y
d y d wp u t y = w x t h e n = w + xd x d x
d w x + w x 1 + w w + x = = d x x x w w
d w 1w + x = + wd x w
d xw d w =x
I n t e g r a t i n gw = ln x + ln c
2y = ln |x c |
2 xy = 2 x ln |x c |
2
63 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
(2 xy-y)dyExample 2: =dx x
(2 xy-y)dySolution: =dx x
put y= wx
dw (2 xwx -xw)w+x =dx xdww+x =2 w -wdx
dwx =2 w -2wdxdw dx=
x2( w -w)dw dx=
x2( w -w)dw dx=
x2 w (1- w )
put w =t1 dxWe get dt=
1-t x-ln|1-t|=ln|x|+ln|c|-ln|1-t|=l
∫ ∫
∫ ∫
∫ ∫
-1
-1
-1
n|xc|(1-t) =xc
(1- w ) =xc
(1- y/x ) =xc
64 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2 2
2 2
2 2
2 2
2 2
E x a m p le 3 : ( 2 y x - 3 ) d x + ( 2 y x + 4 ) d y = 0S o lu t i o n : ( 2 y x - 3 ) d x + ( 2 y x + 4 ) d y = 0H e r e M = ( 2 y x - 3 ) a n d N = ( 2 y x + 4 )¶ M ¶ N= 4 x y =¶ y ¶ x
¶ f ¶ f= ( 2 y x - 3 ) a n d = ( 2 y x + 4 )¶ x ¶ yI n t e g r a t e w . r . t . 'x 'f ( x , y ) = x y - 3 x + h ( y )D i f f e r e n t i a t e w . r . t . 'y '
¶ f = 2 x¶ y
2 2
2 21
y + h '( y ) = 2 x y + 4 = N
h '( y ) = 4I n t e g r a t e w . r . t . 'y 'h ( y ) = 4 y + cx y - 3 x + 4 y = C
2
2 2
2 2
2
2
2
2
2
2
(x/y)
2 2 (x/y) 2 (x/y)
2 2 (x/y) 2 (x/y)
(x/y)
w
w
w
w
w
w
dy 2xyeExample 4: =dx y +y e +2x e
dx y +y e +2x eSolution: =dy 2xye
put x/y=wAftersubsitution
dw 1+ey =dy 2we
dy 2we= dwy 1+e
Integrating
ln|y|=ln|1+e |+lnc
ln|y|=ln|c(1+e2
2(x/y)
)|
y=c(1+e )
65 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2
2
2
2
2
2
3
dy y 3xExample 5: + =dx xlnx lnx
dy y 3xSolution: + =dx xlnx lnx
dy 1 3x+ y=dx xlnx lnx
1 3p(x)= and q(x)=xlnx lnx
1I.F=exp( dx)=lnxxlnx
Multiply both side by lnxdy 1lnx + y=3xdx x
d (ylnx)=3xdxIntegrate
3xylnx= +c3
∫
x
66 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2 x 2
2 x 2
x
2
x
Exam ple 6: (y e +2xy)dx-x dy=0Solution: H ere M =y e +2xy N =-x¶M ¶N=2ye +2x, = -2x¶y ¶x
¶M ¶NC learly ¹ ¶y ¶x
T he given equation is not exact d ivide the equation by y to m ake it exact
2xe + dy
⎡ ⎤⎢ ⎥⎣ ⎦
2
2
2
2x
2
2x
2x
xx+ - dy=0y
¶M 2x ¶NN ow =- =¶y ¶xy
Equation is exact
¶f 2x ¶f x= e + = -¶x y ¶y yIntegrate w .r.t. 'x '
xf(x ,y)=e +y
xe + =cy
⎡ ⎤⎢ ⎥⎣ ⎦
⎡ ⎤⎡ ⎤⎢ ⎥⎢ ⎥
⎣ ⎦ ⎣ ⎦
67 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
[ ]
[ ]
Example 7:dyxcosx +y(xsinx+cosx)=1dx
dySolution: xcosx +y(xsinx+cosx)=1 dx
dy xsinx+cosx 1+y =dx xcosx xcosxdy 1+y tanx+1/x =dx xcosxI.F = exp( (tanx+1/x)dx)=xsecx
dy xsecxxsecx +yxsecx tanx+1/x =dx xcosxdxsecx
⎡ ⎤⎢ ⎥⎣ ⎦
∫
[ ]
[ ]
2
2
y +y xsecxtanx+secx =sec xdx
d xysecx =sec xdxxysecx=tanx+c
68 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2y 2y
2y 2y
2y
2y
2
2
2
2
2
2
dy lnxExample 8: xe +e =dx x
dy lnxSolution: xe +e =dx x
put e =udy du2e =dx dx
x du lnx+u=2 dx xdu 2 lnx+ u=2dx x x
lnxHere p(x)=2/x And Q(x)=x
2I.F =exp( dx)=xx
dux +2xu=2lnxdx
d (x u)=2lnxdxIntegratex u=2[xlnx-x]
∫
2 2y
+cx e =2[xlnx-x]+c
69 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
x
x
x
x
d x x
x 2 x
2 xx
2 xx
d yE x a m p le 9 : + y ln y= yed x
d yS o lu tio n : + y ln y= yed x
1 d y + ln y= ey d xp u t ln y= ud u + u = ed x
I.F .= e = ed (e u )= e
d xIn te g ra te
ee .u = + c2ee ln y= + c2
∫
70 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2
-1
dyExample 10: 2xcsc2y =2x-lntanydx
dySolution:2xcsc2y =2x-lntanydx
put lntany=udy du=sinycosydx dx2xsinycosy du =2x-u2sinycosy dxdux =2x-udx
du 1+ u=2dx xI.F =exp( 1/xdx)=x
dux +u=2xdx
d (xu)=2xdxxu=x +cu=x+cxlntany=x+c
∫
-1x
71 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2 3 x
2 3 x
2 3 x
2 3 x
3 x2
3 x
3 x
-x
-x -x 2 x
-x 2 x
d yE x am p le 1 1 : + x + y+ 1 = (x + y) ed x
d yS o lu tio n : + x + y+ 1 = (x + y) ed x
P u t x + y= ud u + u = u ed xd u + u = u e (B ern o u li 's )d x1 d u 1+ = e
d x uup u t 1 /u = w
d w- + w = ed x
d w -w = -ed xI.F = ex p ( -d x )= e
d we -w e = -ed x
d (e w )= -ed xIn te
∫
2 x-x
3 xx
3 xx
g ra te-ee w = + c
21 -e= + ceu 2
1 -e= + cex + y 2
72 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2
2
2
2
2
-1
-11
1
1
dyExam ple 12: =(4x+y+1)dx
dySolution: =(4x+y+1)dx
put 4x+y+1=uw e getdu -4=udxdu =u +4dx
1 du=dxu +4Integrate1 utan =x+c2 2
utan =2x+c2
u=2tan(2x+c )4x+y+1=2tan(2x+c )
73 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2 2
2 2
2 2
2 2 2
2
2 2
2 2 2
2 2
2
2 2
- 1
- 1
d yE x a m p l e 1 3 : ( x + y ) =d x
d yS o l u t i o n : ( x + y ) = ad x
p u t x + y = ud uu ( - 1 ) = ad x
d uu - u = ad x
u d u = d xu + aI n t e g r a t e
u + a - a d u = d xu + a
a( 1 - ) d u = d xu + a
uu - a t a n = x + ca
x + y( x + y ) - a t a n = x + ca
∫ ∫
∫ ∫
a
74 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2 2
2 2
2 2
x
x x x
x x
x x x
dyExample 14: 2y +x +y +x=0dx
dySolution: 2y +x +y +x=0dx
put x +y =udu -2x+u+x=0dxdu +u=xdxI.F= Exp( dx)=e
due +ue =xedx
d (e u)=xedxIntegratinge u=xe -e +c
∫
75 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
' -(x+y)
' -(x+y)
-u
-u
u
u
Example 15: y +1=e sinxSolution: y +1=e sinxput x+y=udu =e sinxdx1 du=sinxdx
ee du=sinxdxIntegratee =-cosx+cu=ln|-cosx+c|x+y=ln|-cosx+c|
76 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
4 2 3 3 3
4 2 3 3 3
3 3
2 3 3 2
3 2 2 3
4 2 3 3
3
2
3
3 3 3
E x a m p le 1 6 : x y y '+ x y = 2 x -3S o lu t io n : x y y '+ x y = 2 x -3p u t x y = u
d y d u3 x y + 3 x y =d x d x
d y d u3 x y = -3 x yd x d x
d y x d ux y = -x yd x 3 d x
x d u = 2 x -33 d xd u = 6 x -9 /xd xIn te g ra teu = 2 x -9 ln x + cx y = 2 x -9 ln x + c
77 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
2
Example 17:cos(x+y)dy=dxSolution:cos(x+y)dy=dx
dy dvput x+y=v or 1+ = , we getdx dx
dvcosv[ -1]=1dxcosv 1dx= dv=[1- ]dv
1+cosv 1+cosv1 vdx=[1- sec ]dv2 2
Integratevx+c=v-tan2x+yx+c=v-tan
2
78 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
Lecture-10
Applications of First Order Differential Equations
In order to translate a physical phenomenon in terms of mathematics, we strive for a set of equations that describe the system adequately. This set of equations is called a Model for the phenomenon. The basic steps in building such a model consist of the following steps:
Step 1: We clearly state the assumptions on which the model will be based. These assumptions should describe the relationships among the quantities to be studied. Step 2: Completely describe the parameters and variables to be used in the model. Step 3: Use the assumptions (from Step 1) to derive mathematical equations relating the parameters and variables (from Step 2). The mathematical models for physical phenomenon often lead to a differential equation or a set of differential equations. The applications of the differential equations we will discuss in next two lectures include:
Orthogonal Trajectories. Population dynamics. Radioactive decay. Newton’s Law of cooling. Carbon dating. Chemical reactions.
etc.
Orthogonal Trajectories
We know that that the solutions of a 1st order differential equation, e.g. separable equations, may be given by an implicit equation
( ) 0,, =CyxF with 1 parameter C , which represents a family of curves. Member curves can be obtained by fixing the parameter C. Similarly an nth order DE will yields an n-parameter family of curves/solutions.
79 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
( ) 0,,,,, 11 =nCCCyxF
The question arises that whether or not we can turn the problem around: Starting with an n-parameter family of curves, can we find an associated nth order differential equation free of parameters and representing the family. The answer in most cases is yes.
Let us try to see, with reference to a 1-parameter family of curves, how to proceed if the answer to the question is yes.
1. Differentiate with respect to x, and get an equation-involving x, y, dxdy and C.
2. Using the original equation, we may be able to eliminate the parameter C from the new equation.
3. The next step is doing some algebra to rewrite this equation in an explicit form
( )yxfdxdy ,=
For illustration we consider an example: Illustration
Example
Find the differential equation satisfied by the family
xCyx 22 =+
Solution:
1. We differentiate the equation with respect to x, to get
Cdxdyyx =+ 22
2. Since we have from the original equation that
xyxC
22 +=
then we get
80 © Copyright Virtual University of Pakistan
Differential Equations (MTH401) VU
xyx
dxdyyx
22
22 +=+
3. The explicit form of the above differential equation is
xyxy
dxdy
2
22 −=
This last equation is the desired DE free of parameters representing the given family.
Example.
Let us consider the example of the following two families of curves
⎩⎨⎧
=+=
222
Cyxmxy
The first family describes all the straight lines passing through the origin while the second family describes all the circles centered at the origin
If we draw the two families together on the same graph we get
81 © Copyright Virtual University of Pakistan
Different