# How do I find average temperature given a temperature distribution?

I was told to find the temperature distribution of a wire with a current going through it. So I found $$T(x)=T_{\infty}-\frac{\dot{q}}{km^{2}}[\frac{cosh(mx)}{cosh(mL)}-1]$$

I need to find the average temperature in the wire using this formula. I know I have to use some integral but I can't remember the formula. If someone could just give me the formula then I could probably integrate it myself.

-

The average of any quantity $s$ is $\frac{\sum\limits_{r=0}^ns_r}{n}$. If the distribution is continuous, lets say as a function of x, then it becomes $\lim\limits_{n\to\infty}\frac{\sum\limits_{r=0}^ns_r}{n}$. This can be rewritten as $\frac{\int s(x)dx}{\int dx}$, taking limits as the length of the wire. In your formula, I don't see any $x$ term in the RHS, nor anything that could depend on x, so I don't see how we can proceed. Please specify what is constant and what is a function of x.
So the final formula is $$\frac{\int T(x)dx}{\int dx}$$
If your wire is infinite, you may need to take limits 0 to y, and then limit the expression for average as $y\to\infty$.
Update: with the updated formula, assuming the wire spans from x=0 to x=L, $$\langle T\rangle=T_\infty- \frac{\dot{q}}{km^2}\left(\frac{\tanh(mL)}{mL}-1\right)$$ If the wire spans from 0 to y, $$\langle T\rangle=T_\infty- \frac{\dot{q}}{km^2}\left(\frac{\sinh(my)}{my\cosh(my)}-1\right)$$. Limiting y to infinity gives us an infinite answer. So I'm assuming that I've interpreted it correctly in my previous answer.