Sometimes Mathematica generates solutions to a PDE which are hard to read, since it attaches assumptions to the result. If a user knows these assumptions are obvious physically, they might want to avoid having them included in the output so that it is easier to read.
I do not know how to tell Mathematica to avoid showing these assumptions. The option GenerateConditions->False
does not work here, since this is a call to DSolve
which does not accept this option. But DSolve
internally uses Integrate
Is there other ways to do this? Here is a MWE
Example 1
Remove[L0];
ClearAll[u,t,k,x,f];
pde=D[u[x,t],t]==k D[u[x,t],{x,2}];
bc={Derivative[1,0][u][0,t]==0,Derivative[1,0][u][L0,t]==0}
ic=u[x,0]==f[x];
sol=DSolve[{pde,bc,ic},u[x,t],{x,t}];
sol=sol/.{K[1]->n,K[2]->x}
The solution is correct. But I'd like to see it as
I do not know how to pass GenerateConditions->False
to Integrate
which is internally used by DSolve
.
Btw, Maple generates the same answer, without those assumptions by default, which makes it little easier to read
restart;
L:='L'; u:='u'; t:='t'; x:='x';
interface(showassumed=0);
assume(L>0);
pde:=diff(u(x,t),t)=k*diff(u(x,t),x$2);
bc:=D[1](u)(0,t)=0,D[1](u)(L,t)=0:
ic:=u(x,0)=f(x):
sol:=pdsolve([pde,bc,ic],u(x,t)):
sol:=subs(_Z2=n,sol);
Example 2
It also depends on the PDE and the boundary conditions. For example, in this one, Mathematica generates strange Assumptions->True
in the result, which I do not understand, and did not include assumptions on time or length or k
as above. But the PDE solution is correct
Remove[L0];
ClearAll[u,t,k,x];
pde=D[u[x,t],t]==k D[u[x,t],{x,2}];
bc={u[0,t]==0,u[L0,t]==0};
ic=u[x,0]==f[x];
sol=DSolve[{pde,bc,ic},u[x,t],{x,t}];
sol=sol/.K[1]->n
In summary, I'd just like an option to disable display of Assumptions
in result if possible.
I convert these results to Latex, and with assumptions there, the output is hard to read.
Using version 11.3 on windows.