MAT 142 - COLLEGE MATHEMATICS - Heat, Wave, and
Laplace Equations Practice Material - Set 5
1. Find a solution to the heat equation ut= 4uxx subject to the initial condition u(x, 0) =
x(1 −x)on the interval 0< x < 1.
Ans. Solution:
1. First, we assume the solution has the form u(x, t) = X(x)T(t), where X(x)is a function
of xonly and T(t)is a function of tonly.
2. Substituting u(x, t) = X(x)T(t)into the heat equation ut= 4uxx gives
X(x)T′(t) = 4X′′(x)T(t)
3. Dividing both sides by X(x)T(t)gives
T′(t)
4T(t)=X′′(x)
X(x)
Let both sides equal to a constant −k2:
T′(t)
4T(t)=−k2and X′′(x)
X(x)=−k2
4. Solve the ODE for X(x):
X′′(x) + k2X(x) = 0
The general solution for X(x)is X(x) = c1cos(kx) + c2sin(kx).
5. Apply the initial condition u(x, 0) = x(1 −x)to find the values of c1and c2:
c1= 0 and c2= 1
So, X(x) = sin(kx).
6. Solve the ODE for T(t):
T′(t)+4k2T(t) = 0
The general solution for T(t)is T(t) = Ae−4k2t.
7. The solution to the heat equation is then
u(x, t) = ∞
∑
n=1
Bnsin(nπx)e−4(nπ)2t
where Bnare the Fourier coefficients.
2. Question: Consider the following Heat Equation defined on the interval 0<x<πand
t > 0:∂u
∂t =∂2u
∂x2−u, u(x, 0) = sin(x), u(0, t) = u(π, t) = 0.
Find the solution u(x, t).
Ans. Solution: 1. Let’s begin by assuming a separable solution u(x, t) = X(x)T(t). Substitute
this solution into the Heat Equation:
X(x)T′(t) = X′′(x)T(t)−X(x)T(t)
Divide by the product u(x, t) = X(x)T(t)to obtain:
T′(t)
T(t)=X′′(x)
X(x)−1
2. This yields two separate Ordinary Differential Equations: For the time part T′(t)/T(t) =
−1/λ, where λis a constant. Solving this gives T(t) = Ce−t, where Cis a constant.
3. For the spatial part X′′(x)/X(x) = −1 + λ, introduce the separation constant −λ: This
gives the boundary value problem:
X′′(x)+(λ−1)X(x) = 0, X(0) = X(π) = 0.
4. The general solution will be a linear combination of the two cases for λ: i) For λ= 0:
X(x) = Ax +Bii) For λ=n2, n ∈Z+:X(x) = Csin(nx) + Dcos(nx)
5. Applying the boundary conditions X(0) = 0 and X(π) = 0: i) For λ= 0:X(x) = Bx,
B= 0 =⇒X(x) = 0 ii) For λ=n2:X(x) = Csin(nx),X(π) = 0 =⇒Csin(nπ) =
0=⇒C= 0
6. Thus, the only possibility is λ= 0, which corresponds to the trial solution X(x) = Bx.
Therefore, X(x)=0is not a solution. This leads to a contradiction, so the assumption of
separable variables doesn’t hold. We need to consider a different approach to solve the Heat
Equation.
3. Question: Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, subject to
the boundary conditions u(0, t) = 0 and u(1, t) = 0, and the initial condition u(x, 0) = 2xfor
0< x < 1. Find the solution u(x, t)for t > 0.
Ans. Solution: 1. We begin by assuming a separation of variables solution of the form
u(x, t) = X(x)T(t). Substituting this into the heat equation yields T′
kT =X′′
X=−λwhere λis
a separation constant.
2. We then have two ODEs to solve: For the time component: T′+kλT = 0 with the
general solution T(t) = cexp(−kλt). For the spatial component: X′′ +λX = 0 with the
solution X(x) = Asin(√λx)+Bcos(√λx).
3. Applying the boundary condition u(0, t) = 0 gives X(0)T(t) = 0, which implies X(0) = 0
and B= 0.
4. Applying the boundary condition u(1, t) = 0 gives X(1)T(t) = 0, which implies X(1) = 0
and sin(√λ)= 0. This leads to the eigenvalues λn=n2π2for n= 1,2, ....
5. Therefore, the spatial component becomes Xn(x) = Ansin(nπx), and the general solution
is then u(x, t) = ∞
∑
n=1
cne−k(nπ)2tsin(nπx).
6. Finally, applying the initial condition u(x, 0) = 2xgives u(x, 0) = ∞
∑
n=1
cnsin(nπx)=2x.
By comparing coefficients, we find cn=2
π∫1
02xsin(nπx)dx.
7. Solving the integral yields cn=4
n2π((−1)n−1) sin(nπx).
8. Therefore, the solution to the heat equation with the given boundary and initial conditions
is u(x, t) = ∞
∑
n=1
4((−1)n−1)
n2sin(nπx)e−k(nπ)2t.
4. Consider the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t)=0and u(π, t)=0, with initial condition u(x, 0) =
sin x.
Find the solution u(x, t)to the heat equation.
Ans. Solution: 1. We start by assuming a separation of variables solution of the form
u(x, t) = X(x)T(t).
2. Plugging this into the heat equation, we get T′
kT =X′′
X=−λ, where λis an arbitrary
constant that we will determine later.
3. Solving the ordinary differential equation for X(x), we have X′′ +λX = 0. The general
solution to this equation is X(x) = Acos(√λx)+Bsin(√λx).
4. Using the boundary conditions u(0, t)=0and u(π, t)=0, we get X(0) = A= 0 and
X(π) = Bsin(√λπ)= 0. This implies that √λ=nfor n∈Z.
5. So, the eigenfunctions are Xn(x) = Bnsin(nx)for n= 1,2,3, ....
6. Next, we solve for T(t)by substituting λ=n2back into T′
kT =−n2. This gives Tn(t) =
Cne−kn2t.
7. Therefore, the general solution to the heat equation is
u(x, t) = ∞
∑
n=1
Dnsin(nx)e−kn2t
8. Finally, we use the initial condition u(x, 0) = sin xto find the coefficients Dn. By the
orthogonality of sines, we get Dn= 2 ∫π
0sin(x)sin(nx)dx.
9. Computing the integral, we get Dn=2
π
(−1)n+1
n2−1for nodd, and Dn= 0 for neven.
10. Therefore, the solution to the heat equation satisfying the given conditions is
u(x, t) = 4
π
∞
∑
n=1
sin((2n−1)x)e−(2n−1)2kt
2n−1
5. Question: Consider the following Heat Equation on the interval 0< x < π with periodic
boundary conditions:
∂u
∂t =k∂2u
∂x2, u(0, t) = u(π, t),∂u
∂x(0, t) = ∂u
∂x(π, t)
If the initial condition is given by u(x, 0) = x(π−x)for 0< x < π, find the solution u(x, t).
Ans. Solution: 1. We start by assuming a separation of variables solution of the form:
u(x, t) = X(x)T(t)
2. Substituting this into the Heat Equation, we get:
X(x)T′(x) = kX′′(x)T(t)
Dividing by kX(x)T(t), we get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ
3. Solving the ODE X′′ (x)
X(x)=−λgives us the eigenvalue problem:
X′′(x) + λX(x) = 0
With the boundary conditions X(0) = X(π)and X′(0) = X′(π). Solving this gives us the
eigenfunctions:
Xn(x) = cos (nx
π), λn=n2
4. This leads to the general solution:
u(x, t) = ∞
∑
n=1
cncos (nx
π)e−kn2t
5. To find the coefficients cn, we use the initial condition:
u(x, 0) = ∞
∑
n=1
cncos (nx
π)=x(π−x)
6. Taking the inner product of both sides with cos (mx
π)and integrating over [0, π]gives us:
cm=2
π∫π
0
x(π−x)cos (mx
π)dx
7. Evaluating the integral, we find that:
cm=4sin (mπ
2)
m3π3
8. Therefore, the solution to the Heat Equation with the given initial condition is:
u(x, t) = ∞
∑
n=1
4sin (nπ
2)
n3π3cos (nx
π)e−kn2t
6. Question:
Consider the one-dimensional heat equation defined as
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions:
u(0, t) = 0
u(π, t) = 0
and the initial condition:
u(x, 0) = f(x) = {0if 0≤x < π
2
2if π
2≤x≤π
Find the solution to the heat equation at time t > 0.
Ans. Step-by-step solution: 1. We start by expressing the solution to the heat equation as a
Fourier sine series. Let’s denote the solution as u(x, t) = ∑∞
n=1 Bn(t)sin(nx).
2. Applying the initial condition u(x, 0) = f(x), we have:
f(x) = ∞
∑
n=1
Bn(0) sin(nx) = {0if 0≤x < π
2
2if π
2≤x≤π
Since f(x)is piecewise, we can express it in a more general form to determine the coefficients
Bn(0). We find:
Bn(0) = 2
π∫π
0
f(x)sin(nx)dx
3. Computing the integral for Bn(0), we have:
Bn(0) = 2
π(∫π
2
0
0·sin(nx)dx +∫π
π
2
2sin(nx)dx)
Bn(0) = 4
nπ (cos (nπ
2)−cos (nπ))
4. Since cos (nπ
2)= 0 when nis odd and 1 when nis even, we find that Bn(0) simplifies to:
Bn(0) = {0if nis odd
4
nπ if nis even
5. Having determined the coefficients Bn(0), we can now find the solutions Bn(t)by solving
the ordinary differential equation:
dBn
dt =−kn2Bn
The solution to this ODE is Bn(t) = Bn(0)e−kn2t.
6. Substituting Bn(0) into the expression for Bn(t), we find:
Bn(t) = {0if nis odd
4
nπ e−kn2tif nis even
7. Finally, the solution to the heat equation at time tis given by:
u(x, t) = ∞
∑
n=1
4
nπ e−kn2tsin(nx)
7. Find the solution to the heat equation initial value problem
ut= 4uxx,0< x < 1, t > 0,
subject to the initial conditions
u(x, 0) = 2x,
and the boundary conditions
u(0, t) = 0, u(1, t) = 2.
Ans. Step 1. We will first seek a solution in the form of a separated variable. Let u(x, t) =
X(x)T(t). Then the heat equation becomes
XT ′= 4X′′T.
Dividing by XT gives
T′
4T=X′′
X=−λ,
where λis the separation constant.
Step 2. We solve for the spatial equation X′′ +λX = 0. The solutions are of the form
X(x) = c1cos(√λx)+c2sin(√λx). Applying the boundary conditions, we find that √λ=nπ
for n= 1,2,3, ....
Step 3. We consider the temporal equation T′=−4λT . This has the solution T(t) =
Ae−4n2π2tfor n= 1,2,3, ....
Step 4. Now we form the general solution as a sum of these separated solutions. Since the
PDE is linear, the general solution is
u(x, t) = ∞
∑
n=1
(c1ncos(nπx) + c2nsin(nπx))e−4n2π2t.
Step 5. Finally, we solve for the coefficients c1nand c2nusing the initial condition u(x, 0) =
2x. Plugging this into the general solution, we find
2x=∞
∑
n=1
c1ncos(nπx).
Taking the inner product of both sides with cos(mπx)and integrating from 0 to 1, we obtain
c1n= 4 ∫1
0
2xcos(nπx)dx ={0, n = 1
4/(π2), n = 1.
Step 6. Therefore, the solution to the heat equation initial value problem is
u(x, t) = 4
π2cos(πx)e−4π2t.
8. Find the general solution to the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition
u(x, 0) = sin(2x)
and boundary conditions
u(0, t) = 0, u(π, t) = 0
where 0< x < π and t > 0.
Ans. Let’s assume the general solution has the form u(x, t) = X(x)T(t). We substitute this
into the heat equation to obtain two ordinary differential equations:
1. For X(x):
X′′ +λX = 0, X(0) = X(π) = 0
2. For T(t):
T′+kλT = 0
Let’s solve the spatial equation first:
1. Solving for X(x):
The general solution to the spatial equation is X(x) = Asin(√λx), where λ > 0for
non-trivial solutions. The boundary conditions then give us:
X(0) = Asin(0) = 0 ⇒A= 0 or nπ
X(π) = Asin(√λπ)= 0 ⇒√λ=n
So, the eigenfunctions are Xn(x) = sin(nx)for n= 1,2,3, . . . and the corresponding eigen-
values are λn=n2.
2. Solving for T(t):
The time equation simplifies to T′+kn2T= 0, which has solution Tn(t) = cne−kn2t.
The general solution to the differential equation is a sum of the separated solutions:
u(x, t) = ∞
∑
n=1
cne−kn2tsin(nx)
Finally, we use the initial condition to find the coefficients:
u(x, 0) = ∞
∑
n=1
cnsin(nx) = sin(2x)
By comparing the Fourier sine series of both sides, we find that:
c2= 1, cn= 0 for n= 2
Therefore, the general solution to the heat equation subject to the given initial and boundary
conditions is:
u(x, t) = e−4kt sin(2x)
9. Find the solution to the following partial differential equation:
utt = 4uxx
subject to the boundary conditions:
u(0, t) = 0, u(L, t) = 0
and the initial conditions:
u(x, 0) = sin (πx
L), ut(x, 0) = 0
where 0≤x≤Land t > 0.
Ans.
Solution:
1. The general solution to the wave equation utt = 4uxx can be expressed as:
u(x, t) = F(x+ 2t) + G(x−2t)
where Fand Gare arbitrary functions to be determined.
2. Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0, we find:
F(2t) + G(−2t) = 0 and F(L+ 2t) + G(L−2t) = 0
3. Since u(x, 0) = sin (πx
L)and ut(x, 0) = 0, we have:
F(x) + G(x) = sin (πx
L)and 2F′(x)−2G′(x) = 0
4. Solving the system of equations from steps 2 and 3, we find:
F(x) = 1
2sin (πx
L)and G(x) = −1
2sin (πx
L)
5. Therefore, the solution to the partial differential equation utt = 4uxx subject to the given
boundary and initial conditions is:
u(x, t) = 1
2sin (π(x+ 2t)
L)−1
2sin (π(x−2t)
L)
10. Question: Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where t > 0,
0< x < L, and k > 0. Suppose the initial conditions are given by u(x, 0) = sin(πx)and the
boundary conditions are u(0, t) = u(L, t) = 0. Find the solution to this heat equation.
Ans. Solution: 1. First, we assume that the solution to the heat equation can be written as a
product of functions of xand t, so we write u(x, t) = X(x)T(t).
2. Substituting u(x, t) = X(x)T(t)into the heat equation, we get 1
k
T′(t)
T(t)=X′′ (x)
X(x).
3. This equation can be separated into two ordinary differential equations: 1
k
T′(t)
T(t)=−λand
X′′(x) + λX(x) = 0, where λis a separation constant.
4. Solving the ODE for X(x)with the given boundary conditions u(0, t) = u(L, t) = 0, we
get X(x) = sin (nπx
L), where nis a positive integer.
5. For the ODE involving T(t), we have T′(t)
kT (t)=−λ. Solving this gives T(t) = e−kλt.
6. Combining the solutions for X(x)and T(t), we get the general solution to the heat
equation as u(x, t) = ∑∞
n=1 cnsin (nπx
L)e−k(nπ/L)2t, where cnare constants to be determined.
7. Using the initial condition u(x, 0) = sin(πx), we find that c1= 1 and cn= 0 for n > 1.
8. Therefore, the solution to the heat equation with the given initial and boundary conditions
is u(x, t) = sin(πx)e−kπ2t/L2.
11. Find the solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition u(x, 0) = x(1 −x)and the boundary conditions u(0, t) = 0
and u(1, t) = 0.
Ans. The solution to the heat equation can be found using separation of variables.
1. We assume the solution has the form u(x, t) = X(x)T(t).
2. Plugging this into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x).
3. Rearranging, we have T′(t)
kT (t)=−λ=X′′ (x)
X(x).
4. This gives us two ordinary differential equations: T′(t)+kλT (t) = 0 and X′′(x)+λX(x) =
0.
5. The boundary conditions lead to the eigenvalues λ=n2π2for n= 1,2,3, ... and the
corresponding eigenfunctions Xn(x) = √2sin(nπx).
6. The time function solution is Tn(t) = e−kn2π2t.
7. Therefore, the general solution to the heat equation is u(x, t) = ∑∞
n=1 Bnsin(nπx)e−kn2π2t.
8. Next, we find the coefficients Bnby using the initial condition u(x, 0) = x(1 −x).
9. Plugging t= 0 into u(x, t)and using the Fourier sine series formula leads to Bn=
4∫1
0x(1 −x)sin(nπx)dx.
10. Calculating this integral, we find Bn=8
n3π3((−1)n−1).
11. Finally, substituting Bnback into the general solution gives the solution to the heat equa-
tion.
12. Consider the following heat equation initial-boundary value problem:
ut=k·uxx,0< x < L, t > 0
u(0, t) = 0,
u(L, t) = 0,
u(x, 0) = f(x),
where u(x, t)is the temperature distribution, kis the thermal conductivity constant, Lis the
length of the rod, and f(x)is a given function.
Determine the solution u(x, t)for this initial-boundary value problem.
Ans. Solution: 1. We will use separation of variables to solve the heat equation. Let’s assume
that u(x, t) = X(x)T(t).
2. Plugging u(x, t) = X(x)T(t)into the heat equation, we get:
X(x)T′(t) = k·X′′(x)T(t)
3. Divide both sides by k·X(x)T(t)to separate variables:
T′(t)
k·T(t)=X′′(x)
X(x)=−λ
where λis a separation constant.
4. Solve the temporal part T′(t)
k·T(t)=−λto get T(t) = Ae−λkt, where Ais a constant.
5. Solve the spatial part X′′ (x)
X(x)=−λto get X(x) = Bsin (nπx
L)or X(x) = Bcos (nπx
L),
where Bis a constant.
6. The general solution to the heat equation is therefore:
u(x, t) = ∞
∑
n=1 (Cnsin (nπx
L))e−(nπ
L)2kt
where Cnare coefficients to be determined from the initial condition u(x, 0) = f(x).
7. Apply the initial condition u(x, 0) = f(x):
f(x) = ∞
∑
n=1
Cnsin (nπx
L)
8. Multiply both sides by sin (mπx
L)and integrate from 0to L:
∫L
0
f(x)sin (mπx
L)dx =∫L
0
∞
∑
n=1
Cnsin (nπx
L)sin (mπx
L)dx
9. Using the orthogonality property of sine functions, we find that Cn=2
L∫L
0f(x)sin (nπx
L)dx.
10. Therefore, the solution to the initial-boundary value problem is:
u(x, t) = ∞
∑
n=1 (2
L∫L
0
f(x)sin (nπx
L)dx)sin (nπx
L)e−(nπ
L)2kt
13. Let u(x, t)satisfy the one-dimensional heat equation
ut=kuxx,0< x < π, t > 0,
subject to the boundary condition u(0, t) = 0, ux(π, t) = 0 and the initial condition
u(x, 0) = x(π−x).
Determine u(x, t).
Ans. Solution: We will solve the given heat equation using separation of variables.
1. Separation of Variables: Let u(x, t) = X(x)T(t). Substituting this into the heat
equation yields
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).
Letting both sides equal a constant −λ, we have
T′(t)
kT (t)=−λ=X′′(x)
X(x).
This gives us two equations to solve:
T′(t) + kλT (t) = 0, X′′(x) + λX(x) = 0.
2. Solving the Time Equation: The time equation with the boundary condition yields
T′(t) + kλT (t) = 0, T (t) = ce−kλt.
3. Solving the Spatial Equation: The spatial equation is a simple eigenvalue problem
satisfying both boundary conditions. The general solution is
X(x) = c1cos(√λx)+c2sin(√λx).
Applying the boundary conditions gives
X(0) = 0 =⇒c1= 0,
X′(π) = 0 =⇒√λcos(√λπ)= 0.
This gives √λ=nπ where n= 1,2,3, . . .. Thus, the spatial eigenfunctions are
ϕn(x) = sin(nx), n = 1,2,3, . . .
4. General Solution: The general solution is a Fourier sine series:
u(x, t) = ∞
∑
n=1
Tn(t)ϕn(x) = ∞
∑
n=1
cne−kn2π2tsin(nx).
5. Determining Coefficients: To determine the coefficients, we need to use the initial
condition. The Fourier sine series of x(π−x)is
x(π−x) = ∞
∑
n=1
cnsin(nx)∫π
0
x(π−x)sin(nx)dx.
After evaluating the integral, we find cn=4
n3π(−1)n+1.
6. Final Solution: Putting everything together, the solution to the heat equation with the
given initial and boundary conditions is
u(x, t) = ∞
∑
n=1
4
n3π(−1)n+1e−kn2π2tsin(nx).
14. Find the solution to the following partial differential equation:
∂2u
∂t2=c2∂2u
∂x2
subject to the boundary conditions u(0, t) = 0,u(L, t) = 0, and the initial conditions u(x, 0) =
f(x)and ∂u
∂t (x, 0) = 0.
Ans. Solution: 1. Let’s first assume a separation of variables solution of the form:
u(x, t) = X(x)T(t)
2. Substitute the separated variables into the partial differential equation:
X(x)T′′(t) = c2X′′(x)T(t)
3. Divide through by c2X(x)T(t):
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ
4. Solve the two ordinary differential equations:
T′′(t) + c2λT (t) = 0
X′′(x) + λX(x) = 0
5. The solutions to T′′(t) + c2λT (t) = 0 are:
T(t) = Acos(ct√λ)+Bsin(ct√λ)
6. The solutions to X′′(x) + λX(x) = 0 are:
X(x) = Ccos(x√λ)+Dsin(x√λ)
7. Apply the boundary conditions u(0, t) = 0 and u(L, t) = 0 to get:
X(0)T(t) = 0 ⇒X(0) = 0
X(L)T(t) = 0 ⇒X(L) = 0
8. The eigenvalues λthat satisfy the boundary conditions are given by:
X(0) = 0 ⇒C= 0
X(L) = 0 ⇒Dsin(L√λ)= 0 ⇒λn=(nπ
L)2
9. Therefore, the general solution can be expressed as:
u(x, t) = ∞
∑
n=1
(cncos(nπct/L) + dnsin(nπct/L)) sin(nπx/L)
10. Apply the initial condition u(x, 0) = f(x)to determine the coefficients cnand dnusing
Fourier sine series.
f(x) = ∞
∑
n=1
cnsin(nπx/L)
cn=2
L∫L
0
f(x)sin(nπx/L)dx
11. Hence, the solution to the given partial differential equation subject to the boundary and
initial conditions is:
u(x, t) = ∞
∑
n=1 [( 2
nπ
∂f
∂x (L)−2L
nπ f(L))1−cos(nπct/L)
c2nπ/L]sin(nπx/L)
15. Question: Consider the following heat equation with mixed boundary conditions:
ut= 4uxx,0< x < 1, t > 0
u(0, t) = 0, t > 0
ux(1, t) = 0, t > 0
u(x, 0) = sin(πx),0≤x≤1
F indthesolution
u(x,t)tothegiveninitial −boundaryvalueproblem.
Ans. Solution: 1. We will first assume a separation of variables solution u(x, t) = X(x)T(t).
2. Substitute u(x, t) = X(x)T(t)into the heat equation to get:
T′(t)
4T(t)=X′′(x)
X(x)=−λ
where λis a separation constant. 3. Solve the ODE for X(x):
X′′(x) + λX(x) = 0
subject to the boundary conditions X(0) = 0 and X′(1) = 0. 4. The solutions to this ODE are
of the form:
Xn(x) = sin(nπx),where λ= (nπ)2
5. Next, solve the ODE for T(t):
T′(t)+4λT (t) = 0
which has the solution Tn(t) = cne−4(nπ)2t. 6. Using the principle of superposition, we can write
the general solution as:
u(x, t) = ∞
∑
n=1
cnsin(nπx)e−4(nπ)2t
7. Finally, use the initial condition u(x, 0) = sin(πx)to determine the coefficients cnby projecting
u(x, 0) onto the eigenfunctions {sin(nπx)}:
cn=∫1
0
sin(πx)sin(nπx)dx
16. Question:
Consider the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition
u(x, 0) = 3x2−2x
and the boundary conditions
u(0, t) = 0
u(1, t) = 1
Find the solution to the heat equation for 0≤x≤1and t > 0.
Ans. Solution:
Given the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
with initial condition u(x, 0) = 3x2−2xand boundary conditions u(0, t) = 0 and u(1, t) = 1,
we seek to find the solution for 0≤x≤1and t > 0.
1. Find the general solution:
Let u(x, t) = X(x)T(t). Plugging this into the heat equation, we have
X(x)T′(t) = kX′′(x)T(t)
T′(t)
kT (t)=X′′(x)
X(x)=−λ
This gives two ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
with boundary conditions X(0) = 0 and X(1) = 1.
2. Solve the time part:
The solution to the time ODE is
T(t) = c1e−kλt
3. Solve the spatial part:
The solution to the spatial ODE is
X(x) = c2sin(√λx)+c3cos(√λx)
Applying the boundary conditions, we have
X(0) = c3= 0
X(1) = c2sin(√λ)= 1
This implies that c2=1
sin(√λ).
4. Find λ:
Since λ > 0for oscillatory solutions, we must have sin(√λ)= 0, so √λ=nπ where nis a
nonzero integer. This gives √λ=mπ, where m=±1,±2, . . .. Thus, we get λm=(mπ
2)2for
m=±1,±3, . . ..
5. Determine the solution:
The solution to the heat equation is
u(x, t) = ∑
m=1,3,...
cme−k(mπ
2)2t1
sin (mπ
2)sin (mπx
2)
Applying the initial condition, we find cm=2
π∫1
0(3x2−2x)sin (mπx
2)dx.
This gives the final solution to the heat equation for the given initial and boundary conditions.
17. Question 17: Consider the following heat equation on the interval 0< x < 1with boundary
conditions: ∂u
∂t =∂2u
∂x2, u(0, t) = u(1, t) = 0
Subject to the initial condition u(x, 0) = 2x(1 −x).
Find the solution u(x, t)for t > 0.
Ans. Solution:
We will solve the heat equation using the method of separation of variables.
1. Separation of Variables: Assume the solution can be expressed as a product of functions
of xand t:u(x, t) = X(x)T(t).
Substitute this expression into the heat equation:
X(x)T′(t) = X′′(x)T(t)
Divide both sides by u(x, t):
T′(t)
T(t)=X′′(x)
X(x)=−λ
where λis the separation constant.
We now have two ODEs to solve:
T′(t) + λT (t) = 0
X′′(x) + λX(x) = 0
2. Solving the ODE for T(t):The ODE for T(t)has the solution:
T(t) = c1e−λt
3. Solving the ODE for X(x):The ODE for X(x)has the general solution:
X(x) = c2cos(√λx)+c3sin(√λx)
Applying the boundary conditions u(0, t) = u(1, t) = 0:
X(0) = c2= 0
X(1) = c3sin(√λ)= 0
For non-trivial solutions, we have sin(√λ)= 0 =⇒√λ=nπ for n= 1,2,3, ...
Thus, the eigenvalues are λ=n2π2.
The corresponding eigenfunctions are Xn(x) = cnsin(nπx).
4. Finding the series solution: Substitute the separated solution back into the original
PDE:
u(x, t) = ∞
∑
n=1
Tn(t)Xn(x) = ∞
∑
n=1
cne−n2π2tsin(nπx)
5. Solving for the Fourier coefficients: From the initial condition u(x, 0) = 2x(1 −x):
cn= 2 ∫1
0
2x(1 −x)sin(nπx)dx
This integral can be computed as:
cn=8
n3π3((−1)n−1)
6. Final solution: The solution to the heat equation with the given boundary and initial
conditions is:
u(x, t) = ∞
∑
n=1
8
n3π3((−1)n−1)e−n2π2tsin(nπx)
18. Question:
Consider the following heat equation with initial condition:
∂u
∂t =k∂2u
∂x2, u(x, 0) = x(1 −x),0< x < 1
where kis a positive constant. Solve the heat equation subject to the given initial condition.
Ans. Steps: 1. We begin by assuming a solution of the form u(x, t) = X(x)T(t). 2.
Substituting u(x, t) = X(x)T(t)into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x). 3. Rearranging
this equation gives us two separate equations: T′(t)
kT (t)=−λ=X′′ (x)
X(x). 4. Solve the equation
X′′ (x)
X(x)=−λfor X(x)to find the spatial part of the solution. 5. The general solution for
X(x)is X(x) = c1cos(√λx)+c2sin(√λx). 6. Apply the boundary conditions u(0, t) = 0
and u(1, t) = 0 to find the eigenvalues λn=(nπ
1)2and corresponding eigenfunctions Xn(x) =
sin(nπx). 7. Solve the time part of the equation to find T(t). 8. For the given initial condition
u(x, 0) = x(1 −x), use the Fourier series to find the coefficients cn. 9. Finally, combine the
spatial and time parts of the solution to find the complete solution u(x, t).
19. Question: Consider the following partial differential equation:
ut−4uxx = 0
subject to boundary conditions u(0, t) = 0 and u(1, t) = 0, and the initial condition u(x, 0) =
x(1 −x).
Find the solution u(x, t)of the partial differential equation.
Ans. Solution: 1. To solve the given partial differential equation, we will use the method of
separation of variables. We assume that the solution can be written as a product of functions of
xand t, i.e., u(x, t) = X(x)T(t). Substituting this into the PDE yields:
XT ′−4X′′T= 0
Dividing by XT gives:
T′
4T=X′′
X=−λ
2. Solving the first ODE T′
4T=−λgives the time component solution:
T(t) = c1e−4λt
where c1is an arbitrary constant.
3. Now, solving the second ODE X′′
X=−λgives the spatial component solution:
For λ > 0:
X(x) = c2cos(√λx)+c3sin(√λx)
For λ= 0:
X(x) = c2+c3x
For λ < 0:
X(x) = c2cosh(√|λ|x)+c3sinh(√|λ|x)
where c2and c3are arbitrary constants.
4. Applying the boundary conditions: Given u(0, t) = 0, we have X(0)T(t) = 0 which implies
X(0) = 0. Thus, we obtain:
For λ > 0:
X(0) = c2= 0 =⇒X(x) = c3sin(√λx)
For λ= 0:
X(0) = c2= 0 =⇒X(x) = c3x
For λ < 0:
X(0) = c2= 0 =⇒X(x) = c3sinh(√|λ|x)
Given u(1, t) = 0, we have X(1)T(t) = 0 which implies X(1) = 0. Thus, we obtain:
For λ > 0:
X(1) = c3sin(√λ)= 0 =⇒√λ=nπ
For λ= 0:
X(1) = c3= 0
For λ < 0:
X(1) = c3sinh(√|λ|)= 0 =⇒√|λ|=nπi
5. The eigenvalues are found to be λn=−n2π2, where nis a positive integer.
The general solution is given by:
u(x, t) = ∞
∑
n=1
(cn1sin(nπx) + cn2cos(nπx))e−4n2π2t
6. Finally, applying the initial condition u(x, 0) = x(1 −x)to the solution, we can determine
the coefficients cn1and cn2through a Fourier sine series expansion of x(1 −x).
20. Find the solution u(x, t)to the partial differential equation:
∂2u
∂t2=c2∂2u
∂x2,
subject to the initial conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0, where cis a constant.
Ans. The solution to the given partial differential equation can be found using the method of
separation of variables.
1. Assume a solution u(x, t) = X(x)T(t).
Substitute u(x, t) = X(x)T(t)into the partial differential equation:
T′′(t)X(x) = c2X′′(x)T(t).
Divide both sides by c2u(x, t) = c2X(x)T(t)to separate variables:
1
c2
T′′(t)
T(t)=X′′(x)
X(x).
This results in two ordinary differential equations:
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ,
where −λis a separation constant.
2. Solve the temporal ODE:
T′′(t) + c2λT (t) = 0.
The solution to this ODE is T(t) = Acos(ct√λ)+Bsin(ct√λ).
3. Solve the spatial ODE:
X′′(x) + λX(x) = 0.
The solutions to this ODE depend on the sign of λ:
For λ < 0, the general solution is X(x) = Acosh(√−λx)+Bsinh(√−λx).
For λ= 0, the general solution is X(x) = Ax +B.
For λ > 0, the general solution is X(x) = Acos(√λx)+Bsin(√λx).
4. Apply the initial condition u(x, 0) = x(1 −x).
Given that ∂u
∂t (x, 0) = 0, the solution T(t)must be T(t) = Bsin(ct√λ).
Substitute T(t) = Bsin(ct√λ)and the solutions for X(x)into u(x, t) = X(x)T(t).
u(x, t) = ∞
∑
n=1
(Ancos(nπx) + Bnsin(nπx))(Bnsin(cnπt)),
where λ= (nπ)2.
5. Use the Fourier series of the initial condition u(x, 0) = x(1 −x):
x(1 −x) = ∞
∑
n=1
Bnsin(nπx).
Comparing coefficients of x(1 −x)and Bnsin(nπx)gives:
Bn={0if nis even
4
nπ if nis odd .
Therefore, the solution to the given partial differential equation is:
u(x, t) = ∞
∑
n=1,3,5,...
4
nπ sin(nπx)sin(cnπt).
21. Find the general solution to the Heat Equation ut=kuxx subject to the boundary conditions
u(0, t) = u(l, t) = 0, with initial condition u(x, 0) = f(x).
Ans. The general solution to the Heat Equation with the given boundary and initial conditions
is u(x, t) = ∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t, where Bn=2
l∫l
0f(x)sin (nπx
l)dx is the Fourier sine
coefficient of f(x).
Solution: 1. We start by solving the Heat Equation using separation of variables. Let
u(x, t) = X(x)T(t). Then, the equation becomes T′(t)
kT (t)=X′′ (x)
X(x)=−λ, where λis a constant.
2. Solving the time equation T′(t)
kT (t)=−λgives us T(t) = c1e−kλt.
3. Solving the spatial equation X′′(x)+λX(x) = 0 with boundary conditions X(0) = X(l) =
0yields X(x) = Bsin (nπx
l), where λ=(nπ
l)2for n= 1,2,3, . . ..
4. Combining the spatial and time solutions, we have u(x, t) = ∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t.
5. To determine the coefficients Bn, we use the initial condition: u(x, 0) = f(x). Thus,
f(x) = ∑∞
n=1 Bnsin (nπx
l).
6. Multiplying both sides by sin (mπx
l)and integrating from 0 to l, we get ∫l
0f(x)sin (mπx
l)dx =
∫l
0∑∞
n=1 Bnsin (nπx
l)sin (mπx
l)dx.
7. By orthogonality of sine functions, the right side simplifies to Bml
2. Therefore, Bm=
2
l∫l
0f(x)sin (mπx
l)dx.
8. Substituting Bnback into the general solution, we obtain the required solution u(x, t) =
∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t, where Bn=2
l∫l
0f(x)sin (nπx
l)dx.
22. Question: Consider the heat equation on a one-dimensional rod defined by:
∂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) = f(x) = 2 sin(πx) + sin(2πx),0< x < L
Find the solution to the heat equation with the given boundary and initial conditions.
Ans. Step-by-step solution:
1. To solve the heat equation, we first need to find the eigenfunctions and eigenvalues of the
equation. We assume a solution of the form u(x, t) = X(x)T(t).
2. Plugging this solution form into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x)=−λ, where λis
a constant.
3. Solving the eigenvalue equation for X(x)yields the solutions Xn(x) = sin (nπx
L)for
n= 1,2,3, ....
4. The corresponding eigenvalues are λn=(nπ
L)2.
5. Now, solving the time part of the equation gives T′(t) = −kλT (t)with the solution
Tn(t) = Ane−kλnt.
6. Putting it all together, the general solution to the heat equation is given by u(x, t) =
∑∞
n=1 Bnsin (nπx
L)e−k(nπ
L)2t.
7. Next, we need to determine the coefficients Bnby using the initial condition u(x, 0) = f(x).
8. Applying the initial condition, we have f(x) = ∑∞
n=1 Bnsin (nπx
L).
9. Using the orthogonality of sine functions, we can determine Bnby multiplying both sides
by sin (mπx
L)and integrating from 0 to L.
10. The solution to the heat equation with the given boundary and initial conditions is then
u(x, t) = ∑∞
n=1 (2∫L
0f(x)sin(nπx
L)dx
∫L
0[sin(nπx
L)]2dx )sin (nπx
L)e−k(nπ
L)2t.
23. Question:
Consider the following Heat Equation in one dimension:
∂u
∂t = 5∂2u
∂x2
subject to the initial condition
u(x, 0) = 3x2+ 4
and boundary conditions
u(0, t) = 4 + et
u(1, t) = 8
Find the solution to this Heat Equation using the method of separation of variables.
Ans. Solution:
1. Apply separation of variables:
Let u(x, t) = X(x)T(t), then the Heat Equation becomes
XT ′= 5X′′T
Dividing by uXT , we get
T′
5T=X′′
X=−λ
Thus, this separates into two ordinary differential equations:
T′+ 5λT = 0
X′′ +λX = 0
2. Solve the temporal part:
The solution to the temporal ODE is
T(t) = ce−5λt
3. Solve the spatial part:
The spatial ODE becomes
X′′ +λX = 0
which has solutions
X(x) = Acos(√λx)+Bsin(√λx)
4. Apply the boundary conditions:
Applying the boundary condition u(0, t) = 4 + etyields
X(0)T(t) = 4 + et
A= 4 + et
Applying the boundary condition u(1, t) = 8 yields
X(1)T(t) = 8
Acos(√λ)+Bsin(√λ)= 8
5. Solve for λand complete the solution:
The eigenvalues λnare the solutions to
cos(√λn)= 0
which gives λn=(nπ
2)2for integer n.
Therefore, the solution is
u(x, t) = ∞
∑
n=1
(4 + et)cos (nπ
2x)e−5(nπ
2)2t
24. Find a particular solution to the Heat Equation
∂u
∂t = 2∂2u
∂x2
subject to the initial condition
u(x, 0) = sin(πx)
Ans. We can solve this problem using separation of variables. Let’s assume the solution has
the form u(x, t) = X(x)T(t). Substituting this into the heat equation and separating variables,
we get:
1. Substitute u(x, t) = X(x)T(t)into the heat equation:
T′(t)X(x) = 2T(t)X′′(x)
2. Divide both sides by 2XT :
T′
2T=X′′
X=−λ
3. Solve the ODE for X(x):
X′′(x) + λX(x) = 0
The general solution to this ODE is
X(x) = c1cos(√λx)+c2sin(√λx)
4. Solve the separated ODE for T(t):
T′
2T=−λ=⇒T′+ 2λT = 0
The general solution to this ODE is
T(t) = de−2λt
5. Applying the initial condition u(x, 0) = sin(πx):
u(x, 0) = X(x)T(0) = X(x) = sin(πx)
This gives us √λ=π, so the spatial part solution is
X(x) = sin(πx)
6. Putting it all together, the particular solution is:
u(x, t) = sin(πx)e−2π2t
25. Question 25:
Consider the one-dimensional wave equation given by ∂2u
∂t2=c2∂2u
∂x2, where cis a constant
velocity. Given the initial conditions:
u(x, 0) = sin(x)and ∂u
∂t (x, 0) = 0
Solve the wave equation subject to these initial conditions.
Ans. Solution: We can start by recognizing that the general solution to the one-dimensional
wave equation is given by u(x, t) = F(x−ct)+G(x+ct), where Fand Gare arbitrary functions.
1. Find F(x):
Applying the initial condition u(x, 0) = sin(x), we have:
F(x) + G(x) = sin(x)
2. Find G(x):
Since ∂u
∂t (x, 0) = 0, we know that ∂
∂t [F(x) + G(x)] = 0:
∂F (x)
∂t −∂G(x)
∂t = 0
Differentiating the general solution with respect to tgives:
∂u
∂t =−c[F′(x−ct) + G′(x+ct)]
And evaluating at t= 0:
F′(x)−G′(x) = 0
Integrating this equation, we get:
F(x)−G(x) = C1
3. Solve for F(x)and G(x):
Adding the equations for F(x)and G(x), we have:
2F(x) = sin(x) + C1
F(x) = sin(x) + C1
2
Substitute this back into F(x)−G(x) = C1to solve for G(x):
sin(x) + C1
2−G(x) = C1
G(x) = −sin(x)
2
Therefore, the solution to the wave equation subject to the initial conditions is:
u(x, t) = sin(x−ct)−sin(x+ct)
2
26. Question:
Consider the wave equation in one dimension given by ∂2u
∂t2=c2∂2u
∂x2, subject to the initial
conditions u(x, 0) = sin(πx
L)and ∂u
∂t (x, 0) = 0, where 0≤x≤Land t > 0. Find the solution
u(x, t)to the wave equation.
Ans. Solution: Let’s first solve the wave equation with the given initial conditions.
1. We can use the method of separation of variables to solve the wave equation. Assume a
solution of the form u(x, t) = X(x)T(t). Substituting this into the wave equation gives:
T′′(t)X(x) = c2X′′(x)T(t)
Dividing by c2XT gives:
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ
Since the left side is a function of tonly and the right side is a function of xonly, they must
be equal to a constant −λ. This gives us two ordinary differential equations to solve.
2. Solving the equation for T(t)gives T′′(t) + c2λT (t)=0, with general solution T(t) =
C1cos(√c2λt)+C2sin(√c2λt).
3. Solving the equation for X(x)gives X′′(x) + λX(x) = 0, with general solution X(x) =
Acos(√λx)+Bsin(√λx).
4. Applying the initial condition u(x, 0) = sin(πx
L)gives:
u(x, 0) = X(x)T(0) = X(x) = Bsin (πx
L)
Comparing this with the general solution for X(x), we have √λ=π
L. Therefore, λ=(π
L)2
and X(x) = Bsin (πx
L).
5. Applying the other initial condition ∂u
∂t (x, 0) = 0 gives:
∂u
∂t (x, 0) = X(x)T′(0) = C2√c2π2
L2cos (πx
L)= 0
Since the cosine term cannot be zero for all x, we must have C2= 0.
6. Therefore, the solution to the wave equation subject to the given initial conditions is:
u(x, t) = Bsin (πx
L)cos (πct
L)
27. Question 27:
Consider the following partial differential equation:
utt −c2uxx = 0
Subject to the boundary conditions:
u(0, t) = 0
u(1, t) = 0
and the initial conditions:
u(x, 0) = 0
ut(x, 0) = x(1 −x)
Find the solution u(x, t)for 0≤x≤1and t > 0.
Ans. Step-by-step solution:
1. Find the separation of variables solution: Let u(x, t) = X(x)T(t). Substitute this
into the given PDE:
XT ′′ −c2X′′T= 0
Divide by c2XT :
T′′
c2T=X′′
X
Let this equal some constant −λ.
This gives two ordinary differential equations:
For X(x):
X′′ +λX = 0
Subject to the boundary conditions X(0) = 0 and X(1) = 0, the solution for X(x)is:
X(x) = Bsin(nπx)
For T(t)with λ= (nπ
L)2, where Lis the length of the interval:
T′′ +(cnπ
L)2
T= 0
T(t) = Ancos (cnπ
Lt)+Bnsin (cnπ
Lt)
2. Using the initial conditions to find T(t):From the initial condition u(x, 0) = 0, we
get:
X(x)T(0) = 0
Bnsin(nπx) = ∞
∑
n=1
Bnsin(nπx) = 0
For this to be true for all x,Bn= 0 for all n.
Therefore, the solution for T(t)becomes:
T(t) = Ancos (cnπ
Lt)
3. Using the initial condition for ut(x, 0):Differentiation of u(x, 0) with respect to t
gives:
ut(x, 0) = X(x)T′(0) = x(1 −x)
X(x)An(−cnπ
L)sin(nπx) = x(1 −x)
To satisfy this equation, the sum must converge to x(1 −x), suggesting:
An=2∫1
0x(1 −x)sin(nπx)dx
cnπ ∫1
0sin2(nπx)dx
Calculating the integrals, we find the full solution:
u(x, t) = ∞
∑
n=1
2
nπ
1−(−1)n
1−cos(nπ)cos (nπct
L)sin(nπx)
28. Question:
Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where kis a positive con-
stant.
Given initial conditions u(x, 0) = 2x(1 −x)and boundary conditions u(0, t) = u(1, t)=0,
find the solution u(x, t)to the heat equation.
Ans. Solution:
We will solve the heat equation using the method of separation of variables.
1. Assume a solution of the form u(x, t) = X(x)T(t).
Substitute this into the heat equation to get:
T′(t)
kT (t)=X′′ (x)
X(x).
This equation can be separated into two ordinary differential equations:
T′(t)
kT (t)=−λ2=X′′ (x)
X(x).
2. Solve the time equation:
T′(t)
kT (t)=−λ2
This gives T(t) = Ae−kλ2t, where Ais a constant.
3. Solve the spatial equation:
X′′(x) + λ2X(x) = 0
The general solution to this ODE is X(x) = Bsin(λx) + Ccos(λx), where Band Care
constants.
4. Apply the boundary conditions:
u(0, t) = 0 = X(0)T(t) = CT (t)
This implies C= 0.
u(1, t) = 0 = X(1)T(t) = Bsin(λ)T(t)
To satisfy the boundary condition, we need Bsin(λ)=0which gives λ=nπ for n=
1,2,3, . . ..
5. Construct the solution:
As λ=nπ, we get Xn(x) = Bnsin(nπx)and Tn(t) = Ane−k(nπ)2tas the separated solutions.
The general solution is given by:
u(x, t) = ∑∞
n=1 Xn(x)Tn(t) = ∑∞
n=1 AnBnsin(nπx)e−k(nπ)2t.
6. Apply the initial condition:
u(x, 0) = ∑∞
n=1 AnBnsin(nπx) = 2x(1 −x).
This gives AnBn= 4 ∫1
0x(1 −x)sin(nπx)dx.
Solving the integral gives AnBn=8
n3π3((−1)n−1).
Hence, the solution to the heat equation with the given initial and boundary conditions is:
u(x, t) = ∑∞
n=1
8
n3π3((−1)n−1) sin(nπx)e−k(nπ)2t.
29. Question 29:
Consider the one-dimensional heat equation defined on the interval 0≤x≤Lwith the
boundary conditions u(0, t) = 0 and u(L, t) = 0, and the initial condition u(x, 0) = f(x), where
f(x)is a given function.
Given the heat equation ∂u
∂t =k∂2u
∂x2with k > 0representing the thermal diffusivity, find the
solution u(x, t)satisfying the given conditions.
Ans. Solution:
We start by using the method of separation of variables to solve the heat equation.
1. Separation of Variables:
Assume the solution can be written as a product of two functions, u(x, t) = X(x)T(t).
Substitute u(x, t) = X(x)T(t)into the heat equation:
T′(t)
kT (t)=X′′ (x)
X(x)=−λ2(constant −λ2)
This results in two ordinary differential equations:
T′(t) + kλ2T(t) = 0 (1)
X′′(x) + λ2X(x) = 0 (2)
2. Solve the Time Function:
Solve the time function equation (1):
T(t) = Ae−kλ2t
3. Solve the Spatial Function:
Solve the spatial function equation (2):
The general solution to the spatial function is of the form:
X(x) = Csin(λx) + Dcos(λx)
Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0:
i) From u(0, t) = 0:
X(0)T(t) = 0 =⇒D= 0
ii) From u(L, t) = 0:
X(L)T(t) = 0 =⇒Csin(λL) = 0
This gives the condition λ=nπ
Lfor n∈N.
4. General Solution:
The general solution to the heat equation is the sum of all possible solutions:
u(x, t) = ∑∞
n=1 (cnsin (nπx
L)e−k(nπ
L)2t)
where cnare constants determined by the initial condition.
Therefore, the solution to the heat equation with the given boundary and initial conditions is:
u(x, t) = ∑∞
n=1 (cnsin (nπx
L)e−k(nπ
L)2t)
30. Consider the following heat equation with initial conditions:
∂u
∂t =k∂2u
∂x2,0< x < 1, t > 0
where u(0, t) = 0,u(1, t) = 0 for t > 0, and u(x, 0) = sin(3πx).
Find the solution u(x, t)for this initial-boundary value problem.
Ans. Solution: 1. We begin by separation of variables. Assume u(x, t) = X(x)T(t).
2. Plugging u(x, t) = X(x)T(t)into the heat equation, we get:
X(x)dT (t)
dt =kX′′(x)T(t)
Dividing by kXT gives:
1
kT
dT
dt =X′′
X=−λ2
where λis a separation constant.
3. We now solve the temporal equation:
1
kT
dT
dt =−λ2=⇒T(t) = Ae−kλ2t
4. Next, we solve the spatial equation:
X′′(x) = −λ2X(x)
which yields the solutions X(x) = Bsin(nπx)for λ=nπ where n= 1,2,3, . . .
5. Since u(0, t) = 0, we have X(0)T(t) = 0 =⇒X(0) = 0. Thus, Bsin(0) = 0 =⇒B= 0
as the solution must be nonzero.
6. Similarly, for u(1, t) = 0, we get X(1)T(t) = 0 =⇒X(1) = 0, leading to nπ = 1,2,3, . . .
7. The general solution is given by:
u(x, t) = ∞
∑
n=1
cne−(nπ)2kt sin(nπx)
8. Applying the initial condition u(x, 0) = sin(3πx), we find:
sin(3πx) = ∞
∑
n=1
cnsin(nπx)
9. Multiplying both sides by sin(mπx)and integrating from 0to 1, we obtain:
cm= 2 ∫1
0
sin(3πx)sin(mπx)dx
10. Evaluating the integral, we find c3= 1 and cm= 0 for m= 3.
11. Therefore, the solution to the initial-boundary value problem is:
u(x, t) = e−9π2kt sin(3πx)
2. Question: Consider the following Heat Equation defined on the interval 0<x<πand
t > 0:∂u
∂t =∂2u
∂x2−u, u(x, 0) = sin(x), u(0, t) = u(π, t) = 0.
Find the solution u(x, t).
Ans. Solution: 1. Let’s begin by assuming a separable solution u(x, t) = X(x)T(t). Substitute
this solution into the Heat Equation:
X(x)T′(t) = X′′(x)T(t)−X(x)T(t)
Divide by the product u(x, t) = X(x)T(t)to obtain:
T′(t)
T(t)=X′′(x)
X(x)−1
2. This yields two separate Ordinary Differential Equations: For the time part T′(t)/T(t) =
−1/λ, where λis a constant. Solving this gives T(t) = Ce−t, where Cis a constant.
3. For the spatial part X′′(x)/X(x) = −1 + λ, introduce the separation constant −λ: This
gives the boundary value problem:
X′′(x)+(λ−1)X(x) = 0, X(0) = X(π) = 0.
4. The general solution will be a linear combination of the two cases for λ: i) For λ= 0:
X(x) = Ax +Bii) For λ=n2, n ∈Z+:X(x) = Csin(nx) + Dcos(nx)
5. Applying the boundary conditions X(0) = 0 and X(π) = 0: i) For λ= 0:X(x) = Bx,
B= 0 =⇒X(x) = 0 ii) For λ=n2:X(x) = Csin(nx),X(π) = 0 =⇒Csin(nπ) =
0=⇒C= 0
6. Thus, the only possibility is λ= 0, which corresponds to the trial solution X(x) = Bx.
Therefore, X(x)=0is not a solution. This leads to a contradiction, so the assumption of
separable variables doesn’t hold. We need to consider a different approach to solve the Heat
Equation.
3. Question: Consider the heat equation in one dimension given by ∂u
∂t =k∂2u
∂x2, subject to
the boundary conditions u(0, t) = 0 and u(1, t) = 0, and the initial condition u(x, 0) = 2xfor
0< x < 1. Find the solution u(x, t)for t > 0.
Ans. Solution: 1. We begin by assuming a separation of variables solution of the form
u(x, t) = X(x)T(t). Substituting this into the heat equation yields T′
kT =X′′
X=−λwhere λis
a separation constant.
2. We then have two ODEs to solve: For the time component: T′+kλT = 0 with the
general solution T(t) = cexp(−kλt). For the spatial component: X′′ +λX = 0 with the
solution X(x) = Asin(√λx)+Bcos(√λx).
3. Applying the boundary condition u(0, t) = 0 gives X(0)T(t) = 0, which implies X(0) = 0
and B= 0.
4. Applying the boundary condition u(1, t) = 0 gives X(1)T(t) = 0, which implies X(1) = 0
and sin(√λ)= 0. This leads to the eigenvalues λn=n2π2for n= 1,2, ....
5. Therefore, the spatial component becomes Xn(x) = Ansin(nπx), and the general solution
is then u(x, t) = ∞
∑
n=1
cne−k(nπ)2tsin(nπx).
6. Finally, applying the initial condition u(x, 0) = 2xgives u(x, 0) = ∞
∑
n=1
cnsin(nπx)=2x.
By comparing coefficients, we find cn=2
π∫1
02xsin(nπx)dx.
7. Solving the integral yields cn=4
n2π((−1)n−1) sin(nπx).
8. Therefore, the solution to the heat equation with the given boundary and initial conditions
is u(x, t) = ∞
∑
n=1
4((−1)n−1)
n2sin(nπx)e−k(nπ)2t.
4. Consider the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions u(0, t)=0and u(π, t)=0, with initial condition u(x, 0) =
sin x.
Find the solution u(x, t)to the heat equation.
Ans. Solution: 1. We start by assuming a separation of variables solution of the form
u(x, t) = X(x)T(t).
2. Plugging this into the heat equation, we get T′
kT =X′′
X=−λ, where λis an arbitrary
constant that we will determine later.
3. Solving the ordinary differential equation for X(x), we have X′′ +λX = 0. The general
solution to this equation is X(x) = Acos(√λx)+Bsin(√λx).
4. Using the boundary conditions u(0, t)=0and u(π, t)=0, we get X(0) = A= 0 and
X(π) = Bsin(√λπ)= 0. This implies that √λ=nfor n∈Z.
5. So, the eigenfunctions are Xn(x) = Bnsin(nx)for n= 1,2,3, ....
6. Next, we solve for T(t)by substituting λ=n2back into T′
kT =−n2. This gives Tn(t) =
Cne−kn2t.
7. Therefore, the general solution to the heat equation is
u(x, t) = ∞
∑
n=1
Dnsin(nx)e−kn2t
8. Finally, we use the initial condition u(x, 0) = sin xto find the coefficients Dn. By the
orthogonality of sines, we get Dn= 2 ∫π
0sin(x)sin(nx)dx.
9. Computing the integral, we get Dn=2
π
(−1)n+1
n2−1for nodd, and Dn= 0 for neven.
10. Therefore, the solution to the heat equation satisfying the given conditions is
u(x, t) = 4
π
∞
∑
n=1
sin((2n−1)x)e−(2n−1)2kt
2n−1
5. Question: Consider the following Heat Equation on the interval 0< x < π with periodic
boundary conditions:
∂u
∂t =k∂2u
∂x2, u(0, t) = u(π, t),∂u
∂x(0, t) = ∂u
∂x(π, t)
If the initial condition is given by u(x, 0) = x(π−x)for 0< x < π, find the solution u(x, t).
Ans. Solution: 1. We start by assuming a separation of variables solution of the form:
u(x, t) = X(x)T(t)
2. Substituting this into the Heat Equation, we get:
X(x)T′(x) = kX′′(x)T(t)
Dividing by kX(x)T(t), we get:
T′(t)
kT (t)=X′′(x)
X(x)=−λ
3. Solving the ODE X′′ (x)
X(x)=−λgives us the eigenvalue problem:
X′′(x) + λX(x) = 0
With the boundary conditions X(0) = X(π)and X′(0) = X′(π). Solving this gives us the
eigenfunctions:
Xn(x) = cos (nx
π), λn=n2
4. This leads to the general solution:
u(x, t) = ∞
∑
n=1
cncos (nx
π)e−kn2t
5. To find the coefficients cn, we use the initial condition:
u(x, 0) = ∞
∑
n=1
cncos (nx
π)=x(π−x)
6. Taking the inner product of both sides with cos (mx
π)and integrating over [0, π]gives us:
cm=2
π∫π
0
x(π−x)cos (mx
π)dx
7. Evaluating the integral, we find that:
cm=4sin (mπ
2)
m3π3
8. Therefore, the solution to the Heat Equation with the given initial condition is:
u(x, t) = ∞
∑
n=1
4sin (nπ
2)
n3π3cos (nx
π)e−kn2t
6. Question:
Consider the one-dimensional heat equation defined as
∂u
∂t =k∂2u
∂x2
subject to the boundary conditions:
u(0, t) = 0
u(π, t) = 0
and the initial condition:
u(x, 0) = f(x) = {0if 0≤x < π
2
2if π
2≤x≤π
Find the solution to the heat equation at time t > 0.
Ans. Step-by-step solution: 1. We start by expressing the solution to the heat equation as a
Fourier sine series. Let’s denote the solution as u(x, t) = ∑∞
n=1 Bn(t)sin(nx).
2. Applying the initial condition u(x, 0) = f(x), we have:
f(x) = ∞
∑
n=1
Bn(0) sin(nx) = {0if 0≤x < π
2
2if π
2≤x≤π
Since f(x)is piecewise, we can express it in a more general form to determine the coefficients
Bn(0). We find:
Bn(0) = 2
π∫π
0
f(x)sin(nx)dx
3. Computing the integral for Bn(0), we have:
Bn(0) = 2
π(∫π
2
0
0·sin(nx)dx +∫π
π
2
2sin(nx)dx)
Bn(0) = 4
nπ (cos (nπ
2)−cos (nπ))
4. Since cos (nπ
2)= 0 when nis odd and 1 when nis even, we find that Bn(0) simplifies to:
Bn(0) = {0if nis odd
4
nπ if nis even
5. Having determined the coefficients Bn(0), we can now find the solutions Bn(t)by solving
the ordinary differential equation:
dBn
dt =−kn2Bn
The solution to this ODE is Bn(t) = Bn(0)e−kn2t.
6. Substituting Bn(0) into the expression for Bn(t), we find:
Bn(t) = {0if nis odd
4
nπ e−kn2tif nis even
7. Finally, the solution to the heat equation at time tis given by:
u(x, t) = ∞
∑
n=1
4
nπ e−kn2tsin(nx)
7. Find the solution to the heat equation initial value problem
ut= 4uxx,0< x < 1, t > 0,
subject to the initial conditions
u(x, 0) = 2x,
and the boundary conditions
u(0, t) = 0, u(1, t) = 2.
Ans. Step 1. We will first seek a solution in the form of a separated variable. Let u(x, t) =
X(x)T(t). Then the heat equation becomes
XT ′= 4X′′T.
Dividing by XT gives
T′
4T=X′′
X=−λ,
where λis the separation constant.
Step 2. We solve for the spatial equation X′′ +λX = 0. The solutions are of the form
X(x) = c1cos(√λx)+c2sin(√λx). Applying the boundary conditions, we find that √λ=nπ
for n= 1,2,3, ....
Step 3. We consider the temporal equation T′=−4λT . This has the solution T(t) =
Ae−4n2π2tfor n= 1,2,3, ....
Step 4. Now we form the general solution as a sum of these separated solutions. Since the
PDE is linear, the general solution is
u(x, t) = ∞
∑
n=1
(c1ncos(nπx) + c2nsin(nπx))e−4n2π2t.
Step 5. Finally, we solve for the coefficients c1nand c2nusing the initial condition u(x, 0) =
2x. Plugging this into the general solution, we find
2x=∞
∑
n=1
c1ncos(nπx).
Taking the inner product of both sides with cos(mπx)and integrating from 0 to 1, we obtain
c1n= 4 ∫1
0
2xcos(nπx)dx ={0, n = 1
4/(π2), n = 1.
Step 6. Therefore, the solution to the heat equation initial value problem is
u(x, t) = 4
π2cos(πx)e−4π2t.
8. Find the general solution to the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition
u(x, 0) = sin(2x)
and boundary conditions
u(0, t) = 0, u(π, t) = 0
where 0< x < π and t > 0.
Ans. Let’s assume the general solution has the form u(x, t) = X(x)T(t). We substitute this
into the heat equation to obtain two ordinary differential equations:
1. For X(x):
X′′ +λX = 0, X(0) = X(π) = 0
2. For T(t):
T′+kλT = 0
Let’s solve the spatial equation first:
1. Solving for X(x):
The general solution to the spatial equation is X(x) = Asin(√λx), where λ > 0for
non-trivial solutions. The boundary conditions then give us:
X(0) = Asin(0) = 0 ⇒A= 0 or nπ
X(π) = Asin(√λπ)= 0 ⇒√λ=n
So, the eigenfunctions are Xn(x) = sin(nx)for n= 1,2,3, . . . and the corresponding eigen-
values are λn=n2.
2. Solving for T(t):
The time equation simplifies to T′+kn2T= 0, which has solution Tn(t) = cne−kn2t.
The general solution to the differential equation is a sum of the separated solutions:
u(x, t) = ∞
∑
n=1
cne−kn2tsin(nx)
Finally, we use the initial condition to find the coefficients:
u(x, 0) = ∞
∑
n=1
cnsin(nx) = sin(2x)
By comparing the Fourier sine series of both sides, we find that:
c2= 1, cn= 0 for n= 2
Therefore, the general solution to the heat equation subject to the given initial and boundary
conditions is:
u(x, t) = e−4kt sin(2x)
9. Find the solution to the following partial differential equation:
utt = 4uxx
subject to the boundary conditions:
u(0, t) = 0, u(L, t) = 0
and the initial conditions:
u(x, 0) = sin (πx
L), ut(x, 0) = 0
where 0≤x≤Land t > 0.
Ans.
Solution:
1. The general solution to the wave equation utt = 4uxx can be expressed as:
u(x, t) = F(x+ 2t) + G(x−2t)
where Fand Gare arbitrary functions to be determined.
2. Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0, we find:
F(2t) + G(−2t) = 0 and F(L+ 2t) + G(L−2t) = 0
3. Since u(x, 0) = sin (πx
L)and ut(x, 0) = 0, we have:
F(x) + G(x) = sin (πx
L)and 2F′(x)−2G′(x) = 0
4. Solving the system of equations from steps 2 and 3, we find:
F(x) = 1
2sin (πx
L)and G(x) = −1
2sin (πx
L)
5. Therefore, the solution to the partial differential equation utt = 4uxx subject to the given
boundary and initial conditions is:
u(x, t) = 1
2sin (π(x+ 2t)
L)−1
2sin (π(x−2t)
L)
10. Question: Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where t > 0,
0< x < L, and k > 0. Suppose the initial conditions are given by u(x, 0) = sin(πx)and the
boundary conditions are u(0, t) = u(L, t) = 0. Find the solution to this heat equation.
Ans. Solution: 1. First, we assume that the solution to the heat equation can be written as a
product of functions of xand t, so we write u(x, t) = X(x)T(t).
2. Substituting u(x, t) = X(x)T(t)into the heat equation, we get 1
k
T′(t)
T(t)=X′′ (x)
X(x).
3. This equation can be separated into two ordinary differential equations: 1
k
T′(t)
T(t)=−λand
X′′(x) + λX(x) = 0, where λis a separation constant.
4. Solving the ODE for X(x)with the given boundary conditions u(0, t) = u(L, t) = 0, we
get X(x) = sin (nπx
L), where nis a positive integer.
5. For the ODE involving T(t), we have T′(t)
kT (t)=−λ. Solving this gives T(t) = e−kλt.
6. Combining the solutions for X(x)and T(t), we get the general solution to the heat
equation as u(x, t) = ∑∞
n=1 cnsin (nπx
L)e−k(nπ/L)2t, where cnare constants to be determined.
7. Using the initial condition u(x, 0) = sin(πx), we find that c1= 1 and cn= 0 for n > 1.
8. Therefore, the solution to the heat equation with the given initial and boundary conditions
is u(x, t) = sin(πx)e−kπ2t/L2.
11. Find the solution to the heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition u(x, 0) = x(1 −x)and the boundary conditions u(0, t) = 0
and u(1, t) = 0.
Ans. The solution to the heat equation can be found using separation of variables.
1. We assume the solution has the form u(x, t) = X(x)T(t).
2. Plugging this into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x).
3. Rearranging, we have T′(t)
kT (t)=−λ=X′′ (x)
X(x).
4. This gives us two ordinary differential equations: T′(t)+kλT (t) = 0 and X′′(x)+λX(x) =
0.
5. The boundary conditions lead to the eigenvalues λ=n2π2for n= 1,2,3, ... and the
corresponding eigenfunctions Xn(x) = √2sin(nπx).
6. The time function solution is Tn(t) = e−kn2π2t.
7. Therefore, the general solution to the heat equation is u(x, t) = ∑∞
n=1 Bnsin(nπx)e−kn2π2t.
8. Next, we find the coefficients Bnby using the initial condition u(x, 0) = x(1 −x).
9. Plugging t= 0 into u(x, t)and using the Fourier sine series formula leads to Bn=
4∫1
0x(1 −x)sin(nπx)dx.
10. Calculating this integral, we find Bn=8
n3π3((−1)n−1).
11. Finally, substituting Bnback into the general solution gives the solution to the heat equa-
tion.
12. Consider the following heat equation initial-boundary value problem:
ut=k·uxx,0< x < L, t > 0
u(0, t) = 0,
u(L, t) = 0,
u(x, 0) = f(x),
where u(x, t)is the temperature distribution, kis the thermal conductivity constant, Lis the
length of the rod, and f(x)is a given function.
Determine the solution u(x, t)for this initial-boundary value problem.
Ans. Solution: 1. We will use separation of variables to solve the heat equation. Let’s assume
that u(x, t) = X(x)T(t).
2. Plugging u(x, t) = X(x)T(t)into the heat equation, we get:
X(x)T′(t) = k·X′′(x)T(t)
3. Divide both sides by k·X(x)T(t)to separate variables:
T′(t)
k·T(t)=X′′(x)
X(x)=−λ
where λis a separation constant.
4. Solve the temporal part T′(t)
k·T(t)=−λto get T(t) = Ae−λkt, where Ais a constant.
5. Solve the spatial part X′′ (x)
X(x)=−λto get X(x) = Bsin (nπx
L)or X(x) = Bcos (nπx
L),
where Bis a constant.
6. The general solution to the heat equation is therefore:
u(x, t) = ∞
∑
n=1 (Cnsin (nπx
L))e−(nπ
L)2kt
where Cnare coefficients to be determined from the initial condition u(x, 0) = f(x).
7. Apply the initial condition u(x, 0) = f(x):
f(x) = ∞
∑
n=1
Cnsin (nπx
L)
8. Multiply both sides by sin (mπx
L)and integrate from 0to L:
∫L
0
f(x)sin (mπx
L)dx =∫L
0
∞
∑
n=1
Cnsin (nπx
L)sin (mπx
L)dx
9. Using the orthogonality property of sine functions, we find that Cn=2
L∫L
0f(x)sin (nπx
L)dx.
10. Therefore, the solution to the initial-boundary value problem is:
u(x, t) = ∞
∑
n=1 (2
L∫L
0
f(x)sin (nπx
L)dx)sin (nπx
L)e−(nπ
L)2kt
13. Let u(x, t)satisfy the one-dimensional heat equation
ut=kuxx,0< x < π, t > 0,
subject to the boundary condition u(0, t) = 0, ux(π, t) = 0 and the initial condition
u(x, 0) = x(π−x).
Determine u(x, t).
Ans. Solution: We will solve the given heat equation using separation of variables.
1. Separation of Variables: Let u(x, t) = X(x)T(t). Substituting this into the heat
equation yields
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).
Letting both sides equal a constant −λ, we have
T′(t)
kT (t)=−λ=X′′(x)
X(x).
This gives us two equations to solve:
T′(t) + kλT (t) = 0, X′′(x) + λX(x) = 0.
2. Solving the Time Equation: The time equation with the boundary condition yields
T′(t) + kλT (t) = 0, T (t) = ce−kλt.
3. Solving the Spatial Equation: The spatial equation is a simple eigenvalue problem
satisfying both boundary conditions. The general solution is
X(x) = c1cos(√λx)+c2sin(√λx).
Applying the boundary conditions gives
X(0) = 0 =⇒c1= 0,
X′(π) = 0 =⇒√λcos(√λπ)= 0.
This gives √λ=nπ where n= 1,2,3, . . .. Thus, the spatial eigenfunctions are
ϕn(x) = sin(nx), n = 1,2,3, . . .
4. General Solution: The general solution is a Fourier sine series:
u(x, t) = ∞
∑
n=1
Tn(t)ϕn(x) = ∞
∑
n=1
cne−kn2π2tsin(nx).
5. Determining Coefficients: To determine the coefficients, we need to use the initial
condition. The Fourier sine series of x(π−x)is
x(π−x) = ∞
∑
n=1
cnsin(nx)∫π
0
x(π−x)sin(nx)dx.
After evaluating the integral, we find cn=4
n3π(−1)n+1.
6. Final Solution: Putting everything together, the solution to the heat equation with the
given initial and boundary conditions is
u(x, t) = ∞
∑
n=1
4
n3π(−1)n+1e−kn2π2tsin(nx).
14. Find the solution to the following partial differential equation:
∂2u
∂t2=c2∂2u
∂x2
subject to the boundary conditions u(0, t) = 0,u(L, t) = 0, and the initial conditions u(x, 0) =
f(x)and ∂u
∂t (x, 0) = 0.
Ans. Solution: 1. Let’s first assume a separation of variables solution of the form:
u(x, t) = X(x)T(t)
2. Substitute the separated variables into the partial differential equation:
X(x)T′′(t) = c2X′′(x)T(t)
3. Divide through by c2X(x)T(t):
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ
4. Solve the two ordinary differential equations:
T′′(t) + c2λT (t) = 0
X′′(x) + λX(x) = 0
5. The solutions to T′′(t) + c2λT (t) = 0 are:
T(t) = Acos(ct√λ)+Bsin(ct√λ)
6. The solutions to X′′(x) + λX(x) = 0 are:
X(x) = Ccos(x√λ)+Dsin(x√λ)
7. Apply the boundary conditions u(0, t) = 0 and u(L, t) = 0 to get:
X(0)T(t) = 0 ⇒X(0) = 0
X(L)T(t) = 0 ⇒X(L) = 0
8. The eigenvalues λthat satisfy the boundary conditions are given by:
X(0) = 0 ⇒C= 0
X(L) = 0 ⇒Dsin(L√λ)= 0 ⇒λn=(nπ
L)2
9. Therefore, the general solution can be expressed as:
u(x, t) = ∞
∑
n=1
(cncos(nπct/L) + dnsin(nπct/L)) sin(nπx/L)
10. Apply the initial condition u(x, 0) = f(x)to determine the coefficients cnand dnusing
Fourier sine series.
f(x) = ∞
∑
n=1
cnsin(nπx/L)
cn=2
L∫L
0
f(x)sin(nπx/L)dx
11. Hence, the solution to the given partial differential equation subject to the boundary and
initial conditions is:
u(x, t) = ∞
∑
n=1 [( 2
nπ
∂f
∂x (L)−2L
nπ f(L))1−cos(nπct/L)
c2nπ/L]sin(nπx/L)
15. Question: Consider the following heat equation with mixed boundary conditions:
ut= 4uxx,0< x < 1, t > 0
u(0, t) = 0, t > 0
ux(1, t) = 0, t > 0
u(x, 0) = sin(πx),0≤x≤1
F indthesolution
u(x,t)tothegiveninitial −boundaryvalueproblem.
Ans. Solution: 1. We will first assume a separation of variables solution u(x, t) = X(x)T(t).
2. Substitute u(x, t) = X(x)T(t)into the heat equation to get:
T′(t)
4T(t)=X′′(x)
X(x)=−λ
where λis a separation constant. 3. Solve the ODE for X(x):
X′′(x) + λX(x) = 0
subject to the boundary conditions X(0) = 0 and X′(1) = 0. 4. The solutions to this ODE are
of the form:
Xn(x) = sin(nπx),where λ= (nπ)2
5. Next, solve the ODE for T(t):
T′(t)+4λT (t) = 0
which has the solution Tn(t) = cne−4(nπ)2t. 6. Using the principle of superposition, we can write
the general solution as:
u(x, t) = ∞
∑
n=1
cnsin(nπx)e−4(nπ)2t
7. Finally, use the initial condition u(x, 0) = sin(πx)to determine the coefficients cnby projecting
u(x, 0) onto the eigenfunctions {sin(nπx)}:
cn=∫1
0
sin(πx)sin(nπx)dx
16. Question:
Consider the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
subject to the initial condition
u(x, 0) = 3x2−2x
and the boundary conditions
u(0, t) = 0
u(1, t) = 1
Find the solution to the heat equation for 0≤x≤1and t > 0.
Ans. Solution:
Given the one-dimensional heat equation
∂u
∂t =k∂2u
∂x2
with initial condition u(x, 0) = 3x2−2xand boundary conditions u(0, t) = 0 and u(1, t) = 1,
we seek to find the solution for 0≤x≤1and t > 0.
1. Find the general solution:
Let u(x, t) = X(x)T(t). Plugging this into the heat equation, we have
X(x)T′(t) = kX′′(x)T(t)
T′(t)
kT (t)=X′′(x)
X(x)=−λ
This gives two ordinary differential equations:
T′(t) + kλT (t) = 0
X′′(x) + λX(x) = 0
with boundary conditions X(0) = 0 and X(1) = 1.
2. Solve the time part:
The solution to the time ODE is
T(t) = c1e−kλt
3. Solve the spatial part:
The solution to the spatial ODE is
X(x) = c2sin(√λx)+c3cos(√λx)
Applying the boundary conditions, we have
X(0) = c3= 0
X(1) = c2sin(√λ)= 1
This implies that c2=1
sin(√λ).
4. Find λ:
Since λ > 0for oscillatory solutions, we must have sin(√λ)= 0, so √λ=nπ where nis a
nonzero integer. This gives √λ=mπ, where m=±1,±2, . . .. Thus, we get λm=(mπ
2)2for
m=±1,±3, . . ..
5. Determine the solution:
The solution to the heat equation is
u(x, t) = ∑
m=1,3,...
cme−k(mπ
2)2t1
sin (mπ
2)sin (mπx
2)
Applying the initial condition, we find cm=2
π∫1
0(3x2−2x)sin (mπx
2)dx.
This gives the final solution to the heat equation for the given initial and boundary conditions.
17. Question 17: Consider the following heat equation on the interval 0< x < 1with boundary
conditions: ∂u
∂t =∂2u
∂x2, u(0, t) = u(1, t) = 0
Subject to the initial condition u(x, 0) = 2x(1 −x).
Find the solution u(x, t)for t > 0.
Ans. Solution:
We will solve the heat equation using the method of separation of variables.
1. Separation of Variables: Assume the solution can be expressed as a product of functions
of xand t:u(x, t) = X(x)T(t).
Substitute this expression into the heat equation:
X(x)T′(t) = X′′(x)T(t)
Divide both sides by u(x, t):
T′(t)
T(t)=X′′(x)
X(x)=−λ
where λis the separation constant.
We now have two ODEs to solve:
T′(t) + λT (t) = 0
X′′(x) + λX(x) = 0
2. Solving the ODE for T(t):The ODE for T(t)has the solution:
T(t) = c1e−λt
3. Solving the ODE for X(x):The ODE for X(x)has the general solution:
X(x) = c2cos(√λx)+c3sin(√λx)
Applying the boundary conditions u(0, t) = u(1, t) = 0:
X(0) = c2= 0
X(1) = c3sin(√λ)= 0
For non-trivial solutions, we have sin(√λ)= 0 =⇒√λ=nπ for n= 1,2,3, ...
Thus, the eigenvalues are λ=n2π2.
The corresponding eigenfunctions are Xn(x) = cnsin(nπx).
4. Finding the series solution: Substitute the separated solution back into the original
PDE:
u(x, t) = ∞
∑
n=1
Tn(t)Xn(x) = ∞
∑
n=1
cne−n2π2tsin(nπx)
5. Solving for the Fourier coefficients: From the initial condition u(x, 0) = 2x(1 −x):
cn= 2 ∫1
0
2x(1 −x)sin(nπx)dx
This integral can be computed as:
cn=8
n3π3((−1)n−1)
6. Final solution: The solution to the heat equation with the given boundary and initial
conditions is:
u(x, t) = ∞
∑
n=1
8
n3π3((−1)n−1)e−n2π2tsin(nπx)
18. Question:
Consider the following heat equation with initial condition:
∂u
∂t =k∂2u
∂x2, u(x, 0) = x(1 −x),0< x < 1
where kis a positive constant. Solve the heat equation subject to the given initial condition.
Ans. Steps: 1. We begin by assuming a solution of the form u(x, t) = X(x)T(t). 2.
Substituting u(x, t) = X(x)T(t)into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x). 3. Rearranging
this equation gives us two separate equations: T′(t)
kT (t)=−λ=X′′ (x)
X(x). 4. Solve the equation
X′′ (x)
X(x)=−λfor X(x)to find the spatial part of the solution. 5. The general solution for
X(x)is X(x) = c1cos(√λx)+c2sin(√λx). 6. Apply the boundary conditions u(0, t) = 0
and u(1, t) = 0 to find the eigenvalues λn=(nπ
1)2and corresponding eigenfunctions Xn(x) =
sin(nπx). 7. Solve the time part of the equation to find T(t). 8. For the given initial condition
u(x, 0) = x(1 −x), use the Fourier series to find the coefficients cn. 9. Finally, combine the
spatial and time parts of the solution to find the complete solution u(x, t).
19. Question: Consider the following partial differential equation:
ut−4uxx = 0
subject to boundary conditions u(0, t) = 0 and u(1, t) = 0, and the initial condition u(x, 0) =
x(1 −x).
Find the solution u(x, t)of the partial differential equation.
Ans. Solution: 1. To solve the given partial differential equation, we will use the method of
separation of variables. We assume that the solution can be written as a product of functions of
xand t, i.e., u(x, t) = X(x)T(t). Substituting this into the PDE yields:
XT ′−4X′′T= 0
Dividing by XT gives:
T′
4T=X′′
X=−λ
2. Solving the first ODE T′
4T=−λgives the time component solution:
T(t) = c1e−4λt
where c1is an arbitrary constant.
3. Now, solving the second ODE X′′
X=−λgives the spatial component solution:
For λ > 0:
X(x) = c2cos(√λx)+c3sin(√λx)
For λ= 0:
X(x) = c2+c3x
For λ < 0:
X(x) = c2cosh(√|λ|x)+c3sinh(√|λ|x)
where c2and c3are arbitrary constants.
4. Applying the boundary conditions: Given u(0, t) = 0, we have X(0)T(t) = 0 which implies
X(0) = 0. Thus, we obtain:
For λ > 0:
X(0) = c2= 0 =⇒X(x) = c3sin(√λx)
For λ= 0:
X(0) = c2= 0 =⇒X(x) = c3x
For λ < 0:
X(0) = c2= 0 =⇒X(x) = c3sinh(√|λ|x)
Given u(1, t) = 0, we have X(1)T(t) = 0 which implies X(1) = 0. Thus, we obtain:
For λ > 0:
X(1) = c3sin(√λ)= 0 =⇒√λ=nπ
For λ= 0:
X(1) = c3= 0
For λ < 0:
X(1) = c3sinh(√|λ|)= 0 =⇒√|λ|=nπi
5. The eigenvalues are found to be λn=−n2π2, where nis a positive integer.
The general solution is given by:
u(x, t) = ∞
∑
n=1
(cn1sin(nπx) + cn2cos(nπx))e−4n2π2t
6. Finally, applying the initial condition u(x, 0) = x(1 −x)to the solution, we can determine
the coefficients cn1and cn2through a Fourier sine series expansion of x(1 −x).
20. Find the solution u(x, t)to the partial differential equation:
∂2u
∂t2=c2∂2u
∂x2,
subject to the initial conditions u(x, 0) = x(1 −x)and ∂u
∂t (x, 0) = 0, where cis a constant.
Ans. The solution to the given partial differential equation can be found using the method of
separation of variables.
1. Assume a solution u(x, t) = X(x)T(t).
Substitute u(x, t) = X(x)T(t)into the partial differential equation:
T′′(t)X(x) = c2X′′(x)T(t).
Divide both sides by c2u(x, t) = c2X(x)T(t)to separate variables:
1
c2
T′′(t)
T(t)=X′′(x)
X(x).
This results in two ordinary differential equations:
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ,
where −λis a separation constant.
2. Solve the temporal ODE:
T′′(t) + c2λT (t) = 0.
The solution to this ODE is T(t) = Acos(ct√λ)+Bsin(ct√λ).
3. Solve the spatial ODE:
X′′(x) + λX(x) = 0.
The solutions to this ODE depend on the sign of λ:
For λ < 0, the general solution is X(x) = Acosh(√−λx)+Bsinh(√−λx).
For λ= 0, the general solution is X(x) = Ax +B.
For λ > 0, the general solution is X(x) = Acos(√λx)+Bsin(√λx).
4. Apply the initial condition u(x, 0) = x(1 −x).
Given that ∂u
∂t (x, 0) = 0, the solution T(t)must be T(t) = Bsin(ct√λ).
Substitute T(t) = Bsin(ct√λ)and the solutions for X(x)into u(x, t) = X(x)T(t).
u(x, t) = ∞
∑
n=1
(Ancos(nπx) + Bnsin(nπx))(Bnsin(cnπt)),
where λ= (nπ)2.
5. Use the Fourier series of the initial condition u(x, 0) = x(1 −x):
x(1 −x) = ∞
∑
n=1
Bnsin(nπx).
Comparing coefficients of x(1 −x)and Bnsin(nπx)gives:
Bn={0if nis even
4
nπ if nis odd .
Therefore, the solution to the given partial differential equation is:
u(x, t) = ∞
∑
n=1,3,5,...
4
nπ sin(nπx)sin(cnπt).
21. Find the general solution to the Heat Equation ut=kuxx subject to the boundary conditions
u(0, t) = u(l, t) = 0, with initial condition u(x, 0) = f(x).
Ans. The general solution to the Heat Equation with the given boundary and initial conditions
is u(x, t) = ∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t, where Bn=2
l∫l
0f(x)sin (nπx
l)dx is the Fourier sine
coefficient of f(x).
Solution: 1. We start by solving the Heat Equation using separation of variables. Let
u(x, t) = X(x)T(t). Then, the equation becomes T′(t)
kT (t)=X′′ (x)
X(x)=−λ, where λis a constant.
2. Solving the time equation T′(t)
kT (t)=−λgives us T(t) = c1e−kλt.
3. Solving the spatial equation X′′(x)+λX(x) = 0 with boundary conditions X(0) = X(l) =
0yields X(x) = Bsin (nπx
l), where λ=(nπ
l)2for n= 1,2,3, . . ..
4. Combining the spatial and time solutions, we have u(x, t) = ∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t.
5. To determine the coefficients Bn, we use the initial condition: u(x, 0) = f(x). Thus,
f(x) = ∑∞
n=1 Bnsin (nπx
l).
6. Multiplying both sides by sin (mπx
l)and integrating from 0 to l, we get ∫l
0f(x)sin (mπx
l)dx =
∫l
0∑∞
n=1 Bnsin (nπx
l)sin (mπx
l)dx.
7. By orthogonality of sine functions, the right side simplifies to Bml
2. Therefore, Bm=
2
l∫l
0f(x)sin (mπx
l)dx.
8. Substituting Bnback into the general solution, we obtain the required solution u(x, t) =
∑∞
n=1 Bnsin (nπx
l)e−k(nπ
l)2t, where Bn=2
l∫l
0f(x)sin (nπx
l)dx.
22. Question: Consider the heat equation on a one-dimensional rod defined by:
∂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) = f(x) = 2 sin(πx) + sin(2πx),0< x < L
Find the solution to the heat equation with the given boundary and initial conditions.
Ans. Step-by-step solution:
1. To solve the heat equation, we first need to find the eigenfunctions and eigenvalues of the
equation. We assume a solution of the form u(x, t) = X(x)T(t).
2. Plugging this solution form into the heat equation gives T′(t)
kT (t)=X′′ (x)
X(x)=−λ, where λis
a constant.
3. Solving the eigenvalue equation for X(x)yields the solutions Xn(x) = sin (nπx
L)for
n= 1,2,3, ....
4. The corresponding eigenvalues are λn=(nπ
L)2.
5. Now, solving the time part of the equation gives T′(t) = −kλT (t)with the solution
Tn(t) = Ane−kλnt.
6. Putting it all together, the general solution to the heat equation is given by u(x, t) =
∑∞
n=1 Bnsin (nπx
L)e−k(nπ
L)2t.
7. Next, we need to determine the coefficients Bnby using the initial condition u(x, 0) = f(x).
8. Applying the initial condition, we have f(x) = ∑∞
n=1 Bnsin (nπx
L).
9. Using the orthogonality of sine functions, we can determine Bnby multiplying both sides
by sin (mπx
L)and integrating from 0 to L.
10. The solution to the heat equation with the given boundary and initial conditions is then
u(x, t) = ∑∞
n=1 (2∫L
0f(x)sin(nπx
L)dx
∫L
0[sin(nπx
L)]2dx )sin (nπx
L)e−k(nπ
L)2t.
23. Question:
Consider the following Heat Equation in one dimension:
∂u
∂t = 5∂2u
∂x2
subject to the initial condition
u(x, 0) = 3x2+ 4
and boundary conditions
u(0, t) = 4 + et
u(1, t) = 8
Find the solution to this Heat Equation using the method of separation of variables.
Ans. Solution:
1. Apply separation of variables:
Let u(x, t) = X(x)T(t), then the Heat Equation becomes
XT ′= 5X′′T
Dividing by uXT , we get
T′
5T=X′′
X=−λ
Thus, this separates into two ordinary differential equations:
T′+ 5λT = 0
X′′ +λX = 0
2. Solve the temporal part:
The solution to the temporal ODE is
T(t) = ce−5λt
3. Solve the spatial part:
The spatial ODE becomes
X′′ +λX = 0
which has solutions
X(x) = Acos(√λx)+Bsin(√λx)
4. Apply the boundary conditions:
Applying the boundary condition u(0, t) = 4 + etyields
X(0)T(t) = 4 + et
A= 4 + et
Applying the boundary condition u(1, t) = 8 yields
X(1)T(t) = 8
Acos(√λ)+Bsin(√λ)= 8
5. Solve for λand complete the solution:
The eigenvalues λnare the solutions to
cos(√λn)= 0
which gives λn=(nπ
2)2for integer n.
Therefore, the solution is
u(x, t) = ∞
∑
n=1
(4 + et)cos (nπ
2x)e−5(nπ
2)2t
24. Find a particular solution to the Heat Equation
∂u
∂t = 2∂2u
∂x2
subject to the initial condition
u(x, 0) = sin(πx)
Ans. We can solve this problem using separation of variables. Let’s assume the solution has
the form u(x, t) = X(x)T(t). Substituting this into the heat equation and separating variables,
we get:
1. Substitute u(x, t) = X(x)T(t)into the heat equation:
T′(t)X(x) = 2T(t)X′′(x)
2. Divide both sides by 2XT :
T′
2T=X′′
X=−λ
3. Solve the ODE for X(x):
X′′(x) + λX(x) = 0
The general solution to this ODE is
X(x) = c1cos(√λx)+c2sin(√λx)
4. Solve the separated ODE for T(t):
T′
2T=−λ=⇒T′+ 2λT = 0
The general solution to this ODE is
T(t) = de−2λt
5. Applying the initial condition u(x, 0) = sin(πx):
u(x, 0) = X(x)T(0) = X(x) = sin(πx)
This gives us √λ=π, so the spatial part solution is
X(x) = sin(πx)
6. Putting it all together, the particular solution is:
u(x, t) = sin(πx)e−2π2t
25. Question 25:
Consider the one-dimensional wave equation given by ∂2u
∂t2=c2∂2u
∂x2, where cis a constant
velocity. Given the initial conditions:
u(x, 0) = sin(x)and ∂u
∂t (x, 0) = 0
Solve the wave equation subject to these initial conditions.
Ans. Solution: We can start by recognizing that the general solution to the one-dimensional
wave equation is given by u(x, t) = F(x−ct)+G(x+ct), where Fand Gare arbitrary functions.
1. Find F(x):
Applying the initial condition u(x, 0) = sin(x), we have:
F(x) + G(x) = sin(x)
2. Find G(x):
Since ∂u
∂t (x, 0) = 0, we know that ∂
∂t [F(x) + G(x)] = 0:
∂F (x)
∂t −∂G(x)
∂t = 0
Differentiating the general solution with respect to tgives:
∂u
∂t =−c[F′(x−ct) + G′(x+ct)]
And evaluating at t= 0:
F′(x)−G′(x) = 0
Integrating this equation, we get:
F(x)−G(x) = C1
3. Solve for F(x)and G(x):
Adding the equations for F(x)and G(x), we have:
2F(x) = sin(x) + C1
F(x) = sin(x) + C1
2
Substitute this back into F(x)−G(x) = C1to solve for G(x):
sin(x) + C1
2−G(x) = C1
G(x) = −sin(x)
2
Therefore, the solution to the wave equation subject to the initial conditions is:
u(x, t) = sin(x−ct)−sin(x+ct)
2
26. Question:
Consider the wave equation in one dimension given by ∂2u
∂t2=c2∂2u
∂x2, subject to the initial
conditions u(x, 0) = sin(πx
L)and ∂u
∂t (x, 0) = 0, where 0≤x≤Land t > 0. Find the solution
u(x, t)to the wave equation.
Ans. Solution: Let’s first solve the wave equation with the given initial conditions.
1. We can use the method of separation of variables to solve the wave equation. Assume a
solution of the form u(x, t) = X(x)T(t). Substituting this into the wave equation gives:
T′′(t)X(x) = c2X′′(x)T(t)
Dividing by c2XT gives:
T′′(t)
c2T(t)=X′′(x)
X(x)=−λ
Since the left side is a function of tonly and the right side is a function of xonly, they must
be equal to a constant −λ. This gives us two ordinary differential equations to solve.
2. Solving the equation for T(t)gives T′′(t) + c2λT (t)=0, with general solution T(t) =
C1cos(√c2λt)+C2sin(√c2λt).
3. Solving the equation for X(x)gives X′′(x) + λX(x) = 0, with general solution X(x) =
Acos(√λx)+Bsin(√λx).
4. Applying the initial condition u(x, 0) = sin(πx
L)gives:
u(x, 0) = X(x)T(0) = X(x) = Bsin (πx
L)
Comparing this with the general solution for X(x), we have √λ=π
L. Therefore, λ=(π
L)2
and X(x) = Bsin (πx
L).
5. Applying the other initial condition ∂u
∂t (x, 0) = 0 gives:
∂u
∂t (x, 0) = X(x)T′(0) = C2√c2π2
L2cos (πx
L)= 0
Since the cosine term cannot be zero for all x, we must have C2= 0.
6. Therefore, the solution to the wave equation subject to the given initial conditions is:
u(x, t) = Bsin (πx
L)cos (πct
L)
27. Question 27:
Consider the following partial differential equation:
utt −c2uxx = 0
Subject to the boundary conditions:
u(0, t) = 0
u(1, t) = 0
and the initial conditions:
u(x, 0) = 0
ut(x, 0) = x(1 −x)
Find the solution u(x, t)for 0≤x≤1and t > 0.
Ans. Step-by-step solution:
1. Find the separation of variables solution: Let u(x, t) = X(x)T(t). Substitute this
into the given PDE:
XT ′′ −c2X′′T= 0
Divide by c2XT :
T′′
c2T=X′′
X
Let this equal some constant −λ.
This gives two ordinary differential equations:
For X(x):
X′′ +λX = 0
Subject to the boundary conditions X(0) = 0 and X(1) = 0, the solution for X(x)is:
X(x) = Bsin(nπx)
For T(t)with λ= (nπ
L)2, where Lis the length of the interval:
T′′ +(cnπ
L)2
T= 0
T(t) = Ancos (cnπ
Lt)+Bnsin (cnπ
Lt)
2. Using the initial conditions to find T(t):From the initial condition u(x, 0) = 0, we
get:
X(x)T(0) = 0
Bnsin(nπx) = ∞
∑
n=1
Bnsin(nπx) = 0
For this to be true for all x,Bn= 0 for all n.
Therefore, the solution for T(t)becomes:
T(t) = Ancos (cnπ
Lt)
3. Using the initial condition for ut(x, 0):Differentiation of u(x, 0) with respect to t
gives:
ut(x, 0) = X(x)T′(0) = x(1 −x)
X(x)An(−cnπ
L)sin(nπx) = x(1 −x)
To satisfy this equation, the sum must converge to x(1 −x), suggesting:
An=2∫1
0x(1 −x)sin(nπx)dx
cnπ ∫1
0sin2(nπx)dx
Calculating the integrals, we find the full solution:
u(x, t) = ∞
∑
n=1
2
nπ
1−(−1)n
1−cos(nπ)cos (nπct
L)sin(nπx)
28. Question:
Consider the one-dimensional heat equation given by ∂u
∂t =k∂2u
∂x2, where kis a positive con-
stant.
Given initial conditions u(x, 0) = 2x(1 −x)and boundary conditions u(0, t) = u(1, t)=0,
find the solution u(x, t)to the heat equation.
Ans. Solution:
We will solve the heat equation using the method of separation of variables.
1. Assume a solution of the form u(x, t) = X(x)T(t).
Substitute this into the heat equation to get:
T′(t)
kT (t)=X′′ (x)
X(x).
This equation can be separated into two ordinary differential equations:
T′(t)
kT (t)=−λ2=X′′ (x)
X(x).
2. Solve the time equation:
T′(t)
kT (t)=−λ2
This gives T(t) = Ae−kλ2t, where Ais a constant.
3. Solve the spatial equation:
X′′(x) + λ2X(x) = 0
The general solution to this ODE is X(x) = Bsin(λx) + Ccos(λx), where Band Care
constants.
4. Apply the boundary conditions:
u(0, t) = 0 = X(0)T(t) = CT (t)
This implies C= 0.
u(1, t) = 0 = X(1)T(t) = Bsin(λ)T(t)
To satisfy the boundary condition, we need Bsin(λ)=0which gives λ=nπ for n=
1,2,3, . . ..
5. Construct the solution:
As λ=nπ, we get Xn(x) = Bnsin(nπx)and Tn(t) = Ane−k(nπ)2tas the separated solutions.
The general solution is given by:
u(x, t) = ∑∞
n=1 Xn(x)Tn(t) = ∑∞
n=1 AnBnsin(nπx)e−k(nπ)2t.
6. Apply the initial condition:
u(x, 0) = ∑∞
n=1 AnBnsin(nπx) = 2x(1 −x).
This gives AnBn= 4 ∫1
0x(1 −x)sin(nπx)dx.
Solving the integral gives AnBn=8
n3π3((−1)n−1).
Hence, the solution to the heat equation with the given initial and boundary conditions is:
u(x, t) = ∑∞
n=1
8
n3π3((−1)n−1) sin(nπx)e−k(nπ)2t.
29. Question 29:
Consider the one-dimensional heat equation defined on the interval 0≤x≤Lwith the
boundary conditions u(0, t) = 0 and u(L, t) = 0, and the initial condition u(x, 0) = f(x), where
f(x)is a given function.
Given the heat equation ∂u
∂t =k∂2u
∂x2with k > 0representing the thermal diffusivity, find the
solution u(x, t)satisfying the given conditions.
Ans. Solution:
We start by using the method of separation of variables to solve the heat equation.
1. Separation of Variables:
Assume the solution can be written as a product of two functions, u(x, t) = X(x)T(t).
Substitute u(x, t) = X(x)T(t)into the heat equation:
T′(t)
kT (t)=X′′ (x)
X(x)=−λ2(constant −λ2)
This results in two ordinary differential equations:
T′(t) + kλ2T(t) = 0 (1)
X′′(x) + λ2X(x) = 0 (2)
2. Solve the Time Function:
Solve the time function equation (1):
T(t) = Ae−kλ2t
3. Solve the Spatial Function:
Solve the spatial function equation (2):
The general solution to the spatial function is of the form:
X(x) = Csin(λx) + Dcos(λx)
Applying the boundary conditions u(0, t) = 0 and u(L, t) = 0:
i) From u(0, t) = 0:
X(0)T(t) = 0 =⇒D= 0
ii) From u(L, t) = 0:
X(L)T(t) = 0 =⇒Csin(λL) = 0
This gives the condition λ=nπ
Lfor n∈N.
4. General Solution:
The general solution to the heat equation is the sum of all possible solutions:
u(x, t) = ∑∞
n=1 (cnsin (nπx
L)e−k(nπ
L)2t)
where cnare constants determined by the initial condition.
Therefore, the solution to the heat equation with the given boundary and initial conditions is:
u(x, t) = ∑∞
n=1 (cnsin (nπx
L)e−k(nπ
L)2t)
30. Consider the following heat equation with initial conditions:
∂u
∂t =k∂2u
∂x2,0< x < 1, t > 0
where u(0, t) = 0,u(1, t) = 0 for t > 0, and u(x, 0) = sin(3πx).
Find the solution u(x, t)for this initial-boundary value problem.
Ans. Solution: 1. We begin by separation of variables. Assume u(x, t) = X(x)T(t).
2. Plugging u(x, t) = X(x)T(t)into the heat equation, we get:
X(x)dT (t)
dt =kX′′(x)T(t)
Dividing by kXT gives:
1
kT
dT
dt =X′′
X=−λ2
where λis a separation constant.
3. We now solve the temporal equation:
1
kT
dT
dt =−λ2=⇒T(t) = Ae−kλ2t
4. Next, we solve the spatial equation:
X′′(x) = −λ2X(x)
which yields the solutions X(x) = Bsin(nπx)for λ=nπ where n= 1,2,3, . . .
5. Since u(0, t) = 0, we have X(0)T(t) = 0 =⇒X(0) = 0. Thus, Bsin(0) = 0 =⇒B= 0
as the solution must be nonzero.
6. Similarly, for u(1, t) = 0, we get X(1)T(t) = 0 =⇒X(1) = 0, leading to nπ = 1,2,3, . . .
7. The general solution is given by:
u(x, t) = ∞
∑
n=1
cne−(nπ)2kt sin(nπx)
8. Applying the initial condition u(x, 0) = sin(3πx), we find:
sin(3πx) = ∞
∑
n=1
cnsin(nπx)
9. Multiplying both sides by sin(mπx)and integrating from 0to 1, we obtain:
cm= 2 ∫1
0
sin(3πx)sin(mπx)dx
10. Evaluating the integral, we find c3= 1 and cm= 0 for m= 3.
11. Therefore, the solution to the initial-boundary value problem is:
u(x, t) = e−9π2kt sin(3πx)