Download Here

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Equations of motion wikipedia , lookup

Euler equations (fluid dynamics) wikipedia , lookup

Schwarzschild geodesics wikipedia , lookup

Differential equation wikipedia , lookup

Sobolev spaces for planar domains wikipedia , lookup

Exact solutions in general relativity wikipedia , lookup

Itô diffusion wikipedia , lookup

Partial differential equation wikipedia , lookup

Transcript
EGR 511
NUMERICAL METHODS
__________________
LAST NAME, FIRST
PROBLEM SET #4
1. Given the equation
d2y
d 2
+y=0
Take  = /8 and solve the above equation by finite difference for each of the following
boundary conditions: a) y(0) = 0, y(/2) = 1; b) y'(0) = 0, y'(/2) = 1.; c) y'(0) + y(0) = 1,
y'(/2) + y(/2) = 0.
2. Use Taylor’s method of order two to approximate the solutions for the following initial value
problems.
y’ = xe3x – 2y, 0  x  1, y(0) = 0, with h = 0.5
3. Show that the fourth-order Runge-Kutta method.
1
yn+1 = yn + (k1 + 2k2 + 2k3 + k4)
6
where
k1 = h*f(xn, yn)
k2 = h*f(xn + 0.5h, yn + 0.5k1)
k3 = h*f(xn + 0.5h, yn + 0.5k2)
k4 = h*f(xn + h, yn + k3)
when applied to the differential equation y’ = y, can be written in the form
1
1
1
yn+1 = [1 + h + (h)2 + (h)3 +
(h)4] yn
2
6
24
4. The Backward Euler one-step method is defined by
yn+1 = yn + h*f(xn+1, yn+1)
Apply the Backward Euler method to solve
y’ = -9y, 0  x  1, y(0) = 2.7183, with h = 0.1
5. Given y” = 4(y – x) for 0  x  1 with y(0) = 0 and y(1) = 2. Use the Finite-Difference
1
1
1
method with h = to approximate the solution at x =
y( ) = __________
3
3
3
6. (P. 14.11 Chapra) Develop a one-dimensional function in the temperature gradient direction at
the point (1, 1). The temperature function is
f(x, y) = 2x3y2  6yx + x2 + 4y
7. Solve the following equation with step size h = 0.2
dy
= x - y2, at x = 1, y = 1.4
dx
a. Using Euler method
y(1.4) = _________
b. Using modified Euler method: yn+1 = yn+ .5h[f(xn,yn) + f(xn+1,yn+hf(xn,yn))]
y(1.2) = __________
c. Using Midpoint method: yn+1 = yn+ k2 where k1 = h*f(xn,yn) and
k2 = h*f(xn+.5h,yn+0.5k1)
y(1.2) = __________
1
3
d. Using Heun’s method: yn+1 = yn+ ( k1 + k2) where k1 = h*f(xn,yn) and
4
4
2
2
k2 = h*f(xn+ h, yn+ k1)
y(1.2) = __________
3
3
e. Using Taylor’s method of order two
y(1.2) = __________
8. Solve the following equations with step size h = 0.2
dy1
dy 2
= - y2 + x, y1(1) = 1;
= y1 + y2 + x, y2(1) = -1
dx
dx
a. Using Euler method, the value of y1 at x = 1.2 is
___________
b.Using modified Euler method, the value of y1 at x = 1.2 is
___________
c. Using Midpoint method, the value of y1 at x = 1.2 is
___________
9. Use the Finite-Central Difference Algorithm with h = 0.5 to approximate the solution to the
boundary-value problem
y” = - (y’)2 – y + ln x, 1  x  2, y(1) = 0, y(2) = ln 2
Compare your results to the actual solution y(x) = ln x.
10. Determine the derivative
d 2f
dx 2
( x 0 ) and
d 2f
dx 2
(x 2 )
using Lagrange polynomial on the interval x0 < x1 < x2 with h = x2 - x1 = x1 - x0. Determine the
error involved in each derivative.