Heat Equation... with Newton Cooling? I have the following differential equation that is purported to represent the equilibrium temperature at a point $x\in [0,L]$ on an uninsulated rod of length $L$, whose end points are kept constant $T(0)=T_1$ and $T(L)=T_2$, in air at temperature $T_a$:
$$\frac{d^2T}{dx^2}+h'(T_a-T(x))=0, \qquad(\star)$$
where $h'$ is a constant (which when increases leads to more heat transfer between the rod and the air).
If I solve this I get a solution, with a u-shape when $T_a<\min(T_1,T_2)$, and an n-shape if $T_a>\max(T_1,T_2)$.
The problem is I have no idea where it comes from. It seems to be a mélange of the Heat Equation:
$$k\cdot \frac{\partial^2T}{\partial x^2}=\frac{\partial T}{\partial t},$$
and Newton Cooling:
$$\frac{dT}{dt}=r\cdot (T_a-T(t)),$$
however I cannot seem to put the two sticks together. A totally naive approach gives:
$$\frac{d^2T}{dx^2}=\underbrace{\frac{r}{k}}_{=h'}(T_a-T(x)).$$
However this is wrong in that is gives the wrong concavity (and doesn't really make any sense --- for equilibrium surely $\displaystyle \frac{\partial T}{\partial t}=0$).
Perhaps this term is coming from some kind of boundary condition on the rod (+axial symmetry)? Perhaps there is a simple sign-change as the temperature change is going in some opposite direction.

Can anyone shed some light on equation ($\star$)? Is it just a toy model?

 A: The equation comes from adding a source term to the diffusion equation:
$$k \frac{\partial^2 T}{\partial x^2} + r (T_a -T(x)) = \frac{\partial T}{\partial t} $$
and then assumes steady state:
$$\frac{\partial^2 T}{\partial x^2} + h^\prime (T_a - T(x)) = 0$$
where $h^\prime = r/k$. It is basically the addition of two models (diffusion, cooling) and assuming steady state. Your confusion may stem from trying to plug one model into another, rather than combining them. 
A: This equation arose from the 3D model of heat exchange of the cylindrical rod with the surrounding air 
$$\lambda \nabla ^2 T=0$$
with Neuman value on a surface
$$-\lambda \nabla T.\vec {n}=h(T_a-T), r=R$$
and with Dirichlet conditions at the ends
$$T(r,0)=T_1, T(r,L)=T_2$$
What does the solution to this problem look like? Put $L=4, R=0.25,T_1=2,T2=1,T_a=1,h=0.25, \lambda =1$, then the 2D and 3D temperature distributions along the length of the rod look like
 
Now we want to build a 1D model to describe the temperature distribution along the length of the rod. We use Laplace equation in cylindrical coordinates
$$\lambda\frac {1}{r}\frac {\partial}{\partial r} (r\frac {\partial T}{\partial r})+\lambda \frac {\partial ^2T}{\partial z^2}=0 . (1)  $$ 
We assume that the temperature distribution is almost uniform along the radial coordinate, therefore
$$\int _0^R {T(r,z) 2\pi rdr}=\pi R^2 T(z)$$
We multiply equation (1) by $2\pi rdr$, integrate and use the boundary condition on the surface
$$2 \pi \lambda R\frac {\partial T}{\partial r}|_{r=R}+\pi R^2\lambda \frac {\partial ^2T}{\partial z^2}=0 . (2)  $$
Finally we have
$$\frac {d^2T}{d z^2}+h'(T_a-T)=0$$
with $h'=\frac {2h}{\lambda R}$. Replacing here $z\rightarrow x$, we arrive at the equation under discussion. Now compare the two solutions on the axis (left) and on the surface (right). We see a good match. 

