MAT 142 - COLLEGE MATHEMATICS - Heat, Wave, and
Laplace Equations Practice Material - Set 3
1. Find the general solution to the one-dimensional heat equation
∂u
∂t =c2∂2u
∂x2
subject to the boundary conditions u(0, t) = 0 and u(L, t) = 0, and the initial condition
u(x, 0) = f(x).
Ans. Solution: 1. We will solve the heat equation using the method of separation of variables.
Assume the solution has the form u(x, t) = X(x)T(t).
2. Substituting u(x, t) = X(x)T(t)into the heat equation, we have
X(x)T′(t) = c2X′′(x)T(t)
3. Divide both sides by c2XT to get
T′(t)
c2T(t)=X′′(x)
X(x)=−λ
where we introduce the separation constant −λ.
4. We solve the ODE for X(x):
X′′(x) + λX(x) = 0
with boundary conditions X(0) = 0 and X(L) = 0.
5. The general solution to the ODE for X(x)is
X(x) = Asin(√λx)+Bcos(√λx)
where λ > 0.
6. Apply the boundary conditions X(0) = 0 and X(L) = 0 to find the values of λand the
corresponding eigenfunctions.
7. Next, we solve the ODE for T(t):
T′(t) + c2λT (t) = 0
8. The general solution to the ODE for T(t)is
T(t) = Ce−c2λt
where Cis a constant.
9. The general solution to the heat equation is then given by
u(x, t) =
∞
∑
n=1
(Ansin(√λnx)+Bncos(√λnx))e−c2λnt
where the coefficients Anand Bnare determined by the initial condition u(x, 0) = f(x)and
the orthogonality of the eigenfunctions.
2. Consider the heat equation in one dimension given by ∂u
∂t =c2∂2u
∂x2, where cis a constant.
Given the initial conditions: u(x, 0) = sin(x) + sin(2x)for 0< x < π
and boundary conditions: u(0, t) = 0 u(π, t) = 0
Find the solution to the heat equation.
Ans. Solution: 1. First, we will find the general solution to the heat equation. We will assume
a separation of variables, where u(x, t) = X(x)T(t). Substitute this into the heat equation to
obtain: XT ′=c2X′′TDivide both sides by c2XT to separate variables: T′
c2T=X′′
X=−λ
2. Solve the ordinary differential equation X′′
X=−λwith the boundary conditions X(0) =
X(π) = 0. The general solution to this equation is: X(x) = sin(nπx)for n= 1,2,3, ...
3. Now, solve the ordinary differential equation T′
c2T=−λ. The solution to this equation is:
T(t) = Ae−c2λt
4. Since we have a superposition of solutions, the general solution is given by: u(x, t) =
∑∞
n=1 Bnsin(nπx)e−c2n2π2t
5. Use the initial condition u(x, 0) = sin x+sin 2xto find the coefficients Bn. Since
sin x+sin 2x=∑∞
n=1 Bnsin(nπx), we can use the Fourier sine series to find Bn.
6. Finally, substitute the coefficients Bnback into the general solution to obtain the specific
solution to the heat equation.
3. Find the solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition u(x, 0) = sin(πx)and boundary conditions u(0, t) = u(1, t) = 0,
where 0≤x≤1,t > 0, and kis a positive constant.
Ans. Solution: 1. First, let’s assume the solution can be written in the form of a Fourier sine
series:
u(x, t) =
∞
∑
n=1
Bn(t)sin(nπx)
where Bn(t)are the unknown coefficients we need to find.
2. We can start by finding an expression for ∂u/∂t using the series solution. We have
∂u
∂t =
∞
∑
n=1
dBn
dt sin(nπx)
3. Similarly, let’s find an expression for ∂2u/∂x2using the series solution. We have
∂2u
∂x2=−
∞
∑
n=1
(nπ)2Bn(t)sin(nπx)
4. Substitute the series solution and its derivatives into the heat equation, we get
∞
∑
n=1
dBn
dt sin(nπx) = k
∞
∑
n=1 −(nπ)2Bn(t)sin(nπx)
5. Equating coefficients of sin(nπx)on both sides, we get the following ordinary differential
equation for each Bn(t):
dBn
dt =−k(nπ)2Bn(t)
6. The solution to this ordinary differential equation is
Bn(t) = Ane−(k(nπ)2t)
where Anis a constant.
7. Using the initial condition u(x, 0) = sin(πx), we can determine Bn(0) and hence find An.
Therefore, Bn(t) = e−(k(nπ)2t).
8. Therefore, the solution to the heat equation with the given initial and boundary conditions
is
u(x, t) =
∞
∑
n=1
e−(k(nπ)2t)sin(nπx)
This is the solution to the heat equation subject to the given initial and boundary conditions.
4. Let u(x, t)satisfy the one-dimensional heat equation
ut=uxx
subject to the initial conditions
u(x, 0) = x2sin(πx)
and boundary conditions
u(0, t) = 0
u(1, t) = 0.
Determine u(x, t)for 0≤x≤1and t > 0.
Ans. We start by separating variables u(x, t) = X(x)T(t)and substituting into the heat
equation to obtain
T′
T=X′′
X=−λ
for some constant λ.
1. Solve for X(x): This gives us the ODE
X′′ +λX = 0
with boundary conditions X(0) = 0 and X(1) = 0. The solutions to this ODE are of the form
X(x) = {sin(nπx)if λ=n2π2
sinh(nπx)if λ=−n2π2
where nis a positive integer.
Since we have homogenous boundary conditions, we consider only the sine solutions. So, we
have
Xn(x) = sin(nπx)
for n= 1,2,3, . . ..
2. Solve for T(t): By the separation of variables, T′(t) = −λT (t) = −n2π2T(t). This gives
us
T(t) = cne−n2π2t
for some constant cn.
3. General solution: The general solution to the heat equation is given by
u(x, t) =
∞
∑
n=1
cnsin(nπx)e−n2π2t
4. Apply initial condition: We have u(x, 0) = x2sin(πx) = ∑∞
n=1 cnsin(nπx). By orthogo-
nality, we can determine the coefficients cn. Multiplying by sin(mπx)and integrating from 0 to
1 on both sides, we find
cm=∫1
0
x2sin(πx)sin(mπx)dx
cm=−1
2
(−1)m+ 1
(m2−1)2
5. Final solution: Therefore, the solution to the initial boundary value problem is
u(x, t) =
∞
∑
n=1 −1
2
(−1)n+ 1
(n2−1)2sin(nπx)e−n2π2t
5. Question: Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2where u(x, 0) =
sin(x)and u(0, t) = u(π, t) = 0. Solve this heat equation for u(x, t).
Ans. Solution: 1. We will solve the heat equation using the method of separation of variables.
Let’s assume u(x, t) = X(x)T(t).
2. Substitute u(x, t) = X(x)T(t)into the heat equation ∂u
∂t =k∂2u
∂x2to obtain: X(x)dT
dt =
kT (t)d2X
dx2.
3. Divide both sides by kX(x)T(t)to separate variables: 1
kT (t)
dT
dt =1
X(x)
d2X
dx2.
4. The left side is purely a function of t, while the right side is purely a function of x. Since
these two expressions are equal to a constant, say −λ, we get two equations: 1
k
dT
dt =−λT and
d2X
dx2=−λX.
5. Solve the first ODE with respect to T(t):1
k
dT
dt =−λT ⇒dT
T=−kλdt ⇒ln |T|=
−kλt +C1⇒T(t) = C2e−kλt.
6. Solve the second ODE with respect to X(x):d2X
dx2=−λX. The general solution to this
equation is X(x) = Asin(√λx)+Bcos(√λx).
7. Apply the boundary conditions u(0, t)=0and u(π, t)=0:u(0, t) = X(0)T(t)=0⇒
X(0) = 0 and u(π, t) = X(π)T(t) = 0 ⇒X(π) = 0. This leads to λ=n2where n∈N.
8. The solution for X(x)becomes X(x) = Bsin(nx)where nis a positive integer.
9. Combining the solutions for X(x)and T(t), we have u(x, t) = ∑∞
n=1 Bnsin(nx)e−kn2t.
10. Apply the initial condition u(x, 0) = sin(x):∑∞
n=1 Bnsin(nx) = sin(x). This implies
Bn= 2 ∫π
0sin(x)sin(nx)dx.
11. After calculating the integral, the final solution for u(x, t)is u(x, t) = ∑∞
n=1 2(−1)n+1
(n2−1) sin(nx)e−kn2t.
6. Question: Find the general solution of the heat equation
ut= 4uxx,0< x < π, t > 0
subject to the boundary conditions
u(0, t) = 0, u(π, t) = 0
and the initial condition
u(x, 0) = x(π−x)
Ans. Let’s denote u(x, t)as the solution to the given heat equation. To find the general
solution, we will first find the eigenvalues and eigenfunctions of the equation, and then apply the
method of separation of variables.
1. Eigenvalues and Eigenfunctions: Assume the solution can be written as u(x, t) =
X(x)T(t). Substituting into the heat equation gives us
X(x)T′(t) = 4X′′(x)T(t)
which can be rearranged to
T′(t)
4T(t)=X′′(x)
X(x)=−λ
where λis a constant (the separation constant). These equations can be solved separately to
find the eigenvalues and eigenfunctions.
Solving X′′ (x)
X(x)=−λwith the boundary conditions X(0) = 0 and X(π) = 0 yields
Xn(x) = sin(nx), λ =n2
where n= 1,2,3, ... are the eigenvalues and Xn(x)are the corresponding eigenfunctions.
Solving T′(t)
4T(t)=−λgives
Tn(t) = cne−4n2t
where cnis a constant.
2. General Solution: The general solution is given by a linear combination of the eigen-
functions with the corresponding time functions. Thus, the general solution is
u(x, t) =
∞
∑
n=1
cne−4n2tsin(nx)
3. Determining Constants: To determine the constants cn, we will use the initial condition.
Given u(x, 0) = x(π−x), we have
x(π−x) =
∞
∑
n=1
cnsin(nx)
We can use the orthogonality of sine functions to determine the coefficients cn. Multiplying both
sides by sin(mx)and integrating from 0 to πgives
∫π
0
x(π−x)sin(mx)dx =∫π
0(∞
∑
n=1
cnsin(nx))sin(mx)dx
This simplifies to
π2
2(−1)m=cm
π
2, cm= (−1)m
4. Final Solution: Therefore, the final solution to the heat equation with the given boundary
and initial conditions is
u(x, t) =
∞
∑
n=1
(−1)ne−4n2tsin(nx)
7. Question: Solve the heat equation in one dimension subject to the initial condition u(x, 0) =
sin(2πx)and boundary conditions u(0, t) = 0 and u(π, t) = 0.
Ans. Step-by-step solution: 1. We start by writing the general solution of the heat equation:
u(x, t) =
∞
∑
n=1
Bne−(2πn)2tsin(2πnx)
2. Next, we need to find the coefficients Bnusing the initial condition:
u(x, 0) =
∞
∑
n=1
Bnsin(2πnx) = sin(2πx)
3. To find Bn, we can use the orthogonality property of sine functions:
Bn=2
π∫π
0
sin(2πx)sin(2πnx)dx
4. Evaluating the integral, we obtain:
Bn=2
π∫π
0
1
2[cos(2π(n−1)x)−cos(2π(n+ 1)x)]dx
Bn=1
π[1
2π(n−1) sin(2π(n−1)x)−1
2π(n+ 1) sin(2π(n+ 1)x)]π
0
5. Simplifying and using the boundary conditions, we get:
Bn=1
π[1
2π(n−1) sin(π(n−1)) −1
2π(n+ 1) sin(π(n+ 1))]
Bn=1
π[1
2(n−1)(−1)n−1−1
2(n+ 1)(−1)n+1]
6. Therefore, the solution to the heat equation with the given initial and boundary conditions
is:
u(x, t) =
∞
∑
n=1
1
π[1
2(n−1)(−1)n−1−1
2(n+ 1)(−1)n+1]e−(2πn)2tsin(2πnx)
8. Find the general solution to the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t) = u(L, t) = 0, where u(x, t)is the temperature
distribution along a rod of length L, and kis a positive constant representing thermal diffusivity.
Ans. Let’s denote u(x, t) = X(x)T(t)and substitute it into the heat equation to obtain two
ordinary differential equations:
1. For X(x):
T′(t)
kT (t)=X′′(x)
X(x)
2. For T(t):
T′(t)
kT (t)=−λ
where λis a separation constant.
1. Solving the ODE for X(x):
X′′(x) + λX(x) = 0
The general solution to this second-order ODE is:
X(x) = Acos(√λx)+Bsin(√λx)
Applying the boundary conditions u(0, t) = u(L, t) = 0 gives A= 0 and sin(√λL)= 0.
This further gives: √λL =nπ where n= 1,2,3, ...
So, the eigenvalues are:
λn=(nπ
L)2
And the corresponding eigenfunctions are:
Xn(x) = Bnsin (nπx
L)
2. Solving the ODE for T(t):
T′(t) + kλT (t) = 0
The general solution to this first-order ODE is:
Tn(t) = Cne−kλnt
3. Combining the solutions, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Cne−k(nπ
L)2tsin (nπx
L)
where Cnare constants determined by initial conditions.
9. Question: Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, where kis a
positive constant.
A rod of length Lis insulated along its sides and initially has a temperature distribution given
by u(x, 0) = e−x2/L2. The boundary conditions are u(0, t) = u(L, t) = 0 for all t≥0.
Find the temperature distribution u(x, t)on the rod for t > 0.
Ans. Solution: The general solution to the heat equation in one dimension with fixed boundary
conditions is given by:
u(x, t) = ∑∞
n=1 Bnsin (nπx
L)e−k(nπ
L)2t, where the coefficients Bncan be determined using
the initial condition.
1. Finding the coefficients Bn:
Given the initial condition u(x, 0) = e−x2/L2, we can express this as a Fourier sine series:
e−x2/L2=∑∞
n=1 Bnsin (nπx
L)
Multiplying both sides by sin (mπx
L)and integrating from 0 to L, we get:
∫L
0e−x2/L2sin (mπx
L)dx =∫L
0∑∞
n=1 Bnsin (nπx
L)sin (mπx
L)dx
Using orthogonality of sine functions, the right-hand side reduces to:
Bm=2
L∫L
0e−x2/L2sin (mπx
L)dx
2. Evaluating the integral:
Let u=−x
L, then du =−1
Ldx.
Substituting into the integral, we get:
Bm=−2∫0
0eu2sin(mπu)du
Using the fact that the sine function is odd, this simplifies to:
Bm=−2∫0
0eu2sin(mπu)du = 0
So, all coefficients Bnare zero except for B1.
3. Final expression for temperature distribution:
Therefore, the temperature distribution on the rod for t > 0is given by:
u(x, t) = B1sin (πx
L)e−k(π
L)2t
where B1=2
L∫L
0e−x2/L2sin (πx
L)dx.
10. Find the general solution to the heat equation on the domain 0< x < π,t > 0with initial
condition u(x, 0) = sin(x)and boundary conditions u(0, t) = u(π, t) = 0.
Ans. To solve this problem, we need to use the method of separation of variables.
1. We assume a solution of the form u(x, t) = X(x)T(t).
2. Plugging this into the heat equation ut=kuxx, we get T′
kT =X′′
X. This gives two separated
ODEs: T′
kT =λ=−X′′
X.
3. Solving the ODEs T′=kλT and X′′ +λX = 0 gives solutions T(t) = Ae−kλt and
X(x) = Bsin(√λx).
4. Applying the boundary conditions u(0, t) = 0 and u(π, t) = 0 gives X(0) = 0 and X(π) =
0. This implies that √λ=nwhere nis a positive integer.
5. Therefore, the general solution is given by
u(x, t) =
∞
∑
n=1
cne−kn2tsin(nx),
where the coefficients cncan be determined from the initial condition u(x, 0) = sin(x).
6. Finally, using the initial condition, we have
sin(x) =
∞
∑
n=1
cnsin(nx).
Multiplying both sides by sin(mx)and integrating from 0to πgives
cm=2
π∫π
0
sin(x)sin(mx)dx.
The solution to this problem involves finding the coefficients cnusing the initial condition and
plugging them back into the general solution.
11. Question: Consider the heat equation in one dimension, ut=kuxx, with initial condition
u(x, 0) = x(1 −x)on the interval 0<x<1, and boundary conditions u(0, t) = u(1, t)=0.
Determine the solution u(x, t).
Ans. Step-by-step solution: 1. We first seek a solution of the form u(x, t) = X(x)T(t).
Substituting this into the heat equation, we have:
XT ′=kX′′T
T′
kT =X′′
X=−λ
2. This yields two ordinary differential equations:
T′+kλT = 0
X′′ +λX = 0
Where the general solution of the second equation is X(x) = Acos(√λx)+Bsin(√λx). 3.
Applying the boundary conditions u(0, t) = u(1, t) = 0, we have:
u(0, t) = 0 =
⇒X(0)T(t) = 0
u(1, t) = 0 =
⇒X(1)T(t) = 0
4. From X(0) = 0, we get Acos(0) + Bsin(0) = 0 =⇒A= 0. From X(1) = 0, we
have Acos(√λ)+Bsin(√λ)= 0. 5. The condition A= 0 implies that √λ=nπ for
n= 1,2,3, .... Thus, the eigenpairs are λn= (nπ)2and the corresponding eigenfunctions
are Xn(x) = Bnsin(nπx). 6. The solution to the time-part ODE is Tn(t) = Cne−kn2π2t. 7.
Therefore, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)Cne−kn2π2t
8. To determine the coefficients Bnand Cn, we use the initial condition as follows:
u(x, 0) =
∞
∑
n=1
Bnsin(nπx) = x(1 −x)
9. Multiplying both sides by sin(mπx)and integrating over [0,1] gives us:
∫1
0
sin(mπx)
∞
∑
n=1
Bnsin(nπx)dx =∫1
0
x(1 −x)sin(mπx)dx
10. After applying orthogonality, we can determine Bnand compute the final solution u(x, t).
12. Question: Consider the one-dimensional heat equation
∂u
∂t =c∂2u
∂x2,
subject to the initial condition u(x, 0) = x(1 −x)on the interval 0<x<1, and the boundary
conditions u(0, t) = u(1, t) = 0 for t > 0. Find the solution u(x, t).
Ans. Solution: Let’s first find the general solution to the heat equation. We will then apply the
initial and boundary conditions to determine the specific solution.
1. Finding the general solution: We assume a separation of variables solution of the form
u(x, t) = X(x)T(t). Plugging this into the heat equation yields:
XT ′=cX′′T
Dividing both sides by cXT gives:
T′
cT =X′′
X=−λ
where λis a constant. This gives two ordinary differential equations:
T′+cλT = 0 and X′′ +λX = 0
The solution to the second equation is
X(x) = Asin(√λx)+Bcos(√λx)
Applying the boundary conditions u(0, t) = u(1, t) = 0 gives B = 0 and Asin(√λ)= 0.
Thus, we have solutions of the form Xn(x) = Ansin(nπx), where n= 1,2,3, ....
The solution to the first equation is
T(t) = Ce−cλt
Let’s denote the eigenvalues as λn=n2π2. Thus,
Xn(x) = Ansin(nπx)
Tn(t) = Ce−c(n2π2)t
The general solution is then
u(x, t) =
∞
∑
n=1
Bnsin(nπx)e−c(n2π2)t
2. Applying the initial condition: To find the coefficients Bn, we apply the initial condition
u(x, 0) = x(1 −x):
x(1 −x) =
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating over (0,1) gives
∫1
0
x(1 −x)sin(mπx)dx =Bm∫1
0
sin2(mπx)dx
Solving the integrals gives
Bm= 4 ×(−1)m+1
m3π3
3. Final solution: Therefore, the solution to the heat equation with the given initial and
boundary conditions is:
u(x, t) =
∞
∑
n=1
4(−1)n+1
n3π3sin(nπx)e−c(n2π2)t
13. Find the general solution to the heat equation
ut= 4uxx
subject to the boundary conditions u(0, t) = u(1, t) = 0 for 0< x < 1and the initial condition
u(x, 0) = x(1 −x)for 0< x < 1.
Ans. The general solution to the heat equation is
u(x, t) =
∞
∑
n=1
bne−4n2π2tsin(nπx)
where
bn=2
nπ ∫1
0
x(1 −x)sin(nπx)dx
The solution can be simplified by noticing that the function u(x, 0) = x(1−x)is an odd function
about x= 0.5, so all the bncoefficients will be zero.
14. What is the solution of the heat equation ut=kuxx with the initial condition u(x, 0) = 3x2
for 0< x < 1and boundary conditions u(0, t) = 0 and u(1, t) = 0 for t > 0? Here, kis a
constant representing the thermal diffusivity of the medium.
Ans. To solve the heat equation with the given initial and boundary conditions, we can
use the method of separation of variables. Let’s assume that the solution can be written as
u(x, t) = X(x)T(t). Plugging this into the heat equation, we get:
XT ′=kX′′T
Dividing both sides by kXT gives:
T′
kT =X′′
X=−λ
This leads to the following two equations:
I. T′+kλT = 0 II. X′′ +λX = 0
Beginning with the time equation (I), we have:
T′+kλT = 0
T′
T=−kλ
ln(T) = −kλt +C1
T(t) = C2exp(−kλt)
Now, moving on to the spatial equation (II), we have:
X′′ +λX = 0
The general solution to this ordinary differential equation is:
X(x) = Acos(√λx)+Bsin(√λx)
Applying the boundary conditions u(0, t) = 0 and u(1, t) = 0 yields A= 0 and Bsin(√λ)=
0. Since B= 0 (for λ > 0), we have sin(√λ)= 0 which implies √λ=nπ for n∈Z.
Therefore, λ= (nπ)2and the solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)exp(−k(nπ)2t)
To determine the coefficients Bn, we can use the initial condition u(x, 0) = 3x2:
3x2=
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating from 0 to 1 gives:
∫1
0
3x2sin(mπx)dx =∫1
0(∞
∑
n=1
Bnsin(nπx))sin(mπx)dx
By orthogonality, the right-hand side simplifies to Bn= 0 for n=mand Bm= 6 ∫1
0x2sin(mπx)dx =
6
(πm)2((−1)m−1).
Therefore, the final solution to the heat equation is:
u(x, t) =
∞
∑
n=1
6
(πn)2((−1)n−1) sin(nπx)exp(−k(nπ)2t)
15. Let u(x, t)be the solution to the heat equation
∂u
∂t =k∂2u
∂x2,0< x < l, t > 0
subject to the boundary conditions u(0, t) = 0,u(l, t) = 0, and the initial condition u(x, 0) =
x(l−x). Find the explicit form of the solution u(x, t).
Ans. Solution: 1. We will use the method of separation of variables. Let u(x, t) = X(x)T(t).
Substituting into the heat equation, we have
T′
kT =X′′
X=−λ
2. Solving the time equation T′
kT =−λgives T(t) = Ae−λkt.
3. Solving the spatial equation X′′ +λX = 0 with boundary conditions X(0) = 0 and X(l) =
0, we find that the eigenfunctions are ϕn(x) = √2
lsin (nπx
lwithcorrespondingeigenvaluesλn=
(nπ
l)2.
4. By superposition, the general solution is
u(x, t) =
∞
∑
n=1
Bne−(nπ
l)2kt√2
lsin (nπx
l)
5. To find the coefficients Bn, we use the initial condition u(x, 0) = x(l−x). We have
u(x, 0) =
∞
∑
n=1
Bn√2
lsin (nπx
l)=x(l−x)
6. Multiplying by sin (mπx
l)and integrating from 0 to lgives
Bm=2
l∫l
0
x(l−x)sin (mπx
l)dx
7. Calculating the integral, we find Bm=4
π3m3((−1)m−1).
8. Therefore, the solution to the heat equation with the given initial condition and boundary
conditions is
u(x, t) =
∞
∑
n=1
4
π3n3((−1)n−1)e−(nπ
l)2kt√2
lsin (nπx
l)
16. Question 16:
Consider the Heat Equation in one dimension defined as follows:
∂u
∂t =k∂2u
∂x2
where u(x, t)represents the temperature distribution in a one-dimensional rod of length L,0≤
x≤L, and t > 0. The rod is insulated at both ends, meaning that ∂u
∂x (0, t) = 0 and ∂u
∂x (L, t) = 0
for all t > 0. The initial temperature distribution is given by:
u(x, 0) = 50 + 20x(L−x)
Find the temperature distribution u(x, t)for t > 0.
Ans. Solution: 1. We start by assuming a separation of variables solution to the heat equation,
that is, we assume:
u(x, t) = X(x)T(t)
2. Substituting u(x, t) = X(x)T(t)into the heat equation and dividing by kXT , we get:
1
kT
dT
dt =1
X
d2X
dx2=−λ
3. This gives us two ODEs:
dT
dt +kλT = 0
d2X
dx2+λX = 0
4. The boundary conditions ∂u
∂x (0, t) = 0 and ∂u
∂x (L, t) = 0 simplify to X′(0) = X′(L) = 0.
5. The ODE with boundary conditions has eigenvalues λn=(nπ
L)2and eigenfunctions
Xn(x) = cos (nπx
L).
6. The ODE for T(t)becomes T′(t) + k(nπ
L)2T= 0, which has a solution Tn(t) =
Ane−k(nπ
L)2t.
7. The general solution to the heat equation is given by:
u(x, t) =
∞
∑
n=1
Ancos (nπx
L)e−k(nπ
L)2t
8. Using the initial condition u(x, 0) = 50+20x(L−x), we find the coefficients Anby taking
the inner product of u(x, 0) with cos (mπx
L)and using orthogonality of the eigenfunctions.
9. After finding the coefficients An, we obtain the temperature distribution:
u(x, t) =
∞
∑
n=1 (200(−1)n+1
n2π2)cos (nπx
L)e−k(nπ
L)2t
17. Question: Consider the following partial differential equation:
∂2u
∂t2=c2(∂2u
∂x2+∂2u
∂y2)
where cis a constant and u(x, y, t)is a function of x,y, and t.
Find the general solution to this wave equation.
Ans. Let’s look for a solution of the form u(x, y, t) = X(x)Y(y)T(t). Substituting this into
the given wave equation, we have:
T′′XY =c2(X′′Y T +XY ′′T)
Dividing both sides by XY T gives:
T′′
c2T=X′′
X+Y′′
Y=−λ
This gives us three separate ordinary differential equations:
T′′ +c2λT = 0
X′′ +λX = 0
Y′′ +λY = 0
1. Solving the time equation: The time equation has solutions of the form T(t) =
Asin(ct) + Bcos(ct).
2. Solving the spatial equations: The spatial equations have solutions of the form X(x) =
Csin(nx) + Dcos(nx)and Y(y) = Esin(my) + Fcos(my), where nand mare constants.
3. Combining the solutions: Therefore, the general solution to the wave equation is:
u(x, y, t) = ∑
n,m
(Anm sin(nx)sin(my)sin(ct) + Bnm sin(nx)sin(my)cos(ct) + Cnm cos(nx)sin(my)sin(ct) + Dnm cos(nx)sin(my)cos(ct))
where Anm,Bnm,Cnm, and Dnm are constants that depend on the initial conditions.
18. Let u(x, t)be the solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t) = u(π, t)=0for t > 0and the initial condition
u(x, 0) = sin(x)for 0≤x≤π. Find an expression for u(x, t).
Ans. Solution:
Step 1. We can solve the heat equation using separation of variables. Let u(x, t) =
X(x)T(t).
Step 2. Substituting this into the heat equation, we get
X(x)T′(t) = kX′′(x)T(t)
Step 3. Dividing by kX(x)T(t), we separate variables to obtain
T′(t)
kT (t)=X′′(x)
X(x)=−λ
Step 4. This gives us two ordinary differential equations: T′(t) + kλT (t) = 0 and X′′(x) +
λX(x) = 0.
Step 5. The solutions to the time equation are Tn(t) = e−kλntfor λn=n2π2
π2.
Step 6. The solutions to the spatial equation are Xn(x) = sin(nx)for n= 1,2,3, . . .
Step 7. Therefore, the general solution is given by
u(x, t) =
∞
∑
n=1
cne−k(n2π2
π2)tsin(nx)
Step 8. To find the coefficients cn, we can use the initial condition: u(x, 0) = sin(x). This
implies that
∞
∑
n=1
cnsin(nx) = sin(x)
Step 9. By orthogonality, we can determine that cn=2
π∫π
0sin(x)sin(nx)dx.
Step 10. Finally, using the Fourier series of sin(x), we find cn=2
π·2
π·(−1)n−1
n=4
π2n(−1)n−1.
Step 11. Therefore, the solution to the heat equation with the given boundary and initial
conditions is
u(x, t) =
∞
∑
n=1
4
π2n(−1)n−1e−k(n2π2
π2)tsin(nx)
19. Question 19: Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where kis
a positive constant and u(x, t)denotes the temperature distribution along a metal rod of length
Lat time t.
Given the initial condition u(x, 0) = sin (πx
L)and boundary conditions u(0, t) = u(L, t)=0,
find the solution u(x, t)to the heat equation.
Ans. Solution: 1. We begin by using separation of variables to solve the partial differential
equation. We assume the solution has the form u(x, t) = X(x)T(t).
2. Substituting this into the heat equation, we get T′(t)
kT (t)=X′′ (x)
X(x)=−λfor some constant λ.
3. Solving the temporal equation T′(t)
kT (t)=−λyields T(t) = c1e−kλt.
4. Solving the spatial equation X′′(x) + λX(x) = 0 with the given boundary conditions
X(0) = X(L) = 0 gives the eigenfunctions Xn(x) = sin (nπx
L)for λ=(nπ
L)2.
5. Since λ > 0, the general solution can be written as a sum of the eigenfunctions, u(x, t) =
∑∞
n=1 cne−k(nπ
L)2tsin (nπx
L).
6. Applying the initial condition u(x, 0) = sin (πx
L)gives c1= 1 and cn= 0 for n= 1.
7. Therefore, the solution to the heat equation is u(x, t) = e−k(π
L)2tsin (πx
L).
20. Question:
Consider the heat equation on a one-dimensional rod of length L, subject to the boundary
conditions u(0, t) = 0,u(L, t) = 0, and the initial condition u(x, 0) = f(x).
(a) Solve the heat equation with the following conditions: L= 1,f(x) = x(1 −x), and
T > 0.
(b) Find the steady-state solution for this heat equation.
Ans. (a) To solve the heat equation, we first need to express the solution as a Fourier series
and then find the coefficients using the given initial condition.
1. Fourier Series Expansion:
The general solution to the heat equation on 0≤x≤Lis given by:
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−(nπ
L)2αt
where Bnare the Fourier sine coefficients given by:
Bn=2
L∫L
0
f(x)sin (nπx
L)dx
2. Calculation of Fourier Coefficients:
Given that f(x) = x(1 −x)and L= 1, we have:
Bn= 2 ∫1
0
x(1 −x)sin(nπx)dx
We can simplify this integral by using integration by parts to find:
Bn=2
n3π3((−1)nπ2n2+ 2)
3. Specific Solution for T > 0:
Substitute Bninto the Fourier series solution to get:
u(x, t) =
∞
∑
n=1
2
n3π3((−1)nπ2n2+ 2)sin(nπx)e−n2π2αt
This is the specific solution to the heat equation with the given initial condition.
(b) To find the steady-state solution for this heat equation, we need to consider the limit as
t→ ∞.
In the steady-state (t→ ∞), the solution becomes:
usteady(x) =
∞
∑
n=1
2
n3π3((−1)nπ2n2+ 2)sin(nπx)
This is the steady-state solution for the given heat equation and initial condition.
21. Question: Consider the wave equation in one dimension given by ∂2u
∂t2=c2∂2u
∂x2. Solve
the wave equation subject to the initial conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0, where
0< x < 1and cis a positive constant.
Ans. Solution: Given the wave equation ∂2u
∂t2=c2∂2u
∂x2, we need to solve it subject to the initial
conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0.
1. Finding the solution: Let’s assume the general solution u(x, t) = X(x)T(t). Plugging
this into the wave equation, we get: X(x)T′′(t) = c2X′′(x)T(t).
Dividing by c2XT , we have: T′′ (t)
c2T(t)=X′′ (x)
X(x)=−λ.
Therefore, we get two ordinary differential equations: T′′(t) + c2λT (t)=0and X′′(x) +
λX(x) = 0.
2. Solving the ODEs: Solving T′′(t) + c2λT (t) = 0 gives T(t) = Acos(ct√λ)+
Bsin(ct√λ).
Solving X′′(x) + λX(x) = 0 results in X(x) = Ccos(√λx)+Dsin(√λx).
3. Applying the initial conditions: Given u(x, 0) = x(1 −x), we have: X(x)T(0) =
x(1 −x)=⇒X(x) = x(1 −x).
As the second initial condition gives ∂u
∂t (x, 0) = 0, then T′(0) = 0.
4. Finding the Eigenvalues: Substitute X(x) = x(1 −x)into X′′(x) + λX(x) = 0 to find
λ.
This leads to λ=−1
4.
5. Determining the final solution: Substitute λ=−1
4and X(x) = x(1 −x)back into
X(x) = Ccos (1
2x)+Dsin (1
2x)to find Cand D.
Therefore, the final solution is u(x, t) = (Acos (c
2t)+Bsin (c
2t))x(1 −x).
22. Find a solution to the following heat equation with the given boundary conditions:
∂u
∂t =k∂2u
∂x2,0< x < 1, t > 0
subject to
u(0, t) = 0, u(1, t) = 0
and initial condition
u(x, 0) = 3x(1 −x)
Ans. Solution: Let’s first solve the heat equation using the method of separation of variables.
1. Setting Up the Separation of Variables: Assume u(x, t) = X(x)T(t), substitute into
the heat equation, and divide by kXT :
1
kT
dT
dt =1
X
d2X
dx2=−λ
where λis a constant (separation constant).
2. Solving the Time Part ODE: Solve 1
kT
dT
dt =−λto get T(t) = Ae−kλt.
3. Solving the Spatial Part ODE: Solve d2X
dx2+λX = 0 subject to the boundary conditions
X(0) = 0 and X(1) = 0 to get Xn(x) = sin(nπx)for λ=n2π2where n∈N.
4. General Solution: The general solution is u(x, t) = ∑∞
n=1 Bnsin(nπx)e−k(nπ)2t.
5. Applying the Initial Condition: Apply u(x, 0) = 3x(1 −x) = ∑∞
n=1 Bnsin(nπx)to
find Bn= 6 ∫1
0x(1 −x)sin(nπx)dx.
6. Finding the Final Solution: The final solution is
u(x, t) = 6
∞
∑
n=1
1−(−1)n
n3π3sin(nπx)e−k(nπ)2t
23. Find the general solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition u(x, 0) = 2 sin(3x)and the boundary conditions u(0, t) = 0
and u(π, t) = 0.
Ans. We start by assuming a separable solution of the form u(x, t) = X(x)T(t).
1. Substitute u(x, t) = X(x)T(t)into the PDE to obtain
X(x)T′(t) = kX′′(x)T(t)
Dividing both sides by kX(x)T(t)gives
T′(t)
kT (t)=X′′(x)
X(x)
The left side depends only on twhile the right side depends only on x. Therefore, both sides
must be equal to a constant −λ. This gives us two ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
2. Solve the first ODE T′(t) + kλT (t) = 0 to get
T(t) = c1e−kλt
3. Solve the second ODE X′′(x) + λX(x) = 0 subject to the boundary conditions X(0) = 0
and X(π) = 0.
3.1. The characteristic equation of λis λ=−m2. The general solution to X′′(x)−
m2X(x) = 0 is
X(x) = c2cos(mx) + c3sin(mx)
3.2. Applying the boundary condition X(0) = 0 gives
X(0) = c2= 0
Thus, the solution simplifies to
X(x) = c3sin(mx)
3.3. Applying the boundary condition X(π) = 0 gives
X(π) = c3sin(mπ) = 0
This gives the condition m= 1,2,3, ....
4. Combining the solutions for X(x)and T(t), we have
u(x, t) =
∞
∑
n=1
cne−k(2n−1)2tsin((2n−1)x)
5. Apply the initial condition u(x, 0) = 2 sin(3x)to determine the series coefficients cn.
2sin(3x) =
∞
∑
n=1
cnsin((2n−1)x)
Comparing coefficients of sin((2n−1)x)gives
cn= 2 ∫π
0
sin((2n−1)x)sin(3x)dx
6. Solve for cnto find the final solution.
24. Question:
Consider the heat equation in one dimension:
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions:
u(0, t) = 0
u(L, t) = 0
and initial condition:
u(x, 0) = 1 for 0< x < L
Find the solution to this heat equation using the method of separation of variables.
Ans. Solution:
We assume that the solution to the heat equation can be written in the form of a product of
two functions:
u(x, t) = X(x)T(t)
Substitute this into the heat equation to get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ2
This gives two separate equations:
T′(t) + kλ2T(t) = 0
X′′(x) + λ2X(x) = 0
Solving the time equation yields:
T(t) = Ce−kλ2t
Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0, we get:
u(0, t) = X(0)T(t) = 0 ⇒X(0) = 0
u(L, t) = X(L)T(t) = 0 ⇒X(L) = 0
The solution to the spatial part of the equation is then given by:
X(x) = C1sin(λx)
Applying the boundary conditions X(0) = 0 and X(L) = 0 yields:
C1sin(0) = 0 ⇒C1= 0
C1sin(λL) = 0
This implies that λ=nπ
Lfor n= 1,2,3, . . .
Therefore, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−k(nπ
L)2t
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−k(nπ
L)2t
where Bnare constants determined by the initial condition u(x, 0) = 1.
25. Question 25:
Consider the following partial differential equation:
∂2u
∂t2=c2(∂2u
∂x2+∂2u
∂y2)
where cis a constant. Find the general solution to this wave equation.
Ans. To solve the given wave equation, we will use the method of separation of variables.
1. Assume a solution of the form u(x, y, t) = X(x)Y(y)T(t).
Substitute the separated solutions into the wave equation:
X(x)Y(y)T′′(t) = c2(X′′(x)Y T (t) + XY ′′(y)T(t))
Divide both sides by X(x)Y(y)T(t):
T′′(t)
c2T(t)=X′′(x)
X(x)+Y′′(y)
Y(y)
Since the left-hand side is solely dependent on tand the right-hand side is solely dependent
on xand y, both sides must be equal to a constant. Let’s denote this constant by −λ.
2. Solve the ODEs for X,Y, and T.
We obtain three separate ordinary differential equations:
For T(t):
T′′(t) + c2λT (t) = 0
The general solution for T(t)is T(t) = Acos(c√λt)+Bsin(c√λt), where Aand Bare
constants.
For X(x):
X′′(x) + λX(x) = 0
The general solution for X(x)is X(x) = Ccos(√λx)+Dsin(√λx), where Cand Dare
constants.
For Y(y):
Y′′(y) + λY (y) = 0
The general solution for Y(y)is Y(y) = Ecos(√λy)+Fsin(√λy), where Eand Fare
constants.
3. Combine the solutions.
The general solution to the wave equation is:
u(x, y, t) =
∞
∑
n=1
∞
∑
m=1 (Anm cos(√λnmx)cos(√λnmy)cos(c√λnmt)+Bnm sin(√λnmx)sin(√λnmy)cos(c√λnmt))
where λnm =(nπ
L)2+(mπ
W)2and Anm and Bnm are constants.
26. Consider the following heat equation describing the temperature distribution in a one-
dimensional rod of length L:
∂u
∂t =k∂2u
∂x2,0< x < L, t > 0
subject to the boundary conditions:
u(0, t) = 0, u(L, t) = 0
and the initial condition:
u(x, 0) = 2 sin (πx
L)
Find the solution u(x, t)to this heat equation.
Ans. Solution:
1. We will use separation of variables to solve this partial differential equation. Let’s assume
that u(x, t) = X(x)T(t).
2. Substituting this into the heat equation, we get:
XT ′=kX′′T
Dividing both sides by kXT gives:
T′
kT =X′′
X=−λ
where λis a constant.
3. Solving the ODE X′′ +λX = 0 with the boundary conditions u(0, t) = 0 and u(L, t) = 0
gives the eigenfunctions:
Xn(x) = sin (nπx
L)
with corresponding eigenvalues λn=(nπ
L)2for n= 1,2,3, . . ..
4. We now have two ODEs to solve:
T′
n=−kλnTnand X′′
n=−λnXn
with the initial conditions Tn(0) = 2 and Xn(x) = sin (nπx
L).
5. The solution to the heat equation is then:
u(x, t) =
∞
∑
n=1
Tn(t)Xn(x) =
∞
∑
n=1
2sin (nπx
L)e−k(nπ
L)2t
27. Question 27: Consider the heat equation in one dimension, given by ∂u
∂t =k∂2u
∂x2, where kis
a positive constant. Given the initial condition u(x, 0) = x(1 −x)for 0< x < 1and boundary
conditions u(0, t) = u(1, t) = 0 for t > 0, find the solution to the heat equation.
Ans. Let’s first write the solution to the heat equation using separation of variables and Fourier
series. Let u(x, t) = X(x)T(t). Plugging this into the heat equation, we get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ
This gives us two separate ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
with boundary conditions X(0) = X(1) = 0. Solving the second equation with these bound-
ary conditions gives us the eigenvalues λn=n2π2and eigenfunctions Xn(x) = sin(nπx).
Now, we can solve the first equation:
T′(t) + kn2π2T(t) = 0
T′(t) = −kn2π2T(t)
dT
T=−kn2π2dt
ln |T(t)|=−kn2π2t+C
T(t) = Ae−kn2π2t
The general solution to the heat equation is then:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)e−kn2π2t
To find the coefficients Bn, we can use the Fourier sine series. First, we express the initial
condition u(x, 0) = x(1 −x)as a Fourier sine series:
x(1 −x) =
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating from 0 to 1, we get:
∫1
0
x(1 −x)sin(mπx)dx =
∞
∑
n=1
Bn∫1
0
sin(nπx)sin(mπx)dx
This allows us to compute the coefficient Bm:
Bm= 2 ∫1
0
x(1 −x)sin(mπx)dx
After computing this integral and plugging in the values of Bnand Xn(x), we finally get the
solution to the heat equation.
28. Consider the following heat equation in one dimension:
∂u
∂t =k∂2u
∂x2
where u(x, t)represents the temperature at position xand time t, and kis a constant.
Given the initial condition u(x, 0) = 3x(1 −x)for 0<x<1and the boundary conditions
u(0, t) = 0 and u(1, t) = 0 for t≥0, find the temperature distribution u(x, t)for t > 0.
Ans. Solution: 1. The first step is to express the general solution to the heat equation in terms
of separation of variables. Let u(x, t) = X(x)T(t). Substituting this into the heat equation gives:
X(x)T′(t) = kX′′(x)T(t)
2. Dividing by kX(x)T(t)gives T′(t)
kT (t)=X′′ (x)
X(x). Each side must be a constant, say −λ. This
leads to two ordinary differential equations:
T′(t) + kλT (t) = 0 and X′′(x) + λX(x) = 0
3. Solving the first ODE gives T(t) = Ae−kλt, where Ais a constant. For the second ODE, the
solutions depend on the sign of λ: When λ > 0, we have X(x) = Bsin(√λx)+Ccos(√λx).
When λ= 0, we have X(x) = Bx +C. When λ < 0, we have X(x) = Be√|λ|x+Ce−√|λ|x.
4. Applying the boundary conditions u(0, t)=0and u(1, t)=0for all times t≥0gives
X(0) = 0 and X(1) = 0, which leads to the conclusion that λ=n2π2for n= 1,2,3, . . ..
5. Therefore, the general solution to the heat equation is a sum of these modes:
u(x, t) =
∞
∑
n=1
(Ansin(nπx) + Bncos(nπx))e−n2π2kt
6. Now, we need to determine the coefficients Anusing the initial condition. We have:
u(x, 0) =
∞
∑
n=1
Ansin(nπx) = 3x(1 −x)
7. To find An, we multiply both sides by sin(mπx)and integrate from 0 to 1 with respect to
x, where mis a positive integer. This leads to
An=2
1−cos(nπ)∫1
0
3x(1 −x)sin(nπx)dx
8. The final step is to evaluate the integral and substitute the values of Anback into the
general solution to get the temperature distribution u(x, t)for t > 0.
29. Question 29:
Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, where u(x, t)is the
temperature distribution at position xand time t, and kis a positive constant.
Given the boundary conditions: u(0, t) = 0 and u(L, t) = 0 for t > 0,
and the initial condition: u(x, 0) = 2x(L−x)for 0< x < L.
Find the steady-state solution us(x)for this heat equation.
Ans. To find the steady-state solution us(x), we need to solve the heat equation under the
assumption that as t→ ∞, the temperature distribution becomes time-independent.
1. Assume u(x, t) = T(t)X(x). Substitute this into the heat equation to get: 1
kT
dT
dt =1
X
d2X
dx2.
2. Rearrange the equation to separate variables: 1
kT
dT
dt =1
X
d2X
dx2=−λ.
3. Solve the ODE for X(x)with the boundary conditions: X′′(x) + λX(x)=0,X(0) = 0
and X(L) = 0.
The general solution to the ODE is X(x) = c1sin (√λx)+c2cos (√λx).
Applying the boundary conditions X(0) = 0 and X(L)=0, we have √λ=nπ
Lfor n=
1,2,3, . . ..
4. The solution for X(x)is then: Xn(x) = sin (nπx
L).
5. Solve the ODE for T(t):dT
dt =−kλT . The solution is T(t) = ce−kλt.
6. The general solution to the heat equation is then: u(x, t) = ∑∞
n=1 cne−k(nπ
L)2tsin (nπx
L).
7. Since we are interested in the steady-state solution, as t→ ∞,u(x, t)→us(x)where
us(x) = ∑∞
n=1 cnsin (nπx
L).
8. Applying the initial condition u(x, 0) = 2x(L−x), we find: cn=4
n3π3((−1)n−1).
Therefore, the steady-state solution to the heat equation is: us(x) = 2 ∑∞
n=1
4
n3π3((−1)n−
1) sin (nπx
L).
30. Find the solution to the heat equation on the interval 0< x < π with boundary conditions
u(0, t) = u(π, t) = 0 and initial condition u(x, 0) = x(π−x).
Ans. Let’s find the solution to the heat equation step by step:
1. Setting up the problem: The heat equation in one dimension is given by ∂u
∂t =k∂2u
∂x2,
where kis the thermal diffusivity constant.
The general form of the solution to the heat equation with the given boundary conditions is
u(x, t) = ∑∞
n=1 Bnsin(nx)e−n2kt.
6. Question: Find the general solution of the heat equation
ut= 4uxx,0< x < π, t > 0
subject to the boundary conditions
u(0, t) = 0, u(π, t) = 0
and the initial condition
u(x, 0) = x(π−x)
Ans. Let’s denote u(x, t)as the solution to the given heat equation. To find the general
solution, we will first find the eigenvalues and eigenfunctions of the equation, and then apply the
method of separation of variables.
1. Eigenvalues and Eigenfunctions: Assume the solution can be written as u(x, t) =
X(x)T(t). Substituting into the heat equation gives us
X(x)T′(t) = 4X′′(x)T(t)
which can be rearranged to
T′(t)
4T(t)=X′′(x)
X(x)=−λ
where λis a constant (the separation constant). These equations can be solved separately to
find the eigenvalues and eigenfunctions.
Solving X′′ (x)
X(x)=−λwith the boundary conditions X(0) = 0 and X(π) = 0 yields
Xn(x) = sin(nx), λ =n2
where n= 1,2,3, ... are the eigenvalues and Xn(x)are the corresponding eigenfunctions.
Solving T′(t)
4T(t)=−λgives
Tn(t) = cne−4n2t
where cnis a constant.
2. General Solution: The general solution is given by a linear combination of the eigen-
functions with the corresponding time functions. Thus, the general solution is
u(x, t) =
∞
∑
n=1
cne−4n2tsin(nx)
3. Determining Constants: To determine the constants cn, we will use the initial condition.
Given u(x, 0) = x(π−x), we have
x(π−x) =
∞
∑
n=1
cnsin(nx)
We can use the orthogonality of sine functions to determine the coefficients cn. Multiplying both
sides by sin(mx)and integrating from 0 to πgives
∫π
0
x(π−x)sin(mx)dx =∫π
0(∞
∑
n=1
cnsin(nx))sin(mx)dx
This simplifies to
π2
2(−1)m=cm
π
2, cm= (−1)m
4. Final Solution: Therefore, the final solution to the heat equation with the given boundary
and initial conditions is
u(x, t) =
∞
∑
n=1
(−1)ne−4n2tsin(nx)
7. Question: Solve the heat equation in one dimension subject to the initial condition u(x, 0) =
sin(2πx)and boundary conditions u(0, t) = 0 and u(π, t) = 0.
Ans. Step-by-step solution: 1. We start by writing the general solution of the heat equation:
u(x, t) =
∞
∑
n=1
Bne−(2πn)2tsin(2πnx)
2. Next, we need to find the coefficients Bnusing the initial condition:
u(x, 0) =
∞
∑
n=1
Bnsin(2πnx) = sin(2πx)
3. To find Bn, we can use the orthogonality property of sine functions:
Bn=2
π∫π
0
sin(2πx)sin(2πnx)dx
4. Evaluating the integral, we obtain:
Bn=2
π∫π
0
1
2[cos(2π(n−1)x)−cos(2π(n+ 1)x)]dx
Bn=1
π[1
2π(n−1) sin(2π(n−1)x)−1
2π(n+ 1) sin(2π(n+ 1)x)]π
0
5. Simplifying and using the boundary conditions, we get:
Bn=1
π[1
2π(n−1) sin(π(n−1)) −1
2π(n+ 1) sin(π(n+ 1))]
Bn=1
π[1
2(n−1)(−1)n−1−1
2(n+ 1)(−1)n+1]
6. Therefore, the solution to the heat equation with the given initial and boundary conditions
is:
u(x, t) =
∞
∑
n=1
1
π[1
2(n−1)(−1)n−1−1
2(n+ 1)(−1)n+1]e−(2πn)2tsin(2πnx)
8. Find the general solution to the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t) = u(L, t) = 0, where u(x, t)is the temperature
distribution along a rod of length L, and kis a positive constant representing thermal diffusivity.
Ans. Let’s denote u(x, t) = X(x)T(t)and substitute it into the heat equation to obtain two
ordinary differential equations:
1. For X(x):
T′(t)
kT (t)=X′′(x)
X(x)
2. For T(t):
T′(t)
kT (t)=−λ
where λis a separation constant.
1. Solving the ODE for X(x):
X′′(x) + λX(x) = 0
The general solution to this second-order ODE is:
X(x) = Acos(√λx)+Bsin(√λx)
Applying the boundary conditions u(0, t) = u(L, t) = 0 gives A= 0 and sin(√λL)= 0.
This further gives: √λL =nπ where n= 1,2,3, ...
So, the eigenvalues are:
λn=(nπ
L)2
And the corresponding eigenfunctions are:
Xn(x) = Bnsin (nπx
L)
2. Solving the ODE for T(t):
T′(t) + kλT (t) = 0
The general solution to this first-order ODE is:
Tn(t) = Cne−kλnt
3. Combining the solutions, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Cne−k(nπ
L)2tsin (nπx
L)
where Cnare constants determined by initial conditions.
9. Question: Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, where kis a
positive constant.
A rod of length Lis insulated along its sides and initially has a temperature distribution given
by u(x, 0) = e−x2/L2. The boundary conditions are u(0, t) = u(L, t) = 0 for all t≥0.
Find the temperature distribution u(x, t)on the rod for t > 0.
Ans. Solution: The general solution to the heat equation in one dimension with fixed boundary
conditions is given by:
u(x, t) = ∑∞
n=1 Bnsin (nπx
L)e−k(nπ
L)2t, where the coefficients Bncan be determined using
the initial condition.
1. Finding the coefficients Bn:
Given the initial condition u(x, 0) = e−x2/L2, we can express this as a Fourier sine series:
e−x2/L2=∑∞
n=1 Bnsin (nπx
L)
Multiplying both sides by sin (mπx
L)and integrating from 0 to L, we get:
∫L
0e−x2/L2sin (mπx
L)dx =∫L
0∑∞
n=1 Bnsin (nπx
L)sin (mπx
L)dx
Using orthogonality of sine functions, the right-hand side reduces to:
Bm=2
L∫L
0e−x2/L2sin (mπx
L)dx
2. Evaluating the integral:
Let u=−x
L, then du =−1
Ldx.
Substituting into the integral, we get:
Bm=−2∫0
0eu2sin(mπu)du
Using the fact that the sine function is odd, this simplifies to:
Bm=−2∫0
0eu2sin(mπu)du = 0
So, all coefficients Bnare zero except for B1.
3. Final expression for temperature distribution:
Therefore, the temperature distribution on the rod for t > 0is given by:
u(x, t) = B1sin (πx
L)e−k(π
L)2t
where B1=2
L∫L
0e−x2/L2sin (πx
L)dx.
10. Find the general solution to the heat equation on the domain 0< x < π,t > 0with initial
condition u(x, 0) = sin(x)and boundary conditions u(0, t) = u(π, t) = 0.
Ans. To solve this problem, we need to use the method of separation of variables.
1. We assume a solution of the form u(x, t) = X(x)T(t).
2. Plugging this into the heat equation ut=kuxx, we get T′
kT =X′′
X. This gives two separated
ODEs: T′
kT =λ=−X′′
X.
3. Solving the ODEs T′=kλT and X′′ +λX = 0 gives solutions T(t) = Ae−kλt and
X(x) = Bsin(√λx).
4. Applying the boundary conditions u(0, t) = 0 and u(π, t) = 0 gives X(0) = 0 and X(π) =
0. This implies that √λ=nwhere nis a positive integer.
5. Therefore, the general solution is given by
u(x, t) =
∞
∑
n=1
cne−kn2tsin(nx),
where the coefficients cncan be determined from the initial condition u(x, 0) = sin(x).
6. Finally, using the initial condition, we have
sin(x) =
∞
∑
n=1
cnsin(nx).
Multiplying both sides by sin(mx)and integrating from 0to πgives
cm=2
π∫π
0
sin(x)sin(mx)dx.
The solution to this problem involves finding the coefficients cnusing the initial condition and
plugging them back into the general solution.
11. Question: Consider the heat equation in one dimension, ut=kuxx, with initial condition
u(x, 0) = x(1 −x)on the interval 0<x<1, and boundary conditions u(0, t) = u(1, t)=0.
Determine the solution u(x, t).
Ans. Step-by-step solution: 1. We first seek a solution of the form u(x, t) = X(x)T(t).
Substituting this into the heat equation, we have:
XT ′=kX′′T
T′
kT =X′′
X=−λ
2. This yields two ordinary differential equations:
T′+kλT = 0
X′′ +λX = 0
Where the general solution of the second equation is X(x) = Acos(√λx)+Bsin(√λx). 3.
Applying the boundary conditions u(0, t) = u(1, t) = 0, we have:
u(0, t) = 0 =
⇒X(0)T(t) = 0
u(1, t) = 0 =
⇒X(1)T(t) = 0
4. From X(0) = 0, we get Acos(0) + Bsin(0) = 0 =⇒A= 0. From X(1) = 0, we
have Acos(√λ)+Bsin(√λ)= 0. 5. The condition A= 0 implies that √λ=nπ for
n= 1,2,3, .... Thus, the eigenpairs are λn= (nπ)2and the corresponding eigenfunctions
are Xn(x) = Bnsin(nπx). 6. The solution to the time-part ODE is Tn(t) = Cne−kn2π2t. 7.
Therefore, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)Cne−kn2π2t
8. To determine the coefficients Bnand Cn, we use the initial condition as follows:
u(x, 0) =
∞
∑
n=1
Bnsin(nπx) = x(1 −x)
9. Multiplying both sides by sin(mπx)and integrating over [0,1] gives us:
∫1
0
sin(mπx)
∞
∑
n=1
Bnsin(nπx)dx =∫1
0
x(1 −x)sin(mπx)dx
10. After applying orthogonality, we can determine Bnand compute the final solution u(x, t).
12. Question: Consider the one-dimensional heat equation
∂u
∂t =c∂2u
∂x2,
subject to the initial condition u(x, 0) = x(1 −x)on the interval 0<x<1, and the boundary
conditions u(0, t) = u(1, t) = 0 for t > 0. Find the solution u(x, t).
Ans. Solution: Let’s first find the general solution to the heat equation. We will then apply the
initial and boundary conditions to determine the specific solution.
1. Finding the general solution: We assume a separation of variables solution of the form
u(x, t) = X(x)T(t). Plugging this into the heat equation yields:
XT ′=cX′′T
Dividing both sides by cXT gives:
T′
cT =X′′
X=−λ
where λis a constant. This gives two ordinary differential equations:
T′+cλT = 0 and X′′ +λX = 0
The solution to the second equation is
X(x) = Asin(√λx)+Bcos(√λx)
Applying the boundary conditions u(0, t) = u(1, t) = 0 gives B = 0 and Asin(√λ)= 0.
Thus, we have solutions of the form Xn(x) = Ansin(nπx), where n= 1,2,3, ....
The solution to the first equation is
T(t) = Ce−cλt
Let’s denote the eigenvalues as λn=n2π2. Thus,
Xn(x) = Ansin(nπx)
Tn(t) = Ce−c(n2π2)t
The general solution is then
u(x, t) =
∞
∑
n=1
Bnsin(nπx)e−c(n2π2)t
2. Applying the initial condition: To find the coefficients Bn, we apply the initial condition
u(x, 0) = x(1 −x):
x(1 −x) =
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating over (0,1) gives
∫1
0
x(1 −x)sin(mπx)dx =Bm∫1
0
sin2(mπx)dx
Solving the integrals gives
Bm= 4 ×(−1)m+1
m3π3
3. Final solution: Therefore, the solution to the heat equation with the given initial and
boundary conditions is:
u(x, t) =
∞
∑
n=1
4(−1)n+1
n3π3sin(nπx)e−c(n2π2)t
13. Find the general solution to the heat equation
ut= 4uxx
subject to the boundary conditions u(0, t) = u(1, t) = 0 for 0< x < 1and the initial condition
u(x, 0) = x(1 −x)for 0< x < 1.
Ans. The general solution to the heat equation is
u(x, t) =
∞
∑
n=1
bne−4n2π2tsin(nπx)
where
bn=2
nπ ∫1
0
x(1 −x)sin(nπx)dx
The solution can be simplified by noticing that the function u(x, 0) = x(1−x)is an odd function
about x= 0.5, so all the bncoefficients will be zero.
14. What is the solution of the heat equation ut=kuxx with the initial condition u(x, 0) = 3x2
for 0< x < 1and boundary conditions u(0, t) = 0 and u(1, t) = 0 for t > 0? Here, kis a
constant representing the thermal diffusivity of the medium.
Ans. To solve the heat equation with the given initial and boundary conditions, we can
use the method of separation of variables. Let’s assume that the solution can be written as
u(x, t) = X(x)T(t). Plugging this into the heat equation, we get:
XT ′=kX′′T
Dividing both sides by kXT gives:
T′
kT =X′′
X=−λ
This leads to the following two equations:
I. T′+kλT = 0 II. X′′ +λX = 0
Beginning with the time equation (I), we have:
T′+kλT = 0
T′
T=−kλ
ln(T) = −kλt +C1
T(t) = C2exp(−kλt)
Now, moving on to the spatial equation (II), we have:
X′′ +λX = 0
The general solution to this ordinary differential equation is:
X(x) = Acos(√λx)+Bsin(√λx)
Applying the boundary conditions u(0, t) = 0 and u(1, t) = 0 yields A= 0 and Bsin(√λ)=
0. Since B= 0 (for λ > 0), we have sin(√λ)= 0 which implies √λ=nπ for n∈Z.
Therefore, λ= (nπ)2and the solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)exp(−k(nπ)2t)
To determine the coefficients Bn, we can use the initial condition u(x, 0) = 3x2:
3x2=
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating from 0 to 1 gives:
∫1
0
3x2sin(mπx)dx =∫1
0(∞
∑
n=1
Bnsin(nπx))sin(mπx)dx
By orthogonality, the right-hand side simplifies to Bn= 0 for n=mand Bm= 6 ∫1
0x2sin(mπx)dx =
6
(πm)2((−1)m−1).
Therefore, the final solution to the heat equation is:
u(x, t) =
∞
∑
n=1
6
(πn)2((−1)n−1) sin(nπx)exp(−k(nπ)2t)
15. Let u(x, t)be the solution to the heat equation
∂u
∂t =k∂2u
∂x2,0< x < l, t > 0
subject to the boundary conditions u(0, t) = 0,u(l, t) = 0, and the initial condition u(x, 0) =
x(l−x). Find the explicit form of the solution u(x, t).
Ans. Solution: 1. We will use the method of separation of variables. Let u(x, t) = X(x)T(t).
Substituting into the heat equation, we have
T′
kT =X′′
X=−λ
2. Solving the time equation T′
kT =−λgives T(t) = Ae−λkt.
3. Solving the spatial equation X′′ +λX = 0 with boundary conditions X(0) = 0 and X(l) =
0, we find that the eigenfunctions are ϕn(x) = √2
lsin (nπx
lwithcorrespondingeigenvaluesλn=
(nπ
l)2.
4. By superposition, the general solution is
u(x, t) =
∞
∑
n=1
Bne−(nπ
l)2kt√2
lsin (nπx
l)
5. To find the coefficients Bn, we use the initial condition u(x, 0) = x(l−x). We have
u(x, 0) =
∞
∑
n=1
Bn√2
lsin (nπx
l)=x(l−x)
6. Multiplying by sin (mπx
l)and integrating from 0 to lgives
Bm=2
l∫l
0
x(l−x)sin (mπx
l)dx
7. Calculating the integral, we find Bm=4
π3m3((−1)m−1).
8. Therefore, the solution to the heat equation with the given initial condition and boundary
conditions is
u(x, t) =
∞
∑
n=1
4
π3n3((−1)n−1)e−(nπ
l)2kt√2
lsin (nπx
l)
16. Question 16:
Consider the Heat Equation in one dimension defined as follows:
∂u
∂t =k∂2u
∂x2
where u(x, t)represents the temperature distribution in a one-dimensional rod of length L,0≤
x≤L, and t > 0. The rod is insulated at both ends, meaning that ∂u
∂x (0, t) = 0 and ∂u
∂x (L, t) = 0
for all t > 0. The initial temperature distribution is given by:
u(x, 0) = 50 + 20x(L−x)
Find the temperature distribution u(x, t)for t > 0.
Ans. Solution: 1. We start by assuming a separation of variables solution to the heat equation,
that is, we assume:
u(x, t) = X(x)T(t)
2. Substituting u(x, t) = X(x)T(t)into the heat equation and dividing by kXT , we get:
1
kT
dT
dt =1
X
d2X
dx2=−λ
3. This gives us two ODEs:
dT
dt +kλT = 0
d2X
dx2+λX = 0
4. The boundary conditions ∂u
∂x (0, t) = 0 and ∂u
∂x (L, t) = 0 simplify to X′(0) = X′(L) = 0.
5. The ODE with boundary conditions has eigenvalues λn=(nπ
L)2and eigenfunctions
Xn(x) = cos (nπx
L).
6. The ODE for T(t)becomes T′(t) + k(nπ
L)2T= 0, which has a solution Tn(t) =
Ane−k(nπ
L)2t.
7. The general solution to the heat equation is given by:
u(x, t) =
∞
∑
n=1
Ancos (nπx
L)e−k(nπ
L)2t
8. Using the initial condition u(x, 0) = 50+20x(L−x), we find the coefficients Anby taking
the inner product of u(x, 0) with cos (mπx
L)and using orthogonality of the eigenfunctions.
9. After finding the coefficients An, we obtain the temperature distribution:
u(x, t) =
∞
∑
n=1 (200(−1)n+1
n2π2)cos (nπx
L)e−k(nπ
L)2t
17. Question: Consider the following partial differential equation:
∂2u
∂t2=c2(∂2u
∂x2+∂2u
∂y2)
where cis a constant and u(x, y, t)is a function of x,y, and t.
Find the general solution to this wave equation.
Ans. Let’s look for a solution of the form u(x, y, t) = X(x)Y(y)T(t). Substituting this into
the given wave equation, we have:
T′′XY =c2(X′′Y T +XY ′′T)
Dividing both sides by XY T gives:
T′′
c2T=X′′
X+Y′′
Y=−λ
This gives us three separate ordinary differential equations:
T′′ +c2λT = 0
X′′ +λX = 0
Y′′ +λY = 0
1. Solving the time equation: The time equation has solutions of the form T(t) =
Asin(ct) + Bcos(ct).
2. Solving the spatial equations: The spatial equations have solutions of the form X(x) =
Csin(nx) + Dcos(nx)and Y(y) = Esin(my) + Fcos(my), where nand mare constants.
3. Combining the solutions: Therefore, the general solution to the wave equation is:
u(x, y, t) = ∑
n,m
(Anm sin(nx)sin(my)sin(ct) + Bnm sin(nx)sin(my)cos(ct) + Cnm cos(nx)sin(my)sin(ct) + Dnm cos(nx)sin(my)cos(ct))
where Anm,Bnm,Cnm, and Dnm are constants that depend on the initial conditions.
18. Let u(x, t)be the solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t) = u(π, t)=0for t > 0and the initial condition
u(x, 0) = sin(x)for 0≤x≤π. Find an expression for u(x, t).
Ans. Solution:
Step 1. We can solve the heat equation using separation of variables. Let u(x, t) =
X(x)T(t).
Step 2. Substituting this into the heat equation, we get
X(x)T′(t) = kX′′(x)T(t)
Step 3. Dividing by kX(x)T(t), we separate variables to obtain
T′(t)
kT (t)=X′′(x)
X(x)=−λ
Step 4. This gives us two ordinary differential equations: T′(t) + kλT (t) = 0 and X′′(x) +
λX(x) = 0.
Step 5. The solutions to the time equation are Tn(t) = e−kλntfor λn=n2π2
π2.
Step 6. The solutions to the spatial equation are Xn(x) = sin(nx)for n= 1,2,3, . . .
Step 7. Therefore, the general solution is given by
u(x, t) =
∞
∑
n=1
cne−k(n2π2
π2)tsin(nx)
Step 8. To find the coefficients cn, we can use the initial condition: u(x, 0) = sin(x). This
implies that
∞
∑
n=1
cnsin(nx) = sin(x)
Step 9. By orthogonality, we can determine that cn=2
π∫π
0sin(x)sin(nx)dx.
Step 10. Finally, using the Fourier series of sin(x), we find cn=2
π·2
π·(−1)n−1
n=4
π2n(−1)n−1.
Step 11. Therefore, the solution to the heat equation with the given boundary and initial
conditions is
u(x, t) =
∞
∑
n=1
4
π2n(−1)n−1e−k(n2π2
π2)tsin(nx)
19. Question 19: Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where kis
a positive constant and u(x, t)denotes the temperature distribution along a metal rod of length
Lat time t.
Given the initial condition u(x, 0) = sin (πx
L)and boundary conditions u(0, t) = u(L, t)=0,
find the solution u(x, t)to the heat equation.
Ans. Solution: 1. We begin by using separation of variables to solve the partial differential
equation. We assume the solution has the form u(x, t) = X(x)T(t).
2. Substituting this into the heat equation, we get T′(t)
kT (t)=X′′ (x)
X(x)=−λfor some constant λ.
3. Solving the temporal equation T′(t)
kT (t)=−λyields T(t) = c1e−kλt.
4. Solving the spatial equation X′′(x) + λX(x) = 0 with the given boundary conditions
X(0) = X(L) = 0 gives the eigenfunctions Xn(x) = sin (nπx
L)for λ=(nπ
L)2.
5. Since λ > 0, the general solution can be written as a sum of the eigenfunctions, u(x, t) =
∑∞
n=1 cne−k(nπ
L)2tsin (nπx
L).
6. Applying the initial condition u(x, 0) = sin (πx
L)gives c1= 1 and cn= 0 for n= 1.
7. Therefore, the solution to the heat equation is u(x, t) = e−k(π
L)2tsin (πx
L).
20. Question:
Consider the heat equation on a one-dimensional rod of length L, subject to the boundary
conditions u(0, t) = 0,u(L, t) = 0, and the initial condition u(x, 0) = f(x).
(a) Solve the heat equation with the following conditions: L= 1,f(x) = x(1 −x), and
T > 0.
(b) Find the steady-state solution for this heat equation.
Ans. (a) To solve the heat equation, we first need to express the solution as a Fourier series
and then find the coefficients using the given initial condition.
1. Fourier Series Expansion:
The general solution to the heat equation on 0≤x≤Lis given by:
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−(nπ
L)2αt
where Bnare the Fourier sine coefficients given by:
Bn=2
L∫L
0
f(x)sin (nπx
L)dx
2. Calculation of Fourier Coefficients:
Given that f(x) = x(1 −x)and L= 1, we have:
Bn= 2 ∫1
0
x(1 −x)sin(nπx)dx
We can simplify this integral by using integration by parts to find:
Bn=2
n3π3((−1)nπ2n2+ 2)
3. Specific Solution for T > 0:
Substitute Bninto the Fourier series solution to get:
u(x, t) =
∞
∑
n=1
2
n3π3((−1)nπ2n2+ 2)sin(nπx)e−n2π2αt
This is the specific solution to the heat equation with the given initial condition.
(b) To find the steady-state solution for this heat equation, we need to consider the limit as
t→ ∞.
In the steady-state (t→ ∞), the solution becomes:
usteady(x) =
∞
∑
n=1
2
n3π3((−1)nπ2n2+ 2)sin(nπx)
This is the steady-state solution for the given heat equation and initial condition.
21. Question: Consider the wave equation in one dimension given by ∂2u
∂t2=c2∂2u
∂x2. Solve
the wave equation subject to the initial conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0, where
0< x < 1and cis a positive constant.
Ans. Solution: Given the wave equation ∂2u
∂t2=c2∂2u
∂x2, we need to solve it subject to the initial
conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0.
1. Finding the solution: Let’s assume the general solution u(x, t) = X(x)T(t). Plugging
this into the wave equation, we get: X(x)T′′(t) = c2X′′(x)T(t).
Dividing by c2XT , we have: T′′ (t)
c2T(t)=X′′ (x)
X(x)=−λ.
Therefore, we get two ordinary differential equations: T′′(t) + c2λT (t)=0and X′′(x) +
λX(x) = 0.
2. Solving the ODEs: Solving T′′(t) + c2λT (t) = 0 gives T(t) = Acos(ct√λ)+
Bsin(ct√λ).
Solving X′′(x) + λX(x) = 0 results in X(x) = Ccos(√λx)+Dsin(√λx).
3. Applying the initial conditions: Given u(x, 0) = x(1 −x), we have: X(x)T(0) =
x(1 −x)=⇒X(x) = x(1 −x).
As the second initial condition gives ∂u
∂t (x, 0) = 0, then T′(0) = 0.
4. Finding the Eigenvalues: Substitute X(x) = x(1 −x)into X′′(x) + λX(x) = 0 to find
λ.
This leads to λ=−1
4.
5. Determining the final solution: Substitute λ=−1
4and X(x) = x(1 −x)back into
X(x) = Ccos (1
2x)+Dsin (1
2x)to find Cand D.
Therefore, the final solution is u(x, t) = (Acos (c
2t)+Bsin (c
2t))x(1 −x).
22. Find a solution to the following heat equation with the given boundary conditions:
∂u
∂t =k∂2u
∂x2,0< x < 1, t > 0
subject to
u(0, t) = 0, u(1, t) = 0
and initial condition
u(x, 0) = 3x(1 −x)
Ans. Solution: Let’s first solve the heat equation using the method of separation of variables.
1. Setting Up the Separation of Variables: Assume u(x, t) = X(x)T(t), substitute into
the heat equation, and divide by kXT :
1
kT
dT
dt =1
X
d2X
dx2=−λ
where λis a constant (separation constant).
2. Solving the Time Part ODE: Solve 1
kT
dT
dt =−λto get T(t) = Ae−kλt.
3. Solving the Spatial Part ODE: Solve d2X
dx2+λX = 0 subject to the boundary conditions
X(0) = 0 and X(1) = 0 to get Xn(x) = sin(nπx)for λ=n2π2where n∈N.
4. General Solution: The general solution is u(x, t) = ∑∞
n=1 Bnsin(nπx)e−k(nπ)2t.
5. Applying the Initial Condition: Apply u(x, 0) = 3x(1 −x) = ∑∞
n=1 Bnsin(nπx)to
find Bn= 6 ∫1
0x(1 −x)sin(nπx)dx.
6. Finding the Final Solution: The final solution is
u(x, t) = 6
∞
∑
n=1
1−(−1)n
n3π3sin(nπx)e−k(nπ)2t
23. Find the general solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition u(x, 0) = 2 sin(3x)and the boundary conditions u(0, t) = 0
and u(π, t) = 0.
Ans. We start by assuming a separable solution of the form u(x, t) = X(x)T(t).
1. Substitute u(x, t) = X(x)T(t)into the PDE to obtain
X(x)T′(t) = kX′′(x)T(t)
Dividing both sides by kX(x)T(t)gives
T′(t)
kT (t)=X′′(x)
X(x)
The left side depends only on twhile the right side depends only on x. Therefore, both sides
must be equal to a constant −λ. This gives us two ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
2. Solve the first ODE T′(t) + kλT (t) = 0 to get
T(t) = c1e−kλt
3. Solve the second ODE X′′(x) + λX(x) = 0 subject to the boundary conditions X(0) = 0
and X(π) = 0.
3.1. The characteristic equation of λis λ=−m2. The general solution to X′′(x)−
m2X(x) = 0 is
X(x) = c2cos(mx) + c3sin(mx)
3.2. Applying the boundary condition X(0) = 0 gives
X(0) = c2= 0
Thus, the solution simplifies to
X(x) = c3sin(mx)
3.3. Applying the boundary condition X(π) = 0 gives
X(π) = c3sin(mπ) = 0
This gives the condition m= 1,2,3, ....
4. Combining the solutions for X(x)and T(t), we have
u(x, t) =
∞
∑
n=1
cne−k(2n−1)2tsin((2n−1)x)
5. Apply the initial condition u(x, 0) = 2 sin(3x)to determine the series coefficients cn.
2sin(3x) =
∞
∑
n=1
cnsin((2n−1)x)
Comparing coefficients of sin((2n−1)x)gives
cn= 2 ∫π
0
sin((2n−1)x)sin(3x)dx
6. Solve for cnto find the final solution.
24. Question:
Consider the heat equation in one dimension:
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions:
u(0, t) = 0
u(L, t) = 0
and initial condition:
u(x, 0) = 1 for 0< x < L
Find the solution to this heat equation using the method of separation of variables.
Ans. Solution:
We assume that the solution to the heat equation can be written in the form of a product of
two functions:
u(x, t) = X(x)T(t)
Substitute this into the heat equation to get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ2
This gives two separate equations:
T′(t) + kλ2T(t) = 0
X′′(x) + λ2X(x) = 0
Solving the time equation yields:
T(t) = Ce−kλ2t
Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0, we get:
u(0, t) = X(0)T(t) = 0 ⇒X(0) = 0
u(L, t) = X(L)T(t) = 0 ⇒X(L) = 0
The solution to the spatial part of the equation is then given by:
X(x) = C1sin(λx)
Applying the boundary conditions X(0) = 0 and X(L) = 0 yields:
C1sin(0) = 0 ⇒C1= 0
C1sin(λL) = 0
This implies that λ=nπ
Lfor n= 1,2,3, . . .
Therefore, the general solution to the heat equation is:
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−k(nπ
L)2t
u(x, t) =
∞
∑
n=1
Bnsin (nπx
L)e−k(nπ
L)2t
where Bnare constants determined by the initial condition u(x, 0) = 1.
25. Question 25:
Consider the following partial differential equation:
∂2u
∂t2=c2(∂2u
∂x2+∂2u
∂y2)
where cis a constant. Find the general solution to this wave equation.
Ans. To solve the given wave equation, we will use the method of separation of variables.
1. Assume a solution of the form u(x, y, t) = X(x)Y(y)T(t).
Substitute the separated solutions into the wave equation:
X(x)Y(y)T′′(t) = c2(X′′(x)Y T (t) + XY ′′(y)T(t))
Divide both sides by X(x)Y(y)T(t):
T′′(t)
c2T(t)=X′′(x)
X(x)+Y′′(y)
Y(y)
Since the left-hand side is solely dependent on tand the right-hand side is solely dependent
on xand y, both sides must be equal to a constant. Let’s denote this constant by −λ.
2. Solve the ODEs for X,Y, and T.
We obtain three separate ordinary differential equations:
For T(t):
T′′(t) + c2λT (t) = 0
The general solution for T(t)is T(t) = Acos(c√λt)+Bsin(c√λt), where Aand Bare
constants.
For X(x):
X′′(x) + λX(x) = 0
The general solution for X(x)is X(x) = Ccos(√λx)+Dsin(√λx), where Cand Dare
constants.
For Y(y):
Y′′(y) + λY (y) = 0
The general solution for Y(y)is Y(y) = Ecos(√λy)+Fsin(√λy), where Eand Fare
constants.
3. Combine the solutions.
The general solution to the wave equation is:
u(x, y, t) =
∞
∑
n=1
∞
∑
m=1 (Anm cos(√λnmx)cos(√λnmy)cos(c√λnmt)+Bnm sin(√λnmx)sin(√λnmy)cos(c√λnmt))
where λnm =(nπ
L)2+(mπ
W)2and Anm and Bnm are constants.
26. Consider the following heat equation describing the temperature distribution in a one-
dimensional rod of length L:
∂u
∂t =k∂2u
∂x2,0< x < L, t > 0
subject to the boundary conditions:
u(0, t) = 0, u(L, t) = 0
and the initial condition:
u(x, 0) = 2 sin (πx
L)
Find the solution u(x, t)to this heat equation.
Ans. Solution:
1. We will use separation of variables to solve this partial differential equation. Let’s assume
that u(x, t) = X(x)T(t).
2. Substituting this into the heat equation, we get:
XT ′=kX′′T
Dividing both sides by kXT gives:
T′
kT =X′′
X=−λ
where λis a constant.
3. Solving the ODE X′′ +λX = 0 with the boundary conditions u(0, t) = 0 and u(L, t) = 0
gives the eigenfunctions:
Xn(x) = sin (nπx
L)
with corresponding eigenvalues λn=(nπ
L)2for n= 1,2,3, . . ..
4. We now have two ODEs to solve:
T′
n=−kλnTnand X′′
n=−λnXn
with the initial conditions Tn(0) = 2 and Xn(x) = sin (nπx
L).
5. The solution to the heat equation is then:
u(x, t) =
∞
∑
n=1
Tn(t)Xn(x) =
∞
∑
n=1
2sin (nπx
L)e−k(nπ
L)2t
27. Question 27: Consider the heat equation in one dimension, given by ∂u
∂t =k∂2u
∂x2, where kis
a positive constant. Given the initial condition u(x, 0) = x(1 −x)for 0< x < 1and boundary
conditions u(0, t) = u(1, t) = 0 for t > 0, find the solution to the heat equation.
Ans. Let’s first write the solution to the heat equation using separation of variables and Fourier
series. Let u(x, t) = X(x)T(t). Plugging this into the heat equation, we get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ
This gives us two separate ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
with boundary conditions X(0) = X(1) = 0. Solving the second equation with these bound-
ary conditions gives us the eigenvalues λn=n2π2and eigenfunctions Xn(x) = sin(nπx).
Now, we can solve the first equation:
T′(t) + kn2π2T(t) = 0
T′(t) = −kn2π2T(t)
dT
T=−kn2π2dt
ln |T(t)|=−kn2π2t+C
T(t) = Ae−kn2π2t
The general solution to the heat equation is then:
u(x, t) =
∞
∑
n=1
Bnsin(nπx)e−kn2π2t
To find the coefficients Bn, we can use the Fourier sine series. First, we express the initial
condition u(x, 0) = x(1 −x)as a Fourier sine series:
x(1 −x) =
∞
∑
n=1
Bnsin(nπx)
Multiplying both sides by sin(mπx)and integrating from 0 to 1, we get:
∫1
0
x(1 −x)sin(mπx)dx =
∞
∑
n=1
Bn∫1
0
sin(nπx)sin(mπx)dx
This allows us to compute the coefficient Bm:
Bm= 2 ∫1
0
x(1 −x)sin(mπx)dx
After computing this integral and plugging in the values of Bnand Xn(x), we finally get the
solution to the heat equation.
28. Consider the following heat equation in one dimension:
∂u
∂t =k∂2u
∂x2
where u(x, t)represents the temperature at position xand time t, and kis a constant.
Given the initial condition u(x, 0) = 3x(1 −x)for 0<x<1and the boundary conditions
u(0, t) = 0 and u(1, t) = 0 for t≥0, find the temperature distribution u(x, t)for t > 0.
Ans. Solution: 1. The first step is to express the general solution to the heat equation in terms
of separation of variables. Let u(x, t) = X(x)T(t). Substituting this into the heat equation gives:
X(x)T′(t) = kX′′(x)T(t)
2. Dividing by kX(x)T(t)gives T′(t)
kT (t)=X′′ (x)
X(x). Each side must be a constant, say −λ. This
leads to two ordinary differential equations:
T′(t) + kλT (t) = 0 and X′′(x) + λX(x) = 0
3. Solving the first ODE gives T(t) = Ae−kλt, where Ais a constant. For the second ODE, the
solutions depend on the sign of λ: When λ > 0, we have X(x) = Bsin(√λx)+Ccos(√λx).
When λ= 0, we have X(x) = Bx +C. When λ < 0, we have X(x) = Be√|λ|x+Ce−√|λ|x.
4. Applying the boundary conditions u(0, t)=0and u(1, t)=0for all times t≥0gives
X(0) = 0 and X(1) = 0, which leads to the conclusion that λ=n2π2for n= 1,2,3, . . ..
5. Therefore, the general solution to the heat equation is a sum of these modes:
u(x, t) =
∞
∑
n=1
(Ansin(nπx) + Bncos(nπx))e−n2π2kt
6. Now, we need to determine the coefficients Anusing the initial condition. We have:
u(x, 0) =
∞
∑
n=1
Ansin(nπx) = 3x(1 −x)
7. To find An, we multiply both sides by sin(mπx)and integrate from 0 to 1 with respect to
x, where mis a positive integer. This leads to
An=2
1−cos(nπ)∫1
0
3x(1 −x)sin(nπx)dx
8. The final step is to evaluate the integral and substitute the values of Anback into the
general solution to get the temperature distribution u(x, t)for t > 0.
29. Question 29:
Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, where u(x, t)is the
temperature distribution at position xand time t, and kis a positive constant.
Given the boundary conditions: u(0, t) = 0 and u(L, t) = 0 for t > 0,
and the initial condition: u(x, 0) = 2x(L−x)for 0< x < L.
Find the steady-state solution us(x)for this heat equation.
Ans. To find the steady-state solution us(x), we need to solve the heat equation under the
assumption that as t→ ∞, the temperature distribution becomes time-independent.
1. Assume u(x, t) = T(t)X(x). Substitute this into the heat equation to get: 1
kT
dT
dt =1
X
d2X
dx2.
2. Rearrange the equation to separate variables: 1
kT
dT
dt =1
X
d2X
dx2=−λ.
3. Solve the ODE for X(x)with the boundary conditions: X′′(x) + λX(x)=0,X(0) = 0
and X(L) = 0.
The general solution to the ODE is X(x) = c1sin (√λx)+c2cos (√λx).
Applying the boundary conditions X(0) = 0 and X(L)=0, we have √λ=nπ
Lfor n=
1,2,3, . . ..
4. The solution for X(x)is then: Xn(x) = sin (nπx
L).
5. Solve the ODE for T(t):dT
dt =−kλT . The solution is T(t) = ce−kλt.
6. The general solution to the heat equation is then: u(x, t) = ∑∞
n=1 cne−k(nπ
L)2tsin (nπx
L).
7. Since we are interested in the steady-state solution, as t→ ∞,u(x, t)→us(x)where
us(x) = ∑∞
n=1 cnsin (nπx
L).
8. Applying the initial condition u(x, 0) = 2x(L−x), we find: cn=4
n3π3((−1)n−1).
Therefore, the steady-state solution to the heat equation is: us(x) = 2 ∑∞
n=1
4
n3π3((−1)n−
1) sin (nπx
L).
30. Find the solution to the heat equation on the interval 0< x < π with boundary conditions
u(0, t) = u(π, t) = 0 and initial condition u(x, 0) = x(π−x).
Ans. Let’s find the solution to the heat equation step by step:
1. Setting up the problem: The heat equation in one dimension is given by ∂u
∂t =k∂2u
∂x2,
where kis the thermal diffusivity constant.
The general form of the solution to the heat equation with the given boundary conditions is
u(x, t) = ∑∞
n=1 Bnsin(nx)e−n2kt.
2. Applying the initial condition: Substitute the initial condition u(x, 0) = x(π−x)into
the general solution:
u(x, 0) = x(π−x) =
∞
∑
n=1
Bnsin(nx)
Now, use the orthogonality of sine functions to find Bn:
Bn=2
π∫π
0
x(π−x)sin(nx)dx
3. Calculating Bn:
Bn=2
π∫π
0
x(π−x)sin(nx)dx =2
π(∫π
0
xsin(nx)dx −∫π
0
x2sin(nx)dx)
Bn=2
π((−π)(−1)n+nπ
n2−2(−1)n
n3)=4
n3π(1−(−1)n−1
n)
4. Putting it all together: The solution to the heat equation with the given initial and
boundary conditions is:
u(x, t) =
∞
∑
n=1 (4
n3π(1−(−1)n−1
n))sin(nx)e−n2kt