Write a MATLAB code to solve the diffusion equation over the domain x [0, 1] subject

Question:

Write a MATLAB code to solve the diffusion equationdc dx = 0

over the domain x ∈ [0, 1] subject toc(0) = 1, dc dx lx=0 = kc(x = 0)

for the (dimensionless) reaction rate k = 2. Your program should plot the solution and compare the result to the exact solution of this linear problem. Include the derivation of the exact result along with a discussion of how you made the numerical solution and the plot.

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: