Professional Documents
Culture Documents
List of tasks - 2
1) Solve the following linear differential equations (find the general solution for problems
without initial conditions; or Cauchy problems find the solution and indicate intervals on
which the solutions are defined) :
a)
b)
c)
d)
e)
f)
g)
h)
a)
b)
c)
d)
e)
Task 1)
a) y ′ = (t + 1)y
Z
dy dy
y ′ = (t + 1)y → = (t + 1)y → = dt(t + 1) (1)
dt y
Let’s recall, that if this function is equal to 0, then it’s called homogenous:
y ′ − (t + 1) y = 0.
| {z }
p(t)
As we can see, y variable is on the left side and t is on the right side. Thus, that’s the
separate variable equation. We can see, that this is also a linear equation, so we can
integrate both sides or use the following equation
Z
y = C exp p(t) dt . (2)
b) y ′ + y · tan t = 0
This is also a homogenous, linear equation. Using a similar approach as above, we get
y ′ = y tan t
Z
y′
= − tan t
y
Z Z
dy
= − tan t dt.
y
Then
We can also obtain the result from the expression (2). Then we get
Z
y = C exp − tan t dt = (⋆) .
2
We can express (⋆) as
and then
y ′ = C · (− sin t) . (3)
Putting the equation (3) to the initial equation, we get
sin t
y ′ + y · tan t = −C sin t + C
cos
t· = 0,
cos
t
so
y = C · | cos t|
is the correct answer.
3y
c) y ′ = t +t
Here’s another non-homogenous, linear equation because moving variables y on the left
and t on the right side, we get
3y
y′ − = t.
t
We can see that p(t) = − 3t and q(t) = t ̸= 0 → non-homogenous.
Let’s recall a theorem from the lecture:
Theorem 1
y ′ + p(x)y = q(x) (⋆)
If y1 is a particular solution of the equation y1′ +p(x)y1 = q(x), then the general solution
of (⋆) is y = y1 +z, whereR z is a general
solution of the homogenous equation z ′ +p(x)z =
0, that is z = c · exp − p(x) dx .
Let’s express y as
y = y0 + yp
Then y0 is the solution of a homogenous equation
3y0′
y0′ − = 0 → y0 (t) = c · t3 ,
t
because
dy0 3y0
=
dt t
dy0 3 dt
=
y0 t
ln y0 = 3 ln t + c
and eventually after eliminating logarithms, we get
3
We know that p(t) = − 3t , so
yp = c(t) · t3 .
Next, we have
−3yp
yp′ − =t
t
′ 3
c(t) · t3 − c(t)t3 = t
t
3
c′ (t)t2 + c(t)3t − c(t)t = 1
t
2 ′
t c (t) + 3c(t)t − 3c(t)t = 1
1
c′ (t) = 2
t
Then Z Z
1 1
c(t) = 2
= t−2 = t−1 · (−1) = −
t t
1
R
because tn dt = n+1
· tn+1 . So
3
1
yp = − = −t2
t
and
yp′ = −2t.
Finally,
y = y0 + yp = ct3 − t2 .
We can also check our solution:
3y
y′ − −t=0
t
3t2
−2t + −t=0
t
3t − 3t = 0.
f ) y ′ + y tan t = 1
cos t , y(0) = 0
This first-order differential equation is called a Cauchy problem because we have one
equation and one initial condition, and thus, if the Picard’s theorem is satisfied, we can
find the particular solution by calculating the constant c.
First, we have to find y0 which is the solution of the homogenous equation
y0′ + y0 tan t = 0
dy0
= −y0 tan t
dt
dy0
= − tan t dt
y0
Z
ln y0 = tan t = ln (| cos t|) + c
y0 = D cos t.
4
Next, we have to find a constant
D̃(t) cos t = yp
1
yp′ + yp tan t =
cos t
′ 1
D̃(t)t + D̃(t) cos t tan t =
cos t
1
D̃′ (t) cos t − D̃(t) sin t + D̃(t) sin t =
cos t
1
D̃′ (t) cos t =
cos t
′ 1
D̃ (t) =
cos2 t
dD̃ 1
= 2
Z dt Zcos t
dt
dD̃ =
cos2 t
D̃(t) = tan t.
Then we have
0 = D · cos
|{z}0 + |{z}
sin 0
1 0
D=0
y = sin t.
Task 2)
a) y ′ − y = y 2
A Bernoulli equation is the following shape
Let’s provide a new variable z = y 1−r for z ∈ R\ {0, 1}. From this, we can get
y = z −(1−r) = z r−1 .
After some calculations we get the following equation for our new variable z
z ′ + (1 − r) · p(t) · z = (1 − r) · h(t),
which is linear. Thus, this equation can be solved just with methods of solving linear
equations.
So, to solve this kind of equation, we need to
1. define the equation for z from y,
5
2. find z(t),
3. solve y = z r−1 .
Coming back to our equation, let’s divide both sides of y ′ − y = y 2 by y 2 . Then we get
1 1
y′ · 2
− = 1.
y y
Since r = 2, then
1
z = y (1−2) = y −1 = .
y
So, for p(x) = −1, h(x) = 1, r = 2 and z = 1/y we get
z ′ + (1 − r) · p(t) · z = (1 − r) · h(t)
z ′ + (1 − 2) · (−1) · z = (1 − 2) · 1
z ′ + z = −1
z0′ + z0 = 0
z0′ = −z0
dz0
= −z0
dt
dz0
= −1 dt
z0
ln z0 = −t + c.
Finally, we get
z0 = exp (c − t) = D · exp (−t).
R
Using integrating factor method (multiply both sides by e p(x) dt , in this case p(x) = 1,
not −1), we obtain
Z
′
zp + zp = −1 exp dt = exp (t)
zp′ exp t + zp exp t = − exp t
(zp exp t)′ = − exp t
Z Z
′
(zp exp t) dt = − exp t dt
zp exp t = exp t
zp = 1.
Then
z = D exp (−t) + 1
and
1
y= = (D exp (−t) + 1)−1 .
z
6
Differential equations. List of tasks - 3
1) Solve the following linear differential equations (find the general solution for problems
without initial conditions; or the solution of Cauchy problem) with use of the method of
undetermined coefficients:
a)
b)
c)
d)
e)
2) Solve the following linear differential equations (find the general solution for problems
without initial conditions; or the solution of Cauchy problem) with use of the method of
undetermined coefficients:
a)
b)
c)
d)
e)
3) Solve the following linear differential equations (find the general solution for problems
without initial conditions) with use of the method of variation of parameters:
a)
b)
c)
1) Solutions:
a)
b)
c)
d)
e)
2) Solutions:
a)
b)
c)
d)
e)
3) Solutions:
a)
b)
c)
Task 1)
a) y ′′ − y ′ − 2y = 0
d2 y dy
− − 2y = 0
dt2 dt
y = eλx , λ - const.
d2 λx
e
dt2
d2 d λx
eλx − − 2 eλx = 0
e
dt2 dt
λ2 − λ − 2 eλx = 0
λ2 − λ − 2 = 0
(λ − 2) (λ + 1) = 0
So
λ1 = 2, λ2 = −1
b) y ′′ + 8y + 16y = 0
q(s) = s2 + 8s + 16 = (s + 4)2
Bt : e−4t , te−4t
c) y ′′ + 2y ′ + 5y = 0
q(s) = s2 + 2s + 5 = 0
√
∆ = −16 = (−4i)2 , ∆ = 4i
−2 − 4i
s1 = = −1 − 2i, s2 = −1 + 2i
2
Thus
y(t) = c1 e−t cos (2t) + c2 e−t sin (2t)
9
d) y ′ − y = 0, y(0) = 0, y ′ (0) = 1
q(s) = s2 − 1 = (s − 1)(s + 1)
y(t) = c1 et + c2 e−t
y ′ (t) = c1 et − c2 e−t
From the first initial condition we get
y(0) = c1 + c2 = 0 → c1 = −c2
and from the second one we get
y ′ (0) = c1 − c2 = 1 → 2c1 = 1.
So
1 1
c1 = , c2 = − .
2 2
Then the solution is
1 1
y(t) = et − e−t .
2 2
Task 2)
a) y ′′ − 3y ′ − 10y = 7e−2t
In the first step, we solve a homogenous equation:
y ′′ − 3y ′ − 10y = 0
q(s) = s2 − 3s − 10 = (s − 5)(s + 2)
ys (t) = c1 e5t + c2 e−2t
The second step is to find a particular solution:
1
L 7e−2t = 7 ·
s+2
1 A B C
q(s)L{y} = 7 → L{y} = + +
s+2 s − 5 s + 2 (s + 2)2
Then
Bqv : e5t , e−2t , te−2t
Bq : e5t , e−2t
Bqv − Bq : te−2t
yp = a3 te−2t
′
a3 e−2t − 2a3 te−2t − 3 a3 e−2t − 2a3 te−2t − 10a3 te−2t = 7e−2t
10
b) y ′′ + 4y ′ + 5y = e−3t
In the first step, we need to
y0 : q(s) = s2 + 4s + 5 = 0
√
∆ = −4 = (−2i)2 , ∆ = 2i
−4 − 2i
s1 = = −2 − i, s2 = −2 + i
2
Thus
y0 (t) = c1 e−2t cos (t) + c2 e−2t sin (t).
The second step is to find yp
yp = Ae−3t
The derivative of yp is
yp′ = −3Ae−3t
and the second derivative is
yp′′ = 9Ae−3t .
Then
yp′′ + 4yp′ + 5yp = 9Ae−3t − 12Ae−3t + 5Ae−3t = 2Ae−3t
and
1
2Ae−3t = e−3t → A = .
2
So
1
yp = e−3t .
2
Thus, the final solution is
1
y(t) = e−3t + c1 e−2t cos (t) + c2 e−2t sin (t).
2
11
The next step is to find a particular solution
1
(yp ) : L 10e2t = 10
s−2
1 A B C
q(s)L {y} = 10 → L {y} = + +
s−2 s−i s+1 s−2
Bqv = cos t, sin t, e2t
Bq = {cos t, sin t}
Bqv − Bq = e2t
So, then
yp = ae2t
yp′ = 2ae2t
yp′′ = 4ae2t
and
4ae2t + ae2t = 10e2t → 5a = 10 → a = 2.
Thus
yp = 2e2t .
We know that
y(t) = y0 (t) + yp (t) = c1 cos t + c2 sin t + 2e2t .
From the first initial condition
then
c1 + 2 = 0 → c1 = −2.
The derivative of y is
′
y ′ (t) = c1 cos t + c2 sin t + 2e2t = −c1 sin t + c2 cos t + 4e2t .
we get
c2 + 4 = 0 → c2 = 4.
Finally
y = −2 cos t − 4 sin t + 2e2t .
Second method:
Let’s pretend we have a homogenous equation
12
yp (t) = c1 (t) · y1 (t) + c2 (t)y2
Z
y2 (t)h(t) dt
c1 = −
W (y1 , y2 )
Z
y1 (t)h(t) dt
c2 =
W (y1 , y2 )
where Wronskian is
y1 (t) y2 (t)
W (y1 , y2 ) = ′ .
y1 (t) y2′ (t)
Task 3)
a) y ′′ + y = sin t
The first step is to find a homogenous equation solution
y0 : q(s) = s2 + 1 = 0
s = ±i
y0 = c1 cos t + c2 sin t
So
y1 = cos t, y2 = sin t
and the derivatives of y1 and y2 are
The Wronskian is
cos t sin t
W (y1 , y2 ) = = cos2 t + sin2 t = 1.
− sin t cos t
1 1 1
yp = − (t − sin t cos t) · cos t − cos2 t · sin t = t cos t.
2 2 2
Finally
1
y = yp + y0 = t cos t + c1 cos t + c2 sin t.
2
13
Differential equations. List of tasks - 4
1) Compute the matrix exponential .
a)
b)
a)
b)
c)
d)
a)
b)
c)
1) Solutions:
a)
b)
2) Solutions:
a)
b)
c)
d)
3) Solutions:
a)
b)
c)
Task 1)
eAt = L (sI − A)−1
1 −1
a) A =
2 −2
Let’s start with calculating (sI − A)−1 , where I is the identity matrix. Remember that
−1
−1 a11 a12 1 a22 −a12
A = = .
a21 a22 |A| −a21 a11
So,
−1 −1
−1 s 0 1 −1 s−1 1 1 s−2 1
(sI − A) = − = =
0 s −2 2 2 s−2 (s − 1)(s − 2) − 2 2 s−1
then finally " #
s−2 −1
(sI − A)−1 = s(s−3)
−2
s(s−3)
s−1
s(s−3) s(s−3)
and
s−2
−1 −1 A −1 B
L =L +L =
s(s − 3) s s−3
1
−1 2 −1 2 −1 1 −1 1 2 1
=L +L 3
= L +L = + e3t ,
3s s−3 3 s s−3 3 3
1 1
−3
−1 1 1
L−1 = L−1 3 + L−1 = − e3t ,
s(s − 3) s s−3 3 3
1
−3
−2 −1 1 1
L−1 = 2 · L−1 + L−1 = − e3t ,
s(s − 3) s(s − 3) s−3 3 3
1 1
−3
s−1 1 2
L−1 = L−1 3 + L−1 = + e3t .
s(s − 3) s s−3 3 3
Thus, 2
+ 13 e3t 1
− 13 e3t
At 3 3
e = 2 .
3
− 23 e3t 2
3
+ 23 e3t
Task 2)
eAt using Fulmer’s method
2 −1
a) A =
1 0
First, we need to find the characteristic polynomial of the matrix A
s−2 1
cA (s) = det (sI − A) = det (s − 2)s + 1 = s2 − 2s + 1 = (s − 1)2 ,
−1 s
16
then
BcA = et , tet .
d
= AeAt = M1 et + M2 et + tet .
(5)
dt
From the (4) and (5) equations and assuming that t = 0, we obtain
(4) I = M1 M1 = I M1 = I
=⇒ =⇒ =⇒
(5) A = M1 + M2 M2 = A − M1 M2 = A − I.
So,
1 0 1 −1
M1 = , M2 = .
0 1 1 −1
Thus, t
At 1 0 t 1 −1 t e + tet −tet
e = e + te = .
0 1 1 −1 tet et − tet
2 1
b) A =
−4 −2
To find the characteristic polynomial of the matrix A first, we need to find the sI − A
matrix
s − 2 −1
sI − A =
4 s+2
and its determinant
cA (s) = (s − 2)(s + 2) + 4 = s2 − 4 + 4 = s2 .
and
eAt = M1 + M2 t.
We can easily calculate that
I = M1 , A = M2 .
Thus,
At 1 + 2t t
e =
−4t 1 − 2t
Let’s put t = 0 to the matrix above and its derivative
eAt (t = 0) = M1 + M2 · 0 −→ I = M1 ,
′ t=0
eAt (M1 · 1)′ + (M2 t)′ −→ A = M2 .
17
4 −10
c) A =
1 −2
Calculating the characteristic polynomial we get
s − 4 10
sI − A =
−1 s + 2
cA (s) = (s − 4)(s + 2) + 10 = s2 + 2s − 4s − 8 + 10 = s2 − 2s + 2.
Let’s calculate the discriminant of this equation
√
∆ = 4 − 8 = −4 = (2i)2 , ∆ = 2i.
Then
2 − 2i 2 + 2i
s1 = = 1 − i, s2 = =1+i
2 2
and
BcA = et cos t, et sin t .
So
eAt = M1 et cos t + M2 et sin t (6)
and the derivative is equal to
deAt
= M1 et cos t − M1 et sin t + M2 et sin t + M2 et cos t. (7)
dt
Then, from the (6) and (7) with t = 0 we get
I = M1
A = M1 + M2
Finally
t
At 1 0 t 3 −10 t e cos t + 3et sin t −10et sin t
e = e cos t + e sin t = .
0 1 1 −3 et sin t et cos t − 3et sin t
1 0 −1
d) A = 0 1 0
2 0 −2
The characteristic polynomial of the matrix A is equal to
So,
BcA = 1, e−t , et
18
and then
eAt = M1 · 1 + M2 · et + M3 · e−t .
Assigning t = 0 to the equation and its first and second derivatives give us
eAt = I = M1 + M2 + M3 ,
t=0
′
eAt = A = M1 · 0 + M2 · 1 − M3 · 1 = M2 − M3 ,
t=0
′′
eAt = A2 = M1 · 0 + M2 · 1 + M3 · 1 = M2 + M3 ,
t=0
which implies
M2 = 12 (A2 + A)
M3 = 21 (A2 − A)
M1 = I − A2
and then
1 0 0 −1 0 1 2 0 −1
M1 = 0 1 0 − 0 1 0 = 0 0 0 ,
0 0 1 −2 0 2 2 0 −1
−1 0 1 1 0 −1 0 0 0 0 0 0
1 1
M2 = 0 1 0 + 0 1 0 = 0 2 0 = 0 1 0 ,
2 2
−2 0 2 2 0 −2 0 0 0 0 0 0
−1 0 1 1 0 −1 −2 0 2 −1 0 1
1 1
M3 = 0 1 0 − 0 1 0
= 0 0 0 = 0 0 0 .
2 2
−2 0 2 2 0 −2 −4 0 4 −2 0 2
Finally
2 − e−t 0 −1 + e−t
2 0 −1 0 0 0 −1 0 1
eAt = 0 0 0 ·1+0 1 0·et + 0 0 0·e−t = 0 et 0 .
−t −t
2 0 −1 0 0 0 −2 0 2 2 − 2e 0 −1 + 2e
Task 3)
→
− →
−
y ′ = A→
−
y + f, →
−
y (0) = →
−
y0 .
19
−1 0 →
− 1 →
− 0
a) A = ; y (0) = ; f =
0 3 −2 0
→
−
Remember, since f is 0, this equation is homogenous. Let’s find the characteristic
polynomial first
s+1 0
cA (s) = det (sI − A) = det = (s + 1)(s − 3).
0 s−3
We know that → −y =→ −
yh + →yp . So, to find →
− −
yh , we have to calculate the inverse matrix
|{z}
=0
of sI − A
" s−3
#
1
0
−1 1 s − 3 0 (s+1)(s−3 ) s+1
0
(sI − A) = = = .
s+1 1
(s + 1)(s − 3) 0 s+1 0
(s−3)(
s+1
) 0 s−3
Since →
−
yh = eAt · →
−
y0 , then finally
−t
→
− −t 1 0 3t 0 0 1 t 1 3t e
yh (t) = e +e =e + e 10 − 2 = .
0 0 0 1 −2 0 −2e3t
2 1 →
− 2 →
− 1/t
b) A = ; y (1) = ; f =
−4 −2 1 2/t
From the task 2b) we know that
At 1 + 2t t
e =
−4t 1 − 2t
t
→
−
Z
Here f ̸= 0. Remembering that →
−
y = →
−
yh + →
−
yp = eA(t−t0 ) →
−
y (t0 ) + eA(t−u) f (u) du,
| {z } t0
−
→
yh
| {z }
−
→=eAt ∗f (t)
yp
let’s calculate →
−
yh first
→
− A(t−t0 ) →
− t0 =1 1 + 2(t − 1) t−1 2 −1 + 2t t − 1 2
yh = e · y (t0 ) = · = · =
−4t + 4 1 − 2(t − 1) 1 −4t + 4 2 − 2t 1
−2 + 4t + t − 1 5t − 3
= = .
−8t + 8 + 3 − 2t −10t + 11
The second step is to calculate → −
y . Let’s simplify this expression first
p
t t
→
− →
−
Z Z
A(t−u)
e · f (u) du = eAt e−Au · f (u) du.
t0 t0
→
−
To calculate this integral we have to find e−Au · f (u)
1 1
−Au → − −1 + 2u −u 1/u −2−2 −4
e · f (u) = · = u u
= 2 ,
4u 1 + 2u 2/u 4 + u2 + 4 u
+8
then the integral is equal to
Z t t
1
− 4 du = ln u − 4u = ln t − 4t − (0 − 4) = ln t − 4t + 4
t0 u
1
20
and
Z t t
2
− 8 du = 2 ln u + 8u = 2 ln t + 8t − (2 · 0 + 8) = 2 ln t + 8t − 8.
t0 u
1
Then
→
− ln t − 4t + 4 1 + 2t t ln t − 4t + 4
yp = eAt · = · =
2 ln t + 8t − 8 −4t 1 − 2t 2 ln t + 8t − 8
(1 + 2t)(ln t − 4t + 4) + t(2 ln t + 8t − 8)
= =
−4t(ln t − 4t + 4) + (1 − 2t)(2 ln t + 8t − 8)
ln t · (4t + 1) − 4t + 4
= .
ln t · (8t + 2) + 8t − 8
Finally
→
− 5t − 3 ln t · (4t + 1) − 4t + 4 1 + t + (1 + 4t) ln t
y (t) = →
−
yh + →
−
yp = + = .
−10t + 11 ln t · (8t + 2) + 8t − 8 3 − 2t + (2 − 8t) ln t
0 1 →
− a →
− t 1
c) A = ; y (1) = 1 ; f = =t
−1 0 a2 −t −1
We need to find the sI − A matrix
s −1
sI − A =
1 s
21
Then →
−
yp is equal to
At →
− 1 0 1 0 1 1
e ∗ f = cos t ∗ t + sin t ∗ t =
0 1 −1 −1 0 −1
Z t Z t
1 −1
= cos x · (t − x) dx + sin x · (t − x) dx.
−1 0 −1 0
and then
1 − cos t + 1
· − cos t + 1 = .
−1 cos t − 1
The second integral is equal to
t t
Z t Z t Z t
sin x · (t − x) dx = t · sin x dx − x · sin x dx = −t cos x − (sin x − x cos x) =
0 0 0
0 0
= −
t cos
t + t cos 0 − sin t +
t cos
0 −
sin
t + 0 ·cos
0 = t − sin t
and then
1 −t + sin t
· t − sin t = .
−1 −t + sin t
Thus, →
−
yp can be expressed as
→
− 1 − t + sin t − cos t
yp = .
−1 − t + sin t + cos t
Finally,
→
− cos t sin t 1 − t + sin t − cos t
y (t) = →
−
yh + →
−
y p = a1 + a2 + .
− sin t cos t −1 − t + sin t + cos t
22