25] Q1 Write a MATLAB code to numerically evaluate the 2nd derivative of the function f(x) = exp(2x) at x0 = 0 using central differencing. Calculate the absolute error Eabs in the numerical derivative for a range of x between 1 and 2^-15. Plot x vs Eabs in a log-log plot.
[35] Q2 Consider the following ODE governing steady, 1D heat conduction.
0=
0 < x < 1; T(x=0) = 0 & T(x=1) = 50
[15] a) Considering k = 100 - 50x, discretize the ODE with an x that would result in a linear system of equations with 5 unknowns and 5 equations. Write down the equations as a matrix-vector equation.
[20] b) Write a MATLAB code to solve the same problem in a) and plot T vs. x.