Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need help to write it in matlab 2.14) consider the boundary vale problem u''(x)= f(x) , u(0)=0 , u'(1)=1 s1= (U_n+1 - U_n )/h

i need help to write it in matlab

2.14) consider the boundary vale problem

u''(x)= f(x) , u(0)=0 , u'(1)=1

s1= (U_n+1 - U_n )/h = 1

s2 = (U_n+2 - U_n )/2h = 1

a) let f(x) = -e^(x-1)

Complete the work of Exercise 2.14 for the value of n = 10. You will implement your tridiagonal code for this problem but with slightly different coefficient matrices A1 and A 2 and right hand side vectors b1 and b2. The matrices will be almost the same but may be slightly changed due to the equations used to address the right boundary condition variations in part a, leading to a change in one or two elements of A 1and A2 associated with the schemes S1 and S2 . The vectors associated with the given right hand side function of part c, b1 and b2 , may be slightly changed due to the discrete equations used to address the right boundary condition variations in part a (possibly leading to a change in one or two elements of b1and b2 due to the schemes s1 and S2 .) Provide copies of the coefficient matrices A 1and A2 and copies of the right hand side vectors b1 and b2 from Matlab. Compute and provide the errors for each of the schemes. The numerical output of Task 2 should be 2 coefficient matrices, 2 right hand side vectors, 2 solution vectors and 2 vectors of error values. Also plot the solution vectors along with the true solution and a separate plot of the errors, there should be 2 or 4 plots. You may plot the true solution along with both approximate solutions.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems 12th Asian Conference ACIIDS 2020 Phuket Thailand March 23 26 2020 Proceedings

Authors: Pawel Sitek ,Marcin Pietranik ,Marek Krotkiewicz ,Chutimet Srinilta

1st Edition

9811533792, 978-9811533792

More Books

Students also viewed these Databases questions

Question

LH 0 5 Cp = 1 4 1 kJ / kgI K 1 5 kg / m 3 2 7 0 0 C 0

Answered: 1 week ago

Question

Design a job advertisement.

Answered: 1 week ago