ap3114 lecture wk10 solving differential eqautions i
TRANSCRIPT
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
1/35
AP3114/Computational Methods forPhysicists and Materials Engineers
7. Solving diferentialequations I
Nov. 2, 2015
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
2/35
Contents
Introduction to differential equations
Symolic solutions to ordinary differential equations
Applications of !"Es# analysis of dampedand undamped free oscillations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
3/35
Introduction to differential equationsDiferential equations are equations involving derivativeso a unction.
1. Ordinary diferential equation!en t!e de"endent varia#le is a unction o a single inde"endent varia#le,t!e diferential equation is said to #e an ordinary diferential equation $OD%&.
q ' ()*$d+d-&2. artial diferential equation
I t!e de"endent varia#le is a unction o /ore t!an one varia#le, adiferential equation involving derivatives o t!is de"endent varia#le is said to#e a "artial diferential equation $D%&.
2
-2
2
y2
-' 0.3. Order and degree o an diferential equation
+!e order o a diferential equation is t!e order o t!e !ig!est(orderderivative involved in t!eequation. +!us, t!e OD%
q ' ()*$d+d-&is a 4rst(order equation,
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
4/35
Introduction to differential equations
+!e degreeo a diferential equation is t!e !ig!est "oer to !ic! t!e!ig!est(order derivativeis raised. +!ereore, t!e equation
$d3ydt3&2$d2yd-2&5(-y ' e-,is a t!ird order, second(degree OD%, !ile t!e equation
yt ' c*$y-&,is a 4rst(order, 4rst(degree D%.
6. inear and non(linear equations
8n equation in !ic! t!e de"endent varia#le and all its "ertinent derivativesare o t!e 4rstdegree is reerred to as a linear diferential equation. Ot!erise, t!e equationis said to #enon(linear. %-a/"les o linear diferential equations are9
d2-dt2 :*$d-dt& ;0*- ' 8sin$;t&,
and
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
5/35
Introduction to differential equations
5. *$d2yd-2&2(5*y ' e-,
!ere all t!e coe=cients acco/"anying t!e de"endent varia#le and itsderivative are constant, ould #e classi4ed as a t!ird order, linear OD%it!
constant coe=cients. Instead, t!e equation2
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
6/35
Introduction to differential equations
On t!e ot!er !and, i t!e rig!t(!and side o t!e equation, ater "lacing t!eter/s involving t!ede"endent varia#le and its derivatives on t!e let(!and side, is non(Bero, t!eequation is saidto #e non(!o/ogeneous. Non(!o/ogeneous versions o t!e last to
equations are9d2-dt2 :*$d-dt& ;o*- ' 8o*e
(tC,
and$-(1&*$dyd-& 2*-*y ' -2(2-.
7. Solutions
8 solution to a diferential equation is a unction o t!e inde"endentvaria#le$s& t!at, !enre"laced in t!e equation, "roduces an e-"ression t!at can #e reduced,t!roug! alge#raic/ani"ulation, to t!e or/ 0 ' 0. or e-a/"le, t!e unction
y ' sin -,
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
7/35
Introduction to differential equationsE. Feneral and "articular solutions
8 general solution is one involving integration constants so t!at any c!oice ot!ose constants re"resents a solution to t!e diferential equation. ore-a/"le, t!e unction
- '
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
8/35
Introduction to differential equations
G. Heriying solutions using S
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
9/35
Introduction to differential equations
10. Initial conditions and #oundary conditions
+o deter/ine t!e s"eci4c value o t!e constant$s& o integration, e need to"rovide values o t!e solution, or o one or /ore o its derivatives, at s"eci4c"oints. +!ese values are reerred to as t!econditions o t!e solution. ore-a/"le, e could s"eciy t!at t!e solution to t!e equation.
d2
ydt2
y ' 0,/ust satisy t!e conditions
y$0& ' (5,and
dydt ' (1 at t ' 5.
Initial conditions are "rovided at a single value o t!e inde"endent varia#le sot!at aterevaluating t!ose conditions at t!at "oint all t!e integration constants areuniquely s"eci4ed.In general, 4rst order diferential equations include one integration constant,requiring only
one condition to #e evaluated to uniquely deter/ine t!e solution. +!us, t!ist e o e uations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
10/35
Introduction to differential equations
oundary conditions, on t!e ot!er !and, are "rovided at /ore t!an one valueo t!e inde"endent varia#le$s&. +!e ter/ J#oundary conditionsK is used#ecause t!e unction isevaluated at t!e J#oundariesK o t!e solution do/ain in order to s"eciy t!esolution.8n e-a/"le o initial conditions used in a solution ill #e to solve t!e
equationd2udt2 2*$dudt& ' 0,
givenu$0& ' 1, dudtLt'0' (1.
8n e-a/"le o #oundary conditions used in a solution ill #e to solve t!eequation
d2yd-2y ' 8sin-,using
y$0& ' 82, and y$1& ' (82.In general, t!e solution o a n(t! order OD% requires n conditions.
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
11/35
Symolic solutions to ordinary differential equations
y sy/#olic solutions e understand t!ose solutions t!at can #e e-"ressedas a closed(or/ unction o t!e inde"endent varia#le.
1. Solution tec!niques or 4rst(order, linear OD%s it! constant coe=cients
8 4rst order equation is an equation o t!e or/a*$dyd-&n #*y/' $-&,
!ere a, #, n and / are, in general, real nu/#ers. So/e s"eci4c tec!niquesor linearequations, i.e., !en n ' / ' 1, ollo. +!is catalog o solutions or linearOD%s is intended as
a revie o t!e tec!niques.
%quations o t!e or/9 dyd- ' $-&
8n equation o t!e or/ dyd- ' $-& can #e re(ritten asdy' $-&d-,
and a general solution ound #y direct integration,
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
12/35
Symolic solutions to ordinary differential equations
M dy 'M $-&d-,or
y ' M $-&d-
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
13/35
Symolic solutions to ordinary differential equations
er(de4ned unction intpoly9
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
14/35
Symolic solutions to ordinary differential equations
+!us, t!e general solution is 9
y$-& ' 2-0.5-20.75-6 <
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
15/35
Symolic solutions to ordinary differential equations
2. Solutions o !o/ogeneous linear equations o any order it! constantcoe=cients
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
16/35
Symolic solutions to ordinary differential equations
Su""ose t!at t!e c!aracteristic equation !as ninde"endent roots, t!en t!egeneral solution ot!e linear, constant(coe=cient, !o/ogeneous OD% o order ngiven earlier is
I out o t!e nroots t!ere is one t!at !as /ulti"licitym, t!en t!e mter/scorres"onding tot!is root in t!e solution, ill #e
%-a/"le 1? Deter/ine t!e general solution to t!e !o/ogeneous equation
In ter/s o t!e D o"erator, t!is OD% can #e ritten as
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
17/35
Symolic solutions to ordinary differential equations
+!e c!aracteristic equation corres"onding to t!is OD% is
+o o#tain solutions to t!is equation in S
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
18/35
Applications of !"Es# analysis of damped andundamped free oscillations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
19/35
NetonQs second la, !en a""lied in t!e -(direction to t!e /ass / is rittenas9
Applications of !"Es# analysis of damped andundamped free oscillations
!ic! results in t!e second(order, linear, ordinary diferential equation9
nda/"ed /otion
et us irst consider t!e case in !ic! t!e /otion is unda/"ed, i.e., : ' 0.+!e equation int!is case reduces to
corres"onding c!aracteristic equation is
it! solutions,
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
20/35
Applications of !"Es# analysis of damped andundamped free oscillations
result suggest a solution o t!e or/
ternatively, #y ta)ing
e solution can #e ritten as
!e quantity
is )non as t!e natural angular frequency o t!e !ar/onic /otion t!atresults !en no viscousda/"ing is "resent.
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
21/35
a/"ed /otion
Applications of !"Es# analysis of damped andundamped free oscillations
I da/"ing occurs $:R0&, t!e c!aracteristic equation #eco/es
!ose solutions are
!ere
+!e nature o t!e solution ill de"end on t!e relative siBe o t!e coeicients and ;o, as
ollos9
is real, and t!e solutions o t!e c!aracteristic equation are
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
22/35
Applications of !"Es# analysis of damped andundamped free oscillations
+!e solution to t!e OD%, t!ereore, is ritten as
!e "ara/eter
re"resents t!e da/"ed angular requency o t!e oscillation, and T1
re"resents t!e corres"onding angular "!ase. 80is t!e a/"litude o t!e
oscillation at t ' 0. I e de4ne a varia#le a/"litude,
t!en t!e solution to t!e OD%, also )non as t!e signal, can #e ritten as
lease notice t!at t!is solution is very si/ilar to t!e case o an unda/"edoscillation, e-ce"t or t!e act t!at in a da/"ed oscillation t!e a/"litudedecreases it! ti/e. +!e a/"litude decreases, or decays, it! ti/e #ecause
t!e "ara/eter ' :$2/&is "ositive. +!ereore, t!e unction e-"$(t& decreasesit! ti/e.
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
23/35
Applications of !"Es# analysis of damped andundamped free oscillations
I ' ;o, t!en t!e c!aracteristic equation "roduces t!e solution U' (, it!
/ulti"licity 2, in !ic! case t!e solution #eco/es
+!is solution re"resents a linear unction o t su#Vected to a decay actor,e-"$(t&.
I W ;o, t!en X$2
(;o2
& ' Y is real, and Y Z ,t!e solutions o t!ec!aracteristic equation #eco/e
#ot! negative. +!ereore, t!e resulting signal can #e ritten as9
Notice t!at t!e last to cases, na/ely, ' ;oand W ;o, "roduce signals
t!at decay it! ti/e. +!ese cases corres"ond to !ar/onic /otions t!at aresaid to #e over(da/"ed, i.e., t!e viscous da/"ing is large enoug! to quic)lyda/" out any oscillation ater t!e #ody o /ass / is released.
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
24/35
Applications of !"Es# analysis of damped andundamped free oscillations
+!e e-"ression or t!e "osition o a da/"ed oscillatory /otion is given #y
le t!e velocity, v$t& ' d-dt, is given #y
Fiven t!e initial conditions -$t0& ' -0and v$t0& ' v0, e can or/ a syste/ o
to non(linearequations in t!e un)nons 80 and T1, na/ely,
it! a""ro"riate values o t!e "ara/eters , ;I, t0, -0, and v0, e can use
S
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
25/35
Applications of !"Es# analysis of damped andundamped free oscillations
ample ? Da/"ed oscillatory /otion9
lot "osition, velocity, and acceleration corres"onding to t!e olloing"ara/eters9 / ' 1 )g, :' 0.1N*s/, ) ' 0.5 N/. +o deter/ine t!econstants 8oand T1, use initial conditions, -0' 1.5 /, and v0' (5.0 /s.
it! t!ese values,
Since, Z ;o, t!e resulting signal is t!at o a da/"ed oscillation it!
+o solve or t!e constants 8oand T1it! S
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
26/35
Applications of !"Es# analysis of damped andundamped free oscillations
Ne-t, e enter t!e )non values, and select a 4rst guess or t!e solution s09
+!e solution or s$1& ' 80 and s$2& ' T1 is o#tained #y using fsolve9
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
27/35
Applications of !"Es# analysis of damped andundamped free oscillations
+!us, 80' 7.12213@6and T1' 1.35G1GG7, and t!e "osition -$t& is given #y
%-"ressions or t!e "osition -$t&, velocity v$t&, and acceleration a$t& or t!is/otion can #e
entered into S
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
28/35
+o "lot t!e signals -$t&, v$t&, and a$t& in t!e t(interval $0,30& use t!e olloingS
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
29/35
Applications of !"Es# analysis of damped andundamped free oscillations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
30/35
Applications of !"Es# analysis of damped andundamped free oscillations
ating "!ase "ortraits o oscillatory /otion
8 "!ase "ortrait or oscillatory, or any )ind o, /otion is a "lot involving t!ede"endent varia#le and one o its derivatives, or to derivatives o t!ede"endent varia#le. or e-a/"le, a "lot o velocity, v$t&, versus "osition, -$t&,
re"resents a "!ase "ortrait. Ot!er "!ase "ortraits ould #e a$t& vs. -$t&, anda$t& vs. v$t&.Example.
lot t!e ti/e(de"endent "lots and "!ase "ortraits or t!e signal o#tained inExamplein t!e "revious section.
+o "lot t!ese "!ase "ortraits e generate data on "osition, velocity, andacceleration as unction o ti/e t in t!e interval [0,G0\, as ollos9
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
31/35
Applications of !"Es# analysis of damped andundamped free oscillations
"!ase "ortraits are generated as ollos9
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
32/35
Applications of !"Es# analysis of damped andundamped free oscillations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
33/35
Applications of !"Es# analysis of damped andundamped free oscillations
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
34/35
$%&'
36
Due9 Ga/, Nov G, 2015ate "olicy9 10] of "er day
+o #e su#/itted online to
-
7/23/2019 AP3114 Lecture WK10 Solving Differential Eqautions I
35/35
E(ercise
1. Deter/ine t!e general solution to t!e olloing linear ordinary diferentialequations usingt!e corres"onding c!aracteristic equation9
Note9
_ecord your inter/ediate results using Jrint ScreenKl d # i ! ! ! l
2. lot t!e ti/e variation o "osition, velocity, and acceleration o a da/"ed/ec!anicaloscillator or t!e olloing "ara/eters9
lot v(vs(-, a(vs(-, and a(vs(v "!ase "ortraits o t!e /otions descri#ed a#ove"ro#le/.