MATH529 L09
Nonhomogenous equations

PDE problem is inhomogeneous if either PDE or boundary conditions are inhomogeneous.

Time-independent inhomogeneity

Consider (Subscript[u, t]) = k (Subscript[u, x x])+ F(x), 0<x<L, t>0, a PDE with time-independent forcing together with initial condition u(x,0)=f(x), and time-independent Dirichlet boundary conditions u(0,t)=(Subscript[u, 0]), u(L,t)=(Subscript[u, 1]).
Decompose into transient and steady-state: u(x,t)=v(x,t)+w(x)

PDE = (∂_t)u[x,t] == k (∂_(x,x))u[x,t]+F[x]; IC = u[x,0]==f[x];
BC0= u[0,t]==u0; BC1 = u[L,t]==u1;

Transient problem captures effect of initial condition: (Subscript[v, t])=k (Subscript[v, x x]), v(0,t)=0, v(L,t)=0.

At steady-state there no further changes in time: 0=(Subscript[w, x x])+F(x), w(0)=(Subscript[u, 0]), w(L)=(Subscript[u, 1]).

Transient

vPDE = (∂_t)v[x,t] == k (∂_(x,x))v[x,t]; vIC = v[x,0]==f[x];
vBC0= v[0,t]==0; vBC1 = v[L,t]==0;
tIBVP = {vPDE,vIC,vBC0,vBC1};

v[n_,x_,t_]= Sin[(n π / L) x] Exp[-k(((n π / L))^2) t]

v[x_,t_]=v[n,x,t];Assuming[n∈Integers, Simplify[tIBVP]]

A[n_]:=(2/L)Integrate[f[x] Sin[((n π x)/L)],{x,0,L}];
v[x_,t_] = Sum[A[n] v[n,x,t],{n,1,5}];
Assuming[n∈Integers, Simplify[tIBVP]]