# Heat Loss of a Not Very Long Rod Protruding from a Heat Source

Here we calculate the total heat loss for the rod.

> restart;

> Theta:=x->M*exp(-m*x)+N*exp(m*x);

We find the temperature distribution at two points, 0 and L.  We then use these two equations to solve for the constants M and N.

> eqn1:=Theta[0]=Theta(0);

> eqn2:=h*SA*Theta(L)=-k*SA*eval(diff(Theta(x),x),x=L);

> s:=solve({eqn1,eqn2},{M,N});
assign(s);

> simplify(Theta(x));

Here is our general equation.  We now introduce a simplification to reduce the extra variables in the equation.
p = (km-h) / (km+h)

> h:=(k*m-p*k*m)/(p+1):

> ans:=simplify(Theta(x)):
Theta2:=unapply(ans,x);

In order to calculate the total heat loss for the rod we have two choices.  We can integrate over the entire rod and add the heat loss from the end, or we can make this a much simpler process.  We know that all heat coming out of the heat source has to go exit the rod at some point, there is no accumulation.  So we will find the flux from the heat source at x=0, and this will be the total heat flux from the rod.

> tot_heat_loss:=-k*SA*eval(diff(Theta2(x),x),x=0);

> simplify(tot_heat_loss, assume=positive);

Maple refuses to distribute in the negative so we'll force it so that our end answer will come out as expected.

> restart;

The equation is the same as before.

> tot_heat_loss:=k*SA*m*Theta0*(exp(2*m*L)-p)/(exp(2*m*L)+p);

> Theta:=x->M*exp(-m*x)+N*exp(m*x):

> M:=Theta0/(1+p*exp(-m*2*L)):
N:=Theta0/(1+exp(m*2*L)/p):

This is the heat loss as given by the book, we will show that these two are equal.

> tot_heat_loss2:=int(h*C*Theta(x),x=0...L)-k*SA*eval(diff(Theta(x),x),x=L);

> tot_heat_loss2:=simplify(tot_heat_loss2,assume=positive):

> difference:=tot_heat_loss-tot_heat_loss2:

Maple has trouble canceling some things, so we'll help it reduce some unnecessary variables so that it can solve the remaining ones.

> difference2:=simplify(difference*(exp(2*m*L)+p)/k/Theta0, assume=positive);

> m:=sqrt(h*C/k/SA):

> difference2;

We have achieved our goal.

Heat Conduction in the Steady State