Reported to WRI CASE: 4278450

Comparing the following, all done from clean kernel

Mathematica graphics

Mathematica graphics

The strange thing is that V 12 can solve this same PDE without the assumptions

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  = DSolve[{pde, bc, ic}, u[x, t], {x, t}]

Mathematica graphics

But it says in the above answer that it wants x>0,t>0, which is why I gave it the assumptions to help it, but then it returns undefined.

Something seems to have gone wrong in V 12 DSolve here, or may be in the Integrate? I do not know.

Do others see the same result on V 12?. Answer given by V 11.3 is the correct one.

Any workaround for V 12 to make it give same answer as V 11.3?


fyi, To verify that 11.3 solution is correct, I solved it by hand

Solving \begin{align} u_{t} & =ku_{xx\qquad}t>0,x>0\tag{1}\\ u\left( 0,t\right) & =A\nonumber\\ u\left( x,0\right) & =0\nonumber \end{align} And $u\left( x,t\right) <\infty$ as $x\rightarrow\infty$. This means $u\left( x,t\right) $ is bounded. This conditions is always needed to solve these problems.

Let $U\left( x,s\right) $ be the Laplace transform of $u\left( x,t\right) $. Defined as $$ \mathcal{L} \left( u,t\right) =\int_{0}^{\infty}e^{-st}u\left( x,t\right) dt $$ Applying Laplace transform to the original PDE (1) gives $$ sU\left( x,s\right) -u\left( x,0\right) =kU_{xx}\left( x,s\right) $$ But $u\left( x,0\right) =0$, therefore the above becomes $$ U_{xx}-\frac{s}{k}U=0 $$ The solution to this differential equation is $$ U\left( x,s\right) =c_{1}e^{\sqrt{\frac{s}{k}}x}+c_{2}e^{-\sqrt{\frac{s}{k} }x} $$ Since $u\left( x,t\right) $ is bounded in the limit as $x\rightarrow\infty$ and $k>0$, therefore it must be that $c_{1}=0$ to keep the solution bounded. The above simplifies to $$ U\left( x,s\right) =c_{2}e^{-\sqrt{\frac{s}{k}}x}\tag{2} $$ At $x=0\,,u\left( 0,t\right) =A$. Therefore $U\left( 0,s\right) = \mathcal{L}\left( u\left( 0,t\right) \right) =\mathcal{L} \left( A\right) =\frac{1}{s}A$. Hence at $x=0$ the above gives $$ \frac{1}{s}A=c_{2} $$ Therefore (2) becomes \begin{equation} U\left( x,s\right) =\frac{A}{s}e^{-\sqrt{\frac{s}{k}}x}\tag{3} \end{equation} From tables, the inverse Laplace transform of the above is (since $x>0,k>0$) $$ u\left( x,t\right) =A\operatorname{erfc}\left( \frac{x}{2\sqrt{kt}}\right) $$ With $A=60,k=\frac{1}{10}$ the above becomes

\begin{align*} u\left( x,t\right) & =60\operatorname{erfc}\left( \frac{x}{2\sqrt {\frac{1}{10}t}}\right) \\ & =60\operatorname{erfc}\left( \frac{\sqrt{\frac{5}{2}}x}{\sqrt{t}}\right) \end{align*}

  • 2
    $\begingroup$ Yes, I have the same answer on version 12. $\endgroup$ – Alex Trounev Jul 9 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.