 t) = 0, t \geq 0$"></li><li><img src="hw_1_4_2_eq08842082406399673988.png" alt="$v_x(0, t) = 0,  t \geq 0$"></li></ul></div><h2>Numerical Solver<a name="2"></a></h2><pre class="language-matlab">
<span class="keyword">function</span> [ u, u_exact, X_, T_ ] = solver_1_4_1( M, dt )
    f_ = @(x)(cos(pi * x / 2));
    a = 0; b = 0;
    nu = 1;
    x = 1; t = 1;
    dx = 1 / M;
    T = round(1 / dt);
    X = round(1 / dx);
    N = t * T; t_real = t * dt * T;
    r = nu * dt / dx / dx;
    x_ = 0 : dx : x;
    t