4.1.6 Semi-infinite domain

4.1.6.1 [235] left end constant (general case)
4.1.6.2 [236] left end constant (special case)
4.1.6.3 [237] Logan p. 76. Left end general function of time (general case)
4.1.6.4 [238] Left end function of time (special case)
4.1.6.5 [239] nonhomogeneous BC
4.1.6.6 [240] I.C. not zero
4.1.6.7 [241] nonhomogeneous BC
4.1.6.8 [242] nonhomogeneous BC
4.1.6.9 [243] nonhomogeneous B.C.
4.1.6.10 [244] Unit triangle I.C.
4.1.6.11 [245] I.C. not at t=0
4.1.6.12 [246] Diffusion with advection
4.1.6.13 [247] Practice exam problem

4.1.6.1 [235] left end constant (general case)

problem number 235

Added July 6, 2019 Solve the heat equation for x>0,t>0 ut=kuxx The boundary conditions are u(0,t)=A and initial conditions u(x,0)=0

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == A; 
ic  = u[x, 0] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}, Assumptions -> {k>0,x > 0,t>0}], 60*10]];
 

{{u(x,t)AxE12(x24kt)2πkt}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=0; 
bc  := u(0,t)=A; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t)) assuming k>0,x>0,t>0),output='realtime'));
 

u(x,t)=Aerf(x2kt)+A

Hand solution

Solving (1)ut=kuxxt>0,x>0u(0,t)=Au(x,0)=0

And u(x,t)< as x. This means u(x,t) is bounded. This conditions is always needed to solve these problems.

Let U(x,s) be the Laplace transform of u(x,t). Defined as L(u,t)=0estu(x,t)dt Applying Laplace transform to the original PDE (1) givessU(x,s)u(x,0)=kUxx(x,s) But u(x,0)=0, therefore the above becomesUxxskU=0 The solution to this differential equation isU(x,s)=c1eskx+c2eskx Since u(x,t) is bounded in the limit as x and k>0, therefore it must be that c1=0 to keep the solution bounded. The above simplifies to(2)U(x,s)=c2eskx At x=0,u(0,t)=A. Therefore U(0,s)=L(u(0,t))=L(A)=1sA. Hence at x=0 the above gives1sA=c2 Therefore (2) becomes(3)U(x,s)=Aseskx From tables, the inverse Laplace transform of the above is (since x>0,k>0)u(x,t)=Aerfc(x2kt)=A(1erf(x2kt))

____________________________________________________________________________________

4.1.6.2 [236] left end constant (special case)

problem number 236

Added July 6, 2019 Solve the heat equation for x>0,t>0 ut=kuxx The boundary conditions are u(0,t)=A and initial conditions u(x,0)=0, using A=60k=110

Mathematica

ClearAll["Global`*"]; 
k=1/10; A=60; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == A; 
ic  = u[x, 0] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}], 60*10]];
 

{{u(x,t)Indeterminate if x0}} It fail if assumption x>0 is given. A bug

Maple

restart; 
k:=1/10; 
A:=60; 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=0; 
bc  := u(0,t)=A; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t)) assuming x>0),output='realtime'));
 

u(x,t)=60erf(10x2t)+60

Hand solution

Solving on semi-infinite domain ut=kuxxt>0,x>0u(0,t)=Au(x,0)=0

With A=60,k=110

The general problem above was solved in 4.1.6.1 on page 791 and the solution isu(x,t)=A(1erf(x2kt)) Substituting the specific values given above into this solution givesu(x,t)=60(1erf(x2t10)) Animation is below

Source code used for the above

____________________________________________________________________________________

4.1.6.3 [237] Logan p. 76. Left end general function of time (general case)

problem number 237

This is problem at page 76 from David J Logan text book.

Solve the heat equation for x>0,t>0 ut=kuxx The boundary conditions are u(0,t)=f(t) and initial conditions u(x,0)=0

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == f[t]; 
ic  = u[x, 0] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}, Assumptions -> {t > 0, x > 0,k>0}], 60*10]]; 
sol =  sol /. {K[2] -> z}
 

{{u(x,t)xIntegrate[f(z)ex24kt4kz(tz)3/2,{z,0,t},AssumptionsTrue]2πk}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=0; 
bc  := u(0,t)=f(t); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t)) assuming t>0,x>0,k>0),output='realtime'));
 

u(x,t)=x(0tex24(t+ζ)kf(ζ)(tζ)32dζ)2πk

Hand solution

Solving on semi-infinite domain (1)ut=kuxxt>0,x>0u(0,t)=f(t)u(x,0)=0

With k>0 and u(x,t)< as x. This means u(x,t) is bounded. This conditions is always needed to solve these problems.

Let U(x,s) be the Laplace transform of u(x,t). Defined as L(u,t)=0estu(x,t)dt Applying Laplace transform to the original PDE (1) givessU(x,s)u(x,0)=kUxx(x,s) But u(x,0)=0, therefore the above becomesUxxskU=0 The solution to this differential equation isU(x,s)=c1eskx+c2eskx Since u(x,t) is bounded in the limit as x and k>0, therefore it must be that c1=0 to keep the solution bounded. The above simplifies to(2)U(x,s)=c2eskx At x=0,u(0,t)=f(t). Therefore U(0,s)=L(f(t))=F(s). Hence at x=0 the above givesF(s)=c2 Therefore (2) becomes(3)U(x,s)=F(s)eskx By convolution, the above becomes(4)u(x,t)=f(t)G(x,t) Where G(x,t) is the inverse transform of eskx which is xex24kt2kπt32. Hence (4) becomesu(x,t)=f(t)xex24kt2kπt32=x2kπ0tf(τ)(tτ)32ex24k(tτ)dτ

For k=1u(x,t)=x2π0tf(τ)(tτ)32ex24(tτ)dτ

____________________________________________________________________________________

4.1.6.4 [238] Left end function of time (special case)

problem number 238

Added July 7, 2019 Solve the heat equation for x>0,t>0 ut=kuxx The boundary conditions are u(0,t)=sin(t) and initial conditions u(x,0)=0 using k=110

Mathematica

ClearAll["Global`*"]; 
k=1/10; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == Sin[t]; 
ic  = u[x, 0] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}, Assumptions -> {t > 0, x > 0}], 60*10]];
 

{{u(x,t)52πxIntegrate[sin(K[2])e5x22(tK[2])(tK[2])3/2,{K[2],0,t},AssumptionsTrue]}}

Maple

restart; 
interface(showassumed=0); 
k:=1/10; 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=0; 
bc  := u(0,t)=sin(t); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t)) assuming t>0,x>0),output='realtime'));
 

u(x,t)=10x(0te5x22ζsin(tζ)ζ32dζ)2π

Hand solution

Solving

(1)ut=kuxxt>0,x>0u(0,t)=f(t)u(x,0)=0

Using k=110 and f(t)=sin(t).

The general solution was solved in problem 4.1.6.3 on page 803 and the solution was found to beu(x,t)=x2kπ0tf(τ)(tτ)32ex24k(tτ)dτ Replacing the given values above, the solution becomesu(x,t)=52xπ0tsin(τ)(tτ)32e5x22(tτ)dτ We could also use the following form of the solutionu(x,t)=52xπ0tsin(tτ)τ32e5x22τdτ Animation is below

Source code used for the above

____________________________________________________________________________________

4.1.6.5 [239] nonhomogeneous BC

problem number 239

Solve the heat equation ut=k2ux2 For x>0 and t>0. The boundary conditions is u(0,t)=1 and And initial condition u(x,0)=0

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == 1; 
ic  = u[x, 0] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}, Assumptions -> {t > 0, k > 0, x > 0}], 60*10]];
 

{{u(x,t)xE12(x24kt)2πkt}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=0: 
bc  := u(0,t)=1; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t),HINT = boundedseries) assuming t>0,x>0,k>0),output='realtime'));
 

u(x,t)=erfc(x2kt)

____________________________________________________________________________________

4.1.6.6 [240] I.C. not zero

problem number 240

Added December 20, 2018.

From https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve the heat equation for u(x,t) ut=142ux2 With initial condition u(x,t0)=10; And boundary conditions u(x0,t)=0 For x>|x0| and t>|t0|.

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == (1/4)*D[u[x, t], {x, 2}]; 
bc  = u[-x0, t] == 0; 
ic  = u[x, t0] == 10; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], x, t, Assumptions -> {t > Abs[t0], x > Abs[x0]}], 60*10]];
 

{{u(x,t){10erf(x+x0tt0)x+x0>0IndeterminateTrue}} due to IC/BC not zero

Maple

restart; 
pde := diff(u(x, t), t) = (1/4)*(diff(u(x, t), x$2)); 
bc  := u(-x0, t) = 0; 
ic  := u(x, t0) = 10; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde, bc,ic],u(x,t)) assuming x>abs(x0), t>abs(t0)),output='realtime'));
 

u(x,t)=10erf(x+x0tt0)

____________________________________________________________________________________

4.1.6.7 [241] nonhomogeneous BC

problem number 241

Solve the heat equation

ut=k2ux2 For x>0 and t>0. The boundary conditions is u(0,t)=μ and And initial condition u(x,0)=λ

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
bc  = u[0, t] == lambda; 
ic  = u[x, 0] == mu; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, bc, ic}, u[x, t], {x, t}, Assumptions -> {t > 0, k > 0, x > 0}], 60*10]];
 

{{u(x,t)μerf(x2kt)+λxE12(x24kt)2πkt}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2); 
ic  := u(x,0)=mu: 
bc  := u(0,t)=lambda; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde,ic,bc],u(x,t),HINT = boundedseries) assuming t>0,x>0,k>0),output='realtime'));
 

u(x,t)=μ+(λμ)erfc(x2kt)

____________________________________________________________________________________

4.1.6.8 [242] nonhomogeneous BC

problem number 242

From Mathematica DSolve help pages. Solve the heat equation for u(x,t) on half the line x>0 and t>0 ut=2ux2 With initial condition u(x,0)=cosx And boundary conditions u(0,t)=1

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == D[u[x, t], {x, 2}]; 
ic  = u[x, 0] == Cos[x]; 
bc  = u[0, t] == 1; 
sol =  AbsoluteTiming[TimeConstrained[FullSimplify[DSolve[{pde, ic, bc}, u[x, t], {x, t}]], 60*10]];
 

{{u(x,t){Integrate[(e(xK[1])24te(x+K[1])24t)cos(K[1]),{K[1],0,},AssumptionsTrue]+txIntegrate[ex24(tK[2])(tK[2])3/2,{K[2],0,t},AssumptionsTrue]2πtx>0IndeterminateTrue}}

Maple

restart; 
pde := diff(u(x, t), t)=diff(u(x, t), x$2); 
ic  := u(x,0)=cos(x); 
bc  := u(0,t)=1; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t)) assuming t>0 and x>0),output='realtime'));
 

u(x,t)=erf(2itx2t)eixt2+erf(2it+x2t)eixt2erf(x2t)+1

____________________________________________________________________________________

4.1.6.9 [243] nonhomogeneous B.C.

problem number 243

Solve the heat equation for u(x,t) on half the line x>0 and t>0 ut=kuxx With initial condition u(x,0)=0 And boundary conditions u(0,t)=t. Solution is bounded at infinity.

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == k*D[u[x, t], {x, 2}]; 
ic  = u[x, 0] == 0; 
bc  = u[0, t] == t; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}, Assumptions -> {k > 0, x > 0, t > 0}], 60*10]];
 

{{u(x,t)(2kt+x2)Erfc(x2kt)2xktex24ktπ2k}}

Maple

restart; 
interface(showassumed=0); 
pde := diff(u(x, t), t)=k*diff(u(x, t), x$2); 
ic  := u(x,0)=0; 
bc  := u(0,t)=t; 
assume(x>0); 
assume(t>0); 
assume(k>0); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t))),output='realtime'));
 

u(x,t)=2ktxex24kt+π(erf(x2kt)1)(2kt32+tx2)2πkt

____________________________________________________________________________________

4.1.6.10 [244] Unit triangle I.C.

problem number 244

From Mathematica DSolve help pages. Solve the heat equation for u(x,t) on half the line x>0 and t>0 ut=uxx With initial condition u(x,0)=UnitTriagle[x-3] And boundary conditions ux(0,t)=0

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == D[u[x, t], {x, 2}]; 
ic  = u[x, 0] == UnitTriangle[x - 3]; 
bc  = Derivative[1, 0][u][0, t] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}], 60*10]];
 

{{u(x,t){12(erf(|x4|2t)(x4)2|4x|+(x+2)erf(x+22t)2(x+3)erf(x+32t)+(x+4)erf(x+42t)2(x3)2erf(|x3|2t)|3x|+(x2)2erf(|x2|2t)|2x|+2(e(x4)24t2e(x3)24t+e(x2)24t+e(x+2)24t2e(x+3)24t+e(x+4)24t)tπ)x>0IndeterminateTrue}}

Maple

restart; 
pde := diff(u(x, t), t)=diff(u(x, t), x$2); 
ic  := u(x,0)=piecewise( x>2 and x<3,-2+x, x>3 and x<4, 4-x, 0); 
bc:=(D[1](u))(0,t)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t)) assuming t>0 and x>0),output='realtime'));
 

u(x,t)=te(x4)24t2te(x3)24t+te(x2)24t+te(x+2)24t2te(x+3)24t+te(x+4)24t+((x4)erf(x42t)+(2x+6)erf(x32t)+(x2)erf(x22t)+(x+2)erf(x+22t)+(2x6)erf(x+32t)+(x+4)erf(x+42t))πt2πt

____________________________________________________________________________________

4.1.6.11 [245] I.C. not at t=0

problem number 245

Added December 20, 2018.

Taken from https://www.mapleprimes.com/posts/209970-Exact-Solutions-For-PDE-And-Boundary--Initial-Conditions-2018

Solve for u(x,t) for t>0,x>0 ut=14uxx With initial condition u(x,t0)=10ex2 And boundary conditions ux(x0,t)=0

Mathematica

ClearAll["Global`*"]; 
pde =  D[u[x, t], t] == (1*D[u[x, t], {x, 2}])/4; 
ic  = u[x, t0] == 10*Exp[-x^2]; 
bc  = Derivative[1, 0][u][x0, t] == 0; 
sol =  AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}, Assumptions -> {x > 0, t > 0}], 60*10]];
 

{{u(x,t){5(ex2tt0+1(erf(x+(t+t01)x0t22t0t+t+(t01)t0)+1)+e(x2x0)2tt0+1Erfc(x+(tt01)x0(tt0)(tt0+1)))tt0+1x>x0IndeterminateTrue}}

Maple

restart; 
pde := diff(u(x, t), t) = 1/4*(diff(u(x, t), x$2)); 
bc  := eval( diff(u(x,t),x),x=x0)=0; 
ic  := u(x,t0)=10*exp(-x^2); 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde, bc,ic],u(x,t)) assuming x>0,t>0),output='realtime'));
 

u(x,t)=5(erf(x+(t+t01)x0tt0tt0+1)ex2t+t01ex2t+t01+(erf(t0x0+x+(t1)x0tt0tt0+1)1)e(x2x0)2tt0+1)tt0+1

____________________________________________________________________________________

4.1.6.12 [246] Diffusion with advection

problem number 246

Added April 5, 2019.

Solve for u(x,t) in ut=uxxux

For t>0,x>0. With boundary conditions u(0,t)=0 and intitial conditions u(x,0)=f(x)

Mathematica

ClearAll["Global`*"]; 
pde = D[u[x, t], t] == D[u[x, t], {x, 2}] - D[u[x, t], x]; 
ic  = u[x, 0] == f[x]; 
bc  = u[0, t] == 0; 
sol = AbsoluteTiming[TimeConstrained[DSolve[{pde, ic, bc}, u[x, t], {x, t}, Assumptions -> {x > 0, t > 0}], 60*10]];
 

{{u(x,t)ex2t4({Integrate[eK[1]2(e(xK[1])24te(x+K[1])24t)f(K[1]),{K[1],0,},AssumptionsTrue]2πtx>0IndeterminateTrue)}}

Maple

restart; 
pde := diff(u(x,t),t)=diff(u(x,t),x$2)- diff(u(x,t),x); 
ic  := u(x,0)=f(x); 
bc  := u(0,t)=0; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol', pdsolve([pde, ic, bc], u(x, t))assuming t>0,x>0),output='realtime'));
 

u(x,t)=(L1(e4s+1xf(x)exdx4s+1e4s+1x,s,t)L1((f(x)exe4s+1xdx)e4s+1x4s+1,s,t)+L1(0f(_a)e_ae4s+1_ad_a4s+1e4s+1x,s,t)L1(0e4s+1_af(_a)e_ad_a4s+1e4s+1x,s,t))ex2

____________________________________________________________________________________

4.1.6.13 [247] Practice exam problem

problem number 247

Added May 23, 2019.

From Math 5587 midterm I, Fall 2016, practice exam, problem 13.

Solve for u(x,t) with IC u(x,0)=x2+1 and BC ut(0,t)=1 for x>0,t>0 ut=uxx

Mathematica

ClearAll["Global`*"]; 
pde = D[u[x, t], t] == D[u[x,t],{x,2}]; 
ic  = u[x,0]==x^2+1; 
bc  = u[0,t]==1; 
sol = AbsoluteTiming[TimeConstrained[DSolve[{pde,ic,bc}, u[x, t], {x, t}], 60*10]];
 

{{u(x,t){Integrate[(e(xK[1])24te(x+K[1])24t)(K[1]2+1),{K[1],0,},AssumptionsTrue]+txIntegrate[ex24(tK[2])(tK[2])3/2,{K[2],0,t},AssumptionsTrue]2πtx>0IndeterminateTrue}}

Maple

restart; 
pde := diff(u(x,t),t)= diff(u(x,t),x$2); 
ic  := u(x,0)=x^2+1; 
bc :=u(0,t)=1; 
cpu_time := timelimit(60*10,CodeTools[Usage](assign('sol',pdsolve([pde,ic,bc],u(x,t))),output='realtime'));
 

u(x,t)=x2+2t2L1(esxs2,s,t)+1

____________________________________________________________________________________