Please I need your help!! I need to solve the following system:

$$ \left\{\begin{array}{ll} \partial_{t} \psi(x,t)-\Delta \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!

Best regards,

  • 3
    $\begingroup$ What is $\Delta\psi(x,t)$? Also what have you tried so far? $\endgroup$ – thorimur Jun 19 at 21:59
  • 1
    $\begingroup$ if $x$ goes from zero to 1 and $t$ from 0 to 2, why does the last condition says $x$ from 0 to 2? You can easily solve the above heat PDE without the last condition you have, which I do not understand what physically it means. Here is the code pde=D[u[x,t],t]==D[u[x,t],{x,2}]; bc={u[0,t]==0,u[1,t]==0}; ic=u[x,0]==x*(1-x); sol=DSolve[{pde,ic,bc},u[x,t],{x,t}] $\endgroup$ – Nasser Jun 19 at 23:09
  • 3
    $\begingroup$ This really isn't a forum for getting homework coded by others. $\endgroup$ – Daniel Lichtblau Jun 20 at 14:32
  • 1
    $\begingroup$ Show the code you have tried in Mathematica format (not an image of the code) and the results you obtained. $\endgroup$ – bbgodfrey Jun 21 at 1:12
  • 2
    $\begingroup$ It's best to explain why a question is downvoted (although I did not cast the downvote myself). The impression this question makes is that someone heard that Mathematica can solve differential equations, but that person does not know how to use Mathematica, so asks others to do it. This is considered inappropriate on this site. It is something you would pay a consultant to do. The expectations is that first you learn the basics of Mathematica, learn how to solve simple differential equations, then explain what specific difficulty you encountered while trying to solve your actual one. $\endgroup$ – Szabolcs Jun 21 at 10:35

I think that this is what you want. Mathematica 12.3 solves it in several minutes:

sol = DSolveValue[{D[u[x, t], t] == 
    D[u[x, t], {x, 2}] + DiracDelta[t - 1], u[0, t] == 0, 
   u[1, t] == 0, u[x, 0] == x (1 - x)}, u[x, t], {x, t}]

Result is returned an two inactive sums:

FullSimplify[sol /. K[1] -> n, t ∈ Reals]

Inactive[Sum][-((4 (-1 + (-1)^n) E^(-n^2 π^2 t) Sin[n π x])/(n^3 π^3)), {n, 1, ∞}] + 
 Inactive[Sum][-((2 (-1 + (-1)^n) E^(-n^2 π^2 (-1 + t))
     HeavisideTheta[-1 + t] Sin[n π x])/(n π)), {n, 1, ∞}]

Not the answer you're looking for? Browse other questions tagged or ask your own question.