question MANUALLY
(No coding) , just for the first and second iteration. I will
rate.
Use the Linear Finite-Difference value problems. y" -3y + 2y + 2x +3, Algorithm to approximate the solution to the following boundary- 0≤ x ≤ 1, y(0) = 2, y(1) = 1; use h = 0.1.
To approximate the solution of the boundary-value problem y" = p(x)y + q(x)y+r(x), for a ≤x≤ b, with y(a) = a and y(b) =ß: INPUT endpoints a, b; boundary conditions a, ß; integer N > 2. OUTPUT approximations w; to y(x;) for each i = 0, 1,..., N + 1. Step 1 Set h= (b − a)/(N + 1); x = a +h; a₁ = 2 +h²q(x); b₁ = 1+ (h/2)p(x); d₁h²r(x) + (1 + (h/2)p(x))a. Step 2 For i = 2,..., N - 1 set x = a + ih; a₁ = 2+ h²q(x); b₁ = 1+ (h/2)p(x); (h/2)p(x); C₁ = -1 d; = -h²r(x). Step 3 Set x=b-h; aN = 2 +h²q(x); CN=-1-(h/2)p(x); dy = -h²r(x) + (1 - (h/2)p(x)) B. Step 4 Set ₁ = a₁; (Steps 4-8 solve a tridiagonal linear system using Algorithm 6.7 u₁ = b₁/a₁; Z₁ = d₁/l₁. Step 5 For i = 2,..., N-1 set l; = a; - c¡ui-1; u¡ = b;/l;; Zi (di Cizi-1)/li. = Step 6 Set IN=aN - CNUN-1; ZN = = (dN - CNZN-1)/IN. Step 7 Set wo = α; WN+1 = = B. WN = ZN. Step 8 For i = N-1,..., 1 set w; = Zi U¡Wi+1. Step 9 For i = 0,..., N + 1 set x = a + ih; OUTPUT (x, w;). Step 10 STOP. (The procedure is complete.)
Please use the algorithm above to solve the Use the Linear Finite-Difference value problems. y" -3y + 2y + 2x +3, Algorithm to approximate the solution to the follo
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am