Title | Exercises Week 20 - ODEs IVP BVP solutions 2 |
---|---|
Course | Engineering Mathematics and Programming |
Institution | Brunel University London |
Pages | 10 |
File Size | 233.8 KB |
File Type | |
Total Downloads | 38 |
Total Views | 144 |
workshop solutions...
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
Engineering Mathematics [Ordinary Differential Equations II - solutions]
Brunel University London
Page 1
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
1. Solve the initial value problems a.
𝑑2𝑓
𝑑𝑥 2
+ 1000𝑓 = 2000 and 𝑓(0) = 2,
𝑑𝑓 | 𝑑𝑥 𝑥=0
=0
SOLUTION: This is a non-homogeneous equation and the general solution is the sum of the solution of the homogeneous form and a partial solution. First we solve the homogeneous form. We assume solutions of the form 𝑓0 (𝑥) = 𝐶𝑒 𝜆𝑥 . Substituting in the differential equation we get 𝐶𝜆2 𝑒 𝜆𝑥 + 1000𝐶𝑒 𝜆𝑥 = 0 which results to the polynomial
𝜆2 + 1000 = 0
This polynomial has two imaginary roots, 𝜆1 = √1000𝑖 and 𝜆2 = −√1000𝑖, hence the solution of the homogeneous form is 𝑓0 (𝑥) = 𝐶1 cos(√1000𝑥) + 𝐶2 sin(√1000𝑥) By simple inspection, a partial solution that satisfies the non-homogeneous form is 𝑓𝑝 (𝑥) = 2 Brunel University London
Page 2
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
The general solution then is 𝑓(𝑥) = 𝑓0 (𝑥) + 𝑓𝑝 (𝑥) = 𝐶1 cos(√1000𝑥) + 𝐶2 sin(√1000𝑥) + 2 To calculate constants 𝐶1 and 𝐶2 we use the initial conditions. It is 𝑓(0) = 𝐶1 cos(√1000 ∙ 0) + 𝐶2 sin(√1000 ∙ 0) + 2 = 𝐶1 + 0 + 2 But from the initial condition, it is specified that (0) = 2 . Hence it is 𝐶1 = 0 The solution then is 𝑓(𝑥) = 𝐶2 sin(√1000𝑥) + 2
Its derivative is
𝑑𝑓 = 𝐶2 √1000 cos(√1000𝑥) 𝑑𝑥 Since the second boundary condition is
𝑑𝑓
|
𝑑𝑥 𝑥=0
= 0, we have
𝐶2 √1000 cos(√1000 ∙ 0) = 𝐶2 √1000 = 0
Brunel University London
Page 3
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
which implies that 𝐶2 = 0. Finally, the solution of the initial value problem is 𝑓(𝑥) = 2 b.
𝑑𝑓
𝑑𝑥
+ 𝑓cos(2𝑥 + 𝜋) = 0 and 𝑓(0) = 12
SOLUTION: This equation can be solved with the splitting variable technique. It is 𝑑𝑓 = −cos(2𝑥 + 𝜋)𝑑𝑥 𝑓
and ∫
𝑑𝑓 = − ∫ cos(2𝑥 + 𝜋)𝑑𝑥 + 𝐶 𝑓
1
The integral of is ln|𝑓| and the integral of cos(2𝑥 + 𝜋) is 𝑓 1
or 𝑓(𝑥) = ±𝑒 −2
Brunel University London
𝑠𝑖𝑛(2𝑥+𝜋)+𝐶
ln|𝑓| = −
1
2
𝑠𝑖𝑛(2𝑥 + 𝜋). It is then
1 𝑠𝑖𝑛(2𝑥 + 𝜋) + 𝐶 2
Page 4
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
REMARK: Note that the ± sign has only to do with the fact that the logarithm is defined for positive arguments and can be incorporated in the integration constant. As the initial value is positive, since we have an exponential solution, the ‘ − ’ sign can be ignored. 1
It is 𝑓(0) = ±𝑒 −2
𝑠𝑖𝑛(2∙0+𝜋)+𝐶
= ±𝑒 𝐶 = 12. Only the ‘ + ’ sign needs to be taken into account, and thus 𝐶 = ln(12).
2. Solve the boundary value problems a.
𝑑2𝑓 𝑑𝑥 2
− 1.25𝑓 = 5𝑥 2 + 3𝑥 + 1 and 𝑓(0) = 1,
𝑑𝑓
|
𝑑𝑥 𝑥=1
=1
SOLUTION: This is a non-homogeneous equation and the general solution is the sum of the solution of the homogeneous form and a partial solution. First we solve the homogeneous form. We assume solutions of the form 𝑓0 (𝑥) = 𝐶𝑒 𝜆𝑥 . Substituting in the differential equation we get 𝐶𝜆2 𝑒 𝜆𝑥 − 1.25𝐶𝑒 𝜆𝑥 = 0 which results to the polynomial
𝜆2 − 1.25 = 0
This polynomial has two real roots, 𝜆1 = √1.25 and 𝜆2 = −√1.25, hence the solution of the homogeneous form is Brunel University London
Page 5
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
𝑓0 (𝑥) = 𝐶1 𝑒 √1.25𝑥 + 𝐶2 𝑒 −√1.25𝑥 For the partial solution, we assume the form
Substituting in the differential equation it is
𝑓𝑝 (𝑥) = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐
2𝑎 − 1.25(𝑎𝑥 2 + 𝑏𝑥 + 𝑐) = 5𝑥 2 + 3𝑥 + 1 which can be written as −1.25𝑎𝑥 2 − 1.25𝑏𝑥 + 2𝑎 − 1.25𝑐 = 5𝑥 2 + 3𝑥 + 1 Equating the coefficients of the same powers of 𝑥 as they appear on the left and right hand side of the above equations, it must be −1.25𝑎 = 5, which means 𝑎 = −4 −1.25𝑏 = 3, which means 𝑏 = −2.4 and 2𝑎 − 1.25𝑐 = 1 which implies, since 𝑎 = −4, that −1.25𝑐 = 9 and 𝑐 = −7.2 The general solution then is Brunel University London
Page 6
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
𝑓(𝑥) = 𝑓0 (𝑥) + 𝑓𝑝 (𝑥) = 𝐶1 𝑒 √1.25𝑥 + 𝐶2 𝑒 −√1.25𝑥 − 4𝑥 2 − 2.4𝑥 − 7.2 To calculate constants 𝐶1 and 𝐶2 we use the boundary conditions. It is 𝑓(0) = 𝐶1 + 𝐶2 − 7.2 = 1 and 𝑑𝑓 | = 𝐶1 √1.25𝑒 √1.25 − √1.25𝐶2 𝑒 −√1.25 − 8 − 2.4 = 1 𝑑𝑥 𝑥=1 We thus have the system of simultaneous equations 𝐶1 + 𝐶2 = 8.2 𝐶1 𝑒 √1.25 − 𝐶2 𝑒 −√1.25 =
11.4
√1.25
to determine the constants 𝐶1 , 𝐶2 . (Solve this system using e.g. Cramer’s method or substitution to find 𝐶1 and 𝐶2 )
b. Find the general solution of the differential equation
Brunel University London
Page 7
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
𝑑2 𝑓 + 49𝑓(𝑥) = 2𝑥 2 𝑑𝑥 2
That satisfies 𝑓(0) = 1, 𝑓(2) = 3.
SOLUTION: This is a non-homogeneous equation and the general solution is the sum of the solution of the homogeneous form and a partial solution. First we solve the homogeneous form. We assume solutions of the form 𝑓0 (𝑥) = 𝐶𝑒 𝜆𝑥 . Substituting in the differential equation we get 𝐶𝜆2 𝑒 𝜆𝑥 + 49𝐶𝑒 𝜆𝑥 = 0 which results to the polynomial
𝜆2 + 49 = 0
This polynomial has two imaginary roots, 𝜆1 = 7𝑖 and 𝜆2 = −7𝑖, hence the solution of the homogeneous form is 𝑓0 (𝑥) = 𝐶1 cos(7𝑥) + 𝐶2 sin(7𝑥) For the partial solution, we assume the form
Substituting in the differential equation it is
Brunel University London
𝑓𝑝 (𝑥) = 𝑎𝑥 2 + 𝑏𝑥 + 𝑐
Page 8
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
2𝑎 + 49(𝑎𝑥 2 + 𝑏𝑥 + 𝑐) = 2𝑥 2 which can be written as 49𝑎𝑥 2 + 49𝑏𝑥 + 2𝑎 + 49𝑐 = 2𝑥 2 Equating the coefficients of the same powers of 𝑥 as they appear on the left and right hand side of the above equations, it must be 49𝑎 = 2, which means 𝑎 =
2 49
49𝑏 = 0, which means 𝑏 = 0and
2𝑎 + 49𝑐 = 0 which implies, since 𝑎 = The general solution then is
2
, that 𝑐 = −
49
4
492
𝑓(𝑥) = 𝑓0 (𝑥) + 𝑓𝑝 (𝑥) = 𝐶1 cos(7𝑥) + 𝐶2 sin(7𝑥) +
2 2 4 𝑥 − 2 49 49
To calculate constants 𝐶1 and 𝐶2 we use the boundary conditions. It is 4
𝑓(0) = 𝐶1 − 492 = 1 and Brunel University London
Page 9
BE1601
ENGINEERING MATHEMATICS AND PROGRAMMING
𝑓(2) = 𝐶1 cos(14) + 𝐶2 sin(14) +
2
49
22 −
4 =3 492
Use these two equations to find the constants.
Brunel University London
Page 10...