Question
Consider the following boundary value problem for u(x): { u(x)+u'(x)+u'' (x)=f(x), x(a,b), 1u(a) + 1u(a) = 1, 2 u(b) + 2 u(b) = 2 .
Consider the following boundary value problem for u(x): {
u(x)+u'(x)+u'' (x)=f(x), x(a,b),
1u(a) + 1u(a) = 1, 2u(b) + 2u(b) = 2.
Apply the second-order finite difference method to the above system. Use Use n equa-distant sub- intervals.
u = fd2_bvp(a,b,alpha,beta,gamma,alpha1,beta1,gamma1,alpha2,beta2,gamma2,f).
f is a column vector with each element as a function evaluation of f(x). u is a column vector as the numerical approximations. Use the three-point centered-difference formula for the interior points.
Use FDF2 and BDF2 formulas for the two end points.
Use the lu command to solve the linear system.
Write a "Matlab" program to do the above question. Thank you!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started