Académique Documents
Professionnel Documents
Culture Documents
Dept
Units 6
:
.) : 20 . ( . : 15 ) : 1 ( + - : 26
)( 24
)( 225
Syllabus:
week 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
:
Topics
First Order Differential Equations Applications on First Order D.E. Second Order Linear D.E. with Constant Coefficients Applications on Second Order D.E. Higher Order Linear D.E. Applications on Higher Order D.E. Integrating Factors Fourier series for Periodic Functions Even and Odd Functions Applications on Fourier Series Laplace Transformations Inverse by Laplace Transforms Applications Solving Equations using Laplace Transforms Numerical Solution of Nonlinear D.E. Simple Iteration Method Newton Raphson Method Interpolation Lagrange Interpolation Solution of Linear Instantaneous D.E. Direct and Indirect Method Numerical Integration Solving Partial D.E. Applications Newton Method for Curve Editing Solving Ordinary D.E. Runge-Kutta Method Power Series Exponential Equations Frobenos Method
References:
12"Advanced Engineering Mathematics", by Erwin Kreyszig. "Advanced Engineering Mathematics", by C. Ray Wylie.
Engineering Analysis
Using Modeling
Definitions: # Differential Equation (D.E.): An equation involving one or more derivatives of a function beside the function itself and the constants and the independent variables. # Solution of D.E.: An equation relates between the dependent and independent variables, and is free of derivatives and satisfies the D.E. For example; ( ) is a D.E., and is a solution of this D.E. ( ) (where x is independent variable and y is dependent variable).
Solution: Differentiating y, we find y'=2c1cos2x-2c2sin2x and y''=-4c1sin2x4c2cos2x. Hence; y''+4y = (-4c1sin2x -4c2cos2x) + 4(c1sin2x+c2cos2x) = (-4c1+4c1)sin2x + (-4c2+4c2)cos2x = 0 (Thus y(x)=c1sin2x + c2cos2x satisfies the given differential equation for all values of x and is a solution for it). # Ordinary D.E.: (O.D.E.): Here the derivative which appear in the D.E. is total derivatives. # Partial D.E.: (P.D.E.): Here the derivative which appear in the D.E. is partial derivatives.
5
# Order of D.E.: Is the order of the highest derivative that appear in the D.E.
# First Order D.E.: A D.E. which contains only functions of x and constants.
# Linear D.E.: When the dependent variable (like y) and its derivatives ( ) and of first degree. Therefore, the general linear ordinary D.E. of order n must take the form: ( ) ( ) ( ) ( ) ( ) and any D.E. cannot be put in this form is called "Nonlinear D.E.". Examples: ( ) linear first order O.D.E. linear second order O.D.E. non-linear third order O.D.E.(y'''y') linear second order O.D.E. non-linear second order O.D.E.(y y') non-linear second order O.D.E.(sin y) non-linear second order O.D.E.(y' y'') non-linear first order O.D.E.(y')2 linear second order O.D.E.
( )
# General solution of D.E.: (G.S.): When solving the D.E. to find the function that satisfies the D.E. The solution with the unknown constants of (integration or solution) is called "General Solution" (G.S.). # Particular solution of D.E.: (P.S.): When the values of the unknown constants of (integration or solution) is determined using initial or boundary conditions, the solution is called "Particular Solution" (P.S.). Note: the problem which contains initial conditions is called "initial value problem", while the problem which contains boundary conditions is called "boundary value problem".
6
Note that :
Example#1: Solve the D.E. : Solution: this equation can be written in the form:
(x2+2)dx ydy = 0 which is separable with A(x) =x2+2 and B(y) =-y. Integrating both sides, gives: (x2+2) dx - y dy = 0 solving gives; solving for y, we obtain OR
Example#3: Solve the D.E. : Solution: separating variables and integrating both sides:
9 y dy = -4 x dx or 9 y2/2 = -2 x2 + c1
7
.G.S. (where c2=ec1) applying initial condition, that x=0, y=1, and substituting in the D.E.; 1=c2 e0 OR c2=1; therefore; P.S.
Note: If either N or M in the D.E. contains (sin, cos, tan, tanh, sinh,..,log, ln, e) it means that this D.E. is not exact.
Now, if the exactness condition is satisfied, solve the D.E. using u= M dx + k(y) where, u=u(x,y),and k(y) is constant of integration, then after this integration derive w.r.t y or ( ) to determine k(y) using .
Example#1: Solve the D.E. (x3 +3x y2)dx+(3x2 y +y3)dy=0. Solution: first test for exactness: M(x,y)= x3+3xy2 and N(x,y)= 3x2y+y3
and; which are equal, so the D.E. is exact. so, ( ) (
( ) ( )
( )
( )
(1)
To find k(y):
cancelling similar terms from the two sides; substituting in equation (1) we get; (
8
( ) ) .. G.S.
y(0)=3.
( ) ( ) .. G.S.
(1)
( ) substituting in (1) we get; Now, using the given initial condition that x=0, y=3
.. P.S.
Example#3: Determine whether the D.E. ydx-xdy=0 is exact or not. Solution: Here; M(x,y)=y and N(x,y)=-x,
and; which are not equal, so the D.E. is not exact! Therefore, to change it to exact D.E. we need to multiply it by a function called "Integrating Factor" (I.F.) Now, if we multiply the given non-exact D.E. by I.F.=( ), we get a new equation:
O.K. exact D.E. The question is "How can we get the I.F.??!" The following equations are used to get I.F.;
I.F.(x) =
( ) ( )
( )
( ( ) (
) )
OR I.F.(y) =
Note: In mathematics:
() and;
Example#1: Solve the following D.E. using exact method: 2sin(y2)dx+ xy cos(y2) ( ) (/ )0.5. Solution: M(x,y)= 2 sin(y2), N(x,y)= xy cos(y2)
( ) ( ) . NOT EXACT
9
( )
( ) ( ) (
( ))
) , Here ignore c
( ( (
)) ) ) ( ) ( )
( (
therefore; k'(y)=0 and k(y)=constant=c and; ( ) G.S. Substituting for the initial condition that x=2, y=(/2)0.5 into the G.S., we get ( ) ( ) P.S.
1) Homogenous D.E.:
y' + p(x) y = 0 ( ) taking e on both sides; this equation can be easily solved by separating variables; ( )
( )
( )
where c = e c*
, this means that this D.E. is not exact, to change it to exact multiply it by I.F.; ( ) ( ) ( )
( )
or (
and putting
( )
Example#1: Solve the following linear D.E. y'-y = e 2x Solution: Here, p=-1, r=e2x, h=p dx=-x
( ) . G.S.
Example#2: Solve the following initial value D.E. y'-y tanx= sin2x , y(0)=1 Solution: Here, p=tanx, r=sin 2x= 2 sinx cosx, h=p dx=tanx dx= ln(secx)
( ) eh=secx, e-h=cosx, . G.S. eh r=(secx)(2sinx cosx) = 2 sinx
therefore, y(x) = cosx [2 sinx dx +c]= c cosx 2 cos2x . G.S. Now, using the initial condition, x=0, y=1; 1=c*1-2*12, thus c=3, therefore, y(x) = 3 cosx 2 cos2x . P.S.
11
Example#2: Solve the D.E. Solution: This D.E. is not separable, nor exact
( ) this is similar to y' + p(x) y = g(x) yn let y1-3=z OR z=y -2 multiplying equation (1) by (-2y - 3), we get; OR
(1)
Brine of 5 gal/min
taking exponentials for the two sides; y 400 = ce-0.025t . G.S. Note: the initial amount of salt in the tank is y(0)=40 Ib (given above) Thus; 40 - 400 = c e0, c = -360 Now, y(t)=400-360 e-0.025t (Ib) (P.S.) (the amount of salt in the tank at any time t)
12
Example#2: Assume that the tank in Ex.#1 above contains 1000 gallons of
water in which 200 lb of salt are dissolved. Fifty gallons of brine, each containing (1+cos t) lb of dissolved salt, run into the tank per minute, and the mixture, kept uniform by stirring, runs out at the same rate. Find the amount of salt y(t) at any time t.
Solution: The time rate of change of salt is: y'=dy/dt= salt inflow rate
salt outflow rate. OR y'=In - Out In = 50*(1+cos t) lb/min. Out = 50(y(t)/1000) = 0.05 y lb/min. so, y'= 50(1+cos t)-0.05y y'+0.05y=50(1+cos t) (non-homogenous linear D.E.) Here p=0.05, h=0.05t ( ( ) ) solving and substituting for the initial condition; y(t)=1000+2.494cost+49.88sint-802.5e-0.05t . P.S.
Example#3: Suppose that you turn off the heat in your home at night 2 hrs
before you go to bed; call this time (t=0). If temperature T at t=0 is 66 0F and at the time you go to bed (t=2) has dropped to 63 0F. What temperature can you expect in the morning, say 8 hrs later (t=10)? This process of cooling off will depend on the outside temperature T A, which is assumed to be constant at 32 0F.
Solution: Newton's Law of Cooling shows that the time rate of change
dT/dt of temperature T of a body is proportional to the difference between T and the outside temperature TA. dT/dt = k(T-TA) = k(T-32), separating variables; where k is unknown constant of proportionality. , integrating; ln(T-32)= k dt . G.S.
taking e for the two sides; T(t) = 32 + cekt using the initial condition that T(0)= 66
T(0)=32+c=66; c= 34, and T(t) = 32 + 34 ekt . P.S. we can also determine the constant k, using T(2)=63 (another given condition) T(2)=32+34 ek.2 = 63, thus e2k= 0.911 765, and k = 0.5 ln(0.911 765)= -0.046 187 thus, T(10)=53.4oF (temperature at morning)
13
1) Homogenous Equations: For second order homogenous linear D.E., a general solution will be of the form: y = c1 y1 + c2 y2 , where c1&c2 are two arbitrary constants, and y1&y2 are two suitable solutions. For the initial value problem, there must be two initial conditions: y(xo)=ko, y'(xo)=k1
With constant coefficients:
Where p(x) and q(x) are constants and not functions of x, the D.E. is called "an equation with constant coefficients"; Here a&b are "constant coefficients". 2+aD+b=0 in operator form: D characteristic equation: 2+a+b=0 and the roots of this equation are: ( ), and Here, we have three cases: ( )
Example#1: Solve the following initial value D.E.: 2y'' + 2y' - 12y = 0, y(0)=10, y'(0)=0 Solution: dividing by 2 gives; y''+y'-6y=0
In operator form: D2+D-6=0 Characteristic equation: 2+-6=0
14
( (
) )
( (
) )
therefore, y = c1y1+c2y2 = c1 e 2 x + c2 e -3 x . G.S. using the initial conditions: y(0)=10, & y'(0)=0 gives; 10=c1e 2(0)+c2e - 3(0) = c1+c2; gives: c1=10-c2 . (a) also; y'= 2c1 e 2 x - 3c2 e -3 x 0= 2c1 e 2 (0) - 3c2 e -3 (0) = 2c1 3c2 . (b) substituting for (a) into (b) gives c2=4, and c1=6 Now; y = 6 e 2 x + 4 e -3 x P.S.
Example#1: Solve the following D.E.: y'' + 8y' + 16y = 0 Solution: Characteristic equation: 2+8+16=0
( ( ) ) ( ( ) )
Example#1: Solve the following initial value D.E.: y'' - 4y' + 4y = 0, y(0)=3 & y'(0)=1 Solution: Characteristic equation: 2-4+4=0
The roots are; 1= 2= = 2 y = c1y1+c2y2 = c1 e 2 x + c2 x e 2 x . G.S. using the initial conditions: y(0)=3, y'(0)=1 3=c1e 2(0)+c2(0)e - 2(0); gives: c1=3 also; y'= 2c1 e 2 x + c2 e 2x + 2c2 x e 2 x 1= 2c1 e2 (0) + c2 e 2(0)+ 2c2 (0) e 2 (0) , 2c1+c2=1, c2=-5 Now; y = 3 e 2 x - 5 x e 2 x P.S.
15
using
and making the term a2-4b positive by pulling out (-1) from the under the roots, gives:
) ( ) ( )
,where ( ( ) )
Example#1: Solve the following initial value D.E.: y'' + 0.2y' + 4.01y = 0, y(0)=0 & y'(0)=2 Solution: Characteristic equation: 2+0.2+4.01=0
( ( ) ) ( ( ( ( ) ) ) )
and; w=2 ( ) . G.S. using the first initial condition y(0)=0 gives; y(0)=A=0 using chain rule to get the derivative: ( ) from the second initial condition; y'(0)=2, gives; y'(0)=2B=2; B=1 . P.S. Summary of cases I,II,III Case Roots I Distinct real roots 1&2 II Real double root = -a/2 Complex conjugate roots III Basis of solution
/ /
/ /
16
Example#2: Solve the following boundary value D.E.: y'' + y = 0, y(0)=0 & y()=-3 Solution: The basis for the solution is y1=cos x & y2=sin x
and, y=c1 cos x + c2 sin x . G.S. the first B.C. gives y(0)=c1=3, and the second B.C. gives y()=c1 cos + c2 (0)= -3 where, cos = -1 and c1= 3, therefore; y= 3 cos x + c2 sin x (No condition for c2) H.W.#1: Solve the B.V. problems: (1) y''+4y=0, y(0)=3, y(/2)=-3. (2) y''+2y'+2y=0, y(0)=1, y(/2)=0
1) Un-damped System: Hookes law: The restoring force F of a spring is equal and opposite to the forces applied to the spring and is proportional to the extension (contraction) of the spring as a result of the applied force; that is, F = kl, where k denotes the constant of proportionality, generally called the spring constant, l is the extension (). For example A steel ball weighing 128 lb is suspended from a spring, and the spring is stretched 2 ft from its natural length. Thus, F = -128 lb. Hookes law then gives -128 = -k(2), or k = 64 lb/ft. OR simply k=F/=128/2=64 lb/ft
17
To determine the equation of motion y(t) for this mechanical system: From Newton's 2nd law; m*a=F OR m y''=F where F is the resultant of all forces acting on the body at time t. Assuming downward direction as +ve, when stretching the spring, an upward force is Fo=+k. So (Hooke's law) Now, from equilibrium in vertical direction at static case (b): Fv=0, -F+W=0 F=k.So -k So+mg=0, and k So=mg
Un-stretched spring
So
W=mg
Also from equilibrium in stretched position (c): Fv=m av W-k So-k y =m (d2y/dt2), but W=k So gives; my''+ ky=0 ( ) (governing D.E.) (2nd order linear homogenous D.E.) The G.S. of this D.E. is a "harmonic oscillation": where;
where;
therefore, y=A cos 9.9t + B sin 9.9t therefore, y=0.15 cos 9.9t (m)
using initial conditions, y(0)=0.15 m, gives A=0.15 ,and y'(0)=0, gives B=0 . P.S.
18
2) Damped System: If we connect the mass to a dashpot, we have to take the corresponding viscous damping into account. The damping force (F d) has the direction opposite to the instantaneous motion, and it is proportional to the velocity y' of the mass. Now, Fd= -c y' (negative because it is opposite to motion) where, c is damping constant and has units of mass/second. now, Fv=m av k.y +W-k So-ky-cy'=my'', but W=k So my''+ cy' + ky=0 (governing D.E.) (2nd order linear homogenous D.E.) After dividing by (m), the corresponding characteristic equation is: the roots are; and, Here we have three cases: I/ Over damping; c2-4mk > 0 OR c2 > 4mk, gives "distinct real roots" (1, 2) Here c is so large that c2 > 4mk, y(t)=c1 e 1 t + c2 e 2 t The body here do not oscillate. II/ Critcal damping; c2-4mk = 0 OR c2 = 4mk, gives a " real double root" () Here B = 0 and 1=2= - and , y(t)=(c1 + c2 t) e - t . G.S. The body here can have at most one passage through the equilibrium position. III/ Under damping; c2-4mk < 0 OR c2 < 4mk, gives " conjugate complex roots". This is the most interesting case; here c is so small that c2 < 4mk, then;
k.So
W=mg
Dashpot c y'
Damped System
gives; and y(t)= e t (A cos w*t + B sin w*t) . G.S. (this equation represents the damped oscillation)
19
Example#1: Solve the previous example (iron ball) but if the system has
damping given by: 1. c=200 kg/sec. 2. c=179.8 kg/sec. 3. c=100 kg/sec.
Example#1:
Solve the initial value problem for the non-homogenous equation: y''+2y'+101y=10.4ex, y(0)=1, y'(0)=-0.9
yh= e x (A cos10x+B sin10x), and to obtain the general solution of the whole D.E., we have to assume any suitable particular solution y p of the nonhomogenous part. Since ex exist on the right hand side, assume; yp=c ex substitute in the D.E. gives: (1+2+101) c ex=10.4 ex, and 104 c ex=10.4 ex so, 104c=10.4, gives c=0.1 now, y(x)=yh+yp=e x (A cos10x+B sin10x)+0.1 ex . G.S. and from initial condition that y(0)=A+0.1=1.1, gives A=1 now, y'(x)= e x (-cos10x B sin10x-10 sin10x +10B cos10x)+0.1e x and y'(0)=-1+10B+0.1=-0.9, gives B=0 therefore, y'(x)=e x cos10x+0.1 e x . P.S. Choice for yp in method of undetermined coefficients is: Term in r(x) Choice for yp x x ke ce n k x (n=0,1,2,3,..) kn xn +kn-1 xn-1 +..+k1 x +ko k cos wx K cos wx + M sin wx k sin wx k e x cos wx e x (K cos wx + M sin wx) x k e sin wx
Example#2: Solve the non-homogenous equation: y''+4y=8 x2 Solution: The general solution of the homogenous equation is:
yh=A cos2x+B sin2x For the non-homogenous part, suggest the choice: yp=k2x2+k1x+ko, then y''p=2k2 Substitute in the D.E.: 2k2+4(k2 x2+k1 x=ko)= 8 x2 equating coefficients of x2, x1, and xo on both sides gives, 4k2=8, 4k1=0, 2k2+4ko=0, thus, k2=2, k1=0, ko=-1 therefore, yp=2x2-1, and the general solution is: y(x)=yh+yp=A cos 2x +B sin 2x + 2x2-1
Example#3: Solve the non-homogenous equation: y''-3y'+2y=ex Solution: The characteristic equation for the homogenous part is;
2 -3+ 2=0, solving gives; 1=1 & 2=2, and yh=c1 ex + c2 e2x For yp choose yp=k ex. But we see that ex is a solution of yh, therefore our new suggestion must be; yp=k x ex, thus y'p=k(ex+x ex) & y''p=k(2 ex+x ex) substituting in the D.E. gives; k(2+x)ex -3k(1=x)ex +2kxex =ex and k=1 OR k=-1, and the general solution is; y=c1 ex + c2 e2x x ex . G.S.
21
Example#4: Solve the initial value problem: y''+2y'+y=ex, y(0)=-1, y'(0)=1 Solution: The characteristic equation for the homogenous part is;
2 +2+ 1=0, OR (+1)2 =0, solving gives; = 1= 2=-1 (double root) therefore, yh=(c1+c2 x) e x Assuming yp= k ex. But ex is a solution of yh, therefore, assume yp= k x ex which is also a solution of yh. Therefore assume yp= k x2 ex, and y'p=k(2x-x2)e-x, and y''p=k(2-4x+x2)e-x substituting gives; k(2-4x+x2)e-x -2k(2x-x2)e-x +kx2 e-x =2k e-x =e-x, gives k=1/2 therefore, y=(c1+c2x)e-x + 0.5x2 e-x . G.S. the first initial conditions gives y(0)=c1=-1, differentiating gives; y'(0)=c2-c1=1, OR c2=0 therefore, y=(0.5 x2 -1) e-x . P.S.
22
# For free motion: W-k So-k y-c y' = m y'' , but W=k So so, m y'' + c y' + k y = 0 (Homogenous D.E.) where; m y'' : force of inertia, c y' : damping force, and, k y : spring force. # For forced motion: W-k So-k y-c y' +F = m y'' , but W=k So so, m y'' + c y' + k y = r(t) (Non-homogenous D.E.)
k.y k.So
W=mg c y'
where; F= r(t) : driving force, or "input". The corresponding solution is called "response" of the system of the driving force. For periodic inputs at the cases of sinusoidal force, r(t)=F o cos wt and the governing D.E. will be: m y'' + c y' + k y = Fo cos wt Here also, y(t)=yh(t)+yp(t), and using the method of undetermined coefficients: yp(t) = a cos wt + b sin wt and y'(p) = -w a sin wt + w b cos wt, y''(p) = -w2 a cos wt - w2 b sin wt
23
Joseph Fourier: (1768-1830) French physicist and mathematician form Paris, accompanied
Napoleon to Egypt. He developed the theory of heat conduction (heat equation) using these series which then became a most important tool in mathematical physics.
# Fourier Series: Is a technique to represent a complex periodic functions in terms of series of simple functions like sine and cosine. # Periodic Function: A function f(x) is called periodic if it is defined for all x such that: f(x+p)=f(x), where p any positive number and called a "period" of f(x) or length of interval. "sine and cosine are periodic functions" "x,x2,x3,ex,coshx,lnx are non-periodic functions" Therefore, for sinx & cosx the period is 2, and for sin2x&cos2x the period is , and for sin3x&cos3x the period is 2/3. so, our problem is to represent f(x) various functions of period 2 in terms of simple functions of terms:(1,cosx,sinx,cos2x,sin2x,cos3x x ,.,cosnx,sinnx) summing up the series: p ao+a1cosx+b1sinx+a2cos2x+b2sin2x+ Periodic function .=f(x) ( ) (complex periodic function of OR ( ) period 2) - Determination of constant ao: ( ) ( ) ( ) ( ( )
24
) ( ( ) )
This gives;
- Determination of constant an of the cosine terms: Again multiplying the equation by (cos mx) and integrating from to : ( ) ) ( [ zero ( ) n=1,2,3,. ]
- Determination of constant bn of the sine terms: Again multiplying the equation by (sin nx) and integrating from to : ( ) n=1,2,3,.
0
-k
Solution:
( )
| | This can be also be seen from that the area under curve of f(x) between and is zero. ( ) * ( ) + * | | + ) + ) because sin nx=0 at , 0, for all n=1,2,3, ( ) * ( ) * ( | ( )
and thus
Therefore; the Fourier coefficients for bn: And the Fourier series of f(x) is: ( ) ( Now, ( ) ( )
In fact, un-necessary work in determining Fourier coefficients can be avoided if a function is even or odd. y A function y=g(x) is: - even if g(-x)=g(x) o x (here only cosine terms in Fourier Series)
even function (similar to cosine function (symmetry about y-axis)
( ) ( ) - odd if g(-x)=-g(x)
The Fourier series for an even function of period 2L is: ( ) (Fourier cosine series) where; ( ) ( ) , n=1,2,3,
And the Fourier series for an odd function of period 2L is: ( ) (Fourier sine series) where; ( ) , n=1,2,3,
26
Example#1: Find the two Fourier half-range expansions for the periodic
function in figure below. The formula is:
k f(x)
( )
L/2
)
-L
f(x)
k
x 0
L/2 L
Even extension
( ) |
/
/ )
( ) ( After cancelling sine terms and L2 terms, an will be: ( ) Thus a1=0, , a3=0, a4=0, a5=0, Hence, the cosine half-range expansion of f(x) is: ( ) ( ) b) Odd periodic extension: (half-range sine series) solving Therefore sine half-range expansion of f(x) is: ( ) ( )
27
Gamma Function: ( )
where ( ) ( )
( )
| OR ( ) ( )
( ) ( ) Therefore; ( ) ( ) ( ) ( ) ( ) ) and in general: ( , n=1,2,3,4,.. where, n!=n*(n-1)*(n-2)*.*3*2*1 Note: There is a table for ( ) for the interval , and for other numbers use the property of gamma function. n 1.00 1.10 1.20 1.30 1.40 1.50 1.60 1.70 1.80 1.90 2.00 1.0000 0.9514 0.9182 0.8975 0.8873 0.8862 0.8934 0.9086 0.9314 0.9618 1.0000
Solution: comparing with the standard form of gamma function, which is:
, we should let z3=t OR z=t1/3, then ( ) ( ) / Since (1/2)=is not exist in the table, therefore use the property that: ( )
( )
,therefore,
( )
( )
(1749-1827)(Great French mathematician and Napeleon was his student for a year). The Laplace transform method solves D.E. s and the corresponding initial and boundary value problems, using: Step1) The given hard problem is transformed into a simple equation. Step2) The simple equation is solved using algebraic manipulations. Step3) The solution of the simple equation is transformed back to get the solution for the given hard problem.
28