The purpose of this program is to implement Galerkin method over the entire domain for solving the following general 2nd order, homogeneous, Boundary Value problem (BVP) with constant coefficients, and then comparing the answer with the exact solution.
ax"(t)+bx'(t)+cx(t)=0 for t1<=t<=t2
BC: x(t1)=x1 and x(t2)=x2
where "n" is the number of trial functions.
The output of this program is
1- The approximated solution of x(t) vs. exact solution of x(t)
2- The approximated x'(t) vs. exact x'(t)
3- The approximated x"(t) vs. exact x"(t)
x"(t)+ x'(t)+ x(t)=0
Solution: We have: a=1; b=1; c=1;
Using n=8 trial functions,
Dr. Redmond Ramin Shamshiri (2022). Galerkins method for solving 2nd-order homogeneous, constant coefficients BVP (https://www.mathworks.com/matlabcentral/fileexchange/39794-galerkins-method-for-solving-2nd-order-homogeneous-constant-coefficients-bvp), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!