Deriving the heat equation I have the following problem:
"Consider a uniform rod of material whose temperature varies only along its lenght, in the x direction. By considering the heat flowing from both directions into a small segment of lenght $\Delta x$  derive the heat equation: $\frac{\delta T}{\delta t} = K\frac{\delta^2T}{\delta x^2}$, where $K = \frac{k_T}{c \rho} $."
My attempt:
Fouriers heat conduction law gives: $\frac{Q}{\delta t}=k_tA\frac{\delta T}{\delta x} \rightarrow Q = k_tA\frac{\delta T}{\delta x} \delta t$
The specific heat capacity is given by $c = \frac{1}{m} \frac{Q}{\delta T}= \frac{1}{V \rho} \frac{Q}{\delta T} =\frac{1}{\rho A \delta x} \frac{Q}{\delta T} \rightarrow Q = c A\rho \delta x \delta T$
We combine the above and get:
$k_tA\frac{\delta T}{\delta x} \delta t = c A\rho \delta x \delta T$
Cancelling the A's and collecting terms gives:
$\frac{\delta T}{\delta t} = \frac{k_t}{c \rho}\frac{\delta T}{\delta x^2}$
, but the correct answer is $\frac{\delta T}{\delta t} = \frac{k_t}{c \rho}\frac{\delta^2 T}{\delta x^2}$.
My question is from where did we get $\delta T$ to become $\delta^2 T$ in the right hand side of the equation?
 A: Let's write the energy equation for a element of length  $\Delta x$, whose volume is $\Delta V = A \Delta x$, whose mass is $\Delta m = \rho \Delta V$ and whose internal energy can be written as $\Delta E = \Delta m \, e = \Delta m \, c \, T$, with $e = c T$ the internal energy per unit mass.
Without doing work on this system, the first principle of thermodynamics tells us that the time derivative of the internal energy equals the heat flux transferring energy into it
$\Delta \dot{E} = \dot{Q}^{ext}$.
Assuming no heat transfer occurs from the lateral surfaces, like they were thermally insulated (usually, 1D equations are good models of the elongated elements, or for systems with uniform properties in the other two dimensions), heat flux can occur only at the sections at $x$ and $x+\Delta x$. Let's take a positive heat flux in the same direction of the $x$-axis, we can write the balance equation as
$\Delta \dot{E} = \dot{Q}^{ext} = \dot{Q}(x) - \dot{Q}(x+\Delta x) = - \dfrac{\partial \dot{Q}}{\partial x} \Delta x + o(\Delta x^2)$,
and thus, using $\Delta \dot{E} = \rho A c \Delta x \dfrac{\partial T}{\partial t}$, having consider an elementary control volume fixed in space so that we can make appear the partial time derivative, and assumed that density, section area, heat coefficient and length of the element are constant in time,
$\rho A c \dfrac{\partial T}{\partial t} = - \dfrac{\partial \dot{Q}}{\partial x} + o(\Delta x)$.
$\qquad \text{and when} \ \Delta x \rightarrow 0 \qquad$
$\rho A c \dfrac{\partial T}{\partial t} = - \dfrac{\partial \dot{Q}}{\partial x}$
Now, if we introduce Fourier's law for heat conduction, we can write the heat flux proportional to the temperature derivative
$\dot{Q} = -K A \dfrac{\partial T}{\partial x}$, assuning $T$ is uniform on the section,
to get
$\rho c \dfrac{\partial T}{\partial t} = K \dfrac{\partial^2 T}{\partial x^2}$
A: The heat flowing into a small segment of length $\Delta x$ is:
$\frac{Q(x)}{\delta t}=-k_tA\frac{\delta T}{\delta x}(x)$,and $\frac{Q(x+\delta x)}{\delta t}=k_tA\frac{\delta T}{\delta x}(x+\delta x)$
The total heat:
$$
Q_{total} =Q(x)+Q(x+\delta x)
$$
The temperature rise is:
$$
Q_{total}=c\rho A\delta x\delta T
$$
