Galerkins method for solving 2nd-order homogeneous, constant coefficients BVP

Implement Galerkin method over the entire domain for solving 2nd order BVPs
516.0 次下载
更新时间 2013/1/10

查看许可证

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
>> BVP_Galerkin1(a,b,c,t1,t2,x1,x2,n)
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)
Example:
x"(t)+ x'(t)+ x(t)=0
Boundary values:
x(1)=2, x(10)=0;
Solution: We have: a=1; b=1; c=1;
t1=1; t2=10;
x1=2; x2=0;
Using n=8 trial functions,
>>BVP_Galerkin(1,2,3,1,10,2,0,8)

引用格式

Dr. Redmond Ramin Shamshiri (2024). 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. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0