Concept explainers
Use the Collocation Method with
a.
b.
Plot the approximate solutions together with the exact solutions (a)
a.
To find: Approximate solution for linear boundary value problem by collocation method.
Explanation of Solution
% Program for Finite element solution of linear BVP % Inputs are interval inter, boundary values bv, number of steps n % Output: solution values c function c=bvpfem(inter,bv,n) a=inter(1);b=inter(2);ya=bv(1);yb=bv(2); h=(b-a)/(n+1); alpha=(8/3)*h+2/h; beta = (2/3)*h-1/h; e=ones(n,1); M=spdiags([beta*e alpha*e beta*e],-1:1,n,n); d=zeros(n,1); d(1)= -ya*beta; d(n)= -yb*beta; c=M\d; c= bvpfem([0 1],[0 0.33e],8);
Collocation is applied
b.
To find: Approximate solution for linear boundary value problem by collocation method.
Explanation of Solution
% Program for Finite element solution of linear BVP % Inputs are interval inter, boundary values bv, number of steps n % Output: solution values c function c=bvpfem(inter,bv,n) a=inter(1);b=inter(2);ya=bv(1);yb=bv(2); h=(b-a)/(n+1); alpha=(8/3)*h+2/h; beta = (2)*h-4/h; e=ones(n,1); M=spdiags([beta*e alpha*e beta*e],-1:1,n,n); d=zeros(n,1); d(1)= -ya*beta; d(n)= -yb*beta; c=M\d; c= bvpfem([0 1],[1 e],16);
Similar to (a). The first and last equations are c1=1and c1+…+cn=e. The remaining n-2equations are
Substituting
Want to see more full solutions like this?
Chapter 7 Solutions
Numerical Analysis
Additional Math Textbook Solutions
Pathways To Math Literacy (looseleaf)
Finite Mathematics for Business, Economics, Life Sciences and Social Sciences
Pathways to Math Literacy (Loose Leaf)
Mathematics for the Trades: A Guided Approach (10th Edition) - Standalone book
- Discrete Mathematics and Its Applications ( 8th I...MathISBN:9781259676512Author:Kenneth H RosenPublisher:McGraw-Hill EducationMathematics for Elementary Teachers with Activiti...MathISBN:9780134392790Author:Beckmann, SybillaPublisher:PEARSON
- Thinking Mathematically (7th Edition)MathISBN:9780134683713Author:Robert F. BlitzerPublisher:PEARSONDiscrete Mathematics With ApplicationsMathISBN:9781337694193Author:EPP, Susanna S.Publisher:Cengage Learning,Pathways To Math Literacy (looseleaf)MathISBN:9781259985607Author:David Sobecki Professor, Brian A. MercerPublisher:McGraw-Hill Education