# How can I solve this impulsive heat equation please?

Posted 4 months ago
705 Views
|
3 Replies
|
1 Total Likes
|
 I need to solve the following impulsive heat equation: $$\left\{\begin{array}{ll} \partial_{t} \psi(x,t)-\partial_{xx} \psi(x,t)=0, & (x,t)\in (0,1) \times((0, 2) \backslash\{1\}) \\ \psi(0,t)= \psi(1,t)=0, & t \in (0, 2) \\ \psi(x, 0)= x (1-x), & x \in (0,1) \\ \psi(x, 1)=\psi\left(x, 1^{-}\right)+4, & x \in (0,1) \end{array}\right.$$ $1^{-}$ denotes the limit to the left!This is the code I tried in Mathematica, but it's not giving the results (* problem *) homogen = If[x = 1, {f[x, t] == Limit[f[x, t], t -> 1, Direction -> "FromBelow"] + 4}, {D[f[x, t], {t, 1}] - D[f[x, t], {x, 2}] == 0}]; (*Initial conditions *) ic = {f[x, 0] == x*(1 - x)}; (* Dirichlet boundary conditions*) bc = {f[0, t] == 0, f[1, t] == 0}; (*solution*) sol = DSolve[{homogen, ic, bc}, f[x, t], {x, 0, 1}, {t, 0, 2}]
3 Replies
Sort By:
Posted 4 months ago
 If[x = 1 ? Perhaps you meant If[x == 1? Try using Piecewise rather than If.