





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






Using the Forward Euler method,
yn+1 − yn = hyn ⇒ yn+1 = (1 + h) yn (1.a.1)
(1.a.1) is a recurrence relation that determines yn+1 given yn. Starting with y 0 , I use (1.a.1) to determine all subsequent yk,
y 0 = x 0 = 1 y 1 = (1 + h)y 0 = 1 + h y 2 = (1 + h)y 1 = (1 + h)^2... yn = (1 + h)n^ (1.a.2)
Substituting n = N and h = TN into (1.a.2),
yN =
(1.b.1)
I rewrite (1.b.1) using Taylor expansions, which will make it easier to take the limit as N → ∞,
yN = eln
“ (1+^ TN )N^
”
= eN^ ln(1+^
(1.b.2)
I Taylor expand the logarithm,
ln (1 + x) = x −
x^2 + O
x^3
⇒ yN = eN
“ (^) T N −^12 T^
2 N 2 +O(^ 1 N 3 )
”
= eT^ −^
= eT^ · e−^ 12 T N (^2) · eO(^
(1.b.3)
Now I Taylor expand the exponentials in (1.b.3),
ex^ = 1 + x + O(x^2 )
⇒ yN = eT
= eT
(1.b.4)
I use (1.b.4) to form the desired product,
yN − eT^
= N eT
T 2 eT^ + O
(1.b.5)
Taking the limit as N → ∞ of (1.b.5), the O
N
term approaches 0,
Nlim →∞ N^
yN − eT^
T 2 eT^ (1.b.6)
Problem 2
Assuming the given form of z, I compute the derivative,
z = x + ı x˙ (2.a.1) ⇒ z˙ = ˙x + ı¨x (2.a.2)
To write yn in complex polar form, I first write 1 − ıh in polar form, R = | 1 − ıh| =
1 + h^2
θ = tan−^1 −h 1 = tan−^1 −h ⇒ 1 − ıh =
1 + h^2 eı^ tan − (^1) −h
⇒ zn =
1 + h^2
)n 2 eın^ tan − (^1) −h (2.b.3)
To form yN , I take n = N and h = (^) NT in (2.b.3),
zN = RN eıθN^ =
eıN^ tan − (^1) − TN (2.c.1)
I Taylor expand the magnitude and angle of (2.c.1) to determine the error in the approximate solution.
(1 + x)m^ = 1 + mx + O((mx)^2 )
⇒ RN = 1 +
(2.c.2)
tan−^1 x = x −
x^3 + O(x^5 )
⇒ θN = N
⇒ θN + T =
(2.c.3)
Taking the real part of (2.c.1),
xN = RN cos θN =
cos
N tan−^1 −
(2.d.1)
I rewrite (2.d.1) using the Taylor expansions obtained in (2.c.2) and (2.c.3).
xN =
cos
(2.d.2)
I rewrite the cosine term in (2.d.2) using an angle addition formula,
xN =
cos (−T ) ·
cos O
− sin (−T ) · sin
(2.d.3)
I rewrite the trig functions in N that appear in (2.d.3) using the familiar Taylor expansions of the sine and cosine functions. I also use the evenness of the cosine function to write cos −T = cos T ,
cos ζ = 1 + O(ζ^2 ) sin ζ = ζ + O(ζ^3 )
⇒ xN =
cos T
cos T + O
⇒ xN − cos T =
cos T + O
(2.d.4)
Problem 3
To find the local truncation error, I substitute the exact solution x to the differential equation into the difference equation. I first Taylor expand x(t ± h),
x(t ± h) = x(t) + ˙x(t)(±h) + ¨x(t) 2 (±h)^2 + O(h^3 )
= x(t) ± x˙(t)h + x¨(t) 2 h^2 + O
h^3
(3.a.1)
difference equation,
x(t + h) −
x(t − h) −
x(t) =
x(t) + ˙x(t)h + x¨(t) 2 h^2 + O
h^3
x(t) − x˙(t)h + ¨x(t) 2
h^2 + O
h^3
x(t)
x˙(t)h + x¨(t) 4 h^2 + O(h^3 ) (4.a.1)
I use the fact that x(t) is an exact solution to the differential equation to substitute the explicit form of f (t, x(t)) into the right side of the difference equation.
F (t) = ˙x(t) ⇒ F (t − h) = ˙x(t) − x¨(t)h + O(h^2 ) ⇒ 7 F (t) − F (t − h) = 6 ˙x(t) + ¨x(t)h + O(h^2 )
⇒ h 4
(7F (t) − F (t − h)) =
x˙(t)h + x¨(t) 4
h^2 + O(h^3 ) (4.a.2)
The local truncation error is given by the difference of (4.a.1) and (4.a.2),
(4.a.1) − (4.a.2) =
x˙(t)h +
x¨(t) 4 h^2 + O(h^3 )
x˙(t)h + x¨(t) 4 h^2 + O(h^3 )
= O(h^3 ) (4.a.3)
I follow the method of problem 3 part b, assuming an elementary solution of the form of (3.b.1). Substituting into the recurrence relation, taking f ≡ 0,
x(t + h) −
x(t) −
x(t − h) = 0
rt+h^ −
rk^ −
rk−^1 = 0
⇒ r^2 −
r −
⇒ 2 r^2 − r − 1 = 0 (4.b.1)
I solve (4.b.1) for r using the Quadratic Formula,
r =
, 1 (4.b.2)
Since all possible values of r have absolute value less than 1, the solution (3.b.1) is stable ∀k. Hence the iteration method is stable.
Problem 5
To form the difference equation, I make use of the difference of Taylor ex- pansions found in (3.a.2), keeping terms up to fifth order,
x(t + h) − x(t − h) = 2 ˙x(t)h +
x(3)(t)h^3 + O(h^5 )
⇒ a(x(t + h) − x(t − h)) = 2a x˙(t)h +
a 3 x(3)(t)h^3 + O(h^5 ) (5.a.1)
x(t + 2h) − x(t − 2 h) = 4 ˙x(t)h +
x(3)(t)h^3 + O(h^5 ) (5.a.2)
Taking the sum of (5.a.1) and (5.a.2),
(5.a.1) + (5.a.2) = ˙x(t)h (4 + 2a) +
x(3)(t)h^3 (8 + a) + O(h^5 ) (5.a.3)
I use the fact that x(t) is an exact solution to the differential equation to substitute the explicit form of f (t, x(t)) into the the difference equation. The final expression for the local truncation error is,
(5.a.3) − bhf (t, x(t)) = ˙x(t)h (4 + 2a − b)
x(3)(t)h^3 (8 + a) + O(h^5 ) (5.a.4)
To make the local truncation error fifth order in h, I choose a and b such that the coefficients of the first two terms in (5.a.4) are 0,
8 + a = 0 ⇒ a = − 8 (5.a.5) 4 + 2a − b = 0 ⇒ b = − 12 (5.a.6)