4) Write a program to solve the following initial boundary value problem: $$ v_t = 0.01 v_{xx} + 100 v (v-1) (.25 - v) $$ with $v_x(0,t) = v_x(1,t) = 0$ for all $t>0$, and $$ v(x,0) = \left\lbrace\begin{aligned} 0\quad &\text{if } 0 \leq x \leq .40 \\ a\quad &\text{if } .40 < x < .60 \\ 0\quad &\text{if } .60 \leq x \leq 1.0 \end{aligned}\right. $$ Solve this problem with $a = .20$ and with $a = .90$ for the time interval $0\leq t \leq 1$ and comment on the difference in the nature of the solution. Try to explain this difference in behavior.
I know how to solve $v_t=Cv_{xx}$ and I think I am ok on the Neumann BC ad the piece wise component, but I don't know how to account for the nonlinear term though. I imagine that I might want to use newton's method or Runge Kutta methods or something but I don't know what I would want to solve for. I am really just at a loss on this problem :(
UPDATE: I have found that to satisfy the Neumann conditions we need the following matrix I think:

Any idea if this looks reasonable for $a=0.3$? Each line is at an updated time.

Let us use an explicit FD method with centered differentiation in space, where $k$ is the time-step and $h$ the mesh size. Thus, if $v_j^n \simeq v(j h, n k)$, we have $$ v_j^{n+1} = (1 - 2\lambda) v_j^{n} + \lambda (v_{j+1}^{n} + v_{j-1}^{n}) + k R(v_j^{n})\, , $$ where $R(v) = 100 v (v-1) (.25 - v)$ is displayed below, and $\lambda = 0.01 k/h^2$ is the Fourier number. The boundary conditions are discretized using centered finite differences: \begin{aligned} v_{-1}^n &= v_{+1}^n \\ v_{J_x+1}^n &= v_{J_x-1}^n \end{aligned} where $J_x = 1.0/h$.
In the case $R(v) = 0$, the numerical method is stable and convergent under the condition $\lambda \leq 1/2$. In the nonlinear case, the method writes as a nonlinear dynamical system ${\bf v}^{n+1} = {\bf f}({\bf v}^{n})$ with ${\bf f}$ nonlinear, which makes stability analysis more difficult.
Here is a Matlab code which implements the method, and the numerical solution for $a = .20$ and $a = .90$ at the final time $t = 1.0$:
Let us examine the relaxation part $v_t = R(v)$ (cf. splitting). From the graph of $R$, one can deduce that the long-time solution to the IVP $v(0) = .20$ is $v(\infty) = 0$, while the long-time solution to the IVP $v(0) = .90$ is $v(\infty) = 1.0$. This explains the different nature of the solutions for $a= .20$ and $a = .90$.