Question: Consider the 2 - point BVP: ODE: y + ( 4 x 2 + 2 ) y = 2 x ( 1 + 2 x

Consider the 2-point BVP:
ODE: y+(4x2+2)y =2x(1+2x2),0< x <1; BCs: y(0)=1, y(1)=1+ e.
(a) Show that y(x)= x + ex2 is the exact solution.
(c) Use the tridiagonal solver you created in class and the given sample code on Blackboard to solve the above 2-point BVP using the second-order finite difference operator as discussed in class:
(i) Let the mesh size be h =2p. For each p =3,4,5,6, plot the exact solution y(xi) and the approximate solution u(xi) for i =1,2,,1/h 1 on the same plot; use the subplot in MATLAB to put all your plots on the same page;
(ii) Let the mesh size be h =2p. For each p =3,4,5,6,20, produce a table with the following data. Column 1: h; Column 2: \| uh yh\|\infty ; Column 3: \| uh yh\|\infty /h2; Column 4: cpu time;
Column 5: (cpu time)/N , where h =1. Discuss and explain the trends in each column.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!