Question: Please make sure to separate answers for a,b,c & d! Thanks! 6.13 In the course of solving a boundary value problem for some function c(x)

Please make sure to separate answers for a,b,c & d! Thanks!
6.13 In the course of solving a boundary value problem for some function c(x) using centered finite differences, there is a subfunction for computing the residuals that has the following structure: \( \begin{array}{ll}1 & \text { function out = problem6_13 } \\ 2 & n=1 \text { ength }(c) ; \\ 3 & d x=2 /(n-1) ; \\ 4 & R(1,1)=c(1)-1 \\ 5 & \text { for } i=2: n-1 \\ 6 & \quad R(i, 1)=c(i+1)-2^{*} c(i)+c(i-1)-(d x)^{\wedge} 2^{*} c(i)^{\wedge} 2 \\ 7 & \text { end } \\ 8 & R(n, 1)=2^{*} c(n-1)+2^{*}(d x-1)^{*} c(n)-c(n)^{\wedge} 2^{*} d x^{\wedge} 2 \\ 9 & \text { out }=R\end{array} \) Answer the following questions about this problem. (a) If x1=0, what is xn ? (b) What is the ordinary differential equation solved by this program? (c) What are the boundary conditions? (d) Write a subfunction that takes the vector c as its input and returns the Jacobian needed for the NewtonRaphson solution of the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
