← 2015 Paper 2

UPSC 2015 Maths Optional Paper 2 Q7a — Step-by-Step Solution

15 marks · Section B

Heat equation · PDEs · asked 3× in 14 yrs · Read the full method →

Question

Find the solution of the initial-boundary value problem

ut−uxx+u=0,0<x<l,  t>0,u_t-u_{xx}+u=0,\quad 0<x<l,\;t>0, u(0,t)=u(l,t)=0,  t≥0,u(0,t)=u(l,t)=0,\;t\ge 0, u(x,0)=x(l−x),  0<x<l.u(x,0)=x(l-x),\;0<x<l.

Technique

Separation of variables; the +u+u term shifts the time-decay constant by +1+1 but leaves spatial eigenfunctions unchanged; Fourier sine series of x(l−x)x(l-x) on [0,l][0,l] involves only odd nn with coefficients 8l2/(n3π3)8l^2/(n^3\pi^3).

Solution

Strategy. Separation of variables. The extra +u+u term modifies the time-decay but not the spatial eigenfunctions.

Step 1 — Separate variables

Let u(x,t)=X(x)T(t)u(x,t)=X(x)T(t). Substitute:

XT′−X′′T+XT=0  ⟹  T′+TT=X′′X=−λ2.XT'-X''T+XT=0\;\Longrightarrow\;\dfrac{T'+T}{T}=\dfrac{X''}{X}=-\lambda^2.

(Separation constant negative to ensure oscillatory XX matching Dirichlet BC.)

Step 2 — Solve XX equation

X′′+λ2X=0X''+\lambda^2 X=0, X(0)=X(l)=0X(0)=X(l)=0. Solutions Xn(x)=sin⁡(nπx/l)X_n(x)=\sin(n\pi x/l) with λn=nπ/l\lambda_n=n\pi/l, n=1,2,3,…n=1,2,3,\dots.

Step 3 — Solve TT equation

T′+T=−λ2T  ⟹  T′=−(1+λ2)T  ⟹  Tn(t)=e−(1+λn2)t=e−(1+n2π2/l2)tT'+T=-\lambda^2 T\;\Longrightarrow\;T'=-(1+\lambda^2)T\;\Longrightarrow\;T_n(t)=e^{-(1+\lambda_n^2)t}=e^{-(1+n^2\pi^2/l^2)t}.

Step 4 — General series solution

u(x,t)=∑n=1∞Bnsin⁡ ⁣(nπxl)e−(1+n2π2/l2)t.u(x,t)=\sum_{n=1}^\infty B_n\sin\!\left(\dfrac{n\pi x}{l}\right)e^{-(1+n^2\pi^2/l^2)t}.

Step 5 — Apply initial condition u(x,0)=x(l−x)u(x,0)=x(l-x)

At t=0t=0: ∑Bnsin⁡(nπx/l)=x(l−x)\sum B_n\sin(n\pi x/l)=x(l-x), the Fourier sine series of x(l−x)x(l-x) on [0,l][0,l].

Bn=2l∫0lx(l−x)sin⁡ ⁣(nπxl)dx.B_n=\dfrac{2}{l}\int_0^l x(l-x)\sin\!\left(\dfrac{n\pi x}{l}\right)dx.

Step 6 — Compute the Fourier coefficient

Let In=∫0lx(l−x)sin⁡(nπx/l) dxI_n=\int_0^l x(l-x)\sin(n\pi x/l)\,dx. Split:

In=l∫0lxsin⁡(nπx/l)dx−∫0lx2sin⁡(nπx/l)dx.I_n=l\int_0^l x\sin(n\pi x/l)dx-\int_0^l x^2\sin(n\pi x/l)dx.

Use the standard results (or integrate by parts).

∫0lxsin⁡(nπx/l) dx\int_0^l x\sin(n\pi x/l)\,dx: By parts, u=x, dv=sin⁡(nπx/l)dxu=x,\,dv=\sin(n\pi x/l)dx: =−lxnπcos⁡(nπx/l)∣0l+lnπ∫0lcos⁡(nπx/l)dx=-\dfrac{lx}{n\pi}\cos(n\pi x/l)\bigg|_0^l+\dfrac{l}{n\pi}\int_0^l\cos(n\pi x/l)dx =−l2nπcos⁡(nπ)+0+l2n2π2sin⁡(nπx/l)∣0l=-\dfrac{l^2}{n\pi}\cos(n\pi)+0+\dfrac{l^2}{n^2\pi^2}\sin(n\pi x/l)\bigg|_0^l =−l2nπ(−1)n+0=-\dfrac{l^2}{n\pi}(-1)^n+0 =l2(−1)n+1nπ=\dfrac{l^2(-1)^{n+1}}{n\pi}.

∫0lx2sin⁡(nπx/l) dx\int_0^l x^2\sin(n\pi x/l)\,dx: By parts twice. =[−lx2nπcos⁡(nπx/l)]0l+2lnπ∫0lxcos⁡(nπx/l)dx=\bigl[-\dfrac{lx^2}{n\pi}\cos(n\pi x/l)\bigr]_0^l+\dfrac{2l}{n\pi}\int_0^l x\cos(n\pi x/l)dx =−l3nπ(−1)n+2lnπJ=-\dfrac{l^3}{n\pi}(-1)^n+\dfrac{2l}{n\pi}J

where J=∫0lxcos⁡(nπx/l)dxJ=\int_0^l x\cos(n\pi x/l)dx. Parts on JJ: u=x,dv=cos⁡ dxu=x, dv=\cos\,dx: J=lxnπsin⁡(nπx/l)∣0l−lnπ∫0lsin⁡(nπx/l)dxJ=\dfrac{lx}{n\pi}\sin(n\pi x/l)\bigg|_0^l-\dfrac{l}{n\pi}\int_0^l\sin(n\pi x/l)dx =0−lnπ⋅[−lnπcos⁡(nπx/l)]0l=0-\dfrac{l}{n\pi}\cdot\bigl[-\dfrac{l}{n\pi}\cos(n\pi x/l)\bigr]_0^l =l2n2π2[cos⁡(nπ)−1]=l2n2π2[(−1)n−1]=\dfrac{l^2}{n^2\pi^2}[\cos(n\pi)-1]=\dfrac{l^2}{n^2\pi^2}[(-1)^n-1].

So J=l2[(−1)n−1]n2π2J=\dfrac{l^2[(-1)^n-1]}{n^2\pi^2}.

Back: ∫0lx2sin⁡(nπx/l)dx=−l3(−1)nnπ+2lnπ⋅l2[(−1)n−1]n2π2=−l3(−1)nnπ+2l3[(−1)n−1]n3π3\int_0^l x^2\sin(n\pi x/l)dx=-\dfrac{l^3(-1)^n}{n\pi}+\dfrac{2l}{n\pi}\cdot\dfrac{l^2[(-1)^n-1]}{n^2\pi^2}=-\dfrac{l^3(-1)^n}{n\pi}+\dfrac{2l^3[(-1)^n-1]}{n^3\pi^3}.

Combine:

In=l⋅l2(−1)n+1nπ−[−l3(−1)nnπ+2l3[(−1)n−1]n3π3]I_n=l\cdot\dfrac{l^2(-1)^{n+1}}{n\pi}-\left[-\dfrac{l^3(-1)^n}{n\pi}+\dfrac{2l^3[(-1)^n-1]}{n^3\pi^3}\right] =l3(−1)n+1nπ+l3(−1)nnπ−2l3[(−1)n−1]n3π3.=\dfrac{l^3(-1)^{n+1}}{n\pi}+\dfrac{l^3(-1)^n}{n\pi}-\dfrac{2l^3[(-1)^n-1]}{n^3\pi^3}.

The first two terms: (−1)n+1+(−1)n=0(-1)^{n+1}+(-1)^n=0. So

In=−2l3[(−1)n−1]n3π3=2l3[1−(−1)n]n3π3.I_n=-\dfrac{2l^3[(-1)^n-1]}{n^3\pi^3}=\dfrac{2l^3[1-(-1)^n]}{n^3\pi^3}.

For nn even: 1−1=01-1=0, so In=0I_n=0. For nn odd: 1−(−1)=21-(-1)=2, so In=4l3n3π3I_n=\dfrac{4l^3}{n^3\pi^3}.

Step 7 — Compute BnB_n

Bn=2lInB_n=\dfrac{2}{l}I_n:

Step 8 — Final solution

Answer

  u(x,t)=∑n=1n odd∞8l2n3π3sin⁡ ⁣(nπxl)e−(1+n2π2/l2)t.  \boxed{\;u(x,t)=\sum_{\substack{n=1\\n\text{ odd}}}^\infty\dfrac{8l^2}{n^3\pi^3}\sin\!\left(\dfrac{n\pi x}{l}\right)e^{-(1+n^2\pi^2/l^2)t}.\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 14 years, mapped. Get the take-away PDF free.