# Homework 4 ```Homework 4
Problem 1
Consider heat conduction in one dimensional bar,
∂2u
∂u
= k 2,
∂t
∂x
0 ≤ x ≤ L, with insulated left boundary (∂u/∂x = 0) and fixed temperature (u = 1) right
boundary. Assume the initial temperature of the bar is zero. Find the temperature evolution
of the bar.
Problem 2
Consider predator-prey model with fixed predator and prey population on the boundaries,
∂u
∂2u
= 0.01 2 + u − uv − u2
∂t
∂x
∂v
∂2v
= 0.01 2 − v + uv
∂t
∂x
(1)
with u(0, t) = v(0, t) = u(1, t) = v(1, t) = 1 and u(x, 0) = 1 if 0.8 ≤ x ≤ 0.9, and zero
otherwise, and v(x, 0) = 1 if 0.1 ≤ x ≤ 0.2, and zero otherwise. Solve this equation using
MATLAB up to time 2. Describe what is the difference between this model and the model
with insulated boundary conditions considered in the class.
Problem 3
Using MATLAB solve the heat conduction problem with convection
∂u
∂
∂u
∂u
=
&middot; (k(x) ) − h
∂t
∂x
∂x
∂x
in an inhomogeneous bar. Assume the bar has fixed temperature T = 1 at the ends, and
initial temperature T = 0. Assume k = 0.001 if x &lt; 0.9 and k = 1 elsewhere. Solve for
h = 0, h = 0.1 and h = 0.5 up to the time 2. Describe briefly the differences of these cases,
and explain why.
1
```