Você está na página 1de 11

Differential equations. I.

Exercise set

1. Review exercises.
I.) Compute the following indefinite integrals!
p 1
a) x ln(3x), b) sin(3x) cos(3x), c)
(x − 3)x

Solution:

1 2 x2
a) x log(3x) − +C
2 4
2 3
b) − cos 2 (3x) + C
9
1
c) (log(x − 3) − log(x)) + C
3
.....................................................................................................................
II.) Compute the Taylor series of the following functions around x = x0 !
1 1
a) e3x , x0 = 0; b) sin(3x), x0 = 0; c) log(x), x0 = 1; d) , x0 = 0; e) , x0 = 0.
1−x x2 + 1
Solution:
32 x2 3 3 x3 9x2 9x3
+ O x4 = 1 + 3x + + O x4
 
a) 1 + 3x + + +
2! 3! 2 2
33 x3 3 5 x5 37 x7 9x3 81x5 243x7
+ O x9 = 3x − + O x9
 
b) 3x − + − + −
3! 5! 7! 2 40 560
1 1 1
c) (x − 1) − (x − 1) + (x − 1) − (x − 1) + O (x − 1)5
2 3 4

2 3 4
d) 1 + x + x2 + x3 + x4 + O x5


e) 1 − x2 + x4 − x6 + O x7


.....................................................................................................................
III.) Let f (x) equal to
2
a) ex+y , b) x sin(y 2 ).
Compute fx0 , fy0 , fxx
00 00
, fxy 00
, fyx 00
, fyy ! Compute d
dx f (x, ln(x)) !
Solution:
 
x+y 2 x+y 2 x+y 2 x+y 2 x+y 2 2 x+y 2 2 log(x)
x+y 2 x+log2 (x)
a) e , 2ye ,e , 2ye , 2ye , 4y e + 2e ,e +1
x
b) sin y 2 , 2xy cos y 2 , 0, 2y cos y 2 , 2y cos y 2 , 2x cos y 2 − 4xy 2 sin y 2 , sin log2 (x) + 2 log(x) cos log2 (x)
       

2. Transform the following DE into time independent systems!


   
d y1 xy1 + y2
a) y 0 = xy 2 + x; b) y 0 = x − y; c) =
dx y2 y1 y2 + x

Solution:
   
y ty + y2
d  1  1
   2     
d y ty + t d y t−y
a) = ; a) = ; c) y2 = y1 y2 + t
dx t 1 dx t 1 dx
t 1
;
3. Express the following DE as first order systems!

d2
   0 
y1 y1 − y2
a) y 00 = −y 0 − 2y; b) y 000 = y + x; c) =
dx2 y2 y20 y1

Solution:
   
    y1 v1
    y v
d y v d    d 
v1  = v1 − y2 
  
a) = ; b) v = a ; c)
dx v −v − 2y dx dx y2   v2 
a y+x
v2 v2 y 1

4.

a) y 0 = f (x, y) = x − y; b) y 0 = f (x, y) = y 2 + yx;

How much are y 00 and y 000 ? Write down y’s third order Taylor polynom around x = 0, if y(0) = 5 !
Solution:
   2
00 ∂ ∂ 000 ∂ ∂
y = +f f; y = +f f,
∂x ∂y ∂x ∂y
so
.....................................................................................................................

a) y 00 = −x + y + 1, y 000 = x − y − 1,
y(0) = 5, y (0) = f (0, 5) = 0 − 5, y 00 (0) = −0 + 5 + 1 = 6, y 000 (0) = 0 − 5 − 1 = −6,
0

6 −6 3
y(x) ≈ 5 − 5x + x2 + x
2! 3!
00 000
b) y = 2xy + 2y + 1, y = 2x + 8xy 2 + 6y 4 + 2y,
3 2

y(0) = 5, y 0 (0) = f (0, 5) = 25, y 00 (0) = 251, y 000 (0) = 3760,


251 2 3760 3
y(x) ≈ 5 + 25x + x + x
2! 3!

5.

a) f (x) = sin x, x0 = π/2; b) f (x) = x, x0 = 9; c) f (x) = 1/x, x0 = 2;

Compute f ’s linear approximation f (x0 + ∆x) ≈ T1 (x0 + ∆x) when ∆x = 0.1 ! Compute maxz∈[x0 ,x0 +∆x] |f 00 (z)| ?!
Give a nontrivial upper bound for the error |err(∆x)| = |f (x0 + ∆x) − T1 (x0 + ∆x)| !
.....................................................................................................................
Solution:

a) sin(π/2 + 0.1) = sin(π/2) + cos(π/2) · 0.1 + err(0.1)


1 1 1
|err(0.1)| ≤ ∆x2 maxz∈[x0 ,x0 +∆x] |f 00 (z)| = 0.12 maxz∈[π/2,π/2+0.1] | cos(z)| ≤ 0.12 · 1
2 2 2

c) 1/(2 + 0.1) = 1/2 − 1/22 · 0.1 + err(0.1)


1 1 1
|err(0.1)| ≤ ∆x2 maxz∈[x0 ,x0 +∆x] |f 00 (z)| = 0.12 maxz∈[2,2+0.1] | − 1/z 2 | = 0.12 · 1/4
2 2 2
6. Use the Euler and the Heun methods for the following DE with ∆x = 0.1 time step and y(2) = 3 initial condition!

a) y 0 = f (x, y) = x − y; b) y 0 = x − y 2 ;

Do the same for


       
d y1 y2 d y1 y1 − y2
c) = ; d) =
dx y2 −y1 dx y2 y12 + x
   
y1 (2) 2
with initial condition: =
y2 (2) 3
What are the predictions of these methods for y(2.1) ?
.....................................................................................................................
Solution:

a) Euler : y(2.1) ≈ y(2) + (2 − 3) · 0.1 = 3 + (−1) · 0.1 = 2.9,


y(2.2) ≈ y(2.1) + (2.1 − 2.9) · 0.1
Heun : k1 = f (2, 3) = 2 − 3 = −1, k2 = f (2 + 0.1, 3 + f (2, 3) · 0.1) = 2.1 − 2.9 = −0.8,
1 1
y(2.1) ≈ y(2) + (k1 + k2 ) · 0.1 = 3 + (−1 − 0.8) · 0.1.
2 2

7. Solve the DE with y(0) = 1 initial codition! Study the unicity of the solutions!

p
a) y 0 = y, b) y 0 = y 2 , c) y 0 = y 11/10 , d) y 0 = |y|, y≥0 e) y 0 = |y|9/10 ,

.....................................................................................................................
Solution:

a) y(x) = ex
Z Z
dy dy dy 1
b) = y2 , =⇒ = dx, =⇒ = dx, =⇒ − = x + C,
dx y2 y2 y
 
1 1
y(0) = 1 =⇒ − = 0 + C, =⇒ C = −1 , =⇒ y(x) =
1 1−x
1 × 1010
c) y(x) =
(x − 10)10
 1 2
 4 (x + 2) , ha x > −2,
d) y(x) = 0, ha C ≤ x ≤ −2
− 41 (x + C)2 , ha x ≤ C

(where C ≤ −2 is an arbitrary constant).

b) d)

The solution is defined on:


a) and d): (−∞, ∞),
b): (−∞, 1),
c): (−∞, 10).
The solution is not unique for case d), as the Lipsitz condition is violated at y = 0.
8. Draw the velocity field and solution curves of the y 0 = f (x) DE!
a) y 0 = 1, b) y 0 = x, c) y 0 = 1 − x, d) y 0 = x2 , e) y 0 = 1 − x2 ,
Solution:
c)

e)

9. Draw the velocity field and solution curves of the y 0 = f (y) DE! Find the fixpoints of the dynamics and write down
the linearized DE around the fixpoints! Study the stability of the fixpoints!
a) y 0 = 1, b) y 0 = y, c) y 0 = −y, d) y 0 = y + 1,
e) y 0 = −1 + y 2 , f ) y 0 = y(1 − y), g) y 0 = y(1 − y)(1 + y).

Solution:
b) y 0 = y

c) y 0 = −y
e) y 0 = y 2 − 1

.....................................................................................................................
g) y 0 = f (y) = y(1 − y)(1 + y) = +y − y 3
f 0 (y) = d
dy f (y) = 1 − 3y 2 . The fixpoints:

y1 = 0, y2 = 1, y3 = −1,

f 0 (y1 ) = f 0 (0) = 1 − 3 · 02 = 1 > 0, f 0 (1) = −2 < 0, f 0 (−1) = −2 < 0.


The sign of f 0 determines the stability of the fixpoints y1 , y2 , y3 : unstable, stable, stable.
The linearized equations:
d d d d d d
(y − 0) = ∆y1 = 1 · ∆y1 , (y − 1) = ∆y2 = −2 · ∆y2 , (y − (−1)) = ∆y3 = −2 · ∆y3 ,
dx dx dx dx dx dx

10. Find the eigenvectors and eigenvalues of A ! Find the similarity transformation S which diagonalize A, i.e. D = S −1 AS
where D is diagonal! Express v as the linear combination of the eigenvectors! Compute A13 v !
         
 3 0 2 0 2 1 0 1 2 −3
a) 7 b) c) d) e) f)
0 2 1 3 0 3 −1 0 3 2
   
2 1 0 2 −3 0
g) 0 3 0 h) 3 2 0
0 0 7 0 0 7

Here v is:
 
  1
3
a) v = (8); b − f) v = ; g − h) v = 2
4
3
.....................................................................................................................
Solution:
b)  
3 0
A=
0 2
Eigenvalues: λ1 = 3, λ2 = 2 ,
eigenvectors:    
1 0
v1 = , v2 =
0 1
     
1 0 3 0 1 0 3 0
D = S −1 AS = =
0 1 0 2 0 1 0 2
As A is a diagonal matrix, these results are trivial.
.....................................................................................................................
d)  
2 1
A=
0 3

Charactristic equations for the eignvalues:



2−λ 1
det(A − λE) = = (2 − λ)(3 − λ) − 1 · 0 = 0
0 3−λ

Eigenvalues: λ1 = 3, λ2 = 2 .

Eigenvectors (for λ1 = 3):


         
2 1 x x 2−3 1 x 0
=3 , vagy =
0 3 y y 0 3−3 y 0
   
x x
So = . Choose a nonzero vector, eg. x = 1.
y x
Eigenvectors:    
1 1
v1 = , v2 =
1 0
The similarity transformation that diagonalize A:
     
−1 0 1 2 1 1 1 3 0
D = S AS = =
1 −1 0 3 1 0 0 2

Here S consists of the v1 and v2 column vectors.

How much is A13 v ?


313
    
13 −1 13 13 −1 1 1 0 0 1 3
A v = (SDS ) v = SD S v=
1 0 0 213 1 −1 4
or  
3
= αv1 + βv2 ,
4
where         
α −1 3 0 1 3 4
=S = = ,
β 4 1 −1 4 −1
consequently    
13 13 1 1
A v = A (αv1 + βv2 ) = αλ13
1 v1 + βλ13
2 v2 =4·3 13
+ (−1) · 2 13
1 0
.....................................................................................................................
f)  
2 −3
A=
3 2

Eigenvalues: λ1 = 2 + 3i, λ2 = 2 − 3i ,
Eigenvectors:    
i −i
v1 = , v2 =
1 1
− 2i 1
     
−1 2 2 −3 i −i 2 + 3i 0
D=S AS = i 1 =
2 2
3 2 1 1 0 2 − 3i
.....................................................................................................................
g) As A is the union of the d) and a) blocks, we get that
 
2 1 0
A= 0 3 0 
0 0 7
Eigenvalues: λ1 = 3, λ2 = 2, λ3 = 7, ,
Eigenvectors:      
1 1 0
v1 =  1  , v2 =  0  , v3 =  0 
0 0 1
     
0 1 0 2 1 0 1 1 0 3 0 0
D = S −1 AS =  1 −1 0   0 3 0   1 0 0 = 0 2 0 
0 0 1 0 0 7 0 0 1 0 0 7

11. Solve the following DE for the A matrices of the previous exercises!
d
y = Ay, y(0) = v
dx
Write down the general and the particular solutions.
Compute exp(xA) ! Express the particular solution with the help of exp(xA) ! Study the stability of the y = 0 fixpoint!
.....................................................................................................................
Solution:
d)  
2 1
A=
0 3
Eigenvalues: λ1 = 3, λ2 = 2 . Eigenvectors:
   
1 1
v1 = , v2 =
1 0

The general solution:    


X
λi x 3x 1 2x 1
yalt (x) = Ci e vi = C 1 e + C2 e
1 0
i

If        
y1 (0) 3 1 1
y(0) = = =4 + (−1) ,
y2 (0) 4 1 0
then the particular slution is    
1 1
ypart (x) = 4e3x + (−1)e2x
1 0
As the real parts of the eigenvalues are positive, the y = 0 fixpoint is unstable.
   3x  
xA xSDS −1 xD −1 1 1 e 0 0 1
e =e = Se S =
1 0 0 e2x 1 −1

So the particular solution is  


3
ypart (x) = exA .
4

12. y 00 = −y. Write down the characteristic equation and the general solution of the DE! Write the DE as a first order
sysyte, solve it and compare the solutions!
Solution:
.....................................................................................................................
The characteristic equation:

y 00 = −y =⇒ λ2 = −1 =⇒ λ1 = 0 + 1 · i, λ2 = 0 − 1 · i,

general solution:
 
y = C1 e(0+i)x + C2 e(0−i)x = e0·x Cf1 cos (1 · x) + C
f2 sin (1 · x)

Here C1 = C
f1 /2 + C f1 /2 − C
f2 /(2i), C2 = C f2 /(2i).
.....................................................................................................................
First order DE system:       
y 0 1 y y
= =A
v −1 0 v v
Eigenvalues and eigenvectors of A:
   
1 1
λ1 = i, v1 = , λ1 = −i, v1 =
i −i

General solution:
     
y 1 1
= C1 eix + C2 e−ix
v i −i

13. Find the eigenvalues and eigenvectors of A !


 
      7 0 0
0 1 2 1 2 3
a) b) c) d) 0 2 3
0 0 0 2 0 2
0 0 2

Compute exp(xA) !
.....................................................................................................................
Solution:
c)
Eigenvalue:
2 − λ 3
0 = det(A − λE) = =⇒ λ1 = 2.
0 2 − λ
The only eigenvector:
          
2 3 x x x x 1
=2 =⇒ = , vagyis v1 =
0 2 y y y 0 0

exp (xA) :
       
2x 0 0 3x 2x 0 0 3x
exp (xA) = exp + = exp · exp
0 2x 0 0 0 2x 0 0
 2x  " 2 #  2x   2x
3xe2x
     
e 0 1 0 0 3x 1 0 3x e 0 1 3x e
= + + + ··· = =
0 e2x 0 1 0 0 2! 0 0 0 e2x 0 1 0 e2x

The first, exp(C + D) = exp(C) · exp(D) type rewriting is possibble since [C, D] = CD − DC = 0 :
 2x      2x   
e 0 0 3x 0 3x e 0 0 0
− = =0
0 e2x 0 0 0 0 0 e2x 0 0

At last we used that  2  2  


0 3x 0 1 0 0
= (3x)2 = =0
0 0 0 0 0 0

14. Solve the following DE for the A matrices of the previous exercise
d
y = Ay, y(0) = v
dx
write down the particular solution with the help of exA , if v is:
 
  1
3
a − c) v = ; d) v = 2
4
3
.....................................................................................................................
Solution:
c)
    2x
3xe2x
   
2 3 3 e 3
ypart (x) = exA y(0) = exp x =
0 2 4 0 e2x 4
15. Damped oscillator: y 00 = −y − ky 0 . Find the general solution! How much is k if the char.eq. has only one solution?
In that case write the DE as a first order system, and study the coefficient matrix’ Jordan normal form.
.....................................................................................................................
Solution:
Char.eq.: √
−k ± k2 − 4
y 00 = −y − ky 0 =⇒ λ2 = −1 − kλ =⇒ λ1,2 =
2
There is only one root, if k = ±2. We stick to the k = 2 case, so λ = −1.
General solution:
yalt = C1 e−x + C2 xe−x .

The same as a first order system:


      
y 0 1 y y
= =A
v −1 −2 v v

A’s eigenvectors and eigenvalues:  


−1
λ = −1, v1 =
1
Jordan normal form:

Av1 = λv1 ,
Av2 = λv2 + v1
tehat
     
−1 −1 −1 −1
v1 = , v2 = , S= ,
1 0 1 0
 
−1 1
J = S −1 AS =
0 −1

So
e−x xe−x
 
exp(xA) = exp(xSJS −1 ) = S exp(xJ)S −1 = S S −1
0 e−x

16. y 00 = y − y 3 . introduce p = y 0 . Show that the DE can be written in the following Hamiltonian form:
∂H ∂H
y0 = , p0 = − .
∂p ∂y

Compute H ! Show that H 0 = 0 !


Write the DE as a first order system, find its fixed points, write down the linearized DE around the fixed points and
study the stability of the fixed points!
.....................................................................................................................
Solution:

∂H p2
y0 = p = =⇒ H(y, p) = + h(y),
∂p 2
∂H p2 y4 y2
p0 = y 00 = y − y 3 = − =⇒ H= + −
∂y 2 4 2

H 0 = pp0 + y 3 y 0 − yy 0 = p(y − y 3 ) + (y − y 3 )y 0 = p(y − y 3 ) + (y − y 3 )p = 0

The first order DE system:

   
d y p
=
dx p y − y3

Equilibrium states (fixedpoints):


           
0 d y p 0 1 −1
= = =⇒ y1 = , y2 = , y3 = ,
0 dx p y − y3 0 0 0
A Jacobi matrix:
!
∂ ∂  
∂y p ∂p p 0 1
J= =

∂y (y − y3 ) ∂
∂p (y − y3 ) 1 − 3y 2 0

The values of the Jacobian at the fixedpoints:


     
0 1 0 1 0 1
J(y1 ) = , J(y2 ) = , J(y3 ) =
1 0 −2 0 −2 0
The eigenvalues of the matrices:
√ √ √ √
y1 : (1, −1), y2 : (0 − 2i, 0 + 2i), y3 : (0 − 2i, 0 + 2i).
Mivel
y1 : −1 < 0 < 1 =⇒ y1 saddle point, unstable
√ √
y2,3 : <(0 ± 2i) = 0, =(0 ± 2i) 6= 0 =⇒ y2,3 center, stable,
The linearized DE around for example around y2 :
      
d y−1 d ∆y 0 1 ∆y
= =
dx p − 0 dx ∆p −2 0 ∆p

The first row shows the velocity field and solution curves of the DE. The first figure of the second row presents the
solution curves of the nonlinear DE around the y2 fixedpoint, while the second (almost identical) figure presents the
solution curves of the linearized DE.
17. Write down the Euler-Lagrange equations for the Lagrangians L and M !

(y 0 )2 − y 2 , y 0 + 8, (y 0 )2 + y 0 , L = (y 0 )4 + (y − 1)2 ,
M = (y10 )2 + (y20 )2 /2 − V (y1 , y2 ),


(y10 )2 + (y20 )2 /2 + A1 (y1 , y2 )y10 + A2 (y1 , y2 )y20




Solution:
L:
∂L ∂L
= 2(y − 1), = 4(y 0 )3 ,
∂y ∂y 0
d
4(y 0 )3 − 2(y − 1) = 0.

dx
M:
∂M ∂M ∂M ∂V ∂M ∂V
0 = y10 , 0 = y20 , =− , =− ,
∂y1 ∂y2 ∂y1 ∂y1 ∂y2 ∂y2
d 0 ∂V d 0 ∂V
y − (− ) = 0, y − (− ) = 0,
dx 1 ∂y1 dx 2 ∂y2
vagy
∂V ∂V
y100 = − , y200 = −
∂y1 ∂y2
R1
18. Let S[u] = 0 (y 0 (x))4 + xy(x) dx where u is defined on [0, 1] and vanishes at the endpoints. Let V be defined on
[0, 1], assume that it vanishes at the endpoints and is continuous. Assume also that elements of V are piecewise
affine on the [0, 1/3], [1/3, 2/3], [2/3, 1] intervals. Let φ1 and φ2 be a basis of V , such that φ1 (1/3) = φ2 (2/3) = 1
and φ2 (1/3) = φ1 (2/3) = 0. Let uh = c1 φ1 + c2 φ2 . Compute the S[uh ] = s(c1 , c2 ) two variable function! (For the
computation of the xy(x) term in the integral use some approximate method!)
Solution:

S[uh ]
" #
1 1 1
≈ (3c1 ) · + (3(c2 − c1 ))4 · + (−3c2 )4 ·
4
3 3 3
" #
1 1  1 11 2  1 12  1
+ 0 · 0 + · c1 · + · c1 + · c2 · + · c2 + 1 · 0 ·
2 3 3 2 3 3 3 2 3 3

Você também pode gostar