Math Lec1
Math Lec1
Math Lec1
Lecture 1
Prof. Dr. Rafea Al-Suhili
City College of New York- Groove School of Eng. Civil Eng.
Department
Email:ralsuhili@ccny.cuny.edu
= = 3
= 2
( 20)
That is the rate of change of the ball temperature with respect to time is
proportional to the instantaneous difference in temperature between the
ball and the surrounding (water), hence;
dT
= k (T 20)
dt
, DE
Ball at T=100 Co
Water at T= 20 Co
=
( 20)
Integrate both sides
( 20) = + ln
Where Ln C is the arbitrary constant of integration and Ln is the natural
logarithm function :
Then since Ln A-Ln B= Ln (A/B) we got:
20
=
20
7
8
7
8
Hence k=-0.0667
Question: What is the unit of k ?justify the negative sign of k?
Hence the solution is :
= 80 0.0667 + 20
= 5.336 0.0667
90
Ball Temperature in C
80
70
60
50
40
30
20
10
20
30
40
50
Time in sec
60
70
80
90
100
70
80
90
100
-1
-2
-3
-4
-5
-6
10
20
30
40
50
Time in sec
60
MatLab program for drawing the variation of ball temperature and rate of
change of ball temperature with time
clc
t(1)=0; % initial time value
dt=0.02; %time interval
n=5000;
for i=1:n
Te(i)=80*exp(-0.0667*t(i))+20;
dTt(i)=-5.336*exp(-0.0667*t(i));
t(i+1)=t(i)+dt;
end
Te(n+1)=80*exp(-0.0667*t(n+1))+20;
dTt(n+1)=-5.336*exp(-0.0667*t(n+1));
%plot(t,Te)
plot(t,dTt)
= 2
= 0
= 1
= 2,
= 0, = 3
The GS is:
= 2 +
Using the given IC, t=0, T=3, then c=3 and the PS is
= 2 + 3
This problem is an IVP.
Example:
Consider the following DE:
2
2
= 3, (0) = 0, (10) = 0,
Integrate once;
= 3 + 1
Integrate again;
3 2
=
+ 1 + 2
2
0 <=x<=10
Where c1 and c2 are the two arbitrary constants of integration and the
solution above is the GS; to obtain the particular solution use the first
boundary condition, x=0, y=0
3(0)2
0=
+ 1 (0) + 2
2
3(10)2
0=
+ 1 (10)
2
C1=-15; and
3 2
=
15
2
This problem is a boundary value problem.
Classification of Differential Equations:
The differential equations can be classified according to different criteria:
1- Type:
- Ordinary Differential Equation: ODE
- Partial Differential Equation:
PDE
Example:
= = 1
2
+
=0
2
The ODE contains normal or total derivative, while the PDE contains
partial derivatives.
Notes:
For engineering problems if we analyze:
- A one to one problem (one dependent and one independent
variable), we get ODE
Example: the example of the ball, the temperature T is the dependent
variable, while the time t is the independent variable T(t)=f(t)
- A one to many problem (one dependent variable and many
independent variables), we get PDE
Example: If it is required to find the temperature in a rectangular steel
plate as a function of the horizontal distance along the length and the
other horizontal distance along the width of the plate T(x,y)=f(x,y)
y
T=50
T=100
T=20
x
T=0
K1
M1
K2
y1
M2
y2
x=0
River , Qr= 20 m3/ses
C= 5 mg/lit
Q=f(x,t),C=g(x,t)
x
Then both the flow Q and the concentration C are function of time t and
distance x, Q=f(x,t), C=g(x,t)
2- Order:
The order of the DE is the highest derivative that exist in it.
Examples:
+ 1 = 0
+ 2 + 3 = 0,
2
2
=0
, 2
, ,
+ = 0, , 2 , 1
2 2
+
= 0, , 2 , 1
2
4- Linear or non linear:
If the dependent variable found multiplied by one of it's
derivatives, we call the DE non linear
Example:
+ 1 = 0, , 1 , 1 ,
+ 1 = 2 , , 1 , 1 ,
( )
c-
+ = 0,
2
2
2
( )
= +
2
2
d- ( + ) = ( )
Solution of First order DE.
The types of the first order ODE are, variable separable,
Homogeneous, exact, linear, and Bernoulli's ODE.
1- Variable separable ODE.
Any first order ODE that can be put in the following form is known
as variable seperable.
() = ()
Example: Solve the following ODE
+ = 2 +
Solution:
(1 + 2 ) = (1 )
=
(1 ) (1 + 2 )
= ln
2
= 0.5
(1 )
(1 + 2 )
2 ln(1 ) = ln(1 + 2 ) + ln
Since ln = ln , ln + ln = ln
ln(1 )2 = ln (1 + 2 )
Taking the inverse of the ln function of both sides that the e function,
Then the solution is:
1
= (1 + 2 )
(1 )2
Example: solve = (1 + ) 2
Solution:
= (1 + ) 2
2 = (1 + )
Integrate both sides
2 = (1 + )
For the right side use =
Let u=(1+x), =
Then du=dx, and =
Then (1 + ) = (1 + ) +
The left side is integrated to 1
Then the solution is 1 = (1 + ) +
= (, )
2
()2 + 3()2
( 2 + 3 2 )
0
(, ) =
=
= 0 (, )
2
2
Hence it is homogeneous, then by using the transformations above
+ ( 2 + 3()2 )
=
2
(1 + 3 2 )
+
=
2
(1 + 2 )
(1 + 3 2 )
=
=
2
2
2
=
(1 + 2 )
ln = ln(1 + 2 ) + = ln (1 + 2 )
Taking e to both sides;
= (1 + 2 ) = (1 + ( )2 )
( + ) = 0
= (, ) =
( + )
Then
(, ) =
+ cot
= (, )
=
=
1
1
( + ) (1 + )
1
2 cot
=
=
1
(1 + 1)
+ )
(1
1
1
2 sin
(1 + )
+
=
=
1
1
2 cot
So for the first term in the right hand side of the above DE we need to
multiply and divide by 2
1
( )
=
+
1
ln
1
1
= ln ( ( ) )
= ( )
+
=
Then if
=
b- Find
(, ) =
=
(3 2 + 1)
(()3 + 2)
(, ) =
(, )
(3()2 + 1)
Hence it is not homogeneous, let us check if it is exact
(, ) = ( 3 + 2), (, ) = (3 2 + 1)
Then
= 3 2
And
= 3 2 ,
(, ) = (, ) + () = ( 3 + 2) + ()
(, ) = 3 + 2 + ()
Now take derivative of f (x,y), w.r.t. y and equate to N(x,y)
= 3 2 + () = (, ) = (3 2 + 1)
Hence () = 1, () =
+ () = ()
Is called linear where P(x), and Q(x) are functions of x only. Then we can
solve using the following steps.
a- Find the integrating factor IF
= ()
b- The solution will be
= () +
Example: Solve the following ODE
(1 + 2 )( ) = 2 , = 1, = 0
Solution: This ODE is not variable Separable, let us check if it is
homogeneous,
1 + 2 + 2
(, ) =
=
1 + 2
1 + ()2 + 2
(, ) =
(, )
1 + ()2
Hence not homogeneous, let us check if exact
(1 + 2 + 2) (1 + 2 ) = 0
Hence
(, ) = (1 + 2 + 2),
(, ) = (1 + 2 )
Then
= 2
And
= 2
And since they are not equal the ODE is not exact. Let us check if it is
linear
1 + 2 + 2
2
=
=
1
+
1 + 2
1 + 2
Or
=1
1 + 2
Compare with linear form
It is linear with () =
2
1+ 2
= () =
, () = 1
1+ 2
= ln(1+
Hence use
= () +
1+ 2
1
1+ 2
. 1 +
2)
1
1 + 2
= 1 +
1 + 2
For x=0, y=1 then
1
1+02
= 1 0 + = 0 + , hence
solution is
= 1 + 1
2
1+
5) Bernoulli's ODE
Any first order ODE that can be put in the form of
+ () = ()
+
= 4
3
3
Hence Bernoulli's type with n=4, and
1
() =
() =
3
3
Using the above transformation
= 1 = 14 = 3
Then = 3 4
3 4
+ (3 4 ) = (3 4 ) 4
3
3
Simplifying
1
+ ( ) =
Hence
1
= = ln =
= () +
1
= + = +
Notes:
1- Sometimes we have ODE that can be solved by two methods of the
above explained ones.
2- Sometimes we have ODE that can be in the form of linear equation
but with exchanging x and y as;
+ () = ()
= 1,
=1
()
1
( )
= =
= () +
= () +
3
=
+
3
+2
Solution: Not any of the types above
Use the following transformations:
= + , = + , = , =
Substitute into the numerator:
3( + 1) + 2( + 2) + 1 = 3 + 2 + 31 + 22 + 1
Substitute into the denominator
( + 1) ( + 2) + 2 = + 1 2 + 2
Now the ODE is:
3 + 2 + 31 + 22 + 1
=
+ 1 2 + 2
In order for this ODE to be homogeneous then ;
31 + 22 + 1 = 0
1 2 + 2 = 0
Solving these two simultaneous equations get c1=-1, and c2=1, and
3 + 2
=
+ 3 + 2
3 + 2
=
=
1
+
3 + 2
=
3 + 2
3 + 2 (1 )
=
=
1
1 2
3 + 2 (1 ) 2 + + 3
=
=
1 2
1 2
(12)
2 ++3
(1 2 )
= 2
++3
Assignment 3-1: solve the integral and substitute for = + , =
+
or = 1 = (1) = + 1, = 2 = 1
4) Integrating Factor
Occasionally it is possible to transform
(, ) + (, ) =
( ) = (), (, ) = ()
a- If
( ) = (), (, ) = ()
b- If
c- If = (, ), = (, ), (, ) =
= 1,
= 1,
( ) = ( 1 + 1) = 2/
(, ) =
()
1
2
=0
2
(, ) =
1
,
(,
)
=
2
1
1
= 2,
= 2 ,
= 2 + 3
2- 3 = ln + 1 ,
3-
+ 2 = 3 ,
(1) = 2
(2) = 1
4- ( + 1)
5678-
2( 2 + ) =
+1
, > 1, (0) = 5
+ = 2
(sin sin ) + ( cos sin ) = 0
(1 + ) + (2 ) = 0
= sec +
, (2) =
9- + cot = sin 2
Second order ODE reducible to first order
Type 1: The dependent variable is not explicitly in the second order ODE
In this case we use:
=
= , = =
+ + 1 = 0
Solution: using the substitution above the ODE
+ 2 + 1 = 0
= 2 + 1
=
2 + 1
Which integrates to
1 = 1
= tan(1 ) =
=
sin(1 )
=
(1 )
sin(1 )
(1 )
As
cos(1 ) = sin(1 ) . (1) = sin(1 )
Then
= ln(cos(1 )) + 2
Type 2: The independent variable dose not appear explicitly in the ODE
In this case we use :
=
=
=
=
=
= 2 + 2 3
Integrate
2
1
= 1 2 + 4
2
2
2
= 21 2 2 + 4
Substitute
(0) = 1, 1 = 1/2
And
2
= 1 2 2 + 4 = (1 2 )2
= +(1 2 ), = (1 2 )
= +(1 2 )
Integrate
1 = + 2
At x=0, y=0, hence c2=0, and
= tanh
Optional Assignments:
Text Book:
Set 1.1: Q2,Q8,Q11
Set 1.3:Q6,Q16
Set 1.4:Q7,Q12
Set 1.5:Q6,Q23