You are on page 1of 10

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/328190019

A study on an analytic solution 1D heat equation of a parabolic partial


differential equation and implement in computer programming

Article  in  International Journal of Scientific and Engineering Research · September 2018

CITATIONS READS

7 5,622

1 author:

Abdulla - Al - Mamun
Hohai University
13 PUBLICATIONS   42 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Abdulla - Al - Mamun on 10 October 2018.

The user has requested enhancement of the downloaded file.


International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 913
ISSN 2229-5518

A study on an analytic solution 1D heat equation


of a parabolic partial differential equation and
implement in computer programming
Abdulla – Al – Mamun, Md. Shajib Ali, Md. Munnu Miah

Abstract— In this paper, we investigate second order parabolic partial differential equation of a 1D heat equation. In this paper, we discuss the
derivation of heat equation, analytical solution uses by separation of variables, Fourier Transform and Laplace Transform. Finally, we consider a problem
of heat equation and the solution of this problem implement in computer programming.

Index Terms— Heat equation, Fourier law, Fourier Transformation, Laplace Transformation, Analytical solution, Separation of variable, Mat-lab.

——————————  ——————————
1 History of Heat Equation
The heat equation is an important partial differential
Therefore, the gradient of temperature is the ow of heat
equation (PDE) which describes the distribution of heat (or
through the material. This gradient will help us determine
variation in temperature) in a given region over time. For
the ow of heat through various materials. This is analogous
better understanding of this paper, it is very important that

IJSER
to the ow of water in a pipe.
we understand the difference between heat and
temperature. Heat is a process of energy transfer as a result The heat equation is a parabolic partial differential equation
of temperature difference between the two points. Thus, the that describes the distribution of heat (or variation in
term 'heat' is used to describe the energy transferred temperature) in a given region over time. For a function
through the heating process. Temperature, on the other (𝑥, 𝑦, 𝑧, 𝑡) of three spatial variables (𝑥, 𝑦, 𝑧) (see Cartesian
hand, is a physical property of matter that describes the coordinates) and the time variable t, the heat equation is:
hotness or coldness of an object or environment. Therefore,
no heat would be exchanged between bodies of the same 𝜕𝑢 𝜕2𝑢 𝜕2𝑢 𝜕2𝑢
− 𝛼 � 2 + 2 + 2� = 0
temperature. 𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧

Suppose we have a function (𝑥; 𝑦; 𝑧; 𝑡), which describes More generally in any coordinate system:
the temperature of a conducting material at a given 𝜕𝑢
− 𝛼∇2 𝑢 = 0
location, (𝑥; 𝑦; 𝑧), you can use this function to determine 𝜕𝑡
the temperature at any position on the material at a future
Where α is a positive constant, and 𝛥 𝑜𝑟 𝛻 2 denotes the
time, 𝑡 + 1. The function U changes over time as heat
Laplace operator. In the physical problem of temperature
spreads through-out the material and the heat equation is
variation, 𝑢(𝑥, 𝑦, 𝑧, 𝑡) is the temperature and α is the thermal
used to determine this change in the function U. The
diffusivity. For the mathematical treatment it is sufficient to
gradient of U describes which direction and at what rate is
consider the case 𝛼 = 1.
the temperature changing around a particular region of the
material. Note that the state equation, given by the first law of
thermodynamics (i.e. conservation of energy), is written in
the following form (assuming no mass transfer or
———————————————— radiation). This form is more general and particularly
• Abdulla – Al – Mamun is currently pursuing masters degree program in useful to recognize which property (e.g. 𝑐𝑝 or 𝜌) influences
Mathematics in Islamic University, Kushtia, Bangladesh, PH-
+8801741183886. E-mail: abdullah_math@istt.edu.bd which term.
• Md. Shajib Ali, Assistant Professor in Mathematics in Islamic University,
Kushtia, Bangladesh, PH-+8801716759332. E-mail: 𝜕𝑇
shajib_301@gmail.com 𝜌𝑐𝑝 − ∇. (𝑘∇𝑇) = 𝑞̇ 𝑣
• Md. Munnu Miah is currently pursuing masters degree program in 𝜕𝑡
Mathematics in Islamic University, Kushtia, Bangladesh, PH-
+8801771068343 Where 𝑞̇ 𝑣 is volumetric heat flux.

IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 914
ISSN 2229-5518

The heat equation is of fundamental importance in diverse II. what happens when we put the materials with
scientific fields. In mathematics it is the prototypical high thermal conductivities on the edges or vice
parabolic partial differential equation. In probability versa.
theory, the heat equation is connected with the study of To test these arrangements, we will set the temperature on
Brownian motion via the Fokker-Planck equation. In one end of the material to be at 0𝑜 𝐶 and the other end at
financial mathematics it is use to solve the Black-Scholes 100𝑜 𝐶. But before we get into that, let us have a look at the
partial differential equation. The diffusion equation, a more two kinds of conduction that are important to the
general version of the heat equation, arises in connection understanding of this paper.
with the study of chemical diffusion and other related
To be able to solve the second-order partial differential heat
processes.
equation in the spatial coordinates, we need to know the
The heat equation is used in probability and describes boundary conditions and the initial conditions. The
random walks. It is also applied in financial mathematics boundary conditions specify how our system interacts with
for this reason. the outside surroundings. There are three general types of
boundary conditions: Dirichlet, Neumann and Mixed
It is also important in Riemannian geometry and thus boundary conditions.
topology: it was adapted by Richard S. Hamilton when he
defined the Ricci flow that was later used by Grigori The heat equation in one dimension is written as the
Perelman to solve the topological Poincare conjecture. following:

IJSER
The aim of this paper is to be able to determine the ow of 𝜕𝑈 𝜕2𝑈
= 𝑐 � 2�
heat of various materials i.e. different thermal 𝜕𝑡 𝜕𝑥
conductivities. Does the arrangement of conductors or
Where 𝑈(𝑥, 𝑡) is a function of temperature.
insulators affect the rate at which the heat owes? Imagine a
room with a wall that is made of different materials such as In this case we can think of a one-dimensional rectangular
wood, metal or bricks arranged in different ways. The room thin wire with length x. Ignore the width and height
is at room temperature, say 25𝑜 𝐶 and does not generate any dimensionality. The one end of the length of the wire is set
heat (no air conditioner) and it is surrounded by the outside at 0o C whereas the other end is set at 0𝑜 𝐶. These are its
environment which has a temperature of 0𝑜 𝐶. The room is boundary conditions. We also need to specify the
so tiny relative to the outside environment therefore any temperature at every position on the wire at time, 𝑡𝑜 (the
heat ow from the room to the outside would not change the initial conditions). To solve this one-dimensional heat
temperature outside. However, the temperature inside the problem, we need to transform the above heat equation into
room is prone to changes due to the surrounding an explicit method using the second-order central Finite
temperature. How can we ensure that we maintain the Difference Method. Therefore, explicitly we can write the
room temperature for the longest possible time without the one-dimensional heat equation as:
use of an air conditioner? If the walls of the room are bad 𝑈𝑗𝑛+1 − 𝑈𝑗𝑛 𝑛
𝑈𝑗+1 − 2𝑈𝑗𝑛 + 𝑈𝑗−1
𝑛

insulators of heat, it is almost impossible to maintain the = 𝛼� �


𝜏 ℎ2
room temperature. This is when it is important that we This equation can then be implemented and solved easily
maximize the materials and knowledge that we have to using Mat lab or other languages. The value should be
build a wall that would keep the room temperature much smaller than 1, other-wise you get unexpected errors.
constant. It is possible that one can just buy building In this case, we assume that is a constant although later we
materials with low thermal conductivity. However, the are going to see that alpha could be de need as a function
constraints are that we have a variety of bad and good that depends on space. As we can see, the heat equation in
thermal conductors and we are trying to build the best 1-D explicit form is straight forward because the right side
congruation with the materials that we have. has only one term.

To answer these questions, we have created materials with In a metal rod with non-uniform temperature, heat
different thermal conductivities arranged different ways. (thermal energy) is transferred from regions of higher
We are more interested in two cases: temperature to regions of lower temperature. Three
I. what happens to the heat ow when we reverse the physical principles are used here.
order of thermal conductivities and I. Heat (or thermal) energy of a body with uniform
properties: Heat 𝑒𝑛𝑒𝑟𝑔𝑦 = 𝑐𝑚𝑢, where m is the
IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 915
ISSN 2229-5518

𝑥+∆𝑥
body mass, u is the temperature, c is the specific
heat, units [𝑐] = 𝐿2 𝑇 − 2𝑈 − 1 (basic units are M 𝑐𝑝 𝜌 � [𝑢(𝜉𝑡 + ∆𝑡) − 𝑢(𝜉𝑡 + ∆𝑡)]𝑑𝜉
mass, L length, T time, U temperature). c is the 𝑥−∆𝑥
𝑡+∆𝑡 𝑥+∆𝑥
energy required to raise a unit mass of the 𝜕𝑢
= 𝑐𝑝 𝜌 � � 𝑑𝜉𝑑𝜏
substance 1 unit in temperature. 𝜕𝜏
𝑡−∆𝑡 𝑥−∆𝑥
II. Fourier’s law of heat transfer: rate of heat
transfers proportional to negative temperature where the fundamental theorem of calculus was used. If no
gradient, Rate of heat transfer 𝜕𝑢 = −𝐾𝑜 (1) area work is done and there are neither heat sources nor sinks,
𝜕𝑥 where 𝐾𝑜 is the thermal conductivity, units the change in internal energy in the interval [𝑥 − 𝛥𝑥, 𝑥 + 𝛥𝑥]
[𝐾𝑜 ] = 𝑀𝐿𝑇 − 3𝑈 − 1. In other words, heat is
is accounted for entirely by the flux of heat across the
transferred from areas of high temp to low temp.
boundaries. By Fourier's law, this is
III. Conservation of energy: Consider a uniform rod
of length l with non-uniform temperature lying on 𝑡+∆𝑡
𝜕𝑢 𝜕𝑢
the x-axis from 𝑥 = 0 𝑡𝑜 𝑥 = 𝑙. By uniform rod, 𝑘 � � (𝑥 + ∆𝑥, 𝜏) − (𝑥 − ∆𝑥, 𝜏)� 𝑑𝜏
𝜕𝑡 𝜕𝑡
we mean the density ρ, specific heat c, thermal 𝑡−∆𝑡
𝑡+∆𝑡 𝑥+∆𝑥
conductivity 𝐾𝑜 , cross-sectional area A are all 𝜕2𝑢
constant. Assume the sides of the rod are insulated =𝑘 � � 𝑑𝜉𝑑𝜏
𝜕𝜉 2
and only the ends may be exposed. Also assume 𝑡−∆𝑡 𝑥−∆𝑥

there is no heat source within the rod. Again, by the fundamental theorem of calculus. By
conservation of energy,

IJSER
2 Derivation of Heat Equation
2.1 From Fourier’s Law 𝑡+∆𝑡 𝑥+∆𝑥

The heat equation is derived from Fourier's law and � � �𝑐𝑝 𝜌𝑢𝜏 − 𝑘𝑢𝜉𝜉 � 𝑑𝜉𝑑𝜏 = 0
conservation of energy (Cannon 1984). By Fourier's law, the 𝑡−∆𝑡 𝑥−∆𝑥
rate of flow of heat energy per unit area through a surface
This is true for any rectangle [𝑡 − 𝛥𝑡, 𝑡 + 𝛥𝑡] × [𝑥 −
is proportional to the negative temperature gradient across
𝛥𝑥, 𝑥 + 𝛥𝑥]. By the fundamental lemma of the calculus of
the surface,
𝑞 = −𝑘𝛻𝑢 variations, the integrand must vanish identically:
Where k is the thermal conductivity and u is the
𝑐𝑝 𝜌𝑢𝑡 − 𝑘𝑢𝑥𝑥 = 0
temperature. In one dimension, the gradient is an ordinary
spatial derivative, and so Fourier's law is Which can be rewritten as:

𝜕𝑢 𝑘 𝜕𝑢 𝑘 𝜕2𝑢
𝑞 = −𝑘 𝑢𝑡 = 𝑢𝑥𝑥 𝑜𝑟 =
𝜕𝑥 𝑐𝑝 𝜌 𝜕𝑡 𝑐𝑝 𝜌 𝜕𝑥 2
In the absence of work done, a change in internal energy Which is the heat equation, where the coefficient (often
per unit volume in the material, ΔQ, is proportional to the denoted α), 𝛼 = 𝑘/𝑐𝑝 𝜌 is called the thermal diffusivity.
change in temperature, 𝛥𝑢 (in this section only, Δ is the An additional term may be introduced into the equation to
ordinary difference operator with respect to time, not the account for radiative loss of heat, which depends upon the
Laplacian with respect to space). That is, 𝛥𝑄 = 𝑐𝑝 𝜌𝛥𝑢. excess temperature 𝑢 = 𝑇 − 𝑇𝑠 at a given point compared
Where cp is the specific heat capacity and ρ is the mass with the surroundings. At low excess temperatures, the
density of the material. Choosing zero energy at absolute radiative loss is approximately 𝜇𝑢, giving a one-
zero temperature, this can be rewritten as 𝛥𝑄 = 𝑐𝑝 𝜌𝑢. dimensional heat-transfer equation of the form
𝜕𝑢 𝑘 𝜕2𝑢
= − 𝜇𝑢
The increase in internal energy in a small spatial region of 𝜕𝑡 𝑐𝑝 𝜌 𝜕𝑥 2
the material 𝑥 − 𝛥𝑥 ≤ 𝜉 ≤ 𝑥 + 𝛥𝑥 over the time period
At high excess temperatures, however, the Stefan–
𝑡 − 𝛥𝑡 ≤ 𝜏 ≤ 𝑡 + 𝛥𝑡 is given by,
Boltzmann law gives a net radiative heat-loss proportional
to 𝑇 4 − 𝑇𝑠4 , and the above equation is inaccurate. For large
excess temperatures, 𝑇 4 − 𝑇𝑠4 ≈ 𝑢4 giving a high-
temperature heat-transfer equation of the form

IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 916
ISSN 2229-5518

𝜕𝑢 𝜕2𝑢
= 𝛼 � 2 � − 𝑚𝑢4
𝜕𝑡 𝜕𝑥 𝐻𝑒𝑎𝑡 𝑓𝑙𝑢𝑥 𝑒𝑛𝑡𝑒𝑟𝑖𝑛𝑔 𝑜𝑟 𝑙𝑒𝑎𝑣𝑖𝑛𝑔 𝑎 𝑟𝑒𝑔𝑖𝑜𝑛 = 𝜎 � ∇𝑇. 𝑛𝑑𝑆
𝜕𝑅
Where 𝑚 = 𝜖𝜎𝑝/𝜌𝐴𝑐𝑝 . Here, σ is Stefan's constant, ε is a
characteristic constant of the material, p is the sectional = 𝜎 � ∇. ∇𝑇𝑑𝑥 … … … … … … … . (𝑖𝑖𝑖)
perimeter of the bar and A is its cross-sectional area. 𝑅

However, using T instead of u gives a better approximation This should be the total rate at which heat enters or leaves
in this case. the region R, which in turn should correspond to the rate of
change of the total amount of heat energy contained in the
region:
2.2 Using a Rod Pipe
Heat is the energy transferred from one body to another 𝑑𝐻 𝜕𝑇
= 𝑘𝑠 � 𝜌 𝑑𝑥 … … … … … … … … . (𝑖𝑣)
due to a difference in temperature. (Better: heat is the 𝑑𝑇 𝜕𝑡
𝑅
kinetic energy of the molecules that compose the material.
Consider a long uniform tube surround by an insulating Equating (iii) and (iv) we obtain
material like stir form along its length, so that heat can flow
in and out only from its two ends: 𝜕𝑇
𝜎 � ∇. ∇𝑇𝑑𝑥 = 𝑘𝑠 � 𝜌 𝑑𝑥
𝜕𝑡
𝑅 𝑅

Since the region R can be chosen arbitrarily, the two

IJSER
There are two basic physical principle governing the
integrands must coincide at every point of the body. We
motion of heat.
a) The total heat energy H contained in a uniform, thus obtain the heat equation
homogeneous body is related to its temperature T 𝜌𝑘𝑠 𝜕𝑇
and mass in the following simple way ∇2 𝑇 − =0
𝜎 𝜕𝑡
𝐻 = 𝑘𝑠 𝑀𝑇
Where 𝑘𝑠 is the specific heat capacity of the In such a situation we can assume that the temperature
material ( a measurable constant specific to the really only6 depends on the position x along the length of
material from with the body is made). More the heat pipe. Then
generally, in a situation for which neither the
𝜕2𝑇 𝜕2𝑇 𝜕2𝑇 𝜕2𝑇
temperature nor the density of the material is ∇2 𝑇 ≡ + + ≈
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝜕𝑥 2
constant we have
And the heat equation reduces to a 2-dimensional PDE of
𝐻(𝑡)
the form

= 𝑘𝑠 � 𝜌(𝑥)𝑇(𝑥, 𝑡)𝑑𝑥 … … … … … … … … … … … . (𝑖) 𝜕𝑇 𝜕2𝑇


− 𝛼 2 2 = 0 … … … … … … … . . (𝑣)
𝑣 𝜕𝑡 𝜕𝑥
b) The rate of heat transfer across a portion S of the
𝜌𝑘𝑠
boundary of a region R of the body is proportional 𝑊ℎ𝑒𝑟𝑒, 𝛼=�
𝜎
directional derivative of T across the boundary and
the area of contact (Replacing the ratio
𝜎
by 𝛼 2 will prove convenient later
𝜌𝑘𝑠
𝐻𝑒𝑎𝑡 𝑓𝑙𝑢𝑥 𝑎𝑐𝑟𝑜𝑠𝑠 𝑆
on.)
= 𝜎 � ∇𝑇. 𝑛𝑑𝑆 … … … … … … … … . . (𝑖𝑖) Or
𝑆
We will now derive the heat equation with an external
Where n=n(x) is the direction normal to the surface
source,
of contact at the point x, and 𝜎 is another constant
specific to the material from with the body is 𝑢𝑡 = 𝛼 2 𝑢𝑥𝑥 + 𝐹(𝑥, 𝑡), 0 < 𝑥 < 𝐿, 𝑡 > 0,
constructed. 𝜎is called heat conductivity constant.
Applying Gauss’s divergence theorem to (ii) we have

IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 917
ISSN 2229-5518

𝑘 1
where u is the temperature in a rod of length L, 𝛼 2 is a 𝑤ℎ𝑒𝑟𝑒, 𝛼 2 = , 𝐹(𝑥, 𝑡) = 𝑓(𝑥, 𝑡) are the diffusivity of the
𝑐𝜌 𝑐𝜌
diffusion coefficient, and 𝐹(𝑥, 𝑡) represents an external heat rod and the heat source density respectively.
source. We begin with the following assumptions: Since this equation holds on an arbitrary segment of the
• The rod is made of a homogeneous material. rod, it follows that the integrand must vanish everywhere
• The rod is laterally insulated, so that heat flows in the rod, which yields the equation
only in the x-direction. 𝑢𝑡 = 𝛼 2 𝑢𝑥𝑥 + 𝐹(𝑥, 𝑡)
• The rod is sufficiently thin so that the It is worth noting that the diffusivity 𝛼 2 = 𝑘/𝑐𝜌 is
temperature within any particular cross-section is proportional to the conductivity, but inversely proportional
constant. to the thermal capacity and the density. Physically, this
These last two assumptions are used to allow us to treat the makes sense because the more an object tends to store heat,
problem as one-dimensional. As we will see, the first and the denser it is, the more difficult it should be for heat
assumption is not absolutely necessary, but it does simplify energy to diffuse through the object, whereas the better the
certain solution techniques. From the principle of ability of the material to conduct heat, the easier it should
conservation of energy, it follows that the heat within a be for heat energy to move through the object and diffuse.
segment of the rod [𝑥, 𝑥 + 𝛥𝑥] satisfies the following:
Net change inside [𝑥, 𝑥 + 𝛥𝑥] = Net inward flux across
boundaries + Total heat generated inside [𝑥, 𝑥 + 𝛥𝑥]
The total amount of heat, in calories, in any segment [𝑎, 𝑏] 2.3 Heat equation properties
is given by We would like to solve the heat (diffusion) equation,
𝑏
𝑢𝑡 − 𝑘𝛥𝑢 = 0. And obtain a solution formula depending on

IJSER
� 𝑐𝜌𝐴𝑢(𝑠, 𝑡)𝑑𝑠 the given initial data, similar to the case of the wave
𝑎 equation. However, the methods that we used to arrive at
where c is the thermal capacity of the rod (also known as
d’Alambert’s solution for the wave IVP do not yield much
the specific heat), ρ is the density of the rod, and A is the
for the heat equation. To see this, recall that the heat
cross-sectional area of the rod. In view of our assumptions,
equation is of parabolic type, and hence, it has it has only
c, ρ and A are constants. Also, recall that the flux from left
one family of characteristic lines. If we rewrite the equation
to right at x = a is given by −𝑘𝑢𝑥 (𝑎, 𝑡), where k is the
in the form
thermal conductivity of the rod. Putting all of these facts 𝑘𝑢𝑥𝑥 + ⋯ … … … = 0,
together, we can translate the conservation relation into the Where the dots stand for the lower order terms, then you
equation can see that the coefficients of the leading order terms are
𝑥+∆𝑥
𝐴 = 𝑘, 𝐵 = 𝐶 = 0
𝑐𝜌𝐴 � 𝑢𝑡 (𝑠, 𝑡) 𝑑𝑠 The slope of the characteristics lines will be given by,
𝑥
𝑑𝑡 𝐵 ± √∆
= 𝑘𝐴[𝑢𝑥 (𝑥 + ∆𝑥, 𝑡) − 𝑢𝑥 (𝑥, 𝑡)] = =0
𝑥+∆𝑥 𝑑𝑥 2𝐴
+ 𝐴 � 𝑓(𝑠, 𝑡) 𝑑𝑠 Consequently, the single family of characteristics lines will
be given by
𝑥
where 𝑓(𝑥, 𝑡) is the amount of heat generated by the 𝑡=𝑐
external source per unit of length per unit of time. Note that These characteristic lines are not very helpful, since they are
we must use inward flux, which is why the flux term at parallel to the x axis. Thus, one cannot trace points in the 𝑥𝑡
𝑥 = 𝐿 must be negated. Applying the Fundamental plane along the characteristics to the x axis, along which the
Theorem of Calculus “in reverse”, initial data is defined. Notice that there is also no way to
𝑏 factor the heat equation into first order equations, either, so
𝑓(𝑏) − 𝑓(𝑎) = � 𝑓′(𝑠) 𝑑𝑠 the methods used for the wave equation do not shed any
𝑎 light on the solutions of the heat equation. Instead, we will
we obtain, after dividing both sides by A, study the properties of the heat equation, and use the
𝑥+∆𝑥 𝑥+∆𝑥
gained knowledge to devise a way of reducing the heat
𝑐𝜌 � 𝑢𝑡 (𝑠, 𝑡) 𝑑𝑠 = � 𝑘𝑢𝑥𝑥 (𝑠, 𝑡) + 𝑓(𝑠, 𝑡) 𝑑𝑠 equation to an ODE, as we have done for every PDE, as we
𝑥 𝑥 have solved so far.
Rearranging yields
𝑥+∆𝑥
3 Analytical Solution of Heat Equation
� 𝑢𝑡 (𝑠, 𝑡) 𝑑𝑠 − 𝛼 2 𝑢𝑥𝑥 (𝑠, 𝑡) − 𝐹(𝑠, 𝑡)𝑑𝑠 = 0
3.1 Method of Characteristics
𝑥

IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 918
ISSN 2229-5518

In mathematics, the method of characteristics is a technique Evidently, 𝜏(𝑥, 𝑡) represents the discrepancy between the
for solving partial differential equations. Typically, it actual solution and the final steady state solution. Plugging
applies to first-order equations, although more generally the righthand side of (vi) into equations (i) and (ii) we find
the method of characteristics is valid for any hyperbolic 𝑑2 𝑇𝑠𝑠 𝜕𝑇
(noting again = 0 = 𝑠𝑠)
𝑑𝑥 2 𝜕𝑡
partial differential equation. The method is to reduce a 𝜕𝜏 𝜕2𝜏
partial differential equation to a family of ordinary − 𝛼2 2 = 0
𝜕𝑡 𝜕𝑥
differential equations along which the solution can be 𝐴𝑛𝑑 𝑇1 = 𝑇(0, 𝑡) = 𝑇𝑠𝑠 (0) + 𝜏(0, 𝑡) = 𝑇1 + 𝜏(0, 𝑡)
integrated from some initial data given on a suitable hyper => 𝜏(0, 𝑡) = 0
surface. The equations in the problems we have 𝑇2 = 𝑇(𝐿, 𝑡) = 𝑇𝑠𝑠 (𝐿) + 𝜏(𝐿, 𝑡) = 𝑇2 + 𝜏(𝐿, 𝑡)
investigated so far are all linear and the terms containing => 𝜏(𝐿, 𝑡) = 0
𝑇2 − 𝑇1
the unknown function and its derivatives have constants 𝑓(𝑥) = 𝑇(𝑥, 0) = 𝑇𝑠𝑠 (𝑥) + 𝜏(𝑥, 0) = 𝑥 + 𝑇1 + 𝜏(𝑥, 0)
𝐿
coefficients. The only exception is the type of problem 𝑇2 − 𝑇1
when we need to make use of polar coordinates, but in such => 𝜏(𝑥, 0) = 𝑓(𝑥) − 𝑥 − 𝑇1
𝐿
2
problems the polar radius is present in some of the 𝜕𝜏 𝜕 𝜏
𝑇ℎ𝑢𝑠 𝜏(𝑥, 𝑡) 𝑠𝑎𝑡𝑖𝑠𝑓𝑖𝑒𝑠 − 𝛼 2 2 = 0,
coefficients in a very specific way, which does not disturb 𝜕𝑡 𝜕𝑥
𝜏(0, 𝑡) = 0, 𝜏(𝐿, 𝑡) = 0, 𝜏(𝑥, 0) = 𝐹(𝑥)
the solution scheme.
𝑇2 − 𝑇1
𝑊ℎ𝑒𝑟𝑒 𝐹(𝑥) = 𝑓(𝑥) − 𝑥 − 𝑇1
𝐿
In other words, a PDE / BVP of the form (v), (vi), (vii). We
can thus conclude from the results of the last section that

𝛼𝑛𝜋 2 𝑛𝜋

IJSER
� 𝑡
𝜏(𝑥, 𝑡) = � 𝑐𝑛 𝑒 −� 𝐿 sin( 𝑥) ,
𝐿
3.2 Solution of Heat Equation 𝑛=0
𝐿
Let us now consider the solution of the 1-dimensional heat 2 𝑛𝜋
𝑤ℎ𝑒𝑟𝑒 𝑐𝑛 = � 𝐹(𝑥) sin( 𝑥) 𝑑𝑥
equation 𝐿 𝐿
0
𝜕𝑇 𝜕2𝑇
− 𝛼 2 2 = 0 … … … … … … … … … (𝑖) Hence, the solution of equations (i) and (ii) is
𝜕𝑡 𝜕𝑥 ∞
Subject to non-homogeneous boundary conditions 𝑇2 − 𝑇1 𝛼𝑛𝜋 2 𝑛𝜋
𝑇(𝑥, 𝑡) = 𝑥 + 𝑇1 + � 𝑐𝑛 𝑒 −� 𝐿 � 𝑡 sin( 𝑥)
𝑇(0, 𝑡) = 𝑇1 , 𝑇(𝐿, 𝑡) = 𝑇2 , 𝑇(𝑥, 0) = 𝑓(𝑥) … … … … … … … (𝑖𝑖) 𝐿 𝐿
𝑛=0
Which might correspond to a situation where a long rod 𝐿
2 𝑇2 − 𝑇1 𝑛𝜋
with an initial temperature distribution f(x) has its two ends 𝑤ℎ𝑒𝑟𝑒 𝑐𝑛 = � �𝑓(𝑥) − 𝑥 − 𝑇1 � sin( 𝑥) 𝑑𝑥
𝐿 𝐿 𝐿
inserted into different heat baths that are maintained at 0
different temperatures.
Since we expect that eventually as 𝑡→∞ the rod will 3.3 Problem Solve
eventually reach a steady state temperature distribution (a) Problem solve by separation of variable
Consider the initial boundary value problem
that is independent of time, we shall suppose that if
𝜕𝑢 𝜕 2 𝑢
𝑓𝑜𝑟 𝑡 𝑠𝑢𝑓𝑓𝑖𝑐𝑖𝑒𝑛𝑡𝑙𝑦 𝑙𝑎𝑟𝑔𝑒 𝑇(𝑥, 𝑡) ≈ 𝑇𝑠𝑠 (𝑥) = ; 0 < 𝑥 < 1, 𝑢(0, 𝑡) = 𝑢(1, 𝑡) = 0, 𝑢(𝑥, 0) = sin 𝑥
Where 𝑇𝑠𝑠 (𝑥) is the (as yet undetermined) final steady state 𝜕𝑡 𝜕𝑥 2
𝜕𝑢 𝜕2 𝑢
temperature distribution. Since even for large t, T(x,t) must Solution: 𝐺𝑖𝑣𝑒𝑛 = 2 … … … … … … … (𝑖)
𝜕𝑡 𝜕𝑥
still satisfy (i), (ii) , we have for sufficiently large t 𝑢(0, 𝑡) = 𝑢(1, 𝑡) = 0, 𝑢(𝑥, 0) = sin 𝑥 … … … … … … … . . (𝑖𝑖)
𝜕𝑇𝑠𝑠 𝜕 2 𝑇𝑠𝑠 𝜕 2 𝑇𝑠𝑠 Let,
0= − 𝛼2 2
=> = 0 … … … … … … … (𝑖𝑖𝑖) 𝑢(𝑥, 𝑡) =
𝜕𝑡 𝜕𝑥 𝜕𝑥 2
𝑎𝑛𝑑 𝑇𝑠𝑠 (0) = 𝑇1 , 𝑇𝑠𝑠 (𝐿) = 𝑇2 … … … … … … … … . . (𝑖𝑣) 𝑋(𝑥)𝑇(𝑡) … … … … . . (𝑖𝑖𝑖) [𝑊ℎ𝑒𝑟𝑒 𝑋 𝑖𝑠 𝑎 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑥 𝑎𝑛𝑑 𝑇 𝑖𝑠 𝑎 𝑓𝑢𝑛𝑐
𝜕 2 𝑇𝑠𝑠 𝜕𝑢 𝜕𝑢 𝜕2𝑢
𝑇ℎ𝑒 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑡𝑖𝑎𝑙 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 = 𝑋𝑇 ′ 𝑎𝑛𝑑 = 𝑋 ′ 𝑇 => 2 = 𝑋′′𝑇
𝜕𝑥 2 𝜕𝑡 𝜕𝑥 𝜕𝑥
= 0 𝑖𝑚𝑝𝑙𝑖𝑒𝑠 𝑇𝑠𝑠 𝑖𝑠 𝑎 𝑙𝑖𝑛𝑒𝑎𝑟 𝑓𝑢𝑛𝑐𝑡𝑖𝑜𝑛 𝑜𝑓 𝑥, From equation (i) we get,
𝑇𝑠𝑠 (𝑥) = 𝐴𝑥 + 𝐵 𝑇 ′ 𝑋 ′′
𝑋𝑇 ′ = 𝑋 ′′ 𝑇 => =
And the boundary conditions (iv) require the constants A 𝑇 𝑋
and B to be Since X is a function of x and T is a function of t and they
𝑇2 − 𝑇1 are equal. So they must be equal to constant.
𝐵 = 𝑇1 𝑎𝑛𝑑 𝐴 = 𝑇 ′ 𝑋 ′′
𝐿 ∴ = = −𝜆2 (𝑆𝑎𝑦)
𝑇2 − 𝑇1 𝑇 𝑋
𝑇ℎ𝑢𝑠 𝑇𝑠𝑠 (𝑥) = 𝑥 + 𝑇1 … … … … … … … (𝑣) 𝑋 ′′ 𝑇′
𝐿
∴ = −𝜆2 𝑎𝑛𝑑 = −𝜆2
Let us now define an auxiliary function 𝜏 (𝑥, 𝑡) by 𝑋 𝑇
𝑇(𝑥, 𝑡) = 𝑇𝑠𝑠 (𝑥) + 𝜏 (𝑥, 𝑡) … … … … … … … . (𝑣𝑖)
IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 919
ISSN 2229-5518

=> 𝑋 ′′ + 𝜆2 𝑋 = 0 … … … … … … … (𝑖𝑣), 𝑇 ′′ + 𝜆2 𝑇 𝜕𝑢
=> = −𝑛𝜋[𝑢(𝑥, 𝑡) cos 𝑛𝜋𝑥]10
= 0 … … … … … … … (𝑣) 𝜕𝑡
1
Solution of (iv) is,
𝑋(𝑥) = 𝑐1 cos 𝜆𝑥 + 𝑐2 sin 𝜆𝑥 + 𝑛𝜋 �(−𝑛𝜋 sin 𝑛𝜋𝑥) 𝑢(𝑥, 𝑡)𝑑𝑥
Solution of (v) is, 0
2
𝑇(𝑡) = 𝑐3 𝑒 −𝜆 𝑡 1
From equation (iii) we get, 𝜕𝑣
=> = 0 − 𝑛2 𝜋 2 � 𝑢(𝑥, 𝑡) sin 𝑛𝜋𝑥 𝑑𝑥 [∵ 𝑈(0, 𝑡)
2
𝑢(𝑥, 𝑡) = (𝑐1 cos 𝜆𝑥 + 𝑐2 sin 𝜆𝑥). 𝑐3 𝑒 −𝜆 𝑡 𝜕𝑡
0
=> 𝑢(𝑥, 𝑡) = (𝐴 cos 𝜆𝑥 = 𝑈(1, 𝑡) = 0]
2
+ 𝐵 sin 𝜆𝑥 )𝑒 −𝜆 𝑡 … … … … … . (𝑣𝑖) [𝑤ℎ𝑒𝑟𝑒 𝐴
= 𝑐1 𝑐3 𝑎𝑛𝑑 𝐵 = 𝑐2 𝑐3 ] 𝑑𝑣
=> = −𝑛2 𝜋 2 𝑣 [𝐹𝑟𝑜𝑚 (𝑖𝑖𝑖)]
Now, applying initial condition we get, 𝑑𝑡
2
𝑢(0, 𝑡) = (𝐴. 1 + 𝐵. 0)𝑒 −𝜆 𝑡 𝑑𝑣
=> 0 = 𝐴𝑒 −𝜆 𝑡
2
=> = −𝑛2 𝜋 2 𝑑𝑡
2 𝑣
∴ 𝐴 = 0 �𝑠𝑖𝑛𝑐𝑒 𝑒 −𝜆 𝑡 ≠ 0�
Again, => ln 𝑣 = −𝑛2 𝜋 2 𝑡 + ln 𝐴 [𝐼𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑛𝑔]
2
𝑢(1, 𝑡) = (𝐴 cos 𝜆 + 𝐵 sin 𝜆)𝑒 −𝜆 𝑡 => 𝑣 = 𝐴𝑒 −𝑛
2 𝜋2 𝑡
… … … … … … … … … … … (𝑖𝑣)
−𝜆2 𝑡
=> 0 = 𝐵 sin 𝜆 𝑒
=> sin 𝜆 = 0 = sin 𝑛𝜋 => 𝑣(𝑛, 𝑡) = 𝐴𝑒 −𝑛
2 𝜋2 𝑡

∴ 𝜆 = 𝑛𝜋
Now putting the value of 𝜆 and A in (vi) we get, => 𝑣(𝑛, 0) = 𝐴 [𝑎𝑡 𝑡 = 0]

IJSER
2 2
𝑢(𝑥, 𝑡) = 𝑒 −𝑛 𝜋 𝑡 . 𝐵 sin 𝑛𝜋𝑥 … … … … … … … … (𝑣𝑖𝑖) 1
=> 𝑢(𝑥, 0) = 𝐵 sin 𝑛𝜋𝑥
=> � 𝑢(𝑥, 0) sin 𝑛𝜋𝑥 𝑑𝑥 = 𝐴
=> sin 𝑥 = 𝐵 sin 𝑛𝜋𝑥
1 0
It is possible if 𝐵 = 1 𝑎𝑛𝑑 𝑛 =
𝜋
1
Now from equation (vii) we get,
𝑢(𝑥, 𝑡) = 𝑒 − 𝑡 sin 𝑥 => � sin 𝑥 sin 𝑛𝜋𝑥 𝑑𝑥 = 𝐴 [∵ 𝑈(𝑥, 0) = sin 𝑥]
Which is the required solution. 0
1
1
(b) Problem solve by Fourier Transformation => 𝐴 = � 2 sin 𝑥 sin 𝑛𝜋𝑥 𝑑𝑥
2
Consider the initial boundary value problem 1
0

𝜕𝑢 𝜕 2 𝑢 1
= ; 0 < 𝑥 < 1, 𝑢(0, 𝑡) = 𝑢(1, 𝑡) = 0, 𝑢(𝑥, 0) = sin 𝑥 = �[cos(𝑛𝜋 − 1)𝑥 − cos(𝑛𝜋 + 1)𝑥] 𝑑𝑥
𝜕𝑡 𝜕𝑥 2 2
Solution: Given that, 0

𝜕𝑢 𝜕 2 𝑢 1 1
= … … … … … … … (𝑖) 1 1
𝜕𝑡 𝜕𝑥 2 => 𝐴 = � cos(𝑛𝜋 − 1)𝑥 𝑑𝑥 − � cos(𝑛𝜋 + 1)𝑥 𝑑𝑥
Taking finite Fourier Sine Transformation, we get, 2 2
0 0
1 1
𝜕𝑢 𝑛𝜋𝑥 𝜕2𝑢 𝑛𝜋𝑥 1 1
� sin 𝑑𝑥 = � 2 sin 𝑑𝑥 … … … … … … … … … . (𝑖𝑖) 1 cos(𝑛𝜋 − 1)𝑥 1 cos(𝑛𝜋 + 1)𝑥
𝜕𝑡 1 𝜕𝑥 1 => 𝐴 = � � − � �
0 0 2 (𝑛𝜋 − 1) 2 (𝑛𝜋 + 1)
1 0 0

𝐿𝑒𝑡, 𝑣 = 𝑣(𝑛, 𝑡) = � 𝑢(𝑥, 𝑡) sin 𝑛𝜋𝑥 𝑑𝑥 … … … … … … (𝑖𝑖𝑖) 1 cos(𝑛𝜋 − 1) cos(𝑛𝜋 + 1)


=> 𝐴 = � − �
1
0
1 2 (𝑛𝜋 − 1) (𝑛𝜋 + 1)
𝜕𝑣 𝜕𝑢 𝜕2𝑢
=> = � sin 𝑛𝜋𝑥 𝑑𝑥 = � 2 sin 𝑛𝜋𝑥 𝑑𝑥 1 −𝑛2 𝜋2 𝑡 cos(𝑛𝜋 − 1) cos(𝑛𝜋 + 1)
𝜕𝑡 𝜕𝑡 𝜕𝑥 ∴𝑣= 𝑒 � − �
0
1
0 2 (𝑛𝜋 − 1) (𝑛𝜋 + 1)
1
𝜕𝑣 𝜕𝑢 𝜕𝑢
=> = � sin 𝑛𝜋𝑥� − � 𝑛𝜋 cos 𝑛𝜋𝑥 . 𝑑𝑥 By inverse Sine Transformation we get,
𝜕𝑡 𝜕𝑡 0 𝜕𝑡
0
1 ∞
𝜕𝑢 2 1 2 2 cos(𝑛𝜋 − 1) cos(𝑛𝜋 + 1)
= 0 − 𝑛𝜋 � cos 𝑛𝜋𝑥 𝑑𝑥 𝑢(𝑥, 𝑡) = � 𝑒 −𝑛 𝜋 𝑡 � − � sin 𝑛𝜋𝑥
𝜕𝑡 1 2 (𝑛𝜋 − 1) (𝑛𝜋 + 1)
0 𝑛=1


2 𝜋2 𝑡 cos(𝑛𝜋 − 1) cos(𝑛𝜋 + 1)
𝑢(𝑥, 𝑡) = � 𝑒 −𝑛 � − � sin 𝑛𝜋𝑥
(𝑛𝜋 − 1) (𝑛𝜋 + 1)
𝑛=1

IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 920
ISSN 2229-5518

Which is our required solution. Taking inverse Laplace Transformation we get,

(b) Problem solve by Laplace Transformation 𝑢(𝑥, 𝑡) = 𝑒 −𝑡 sin 𝑥


Consider the initial boundary value problem
𝜕𝑢 𝜕 2 𝑢 Which is the required solution.
= ; 0 < 𝑥 < 1, 𝑢(0, 𝑡) = 𝑢(1, 𝑡) = 0, 𝑢(𝑥, 0) = sin 𝑥
𝜕𝑡 𝜕𝑥 2
Solution: Given that 4 Experiments and results
𝜕𝑢 𝜕 2 𝑢 We develop a computer program (code) in Matlab
= … … … … … … … (𝑖) programming of scientific computing and implement
𝜕𝑡 𝜕𝑥 2
Now taking Laplace Transformation on both sides we get, analytic solution for a heat equation. The main parts of the
implementation of our analytic scheme are given as in the
𝜕𝑢 𝜕2𝑢 following algorithm:
𝐿 � � = 𝐿 � 2�
𝜕𝑡 𝜕𝑥
𝑑2𝑢 Input: nt and nx are the numbers of grid points of time and
=> 𝑠𝑢 − 𝑢(𝑥, 0) =
𝑑𝑥 2 space respectively. k and h are the right end points of [0,k]
𝑑2𝑢 and [0,h].
=> − 𝑠𝑢 = −𝑢(𝑥, 0)
𝑑𝑥 2 uo is as a initial condition and ua as a boundary condition.
𝑑2𝑢
=> 2 − 𝑠𝑢 = − sin 𝑥 … … … … … . (𝑖𝑖) Output: u(t,x) is the solution matrix.
𝑑𝑥

𝐶𝑜𝑚𝑝𝑙𝑒𝑡𝑒 𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 = 𝑐1 𝑒 √𝑠𝑥 + 𝑐2 𝑒 −√𝑠𝑥 Step 1: Initialization:


k=t(2)-t(1);
sin 𝑥 sin 𝑥 h=x(2)-x(1);

IJSER
𝑃. 𝐼 = − 2
=
𝐷 −𝑠 𝑠+1
Step 2: Calculation of Analytic solution:
Therefore, the general solution of (ii) is for e=2:nt
sin 𝑥 for f=2:nx
𝑢(𝑥, 𝑠) = 𝑐1 𝑒 √𝑠𝑥 + 𝑐2 𝑒 −√𝑠𝑥 + … … … … … … (𝑖𝑖𝑖) z(e,f)=exp(-t(e))*sin(x(f));
𝑠+1
end
Now, 𝑢(0, 𝑡) = 0 end
=> 𝐿{𝑢(0, 𝑡)} = 0 end
=> 𝑢(0, 𝑠) = 0 surf(t,x,u)
Again, 𝑢(1, 𝑡) = 0 title('Figure of Numerical Scheme');
=> 𝐿{𝑢(1, 𝑡)} = 0 xlabel('t-axis');
=> 𝑢(1, 𝑠) = 0
ylabel('x-axis');
Now using the 1st condition in (iii) we get,
Step 3: Print u(t,x)
𝑢(0, 𝑠) = 𝑐1 + 𝑐2 Step 4: Stop
=> 𝑐1 + 𝑐2 = 0
=> 𝑐1 = −𝑐2
To test the accuracy of the implementation of the analytic
Now using the 2nd condition in (iii) we get, scheme, we consider the heat equation. Now we show our
sin 1 results:
𝑢(1, 𝑠) = 𝑐1 𝑒 √𝑠 + 𝑐2 𝑒 −√𝑠 +
𝑠+1
=> 𝑐1 𝑒 √𝑠 − 𝑐1 𝑒 −√𝑠 + 0 = 0
sin 1
�𝑠𝑖𝑛𝑐𝑒 sin 1 = 0.017 so we can write = 0�
𝑠+1
=> 𝑐1 �𝑒 √𝑠 − 𝑒 −√𝑠 � = 0
=> 𝑐1 = 0

∴ 𝑐1 = 𝑐2 = 0

Thus equation (iii) becomes,

sin 𝑥
𝑢(𝑥, 𝑠) =
𝑠+1
IJSER © 2018
http://www.ijser.org
International Journal of Scientific & Engineering Research Volume 9, Issue 9, September-2018 921
ISSN 2229-5518

5 Conclusion
In this paper we have considered the second order heat

IJSER
equation. First, we have shown that fundamentals of heat
equation, analytical solution by using separation of variable
method, Fourier transform method and Laplace transform
method. Finally, we show the analytical solution in Matlab
computer programming. In future work, we implement the
numerical scheme and also compare in heat equation

References
[1] Cannon, John Rozier (1984), The One–Dimensional Heat
Equation.
[2] M. D. Raisinghania, “Ordinary and Partial Differential
Equations”.
[3] From Wikipedia, the free encyclopaedia, “Differential
Equation From Outside Physics”.
[4] Carslaw, H.S.; Jaeger, J.C. (1959), Conduction of Heat in
Solid (2nd ed.), Oxford University Press.
[5] Richard Haberman, “Mathematical Models”, Prentice-
Hall, Inc. 1977.
[6] Clive L. Dym, “Principles of Mathematical Modelling”
Academic press (ELSEVIER)-2004.
[7] Edward J. Beltrami, “Mathematics For Dynamic
Modelling”
[8] John, Fritz (1991), Partial Differential Equations (4th ed.).
[9] Evans, L.C. (1998), Partial Differential Equations.
[10] Duane Harselman, Bruce Littlefield “Mastering
Matlab”.
[11] Unsworth, J.; Duarte, F. J. (1979), "Heat diffusion in a
solid sphere and Fourier Theory”

IJSER © 2018
http://www.ijser.org

View publication stats

You might also like