# One dimensional heat equation

Y,

I hope you and your family are well.

I am currently taking a course in PDE's and would like a few things explained if possible.

â€¢ Consider a bar insulated on both sides with the ends held at some constant temperature (other than 0) my analysis gives, that as times goes to infinity, the temperature goes to 0 which is definitely not accurate and I don't know where my mistake is.

â€¢ How do I solve the same problem when the ends are at different temperatures?

â€¢ How do I solve the same problem if the ends are insulated?

Please show the analysis for each situation....I am using separation of variables and Fourier Series as the method of solution.

Â© BrainMass Inc. brainmass.com October 3, 2022, 11:17 pm ad1c9bdddfhttps://brainmass.com/math/fourier-analysis/one-dimensional-heat-equation-624645

## SOLUTION This solution is **FREE** courtesy of BrainMass!

Hi C. Great to see you again.

Here is the solution . I start by solving the most basic case (ends at zero temperature) and show how to generalize from there.

Here is a hint: Convert the system to a system that you already solved - by adding a dummy function to the heat function. Choose the dummy function in such a way that it will not change the heat equation, but will change the boundary conditions to the one you already know the solution to.

An at last I solve for the Neumann boundary conditions.

The one dimensional homogenous heat equation on a finite domain.

The heat equation is given by:

(1.1)

Where the function is the temperature across the finite domain

To solve this equation one must have three conditions.

At time the temperature across the domain has an initial spatial distribution

(1.2)

This is called the initial condition.

The other two conditions come from the situation at the ends of the bar. These are called boundary conditions.

The most basic boundary conditions is when the ends are kept at constant temperature. This is called "Dirichlet boundary condition":

(1.3)

A special case is when both ends are kept at the same temperature.

Another type of boundary condition is that of the heat flux through the ends. The heat flux is the change in the temperature across the boundary. This is called the "Neuman boundary condition":

(1.4)

In most cases with Neumann conditions the ends are adiabatically insulated - that is there is no flux through the ends:

(1.5)

And now we can start solving the homogenous heat equation.

Let's start with the most simple case - both ends are kept at

The system becomes:

(1.6)

We assume we can write the function as a product of two single-variable functions:

(1.7)

So when we plug this back into the original equation, the partial derivatives become regular derivatives:

(1.8)

â€ƒ

Now we can divide both sides by and we get:

(1.9)

The left hand side is a function dependent only in the variable t, while the right hand side depends only on the variable .

Since it must be true for any combination of . the only way it can be so is if both sides equal to the same constant.

(1.10)

So now we have two ordinary differential equations.

The spatial one:

(1.11)

And the temporal one:

(1.12)

Also, let's see how this affects the boundary conditions:

(1.13)

So we start by solving the spatial equation, using the boundary conditions (1.13).

We separate it into three cases:

Case 1:

The equation becomes

(1.14)

Its solution is

(1.15)

Applying boundary conditions:

So we obtain the trivial solution

Case 2:

The equation becomes

(1.16)

Its solution is

(1.17)

â€ƒ

Applying boundary conditions:

So again, we obtain the trivial solution .

Case 3:

The equation becomes

(1.18)

Its solution is

(1.19)

Applying boundary conditions:

So the non-trivial solution is

(1.20)

For

The set of solutions (1.20) is called the "eigenfunction basis" and one of its most important properties is that the eigenfunctions are orthogonal to one another (we will get back to this property later).

Now we can go back to the temporal equation

(1.21)

And we recall that in our case so the equation becomes:

(1.22)

This is a simple first order equation and its solution is

(1.23)

And a solution to the heat equation is

(1.24)

And since the heat equation is a linear equation, the general solution is a linear combination of all possible solutions:

(1.25)

The last task is to determine what are the constant coefficients .

For this we use the initial condition

(1.26)

And we are going to use the orthogonality of the eigenfunctions, namely:

(1.27)

We multiply both sides of (1.26) by

(1.28)

Since the summation is over n and not m, we can put the term inside the sum:

(1.29)

Now we integrate both sides:

(1.30)

But an integral of a sum is equivalent to a sum of integrals, hence we can bring the integration into the sum (integrating term by term):

(1.31)

But according to the orthogonality condition (1.27) the only term in the sum that survives is this which so we get

(1.32)

Or:

(1.33)

This is known as the Fourier sine expansion.

And this concludes the solution to the system

(1.34)

And it is:

(1.35)

Where

(1.36)

â€ƒ

Ends at two different constant temperatures.

What happens when the two ends are kept at two different temperatures, that is

(1.37)

For this we shall do what the mathematicians like to call "Reducing the problem to that which we have already solved".

In this case we know how to solve a system when both ends are at 0. So we write the temperature function as:

(1.38)

So the system becomes:

(1.39)

â€ƒ

Or:

(1.40)

To make this system identical to the one we initially solved (1.6) all we have to do is to require

(1.41)

And

(1.42)

The system becomes:

(1.43)

This is a simple equation. Its solution is

(1.44)

â€ƒ

Applying boundary conditions we get

(1.45)

So the solution to the modified system (1.43) is:

(1.46)

So the solution to the original system (ends at two different constant temperatures) is:

(1.47)

Where

(1.48)

â€ƒ

Insulated ends

As we have seen, insulated ends require that there is no heat flow across the boundary.

The system is therefore:

(1.49)

And if we follow the same separation of variables procedure, we get the same spatial and temporal equations of (1.10):

(1.50)

However now the spatial boundary conditions are

(1.51)

So we solve the spatial equation under these conditions.

â€ƒ

Case 1:

The equation becomes

(1.52)

Its solution is

(1.53)

Applying boundary conditions:

So we get the trivial solution.

Case 2:

The equation becomes

(1.54)

Its solution is

(1.55)

Applying boundary conditions:

So we get a constant (non zero) solution:

(1.56)

Case 3:

The equation becomes

(1.57)

Its solution is

(1.58)

Applying boundary conditions:

The non trivial solution is

(1.59)

This is the eigenfunctions basis, and as before - they are orthogonal.

Going back to the temporal equation

(1.60)

In the case that the equation becomes so its solution in this case is

(1.61)

While for the equation becomes and its solution as before is

(1.62)

Therefore, the general solution is a linear combination of all possible solutions:

(1.63)

So:

(1.64)

And as before we will use the orthogonality relations

(1.65)

we apply the initial condition:

(1.66)

Multiplying both sides by

(1.67)

Bringing it into the sum:

(1.68)

Integrating both sides:

(1.69)

â€ƒ

Integral of a sum is a sum of integrals:

(1.70)

If the first term vanishes and so all the terms where and we are left with

(1.71)

If all the terms in the sum vanish and we get

(1.72)

So the solution to the heat equation with insulated ends is

(1.73)

Where

https://brainmass.com/math/fourier-analysis/one-dimensional-heat-equation-624645