Examen 20181-1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

5.

1 The Elementary Theory of Initial-Value Problems 265

2. Show that each of the following initial-value problems has a unique solution and find the solution.
Can Theorem 5.4 be applied in each case?
a. y = et−y , 0 ≤ t ≤ 1, y(0) = 1.
b. y = t −2 (sin 2t − 2ty), 1 ≤ t ≤ 2, y(1) = 2.
c. y = −y + ty1/2 , 2 ≤ t ≤ 3, y(2) = 2.
ty + y
d. y = , 2 ≤ t ≤ 4, y(2) = 4.
ty + t
3. For each choice of f (t, y) given in parts (a)–(d):
i. Does f satisfy a Lipschitz condition on D = {(t, y) | 0 ≤ t ≤ 1, −∞ < y < ∞}?
ii. Can Theorem 5.6 be used to show that the initial-value problem

y = f (t, y), 0 ≤ t ≤ 1, y(0) = 1,

is well-posed?
4t
a. f (t, y) = t 2 y + 1 b. f (t, y) = ty c. f (t, y) = 1 − y d. f (t, y) = −ty +
y
4. For each choice of f (t, y) given in parts (a)–(d):
i. Does f satisfy a Lipschitz condition on D = {(t, y) | 0 ≤ t ≤ 1, −∞ < y < ∞}?
ii. Can Theorem 5.6 be used to show that the initial-value problem

y = f (t, y), 0 ≤ t ≤ 1, y(0) = 1,

is well-posed?
1+y y2
a. f (t, y) = et−y b. c. f (t, y) = cos(yt) d. f (t, y) =
f (t, y) =
1+t 1+t
5. For the following initial-value problems, show that the given equation implicitly defines a solution.
Approximate y(2) using Newton’s method.
y3 + y
a. y = − , 1 ≤ t ≤ 2, y(1) = 1; y3 t + yt = 2
(3y2 + 1)t
y cos t + 2tey
b. y = − , 1 ≤ t ≤ 2, y(1) = 0; y sin t + t 2 ey + 2y = 1
sin t + t 2 ey + 2
6. Prove Theorem 5.3 by applying the Mean Value Theorem 1,8 to f (t, y), holding t fixed.
7. Show that, for any constants a and b, the set D = {(t, y) | a ≤ t ≤ b, −∞ < y < ∞} is convex.
8. Suppose the perturbation δ(t) is proportional to t, that is, δ(t) = δt for some constant δ. Show directly
that the following initial-value problems are well-posed.
a. y = 1 − y, 0 ≤ t ≤ 2, y(0) = 0
b. y = t + y, 0 ≤ t ≤ 2, y(0) = −1
2
c. y = y + t 2 et , 1 ≤ t ≤ 2, y(1) = 0
t
2 √
d. y = − y + t 2 et , 1 ≤ t ≤ 2, y(1) = 2e
t
9. Picard’s method for solving the initial-value problem

y = f (t, y), a ≤ t ≤ b, y(a) = α,

is described as follows: Let y0 (t) = α for each t in [a, b]. Define a sequence {yk (t)} of functions by
 t
yk (t) = α + f (τ , yk−1 (τ )) dτ , k = 1, 2, . . . .
a


a. Integrate y = f (t, y(t)), and use the initial condition to derive Picard’s method.
b. Generate y0 (t), y1 (t), y2 (t), and y3 (t) for the initial-value problem

y = −y + t + 1, 0 ≤ t ≤ 1, y(0) = 1.

c. Compare the result in part (b) to the Maclaurin series of the actual solution y(t) = t + e−t .

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
266 CHAPTER 5 Initial-Value Problems for Ordinary Differential Equations

5.2 Euler’s Method


Euler’s method is the most elementary approximation technique for solving initial-value
problems. Although it is seldom used in practice, the simplicity of its derivation can be
used to illustrate the techniques involved in the construction of some of the more advanced
techniques, without the cumbersome algebra that accompanies these constructions.
The object of Euler’s method is to obtain approximations to the well-posed initial-value
problem

dy
= f (t, y), a ≤ t ≤ b, y(a) = α. (5.6)
dt

A continuous approximation to the solution y(t) will not be obtained; instead, approx-
imations to y will be generated at various values, called mesh points, in the interval [a, b].
Once the approximate solution is obtained at the points, the approximate solution at other
points in the interval can be found by interpolation.
We first make the stipulation that the mesh points are equally distributed throughout
the interval [a, b]. This condition is ensured by choosing a positive integer N and selecting
the mesh points

ti = a + ih, for each i = 0, 1, 2, . . . , N.

The common distance between the points h = (b − a)/N = ti+1 − ti is called the step size.
The use of elementary difference We will use Taylor’s Theorem to derive Euler’s method. Suppose that y(t), the unique
methods to approximate the solution to (5.6), has two continuous derivatives on [a, b], so that for each i = 0, 1, 2, . . . ,
solution to differential equations N − 1,
was one of the numerous
mathematical topics that was first (ti+1 − ti )2 
presented to the mathematical y(ti+1 ) = y(ti ) + (ti+1 − ti )y (ti ) + y (ξi ),
2
public by the most prolific of
mathematicians, Leonhard Euler for some number ξi in (ti , ti+1 ). Because h = ti+1 − ti , we have
(1707–1783).

h2 
y(ti+1 ) = y(ti ) + hy (ti ) + y (ξi ),
2
and, because y(t) satisfies the differential equation (5.6),

h2 
y(ti+1 ) = y(ti ) + hf (ti , y(ti )) + y (ξi ). (5.7)
2
Euler’s method constructs wi ≈ y(ti ), for each i = 1, 2, . . . , N, by deleting the remain-
der term. Thus Euler’s method is

w0 = α,
wi+1 = wi + hf (ti , wi ), for each i = 0, 1, . . . , N − 1. (5.8)

Illustration In Example 1 we will use an algorithm for Euler’s method to approximate the solution to

y = y − t 2 + 1, 0 ≤ t ≤ 2, y(0) = 0.5,

at t = 2. Here we will simply illustrate the steps in the technique when we have h = 0.5.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
5.2 Euler’s Method 273

is not used to calculate the approximation to the solution yi at a mesh point ti . We use instead
an equation of the form

u0 = α + δ0 ,
ui+1 = ui + hf (ti , ui ) + δi+1 , for each i = 0, 1, . . . , N − 1, (5.11)

where δi denotes the round-off error associated with ui . Using methods similar to those in
the proof of Theorem 5.9, we can produce an error bound for the finite-digit approximations
to yi given by Euler’s method.

Theorem 5.10 Let y(t) denote the unique solution to the initial-value problem

y = f (t, y), a ≤ t ≤ b, y(a) = α (5.12)

and u0 , u1 , . . . , uN be the approximations obtained using (5.11). If |δi | < δ for each
i = 0, 1, . . . , N and the hypotheses of Theorem 5.9 hold for (5.12), then

1 hM δ
| y(ti ) − ui | ≤ + [eL(ti −a) − 1] + |δ0 |eL(ti −a) , (5.13)
L 2 h
for each i = 0, 1, . . . , N.

The error bound (5.13) is no longer linear in h. In fact, since



hM δ
lim + = ∞,
h→0 2 h
the error would be expected to become large for sufficiently small values of h. Calculus can
be used to determine a lower bound for the step size h. Letting E(h) = (hM/2) + (δ/h)
implies that E  (h) = (M/2) − (δ/h2 ).

If h < 2δ/M, then E  (h) < 0 and E(h) is decreasing.

If h > 2δ/M, then E  (h) > 0 and E(h) is increasing.

The minimal value of E(h) occurs when




h= . (5.14)
M
Decreasing h beyond this value tends to increase the total error in the approximation.
Normally, however, the value of δ is sufficiently small that this lower bound for h does not
affect the operation of Euler’s method.

E X E R C I S E S E T 5.2
1. Use Euler’s method to approximate the solutions for each of the following initial-value problems.
a. y = te3t − 2y, 0 ≤ t ≤ 1, y(0) = 0, with h = 0.5
b. y = 1 + (t − y)2 , 2 ≤ t ≤ 3, y(2) = 1, with h = 0.5
c. y = 1 + y/t, 1 ≤ t ≤ 2, y(1) = 2, with h = 0.25
d. y = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
5.3 Higher-Order Taylor Methods 281

Taylor’s methods are options within the Maple command InitialValueProblem. The
form and output for Taylor’s methods are the same as available under Euler’s method, as
discussed in Section 5.1. To obtain Taylor’s method of order 2 for the problem in Example 1,
first load the package and the differential equation.
with(Student[NumericalAnalysis]) : deq := diff(y(t), t) = y(t) − t 2 + 1
Then issue
C := InitialValueProblem(deq, y(0) = 0.5, t = 2, method = taylor, order = 2,
numsteps = 10, output = information, digits = 8)
Maple responds with an array of data similar to that produced with Euler’s method. Double
clicking on the output will bring up a table that gives the values of ti , actual solution values
y(ti ), the Taylor approximations wi , and the absolute errors | y(ti ) − wi |. These agree with
the values in Table 5.3.
To print the table issue the commands
for k from 1 to 12 do
print(C[k, 1], C[k, 2], C[k, 3], C[k, 4])
end do

E X E R C I S E S E T 5.3
1. Use Taylor’s method of order two to approximate the solutions for each of the following initial-value
problems.
a. y = te3t − 2y, 0 ≤ t ≤ 1, y(0) = 0, with h = 0.5
b. y = 1 + (t − y)2 , 2 ≤ t ≤ 3, y(2) = 1, with h = 0.5
c. y = 1 + y/t, 1 ≤ t ≤ 2, y(1) = 2, with h = 0.25
d. y = cos 2t + sin 3t, 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25
2. Use Taylor’s method of order two to approximate the solutions for each of the following initial-value
problems.
a. y = et−y , 0 ≤ t ≤ 1, y(0) = 1, with h = 0.5
1+t
b. y = , 1 ≤ t ≤ 2, y(1) = 2, with h = 0.5
1+y
c. y = −y + ty1/2 , 2 ≤ t ≤ 3, y(2) = 2, with h = 0.25
d. y = t −2 (sin 2t − 2ty), 1 ≤ t ≤ 2, y(1) = 2, with h = 0.25
3. Repeat Exercise 1 using Taylor’s method of order four.
4. Repeat Exercise 2 using Taylor’s method of order four.
5. Use Taylor’s method of order two to approximate the solution for each of the following initial-value
problems.
a. y = y/t − (y/t)2 , 1 ≤ t ≤ 1.2, y(1) = 1, with h = 0.1
b. y = sin t + e−t , 0 ≤ t ≤ 1, y(0) = 0, with h = 0.5
c. y = (y2 + y)/t, 1 ≤ t ≤ 3, y(1) = −2, with h = 0.5
d. y = −ty + 4ty−1 , 0 ≤ t ≤ 1, y(0) = 1, with h = 0.25
6. Use Taylor’s method of order two to approximate the solution for each of the following initial-value
problems.
2 − 2ty
a. y = 2 , 0 ≤ t ≤ 1, y(0) = 1, with h = 0.1
t +1
y2
b. y = , 1 ≤ t ≤ 2, y(1) = −(ln 2)−1 , with h = 0.1
1+t

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
11.1 The Linear Shooting Method 677

Reducing Round-Off Error


Round-off problems can occur if y1 (x) rapidly increases as x goes from a to b. In this
case u1,N ≈ y1 (b) will be large and if β is small in magnitude compared to u1,N , the term
w2,0 = (β − u1,N )/v1,N will be approximately −u1,N /v1,N . The computations in Step 6 then
become
 
u1,N
W 1 = u1,i + w2,0 v1,i ≈ u1,i − v1,i ,
v1,N
 
u1,N
W 2 = u2,i + w2,0 v2,i ≈ u2,i − v2,i ,
v1,N
which allows a possibility of a loss of significant digits due to cancelation. However, because
u1,i is an approximation to y1 (xi ), the behavior of y1 can easily be monitored, and if u1,i
increases rapidly from a to b, the shooting technique can be employed backward from
x0 = b to xN = a. This changes the initial-value problems that need to be solved to

y =p(x)y + q(x)y + r(x), for a ≤ x ≤ b, with y(b) = α and y (b) = 0,

and

y =p(x)y + q(x)y, for a ≤ x ≤ b, with y(b) = 0 and y (b) = 1.

If this reverse shooting technique still gives cancellation of significant digits and if increased
precision does not yield greater accuracy, other techniques must be used. Some of these are
presented later in this chapter. In general, however, if u1,i and v1,i are O(hn ) approximations
to y1 (xi ) and y2 (xi ), respectively, for each i = 0, 1, . . . , N, then w1,i will be an O(hn )
approximation to y(xi ). In particular,
 

n v1,i 
|w1,i − y(xi )| ≤ Kh 1 + ,
v1,N 
for some constant K (see [IK], p. 426).

E X E R C I S E S E T 11.1
1. The boundary-value problem

y = 4(y − x), 0 ≤ x ≤ 1, y(0) = 0, y(1) = 2,

has the solution y(x) = e2 (e4 − 1)−1 (e2x − e−2x ) + x. Use the Linear Shooting method to approximate
the solution, and compare the results to the actual solution.
a. With h = 21 ; b. With h = 41 .
2. The boundary-value problem
π 
y = y + 2y + cos x, 0≤x≤ π
2
, y(0) = −0.3, y 2
= −0.1

has the solution y(x) = − 101 (sin x + 3 cos x). Use the Linear Shooting method to approximate the
solution, and compare the results to the actual solution.
a. With h = π4 ; b. With h = π8 .
3. Use the Linear Shooting method to approximate the solution to the following boundary-value
problems.
a. y = −3y + 2y + 2x + 3, 0 ≤ x ≤ 1, y(0) = 2, y(1) = 1; use h = 0.1.
b. y = −4x −1 y − 2x −2 y + 2x −2 ln x, 1 ≤ x ≤ 2, y(1) = − 21 , y(2) = ln 2; use h = 0.05.

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
678 C H A P T E R 11 Boundary-Value Problems for Ordinary Differential Equations

c. y = −(x + 1)y + 2y + (1 − x 2 )e−x , 0 ≤ x ≤ 1, y(0) = −1, y(1) = 0; use h = 0.1.


d. y = x−1y + 3x −2 y + x −1 ln x − 1, 1 ≤ x ≤ 2, y(1) = y(2) = 0; use h = 0.1.
4. Although q(x) < 0 in the following boundary-value problems, unique solutions exist and are given.
Use the Linear Shooting Algorithm to approximate the solutions to the following problems, and
compare the results to the actual solutions.
a. y + y = 0, 0 ≤ x ≤ π4 , y(0) = 1, y( π4 ) = 1; use h = 20 π
; actual solution y(x) =

cos x + ( 2 − 1) sin x.
b. y + 4y = cos x, 0 ≤ x ≤ π4 , y(0) = 0, y( π4 ) = 0; use h = 20
π
; actual solution y(x) =

− 13 cos 2x − 62 sin 2x + 13 cos x.
c. y = −4x −1 y − 2x −2 y + 2x −2 ln x, 1 ≤ x ≤ 2, y(1) = 21 , y(2) = ln 2; use h = 0.05; actual
solution y(x) = 4x −1 − 2x −2 + ln x − 3/2.
d. y = 2y − y + xex − x, 0 ≤ x ≤ 2, y(0) = 0, y(2) = −4; use h = 0.2; actual solution
y(x) = 16 x 3 ex − 53 xex + 2ex − x − 2.
5. Use the Linear Shooting Algorithm to approximate the solution y = e−10x to the boundary-value
problem

y = 100y, 0 ≤ x ≤ 1, y(0) = 1, y(1) = e−10 .

Use h = 0.1 and 0.05.


6. Write the second-order initial-value problems (11.3) and (11.4) as first-order systems, and derive the
equations necessary to solve the systems using the fourth-order Runge-Kutta method for systems.
7. Let u represent the electrostatic potential between two concentric metal spheres of radii R1 and R2
(R1 < R2 ). The potential of the inner sphere is kept constant at V1 volts, and the potential of the
outer sphere is 0 volts. The potential in the region between the two spheres is governed by Laplace’s
equation, which, in this particular application, reduces to
d 2 u 2 du
+ = 0, R1 ≤ r ≤ R2 , u(R1 ) = V1 , u(R2 ) = 0.
dr 2 r dr
Suppose R1 = 2 in., R2 = 4 in., and V1 = 110 volts.
a. Approximate u(3) using the Linear Shooting Algorithm.
b. Compare the results of part (a) with the actual potential u(3), where
 
V1 R1 R2 − r
u(r) = .
r R2 − R1
8. Show that, under the hypothesis of Corollary 11.2, if y2 is the solution to y = p(x)y + q(x)y and
y2 (a) = y2 (b) = 0, then y2 ≡ 0.
9. Consider the boundary-value problem

y + y = 0, 0 ≤ x ≤ b, y(0) = 0, y(b) = B.

Find choices for b and B so that the boundary-value problem has


a. No solution b. Exactly one solution c. Infinitely many solutions.
10. Attempt to apply Exercise 9 to the boundary-value problem

y − y = 0, 0 ≤ x ≤ b, y(0) = 0, y(b) = B.

What happens? How do both problems relate to Corollary 11.2?

11.2 The Shooting Method for Nonlinear Problems


The shooting technique for the nonlinear second-order boundary-value problem
y = f (x, y, y ), for a ≤ x ≤ b, with y(a) = α and y(b) = β, (11.6)

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

You might also like