To obtain the steady state solution for the temperature distribution in a rod I've reached the following ODE:

$$\mu T''(x)=-1 + T(x)$$

under the boundary conditions $T(0)=T(1)=0$. The solution is apparently:


So far I've got $T(x) = C_1\exp({\frac{x}{\sqrt{\mu}}})+C_2\exp({-\frac{x}{\sqrt{\mu}}})$ and I've tried implementing the boundary conditions to obtain $C_1$ and $C_2$ but I can't seem to reach the solution. Any ideas?


I suppose that you missed the $1$ in the differential equation. Without conditions, the solution is (as you got it almost) $$T(x)=1+c_1 e^{\frac{x}{\sqrt{\mu }}}+c_2 e^{-\frac{x}{\sqrt{\mu }}}$$

So, $$T(0)=1+c_1+c_2 =0\qquad , \qquad T(1)=1+c_1 e^{\frac{1}{\sqrt{\mu }}}+c_2 e^{-\frac{1}{\sqrt{\mu }}}=0$$ leading to $$c_1=-\frac{1}{e^{\frac{1}{\sqrt{\mu }}}+1}\qquad , \qquad c_2=\frac{1}{e^{\frac{1}{\sqrt{\mu }}}+1}-1$$ which leads to

$$T(x)=-\frac{e^{-\frac{x}{\sqrt{\mu }}} \left(e^{\frac{x}{\sqrt{\mu }}}-1\right) \left(e^{\frac{x}{\sqrt{\mu }}}-e^{\frac{1}{\sqrt{\mu }}}\right)}{e^{\frac{1}{\sqrt{\mu }}}+1}$$

Rearranging( expand the exponentials and use addition formulae, you should effectively obtain $$T(x)=1-\text{sech}\left(\frac{1}{2 \sqrt{\mu }}\right) \cosh \left(\frac{1-2 x}{2 \sqrt{\mu }}\right)$$

  • $\begingroup$ Yes sorry I forgot to include the 1. This is very helpful, thanks. $\endgroup$ – Sheldon Nov 12 '16 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.