Docsity

Numerical Methods for Differential Equations - Solved Problem Set 6 | MATH 4820, Assignments of Differential Equations

Toggle sidebar
bg1
Math 4820
D. Schwendeman Problem Set 6
Due:
Thursday, 4/1/10
1. Consider the linear system Av=dgenerated by the finite difference equations
vj+1 −2vj+vj−1
h2−p(tj)vj+1 −vj−1
2h−q(tj)vj=r(tj), j = 1, . . . , N −1
where v0=α,vN=β, and p(t), q(t), and r(t) are smooth functions. Show that Ais
nonsingular if q(t)>0 and h≤2/max |p(t)|.
2. Consider the linear boundary-value problem
t2
3u00 −t
2u0−1
2u=1
t2,1≤t≤2, u(1) = 7
15 , u(2) = 19
30 .
Find a numerical solution of the BVP using the finite-difference approximation discussed in
class. Solve the difference equations using N= 40, 80 and 160 grid cells. Find the global
error E= max |vj−u(tj)|for each case and use this error to verify the order of accuracy of
the approximation. Plot the numerical solution and the exact solution on the same graph
for N= 40.
3. Consider the boundary-value problem
u00 +f(t, u) = 0 a≤t≤b
with boundary conditions u(a) = αand u(b) = β, and where fis a smooth function.
(a) Consider the finite-difference approximation
vj+1 −2vj+vj−1
h2+f(tj, vj) = 0, j = 1, . . . , N −1
with v0=αand vN=β. Find the first two nonzero terms in the expansion of the truncation
error τj.
(b) An alternate finite-difference approximation to the one in (a) is
vj+1 −2vj+vj−1
h2+f(tj+1, vj+1 ) + 10f(tj, vj) + f(tj−1, vj−1)
12 = 0, j = 1, . . . , N −1
with v0=αand vN=β. Determine the order of accuracy of this approximation.
4. Solve the nonlinear BVP
u00 −cosh(u) = 0,−1≤t≤2, u(−1) = 1, u(2) = 3
using the second-order finite-difference approximation in problem 3, part (a) with h= 3/N
and N= 60. Use Newton’s method to solve the nonlinear algebraic equations as discussed
in class. Note that there is always an issue of the starting guess for Newton’s method. For
this case, it is sufficient to assume that vj= 1 + 2(tj+ 1)/3 as a starting guess. Verify that
your implementation of Newton’s method converges quadratically and plot solution.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Numerical Methods for Differential Equations - Solved Problem Set 6 | MATH 4820 and more Assignments Differential Equations in PDF only on Docsity!

Math 4820

D. Schwendeman Problem Set 6

Due: Thursday, 4/1/

  1. Consider the linear system Av = d generated by the finite difference equations

vj+1 − 2 vj + vj− 1 h^2 − p(tj ) vj+1 − vj− 1 2 h − q(tj )vj = r(tj ), j = 1,... , N − 1

where v 0 = α, vN = β, and p(t), q(t), and r(t) are smooth functions. Show that A is nonsingular if q(t) > 0 and h ≤ 2 / max |p(t)|.

  1. Consider the linear boundary-value problem

t^2 3

u′′^ − t 2

u′^ −

u =

t^2

, 1 ≤ t ≤ 2 , u(1) =

, u(2) =

Find a numerical solution of the BVP using the finite-difference approximation discussed in class. Solve the difference equations using N = 40, 80 and 160 grid cells. Find the global error E = max |vj − u(tj )| for each case and use this error to verify the order of accuracy of the approximation. Plot the numerical solution and the exact solution on the same graph for N = 40.

  1. Consider the boundary-value problem

u′′^ + f (t, u) = 0 a ≤ t ≤ b

with boundary conditions u(a) = α and u(b) = β, and where f is a smooth function.

(a) Consider the finite-difference approximation

vj+1 − 2 vj + vj− 1 h^2

  • f (tj , vj ) = 0, j = 1,... , N − 1

with v 0 = α and vN = β. Find the first two nonzero terms in the expansion of the truncation error τj.

(b) An alternate finite-difference approximation to the one in (a) is

vj+1 − 2 vj + vj− 1 h^2

f (tj+1, vj+1) + 10f (tj , vj ) + f (tj− 1 , vj− 1 ) 12 = 0, j = 1,... , N − 1

with v 0 = α and vN = β. Determine the order of accuracy of this approximation.

  1. Solve the nonlinear BVP

u′′^ − cosh(u) = 0, − 1 ≤ t ≤ 2 , u(−1) = 1, u(2) = 3

using the second-order finite-difference approximation in problem 3, part (a) with h = 3/N and N = 60. Use Newton’s method to solve the nonlinear algebraic equations as discussed in class. Note that there is always an issue of the starting guess for Newton’s method. For this case, it is sufficient to assume that vj = 1 + 2(tj + 1)/3 as a starting guess. Verify that your implementation of Newton’s method converges quadratically and plot solution.