Travou nisso? Resolva com IA
Calculus · real student question

Solve the partial differential equation dC/dt = D * d2C/dx2 - k*C.

Question

Solve the partial differential equation

∂C∂t=D∂2C∂x2−kC\frac{\partial C}{\partial t}=D\frac{\partial^{2}C}{\partial x^{2}}-kC

Step-by-step solution

  1. Read the physics in the two terms. D CxxD\,C_{xx} is ordinary diffusion and −kC-kC is first-order decay: substance spreads out while also disappearing at a rate proportional to how much is present. The two mechanisms are independent, which suggests the solution should factor into a decay part times a diffusion part.

  2. Make the substitution that peels off the decay. Set

    C(x,t)=e−ktu(x,t)C(x,t)=e^{-kt}u(x,t)

    Then Ct=e−kt(ut−ku)C_{t}=e^{-kt}\left(u_{t}-ku\right) and Cxx=e−ktuxxC_{xx}=e^{-kt}u_{xx}, because the exponential does not depend on xx.

  3. Substitute and cancel. The equation becomes

    e−kt(ut−ku)=De−ktuxx−ke−ktue^{-kt}\left(u_{t}-ku\right)=De^{-kt}u_{xx}-ke^{-kt}u

    Dividing by e−kte^{-kt} (never zero) gives ut−ku=Duxx−kuu_{t}-ku=Du_{xx}-ku, and the −ku-ku terms cancel on both sides:

    ut=Duxxu_{t}=Du_{xx}

    The decay term is gone exactly — not approximately — so every known solution of the heat equation transfers.

  4. Solve the reduced problem by separation of variables. Writing u=X(x)T(t)u=X(x)T(t) and dividing by XTXT:

    T′T=DX′′X=−λ\frac{T'}{T}=D\frac{X''}{X}=-\lambda

    so T(t)=e−λtT(t)=e^{-\lambda t} and X′′+λDX=0X''+\dfrac{\lambda}{D}X=0. For λ>0\lambda>0 this gives X=Acos⁡λ/D x+Bsin⁡λ/D xX=A\cos\sqrt{\lambda/D}\,x+B\sin\sqrt{\lambda/D}\,x; the admissible λ\lambda are fixed by the boundary conditions.

  5. Assemble the general separated solution. Undoing the substitution,

    C(x,t)=e−kt∑n(Ancos⁡λnDx+Bnsin⁡λnDx)e−λntC(x,t)=e^{-kt}\sum_{n}\left(A_{n}\cos\sqrt{\tfrac{\lambda_{n}}{D}}x+B_{n}\sin\sqrt{\tfrac{\lambda_{n}}{D}}x\right)e^{-\lambda_{n}t}

    with the coefficients An,BnA_{n},B_{n} determined by the initial profile C(x,0)C(x,0).

  6. Sanity-check the limiting cases. If k=0k=0 the substitution is trivial and the equation is the plain heat equation ✓. If D=0D=0 the PDE reduces to Ct=−kCC_{t}=-kC, whose solution C=C0e−ktC=C_{0}e^{-kt} is exactly what the substitution predicts with uu constant ✓. Every mode decays at the combined rate k+λnk+\lambda_{n}, so decay and diffusion simply add in the exponent.

Answer

C(x,t)=e−ktu(x,t)whereut=DuxxC(x,t)=e^{-kt}u(x,t)\quad\text{where}\quad u_{t}=Du_{xx}

Need to solve a different problem like this? Open the solver →