23
Exercise (1). Time-independent DE, one dimension. Qualitative behaviour, linearization.
Let d
dty= (y−4)(y−3)(y−1), y(0) = 2.5.
Remark. The qualitative behaviour can be quite complicated in higher dimensions. Nevertheless the process of the linearization can be performed in any dimensions.
Subexercise (A). Find the sum of the fixedpoints of the DE!
MCQ. A: 6 B: 7 C: 8 D: 9 E: 10 Answer. C
Subexercise (B). Write down the linear approximation of the DE around the smallestyf ix fixedpoint as dtd∆y= a∆y ! How much isa?
Remark. acan be zero, in that case the linearization is not particulary useful.
Remark.
df
dy = 3y2−16y+ 19.
MCQ. A: 2 B: 3 C: 4 D: 5 E: 6 Answer. E
Subexercise (C). With the given initial condition fory(0), how much is limt→∞y(t) ? (If limt→tcy(t) =±∞for sometc>0, then answer±∞.)
Remark. For example iff(y) =y3, y(0) = 1, the the solutiony(t) = (1−2t)−1/2is defined only on thet∈(−∞,0.5) interval, so limt→∞y(t) does not make sense.
MCQ. A: 1 B: 4 C: ∞ D:−∞ E: 3 Answer. E
Subexercise (D). With the given initial condition for y(0), how much is limt→−∞y(t) ? (If limt→tcy(t) =±∞
for sometc<0, then answer±∞.)
Remark. The answer can be read off from the plot of f.
1.5 2.0 2.5 3.0 3.5 4.0
-2 -1 1 2
MCQ. A:−∞ B: 3 C:∞ D: 1 E: 4 Answer. D
Subexercise (E). Plot the t→y(t) solutions of the DE!
MCQ.
0.0 0.2 0.4 0.6
1 2 3 4
0.0 0.2 0.4 0.6
1 2 3 4
0.0 0.2 0.4 0.6
1 2 3 4
0.0 0.2 0.4 0.6
1 2 3 4
Answer. A Mathematica.
f = (y-1) (y-2)^2 (y-3)
roots = DeleteDuplicates[ Solve[f == 0, y] ] fixpoint1=roots[[1,1,2]]
fixpoint2=roots[[1,2,2]]
fixpoint3=roots[[1,3,2]]
jacf = D[f, y]
jac = D[f, y] /. y -> fixpoint1 (* " 3*y /. y->5 " = " 15 " *) Plot[ f, {y, fixpoint1 - 0.5, fixpoint3 + 0.5}]
StreamPlot[{1, f}, {t, 0, 0.5}, {y, fixpoint1 - 0.5, fixpoint3 + 0.5}, StreamPoints -> Fine,
Epilog -> Map[Line[{{0, #}, {0.5, #}}] &, {fixpoint1, fixpoint2, fixpoint3}]]
Octave.
% graphics_toolkit ("gnuplot") pkg load symbolic
syms y
f = (y-1) * (y-2)^2 * (y-3) expand(f)
c = [1, -8, 23, -28, 12]
roots (c) fixpoint = 1
fprime = simplify( diff(f, y) )
subs( fprime, y, fixpoint ) fh = function_handle(f)
ys = linspace( 0.7,3.2,100 );
fs = fh(ys) ; figure
plot(ys,fs)
[ts, ys] = meshgrid (linspace( 0,1,5 ),linspace( 0.9,3.1,30 ));
figure
h = quiver (ts, ys, 0.3, fh(ys));
set (h, "maxheadsize", 0.05);
Exercise (2). Time-independent DE, one dimension. Qualitative behaviour, linearization.
Let d
dty = (y−3)2(y−1)2, y(0) = 0.5.
Remark. The qualitative behaviour can be quite complicated in higher dimensions. Nevertheless the process of the linearization can be performed in any dimensions.
Subexercise (A). Find the sum of the fixedpoints of the DE!
MCQ. A: 0 B: 1 C: 2 D: 3 E: 4 Answer. E
Subexercise (B). Write down the linear approximation of the DE around the smallestyf ix fixedpoint as dtd∆y= a∆y ! How much isa?
Remark. acan be zero, in that case the linearization is not particulary useful.
Remark.
df
dy = 4 y3−6y2+ 11y−6 . MCQ. A: -2 B: -1 C: 0 D: 1 E: 2
Answer. C
Subexercise (C). With the given initial condition fory(0), how much is limt→∞y(t) ? (If limt→tcy(t) =±∞for sometc>0, then answer±∞.)
Remark. For example iff(y) =y3, y(0) = 1, the the solutiony(t) = (1−2t)−1/2is defined only on thet∈(−∞,0.5) interval, so limt→∞y(t) does not make sense.
MCQ. A:∞ B: −∞C: 3 D: 1 Answer. D
Subexercise (D). With the given initial condition for y(0), how much is limt→−∞y(t) ? (If limt→tcy(t) =±∞
for sometc<0, then answer±∞.)
Remark. The answer can be read off from the plot of f.
1.0 1.5 2.0 2.5 3.0 3.5 0.5
1.0 1.5
MCQ. A:−∞ B: ∞C: 1 D: 3 Answer. A
Subexercise (E). Plot the t→y(t) solutions of the DE!
MCQ.
0.0 0.2 0.4 0.6 0.8 1.0 0.5
1.0 1.5 2.0 2.5 3.0 3.5
0.0 0.2 0.4 0.6 0.8 1.0 0.5
1.0 1.5 2.0 2.5 3.0 3.5
0.0 0.2 0.4 0.6 0.8 1.0 0.5
1.0 1.5 2.0 2.5 3.0 3.5
0.0 0.2 0.4 0.6 0.8 1.0 0.5
1.0 1.5 2.0 2.5 3.0 3.5
Answer. A
Exercise (3). Time-independent DE, two dimensions. Qualitative behaviour, linearization.
Let
d dt~y =
f1
f2
=
(y1−1) (y2+ 1)
−(y1−4)y2
.
Remark. The qualitative behaviour is relatively simple in two dimensions.
Subexercise (A). Find the sum of the coordinates of the smallest~yf ix fixed point!
Remark. ~yf ix= 1
0
MCQ. A: -3 B: -2 C: -1 D: 0 E: 1 Answer. E
Subexercise (B). Write down the linear approximation of the DE around the smallest ~yf ix as dtd∆~y = A∆~y ! How much is the sum of the elements ofA ?
MCQ. A: 4 B: 5 C: 6 D: 7 E: 8 Answer. A
Remark.
J ac(f) =
∂y1f1 ∂y2f1
∂y1f2 ∂y2f2
=
y2+ 1 y1−1
−y2 4−y1
, A= (J ac(f))
1 0
=
1 0 0 3
. Subexercise (C). Plot the phase portrait of the DE!
MCQ. 1 2 3 4
-2 -1 0 1
Answer. A Mathematica.
{f1, f2} = {(y1 - 2) (y2 - 3), (y1 - 4) (y2 - 5)}
f = {f1, f2}; y = {y1, y2};
Reduce[{f1 == 0, f2 == 0}, {y1, y2}]
NSolve[{f1 == 0, f2 == 0}, {y1, y2}]
sol = Solve[{f1 == 0, f2 == 0}, {y1, y2}] // Sort yfix = {sol[[1, 1, 2]], sol[[1, 2, 2]]}
jacf = {{D[f1, y1], D[f1, y2]}, {D[f2, y1], D[f2, y2]}}
jacf = D[f, {{y1, y2}}]
jacffix = jacf /. sol[[1]]
z1 = y /. sol[[1]]
z2 = y /. sol[[2]]
plot = StreamPlot[f, {y1, 1, 5}, {y2, 2, 6}, StreamPoints -> Fine, Epilog -> {PointSize[Medium], Point[z1], Point[z2]}]
Octave.
graphics_toolkit ("gnuplot") pkg load symbolic
syms y y1 y2 function z = f (y)
z(1) = (y(1) - 2) * (y(2) - 3);
z(2) = (y(1) - 4) * (y(2) - 5);
endfunction
[z, info] = fsolve ("f", [5; 3]) [z, info] = fsolve ("f", [1; 2]) f([y1,y2])
jacf = jacobian( f( [y1,y2] ) )
% subs( jacf, [y1,y2], [z(1),z(2)] ) % generate warnings subs( jacf, [y1,y2], [2,5] )
range=1.5:0.2:5.5;
[Y1, Y2]= meshgrid (range, range);
Z1=(Y1 - 2) .* (Y2 - 3);
Z2=(Y1 - 4) .* (Y2 - 5);
h=quiver (Y1,Y2,Z1,Z2);
set (h, "maxheadsize", 0.2);
Exercise (4). Time-independent DE, two dimensions. Qualitative behaviour, linearization.
Let
d dt~y=
f1
f2
=
(y1−1)y2
−(y1−4)y2
. Remark. The qualitative behaviour is relatively simple in two dimensions.
Subexercise (A). Find the sum of the coordinates of that~yf ix fixed point where y1 = 1 ! Remark. The fixed points are not necessarily isolated, in our case ~yf ix=
1 0
. MCQ. A: -3 B: -2 C: -1 D: 0 E: 1
Answer. E
Subexercise (B). Write down the linear approximation of the DE around the smallest ~yf ix as dtd∆~y = A∆~y ! How much is the sum of the elements ofA ?
MCQ. A: 3 B: 4 C: 5 D: 6 E: 7 Answer. A
Remark.
J ac(f) =
∂y1f1 ∂y2f1
∂y1f2 ∂y2f2
=
y2 y1−1
−y2 4−y1
, A= (J ac(f))
1 0
=
0 0 0 3
.
Subexercise (C). Plot the phase portrait of the DE!
MCQ. 1 2 3 4
-2 -1 0 1 2
Answer. A
Exercise (5). Time-independent DE, two dimensions. Qualitative behaviour, linearization.
Let
d dt~y=
f1 f2
=
y1y2 1−y1
. Remark. The qualitative behaviour is relatively simple in two dimensions.
Subexercise (A). Find the sum of the coordinates of the~yf ix fixed point!
Remark. ~yf ix= 1
0
MCQ. A: 0 B: 1 C: 2 D: 3 E: 4 Answer. B
Subexercise (B). Write down the linear approximation of the DE around the~yf ix as dtd∆~y=A∆~y ! How much is the sum of the elements ofA ?
MCQ. A: -3 B: -2 C: -1 D: 0 E: 1 Answer. D
Remark.
J ac(f) =
∂y1f1 ∂y2f1
∂y1f2 ∂y2f2
=
y2 y1
−1 0
, A= (J ac(f))
1 0
=
0 1
−1 0
.
Subexercise (C). Plot the phase portrait of the DE!
MCQ.
0.4 0.6 0.8 1.0 1.2 1.4 1.6 -0.6
-0.4 -0.2 0.0 0.2 0.4 0.6
0.4 0.6 0.8 1.0 1.2 1.4 1.6 -0.6
-0.4 -0.2 0.0 0.2 0.4 0.6
0.4 0.6 0.8 1.0 1.2 1.4 1.6 -0.6
-0.4 -0.2 0.0 0.2 0.4 0.6
0.4 0.6 0.8 1.0 1.2 1.4 1.6 -0.6
-0.4 -0.2 0.0 0.2 0.4 0.6
Answer. B
Exercise (6). Hom.Lin. DE. Radioactiv decay: I →II →. . . Let
A=
−3 0 3 −4
, d
dt~y =A~y, ~y(0) = 3
5
.
Remark. The DE can desribe the decay of some radioactive material. If ~y(0) = (1,0)T, then y1(t), y2(t) are the probabilities of the states I and II att, if the initial state of the atom att= 0 was I.
Subexercise (A). Find the smallest eigenvalue ofA ! Remark. The eigenvalues are thesolutions of
0 = det
−λ−3 0 3 −λ−4
=λ2+ 7λ+ 12.
Remark. Since A is (lower) triangular, the eigenvalues are the diagonal elements.
MCQ. A: -4 B: -3 C: -2 D: -1 E: 0 Answer. A
Subexercise (B). Find the~v1 and~v2 eigenvectors corresponding to the λ1< λ2 eigenvalues. Normalize them by the condition (~vi)2 = 1, i= 1,2.Assemble them into a matrixS = (~v1, ~v2) matrixot. How much is the sum of the elements ofS ?
Remark. The eigenvectors are solutions of the equations
(A−λiE)~vi =~0.
In our case
1 0 3 0
x y
= 0
0
,
0 0 3 −1
x y
= 0
0
. Remark. So we obtain that
S=
0 13 1 1
. MCQ. A: 73 B: 103 C: 113 D: 133 E: 143
Answer. A
Subexercise (C). The solution of the DE can be written as
~ y(t) =
2
X
i=1
Cieλit~vi. How much isC1, if~y(0) satisfies the given initial condition?
Remark.
C1 C2
=S−1 3
5
=
−3 1 3 0
3 5
. So the particular solution of the DE is
~ y(t) =
3e−3t
−4e−4t+ 9e−3t
. MCQ. A:−7 B:−6 C: −4 D:−2 E: −1
Answer. C
Subexercise (D). Compute the matrix exponentialetA ! How much is e1.4·A
21 ? Remark.
etA=SetDS−1 =
0 13 1 1
exp
t·
−4 0 0 −3
−3 1 3 0
=
e−3t 0
−3e−4t+ 3e−3t e−4t
.
Remark. Esetunkben az exponencialis matrix eleme a radioaktiv atom kulonbozo allapotai kozotti atmenetek valoszinuseget adja meg. Pl. G21= etA
21azt adja meg hogytido eltelte utan mennyi az eselye a 2←1 =II←I folyamatnak.
In our case the elements of the exponential matrix gives the chance of the transitions between states of the radioactive atom. For example G21= etA
21 is the probability of the process 2←1 =II← I. Here the initial I state is the state of the atom att= 0, while the final II is the state of the atom at timet.
0.0 0.2 0.4 0.6 0.8 1.0 0.2
0.4 0.6 0.8 1.0
G11
0.0 0.2 0.4 0.6 0.8 1.0 0.2
0.4 0.6 0.8 1.0
G12
0.0 0.2 0.4 0.6 0.8 1.0 0.2
0.4 0.6 0.8 1.0
G21
0.0 0.2 0.4 0.6 0.8 1.0 0.2
0.4 0.6 0.8 1.0
G22
The letter Grefers to the ”Green funtion”.
Remark. The solution of the DE can be expressed as
~
y(t) =etA~y(0).
So the columns ofetA are the solutions of the DE with~y(0) = (1,0)T and ~y(0) = (1,0)T initial conditions.
~ y(0) =
1 0
=⇒ ~y(t) =
e−3t
−3e−4t+ 3e−3t
,
~ y(0) =
0 1
=⇒ ~y(t) = 0
e−4t
. MCQ. A: 0.0239061 B: 0.0268561 C: 0.0301701 D: 0.0338931 E: 0.0380756 Answer. D
Mathematica.
A={{-2,0},{2,-3}}
y0={2,6}
{l1, l2} = Eigenvalues[A]
v1 = Eigenvectors[A][[1]]
v2 = Eigenvectors[A][[2]]
v1 = v1/v1[[2]]
v2 = v2/v2[[2]]
S = {v1, v2} // Transpose Sinv = Inverse[S]
{{C1},{C2}} = Sinv.{{y0[[1]]}, {y0[[2]]}
Diag = Sinv.A.S {{l1,0},{0,l2}}
S.Diag.Sinv
MatrixExp[ t Diag ]
S.MatrixExp[ t Diag ].Sinv etA = MatrixExp[t A] // Expand etA // TableForm
yt = etA. {{y0[[1]]}, {y0[[2]]}} // Expand expPlots = GraphicsGrid[
Table[Plot[etA[[i, j]], {t, 0, 1}, PlotRange -> {0, 1},
PlotLabel -> Subscript[G, ToString[i] <> ToString[j]]], {i, 2}, {j, 2}]]
Octave.
graphics_toolkit ("gnuplot");
pkg load symbolic;
syms t;
A = [-2, 0; 2, -3]
y0 = [2; 6]
[evects, evals] = eig (A)
vn1 = [evects(1,1)/evects(2,1); 1]
vn2 = [evects(1,2)/evects(2,2); 1]
S = [vn1 vn2]
Si = inv(S) Si*y0
Si*A*S
etA = expm(t*A)
SDSi = S*expm(t*evals)*Si yt = etA*y0
Exercise (7). Hom.Lin. DE. Overdamped oscillator Let
¨
y+ay˙+by= 0, A=
0 1
−12 −7
, d
dt~y=A~y, ~y(0) = 3
5
.
Remark. y¨ = −ay˙−by, this is Newton’s III. law for a unit mass particle if the friction and spring forces are prpotional to the velocity and displacemant, respectively.
Subexercise (A). Find the smallest eigenvalue ofA ! Remark. The eigenvalues are the solutions of
0 = det
−λ 1
−12 −λ−7
=λ2+ 7λ+ 12.
MCQ. A: -4 B: -3 C: -2 D: -1 E: 0 Answer. A
Subexercise (B). Find the~v1 and~v2 eigenvectors corresponding to the λ1< λ2 eigenvalues. Normalize them by the condition (~vi)1 = 1, i= 1,2.Assemble them into a matrixS = (~v1, ~v2) matrixot. How much is the sum of the elements ofS ?
Remark. The eigenvectors are solutions of the equations
(A−λiE)~vi =~0.
In our case
4 1
−12 −3 x y
= 0
0
,
3 1
−12 −4 x y
= 0
0
. Remark. So we obtain that
S=
1 1
−4 −3
. MCQ. A:−5 B:−3 C: −2 D:−1 E: 0
Answer. A
Subexercise (C). The solution of the DE can be written as
~ y(t) =
2
X
i=1
Cieλit~vi. How much isC1, if~y(0) satisfies the given initial condition?
Remark.
C1 C2
=S−1 3
5
=
−3 −1
4 1
3 5
. So the particular solution of the DE is
~ y(t) =
−14e−4t+ 17e−3t 56e−4t−51e−3t
. MCQ. A:−17 B: −16 C: −14 D:−12 E: −11
Answer. C
Subexercise (D). Compute the matrix exponentialetA ! How much is e1.4·A
21 ? Remark.
etA =SetDS−1 =
1 1
−4 −3
exp
t·
−4 0 0 −3
−3 −1
4 1
=
−3e−4t+ 4e−3t −e−4t+e−3t 12e−4t−12e−3t 4e−4t−3e−3t
.
Remark. For example G21 = etA
21 gives us the following: ~y(0) = (1,0)T, then (~y(t))2 =G21(t), so if the initial state att= 0 was unit displacement and zero velocity, then att the velocity isG21(t).
0.2 0.4 0.6 0.8 1.0
-1.0 -0.5 0.5 1.0
G11
0.2 0.4 0.6 0.8 1.0
-1.0 -0.5 0.5 1.0
G12
0.2 0.4 0.6 0.8 1.0
-1.0 -0.5 0.5 1.0
G21
0.2 0.4 0.6 0.8 1.0
-1.0 -0.5 0.5 1.0
G22
The letter Grefers to the ”Green funtion”.
Remark. The solution of the DE can be expressed as
~
y(t) =etA~y(0).
So the columns ofetA are the solutions of the DE with~y(0) = (1,0)T and ~y(0) = (1,0)T initial conditions.
~ y(0) =
1 0
=⇒ ~y(t) =
−3e−4t+ 4e−3t 12e−4t−12e−3t
,
~ y(0) =
0 1
=⇒ ~y(t) =
−e−4t+e−3t 4e−4t−3e−3t
. MCQ. A: -0.0956244 B: -0.107424 C: -0.120681 D: -0.135573 E: -0.152302 Answer. D
Mathematica.
A={{0,1},{-6,-5}}
y0={2,6}
{l1, l2} = Eigenvalues[A]
v1 = Eigenvectors[A][[1]]
v2 = Eigenvectors[A][[2]]
v1 = v1/v1[[2]]
v2 = v2/v2[[2]]
S = {v1, v2} // Transpose Sinv = Inverse[S]
{{C1},{C2}} = Sinv.{{y0[[1]]}, {y0[[2]]}
Diag = Sinv.A.S {{l1,0},{0,l2}}
S.Diag.Sinv
MatrixExp[ t Diag ]
S.MatrixExp[ t Diag ].Sinv etA = MatrixExp[t A] // Expand etA // TableForm
yt = etA. {{y0[[1]]}, {y0[[2]]}} // Expand expPlots = GraphicsGrid[
Table[Plot[etA[[i, j]], {t, 0, 1}, PlotRange -> {0, 1},
PlotLabel -> Subscript[G, ToString[i] <> ToString[j]]], {i, 2}, {j, 2}]]
Octave.
Exercise (8). Hom.Lin. DE. Underdamped oscillator.
Let
¨
y+ay˙+by= 0, A=
0 1
−10 −6
, d
dt~y=A~y, ~y(0) = 3
5
.
Remark. y¨ = −ay˙−by, this is Newton’s III. law for a unit mass particle if the friction and spring forces are prpotional to the velocity and displacemant, respectively.
Subexercise (A). Find the absolute value of the imaginary part of the eigenvalues ofA ! Remark. The eigenvalues are the solutions of
0 = det
−λ 1
−10 −λ−6
=λ2+ 6λ+ 10.
MCQ. A:−3 B:−1 C: 0 D: 1 E: 2 Answer. A
Subexercise (B). Find the~v1 and~v2 eigenvectors corresponding to the λ1< λ2 eigenvalues. Normalize them by the condition (~vi)1 = 1, i= 1,2.Assemble them into a matrixS = (~v1, ~v2) matrixot. How much is the sum of the real parts of the elements ofS ?
Remark. The eigenvectors are solutions of the equations
(A−λiE)~vi =~0.
In our case
3−i 1
−10 −3−i x y
= 0
0
,
3 +i 1
−10 −3 +i x y
= 0
0
. Remark. So we obtain that
S =
1 1
−3 +i −3−i
. MCQ. A:−4 B:−2 C: −1 D: 0 E: 1
Answer. A
Subexercise (C). The solution of the DE can be written as
~ y(t) =
2
X
i=1
Cieλit~vi. How much isC1, if~y(0) satisfies the given initial condition?
Remark.
C1
C2
=S−1 3
5
= 1
2 −3i2 −2i
1
2 +3i2 2i
3 5
. So the particular solution of the DE is
~ y(t) =
3e−3tcos(t) + 14e−3tsin(t) 5e−3tcos(t)−45e−3tsin(t)
. MCQ. A:−12 B: 12 C: 32 D: 52 E: 72
Answer. C
Subexercise (D). Compute the matrix exponentialetA ! How much is e1.4·A
21 ?
Remark.
etA=SetDS−1 =
1 1
−3 +i −3−i
exp
t·
−3 +i 0 0 −3−i
1
2 −3i2 −2i
1
2 +3i2 2i
=
e−3tcos(t) + 3e−3tsin(t) e−3tsin(t)
−10e−3tsin(t) e−3tcos(t)−3e−3tsin(t)
. Remark. For example G21 = etA
21 gives us the following: ~y(0) = (1,0)T, then (~y(t))2 =G21(t), so if the initial state att= 0 was unit displacement and zero velocity, then att the velocity isG21(t).
0.5 1.0 1.5 2.0 2.5 3.0
-2 -1 1 2
G11
0.5 1.0 1.5 2.0 2.5 3.0
-2 -1 1 2
G12
0.5 1.0 1.5 2.0 2.5 3.0
-2 -1 1 2
G21
0.5 1.0 1.5 2.0 2.5 3.0
-2 -1 1 2
G22
The letter Grefers to the ”Green funtion”.
Remark. The solution of the DE can be expressed as
~
y(t) =etA~y(0).
So the columns ofetA are the solutions of the DE with~y(0) = (1,0)T and ~y(0) = (1,0)T initial conditions.
~ y(0) =
1 0
=⇒ ~y(t) =
e−3tcos(t) + 3e−3tsin(t)
−10e−3tsin(t)
,
~ y(0) =
0 1
=⇒ ~y(t) =
e−3tsin(t) e−3tcos(t)−3e−3tsin(t)
. MCQ. A: -0.10423 B: -0.117092 C: -0.131542 D: -0.147774 E: -0.166009
Answer. D Mathematica.
Octave.
Exercise (9). Hom.Lin. DE. Jordan decomposition.
Theorem: For any complex square A matrix there exists an S such that SAS−1 is block diagonal with blocks choosen from the following list
J1 = λ
, J2 = λ 1
0 λ
, J3=
λ 1 0 0 λ 1 0 0 λ
, . . . .
Subexercise (A). Constant velocity motion.
¨
y= 0, d dt~y=
0 1 0 0
~ y=A~y.
(Here~y= (y,y)˙ T.) How much is (exp(1.429A))12 ? Remark.
etA =E+tA+t2
2!A2+t3
3!A3+· · ·= 1 0
0 1
+t 0 1
0 0
, mivel
0 1 0 0
2
= 0 0
0 0
. MCQ. A: 1.429 B: 1.60534 C: 1.80344 D: 2.02598 E: 2.27599 Answer. A
Subexercise (B). Constant accerelation.
d3y
d3 = 0, d dt~y =
0 1 0 0 0 1 0 0 0
~y=A~y.
(Here~y= (y,y,˙ y)¨T.) How much is (exp(1.429A))13 ? Remark.
etA=E+tA+t2
2!A2+t3
3!A3+· · ·=
1 0 0 0 1 0 0 0 1
+t
0 1 0 0 0 1 0 0 0
+t2 2!
0 1 0 0 0 1 0 0 0
2
, since
0 1 0 0 0 1 0 0 0
3
=
0 0 0 0 0 0 0 0 0
. So
etA =
1 t t2/2
0 1 t
0 0 1
. MCQ. A: 1.02102 B: 1.14701 C: 1.28856 D: 1.44756 E: 1.62619 Answer. A
Subexercise (C). Radioactive decay, I →II →. . .. d
dt~y=
−2 0 2 −2
~ y=A~y.
(Itt~y= (yI, yII)T.) How much is (exp(1.429A))21 ? Remark.
etA= exp
t
−2 0 0 −2
+t
0 0 2 0
= exp
t
−2 0 0 −2
exp
t
0 0 2 0
=
e−2t 0 0 e−2t
1 0 2t 1
=
e−2t 0 2te−2t e−2t
. as the following matrices commute with each other:
−2 0 0 −2
0 0 2 0
= 0 0
2 0
−2 0 0 −2
.
Remark. Or we can find the Jordan decomposition of A.
• Solve first the equations
A~v1=−2~v1, A~v2 =−2~v2+~v1.
Hasonlo egyenletek elegit ki a standard bazis aJ2 Jordan blokkra nezve: Similar equations are satisfied by the standard basis and theJ2 Jordan block:
λ 1 0 λ
1 0
=λ 1
0
,
λ 1 0 λ
0 1
=λ 0
1
+ 1
0
• For the matrixS = (~v1, ~v2) it is true that S
−2 1 0 −2
S−1 =A, so
etA=Sexp
t
−2 1 0 −2
S−1 =
0 12 1 0
e−2t
1 t 0 1
0 1 2 0
MCQ. A: 0.129951 B: 0.145987 C: 0.164002 D: 0.18424 E: 0.206975 Answer. C
Subexercise (D). Critically damped oscillator. Leta= 6,
¨
y+ 2ay˙+a2y= 0, d dt~y=
0 1
−a2 −2a
~ y=A~y.
(Here~y= (y,y)˙ T.) How much is (exp(0.2·A))12 ?
Remark. 0 = det(A−λE) = (λ+a)2, soA has only a single eigenvalueλ=−a.
etA=e−atexp[t(A−(−a)E)]
=e−atexp
t·
a 1
−a2 −a
=e−at
1 0 0 1
+t
a 1
−a2 −a
,
Since
a 1
−a2 −a 2
= 0 0
0 0
. Remark. Or we van compute the Jordan decomosition ofA.
• Solve the equations
A~v1 =−a~v1, A~v2 =−a~v2+~v1. The solution (up to a constant multiplier) is
~v1=
−1/a 1
, ~v2 =
−1/a2 0
.
• Assemble the matrixS = (~v1, ~v2), then S
−a 1 0 −a
S−1=A, so
etA=Sexp
t
−a 1 0 −a
S−1 =
−1a −a12
1 0
e−at te−at 0 e−at
0 1
−a2 −a
=
e−at(at+ 1) e−att
−a2e−att e−at(1−at)
MCQ. A: 0.0424887 B: 0.0477318 C: 0.0536219 D: 0.0602388 E: 0.0676723 Answer. D
Mathematica.
A = {{0, 1}, {0, 0}}
A.A
MatrixExp[t A] // TableForm
A = {{0, 1, 0}, {0, 0, 1}, {0, 0, 0}}
A.A.A
MatrixExp[t A] // TableForm A = {{-2, 0}, {3, -2}}
MatrixExp[t A] // TableForm MatrixExp[t A][[2,1]]/.t -> 0.9 jd = JordanDecomposition[A]
S = jd[[1]]
J = jd[[2]]
S.J.Inverse[S]
a = 3
A = {{0, 1}, {-a^2, -2 a}}
MatrixExp[t A] // TableForm MatrixExp[t A][[1,2]]/.t -> 0.2 jd = JordanDecomposition[A]
S = jd[[1]]
J = jd[[2]]
S.J.Inverse[S]
Octave.
pkg load symbolic;
syms t;
tt=0.9;
A = [0 1; 0 0]
A2 = A^2 expm(t*A) As = sym(A)
[V, J] = jordan (As)
A = [0, 1, 0; 0, 0, 1; 0, 0, 0]
A2 = A^2 A3 = A^3 expm(t*A) As = sym(A)
[V, J] = jordan (As) A = [-2, 0; 3, -2]
expm(t*A)
expm(tt*A)(2,1) As = sym(A)
[V, J] = jordan (As) a=3
A = [0 1; -a^2 -2*a]
expm(t*A)
expm(0.2*A)(1,2) As = sym(A)
[V, J] = jordan (As)
Exercise (10). Impulse response, distributions.
Dirac-delta: δ(t) = 0, hat6= 0, Z ∞
−∞
δ(t)dt= 1.
Heaviside theta: θ(t) =
(0, hat <0, 1, hat >0,
????: K(t) =
(0, hat <0, t, hat >0., hf(t), φ(t)i=
Z −∞
∞
f(t)φ(t)dt hf0(t), φ(t)i=
Z −∞
∞
f0(t)φ(t)dt=− Z −∞
∞
f(t)φ0(t)dt=−hf(t), φ0(t)i Then
θ0(t) =δ(t),
K0(t) =θ(t), K00(t) =θ0(t) =δ(t).
Subexercise (A). Ifφ(t) = (1 +t2)−1, then how much is
−hθ(t), φ0(t)i.
Remark. Ez a feladat azt illusztralja, hogy This subexercise illustrates that φ(0) =hδ(t), φ(t) i=hθ0(t), φ(t)i=−hθ(t), φ0(t)i
=− Z −∞
∞
θ(t)φ0(t)dt=− Z ∞
0
1·φ0(t)dt=−(φ(∞)−φ(0)).
As this holds for any smoothφ which is zero outside a finite interval, we proved thatδ0 =θ.
MCQ. A: -1 B: 0 C: 1 D: 2 E: 3 Answer. C
Subexercise (B).
1
4G0(t) =δ(t), G(−1) = 0.
How much isG(0.3) ? Remark.
G0(t) = 4δ(t) =⇒ G(t) = 4θ(t) +C, =⇒ G(t) = 4θ(t).
MCQ. A: 0 B: 1 C: 2 D: 3 E: 4 Answer. E
Subexercise (C).
G0(t) + 4G(t) =δ(t), G(−1) = 0.
How much isG(0.3) ? Remark.
t <0, G0(t) =−4G0(t), G(−1) = 0 =⇒ G(t) = 0,
t≈0, G0(t) =−4G0(t) +δ(t)≈δ(t) =⇒ G(0+)−G(0−) = 1 =⇒ G(0+) = 1, t >0 G0(t) =−4G(t), G(0+) = 1 =⇒ G(t) =e−4t.
So
G(t) =θ(t)e−4t.
MCQ. A: 0.212443 B: 0.238659 C: 0.268109 D: 0.301194 E: 0.338362 Answer. D
Subexercise (D).
G0(t) + 4G(t) =δ(t), G(1) = 0.
How much isG(0.3) ? Remark.
t >0, G0(t) =−4G0(t), G(1) = 0 =⇒ G(t) = 0, t≈0, G0(t) =−4G0(t) +δ(t)≈δ(t)
=⇒ G(0+)−G(0−) = 1 =⇒ G(0−) =−1, t <0 G0(t) =−4G(t), G(0−) =−1 =⇒ G(t) =−e−4t. So
G(t) =−θ(−t)e−4t.
Here we computed the advanced Green function, it is less commonly used than the retarded one.
MCQ. A: 0. B: 0.1234 C: 0.2468 D: 0.3702 E: 0.4936 Answer. A
Subexercise (E).
G00(t) + 2G(t) =δ(t), G(−1) = 0, G0(−1) = 0.
How much isG(0.3) ? Remark.
t <0, G00(t) =−2G0(t), G(−1) = 0G0(−1) = 0 =⇒ G(t) = 0,
t≈0, G00(t) =−2G00(t) +δ(t)≈δ(t) =⇒ G(0+)−G(0−) = 0, G0(0+)−G0(0−) = 1
=⇒ G(0+) = 0, G0(0+) = 1,
t >0 G0(t) =−2G(t), G(0+) = 0G0(0+) = 1 =⇒ G(t) = 1
√2sin√ 2t
. So
G(t) = θ(t)
√2 sin√ 2t
. MCQ. A: 0.366432 B: 0.41165 C: 0.462448 D: 0.519514 E: 0.583622 Answer. B
Subexercise (F).
G00(t) + 6G0(t) + 9G(t) =δ(t), G(−1) = 0G0(−1) = 0.
How much isG(0.3) ? Remark.
t <0, G00(t) =−6G0(t)−9G(t), G(−1) = 0G0(−1) = 0 =⇒ G(t) = 0, t≈0, G00(t) =−6G0(t)−9G(t) +δ(t)≈δ(t)
=⇒ G(0+)−G(0−) = 0, G0(0+)−G0(0−) = 1 =⇒ G(0+) = 0, G0(0+) = 1, t >0 G0(t) =−6G0(t)−9G(t), G(0+) = 0, G0(0+) = 1
=⇒ G(t) =e−3tt.
So
G(t) =θ(t) e−3tt . MCQ. A: 0.108573 B: 0.121971 C: 0.137022 D: 0.153931 E: 0.172926 Answer. B
Subexercise (G).
G00(t) + 6G0(t) + 18G(t) =δ(t), G(−1) = 0G0(−1) = 0.
How much isG(0.3) ? Remark.
t <0, G00(t) =−6G0(t)−18G(t), G(−1) = 0G0(−1) = 0 =⇒ G(t) = 0, t≈0, G00(t) =−6G0(t)−18G(t) +δ(t)≈δ(t)
=⇒ G(0+)−G(0−) = 0, G0(0+)−G0(0−) = 1 =⇒ G(0+) = 0, G0(0+) = 1, t >0 G0(t) =−6G0(t)−18G(t), G(0+) = 0, G0(0+) = 1
=⇒ G(t) =1
3e−3tsin(3t).
So
G(t) =θ(t)1
3e−3tsin(3t).
MCQ. A: 0.0841178 B: 0.0944979 C: 0.106159 D: 0.119259 E: 0.133976 Answer. C
Subexercise (H). Have you managed to plot the retarded Green function solutions of the following DE? (Just answer ”A: Yes”.)
G0+G=δ, G00+G=δ,
G00+ 3G0+ 2G=δ, G00+ 2G0+ 5G=δ, Remark. The four solutions are
θ(t)·
e−t sin(t)
e−t−e−2t 12e−tsin(2t)
.
-1 1 2 3 4 5 6
0.2 0.4 0.6 0.8 1.0
-1 1 2 3 4 5 6
-1.0 -0.5 0.5 1.0
-1 1 2 3 4 5 6
0.05 0.10 0.15 0.20 0.25
-1 1 2 3 4 5 6
-0.05 0.05 0.10 0.15 0.20 0.25
MCQ. A: Igen/Yes Answer. A
Mathematica.
tt = 0.3;
de = {y’[t] + 3 y[t] == 0, y[0] == 1};
DSolve[de, y[t], t]
resC = DSolve[de, y[t], t][[1, 1, 2]] /. t -> tt resD = 0
resE = Sin[Sqrt[3]*tt]
de = {y’’[t] + 5 y’[t] + 6 y[t] == 0, y[0] == 0, y’[0] == 1};
(DSolve[de, y[t], t] // Expand)[[1, 1, 2]]
resF = DSolve[de, y[t], t][[1, 1, 2]] /. t -> tt
de = {y’’[t] + 2 y’[t] + 5 y[t] == 0, y[0] == 0, y’[0] == 1};
DSolve[de, y[t], t]
resG = DSolve[de, y[t], t][[1, 1, 2]] /. t -> tt
d1 = DSolve[{ y’[t] + y[t] == DiracDelta[t], y[-1] == 0}, y, t]
p1 = Plot[y[t] /. d1, {t, -1, 6}, PlotRange -> All];
d2 = DSolve[{ y’’[t] + y[t] == DiracDelta[t], y[-1] == 0, y’[-1] == 0}, y, t]
p2 = Plot[y[t] /. d2, {t, -1, 6}];
d3 = DSolve[{y’’[t] + 3 y’[t] + 2 y[t] == DiracDelta[t], y[-1] == 0, y’[-1] == 0}, y, t]
p3 = Plot[y[t] /. d3, {t, -1, 6}];
d4 = DSolve[{y’’[t] + 2 y’[t] + 5 y[t] == DiracDelta[t], y[-1] == 0, y’[-1] == 0}, y, t]
p4 = Plot[y[t] /. d4, {t, -1, 6}];
GraphicsGrid[{{p1, p2}, {p3, p4}}]
Octave.
graphics_toolkit ("gnuplot");
pkg load symbolic;
syms y(t);
de = diff(y,t) + 3*y(t) dsolve( de == 0, y(0) == 1 )
dsolve( de == dirac(t) , y(-1) == 0 ) de = diff(y,t,2)+ 3*y(t)
dsolve( de == 0 , y(0) == 0, diff(y,t)(0) == 1 )
dsolve( de == dirac(t) , y(-1) == 0, diff(y,t)(-1) == 0 ) de = diff(y,t,2) + 5*diff(y,t) + 6*y(t)
sol1 = dsolve( de == dirac(t) , y(-1) == 0, diff(y,t)(-1) == 0 ) fh1 = function_handle( rhs (sol1) )
ts = [-1:0.1:6];
figure
plot( ts, fh1( ts ) )
de = diff(y,t,2) + 2*diff(y,t) + 5*y(t)
sol2 = dsolve( de == dirac(t) , y(-1) == 0, diff(y,t)(-1) == 0 ) tt = 0.3
res = subs( rhs (sol2) , t, tt ) % Octave dislikes this double( res )
fh2 = function_handle( rhs (sol2) ) fh2( tt )
ts = [-1:0.1:6];
figure
plot( ts, fh2( ts ) )
Exercise (11). Inhom. Lin. DE.
Let
χ[a,b](t) =
(1, ha t∈[a, b], 0, ha t6∈[a, b].
Subexercise (A). Leta= 2..
G0(t) +aG(t) =δ(t), G(−1) = 0, G(t) =θ(t)e−at.
UseG to obtain the solution of the DE
y0(t) +ay(t) =χ[1,2](t), y(−∞) = 0 fort >2-re! How much isy(2.6) ?
Remark.
y(2.6) = (G∗χ[1,2])(2.6) = Z ∞
−∞
G(2.6−τ)χ[1,2](τ)dτ
= Z 2.6
−∞
e−a(2.6−τ)χ[1,2](τ)dτ = Z 2
1
e−a(2.6−τ)·1dτ MCQ. A: 0.10318 B: 0.115912 C: 0.130216 D: 0.146285 E: 0.164336
Answer. C
Subexercise (B). Leta= 2..
G0(t) +aG(t) =δ(t), G(t) =θ(t)e−at. UseG to obtain the solution of the DE
y0(t) +ay(t) =χ[1,2](t), y(0) = 7 fort >2-ra! How much isy(2.6) ?
Remark.
y(2.6) = (G∗χ[1,2])(2.6) +y(0)G(2.6) = Z ∞
0
G(2.6−τ)χ[1,2](τ)dτ
= Z 2.6
0
e−a(2.6−τ)χ[1,2](τ)dτ = Z 2
1
e−a(2.6−τ)·1dτ+ 7e−a·2.6 MCQ. A: 0.133778 B: 0.150287 C: 0.168832 D: 0.189666 E: 0.213071
Answer. C
Subexercise (C). Leta= 2.
G0(t) +aG(t) =δ(t), G(−1) = 0, G(t) =θ(t)e−at. UseG to obtain the solution of the DE
y0(t) +ay(t) =θ(t), y(0) = 0
fort >0 ! (That is the unit step response.) How much time is necessary fory to reach the 90 percent of the value of y(∞) ? (This is the rise time of the system. It might be defined as the time between the 10 and 90 percent values ofy(∞).)
Remark. Let
U0(t) =G(t), U(t) = Z t
−∞
G(τ)dτ.
Then
U0(t) +aU(t) =θ(t) =⇒ (U0(t))0+a(U(t))0 =θ0(t) =δ(t) =G0(t) +aG(t), sinceθ0(t) =δ(t). So the unit step response is the integral of the impulse response:
U(t) =
(0, ha t <0,
Rt
0 e−atdt= 1−ea−at, ha t >0.
y(∞) = 1/a, soTrise rise time is
1−e−aTrise
a = 0.9
a =⇒ Trise= ln 10 a .
0.0 0.5 1.0 1.5 2.0 2.5 0.1
0.2 0.3 0.4 0.5 0.6
MCQ. A: 0.72285 B: 0.812049 C: 0.912256 D: 1.02483 E: 1.15129 Answer. E
Subexercise (D). Leta= 2.
G0(t) +aG(t) =δ(t), G(−1) = 0, G(t) =θ(t)e−at. UseG to obtain the solution of the DE
y0(t) +ay(t) =θ(t), y(0) = 0
fort >0 ! What is the settling time of the system, i.e. where is that time moment after which the the value of y will stay in the ±2% neighbourhood of y(∞) ?
Remark. y(∞) = 1/a, so theTsetl settling time is 1−e−aTsetl
a = 0.98
a =⇒ Tsetl= ln 50 a .
1.6 1.8 2.0 2.2 2.4
0.480 0.485 0.490 0.495 0.500 0.505 0.510
MCQ. A: 1.37965 B: 1.5499 C: 1.74115 D: 1.95601 E: 2.19738
Answer. D Mathematica.
a = 2; tt = 3;
chi[a_, b_, t_] := If[a < t && t < b, 1, 0]
de = {y’[t] + a y[t] == chi[1, 2, t], y[0] == 0}
des = DSolve[de, y[t], t]
resA = (des[[1, 1, 2]] /. t -> tt) // N resB = resA + Exp[-a tt]*7
resC = Log[10.0]/a U = 1/a - Exp[-a t]/a
plot1 = Plot[{U, 1/a, 0.9/a}, {t, 0, 5/a}, PlotRange -> {0, 1.2/a}, Epilog -> {PointSize[Medium], Point[{resC, U /. t -> resC}]}]
resD = Log[50.0]/a U = 1/a - Exp[-a t]/a
plot2 = Plot[{U, 1/a, 0.98/a}, {t, 3/a, 5/a}, PlotRange -> {0.95/a, 1.02/a},
Epilog -> {PointSize[Medium], Point[{resD, U /. t -> resD}]}]
Octave.
clear all;
graphics_toolkit ("gnuplot");
pkg load symbolic;
a=2; tt=3;
syms y(t);
de = diff(y,t) + a*y(t)
solA = dsolve( de == heaviside(t-1)*heaviside(2-t), y(-1000) == 0 ) fh = function_handle( rhs (solA) )
fh( tt )
solB = dsolve( de == heaviside(t-1)*heaviside(2-t), y(0) == 7 ) fh = function_handle( rhs (solB) )
fh( tt ) log(10.0)/a log(50.0)/a
Exercise (12). Inhom. Lin. DE.
Let
χ[a,b](t) =
(1, ha t∈[a, b], 0, ha t6∈[a, b].
Subexercise (A). Lett1= 3.1, A=
−2 0 2 −3
, etA=
e−2t 0
−2e−3t+ 2e−2t e−3t
. UseetA to obtain the solution of the DE
d
dt~y(t) =A~y(t) + 0
1
(χ[1,2](t)), ~y(−∞) = 0
0
fort >2 ! How much is~y(3.1)2 ? Remark.
~ y(t) =
Z t
−∞
e−2(t−τ) 0
−2e−3(t−τ)+ 2e−2(t−τ) e−3(t−τ) 0 1
χ[1,2](τ)dτ
= Z 2
1
e−2(t−τ) 0
−2e−3(t−τ)+ 2e−2(t−τ) e−3(t−τ) 0 1
·1dτ
Remark. Here is the proof of the used formula:
d
dt~y(t) =A~y(t) +f~(t), ~y(−∞) = 0,
~ y(t) =
Z t
−∞
e(t−τ)Af(τ~ )dτ, d
dt~y(t) = d dt
Z t
−∞
e(t−τ)Af~(τ)dτ =e(t−t)Af~(t) + Z t
−∞
d dt
e(t−τ)Af~(τ) dτ
=E ~f(t) + Z t
−∞
A
e(t−τ)Af(τ~ )
dτ =f(t) +~ A Z t
−∞
e(t−τ)Af~(τ) dτ
=A~y(t) +f(t).~
MCQ. A:{0.00925676}B: {0.010399} C: {0.0116823}D: {0.0131239} E:{0.0147434}
Answer. C
Subexercise (B). Lett1 = 3.1, A=
−2 0 2 −3
, etA=
e−2t 0
−2e−3t+ 2e−2t e−3t
. UseetA to obtain the solution of the following DE
d
dt~y(t) =A~y(t) + 0
1
(χ[1,2](t)), ~y(0) = 7
8
. How much is~y(3.1)2 ?
Remark.
~
y(t) =et1A~y(0) + Z t1
0
e−2(t−τ) 0
−2e−3(t−τ)+ 2e−2(t−τ) e−3(t−τ) 0 1
χ[1,2](τ)dτ
=
e−2t 0
−2e−3t+ 2e−2t e−3t 7 8
+ Z 2
1
e−2(t−τ) 0
−2e−3(t−τ)+ 2e−2(t−τ) e−3(t−τ) 0 1
·1dτ.
MCQ. A:{0.0248292}B: {0.0278931} C: {0.0313351}D: {0.0352019} E:{0.0395458}
Answer. E Mathematica.
Octave.